open-multi-agent-kit 0.92.0 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -1
- package/README.md +2 -2
- package/dist/core/agent-session.d.ts +36 -14
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +155 -357
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +5 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +5 -7
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +12 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +28 -15
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/extensions/builtin/command-safety-gate.d.ts +8 -0
- package/dist/core/extensions/builtin/command-safety-gate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/command-safety-gate.js +23 -0
- package/dist/core/extensions/builtin/command-safety-gate.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +4 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +5 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-resolver.d.ts +41 -3
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +17 -9
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +11 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/provider-resilience.d.ts.map +1 -1
- package/dist/core/provider-resilience.js +3 -1
- package/dist/core/provider-resilience.js.map +1 -1
- package/dist/core/reasoning-router-v4-weights.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4-weights.js +9 -3
- package/dist/core/reasoning-router-v4-weights.js.map +1 -1
- package/dist/core/reasoning-router-v4.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4.js +94 -24
- package/dist/core/reasoning-router-v4.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +11 -5
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sandbox/default-policy.d.ts +14 -0
- package/dist/core/sandbox/default-policy.d.ts.map +1 -0
- package/dist/core/sandbox/default-policy.js +58 -0
- package/dist/core/sandbox/default-policy.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-bash-runtime.d.ts +62 -0
- package/dist/core/session-bash-runtime.d.ts.map +1 -0
- package/dist/core/session-bash-runtime.js +167 -0
- package/dist/core/session-bash-runtime.js.map +1 -0
- package/dist/core/session-bash-service.d.ts +61 -0
- package/dist/core/session-bash-service.d.ts.map +1 -0
- package/dist/core/session-bash-service.js +155 -0
- package/dist/core/session-bash-service.js.map +1 -0
- package/dist/core/session-compaction-service.d.ts +48 -0
- package/dist/core/session-compaction-service.d.ts.map +1 -0
- package/dist/core/session-compaction-service.js +250 -0
- package/dist/core/session-compaction-service.js.map +1 -0
- package/dist/core/session-file-compaction.d.ts.map +1 -1
- package/dist/core/session-file-compaction.js +39 -5
- package/dist/core/session-file-compaction.js.map +1 -1
- package/dist/core/session-termination.d.ts.map +1 -1
- package/dist/core/session-termination.js +1 -1
- package/dist/core/session-termination.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +8 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills-catalog-cache.d.ts +25 -0
- package/dist/core/skills-catalog-cache.d.ts.map +1 -0
- package/dist/core/skills-catalog-cache.js +123 -0
- package/dist/core/skills-catalog-cache.js.map +1 -0
- package/dist/core/skills.d.ts +6 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +25 -4
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +2 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +5 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +41 -13
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/diagnostics.d.ts +29 -0
- package/dist/core/tools/diagnostics.d.ts.map +1 -0
- package/dist/core/tools/diagnostics.js +325 -0
- package/dist/core/tools/diagnostics.js.map +1 -0
- package/dist/core/tools/index.d.ts +2 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/verified-bash-adapter.d.ts +18 -1
- package/dist/core/verified-bash-adapter.d.ts.map +1 -1
- package/dist/core/verified-bash-adapter.js +38 -1
- package/dist/core/verified-bash-adapter.js.map +1 -1
- package/dist/core/verified-bash-runtime.d.ts +13 -0
- package/dist/core/verified-bash-runtime.d.ts.map +1 -0
- package/dist/core/verified-bash-runtime.js +81 -0
- package/dist/core/verified-bash-runtime.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-box.d.ts +27 -0
- package/dist/modes/interactive/components/control-panel-box.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-box.js +60 -8
- package/dist/modes/interactive/components/control-panel-box.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.js +100 -45
- package/dist/modes/interactive/components/control-panel-layout.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +9 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.js +10 -8
- package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-sparkles.d.ts +5 -0
- package/dist/modes/interactive/components/control-panel-sparkles.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-sparkles.js +14 -9
- package/dist/modes/interactive/components/control-panel-sparkles.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +10 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +3 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/status-sidebar.d.ts +49 -0
- package/dist/modes/interactive/components/status-sidebar.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-sidebar.js +253 -0
- package/dist/modes/interactive/components/status-sidebar.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +94 -20
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/omk-neon-control.json +13 -13
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/types/evidence.d.ts +1 -1
- package/dist/types/evidence.d.ts.map +1 -1
- package/dist/types/evidence.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +19 -8
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +31 -5
- package/dist/utils/frontmatter.js.map +1 -1
- package/docs/compaction.md +7 -0
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +94 -0
- package/docs/index.md +1 -0
- package/docs/rpc.md +5 -2
- package/docs/sdk.md +10 -4
- package/docs/settings.md +1 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/agents.test.ts +86 -0
- package/examples/extensions/subagent/agents.ts +18 -4
- package/examples/extensions/subagent/capabilities.ts +15 -1
- package/examples/extensions/subagent/domain-profiles.ts +272 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +15 -15
- package/package.json +10 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verified-bash-adapter.d.ts","sourceRoot":"","sources":["../../src/core/verified-bash-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,+BAA+B,EAC/B,wBAAwB,EACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAA6B,MAAM,iBAAiB,CAAC;AAE5G,eAAO,MAAM,iCAAiC,yEACmC,CAAC;AAIlF,MAAM,WAAW,4BAA4B;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAC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erifiedEvidenceExecutionOutcome,\n\tVerifiedEvidenceExecutionResult,\n\tVerifiedEvidenceExecutor,\n} from \"../guardrails/verified-executor.ts\";\nimport type { WorkspaceScope } from \"../types/evidence.ts\";\nimport { getShellConfig } from \"../utils/shell.ts\";\nimport { redactSensitiveText } from \"./redaction.ts\";\nimport { type BashOperations, type BashSandboxPreflight, createLocalBashOperations } from \"./tools/bash.ts\";\n\nexport const VERIFIED_BASH_REDACTION_POLICY_ID =\n\t\"omk-bash-combined-v1+omk-sensitive-text-v1+capture-tail-128k+tail-64k\" as const;\n\nconst MAX_CAPTURE_BYTES = MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES * 2;\n\nexport interface VerifiedBashExecutionRequest {\n\treadonly evidenceExecutor: VerifiedEvidenceExecutor;\n\treadonly operations: BashOperations;\n\treadonly goalId: string;\n\treadonly laneId?: string;\n\treadonly claim: string;\n\treadonly shell: string;\n\treadonly script: string;\n\treadonly cwd: string;\n\treadonly timeoutMs: number | null;\n\treadonly workspaceScope: WorkspaceScope;\n\treadonly executor?: \"bash-tool\" | \"ci-runner\";\n\treadonly toolCallId?: string;\n\treadonly signal?: AbortSignal;\n\t/** Optional process env forwarded to BashOperations.exec (session PI_*, spawnHook). */\n\treadonly env?: NodeJS.ProcessEnv;\n\t/** Optional live output fan-out; receipt capture still runs independently. */\n\treadonly onData?: (data: Buffer) => void;\n}\n\nexport type VerifiedLocalBashExecutionRequest = Omit<VerifiedBashExecutionRequest, \"operations\" | \"shell\"> & {\n\treadonly shellPath?: string;\n\treadonly sandboxPolicy?: BashSandboxPreflight;\n};\n\nexport class VerifiedBashAdapterError extends Error {\n\treadonly code = \"INVALID_RUNNER_EXIT\" as const;\n\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"VerifiedBashAdapterError\";\n\t}\n}\n\n/**\n * Bind a caller-trusted BashOperations execution to a receipt.\n * Default session/CLI paths enable this adapter unless `OMK_VERIFIED_BASH=0`.\n * BashOperations exposes a combined output stream, so the policy records the\n * redacted bounded stream as stdout and leaves stderr empty by construction.\n */\nexport async function executeVerifiedBash(\n\trequest: VerifiedBashExecutionRequest,\n): Promise<VerifiedEvidenceExecutionResult> {\n\tlet combined = Buffer.alloc(0);\n\n\tconst capture = (data: Buffer): void => {\n\t\t// ponytail: bounded concat is simpler than a chunk deque; split if profiling shows pressure.\n\t\tconst appended = Buffer.concat([combined, data]);\n\t\tcombined = appended.byteLength > MAX_CAPTURE_BYTES ? appended.subarray(-MAX_CAPTURE_BYTES) : appended;\n\t\trequest.onData?.(data);\n\t};\n\n\tconst alreadyRedactedOutput = () => {\n\t\tconst redacted = Buffer.from(redactSensitiveText(combined.toString(\"utf8\")));\n\t\tconst bounded =\n\t\t\tredacted.byteLength > MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES\n\t\t\t\t? redacted.subarray(-MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES)\n\t\t\t\t: redacted;\n\t\treturn {\n\t\t\tredactionPolicyId: VERIFIED_BASH_REDACTION_POLICY_ID,\n\t\t\tstdout: bounded,\n\t\t\tstderr: Buffer.alloc(0),\n\t\t};\n\t};\n\n\treturn request.evidenceExecutor.execute({\n\t\tgoalId: request.goalId,\n\t\t...(request.laneId !== undefined ? { laneId: request.laneId } : {}),\n\t\tclaim: request.claim,\n\t\tcommand: { kind: \"shell\", shell: request.shell, script: request.script },\n\t\tcwd: request.cwd,\n\t\ttimeoutMs: request.timeoutMs,\n\t\tworkspaceScope: request.workspaceScope,\n\t\texecutor: request.executor ?? \"bash-tool\",\n\t\t...(request.toolCallId !== undefined ? { toolCallId: request.toolCallId } : {}),\n\t\texecute: async (): Promise<VerifiedEvidenceExecutionOutcome> => {\n\t\t\tif (request.signal?.aborted) {\n\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst result = await request.operations.exec(request.script, request.cwd, {\n\t\t\t\t\tonData: capture,\n\t\t\t\t\t...(request.signal !== undefined ? { signal: request.signal } : {}),\n\t\t\t\t\t...(request.timeoutMs !== null ? { timeout: request.timeoutMs / 1000 } : {}),\n\t\t\t\t\t...(request.env !== undefined ? { env: request.env } : {}),\n\t\t\t\t});\n\t\t\t\tif (request.signal?.aborted) {\n\t\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tif (result.exitCode === null || !Number.isSafeInteger(result.exitCode)) {\n\t\t\t\t\tthrow new VerifiedBashAdapterError(\n\t\t\t\t\t\t\"bash runner returned an invalid exit code without an abort or timeout signal\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn result.exitCode === 0\n\t\t\t\t\t? { status: \"passed\", exitCode: 0, alreadyRedactedOutput: alreadyRedactedOutput() }\n\t\t\t\t\t: { status: \"failed\", exitCode: result.exitCode, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t} catch (error) {\n\t\t\t\tif (request.signal?.aborted || (error instanceof Error && error.message === \"aborted\")) {\n\t\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tif (error instanceof Error && error.message.startsWith(\"timeout:\")) {\n\t\t\t\t\treturn { status: \"timeout\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t});\n}\n\n/** Bind OMK's first-party local shell backend to the verified bash adapter. */\nexport async function executeVerifiedLocalBash(\n\trequest: VerifiedLocalBashExecutionRequest,\n): Promise<VerifiedEvidenceExecutionResult> {\n\tconst { shellPath, sandboxPolicy, ...executionRequest } = request;\n\tconst { shell } = getShellConfig(shellPath);\n\tconst resolvedShellPath = shell === \"sh\" && shellPath === undefined ? undefined : shell;\n\tconst operations = createLocalBashOperations({\n\t\t...(resolvedShellPath !== undefined ? { shellPath: resolvedShellPath } : {}),\n\t\t...(sandboxPolicy !== undefined ? { sandboxPolicy } : {}),\n\t});\n\treturn executeVerifiedBash({ ...executionRequest, operations, shell });\n}\n\nexport interface VerifiedBashOperationsBinding {\n\treadonly evidenceExecutor: VerifiedEvidenceExecutor;\n\treadonly goalId: string;\n\treadonly laneId?: string;\n\treadonly shell: string;\n\treadonly workspaceScope?: WorkspaceScope;\n}\n\n/**\n * Wrap BashOperations so each exec is receipt-bound. Used by AgentSession to\n * inject the default-on verified path into createBashTool without circular imports.\n */\nexport function createVerifiedBashOperations(\n\tinner: BashOperations,\n\tbinding: VerifiedBashOperationsBinding,\n): BashOperations {\n\treturn {\n\t\texec: async (command, cwd, options) => {\n\t\t\tconst claim = command.length > 200 ? `bash: ${command.slice(0, 197)}...` : `bash: ${command}`;\n\t\t\tconst execution = await executeVerifiedBash({\n\t\t\t\tevidenceExecutor: binding.evidenceExecutor,\n\t\t\t\toperations: inner,\n\t\t\t\tgoalId: binding.goalId,\n\t\t\t\t...(binding.laneId !== undefined ? { laneId: binding.laneId } : {}),\n\t\t\t\tclaim,\n\t\t\t\tshell: binding.shell,\n\t\t\t\tscript: command,\n\t\t\t\tcwd,\n\t\t\t\ttimeoutMs: options.timeout !== undefined && options.timeout > 0 ? options.timeout * 1000 : null,\n\t\t\t\tworkspaceScope: binding.workspaceScope ?? { root: cwd, artifactPaths: [] },\n\t\t\t\texecutor: \"bash-tool\",\n\t\t\t\t...(options.signal !== undefined ? { signal: options.signal } : {}),\n\t\t\t\t...(options.env !== undefined ? { env: options.env } : {}),\n\t\t\t\tonData: options.onData,\n\t\t\t});\n\t\t\tconst status = execution.receipt.core.status;\n\t\t\tif (status === \"aborted\") throw new Error(\"aborted\");\n\t\t\tif (status === \"timeout\") {\n\t\t\t\tthrow new Error(`timeout:${options.timeout ?? 0}`);\n\t\t\t}\n\t\t\treturn { exitCode: execution.receipt.core.exitCode };\n\t\t},\n\t};\n}\n"]}
|
|
@@ -12,7 +12,8 @@ export class VerifiedBashAdapterError extends Error {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Bind
|
|
15
|
+
* Bind a caller-trusted BashOperations execution to a receipt.
|
|
16
|
+
* Default session/CLI paths enable this adapter unless `OMK_VERIFIED_BASH=0`.
|
|
16
17
|
* BashOperations exposes a combined output stream, so the policy records the
|
|
17
18
|
* redacted bounded stream as stdout and leaves stderr empty by construction.
|
|
18
19
|
*/
|
|
@@ -22,6 +23,7 @@ export async function executeVerifiedBash(request) {
|
|
|
22
23
|
// ponytail: bounded concat is simpler than a chunk deque; split if profiling shows pressure.
|
|
23
24
|
const appended = Buffer.concat([combined, data]);
|
|
24
25
|
combined = appended.byteLength > MAX_CAPTURE_BYTES ? appended.subarray(-MAX_CAPTURE_BYTES) : appended;
|
|
26
|
+
request.onData?.(data);
|
|
25
27
|
};
|
|
26
28
|
const alreadyRedactedOutput = () => {
|
|
27
29
|
const redacted = Buffer.from(redactSensitiveText(combined.toString("utf8")));
|
|
@@ -53,6 +55,7 @@ export async function executeVerifiedBash(request) {
|
|
|
53
55
|
onData: capture,
|
|
54
56
|
...(request.signal !== undefined ? { signal: request.signal } : {}),
|
|
55
57
|
...(request.timeoutMs !== null ? { timeout: request.timeoutMs / 1000 } : {}),
|
|
58
|
+
...(request.env !== undefined ? { env: request.env } : {}),
|
|
56
59
|
});
|
|
57
60
|
if (request.signal?.aborted) {
|
|
58
61
|
return { status: "aborted", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };
|
|
@@ -87,4 +90,38 @@ export async function executeVerifiedLocalBash(request) {
|
|
|
87
90
|
});
|
|
88
91
|
return executeVerifiedBash({ ...executionRequest, operations, shell });
|
|
89
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Wrap BashOperations so each exec is receipt-bound. Used by AgentSession to
|
|
95
|
+
* inject the default-on verified path into createBashTool without circular imports.
|
|
96
|
+
*/
|
|
97
|
+
export function createVerifiedBashOperations(inner, binding) {
|
|
98
|
+
return {
|
|
99
|
+
exec: async (command, cwd, options) => {
|
|
100
|
+
const claim = command.length > 200 ? `bash: ${command.slice(0, 197)}...` : `bash: ${command}`;
|
|
101
|
+
const execution = await executeVerifiedBash({
|
|
102
|
+
evidenceExecutor: binding.evidenceExecutor,
|
|
103
|
+
operations: inner,
|
|
104
|
+
goalId: binding.goalId,
|
|
105
|
+
...(binding.laneId !== undefined ? { laneId: binding.laneId } : {}),
|
|
106
|
+
claim,
|
|
107
|
+
shell: binding.shell,
|
|
108
|
+
script: command,
|
|
109
|
+
cwd,
|
|
110
|
+
timeoutMs: options.timeout !== undefined && options.timeout > 0 ? options.timeout * 1000 : null,
|
|
111
|
+
workspaceScope: binding.workspaceScope ?? { root: cwd, artifactPaths: [] },
|
|
112
|
+
executor: "bash-tool",
|
|
113
|
+
...(options.signal !== undefined ? { signal: options.signal } : {}),
|
|
114
|
+
...(options.env !== undefined ? { env: options.env } : {}),
|
|
115
|
+
onData: options.onData,
|
|
116
|
+
});
|
|
117
|
+
const status = execution.receipt.core.status;
|
|
118
|
+
if (status === "aborted")
|
|
119
|
+
throw new Error("aborted");
|
|
120
|
+
if (status === "timeout") {
|
|
121
|
+
throw new Error(`timeout:${options.timeout ?? 0}`);
|
|
122
|
+
}
|
|
123
|
+
return { exitCode: execution.receipt.core.exitCode };
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
90
127
|
//# sourceMappingURL=verified-bash-adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verified-bash-adapter.js","sourceRoot":"","sources":["../../src/core/verified-bash-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAOtF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAkD,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5G,MAAM,CAAC,M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E,qBAAqB,EAAE,qBAAqB,EAAE,EAAE,CAAC;gBAC9F,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QAAA,CACD;KACD,CAAC,CAAC;AAAA,CACH;AAED,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC7C,OAA0C,EACC;IAC3C,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,gBAAgB,EAAE,GAAG,OAAO,CAAC;IAClE,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC5C,MAAM,iBAAiB,GAAG,KAAK,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;IACxF,MAAM,UAAU,GAAG,yBAAyB,CAAC;QAC5C,GAAG,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACzD,CAAC,CAAC;IACH,OAAO,mBAAmB,CAAC,EAAE,GAAG,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;AAAA,CACvE","sourcesContent":["import { MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES } from \"../guardrails/evidence-receipt.ts\";\nimport type {\n\tVerifiedEvidenceExecutionOutcome,\n\tVerifiedEvidenceExecutionResult,\n\tVerifiedEvidenceExecutor,\n} from \"../guardrails/verified-executor.ts\";\nimport type { WorkspaceScope } from \"../types/evidence.ts\";\nimport { getShellConfig } from \"../utils/shell.ts\";\nimport { redactSensitiveText } from \"./redaction.ts\";\nimport { type BashOperations, type BashSandboxPreflight, createLocalBashOperations } from \"./tools/bash.ts\";\n\nexport const VERIFIED_BASH_REDACTION_POLICY_ID =\n\t\"omk-bash-combined-v1+omk-sensitive-text-v1+capture-tail-128k+tail-64k\" as const;\n\nconst MAX_CAPTURE_BYTES = MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES * 2;\n\nexport interface VerifiedBashExecutionRequest {\n\treadonly evidenceExecutor: VerifiedEvidenceExecutor;\n\treadonly operations: BashOperations;\n\treadonly goalId: string;\n\treadonly laneId?: string;\n\treadonly claim: string;\n\treadonly shell: string;\n\treadonly script: string;\n\treadonly cwd: string;\n\treadonly timeoutMs: number | null;\n\treadonly workspaceScope: WorkspaceScope;\n\treadonly executor?: \"bash-tool\" | \"ci-runner\";\n\treadonly toolCallId?: string;\n\treadonly signal?: AbortSignal;\n}\n\nexport type VerifiedLocalBashExecutionRequest = Omit<VerifiedBashExecutionRequest, \"operations\" | \"shell\"> & {\n\treadonly shellPath?: string;\n\treadonly sandboxPolicy?: BashSandboxPreflight;\n};\n\nexport class VerifiedBashAdapterError extends Error {\n\treadonly code = \"INVALID_RUNNER_EXIT\" as const;\n\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"VerifiedBashAdapterError\";\n\t}\n}\n\n/**\n * Bind an opt-in, caller-trusted BashOperations execution to a receipt.\n * BashOperations exposes a combined output stream, so the policy records the\n * redacted bounded stream as stdout and leaves stderr empty by construction.\n */\nexport async function executeVerifiedBash(\n\trequest: VerifiedBashExecutionRequest,\n): Promise<VerifiedEvidenceExecutionResult> {\n\tlet combined = Buffer.alloc(0);\n\n\tconst capture = (data: Buffer): void => {\n\t\t// ponytail: bounded concat is simpler than a chunk deque; split if profiling shows pressure.\n\t\tconst appended = Buffer.concat([combined, data]);\n\t\tcombined = appended.byteLength > MAX_CAPTURE_BYTES ? appended.subarray(-MAX_CAPTURE_BYTES) : appended;\n\t};\n\n\tconst alreadyRedactedOutput = () => {\n\t\tconst redacted = Buffer.from(redactSensitiveText(combined.toString(\"utf8\")));\n\t\tconst bounded =\n\t\t\tredacted.byteLength > MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES\n\t\t\t\t? redacted.subarray(-MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES)\n\t\t\t\t: redacted;\n\t\treturn {\n\t\t\tredactionPolicyId: VERIFIED_BASH_REDACTION_POLICY_ID,\n\t\t\tstdout: bounded,\n\t\t\tstderr: Buffer.alloc(0),\n\t\t};\n\t};\n\n\treturn request.evidenceExecutor.execute({\n\t\tgoalId: request.goalId,\n\t\t...(request.laneId !== undefined ? { laneId: request.laneId } : {}),\n\t\tclaim: request.claim,\n\t\tcommand: { kind: \"shell\", shell: request.shell, script: request.script },\n\t\tcwd: request.cwd,\n\t\ttimeoutMs: request.timeoutMs,\n\t\tworkspaceScope: request.workspaceScope,\n\t\texecutor: request.executor ?? \"bash-tool\",\n\t\t...(request.toolCallId !== undefined ? { toolCallId: request.toolCallId } : {}),\n\t\texecute: async (): Promise<VerifiedEvidenceExecutionOutcome> => {\n\t\t\tif (request.signal?.aborted) {\n\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst result = await request.operations.exec(request.script, request.cwd, {\n\t\t\t\t\tonData: capture,\n\t\t\t\t\t...(request.signal !== undefined ? { signal: request.signal } : {}),\n\t\t\t\t\t...(request.timeoutMs !== null ? { timeout: request.timeoutMs / 1000 } : {}),\n\t\t\t\t});\n\t\t\t\tif (request.signal?.aborted) {\n\t\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tif (result.exitCode === null || !Number.isSafeInteger(result.exitCode)) {\n\t\t\t\t\tthrow new VerifiedBashAdapterError(\n\t\t\t\t\t\t\"bash runner returned an invalid exit code without an abort or timeout signal\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn result.exitCode === 0\n\t\t\t\t\t? { status: \"passed\", exitCode: 0, alreadyRedactedOutput: alreadyRedactedOutput() }\n\t\t\t\t\t: { status: \"failed\", exitCode: result.exitCode, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t} catch (error) {\n\t\t\t\tif (request.signal?.aborted || (error instanceof Error && error.message === \"aborted\")) {\n\t\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tif (error instanceof Error && error.message.startsWith(\"timeout:\")) {\n\t\t\t\t\treturn { status: \"timeout\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t});\n}\n\n/** Bind OMK's first-party local shell backend to the verified bash adapter. */\nexport async function executeVerifiedLocalBash(\n\trequest: VerifiedLocalBashExecutionRequest,\n): Promise<VerifiedEvidenceExecutionResult> {\n\tconst { shellPath, sandboxPolicy, ...executionRequest } = request;\n\tconst { shell } = getShellConfig(shellPath);\n\tconst resolvedShellPath = shell === \"sh\" && shellPath === undefined ? undefined : shell;\n\tconst operations = createLocalBashOperations({\n\t\t...(resolvedShellPath !== undefined ? { shellPath: resolvedShellPath } : {}),\n\t\t...(sandboxPolicy !== undefined ? { sandboxPolicy } : {}),\n\t});\n\treturn executeVerifiedBash({ ...executionRequest, operations, shell });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"verified-bash-adapter.js","sourceRoot":"","sources":["../../src/core/verified-bash-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAOtF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAkD,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5G,MAAM,CAAC,MAAM,iCAAiC,GAC7C,uEAAgF,CAAC;AAElF,MAAM,iBAAiB,GAAG,iCAAiC,GAAG,CAAC,CAAC;AA2BhE,MAAM,OAAO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E,CAAC;gBAC1B,MAAM,IAAI,KAAK,CAAC,WAAW,OAAO,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAAA,CACrD;KACD,CAAC;AAAA,CACF","sourcesContent":["import { MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES } from \"../guardrails/evidence-receipt.ts\";\nimport type {\n\tVerifiedEvidenceExecutionOutcome,\n\tVerifiedEvidenceExecutionResult,\n\tVerifiedEvidenceExecutor,\n} from \"../guardrails/verified-executor.ts\";\nimport type { WorkspaceScope } from \"../types/evidence.ts\";\nimport { getShellConfig } from \"../utils/shell.ts\";\nimport { redactSensitiveText } from \"./redaction.ts\";\nimport { type BashOperations, type BashSandboxPreflight, createLocalBashOperations } from \"./tools/bash.ts\";\n\nexport const VERIFIED_BASH_REDACTION_POLICY_ID =\n\t\"omk-bash-combined-v1+omk-sensitive-text-v1+capture-tail-128k+tail-64k\" as const;\n\nconst MAX_CAPTURE_BYTES = MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES * 2;\n\nexport interface VerifiedBashExecutionRequest {\n\treadonly evidenceExecutor: VerifiedEvidenceExecutor;\n\treadonly operations: BashOperations;\n\treadonly goalId: string;\n\treadonly laneId?: string;\n\treadonly claim: string;\n\treadonly shell: string;\n\treadonly script: string;\n\treadonly cwd: string;\n\treadonly timeoutMs: number | null;\n\treadonly workspaceScope: WorkspaceScope;\n\treadonly executor?: \"bash-tool\" | \"ci-runner\";\n\treadonly toolCallId?: string;\n\treadonly signal?: AbortSignal;\n\t/** Optional process env forwarded to BashOperations.exec (session PI_*, spawnHook). */\n\treadonly env?: NodeJS.ProcessEnv;\n\t/** Optional live output fan-out; receipt capture still runs independently. */\n\treadonly onData?: (data: Buffer) => void;\n}\n\nexport type VerifiedLocalBashExecutionRequest = Omit<VerifiedBashExecutionRequest, \"operations\" | \"shell\"> & {\n\treadonly shellPath?: string;\n\treadonly sandboxPolicy?: BashSandboxPreflight;\n};\n\nexport class VerifiedBashAdapterError extends Error {\n\treadonly code = \"INVALID_RUNNER_EXIT\" as const;\n\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"VerifiedBashAdapterError\";\n\t}\n}\n\n/**\n * Bind a caller-trusted BashOperations execution to a receipt.\n * Default session/CLI paths enable this adapter unless `OMK_VERIFIED_BASH=0`.\n * BashOperations exposes a combined output stream, so the policy records the\n * redacted bounded stream as stdout and leaves stderr empty by construction.\n */\nexport async function executeVerifiedBash(\n\trequest: VerifiedBashExecutionRequest,\n): Promise<VerifiedEvidenceExecutionResult> {\n\tlet combined = Buffer.alloc(0);\n\n\tconst capture = (data: Buffer): void => {\n\t\t// ponytail: bounded concat is simpler than a chunk deque; split if profiling shows pressure.\n\t\tconst appended = Buffer.concat([combined, data]);\n\t\tcombined = appended.byteLength > MAX_CAPTURE_BYTES ? appended.subarray(-MAX_CAPTURE_BYTES) : appended;\n\t\trequest.onData?.(data);\n\t};\n\n\tconst alreadyRedactedOutput = () => {\n\t\tconst redacted = Buffer.from(redactSensitiveText(combined.toString(\"utf8\")));\n\t\tconst bounded =\n\t\t\tredacted.byteLength > MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES\n\t\t\t\t? redacted.subarray(-MAX_EVIDENCE_RECEIPT_OUTPUT_BYTES)\n\t\t\t\t: redacted;\n\t\treturn {\n\t\t\tredactionPolicyId: VERIFIED_BASH_REDACTION_POLICY_ID,\n\t\t\tstdout: bounded,\n\t\t\tstderr: Buffer.alloc(0),\n\t\t};\n\t};\n\n\treturn request.evidenceExecutor.execute({\n\t\tgoalId: request.goalId,\n\t\t...(request.laneId !== undefined ? { laneId: request.laneId } : {}),\n\t\tclaim: request.claim,\n\t\tcommand: { kind: \"shell\", shell: request.shell, script: request.script },\n\t\tcwd: request.cwd,\n\t\ttimeoutMs: request.timeoutMs,\n\t\tworkspaceScope: request.workspaceScope,\n\t\texecutor: request.executor ?? \"bash-tool\",\n\t\t...(request.toolCallId !== undefined ? { toolCallId: request.toolCallId } : {}),\n\t\texecute: async (): Promise<VerifiedEvidenceExecutionOutcome> => {\n\t\t\tif (request.signal?.aborted) {\n\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst result = await request.operations.exec(request.script, request.cwd, {\n\t\t\t\t\tonData: capture,\n\t\t\t\t\t...(request.signal !== undefined ? { signal: request.signal } : {}),\n\t\t\t\t\t...(request.timeoutMs !== null ? { timeout: request.timeoutMs / 1000 } : {}),\n\t\t\t\t\t...(request.env !== undefined ? { env: request.env } : {}),\n\t\t\t\t});\n\t\t\t\tif (request.signal?.aborted) {\n\t\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tif (result.exitCode === null || !Number.isSafeInteger(result.exitCode)) {\n\t\t\t\t\tthrow new VerifiedBashAdapterError(\n\t\t\t\t\t\t\"bash runner returned an invalid exit code without an abort or timeout signal\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn result.exitCode === 0\n\t\t\t\t\t? { status: \"passed\", exitCode: 0, alreadyRedactedOutput: alreadyRedactedOutput() }\n\t\t\t\t\t: { status: \"failed\", exitCode: result.exitCode, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t} catch (error) {\n\t\t\t\tif (request.signal?.aborted || (error instanceof Error && error.message === \"aborted\")) {\n\t\t\t\t\treturn { status: \"aborted\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tif (error instanceof Error && error.message.startsWith(\"timeout:\")) {\n\t\t\t\t\treturn { status: \"timeout\", exitCode: null, alreadyRedactedOutput: alreadyRedactedOutput() };\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t});\n}\n\n/** Bind OMK's first-party local shell backend to the verified bash adapter. */\nexport async function executeVerifiedLocalBash(\n\trequest: VerifiedLocalBashExecutionRequest,\n): Promise<VerifiedEvidenceExecutionResult> {\n\tconst { shellPath, sandboxPolicy, ...executionRequest } = request;\n\tconst { shell } = getShellConfig(shellPath);\n\tconst resolvedShellPath = shell === \"sh\" && shellPath === undefined ? undefined : shell;\n\tconst operations = createLocalBashOperations({\n\t\t...(resolvedShellPath !== undefined ? { shellPath: resolvedShellPath } : {}),\n\t\t...(sandboxPolicy !== undefined ? { sandboxPolicy } : {}),\n\t});\n\treturn executeVerifiedBash({ ...executionRequest, operations, shell });\n}\n\nexport interface VerifiedBashOperationsBinding {\n\treadonly evidenceExecutor: VerifiedEvidenceExecutor;\n\treadonly goalId: string;\n\treadonly laneId?: string;\n\treadonly shell: string;\n\treadonly workspaceScope?: WorkspaceScope;\n}\n\n/**\n * Wrap BashOperations so each exec is receipt-bound. Used by AgentSession to\n * inject the default-on verified path into createBashTool without circular imports.\n */\nexport function createVerifiedBashOperations(\n\tinner: BashOperations,\n\tbinding: VerifiedBashOperationsBinding,\n): BashOperations {\n\treturn {\n\t\texec: async (command, cwd, options) => {\n\t\t\tconst claim = command.length > 200 ? `bash: ${command.slice(0, 197)}...` : `bash: ${command}`;\n\t\t\tconst execution = await executeVerifiedBash({\n\t\t\t\tevidenceExecutor: binding.evidenceExecutor,\n\t\t\t\toperations: inner,\n\t\t\t\tgoalId: binding.goalId,\n\t\t\t\t...(binding.laneId !== undefined ? { laneId: binding.laneId } : {}),\n\t\t\t\tclaim,\n\t\t\t\tshell: binding.shell,\n\t\t\t\tscript: command,\n\t\t\t\tcwd,\n\t\t\t\ttimeoutMs: options.timeout !== undefined && options.timeout > 0 ? options.timeout * 1000 : null,\n\t\t\t\tworkspaceScope: binding.workspaceScope ?? { root: cwd, artifactPaths: [] },\n\t\t\t\texecutor: \"bash-tool\",\n\t\t\t\t...(options.signal !== undefined ? { signal: options.signal } : {}),\n\t\t\t\t...(options.env !== undefined ? { env: options.env } : {}),\n\t\t\t\tonData: options.onData,\n\t\t\t});\n\t\t\tconst status = execution.receipt.core.status;\n\t\t\tif (status === \"aborted\") throw new Error(\"aborted\");\n\t\t\tif (status === \"timeout\") {\n\t\t\t\tthrow new Error(`timeout:${options.timeout ?? 0}`);\n\t\t\t}\n\t\t\treturn { exitCode: execution.receipt.core.exitCode };\n\t\t},\n\t};\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WorkspaceScope } from "../types/evidence.ts";
|
|
2
|
+
export declare function isVerifiedBashEnabled(env?: Record<string, string | undefined>): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Workspace scope for session bash receipts. Inside a git worktree the scope
|
|
5
|
+
* root is the toplevel and `artifactPaths` is the current dirty set (staged,
|
|
6
|
+
* modified, untracked; capped and sorted), which lets `captureWorkspaceFingerprint`
|
|
7
|
+
* bind HEAD plus a scope-limited dirty digest. Outside git, falls back to an
|
|
8
|
+
* empty artifact set under `cwd`. Never throws.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveSessionWorkspaceScope(cwd: string, options?: {
|
|
11
|
+
maxPaths?: number;
|
|
12
|
+
}): WorkspaceScope;
|
|
13
|
+
//# sourceMappingURL=verified-bash-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verified-bash-runtime.d.ts","sourceRoot":"","sources":["../../src/core/verified-bash-runtime.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,wBAAgB,qBAAqB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,OAAO,CAGvF;AAaD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAUzG","sourcesContent":["/**\n * Default-on gate for the verified bash adapter (opt-out via OMK_VERIFIED_BASH=0).\n *\n * Mirrors ADR-OMP-009: the receipt-bound path is the default experience; the\n * exact legacy unverified path remains available as a byte-identical rollback.\n */\nimport { spawnSync } from \"node:child_process\";\nimport type { WorkspaceScope } from \"../types/evidence.ts\";\n\nexport function isVerifiedBashEnabled(env?: Record<string, string | undefined>): boolean {\n\tconst source: Record<string, string | undefined> = env ?? process.env;\n\treturn source.OMK_VERIFIED_BASH !== \"0\";\n}\n\n// ---------------------------------------------------------------------------\n// Git-aware session workspace scope (bounded, TTL-cached)\n// ---------------------------------------------------------------------------\n\nconst SCOPE_TTL_MS = 1_000;\nconst SCOPE_CACHE_MAX = 8;\nconst SCOPE_MAX_PATHS = 32;\nconst GIT_TIMEOUT_MS = 1_500;\n\nconst scopeCache = new Map<string, { at: number; scope: WorkspaceScope }>();\n\n/**\n * Workspace scope for session bash receipts. Inside a git worktree the scope\n * root is the toplevel and `artifactPaths` is the current dirty set (staged,\n * modified, untracked; capped and sorted), which lets `captureWorkspaceFingerprint`\n * bind HEAD plus a scope-limited dirty digest. Outside git, falls back to an\n * empty artifact set under `cwd`. Never throws.\n */\nexport function resolveSessionWorkspaceScope(cwd: string, options?: { maxPaths?: number }): WorkspaceScope {\n\tconst cached = scopeCache.get(cwd);\n\tif (cached && Date.now() - cached.at < SCOPE_TTL_MS) return cached.scope;\n\tconst scope = computeSessionWorkspaceScope(cwd, options?.maxPaths ?? SCOPE_MAX_PATHS);\n\tif (scopeCache.size >= SCOPE_CACHE_MAX) {\n\t\tconst oldest = scopeCache.keys().next().value;\n\t\tif (oldest !== undefined) scopeCache.delete(oldest);\n\t}\n\tscopeCache.set(cwd, { at: Date.now(), scope });\n\treturn scope;\n}\n\nfunction computeSessionWorkspaceScope(cwd: string, maxPaths: number): WorkspaceScope {\n\ttry {\n\t\tconst top = spawnSync(\"git\", [\"-C\", cwd, \"rev-parse\", \"--show-toplevel\"], {\n\t\t\tencoding: \"utf8\",\n\t\t\ttimeout: GIT_TIMEOUT_MS,\n\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t});\n\t\tif (top.status !== 0 || typeof top.stdout !== \"string\") return { root: cwd, artifactPaths: [] };\n\t\tconst root = top.stdout.trim();\n\t\tif (root.length === 0) return { root: cwd, artifactPaths: [] };\n\t\tconst status = spawnSync(\"git\", [\"-C\", cwd, \"status\", \"--porcelain=v1\", \"-z\", \"--untracked-files=normal\"], {\n\t\t\ttimeout: GIT_TIMEOUT_MS,\n\t\t\tmaxBuffer: 4 * 1024 * 1024,\n\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t});\n\t\tif (status.status !== 0 || !status.stdout) return { root, artifactPaths: [] };\n\t\tconst fields = status.stdout.toString(\"utf8\").split(\"\\0\");\n\t\tconst paths: string[] = [];\n\t\tfor (let index = 0; index < fields.length; index++) {\n\t\t\tconst field = fields[index];\n\t\t\tif (field.length < 4) continue;\n\t\t\tconst xy = field.slice(0, 2);\n\t\t\tif (xy === \"!!\") continue;\n\t\t\tif (xy.includes(\"R\")) index++; // rename: consume the source path field too\n\t\t\tconst artifact = field.slice(3);\n\t\t\tif (artifact.length > 0) paths.push(artifact);\n\t\t}\n\t\tconst artifactPaths = [...new Set(paths)].sort().slice(0, maxPaths);\n\t\treturn { root, artifactPaths };\n\t} catch {\n\t\treturn { root: cwd, artifactPaths: [] };\n\t}\n}\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default-on gate for the verified bash adapter (opt-out via OMK_VERIFIED_BASH=0).
|
|
3
|
+
*
|
|
4
|
+
* Mirrors ADR-OMP-009: the receipt-bound path is the default experience; the
|
|
5
|
+
* exact legacy unverified path remains available as a byte-identical rollback.
|
|
6
|
+
*/
|
|
7
|
+
import { spawnSync } from "node:child_process";
|
|
8
|
+
export function isVerifiedBashEnabled(env) {
|
|
9
|
+
const source = env ?? process.env;
|
|
10
|
+
return source.OMK_VERIFIED_BASH !== "0";
|
|
11
|
+
}
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
// Git-aware session workspace scope (bounded, TTL-cached)
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
const SCOPE_TTL_MS = 1_000;
|
|
16
|
+
const SCOPE_CACHE_MAX = 8;
|
|
17
|
+
const SCOPE_MAX_PATHS = 32;
|
|
18
|
+
const GIT_TIMEOUT_MS = 1_500;
|
|
19
|
+
const scopeCache = new Map();
|
|
20
|
+
/**
|
|
21
|
+
* Workspace scope for session bash receipts. Inside a git worktree the scope
|
|
22
|
+
* root is the toplevel and `artifactPaths` is the current dirty set (staged,
|
|
23
|
+
* modified, untracked; capped and sorted), which lets `captureWorkspaceFingerprint`
|
|
24
|
+
* bind HEAD plus a scope-limited dirty digest. Outside git, falls back to an
|
|
25
|
+
* empty artifact set under `cwd`. Never throws.
|
|
26
|
+
*/
|
|
27
|
+
export function resolveSessionWorkspaceScope(cwd, options) {
|
|
28
|
+
const cached = scopeCache.get(cwd);
|
|
29
|
+
if (cached && Date.now() - cached.at < SCOPE_TTL_MS)
|
|
30
|
+
return cached.scope;
|
|
31
|
+
const scope = computeSessionWorkspaceScope(cwd, options?.maxPaths ?? SCOPE_MAX_PATHS);
|
|
32
|
+
if (scopeCache.size >= SCOPE_CACHE_MAX) {
|
|
33
|
+
const oldest = scopeCache.keys().next().value;
|
|
34
|
+
if (oldest !== undefined)
|
|
35
|
+
scopeCache.delete(oldest);
|
|
36
|
+
}
|
|
37
|
+
scopeCache.set(cwd, { at: Date.now(), scope });
|
|
38
|
+
return scope;
|
|
39
|
+
}
|
|
40
|
+
function computeSessionWorkspaceScope(cwd, maxPaths) {
|
|
41
|
+
try {
|
|
42
|
+
const top = spawnSync("git", ["-C", cwd, "rev-parse", "--show-toplevel"], {
|
|
43
|
+
encoding: "utf8",
|
|
44
|
+
timeout: GIT_TIMEOUT_MS,
|
|
45
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
46
|
+
});
|
|
47
|
+
if (top.status !== 0 || typeof top.stdout !== "string")
|
|
48
|
+
return { root: cwd, artifactPaths: [] };
|
|
49
|
+
const root = top.stdout.trim();
|
|
50
|
+
if (root.length === 0)
|
|
51
|
+
return { root: cwd, artifactPaths: [] };
|
|
52
|
+
const status = spawnSync("git", ["-C", cwd, "status", "--porcelain=v1", "-z", "--untracked-files=normal"], {
|
|
53
|
+
timeout: GIT_TIMEOUT_MS,
|
|
54
|
+
maxBuffer: 4 * 1024 * 1024,
|
|
55
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
56
|
+
});
|
|
57
|
+
if (status.status !== 0 || !status.stdout)
|
|
58
|
+
return { root, artifactPaths: [] };
|
|
59
|
+
const fields = status.stdout.toString("utf8").split("\0");
|
|
60
|
+
const paths = [];
|
|
61
|
+
for (let index = 0; index < fields.length; index++) {
|
|
62
|
+
const field = fields[index];
|
|
63
|
+
if (field.length < 4)
|
|
64
|
+
continue;
|
|
65
|
+
const xy = field.slice(0, 2);
|
|
66
|
+
if (xy === "!!")
|
|
67
|
+
continue;
|
|
68
|
+
if (xy.includes("R"))
|
|
69
|
+
index++; // rename: consume the source path field too
|
|
70
|
+
const artifact = field.slice(3);
|
|
71
|
+
if (artifact.length > 0)
|
|
72
|
+
paths.push(artifact);
|
|
73
|
+
}
|
|
74
|
+
const artifactPaths = [...new Set(paths)].sort().slice(0, maxPaths);
|
|
75
|
+
return { root, artifactPaths };
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return { root: cwd, artifactPaths: [] };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=verified-bash-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verified-bash-runtime.js","sourceRoot":"","sources":["../../src/core/verified-bash-runtime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA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EAAE,CAAC;YACpD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBAAE,SAAS;YAC/B,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7B,IAAI,EAAE,KAAK,IAAI;gBAAE,SAAS;YAC1B,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,KAAK,EAAE,CAAC,CAAC,4CAA4C;YAC3E,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAChC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,CAAC;QACD,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;QACpE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC;IACzC,CAAC;AAAA,CACD","sourcesContent":["/**\n * Default-on gate for the verified bash adapter (opt-out via OMK_VERIFIED_BASH=0).\n *\n * Mirrors ADR-OMP-009: the receipt-bound path is the default experience; the\n * exact legacy unverified path remains available as a byte-identical rollback.\n */\nimport { spawnSync } from \"node:child_process\";\nimport type { WorkspaceScope } from \"../types/evidence.ts\";\n\nexport function isVerifiedBashEnabled(env?: Record<string, string | undefined>): boolean {\n\tconst source: Record<string, string | undefined> = env ?? process.env;\n\treturn source.OMK_VERIFIED_BASH !== \"0\";\n}\n\n// ---------------------------------------------------------------------------\n// Git-aware session workspace scope (bounded, TTL-cached)\n// ---------------------------------------------------------------------------\n\nconst SCOPE_TTL_MS = 1_000;\nconst SCOPE_CACHE_MAX = 8;\nconst SCOPE_MAX_PATHS = 32;\nconst GIT_TIMEOUT_MS = 1_500;\n\nconst scopeCache = new Map<string, { at: number; scope: WorkspaceScope }>();\n\n/**\n * Workspace scope for session bash receipts. Inside a git worktree the scope\n * root is the toplevel and `artifactPaths` is the current dirty set (staged,\n * modified, untracked; capped and sorted), which lets `captureWorkspaceFingerprint`\n * bind HEAD plus a scope-limited dirty digest. Outside git, falls back to an\n * empty artifact set under `cwd`. Never throws.\n */\nexport function resolveSessionWorkspaceScope(cwd: string, options?: { maxPaths?: number }): WorkspaceScope {\n\tconst cached = scopeCache.get(cwd);\n\tif (cached && Date.now() - cached.at < SCOPE_TTL_MS) return cached.scope;\n\tconst scope = computeSessionWorkspaceScope(cwd, options?.maxPaths ?? SCOPE_MAX_PATHS);\n\tif (scopeCache.size >= SCOPE_CACHE_MAX) {\n\t\tconst oldest = scopeCache.keys().next().value;\n\t\tif (oldest !== undefined) scopeCache.delete(oldest);\n\t}\n\tscopeCache.set(cwd, { at: Date.now(), scope });\n\treturn scope;\n}\n\nfunction computeSessionWorkspaceScope(cwd: string, maxPaths: number): WorkspaceScope {\n\ttry {\n\t\tconst top = spawnSync(\"git\", [\"-C\", cwd, \"rev-parse\", \"--show-toplevel\"], {\n\t\t\tencoding: \"utf8\",\n\t\t\ttimeout: GIT_TIMEOUT_MS,\n\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t});\n\t\tif (top.status !== 0 || typeof top.stdout !== \"string\") return { root: cwd, artifactPaths: [] };\n\t\tconst root = top.stdout.trim();\n\t\tif (root.length === 0) return { root: cwd, artifactPaths: [] };\n\t\tconst status = spawnSync(\"git\", [\"-C\", cwd, \"status\", \"--porcelain=v1\", \"-z\", \"--untracked-files=normal\"], {\n\t\t\ttimeout: GIT_TIMEOUT_MS,\n\t\t\tmaxBuffer: 4 * 1024 * 1024,\n\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t});\n\t\tif (status.status !== 0 || !status.stdout) return { root, artifactPaths: [] };\n\t\tconst fields = status.stdout.toString(\"utf8\").split(\"\\0\");\n\t\tconst paths: string[] = [];\n\t\tfor (let index = 0; index < fields.length; index++) {\n\t\t\tconst field = fields[index];\n\t\t\tif (field.length < 4) continue;\n\t\t\tconst xy = field.slice(0, 2);\n\t\t\tif (xy === \"!!\") continue;\n\t\t\tif (xy.includes(\"R\")) index++; // rename: consume the source path field too\n\t\t\tconst artifact = field.slice(3);\n\t\t\tif (artifact.length > 0) paths.push(artifact);\n\t\t}\n\t\tconst artifactPaths = [...new Set(paths)].sort().slice(0, maxPaths);\n\t\treturn { root, artifactPaths };\n\t} catch {\n\t\treturn { root: cwd, artifactPaths: [] };\n\t}\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,14 +18,16 @@ export type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from "./co
|
|
|
18
18
|
export { DefaultResourceLoader, loadProjectContextFiles } from "./core/resource-loader.ts";
|
|
19
19
|
export { extractReverseSkillFactsFromMarkdown, formatReverseSkillFromSource, formatReverseSkillMarkdown, formatReverseSkillRouteDecision, getReverseSkillToolAliases, normalizeReverseSkillName, normalizeReverseSkillText, planReverseSkillToolChecks, REVERSE_SKILL_ROUTES, type ReverseSkillPlatform, type ReverseSkillRisk, type ReverseSkillRoute, type ReverseSkillRouteDecision, type ReverseSkillRouteInput, type ReverseSkillRouteScore, type ReverseSkillSourceFacts, type ReverseSkillSourceInput, type ReverseSkillSpecInput, routeReverseSkill, } from "./core/reverse-skill.ts";
|
|
20
20
|
export { appendRunJournalRecordDurably, type OpenRunJournalStoreOptions, type RunJournalQuarantineReport, RunJournalStore, RunJournalStoreCorruptionError, writeQuarantineBytesDurably, } from "./core/run-journal-store.ts";
|
|
21
|
+
export { type BashSandboxMode, createWorkspaceSandboxPolicy, resolveBashSandboxMode, } from "./core/sandbox/default-policy.ts";
|
|
21
22
|
export { AgentSessionRuntime, type AgentSessionRuntimeDiagnostic, type AgentSessionServices, type CreateAgentSessionFromServicesOptions, type CreateAgentSessionOptions, type CreateAgentSessionResult, type CreateAgentSessionRuntimeFactory, type CreateAgentSessionRuntimeResult, type CreateAgentSessionServicesOptions, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashTool, createCodingTools, createEditTool, createFindTool, createGrepTool, createLsTool, createReadOnlyTools, createReadTool, createWriteTool, type PromptTemplate, } from "./core/sdk.ts";
|
|
22
23
|
export { type BranchSummaryEntry, buildSessionContext, type CompactionEntry, type CompactionProvenanceDetails, CURRENT_SESSION_VERSION, type CustomEntry, type CustomMessageEntry, type FileEntry, getLatestCompactionEntry, type ModelChangeEntry, migrateSessionEntries, type NewSessionOptions, parseSessionEntries, type SessionContext, type SessionEntry, type SessionEntryBase, type SessionHeader, type SessionInfo, type SessionInfoEntry, SessionManager, type SessionMessageEntry, type SessionQuarantineReport, type ThinkingLevelChangeEntry, } from "./core/session-manager.ts";
|
|
23
24
|
export { classifySessionTermination, formatSessionTermination, type SessionTermination, type SessionTerminationCause, SessionTerminationError, type SessionTerminationKind, } from "./core/session-termination.ts";
|
|
24
25
|
export { type AgentRuntimeSettings, type CompactionSettings, type ImageSettings, type PackageSource, type RetrySettings, SettingsManager, type ToolSchedulerSetting, } from "./core/settings-manager.ts";
|
|
25
26
|
export { formatSkillsForPrompt, type LoadSkillsFromDirOptions, type LoadSkillsResult, loadSkills, loadSkillsFromDir, type Skill, type SkillFrontmatter, } from "./core/skills.ts";
|
|
26
27
|
export { createSyntheticSourceInfo } from "./core/source-info.ts";
|
|
27
|
-
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, createBashToolDefinition, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, createLocalBashOperations, createLsToolDefinition, createReadToolDefinition, createWriteToolDefinition, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, formatSize, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, type ToolsOptions, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, type WriteOperations, type WriteToolInput, type WriteToolOptions, withFileMutationQueue, } from "./core/tools/index.ts";
|
|
28
|
-
export { executeVerifiedBash, executeVerifiedLocalBash, VERIFIED_BASH_REDACTION_POLICY_ID, VerifiedBashAdapterError, type VerifiedBashExecutionRequest, type VerifiedLocalBashExecutionRequest, } from "./core/verified-bash-adapter.ts";
|
|
28
|
+
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, createBashToolDefinition, createDiagnosticsTool, createDiagnosticsToolDefinition, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, createLocalBashOperations, createLsToolDefinition, createReadToolDefinition, createWriteToolDefinition, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, type DiagnosticLine, type DiagnosticsToolDetails, type DiagnosticsToolInput, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, formatSize, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, type ToolsOptions, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, type WriteOperations, type WriteToolInput, type WriteToolOptions, withFileMutationQueue, } from "./core/tools/index.ts";
|
|
29
|
+
export { createVerifiedBashOperations, executeVerifiedBash, executeVerifiedLocalBash, VERIFIED_BASH_REDACTION_POLICY_ID, VerifiedBashAdapterError, type VerifiedBashExecutionRequest, type VerifiedBashOperationsBinding, type VerifiedLocalBashExecutionRequest, } from "./core/verified-bash-adapter.ts";
|
|
30
|
+
export { isVerifiedBashEnabled, resolveSessionWorkspaceScope } from "./core/verified-bash-runtime.ts";
|
|
29
31
|
export { type CommandHmacBinder, CommandRedactionError, createCommandHmacBinder, EVIDENCE_COMMAND_REDACTION_POLICY_ID, MAX_COMMAND_REDACTION_PLACEHOLDERS, parseCommandHmacBinding, parseCommandRedactionSummary, type RedactedCommandDescriptor, redactCommandDescriptor, } from "./guardrails/command-redaction.ts";
|
|
30
32
|
export { computeEvidenceCommandSha256, computeEvidenceReceiptCoreSha256, constantTimeSha256Equal, createEvidenceReceipt, evidenceReceiptReplayPayload, isSafeEvidenceReceiptId, isSha256Hex, parseEvidenceReceipt, parseSha256Hex, validateEvidenceReceipt, withEvidenceReceiptEnvelope, } from "./guardrails/evidence-receipt.ts";
|
|
31
33
|
export { EvidenceReceiptStore, type EvidenceReceiptStoreFaultStage, type EvidenceReceiptStoreOptions, } from "./guardrails/evidence-receipt-store.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACN,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,eAAe,EACf,KAAK,YAAY,GACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,WAAW,EACX,KAAK,kBAAkB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,eAAe,GACpB,MAAM,wBAAwB,CAAC;AACh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B,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,8BAA8B,EAC9B,cAAc,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport { getAgentDir, VERSION } from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\ttype AuthStatus,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.ts\";\nexport {\n\ttype ApiAction,\n\tApiBroker,\n\ttype ApiMethod,\n\ttype ApiOutcome,\n\tAUTOPILOT_MAX,\n\ttype AutomationHarnessScoreInput,\n\tAutomationHarnessScorer,\n\ttype AutomationScoreBreakdown,\n\ttype AutomationTrace,\n\ttype AutomationTraceAction,\n\ttype AutomationTraceContextPlan,\n\ttype AutomationTraceEnvApiUse,\n\ttype AutonomyProfile,\n\ttype BrokerFetcher,\n\ttype BrokerFetchRequest,\n\ttype BrokerFetchResponse,\n\ttype Capability,\n\tcanonicalHash,\n\tclassifyEnvKey,\n\tDynamicToolPortfolioOptimizer,\n\tEnvBroker,\n\ttype EnvBrokerLedger,\n\ttype EnvMode,\n\ttype EnvRecord,\n\ttype EnvResolutionRequest,\n\ttype EnvUseEvent,\n\ttype EvidenceActor,\n\ttype EvidenceEvent,\n\ttype EvidenceEventInput,\n\tEvidenceLedger,\n\ttype EvidenceOutcome,\n\ttype EvidencePointer,\n\ttype ExecutionStrategy,\n\ttype Postcondition,\n\tPostconditionVerifier,\n\ttype RiskLevel,\n\tredactForModel,\n\ttype Sensitivity,\n\tstrategyForRisk,\n\tToolExecutionBroker,\n\ttype ToolExecutionCandidate,\n\ttype ToolExecutionChoice,\n\ttype ToolExecutionNeed,\n\ttype VerificationContext,\n\ttype VerificationResult,\n} from \"./core/automation/index.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionBarrierResult,\n\ttype CompactionCommitDecision,\n\ttype CompactionEnvelope,\n\ttype CompactionHysteresisConfig,\n\ttype CompactionHysteresisState,\n\ttype CompactionResult,\n\ttype CompactionTransaction,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tcreateCompactionEnvelope,\n\tcreateCompactionHysteresisConfig,\n\tcreateCompactionHysteresisState,\n\tcreateCompactionSourceIdentity,\n\tcreateCompactionTransaction,\n\tcreateSessionRevisionToken,\n\tDEFAULT_COMPACTION_SETTINGS,\n\tdecideCompactionCommit,\n\testimateTokens,\n\tevaluateCompactionBarrier,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n\tstepCompactionHysteresis,\n\tvalidateCompactionEnvelope,\n} from \"./core/compaction/index.ts\";\nexport {\n\tapplyContextCacheInvalidation,\n\tbuildContextBudgetMaterializedRepresentationCacheKeyV2,\n\tbuildContextBudgetPlanCacheKeyV2,\n\tCONTEXT_BUDGET_POLICY_VERSION_V2,\n\ttype ContextBudgetCacheProviderV2,\n\ttype ContextCacheInvalidationEvent,\n\ttype ContextCacheInvalidationSnapshot,\n\tcreateContextBudgetCacheKeyBaseV2,\n\tcreateContextCacheInvalidationSnapshot,\n\tcreateMemoryContextBudgetCacheProviderV2,\n\tplanPromptContextBudgetV2,\n\tserializeContextCacheSnapshot,\n} from \"./core/context-budget-governor-v2.ts\";\nexport {\n\tcomputeReservedTokenBudget,\n\testimateToolResultReserve,\n\tReservedTokenBudgetError,\n\ttype ReservedTokenBudgetInput,\n\ttype ReservedTokenBudgetResult,\n\ttype ToolResultReserveRequest,\n} from \"./core/context-budget-reserved-tokens.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBuildSystemPromptOptions,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionMode,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\nexport {\n\textractReverseSkillFactsFromMarkdown,\n\tformatReverseSkillFromSource,\n\tformatReverseSkillMarkdown,\n\tformatReverseSkillRouteDecision,\n\tgetReverseSkillToolAliases,\n\tnormalizeReverseSkillName,\n\tnormalizeReverseSkillText,\n\tplanReverseSkillToolChecks,\n\tREVERSE_SKILL_ROUTES,\n\ttype ReverseSkillPlatform,\n\ttype ReverseSkillRisk,\n\ttype ReverseSkillRoute,\n\ttype ReverseSkillRouteDecision,\n\ttype ReverseSkillRouteInput,\n\ttype ReverseSkillRouteScore,\n\ttype ReverseSkillSourceFacts,\n\ttype ReverseSkillSourceInput,\n\ttype ReverseSkillSpecInput,\n\trouteReverseSkill,\n} from \"./core/reverse-skill.ts\";\nexport {\n\tappendRunJournalRecordDurably,\n\ttype OpenRunJournalStoreOptions,\n\ttype RunJournalQuarantineReport,\n\tRunJournalStore,\n\tRunJournalStoreCorruptionError,\n\twriteQuarantineBytesDurably,\n} from \"./core/run-journal-store.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\ttype CompactionProvenanceDetails,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionQuarantineReport,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tclassifySessionTermination,\n\tformatSessionTermination,\n\ttype SessionTermination,\n\ttype SessionTerminationCause,\n\tSessionTerminationError,\n\ttype SessionTerminationKind,\n} from \"./core/session-termination.ts\";\nexport {\n\ttype AgentRuntimeSettings,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype ToolSchedulerSetting,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLsToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport {\n\texecuteVerifiedBash,\n\texecuteVerifiedLocalBash,\n\tVERIFIED_BASH_REDACTION_POLICY_ID,\n\tVerifiedBashAdapterError,\n\ttype VerifiedBashExecutionRequest,\n\ttype VerifiedLocalBashExecutionRequest,\n} from \"./core/verified-bash-adapter.ts\";\n// Execution-bound evidence\nexport {\n\ttype CommandHmacBinder,\n\tCommandRedactionError,\n\tcreateCommandHmacBinder,\n\tEVIDENCE_COMMAND_REDACTION_POLICY_ID,\n\tMAX_COMMAND_REDACTION_PLACEHOLDERS,\n\tparseCommandHmacBinding,\n\tparseCommandRedactionSummary,\n\ttype RedactedCommandDescriptor,\n\tredactCommandDescriptor,\n} from \"./guardrails/command-redaction.ts\";\nexport {\n\tcomputeEvidenceCommandSha256,\n\tcomputeEvidenceReceiptCoreSha256,\n\tconstantTimeSha256Equal,\n\tcreateEvidenceReceipt,\n\tevidenceReceiptReplayPayload,\n\tisSafeEvidenceReceiptId,\n\tisSha256Hex,\n\tparseEvidenceReceipt,\n\tparseSha256Hex,\n\tvalidateEvidenceReceipt,\n\twithEvidenceReceiptEnvelope,\n} from \"./guardrails/evidence-receipt.ts\";\nexport {\n\tEvidenceReceiptStore,\n\ttype EvidenceReceiptStoreFaultStage,\n\ttype EvidenceReceiptStoreOptions,\n} from \"./guardrails/evidence-receipt-store.ts\";\nexport {\n\tEvidenceGate,\n\ttype EvidenceGateOptions,\n\tFailClosedMergeGate,\n\tlatestRelevantWorkspaceMutationSeq,\n\tReplayLedgerManager,\n\tTaskContractBuilder,\n} from \"./guardrails/evidence-system.ts\";\nexport {\n\ttype VerifiedEvidenceExecutionOutcome,\n\ttype VerifiedEvidenceExecutionRequest,\n\ttype VerifiedEvidenceExecutionResult,\n\tVerifiedEvidenceExecutor,\n\tVerifiedEvidenceExecutorError,\n\ttype VerifiedEvidenceExecutorOptions,\n\ttype VerifiedEvidenceMetadata,\n} from \"./guardrails/verified-executor.ts\";\nexport {\n\tcaptureWorkspaceFingerprint,\n\tcomputeGitWorkspaceDirtySha256,\n\tcomputeGitWorkspaceManifestSha256,\n\tcomputeWorkspaceManifestSha256,\n\tparseWorkspaceFingerprint,\n} from \"./guardrails/workspace-fingerprint.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.ts\";\nexport type {\n\tArtifactSetWorkspaceFingerprint,\n\tArtifactState,\n\tCommandHmacBinding,\n\tCommandRedactionPlaceholder,\n\tCommandRedactionPlaceholderType,\n\tCommandRedactionSummary,\n\tEvidenceCommandDescriptor,\n\tEvidenceExecutor,\n\tEvidenceItem,\n\tEvidenceReceipt,\n\tEvidenceReceiptDisposition,\n\tEvidenceReceiptLedgerBinding,\n\tEvidenceReceiptMode,\n\tFileArtifactState,\n\tGitWorkspaceFingerprint,\n\tGitWorkspaceState,\n\tMissingArtifactState,\n\tReplayEvent,\n\tReplayEventType,\n\tSha256Hex,\n\tTaskContract,\n\tWorkspaceFingerprint,\n\tWorkspaceMutationReplayPayload,\n\tWorkspaceScope,\n} from \"./types/evidence.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.d.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BAAyB,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport { getAgentDir, VERSION } from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\ttype AuthStatus,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.ts\";\nexport {\n\ttype ApiAction,\n\tApiBroker,\n\ttype ApiMethod,\n\ttype ApiOutcome,\n\tAUTOPILOT_MAX,\n\ttype AutomationHarnessScoreInput,\n\tAutomationHarnessScorer,\n\ttype AutomationScoreBreakdown,\n\ttype AutomationTrace,\n\ttype AutomationTraceAction,\n\ttype AutomationTraceContextPlan,\n\ttype AutomationTraceEnvApiUse,\n\ttype AutonomyProfile,\n\ttype BrokerFetcher,\n\ttype BrokerFetchRequest,\n\ttype BrokerFetchResponse,\n\ttype Capability,\n\tcanonicalHash,\n\tclassifyEnvKey,\n\tDynamicToolPortfolioOptimizer,\n\tEnvBroker,\n\ttype EnvBrokerLedger,\n\ttype EnvMode,\n\ttype EnvRecord,\n\ttype EnvResolutionRequest,\n\ttype EnvUseEvent,\n\ttype EvidenceActor,\n\ttype EvidenceEvent,\n\ttype EvidenceEventInput,\n\tEvidenceLedger,\n\ttype EvidenceOutcome,\n\ttype EvidencePointer,\n\ttype ExecutionStrategy,\n\ttype Postcondition,\n\tPostconditionVerifier,\n\ttype RiskLevel,\n\tredactForModel,\n\ttype Sensitivity,\n\tstrategyForRisk,\n\tToolExecutionBroker,\n\ttype ToolExecutionCandidate,\n\ttype ToolExecutionChoice,\n\ttype ToolExecutionNeed,\n\ttype VerificationContext,\n\ttype VerificationResult,\n} from \"./core/automation/index.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionBarrierResult,\n\ttype CompactionCommitDecision,\n\ttype CompactionEnvelope,\n\ttype CompactionHysteresisConfig,\n\ttype CompactionHysteresisState,\n\ttype CompactionResult,\n\ttype CompactionTransaction,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tcreateCompactionEnvelope,\n\tcreateCompactionHysteresisConfig,\n\tcreateCompactionHysteresisState,\n\tcreateCompactionSourceIdentity,\n\tcreateCompactionTransaction,\n\tcreateSessionRevisionToken,\n\tDEFAULT_COMPACTION_SETTINGS,\n\tdecideCompactionCommit,\n\testimateTokens,\n\tevaluateCompactionBarrier,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n\tstepCompactionHysteresis,\n\tvalidateCompactionEnvelope,\n} from \"./core/compaction/index.ts\";\nexport {\n\tapplyContextCacheInvalidation,\n\tbuildContextBudgetMaterializedRepresentationCacheKeyV2,\n\tbuildContextBudgetPlanCacheKeyV2,\n\tCONTEXT_BUDGET_POLICY_VERSION_V2,\n\ttype ContextBudgetCacheProviderV2,\n\ttype ContextCacheInvalidationEvent,\n\ttype ContextCacheInvalidationSnapshot,\n\tcreateContextBudgetCacheKeyBaseV2,\n\tcreateContextCacheInvalidationSnapshot,\n\tcreateMemoryContextBudgetCacheProviderV2,\n\tplanPromptContextBudgetV2,\n\tserializeContextCacheSnapshot,\n} from \"./core/context-budget-governor-v2.ts\";\nexport {\n\tcomputeReservedTokenBudget,\n\testimateToolResultReserve,\n\tReservedTokenBudgetError,\n\ttype ReservedTokenBudgetInput,\n\ttype ReservedTokenBudgetResult,\n\ttype ToolResultReserveRequest,\n} from \"./core/context-budget-reserved-tokens.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBuildSystemPromptOptions,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionMode,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\nexport {\n\textractReverseSkillFactsFromMarkdown,\n\tformatReverseSkillFromSource,\n\tformatReverseSkillMarkdown,\n\tformatReverseSkillRouteDecision,\n\tgetReverseSkillToolAliases,\n\tnormalizeReverseSkillName,\n\tnormalizeReverseSkillText,\n\tplanReverseSkillToolChecks,\n\tREVERSE_SKILL_ROUTES,\n\ttype ReverseSkillPlatform,\n\ttype ReverseSkillRisk,\n\ttype ReverseSkillRoute,\n\ttype ReverseSkillRouteDecision,\n\ttype ReverseSkillRouteInput,\n\ttype ReverseSkillRouteScore,\n\ttype ReverseSkillSourceFacts,\n\ttype ReverseSkillSourceInput,\n\ttype ReverseSkillSpecInput,\n\trouteReverseSkill,\n} from \"./core/reverse-skill.ts\";\nexport {\n\tappendRunJournalRecordDurably,\n\ttype OpenRunJournalStoreOptions,\n\ttype RunJournalQuarantineReport,\n\tRunJournalStore,\n\tRunJournalStoreCorruptionError,\n\twriteQuarantineBytesDurably,\n} from \"./core/run-journal-store.ts\";\nexport {\n\ttype BashSandboxMode,\n\tcreateWorkspaceSandboxPolicy,\n\tresolveBashSandboxMode,\n} from \"./core/sandbox/default-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\ttype CompactionProvenanceDetails,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionQuarantineReport,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tclassifySessionTermination,\n\tformatSessionTermination,\n\ttype SessionTermination,\n\ttype SessionTerminationCause,\n\tSessionTerminationError,\n\ttype SessionTerminationKind,\n} from \"./core/session-termination.ts\";\nexport {\n\ttype AgentRuntimeSettings,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype ToolSchedulerSetting,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateDiagnosticsTool,\n\tcreateDiagnosticsToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLsToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype DiagnosticLine,\n\ttype DiagnosticsToolDetails,\n\ttype DiagnosticsToolInput,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport {\n\tcreateVerifiedBashOperations,\n\texecuteVerifiedBash,\n\texecuteVerifiedLocalBash,\n\tVERIFIED_BASH_REDACTION_POLICY_ID,\n\tVerifiedBashAdapterError,\n\ttype VerifiedBashExecutionRequest,\n\ttype VerifiedBashOperationsBinding,\n\ttype VerifiedLocalBashExecutionRequest,\n} from \"./core/verified-bash-adapter.ts\";\nexport { isVerifiedBashEnabled, resolveSessionWorkspaceScope } from \"./core/verified-bash-runtime.ts\";\n// Execution-bound evidence\nexport {\n\ttype CommandHmacBinder,\n\tCommandRedactionError,\n\tcreateCommandHmacBinder,\n\tEVIDENCE_COMMAND_REDACTION_POLICY_ID,\n\tMAX_COMMAND_REDACTION_PLACEHOLDERS,\n\tparseCommandHmacBinding,\n\tparseCommandRedactionSummary,\n\ttype RedactedCommandDescriptor,\n\tredactCommandDescriptor,\n} from \"./guardrails/command-redaction.ts\";\nexport {\n\tcomputeEvidenceCommandSha256,\n\tcomputeEvidenceReceiptCoreSha256,\n\tconstantTimeSha256Equal,\n\tcreateEvidenceReceipt,\n\tevidenceReceiptReplayPayload,\n\tisSafeEvidenceReceiptId,\n\tisSha256Hex,\n\tparseEvidenceReceipt,\n\tparseSha256Hex,\n\tvalidateEvidenceReceipt,\n\twithEvidenceReceiptEnvelope,\n} from \"./guardrails/evidence-receipt.ts\";\nexport {\n\tEvidenceReceiptStore,\n\ttype EvidenceReceiptStoreFaultStage,\n\ttype EvidenceReceiptStoreOptions,\n} from \"./guardrails/evidence-receipt-store.ts\";\nexport {\n\tEvidenceGate,\n\ttype EvidenceGateOptions,\n\tFailClosedMergeGate,\n\tlatestRelevantWorkspaceMutationSeq,\n\tReplayLedgerManager,\n\tTaskContractBuilder,\n} from \"./guardrails/evidence-system.ts\";\nexport {\n\ttype VerifiedEvidenceExecutionOutcome,\n\ttype VerifiedEvidenceExecutionRequest,\n\ttype VerifiedEvidenceExecutionResult,\n\tVerifiedEvidenceExecutor,\n\tVerifiedEvidenceExecutorError,\n\ttype VerifiedEvidenceExecutorOptions,\n\ttype VerifiedEvidenceMetadata,\n} from \"./guardrails/verified-executor.ts\";\nexport {\n\tcaptureWorkspaceFingerprint,\n\tcomputeGitWorkspaceDirtySha256,\n\tcomputeGitWorkspaceManifestSha256,\n\tcomputeWorkspaceManifestSha256,\n\tparseWorkspaceFingerprint,\n} from \"./guardrails/workspace-fingerprint.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.ts\";\nexport type {\n\tArtifactSetWorkspaceFingerprint,\n\tArtifactState,\n\tCommandHmacBinding,\n\tCommandRedactionPlaceholder,\n\tCommandRedactionPlaceholderType,\n\tCommandRedactionSummary,\n\tEvidenceCommandDescriptor,\n\tEvidenceExecutor,\n\tEvidenceItem,\n\tEvidenceReceipt,\n\tEvidenceReceiptDisposition,\n\tEvidenceReceiptLedgerBinding,\n\tEvidenceReceiptMode,\n\tFileArtifactState,\n\tGitWorkspaceFingerprint,\n\tGitWorkspaceState,\n\tMissingArtifactState,\n\tReplayEvent,\n\tReplayEventType,\n\tSha256Hex,\n\tTaskContract,\n\tWorkspaceFingerprint,\n\tWorkspaceMutationReplayPayload,\n\tWorkspaceScope,\n} from \"./types/evidence.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.ts\";\n"]}
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { DefaultPackageManager } from "./core/package-manager.js";
|
|
|
18
18
|
export { DefaultResourceLoader, loadProjectContextFiles } from "./core/resource-loader.js";
|
|
19
19
|
export { extractReverseSkillFactsFromMarkdown, formatReverseSkillFromSource, formatReverseSkillMarkdown, formatReverseSkillRouteDecision, getReverseSkillToolAliases, normalizeReverseSkillName, normalizeReverseSkillText, planReverseSkillToolChecks, REVERSE_SKILL_ROUTES, routeReverseSkill, } from "./core/reverse-skill.js";
|
|
20
20
|
export { appendRunJournalRecordDurably, RunJournalStore, RunJournalStoreCorruptionError, writeQuarantineBytesDurably, } from "./core/run-journal-store.js";
|
|
21
|
+
export { createWorkspaceSandboxPolicy, resolveBashSandboxMode, } from "./core/sandbox/default-policy.js";
|
|
21
22
|
// SDK for programmatic usage
|
|
22
23
|
export { AgentSessionRuntime,
|
|
23
24
|
// Factory
|
|
@@ -31,8 +32,9 @@ export { SettingsManager, } from "./core/settings-manager.js";
|
|
|
31
32
|
export { formatSkillsForPrompt, loadSkills, loadSkillsFromDir, } from "./core/skills.js";
|
|
32
33
|
export { createSyntheticSourceInfo } from "./core/source-info.js";
|
|
33
34
|
// Tools
|
|
34
|
-
export { createBashToolDefinition, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, createLocalBashOperations, createLsToolDefinition, createReadToolDefinition, createWriteToolDefinition, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, truncateHead, truncateLine, truncateTail, withFileMutationQueue, } from "./core/tools/index.js";
|
|
35
|
-
export { executeVerifiedBash, executeVerifiedLocalBash, VERIFIED_BASH_REDACTION_POLICY_ID, VerifiedBashAdapterError, } from "./core/verified-bash-adapter.js";
|
|
35
|
+
export { createBashToolDefinition, createDiagnosticsTool, createDiagnosticsToolDefinition, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, createLocalBashOperations, createLsToolDefinition, createReadToolDefinition, createWriteToolDefinition, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, truncateHead, truncateLine, truncateTail, withFileMutationQueue, } from "./core/tools/index.js";
|
|
36
|
+
export { createVerifiedBashOperations, executeVerifiedBash, executeVerifiedLocalBash, VERIFIED_BASH_REDACTION_POLICY_ID, VerifiedBashAdapterError, } from "./core/verified-bash-adapter.js";
|
|
37
|
+
export { isVerifiedBashEnabled, resolveSessionWorkspaceScope } from "./core/verified-bash-runtime.js";
|
|
36
38
|
// Execution-bound evidence
|
|
37
39
|
export { CommandRedactionError, createCommandHmacBinder, EVIDENCE_COMMAND_REDACTION_POLICY_ID, MAX_COMMAND_REDACTION_PLACEHOLDERS, parseCommandHmacBinding, parseCommandRedactionSummary, redactCommandDescriptor, } from "./guardrails/command-redaction.js";
|
|
38
40
|
export { computeEvidenceCommandSha256, computeEvidenceReceiptCoreSha256, constantTimeSha256Equal, createEvidenceReceipt, evidenceReceiptReplayPayload, isSafeEvidenceReceiptId, isSha256Hex, parseEvidenceReceipt, parseSha256Hex, validateEvidenceReceipt, withEvidenceReceiptEnvelope, } from "./guardrails/evidence-receipt.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACN,YAAY,EAOZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,0BAA0B;AAC1B,OAAO,EAIN,WAAW,EAEX,sBAAsB,EACtB,0BAA0B,GAE1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEN,SAAS,EAGT,aAAa,EAEb,uBAAuB,EAWvB,aAAa,EACb,cAAc,EACd,6BAA6B,EAC7B,SAAS,EAST,cAAc,EAKd,qBAAqB,EAErB,cAAc,EAEd,eAAe,EACf,mBAAmB,GAMnB,MAAM,4BAA4B,CAAC;AACpC,aAAa;AACb,OAAO,EAYN,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,wBAAwB,EACx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ACjD,kDAAkD;AAClD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,KAAK,GAEL,MAAM,oCAAoC,CAAC;AA2B5C,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,kBAAkB;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport { getAgentDir, VERSION } from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\ttype AuthStatus,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.ts\";\nexport {\n\ttype ApiAction,\n\tApiBroker,\n\ttype ApiMethod,\n\ttype ApiOutcome,\n\tAUTOPILOT_MAX,\n\ttype AutomationHarnessScoreInput,\n\tAutomationHarnessScorer,\n\ttype AutomationScoreBreakdown,\n\ttype AutomationTrace,\n\ttype AutomationTraceAction,\n\ttype AutomationTraceContextPlan,\n\ttype AutomationTraceEnvApiUse,\n\ttype AutonomyProfile,\n\ttype BrokerFetcher,\n\ttype BrokerFetchRequest,\n\ttype BrokerFetchResponse,\n\ttype Capability,\n\tcanonicalHash,\n\tclassifyEnvKey,\n\tDynamicToolPortfolioOptimizer,\n\tEnvBroker,\n\ttype EnvBrokerLedger,\n\ttype EnvMode,\n\ttype EnvRecord,\n\ttype EnvResolutionRequest,\n\ttype EnvUseEvent,\n\ttype EvidenceActor,\n\ttype EvidenceEvent,\n\ttype EvidenceEventInput,\n\tEvidenceLedger,\n\ttype EvidenceOutcome,\n\ttype EvidencePointer,\n\ttype ExecutionStrategy,\n\ttype Postcondition,\n\tPostconditionVerifier,\n\ttype RiskLevel,\n\tredactForModel,\n\ttype Sensitivity,\n\tstrategyForRisk,\n\tToolExecutionBroker,\n\ttype ToolExecutionCandidate,\n\ttype ToolExecutionChoice,\n\ttype ToolExecutionNeed,\n\ttype VerificationContext,\n\ttype VerificationResult,\n} from \"./core/automation/index.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionBarrierResult,\n\ttype CompactionCommitDecision,\n\ttype CompactionEnvelope,\n\ttype CompactionHysteresisConfig,\n\ttype CompactionHysteresisState,\n\ttype CompactionResult,\n\ttype CompactionTransaction,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tcreateCompactionEnvelope,\n\tcreateCompactionHysteresisConfig,\n\tcreateCompactionHysteresisState,\n\tcreateCompactionSourceIdentity,\n\tcreateCompactionTransaction,\n\tcreateSessionRevisionToken,\n\tDEFAULT_COMPACTION_SETTINGS,\n\tdecideCompactionCommit,\n\testimateTokens,\n\tevaluateCompactionBarrier,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n\tstepCompactionHysteresis,\n\tvalidateCompactionEnvelope,\n} from \"./core/compaction/index.ts\";\nexport {\n\tapplyContextCacheInvalidation,\n\tbuildContextBudgetMaterializedRepresentationCacheKeyV2,\n\tbuildContextBudgetPlanCacheKeyV2,\n\tCONTEXT_BUDGET_POLICY_VERSION_V2,\n\ttype ContextBudgetCacheProviderV2,\n\ttype ContextCacheInvalidationEvent,\n\ttype ContextCacheInvalidationSnapshot,\n\tcreateContextBudgetCacheKeyBaseV2,\n\tcreateContextCacheInvalidationSnapshot,\n\tcreateMemoryContextBudgetCacheProviderV2,\n\tplanPromptContextBudgetV2,\n\tserializeContextCacheSnapshot,\n} from \"./core/context-budget-governor-v2.ts\";\nexport {\n\tcomputeReservedTokenBudget,\n\testimateToolResultReserve,\n\tReservedTokenBudgetError,\n\ttype ReservedTokenBudgetInput,\n\ttype ReservedTokenBudgetResult,\n\ttype ToolResultReserveRequest,\n} from \"./core/context-budget-reserved-tokens.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBuildSystemPromptOptions,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionMode,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\nexport {\n\textractReverseSkillFactsFromMarkdown,\n\tformatReverseSkillFromSource,\n\tformatReverseSkillMarkdown,\n\tformatReverseSkillRouteDecision,\n\tgetReverseSkillToolAliases,\n\tnormalizeReverseSkillName,\n\tnormalizeReverseSkillText,\n\tplanReverseSkillToolChecks,\n\tREVERSE_SKILL_ROUTES,\n\ttype ReverseSkillPlatform,\n\ttype ReverseSkillRisk,\n\ttype ReverseSkillRoute,\n\ttype ReverseSkillRouteDecision,\n\ttype ReverseSkillRouteInput,\n\ttype ReverseSkillRouteScore,\n\ttype ReverseSkillSourceFacts,\n\ttype ReverseSkillSourceInput,\n\ttype ReverseSkillSpecInput,\n\trouteReverseSkill,\n} from \"./core/reverse-skill.ts\";\nexport {\n\tappendRunJournalRecordDurably,\n\ttype OpenRunJournalStoreOptions,\n\ttype RunJournalQuarantineReport,\n\tRunJournalStore,\n\tRunJournalStoreCorruptionError,\n\twriteQuarantineBytesDurably,\n} from \"./core/run-journal-store.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\ttype CompactionProvenanceDetails,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionQuarantineReport,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tclassifySessionTermination,\n\tformatSessionTermination,\n\ttype SessionTermination,\n\ttype SessionTerminationCause,\n\tSessionTerminationError,\n\ttype SessionTerminationKind,\n} from \"./core/session-termination.ts\";\nexport {\n\ttype AgentRuntimeSettings,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype ToolSchedulerSetting,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLsToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport {\n\texecuteVerifiedBash,\n\texecuteVerifiedLocalBash,\n\tVERIFIED_BASH_REDACTION_POLICY_ID,\n\tVerifiedBashAdapterError,\n\ttype VerifiedBashExecutionRequest,\n\ttype VerifiedLocalBashExecutionRequest,\n} from \"./core/verified-bash-adapter.ts\";\n// Execution-bound evidence\nexport {\n\ttype CommandHmacBinder,\n\tCommandRedactionError,\n\tcreateCommandHmacBinder,\n\tEVIDENCE_COMMAND_REDACTION_POLICY_ID,\n\tMAX_COMMAND_REDACTION_PLACEHOLDERS,\n\tparseCommandHmacBinding,\n\tparseCommandRedactionSummary,\n\ttype RedactedCommandDescriptor,\n\tredactCommandDescriptor,\n} from \"./guardrails/command-redaction.ts\";\nexport {\n\tcomputeEvidenceCommandSha256,\n\tcomputeEvidenceReceiptCoreSha256,\n\tconstantTimeSha256Equal,\n\tcreateEvidenceReceipt,\n\tevidenceReceiptReplayPayload,\n\tisSafeEvidenceReceiptId,\n\tisSha256Hex,\n\tparseEvidenceReceipt,\n\tparseSha256Hex,\n\tvalidateEvidenceReceipt,\n\twithEvidenceReceiptEnvelope,\n} from \"./guardrails/evidence-receipt.ts\";\nexport {\n\tEvidenceReceiptStore,\n\ttype EvidenceReceiptStoreFaultStage,\n\ttype EvidenceReceiptStoreOptions,\n} from \"./guardrails/evidence-receipt-store.ts\";\nexport {\n\tEvidenceGate,\n\ttype EvidenceGateOptions,\n\tFailClosedMergeGate,\n\tlatestRelevantWorkspaceMutationSeq,\n\tReplayLedgerManager,\n\tTaskContractBuilder,\n} from \"./guardrails/evidence-system.ts\";\nexport {\n\ttype VerifiedEvidenceExecutionOutcome,\n\ttype VerifiedEvidenceExecutionRequest,\n\ttype VerifiedEvidenceExecutionResult,\n\tVerifiedEvidenceExecutor,\n\tVerifiedEvidenceExecutorError,\n\ttype VerifiedEvidenceExecutorOptions,\n\ttype VerifiedEvidenceMetadata,\n} from \"./guardrails/verified-executor.ts\";\nexport {\n\tcaptureWorkspaceFingerprint,\n\tcomputeGitWorkspaceDirtySha256,\n\tcomputeGitWorkspaceManifestSha256,\n\tcomputeWorkspaceManifestSha256,\n\tparseWorkspaceFingerprint,\n} from \"./guardrails/workspace-fingerprint.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.ts\";\nexport type {\n\tArtifactSetWorkspaceFingerprint,\n\tArtifactState,\n\tCommandHmacBinding,\n\tCommandRedactionPlaceholder,\n\tCommandRedactionPlaceholderType,\n\tCommandRedactionSummary,\n\tEvidenceCommandDescriptor,\n\tEvidenceExecutor,\n\tEvidenceItem,\n\tEvidenceReceipt,\n\tEvidenceReceiptDisposition,\n\tEvidenceReceiptLedgerBinding,\n\tEvidenceReceiptMode,\n\tFileArtifactState,\n\tGitWorkspaceFingerprint,\n\tGitWorkspaceState,\n\tMissingArtifactState,\n\tReplayEvent,\n\tReplayEventType,\n\tSha256Hex,\n\tTaskContract,\n\tWorkspaceFingerprint,\n\tWorkspaceMutationReplayPayload,\n\tWorkspaceScope,\n} from \"./types/evidence.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","s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,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport { getAgentDir, VERSION } from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\ttype AuthStatus,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.ts\";\nexport {\n\ttype ApiAction,\n\tApiBroker,\n\ttype ApiMethod,\n\ttype ApiOutcome,\n\tAUTOPILOT_MAX,\n\ttype AutomationHarnessScoreInput,\n\tAutomationHarnessScorer,\n\ttype AutomationScoreBreakdown,\n\ttype AutomationTrace,\n\ttype AutomationTraceAction,\n\ttype AutomationTraceContextPlan,\n\ttype AutomationTraceEnvApiUse,\n\ttype AutonomyProfile,\n\ttype BrokerFetcher,\n\ttype BrokerFetchRequest,\n\ttype BrokerFetchResponse,\n\ttype Capability,\n\tcanonicalHash,\n\tclassifyEnvKey,\n\tDynamicToolPortfolioOptimizer,\n\tEnvBroker,\n\ttype EnvBrokerLedger,\n\ttype EnvMode,\n\ttype EnvRecord,\n\ttype EnvResolutionRequest,\n\ttype EnvUseEvent,\n\ttype EvidenceActor,\n\ttype EvidenceEvent,\n\ttype EvidenceEventInput,\n\tEvidenceLedger,\n\ttype EvidenceOutcome,\n\ttype EvidencePointer,\n\ttype ExecutionStrategy,\n\ttype Postcondition,\n\tPostconditionVerifier,\n\ttype RiskLevel,\n\tredactForModel,\n\ttype Sensitivity,\n\tstrategyForRisk,\n\tToolExecutionBroker,\n\ttype ToolExecutionCandidate,\n\ttype ToolExecutionChoice,\n\ttype ToolExecutionNeed,\n\ttype VerificationContext,\n\ttype VerificationResult,\n} from \"./core/automation/index.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionBarrierResult,\n\ttype CompactionCommitDecision,\n\ttype CompactionEnvelope,\n\ttype CompactionHysteresisConfig,\n\ttype CompactionHysteresisState,\n\ttype CompactionResult,\n\ttype CompactionTransaction,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tcreateCompactionEnvelope,\n\tcreateCompactionHysteresisConfig,\n\tcreateCompactionHysteresisState,\n\tcreateCompactionSourceIdentity,\n\tcreateCompactionTransaction,\n\tcreateSessionRevisionToken,\n\tDEFAULT_COMPACTION_SETTINGS,\n\tdecideCompactionCommit,\n\testimateTokens,\n\tevaluateCompactionBarrier,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n\tstepCompactionHysteresis,\n\tvalidateCompactionEnvelope,\n} from \"./core/compaction/index.ts\";\nexport {\n\tapplyContextCacheInvalidation,\n\tbuildContextBudgetMaterializedRepresentationCacheKeyV2,\n\tbuildContextBudgetPlanCacheKeyV2,\n\tCONTEXT_BUDGET_POLICY_VERSION_V2,\n\ttype ContextBudgetCacheProviderV2,\n\ttype ContextCacheInvalidationEvent,\n\ttype ContextCacheInvalidationSnapshot,\n\tcreateContextBudgetCacheKeyBaseV2,\n\tcreateContextCacheInvalidationSnapshot,\n\tcreateMemoryContextBudgetCacheProviderV2,\n\tplanPromptContextBudgetV2,\n\tserializeContextCacheSnapshot,\n} from \"./core/context-budget-governor-v2.ts\";\nexport {\n\tcomputeReservedTokenBudget,\n\testimateToolResultReserve,\n\tReservedTokenBudgetError,\n\ttype ReservedTokenBudgetInput,\n\ttype ReservedTokenBudgetResult,\n\ttype ToolResultReserveRequest,\n} from \"./core/context-budget-reserved-tokens.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBuildSystemPromptOptions,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionMode,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\nexport {\n\textractReverseSkillFactsFromMarkdown,\n\tformatReverseSkillFromSource,\n\tformatReverseSkillMarkdown,\n\tformatReverseSkillRouteDecision,\n\tgetReverseSkillToolAliases,\n\tnormalizeReverseSkillName,\n\tnormalizeReverseSkillText,\n\tplanReverseSkillToolChecks,\n\tREVERSE_SKILL_ROUTES,\n\ttype ReverseSkillPlatform,\n\ttype ReverseSkillRisk,\n\ttype ReverseSkillRoute,\n\ttype ReverseSkillRouteDecision,\n\ttype ReverseSkillRouteInput,\n\ttype ReverseSkillRouteScore,\n\ttype ReverseSkillSourceFacts,\n\ttype ReverseSkillSourceInput,\n\ttype ReverseSkillSpecInput,\n\trouteReverseSkill,\n} from \"./core/reverse-skill.ts\";\nexport {\n\tappendRunJournalRecordDurably,\n\ttype OpenRunJournalStoreOptions,\n\ttype RunJournalQuarantineReport,\n\tRunJournalStore,\n\tRunJournalStoreCorruptionError,\n\twriteQuarantineBytesDurably,\n} from \"./core/run-journal-store.ts\";\nexport {\n\ttype BashSandboxMode,\n\tcreateWorkspaceSandboxPolicy,\n\tresolveBashSandboxMode,\n} from \"./core/sandbox/default-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\ttype CompactionProvenanceDetails,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionQuarantineReport,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tclassifySessionTermination,\n\tformatSessionTermination,\n\ttype SessionTermination,\n\ttype SessionTerminationCause,\n\tSessionTerminationError,\n\ttype SessionTerminationKind,\n} from \"./core/session-termination.ts\";\nexport {\n\ttype AgentRuntimeSettings,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype ToolSchedulerSetting,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateDiagnosticsTool,\n\tcreateDiagnosticsToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLsToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype DiagnosticLine,\n\ttype DiagnosticsToolDetails,\n\ttype DiagnosticsToolInput,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport {\n\tcreateVerifiedBashOperations,\n\texecuteVerifiedBash,\n\texecuteVerifiedLocalBash,\n\tVERIFIED_BASH_REDACTION_POLICY_ID,\n\tVerifiedBashAdapterError,\n\ttype VerifiedBashExecutionRequest,\n\ttype VerifiedBashOperationsBinding,\n\ttype VerifiedLocalBashExecutionRequest,\n} from \"./core/verified-bash-adapter.ts\";\nexport { isVerifiedBashEnabled, resolveSessionWorkspaceScope } from \"./core/verified-bash-runtime.ts\";\n// Execution-bound evidence\nexport {\n\ttype CommandHmacBinder,\n\tCommandRedactionError,\n\tcreateCommandHmacBinder,\n\tEVIDENCE_COMMAND_REDACTION_POLICY_ID,\n\tMAX_COMMAND_REDACTION_PLACEHOLDERS,\n\tparseCommandHmacBinding,\n\tparseCommandRedactionSummary,\n\ttype RedactedCommandDescriptor,\n\tredactCommandDescriptor,\n} from \"./guardrails/command-redaction.ts\";\nexport {\n\tcomputeEvidenceCommandSha256,\n\tcomputeEvidenceReceiptCoreSha256,\n\tconstantTimeSha256Equal,\n\tcreateEvidenceReceipt,\n\tevidenceReceiptReplayPayload,\n\tisSafeEvidenceReceiptId,\n\tisSha256Hex,\n\tparseEvidenceReceipt,\n\tparseSha256Hex,\n\tvalidateEvidenceReceipt,\n\twithEvidenceReceiptEnvelope,\n} from \"./guardrails/evidence-receipt.ts\";\nexport {\n\tEvidenceReceiptStore,\n\ttype EvidenceReceiptStoreFaultStage,\n\ttype EvidenceReceiptStoreOptions,\n} from \"./guardrails/evidence-receipt-store.ts\";\nexport {\n\tEvidenceGate,\n\ttype EvidenceGateOptions,\n\tFailClosedMergeGate,\n\tlatestRelevantWorkspaceMutationSeq,\n\tReplayLedgerManager,\n\tTaskContractBuilder,\n} from \"./guardrails/evidence-system.ts\";\nexport {\n\ttype VerifiedEvidenceExecutionOutcome,\n\ttype VerifiedEvidenceExecutionRequest,\n\ttype VerifiedEvidenceExecutionResult,\n\tVerifiedEvidenceExecutor,\n\tVerifiedEvidenceExecutorError,\n\ttype VerifiedEvidenceExecutorOptions,\n\ttype VerifiedEvidenceMetadata,\n} from \"./guardrails/verified-executor.ts\";\nexport {\n\tcaptureWorkspaceFingerprint,\n\tcomputeGitWorkspaceDirtySha256,\n\tcomputeGitWorkspaceManifestSha256,\n\tcomputeWorkspaceManifestSha256,\n\tparseWorkspaceFingerprint,\n} from \"./guardrails/workspace-fingerprint.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.ts\";\nexport type {\n\tArtifactSetWorkspaceFingerprint,\n\tArtifactState,\n\tCommandHmacBinding,\n\tCommandRedactionPlaceholder,\n\tCommandRedactionPlaceholderType,\n\tCommandRedactionSummary,\n\tEvidenceCommandDescriptor,\n\tEvidenceExecutor,\n\tEvidenceItem,\n\tEvidenceReceipt,\n\tEvidenceReceiptDisposition,\n\tEvidenceReceiptLedgerBinding,\n\tEvidenceReceiptMode,\n\tFileArtifactState,\n\tGitWorkspaceFingerprint,\n\tGitWorkspaceState,\n\tMissingArtifactState,\n\tReplayEvent,\n\tReplayEventType,\n\tSha256Hex,\n\tTaskContract,\n\tWorkspaceFingerprint,\n\tWorkspaceMutationReplayPayload,\n\tWorkspaceScope,\n} from \"./types/evidence.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.ts\";\n"]}
|