refactor(tools): remove redundant limits and acknowledgements
This commit is contained in:
@@ -35,7 +35,7 @@ describe("browser CLI parity", () => {
|
||||
]),
|
||||
};
|
||||
const listed = await runCli(
|
||||
["list-browser-targets", browser.endpoint, "--approved", "--json"],
|
||||
["list-browser-targets", browser.endpoint, "--json"],
|
||||
environment,
|
||||
);
|
||||
expect(listed).toMatchObject({
|
||||
@@ -50,15 +50,11 @@ describe("browser CLI parity", () => {
|
||||
"inspect-web-page",
|
||||
browser.endpoint,
|
||||
"allowed-page",
|
||||
"--approved",
|
||||
"--observation-ms",
|
||||
"0",
|
||||
"--include-console-text",
|
||||
"--console-text-approved",
|
||||
"--include-json-body-shapes",
|
||||
"--json-body-schema-approved",
|
||||
"--include-websocket-shapes",
|
||||
"--websocket-shape-approved",
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
@@ -145,8 +141,6 @@ describe("browser CLI capture parity", () => {
|
||||
"analyze-web-bundle",
|
||||
browser.endpoint,
|
||||
"allowed-page",
|
||||
"--approved",
|
||||
"--source-capture-approved",
|
||||
"--observation-ms",
|
||||
"0",
|
||||
"--json",
|
||||
@@ -165,7 +159,6 @@ describe("browser CLI capture parity", () => {
|
||||
"observe-web-session",
|
||||
browser.endpoint,
|
||||
"allowed-page",
|
||||
"--approved",
|
||||
"--observation-ms",
|
||||
"5",
|
||||
"--json",
|
||||
@@ -186,7 +179,6 @@ describe("browser CLI capture parity", () => {
|
||||
"discover-webmcp-tools",
|
||||
browser.endpoint,
|
||||
"allowed-page",
|
||||
"--approved",
|
||||
"--observation-ms",
|
||||
"0",
|
||||
"--json",
|
||||
@@ -202,14 +194,7 @@ describe("browser CLI capture parity", () => {
|
||||
},
|
||||
});
|
||||
const screenshot = await runCli(
|
||||
[
|
||||
"capture-web-screenshot",
|
||||
browser.endpoint,
|
||||
"allowed-page",
|
||||
"--approved",
|
||||
"--screenshot-approved",
|
||||
"--json",
|
||||
],
|
||||
["capture-web-screenshot", browser.endpoint, "allowed-page", "--json"],
|
||||
environment,
|
||||
);
|
||||
const artifact = screenshotArtifact(screenshot);
|
||||
@@ -251,9 +236,9 @@ describe("browser CLI capture parity", () => {
|
||||
);
|
||||
});
|
||||
|
||||
describe("browser CLI approval", () => {
|
||||
describe("browser CLI configured access", () => {
|
||||
it(
|
||||
"requires explicit approval before opening the CDP endpoint",
|
||||
"uses the configured endpoint without a redundant request approval flag",
|
||||
async () => {
|
||||
const browser = await startFakeCdpBrowser();
|
||||
browsers.push(browser);
|
||||
@@ -269,11 +254,11 @@ describe("browser CLI approval", () => {
|
||||
},
|
||||
);
|
||||
expect(result).toMatchObject({
|
||||
error: "Browser observation failed",
|
||||
code: "invalid_request",
|
||||
category: "invalid_input",
|
||||
operation: "list_browser_targets",
|
||||
normalized_result: {
|
||||
targets: [{ target_id: "allowed-page" }],
|
||||
},
|
||||
});
|
||||
expect(browser.commands).toHaveLength(0);
|
||||
},
|
||||
INTEGRATION_TEST_TIMEOUT_MS,
|
||||
);
|
||||
|
||||
@@ -51,7 +51,7 @@ describe("Electron CLI parity", () => {
|
||||
REA_ELECTRON_FILE_ROOTS_JSON: JSON.stringify([root]),
|
||||
};
|
||||
const listed = await runCli(
|
||||
["list-electron-targets", browser.endpoint, "--approved", "--json"],
|
||||
["list-electron-targets", browser.endpoint, "--json"],
|
||||
environment,
|
||||
);
|
||||
expect(listed).toMatchObject({
|
||||
@@ -65,7 +65,6 @@ describe("Electron CLI parity", () => {
|
||||
"inspect-electron-page",
|
||||
browser.endpoint,
|
||||
"electron-page",
|
||||
"--approved",
|
||||
"--observation-ms",
|
||||
"0",
|
||||
"--json",
|
||||
|
||||
@@ -48,12 +48,7 @@ describe("JavaScript runtime observation CLI parity", () => {
|
||||
};
|
||||
|
||||
const listed = await runCli(
|
||||
[
|
||||
"list-javascript-runtime-targets",
|
||||
inspector.endpoint,
|
||||
"--approved",
|
||||
"--json",
|
||||
],
|
||||
["list-javascript-runtime-targets", inspector.endpoint, "--json"],
|
||||
environment,
|
||||
);
|
||||
expect(listed).toMatchObject({
|
||||
@@ -71,7 +66,6 @@ describe("JavaScript runtime observation CLI parity", () => {
|
||||
inspector.targetId,
|
||||
"--runtime-kind",
|
||||
"node",
|
||||
"--approved",
|
||||
"--observation-ms",
|
||||
"10",
|
||||
"--json",
|
||||
@@ -105,7 +99,6 @@ describe("JavaScript runtime observation CLI parity", () => {
|
||||
allowed_origins: [],
|
||||
target_id: inspector.targetId,
|
||||
runtime_kind: "node",
|
||||
approved: true,
|
||||
observation_ms: 10,
|
||||
limits: {
|
||||
max_events: 10_000,
|
||||
|
||||
@@ -98,7 +98,6 @@ describe("process CLI errors", () => {
|
||||
await writeFile(
|
||||
scenario,
|
||||
JSON.stringify({
|
||||
approved: true,
|
||||
executable: "/bin/sh",
|
||||
working_directory: "/tmp",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user