refactor(observation): internalize capture budgets
This commit is contained in:
@@ -19,6 +19,7 @@ import type { ToolContract } from "../contracts/toolContracts.js";
|
||||
import type { AnalysisError } from "../domain/errors.js";
|
||||
import type { Evidence } from "../domain/evidence.js";
|
||||
import { analyzeWebBundleInputSchema } from "../domain/webBundleAnalysis.js";
|
||||
import { inspectWebPageInputSchema } from "../domain/browserObservation.js";
|
||||
import type { Result } from "../domain/result.js";
|
||||
import type { Logger } from "../logger.js";
|
||||
import { mcpProgressReporter } from "./mcpProgress.js";
|
||||
@@ -83,10 +84,12 @@ export const registerBrowserTools = (
|
||||
inspectContract,
|
||||
{ input, context },
|
||||
(parsed, { signal, progress }) =>
|
||||
inspectWebPage(options.browser, options.permissionAuthority, parsed, {
|
||||
signal,
|
||||
progress,
|
||||
}),
|
||||
inspectWebPage(
|
||||
options.browser,
|
||||
options.permissionAuthority,
|
||||
inspectWebPageInputSchema.parse(parsed),
|
||||
{ signal, progress },
|
||||
),
|
||||
),
|
||||
);
|
||||
server.registerTool(
|
||||
|
||||
@@ -17,6 +17,7 @@ import type { ToolContract } from "../contracts/toolContracts.js";
|
||||
import type { AnalysisError } from "../domain/errors.js";
|
||||
import type { Evidence } from "../domain/evidence.js";
|
||||
import type { Result } from "../domain/result.js";
|
||||
import { inspectElectronPageInputSchema } from "../domain/electronObservation.js";
|
||||
import type { Logger } from "../logger.js";
|
||||
import { mcpProgressReporter } from "./mcpProgress.js";
|
||||
import { logToolExecution } from "./toolLogging.js";
|
||||
@@ -81,7 +82,7 @@ export const registerElectronTools = (
|
||||
inspectElectronPage(
|
||||
options.electron,
|
||||
options.permissionAuthority,
|
||||
parsed,
|
||||
inspectElectronPageInputSchema.parse(parsed),
|
||||
{
|
||||
signal,
|
||||
progress,
|
||||
|
||||
@@ -12,6 +12,7 @@ import type { ToolContract } from "../contracts/toolContracts.js";
|
||||
import type { AnalysisError } from "../domain/errors.js";
|
||||
import type { Evidence } from "../domain/evidence.js";
|
||||
import type { Result } from "../domain/result.js";
|
||||
import { observeJavaScriptRuntimeInputSchema } from "../domain/javascriptRuntimeObservation.js";
|
||||
import type { Logger } from "../logger.js";
|
||||
import { logToolExecution } from "./toolLogging.js";
|
||||
import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
|
||||
@@ -60,7 +61,7 @@ export const registerJavaScriptRuntimeObservationTools = (
|
||||
observeJavaScriptRuntime(
|
||||
options.runtime,
|
||||
options.permissionAuthority,
|
||||
parsed,
|
||||
observeJavaScriptRuntimeInputSchema.parse(parsed),
|
||||
{ signal },
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user