Remove REA permission grants, scope ceilings, approval confirmations, and inert settings. Preserve selected local evidence, accept caller-chosen commands and paths, and report actual runtime failures. Harden provider results, schema serialization, snapshot evidence binding, archive paths, source maps, native screenshots, managed EH parsing, and cancellation cleanup. Regenerate tool metadata and document direct invocation. BREAKING CHANGE: Removed permission configuration and policy commands, approval fields, filesystem scope inputs, and fixed confirmation options. Process capture inherits the host environment and accepts command names; callers must refresh tool schemas and migrate removed fields.
67 lines
1.8 KiB
TypeScript
67 lines
1.8 KiB
TypeScript
import { z } from "incur";
|
|
|
|
/** Accept an agent-selected browser observation duration without an artificial ceiling. */
|
|
export const observationDuration = (fallback: number, minimum = 0) =>
|
|
z
|
|
.number()
|
|
.int()
|
|
.min(minimum)
|
|
.default(fallback)
|
|
.describe("Observation duration in milliseconds");
|
|
|
|
/** Shared passive browser origin options. */
|
|
export const browserScopeOptions = {
|
|
allowedOrigins: z
|
|
.array(z.string().min(1))
|
|
.optional()
|
|
.describe("Optional exact-origin filter"),
|
|
};
|
|
|
|
export const browserPageInspectionOptions = z.object({
|
|
...browserScopeOptions,
|
|
observationMs: observationDuration(500),
|
|
includeAccessibilityText: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include accessibility text"),
|
|
includeConsoleText: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include console message text"),
|
|
includeJsonBodyShapes: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include structural shapes of JSON response bodies"),
|
|
includeWebsocketShapes: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include structural shapes of WebSocket payloads"),
|
|
includeScriptSources: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include JavaScript source text"),
|
|
includeStorageKeys: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include storage key names without values"),
|
|
includeStorageFingerprints: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include content-derived storage fingerprints"),
|
|
});
|
|
|
|
export const electronPageInspectionOptions = z.object({
|
|
observationMs: observationDuration(100),
|
|
includeScriptSources: z
|
|
.boolean()
|
|
.default(false)
|
|
.describe("Include JavaScript source text"),
|
|
});
|
|
|
|
export const javascriptApplicationOptions = z.object({
|
|
artifactFormat: z
|
|
.enum(["auto", "asar", "directory"])
|
|
.default("auto")
|
|
.describe("Application artifact format"),
|
|
});
|