Initial segregate: proxy source, deploy manifests, ImagePolicy Flux CRs.
build-and-push / build (push) Failing after 2m45s
build-and-push / build (push) Failing after 2m45s
Move workload out of infra with cursor-devbox-style GitRepository + run_number-sha image automation.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { describe, it } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { extractToolNameFromPermission } from "./session-manager.mjs";
|
||||
|
||||
describe("extractToolNameFromPermission", () => {
|
||||
it("parses client MCP title format", () => {
|
||||
const name = extractToolNameFromPermission({
|
||||
toolCall: { title: "client-get_weather: get_weather" },
|
||||
});
|
||||
assert.equal(name, "get_weather");
|
||||
});
|
||||
|
||||
it("strips mcp_client_ prefix from rawInput name", () => {
|
||||
const name = extractToolNameFromPermission({
|
||||
toolCall: { rawInput: { name: "mcp_client_get_weather" } },
|
||||
});
|
||||
assert.equal(name, "get_weather");
|
||||
});
|
||||
|
||||
it("uses first token for built-in tools", () => {
|
||||
const name = extractToolNameFromPermission({
|
||||
toolCall: { title: "Shell: rm -rf /" },
|
||||
});
|
||||
assert.equal(name, "Shell");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user