refactor(tools): remove remaining arbitrary workflow caps

This commit is contained in:
morluto
2026-09-29 17:00:06 +08:00
parent 4ad937c6ca
commit ecf3ed8bdb
43 changed files with 230 additions and 393 deletions
+2 -5
View File
@@ -39,7 +39,7 @@ export class BrowserStartupError extends Error {
}
}
/** Owned child process and bounded startup policy for Chrome CDP discovery. */
/** Owned child process and startup policy for Chrome CDP discovery. */
export interface BrowserStartupOptions {
readonly child: ChildProcess;
readonly executable: string;
@@ -129,7 +129,7 @@ const startupError = (
elapsedMs: Math.max(0, Math.round(performance.now() - startedAt)),
exitCode: options.child.exitCode,
signalCode: options.child.signalCode,
stderr: boundedStderr(options.stderr()),
stderr: options.stderr(),
},
state.failure === "spawn-error" ? { cause: state.cause } : undefined,
);
@@ -146,9 +146,6 @@ const readDevtoolsPort = async (path: string): Promise<number | null> => {
}
};
const boundedStderr = (stderr: string): string =>
stderr.length <= 65_536 ? stderr : stderr.slice(-65_536);
const delay = (milliseconds: number): Promise<void> =>
new Promise((resolve) => setTimeout(resolve, milliseconds));
+2 -2
View File
@@ -58,7 +58,7 @@ export const inspectCdpElectronPage = async (
limitations: [
"Local file paths exposed by the selected CDP target are retained in the observation.",
"REA does not evaluate renderer JavaScript, invoke Electron APIs, navigate, click, or close the page.",
"Script contents require separate source-capture approval and remain byte bounded.",
"Script contents require separate source-capture approval.",
],
mainFrameId: undefined,
navigationDuringCapture: false,
@@ -162,7 +162,7 @@ const enableElectronCapture = async (
);
await context.connection.send(
"Debugger.enable",
{ maxScriptsCacheSize: 4 * 1_024 * 1_024 },
{},
context.sessionId,
context.signal,
);