@sema-ai/core 1.275.1
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 +5433 -0
- package/LICENSE +27 -0
- package/NOTICE.md +30 -0
- package/README.md +1040 -0
- package/dist/agents/agent-definition.d.ts +10 -0
- package/dist/agents/agent-definition.d.ts.map +1 -0
- package/dist/agents/agent-definition.js +18 -0
- package/dist/agents/agent-definition.js.map +1 -0
- package/dist/agents/builtin-agents.d.ts +69 -0
- package/dist/agents/builtin-agents.d.ts.map +1 -0
- package/dist/agents/builtin-agents.js +177 -0
- package/dist/agents/builtin-agents.js.map +1 -0
- package/dist/agents/cascade.d.ts +101 -0
- package/dist/agents/cascade.d.ts.map +1 -0
- package/dist/agents/cascade.js +189 -0
- package/dist/agents/cascade.js.map +1 -0
- package/dist/agents/observer.d.ts +209 -0
- package/dist/agents/observer.d.ts.map +1 -0
- package/dist/agents/observer.js +495 -0
- package/dist/agents/observer.js.map +1 -0
- package/dist/agents/repair-loop.d.ts +236 -0
- package/dist/agents/repair-loop.d.ts.map +1 -0
- package/dist/agents/repair-loop.js +293 -0
- package/dist/agents/repair-loop.js.map +1 -0
- package/dist/agents/session-util.d.ts +8 -0
- package/dist/agents/session-util.d.ts.map +1 -0
- package/dist/agents/session-util.js +9 -0
- package/dist/agents/session-util.js.map +1 -0
- package/dist/agents/subagent-steps.d.ts +93 -0
- package/dist/agents/subagent-steps.d.ts.map +1 -0
- package/dist/agents/subagent-steps.js +206 -0
- package/dist/agents/subagent-steps.js.map +1 -0
- package/dist/agents/subagent.d.ts +441 -0
- package/dist/agents/subagent.d.ts.map +1 -0
- package/dist/agents/subagent.js +2492 -0
- package/dist/agents/subagent.js.map +1 -0
- package/dist/agents/suspend-guard.d.ts +35 -0
- package/dist/agents/suspend-guard.d.ts.map +1 -0
- package/dist/agents/suspend-guard.js +48 -0
- package/dist/agents/suspend-guard.js.map +1 -0
- package/dist/agents/teacher.d.ts +137 -0
- package/dist/agents/teacher.d.ts.map +1 -0
- package/dist/agents/teacher.js +575 -0
- package/dist/agents/teacher.js.map +1 -0
- package/dist/agents/team.d.ts +211 -0
- package/dist/agents/team.d.ts.map +1 -0
- package/dist/agents/team.js +293 -0
- package/dist/agents/team.js.map +1 -0
- package/dist/agents/tool-filter.d.ts +29 -0
- package/dist/agents/tool-filter.d.ts.map +1 -0
- package/dist/agents/tool-filter.js +50 -0
- package/dist/agents/tool-filter.js.map +1 -0
- package/dist/agents/verify.d.ts +177 -0
- package/dist/agents/verify.d.ts.map +1 -0
- package/dist/agents/verify.js +305 -0
- package/dist/agents/verify.js.map +1 -0
- package/dist/bench/metrics.d.ts +714 -0
- package/dist/bench/metrics.d.ts.map +1 -0
- package/dist/bench/metrics.js +618 -0
- package/dist/bench/metrics.js.map +1 -0
- package/dist/bin/sema-tb.d.ts +3 -0
- package/dist/bin/sema-tb.d.ts.map +1 -0
- package/dist/bin/sema-tb.js +516 -0
- package/dist/bin/sema-tb.js.map +1 -0
- package/dist/bin/tb-env.d.ts +13 -0
- package/dist/bin/tb-env.d.ts.map +1 -0
- package/dist/bin/tb-env.js +26 -0
- package/dist/bin/tb-env.js.map +1 -0
- package/dist/brain/anthropic.d.ts +46 -0
- package/dist/brain/anthropic.d.ts.map +1 -0
- package/dist/brain/anthropic.js +830 -0
- package/dist/brain/anthropic.js.map +1 -0
- package/dist/brain/circuit-breaker.d.ts +46 -0
- package/dist/brain/circuit-breaker.d.ts.map +1 -0
- package/dist/brain/circuit-breaker.js +173 -0
- package/dist/brain/circuit-breaker.js.map +1 -0
- package/dist/brain/degrading.d.ts +98 -0
- package/dist/brain/degrading.d.ts.map +1 -0
- package/dist/brain/degrading.js +249 -0
- package/dist/brain/degrading.js.map +1 -0
- package/dist/brain/errors.d.ts +31 -0
- package/dist/brain/errors.d.ts.map +1 -0
- package/dist/brain/errors.js +58 -0
- package/dist/brain/errors.js.map +1 -0
- package/dist/brain/failover.d.ts +18 -0
- package/dist/brain/failover.d.ts.map +1 -0
- package/dist/brain/failover.js +118 -0
- package/dist/brain/failover.js.map +1 -0
- package/dist/brain/model-presets.d.ts +36 -0
- package/dist/brain/model-presets.d.ts.map +1 -0
- package/dist/brain/model-presets.js +54 -0
- package/dist/brain/model-presets.js.map +1 -0
- package/dist/brain/openai.d.ts +43 -0
- package/dist/brain/openai.d.ts.map +1 -0
- package/dist/brain/openai.js +784 -0
- package/dist/brain/openai.js.map +1 -0
- package/dist/brain/reasoning.d.ts +138 -0
- package/dist/brain/reasoning.d.ts.map +1 -0
- package/dist/brain/reasoning.js +146 -0
- package/dist/brain/reasoning.js.map +1 -0
- package/dist/brain/repetition.d.ts +60 -0
- package/dist/brain/repetition.d.ts.map +1 -0
- package/dist/brain/repetition.js +121 -0
- package/dist/brain/repetition.js.map +1 -0
- package/dist/brain/request-params.d.ts +29 -0
- package/dist/brain/request-params.d.ts.map +1 -0
- package/dist/brain/request-params.js +78 -0
- package/dist/brain/request-params.js.map +1 -0
- package/dist/brain/retry.d.ts +18 -0
- package/dist/brain/retry.d.ts.map +1 -0
- package/dist/brain/retry.js +42 -0
- package/dist/brain/retry.js.map +1 -0
- package/dist/brain/routing.d.ts +19 -0
- package/dist/brain/routing.d.ts.map +1 -0
- package/dist/brain/routing.js +44 -0
- package/dist/brain/routing.js.map +1 -0
- package/dist/brain/status-sink.d.ts +46 -0
- package/dist/brain/status-sink.d.ts.map +1 -0
- package/dist/brain/status-sink.js +36 -0
- package/dist/brain/status-sink.js.map +1 -0
- package/dist/brain/stream-engine.d.ts +85 -0
- package/dist/brain/stream-engine.d.ts.map +1 -0
- package/dist/brain/stream-engine.js +391 -0
- package/dist/brain/stream-engine.js.map +1 -0
- package/dist/brain/timeout.d.ts +44 -0
- package/dist/brain/timeout.d.ts.map +1 -0
- package/dist/brain/timeout.js +41 -0
- package/dist/brain/timeout.js.map +1 -0
- package/dist/brain/tool-call-repair.d.ts +15 -0
- package/dist/brain/tool-call-repair.d.ts.map +1 -0
- package/dist/brain/tool-call-repair.js +67 -0
- package/dist/brain/tool-call-repair.js.map +1 -0
- package/dist/brain/walltime.d.ts +14 -0
- package/dist/brain/walltime.d.ts.map +1 -0
- package/dist/brain/walltime.js +14 -0
- package/dist/brain/walltime.js.map +1 -0
- package/dist/core/arg-summary.d.ts +19 -0
- package/dist/core/arg-summary.d.ts.map +1 -0
- package/dist/core/arg-summary.js +96 -0
- package/dist/core/arg-summary.js.map +1 -0
- package/dist/core/ask-question.d.ts +113 -0
- package/dist/core/ask-question.d.ts.map +1 -0
- package/dist/core/ask-question.js +246 -0
- package/dist/core/ask-question.js.map +1 -0
- package/dist/core/auto-compaction.d.ts +341 -0
- package/dist/core/auto-compaction.d.ts.map +1 -0
- package/dist/core/auto-compaction.js +495 -0
- package/dist/core/auto-compaction.js.map +1 -0
- package/dist/core/auto-promote.d.ts +126 -0
- package/dist/core/auto-promote.d.ts.map +1 -0
- package/dist/core/auto-promote.js +171 -0
- package/dist/core/auto-promote.js.map +1 -0
- package/dist/core/background-shell.d.ts +128 -0
- package/dist/core/background-shell.d.ts.map +1 -0
- package/dist/core/background-shell.js +42 -0
- package/dist/core/background-shell.js.map +1 -0
- package/dist/core/cache-break-detector.d.ts +63 -0
- package/dist/core/cache-break-detector.d.ts.map +1 -0
- package/dist/core/cache-break-detector.js +0 -0
- package/dist/core/cache-break-detector.js.map +1 -0
- package/dist/core/canonical-json.d.ts +45 -0
- package/dist/core/canonical-json.d.ts.map +1 -0
- package/dist/core/canonical-json.js +132 -0
- package/dist/core/canonical-json.js.map +1 -0
- package/dist/core/checkpoint-store.d.ts +1101 -0
- package/dist/core/checkpoint-store.d.ts.map +1 -0
- package/dist/core/checkpoint-store.js +514 -0
- package/dist/core/checkpoint-store.js.map +1 -0
- package/dist/core/consolidate-scope.d.ts +94 -0
- package/dist/core/consolidate-scope.d.ts.map +1 -0
- package/dist/core/consolidate-scope.js +158 -0
- package/dist/core/consolidate-scope.js.map +1 -0
- package/dist/core/context-edit.d.ts +82 -0
- package/dist/core/context-edit.d.ts.map +1 -0
- package/dist/core/context-edit.js +149 -0
- package/dist/core/context-edit.js.map +1 -0
- package/dist/core/context-guard.d.ts +43 -0
- package/dist/core/context-guard.d.ts.map +1 -0
- package/dist/core/context-guard.js +171 -0
- package/dist/core/context-guard.js.map +1 -0
- package/dist/core/dynamic-recall.d.ts +100 -0
- package/dist/core/dynamic-recall.d.ts.map +1 -0
- package/dist/core/dynamic-recall.js +108 -0
- package/dist/core/dynamic-recall.js.map +1 -0
- package/dist/core/exec-gate.d.ts +74 -0
- package/dist/core/exec-gate.d.ts.map +1 -0
- package/dist/core/exec-gate.js +143 -0
- package/dist/core/exec-gate.js.map +1 -0
- package/dist/core/exec-output-tail.d.ts +37 -0
- package/dist/core/exec-output-tail.d.ts.map +1 -0
- package/dist/core/exec-output-tail.js +63 -0
- package/dist/core/exec-output-tail.js.map +1 -0
- package/dist/core/file-snapshot-store.d.ts +137 -0
- package/dist/core/file-snapshot-store.d.ts.map +1 -0
- package/dist/core/file-snapshot-store.js +319 -0
- package/dist/core/file-snapshot-store.js.map +1 -0
- package/dist/core/git-worktree-env.d.ts +41 -0
- package/dist/core/git-worktree-env.d.ts.map +1 -0
- package/dist/core/git-worktree-env.js +64 -0
- package/dist/core/git-worktree-env.js.map +1 -0
- package/dist/core/hooks.d.ts +372 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js +269 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/lsp-diagnostics.d.ts +74 -0
- package/dist/core/lsp-diagnostics.d.ts.map +1 -0
- package/dist/core/lsp-diagnostics.js +125 -0
- package/dist/core/lsp-diagnostics.js.map +1 -0
- package/dist/core/lsp-protocol.d.ts +28 -0
- package/dist/core/lsp-protocol.d.ts.map +1 -0
- package/dist/core/lsp-protocol.js +179 -0
- package/dist/core/lsp-protocol.js.map +1 -0
- package/dist/core/lsp-session.d.ts +56 -0
- package/dist/core/lsp-session.d.ts.map +1 -0
- package/dist/core/lsp-session.js +185 -0
- package/dist/core/lsp-session.js.map +1 -0
- package/dist/core/lsp.d.ts +132 -0
- package/dist/core/lsp.d.ts.map +1 -0
- package/dist/core/lsp.js +147 -0
- package/dist/core/lsp.js.map +1 -0
- package/dist/core/mcp.d.ts +294 -0
- package/dist/core/mcp.d.ts.map +1 -0
- package/dist/core/mcp.js +992 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/media-byte-cap.d.ts +34 -0
- package/dist/core/media-byte-cap.d.ts.map +1 -0
- package/dist/core/media-byte-cap.js +76 -0
- package/dist/core/media-byte-cap.js.map +1 -0
- package/dist/core/memory-engine/data-plane.d.ts +103 -0
- package/dist/core/memory-engine/data-plane.d.ts.map +1 -0
- package/dist/core/memory-engine/data-plane.js +272 -0
- package/dist/core/memory-engine/data-plane.js.map +1 -0
- package/dist/core/memory-engine/dual-root.d.ts +40 -0
- package/dist/core/memory-engine/dual-root.d.ts.map +1 -0
- package/dist/core/memory-engine/dual-root.js +95 -0
- package/dist/core/memory-engine/dual-root.js.map +1 -0
- package/dist/core/memory-engine/engine.d.ts +161 -0
- package/dist/core/memory-engine/engine.d.ts.map +1 -0
- package/dist/core/memory-engine/engine.js +1110 -0
- package/dist/core/memory-engine/engine.js.map +1 -0
- package/dist/core/memory-engine/file-backend.d.ts +162 -0
- package/dist/core/memory-engine/file-backend.d.ts.map +1 -0
- package/dist/core/memory-engine/file-backend.js +948 -0
- package/dist/core/memory-engine/file-backend.js.map +1 -0
- package/dist/core/memory-engine/frontmatter.d.ts +24 -0
- package/dist/core/memory-engine/frontmatter.d.ts.map +1 -0
- package/dist/core/memory-engine/frontmatter.js +135 -0
- package/dist/core/memory-engine/frontmatter.js.map +1 -0
- package/dist/core/memory-engine/index.d.ts +13 -0
- package/dist/core/memory-engine/index.d.ts.map +1 -0
- package/dist/core/memory-engine/index.js +28 -0
- package/dist/core/memory-engine/index.js.map +1 -0
- package/dist/core/memory-engine/layout.d.ts +123 -0
- package/dist/core/memory-engine/layout.d.ts.map +1 -0
- package/dist/core/memory-engine/layout.js +643 -0
- package/dist/core/memory-engine/layout.js.map +1 -0
- package/dist/core/memory-engine/memory-backend-contract.d.ts +22 -0
- package/dist/core/memory-engine/memory-backend-contract.d.ts.map +1 -0
- package/dist/core/memory-engine/memory-backend-contract.js +271 -0
- package/dist/core/memory-engine/memory-backend-contract.js.map +1 -0
- package/dist/core/memory-engine/migrate.d.ts +17 -0
- package/dist/core/memory-engine/migrate.d.ts.map +1 -0
- package/dist/core/memory-engine/migrate.js +35 -0
- package/dist/core/memory-engine/migrate.js.map +1 -0
- package/dist/core/memory-engine/scan.d.ts +20 -0
- package/dist/core/memory-engine/scan.d.ts.map +1 -0
- package/dist/core/memory-engine/scan.js +84 -0
- package/dist/core/memory-engine/scan.js.map +1 -0
- package/dist/core/memory-engine/scope-contract.d.ts +104 -0
- package/dist/core/memory-engine/scope-contract.d.ts.map +1 -0
- package/dist/core/memory-engine/scope-contract.js +288 -0
- package/dist/core/memory-engine/scope-contract.js.map +1 -0
- package/dist/core/memory-engine/sync-client.d.ts +100 -0
- package/dist/core/memory-engine/sync-client.d.ts.map +1 -0
- package/dist/core/memory-engine/sync-client.js +328 -0
- package/dist/core/memory-engine/sync-client.js.map +1 -0
- package/dist/core/memory-engine/sync.d.ts +97 -0
- package/dist/core/memory-engine/sync.d.ts.map +1 -0
- package/dist/core/memory-engine/sync.js +91 -0
- package/dist/core/memory-engine/sync.js.map +1 -0
- package/dist/core/memory-engine/types.d.ts +279 -0
- package/dist/core/memory-engine/types.d.ts.map +1 -0
- package/dist/core/memory-engine/types.js +9 -0
- package/dist/core/memory-engine/types.js.map +1 -0
- package/dist/core/memory-recall.d.ts +261 -0
- package/dist/core/memory-recall.d.ts.map +1 -0
- package/dist/core/memory-recall.js +600 -0
- package/dist/core/memory-recall.js.map +1 -0
- package/dist/core/memory-vector.d.ts +24 -0
- package/dist/core/memory-vector.d.ts.map +1 -0
- package/dist/core/memory-vector.js +51 -0
- package/dist/core/memory-vector.js.map +1 -0
- package/dist/core/memory.d.ts +502 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/memory.js +881 -0
- package/dist/core/memory.js.map +1 -0
- package/dist/core/message-utils.d.ts +7 -0
- package/dist/core/message-utils.d.ts.map +1 -0
- package/dist/core/message-utils.js +10 -0
- package/dist/core/message-utils.js.map +1 -0
- package/dist/core/oracle-isolation.d.ts +85 -0
- package/dist/core/oracle-isolation.d.ts.map +1 -0
- package/dist/core/oracle-isolation.js +121 -0
- package/dist/core/oracle-isolation.js.map +1 -0
- package/dist/core/permission-rules.d.ts +102 -0
- package/dist/core/permission-rules.d.ts.map +1 -0
- package/dist/core/permission-rules.js +357 -0
- package/dist/core/permission-rules.js.map +1 -0
- package/dist/core/present-plan-tool.d.ts +28 -0
- package/dist/core/present-plan-tool.d.ts.map +1 -0
- package/dist/core/present-plan-tool.js +119 -0
- package/dist/core/present-plan-tool.js.map +1 -0
- package/dist/core/pricing.d.ts +48 -0
- package/dist/core/pricing.d.ts.map +1 -0
- package/dist/core/pricing.js +46 -0
- package/dist/core/pricing.js.map +1 -0
- package/dist/core/property-harness.d.ts +126 -0
- package/dist/core/property-harness.d.ts.map +1 -0
- package/dist/core/property-harness.js +192 -0
- package/dist/core/property-harness.js.map +1 -0
- package/dist/core/push-queue.d.ts +10 -0
- package/dist/core/push-queue.d.ts.map +1 -0
- package/dist/core/push-queue.js +42 -0
- package/dist/core/push-queue.js.map +1 -0
- package/dist/core/remote-env.d.ts +432 -0
- package/dist/core/remote-env.d.ts.map +1 -0
- package/dist/core/remote-env.js +77 -0
- package/dist/core/remote-env.js.map +1 -0
- package/dist/core/roles.d.ts +74 -0
- package/dist/core/roles.d.ts.map +1 -0
- package/dist/core/roles.js +272 -0
- package/dist/core/roles.js.map +1 -0
- package/dist/core/runner/active-skill-scope.d.ts +64 -0
- package/dist/core/runner/active-skill-scope.d.ts.map +1 -0
- package/dist/core/runner/active-skill-scope.js +197 -0
- package/dist/core/runner/active-skill-scope.js.map +1 -0
- package/dist/core/runner/assemble-result.d.ts +191 -0
- package/dist/core/runner/assemble-result.d.ts.map +1 -0
- package/dist/core/runner/assemble-result.js +250 -0
- package/dist/core/runner/assemble-result.js.map +1 -0
- package/dist/core/runner/call-cap.d.ts +130 -0
- package/dist/core/runner/call-cap.d.ts.map +1 -0
- package/dist/core/runner/call-cap.js +151 -0
- package/dist/core/runner/call-cap.js.map +1 -0
- package/dist/core/runner/grounding-signal.d.ts +12 -0
- package/dist/core/runner/grounding-signal.d.ts.map +1 -0
- package/dist/core/runner/grounding-signal.js +94 -0
- package/dist/core/runner/grounding-signal.js.map +1 -0
- package/dist/core/runner/image.d.ts +23 -0
- package/dist/core/runner/image.d.ts.map +1 -0
- package/dist/core/runner/image.js +151 -0
- package/dist/core/runner/image.js.map +1 -0
- package/dist/core/runner/memory-consolidation.d.ts +112 -0
- package/dist/core/runner/memory-consolidation.d.ts.map +1 -0
- package/dist/core/runner/memory-consolidation.js +372 -0
- package/dist/core/runner/memory-consolidation.js.map +1 -0
- package/dist/core/runner/prepare-task.d.ts +583 -0
- package/dist/core/runner/prepare-task.d.ts.map +1 -0
- package/dist/core/runner/prepare-task.js +3612 -0
- package/dist/core/runner/prepare-task.js.map +1 -0
- package/dist/core/runner/prompt-suggestions.d.ts +33 -0
- package/dist/core/runner/prompt-suggestions.d.ts.map +1 -0
- package/dist/core/runner/prompt-suggestions.js +116 -0
- package/dist/core/runner/prompt-suggestions.js.map +1 -0
- package/dist/core/runner/runtask.d.ts +274 -0
- package/dist/core/runner/runtask.d.ts.map +1 -0
- package/dist/core/runner/runtask.js +4606 -0
- package/dist/core/runner/runtask.js.map +1 -0
- package/dist/core/runner/session-rule-policy.d.ts +28 -0
- package/dist/core/runner/session-rule-policy.d.ts.map +1 -0
- package/dist/core/runner/session-rule-policy.js +110 -0
- package/dist/core/runner/session-rule-policy.js.map +1 -0
- package/dist/core/runner/strict-output-schema.d.ts +36 -0
- package/dist/core/runner/strict-output-schema.d.ts.map +1 -0
- package/dist/core/runner/strict-output-schema.js +365 -0
- package/dist/core/runner/strict-output-schema.js.map +1 -0
- package/dist/core/runner/synthetic-tools.d.ts +72 -0
- package/dist/core/runner/synthetic-tools.d.ts.map +1 -0
- package/dist/core/runner/synthetic-tools.js +203 -0
- package/dist/core/runner/synthetic-tools.js.map +1 -0
- package/dist/core/runner/tool-disclosure.d.ts +117 -0
- package/dist/core/runner/tool-disclosure.d.ts.map +1 -0
- package/dist/core/runner/tool-disclosure.js +0 -0
- package/dist/core/runner/tool-disclosure.js.map +1 -0
- package/dist/core/runner/turn-attachments.d.ts +381 -0
- package/dist/core/runner/turn-attachments.d.ts.map +1 -0
- package/dist/core/runner/turn-attachments.js +596 -0
- package/dist/core/runner/turn-attachments.js.map +1 -0
- package/dist/core/runner/usage-accounting.d.ts +35 -0
- package/dist/core/runner/usage-accounting.d.ts.map +1 -0
- package/dist/core/runner/usage-accounting.js +45 -0
- package/dist/core/runner/usage-accounting.js.map +1 -0
- package/dist/core/runtime.d.ts +9 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js +17 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/safety-axis-vocab.d.ts +33 -0
- package/dist/core/safety-axis-vocab.d.ts.map +1 -0
- package/dist/core/safety-axis-vocab.js +35 -0
- package/dist/core/safety-axis-vocab.js.map +1 -0
- package/dist/core/safety-merge-corpus.d.ts +48 -0
- package/dist/core/safety-merge-corpus.d.ts.map +1 -0
- package/dist/core/safety-merge-corpus.js +203 -0
- package/dist/core/safety-merge-corpus.js.map +1 -0
- package/dist/core/scheduler.d.ts +126 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +54 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/secret-env.d.ts +23 -0
- package/dist/core/secret-env.d.ts.map +1 -0
- package/dist/core/secret-env.js +35 -0
- package/dist/core/secret-env.js.map +1 -0
- package/dist/core/select-model.d.ts +26 -0
- package/dist/core/select-model.d.ts.map +1 -0
- package/dist/core/select-model.js +58 -0
- package/dist/core/select-model.js.map +1 -0
- package/dist/core/sensitive-path-policy.d.ts +24 -0
- package/dist/core/sensitive-path-policy.d.ts.map +1 -0
- package/dist/core/sensitive-path-policy.js +96 -0
- package/dist/core/sensitive-path-policy.js.map +1 -0
- package/dist/core/session-policy-store.d.ts +102 -0
- package/dist/core/session-policy-store.d.ts.map +1 -0
- package/dist/core/session-policy-store.js +177 -0
- package/dist/core/session-policy-store.js.map +1 -0
- package/dist/core/session-reconcile.d.ts +63 -0
- package/dist/core/session-reconcile.d.ts.map +1 -0
- package/dist/core/session-reconcile.js +71 -0
- package/dist/core/session-reconcile.js.map +1 -0
- package/dist/core/session-store.d.ts +99 -0
- package/dist/core/session-store.d.ts.map +1 -0
- package/dist/core/session-store.js +298 -0
- package/dist/core/session-store.js.map +1 -0
- package/dist/core/session.d.ts +144 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +56 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/spec-contract.d.ts +147 -0
- package/dist/core/spec-contract.d.ts.map +1 -0
- package/dist/core/spec-contract.js +340 -0
- package/dist/core/spec-contract.js.map +1 -0
- package/dist/core/strategy-store.d.ts +50 -0
- package/dist/core/strategy-store.d.ts.map +1 -0
- package/dist/core/strategy-store.js +100 -0
- package/dist/core/strategy-store.js.map +1 -0
- package/dist/core/stub-env.d.ts +35 -0
- package/dist/core/stub-env.d.ts.map +1 -0
- package/dist/core/stub-env.js +69 -0
- package/dist/core/stub-env.js.map +1 -0
- package/dist/core/task-notification.d.ts +115 -0
- package/dist/core/task-notification.d.ts.map +1 -0
- package/dist/core/task-notification.js +247 -0
- package/dist/core/task-notification.js.map +1 -0
- package/dist/core/task-outcome.d.ts +80 -0
- package/dist/core/task-outcome.d.ts.map +1 -0
- package/dist/core/task-outcome.js +40 -0
- package/dist/core/task-outcome.js.map +1 -0
- package/dist/core/task-registry.d.ts +349 -0
- package/dist/core/task-registry.d.ts.map +1 -0
- package/dist/core/task-registry.js +1751 -0
- package/dist/core/task-registry.js.map +1 -0
- package/dist/core/tighten-task-spec.d.ts +27 -0
- package/dist/core/tighten-task-spec.d.ts.map +1 -0
- package/dist/core/tighten-task-spec.js +95 -0
- package/dist/core/tighten-task-spec.js.map +1 -0
- package/dist/core/tool-detach.d.ts +31 -0
- package/dist/core/tool-detach.d.ts.map +1 -0
- package/dist/core/tool-detach.js +62 -0
- package/dist/core/tool-detach.js.map +1 -0
- package/dist/core/tool-errors.d.ts +72 -0
- package/dist/core/tool-errors.d.ts.map +1 -0
- package/dist/core/tool-errors.js +194 -0
- package/dist/core/tool-errors.js.map +1 -0
- package/dist/core/tool-name-aliases.d.ts +5 -0
- package/dist/core/tool-name-aliases.d.ts.map +1 -0
- package/dist/core/tool-name-aliases.js +130 -0
- package/dist/core/tool-name-aliases.js.map +1 -0
- package/dist/core/tool-policy.d.ts +295 -0
- package/dist/core/tool-policy.d.ts.map +1 -0
- package/dist/core/tool-policy.js +567 -0
- package/dist/core/tool-policy.js.map +1 -0
- package/dist/core/tool-result-budget.d.ts +44 -0
- package/dist/core/tool-result-budget.d.ts.map +1 -0
- package/dist/core/tool-result-budget.js +140 -0
- package/dist/core/tool-result-budget.js.map +1 -0
- package/dist/core/tool-result-store.d.ts +136 -0
- package/dist/core/tool-result-store.d.ts.map +1 -0
- package/dist/core/tool-result-store.js +219 -0
- package/dist/core/tool-result-store.js.map +1 -0
- package/dist/core/tools.d.ts +14 -0
- package/dist/core/tools.d.ts.map +1 -0
- package/dist/core/tools.js +98 -0
- package/dist/core/tools.js.map +1 -0
- package/dist/core/trace.d.ts +340 -0
- package/dist/core/trace.d.ts.map +1 -0
- package/dist/core/trace.js +12 -0
- package/dist/core/trace.js.map +1 -0
- package/dist/core/types.d.ts +2828 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/untrusted-egress.d.ts +32 -0
- package/dist/core/untrusted-egress.d.ts.map +1 -0
- package/dist/core/untrusted-egress.js +49 -0
- package/dist/core/untrusted-egress.js.map +1 -0
- package/dist/core/untrusted-text.d.ts +64 -0
- package/dist/core/untrusted-text.d.ts.map +1 -0
- package/dist/core/untrusted-text.js +119 -0
- package/dist/core/untrusted-text.js.map +1 -0
- package/dist/core/warm-resume.d.ts +23 -0
- package/dist/core/warm-resume.d.ts.map +1 -0
- package/dist/core/warm-resume.js +28 -0
- package/dist/core/warm-resume.js.map +1 -0
- package/dist/core/with-retry.d.ts +43 -0
- package/dist/core/with-retry.d.ts.map +1 -0
- package/dist/core/with-retry.js +59 -0
- package/dist/core/with-retry.js.map +1 -0
- package/dist/core/workflow-journal-store.d.ts +44 -0
- package/dist/core/workflow-journal-store.d.ts.map +1 -0
- package/dist/core/workflow-journal-store.js +47 -0
- package/dist/core/workflow-journal-store.js.map +1 -0
- package/dist/core/workflow-run-store-contract.d.ts +31 -0
- package/dist/core/workflow-run-store-contract.d.ts.map +1 -0
- package/dist/core/workflow-run-store-contract.js +191 -0
- package/dist/core/workflow-run-store-contract.js.map +1 -0
- package/dist/core/workflow-run-store.d.ts +149 -0
- package/dist/core/workflow-run-store.d.ts.map +1 -0
- package/dist/core/workflow-run-store.js +110 -0
- package/dist/core/workflow-run-store.js.map +1 -0
- package/dist/engine/compaction/compaction.d.ts +139 -0
- package/dist/engine/compaction/compaction.d.ts.map +1 -0
- package/dist/engine/compaction/compaction.js +1030 -0
- package/dist/engine/compaction/compaction.js.map +1 -0
- package/dist/engine/compaction/utils.d.ts +45 -0
- package/dist/engine/compaction/utils.d.ts.map +1 -0
- package/dist/engine/compaction/utils.js +203 -0
- package/dist/engine/compaction/utils.js.map +1 -0
- package/dist/engine/execution-env/kill-tree.d.ts +20 -0
- package/dist/engine/execution-env/kill-tree.d.ts.map +1 -0
- package/dist/engine/execution-env/kill-tree.js +183 -0
- package/dist/engine/execution-env/kill-tree.js.map +1 -0
- package/dist/engine/execution-env/node-execution-env.d.ts +133 -0
- package/dist/engine/execution-env/node-execution-env.d.ts.map +1 -0
- package/dist/engine/execution-env/node-execution-env.js +1031 -0
- package/dist/engine/execution-env/node-execution-env.js.map +1 -0
- package/dist/engine/harness/agent-harness.d.ts +174 -0
- package/dist/engine/harness/agent-harness.d.ts.map +1 -0
- package/dist/engine/harness/agent-harness.js +1053 -0
- package/dist/engine/harness/agent-harness.js.map +1 -0
- package/dist/engine/harness/messages.d.ts +17 -0
- package/dist/engine/harness/messages.d.ts.map +1 -0
- package/dist/engine/harness/messages.js +122 -0
- package/dist/engine/harness/messages.js.map +1 -0
- package/dist/engine/harness/types.d.ts +713 -0
- package/dist/engine/harness/types.d.ts.map +1 -0
- package/dist/engine/harness/types.js +100 -0
- package/dist/engine/harness/types.js.map +1 -0
- package/dist/engine/llm/diagnostics.d.ts +23 -0
- package/dist/engine/llm/diagnostics.d.ts.map +1 -0
- package/dist/engine/llm/diagnostics.js +32 -0
- package/dist/engine/llm/diagnostics.js.map +1 -0
- package/dist/engine/llm/event-stream.d.ts +25 -0
- package/dist/engine/llm/event-stream.d.ts.map +1 -0
- package/dist/engine/llm/event-stream.js +103 -0
- package/dist/engine/llm/event-stream.js.map +1 -0
- package/dist/engine/llm/index.d.ts +12 -0
- package/dist/engine/llm/index.d.ts.map +1 -0
- package/dist/engine/llm/index.js +12 -0
- package/dist/engine/llm/index.js.map +1 -0
- package/dist/engine/llm/types.d.ts +753 -0
- package/dist/engine/llm/types.d.ts.map +1 -0
- package/dist/engine/llm/types.js +2 -0
- package/dist/engine/llm/types.js.map +1 -0
- package/dist/engine/llm/validation.d.ts +8 -0
- package/dist/engine/llm/validation.d.ts.map +1 -0
- package/dist/engine/llm/validation.js +318 -0
- package/dist/engine/llm/validation.js.map +1 -0
- package/dist/engine/loop/agent-loop.d.ts +74 -0
- package/dist/engine/loop/agent-loop.d.ts.map +1 -0
- package/dist/engine/loop/agent-loop.js +1490 -0
- package/dist/engine/loop/agent-loop.js.map +1 -0
- package/dist/engine/loop/runtime-deps.d.ts +17 -0
- package/dist/engine/loop/runtime-deps.d.ts.map +1 -0
- package/dist/engine/loop/runtime-deps.js +21 -0
- package/dist/engine/loop/runtime-deps.js.map +1 -0
- package/dist/engine/loop/types.d.ts +609 -0
- package/dist/engine/loop/types.d.ts.map +1 -0
- package/dist/engine/loop/types.js +2 -0
- package/dist/engine/loop/types.js.map +1 -0
- package/dist/engine/lsp/frame-decoder.d.ts +16 -0
- package/dist/engine/lsp/frame-decoder.d.ts.map +1 -0
- package/dist/engine/lsp/frame-decoder.js +53 -0
- package/dist/engine/lsp/frame-decoder.js.map +1 -0
- package/dist/engine/lsp/node-lsp-manager.d.ts +105 -0
- package/dist/engine/lsp/node-lsp-manager.d.ts.map +1 -0
- package/dist/engine/lsp/node-lsp-manager.js +343 -0
- package/dist/engine/lsp/node-lsp-manager.js.map +1 -0
- package/dist/engine/lsp/stdio-lsp-transport.d.ts +37 -0
- package/dist/engine/lsp/stdio-lsp-transport.d.ts.map +1 -0
- package/dist/engine/lsp/stdio-lsp-transport.js +185 -0
- package/dist/engine/lsp/stdio-lsp-transport.js.map +1 -0
- package/dist/engine/session/import-validate.d.ts +44 -0
- package/dist/engine/session/import-validate.d.ts.map +1 -0
- package/dist/engine/session/import-validate.js +92 -0
- package/dist/engine/session/import-validate.js.map +1 -0
- package/dist/engine/session/memory-repo.d.ts +25 -0
- package/dist/engine/session/memory-repo.d.ts.map +1 -0
- package/dist/engine/session/memory-repo.js +59 -0
- package/dist/engine/session/memory-repo.js.map +1 -0
- package/dist/engine/session/memory-storage.d.ts +14 -0
- package/dist/engine/session/memory-storage.d.ts.map +1 -0
- package/dist/engine/session/memory-storage.js +17 -0
- package/dist/engine/session/memory-storage.js.map +1 -0
- package/dist/engine/session/repo-utils.d.ts +11 -0
- package/dist/engine/session/repo-utils.d.ts.map +1 -0
- package/dist/engine/session/repo-utils.js +40 -0
- package/dist/engine/session/repo-utils.js.map +1 -0
- package/dist/engine/session/session.d.ts +34 -0
- package/dist/engine/session/session.d.ts.map +1 -0
- package/dist/engine/session/session.js +227 -0
- package/dist/engine/session/session.js.map +1 -0
- package/dist/engine/session/storage-base.d.ts +38 -0
- package/dist/engine/session/storage-base.d.ts.map +1 -0
- package/dist/engine/session/storage-base.js +157 -0
- package/dist/engine/session/storage-base.js.map +1 -0
- package/dist/engine/session/timestamps.d.ts +3 -0
- package/dist/engine/session/timestamps.d.ts.map +1 -0
- package/dist/engine/session/timestamps.js +15 -0
- package/dist/engine/session/timestamps.js.map +1 -0
- package/dist/engine/session/uuid.d.ts +2 -0
- package/dist/engine/session/uuid.d.ts.map +1 -0
- package/dist/engine/session/uuid.js +50 -0
- package/dist/engine/session/uuid.js.map +1 -0
- package/dist/index.d.ts +160 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +374 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/harness.d.ts +26 -0
- package/dist/internal/harness.d.ts.map +1 -0
- package/dist/internal/harness.js +24 -0
- package/dist/internal/harness.js.map +1 -0
- package/dist/internal/llm.d.ts +9 -0
- package/dist/internal/llm.d.ts.map +1 -0
- package/dist/internal/llm.js +8 -0
- package/dist/internal/llm.js.map +1 -0
- package/dist/orchestration/builtin-workflows.d.ts +44 -0
- package/dist/orchestration/builtin-workflows.d.ts.map +1 -0
- package/dist/orchestration/builtin-workflows.js +165 -0
- package/dist/orchestration/builtin-workflows.js.map +1 -0
- package/dist/orchestration/dev-vm-script-runner.d.ts +24 -0
- package/dist/orchestration/dev-vm-script-runner.d.ts.map +1 -0
- package/dist/orchestration/dev-vm-script-runner.js +106 -0
- package/dist/orchestration/dev-vm-script-runner.js.map +1 -0
- package/dist/orchestration/goal.d.ts +97 -0
- package/dist/orchestration/goal.d.ts.map +1 -0
- package/dist/orchestration/goal.js +248 -0
- package/dist/orchestration/goal.js.map +1 -0
- package/dist/orchestration/run-spec.d.ts +63 -0
- package/dist/orchestration/run-spec.d.ts.map +1 -0
- package/dist/orchestration/run-spec.js +274 -0
- package/dist/orchestration/run-spec.js.map +1 -0
- package/dist/orchestration/run-workflow-tool.d.ts +187 -0
- package/dist/orchestration/run-workflow-tool.d.ts.map +1 -0
- package/dist/orchestration/run-workflow-tool.js +612 -0
- package/dist/orchestration/run-workflow-tool.js.map +1 -0
- package/dist/orchestration/workflow-governance.d.ts +70 -0
- package/dist/orchestration/workflow-governance.d.ts.map +1 -0
- package/dist/orchestration/workflow-governance.js +176 -0
- package/dist/orchestration/workflow-governance.js.map +1 -0
- package/dist/orchestration/workflow-meta.d.ts +41 -0
- package/dist/orchestration/workflow-meta.d.ts.map +1 -0
- package/dist/orchestration/workflow-meta.js +426 -0
- package/dist/orchestration/workflow-meta.js.map +1 -0
- package/dist/orchestration/workflow-observe.d.ts +77 -0
- package/dist/orchestration/workflow-observe.d.ts.map +1 -0
- package/dist/orchestration/workflow-observe.js +177 -0
- package/dist/orchestration/workflow-observe.js.map +1 -0
- package/dist/orchestration/workflow-primitives.d.ts +31 -0
- package/dist/orchestration/workflow-primitives.d.ts.map +1 -0
- package/dist/orchestration/workflow-primitives.js +104 -0
- package/dist/orchestration/workflow-primitives.js.map +1 -0
- package/dist/orchestration/workflow-sandbox-conformance.d.ts +34 -0
- package/dist/orchestration/workflow-sandbox-conformance.d.ts.map +1 -0
- package/dist/orchestration/workflow-sandbox-conformance.js +301 -0
- package/dist/orchestration/workflow-sandbox-conformance.js.map +1 -0
- package/dist/orchestration/workflow-script-runner.d.ts +127 -0
- package/dist/orchestration/workflow-script-runner.d.ts.map +1 -0
- package/dist/orchestration/workflow-script-runner.js +48 -0
- package/dist/orchestration/workflow-script-runner.js.map +1 -0
- package/dist/orchestration/workflow-script-store.d.ts +99 -0
- package/dist/orchestration/workflow-script-store.d.ts.map +1 -0
- package/dist/orchestration/workflow-script-store.js +133 -0
- package/dist/orchestration/workflow-script-store.js.map +1 -0
- package/dist/orchestration/workflow-size-guideline.d.ts +50 -0
- package/dist/orchestration/workflow-size-guideline.d.ts.map +1 -0
- package/dist/orchestration/workflow-size-guideline.js +78 -0
- package/dist/orchestration/workflow-size-guideline.js.map +1 -0
- package/dist/orchestration/workflow.d.ts +624 -0
- package/dist/orchestration/workflow.d.ts.map +1 -0
- package/dist/orchestration/workflow.js +1596 -0
- package/dist/orchestration/workflow.js.map +1 -0
- package/dist/prompts/default.d.ts +474 -0
- package/dist/prompts/default.d.ts.map +1 -0
- package/dist/prompts/default.js +676 -0
- package/dist/prompts/default.js.map +1 -0
- package/dist/prompts/supervisor.d.ts +60 -0
- package/dist/prompts/supervisor.d.ts.map +1 -0
- package/dist/prompts/supervisor.js +162 -0
- package/dist/prompts/supervisor.js.map +1 -0
- package/dist/scenarios/env.d.ts +41 -0
- package/dist/scenarios/env.d.ts.map +1 -0
- package/dist/scenarios/env.js +65 -0
- package/dist/scenarios/env.js.map +1 -0
- package/dist/scenarios/full-body.d.ts +47 -0
- package/dist/scenarios/full-body.d.ts.map +1 -0
- package/dist/scenarios/full-body.js +36 -0
- package/dist/scenarios/full-body.js.map +1 -0
- package/dist/scenarios/scenario-registry.d.ts +107 -0
- package/dist/scenarios/scenario-registry.d.ts.map +1 -0
- package/dist/scenarios/scenario-registry.js +192 -0
- package/dist/scenarios/scenario-registry.js.map +1 -0
- package/dist/scenarios/teacher-quickstart.d.ts +41 -0
- package/dist/scenarios/teacher-quickstart.d.ts.map +1 -0
- package/dist/scenarios/teacher-quickstart.js +32 -0
- package/dist/scenarios/teacher-quickstart.js.map +1 -0
- package/dist/server/http.d.ts +36 -0
- package/dist/server/http.d.ts.map +1 -0
- package/dist/server/http.js +144 -0
- package/dist/server/http.js.map +1 -0
- package/dist/stores/file/checkpoint-store.d.ts +62 -0
- package/dist/stores/file/checkpoint-store.d.ts.map +1 -0
- package/dist/stores/file/checkpoint-store.js +250 -0
- package/dist/stores/file/checkpoint-store.js.map +1 -0
- package/dist/stores/file/file-snapshot-store.d.ts +43 -0
- package/dist/stores/file/file-snapshot-store.d.ts.map +1 -0
- package/dist/stores/file/file-snapshot-store.js +374 -0
- package/dist/stores/file/file-snapshot-store.js.map +1 -0
- package/dist/stores/file/fs-atomic.d.ts +95 -0
- package/dist/stores/file/fs-atomic.d.ts.map +1 -0
- package/dist/stores/file/fs-atomic.js +415 -0
- package/dist/stores/file/fs-atomic.js.map +1 -0
- package/dist/stores/file/index.d.ts +98 -0
- package/dist/stores/file/index.d.ts.map +1 -0
- package/dist/stores/file/index.js +109 -0
- package/dist/stores/file/index.js.map +1 -0
- package/dist/stores/file/memory-store.d.ts +95 -0
- package/dist/stores/file/memory-store.d.ts.map +1 -0
- package/dist/stores/file/memory-store.js +393 -0
- package/dist/stores/file/memory-store.js.map +1 -0
- package/dist/stores/file/session-policy-store.d.ts +24 -0
- package/dist/stores/file/session-policy-store.d.ts.map +1 -0
- package/dist/stores/file/session-policy-store.js +123 -0
- package/dist/stores/file/session-policy-store.js.map +1 -0
- package/dist/stores/file/session-store.d.ts +34 -0
- package/dist/stores/file/session-store.d.ts.map +1 -0
- package/dist/stores/file/session-store.js +175 -0
- package/dist/stores/file/session-store.js.map +1 -0
- package/dist/stores/file/tool-result-store.d.ts +23 -0
- package/dist/stores/file/tool-result-store.d.ts.map +1 -0
- package/dist/stores/file/tool-result-store.js +61 -0
- package/dist/stores/file/tool-result-store.js.map +1 -0
- package/dist/stores/file/workflow-journal-store.d.ts +36 -0
- package/dist/stores/file/workflow-journal-store.d.ts.map +1 -0
- package/dist/stores/file/workflow-journal-store.js +157 -0
- package/dist/stores/file/workflow-journal-store.js.map +1 -0
- package/dist/stores/file/workflow-run-store.d.ts +58 -0
- package/dist/stores/file/workflow-run-store.d.ts.map +1 -0
- package/dist/stores/file/workflow-run-store.js +178 -0
- package/dist/stores/file/workflow-run-store.js.map +1 -0
- package/dist/stores/pg.d.ts +210 -0
- package/dist/stores/pg.d.ts.map +1 -0
- package/dist/stores/pg.js +652 -0
- package/dist/stores/pg.js.map +1 -0
- package/dist/tools/fs/encoding.d.ts +51 -0
- package/dist/tools/fs/encoding.d.ts.map +1 -0
- package/dist/tools/fs/encoding.js +74 -0
- package/dist/tools/fs/encoding.js.map +1 -0
- package/dist/tools/fs/gh-rate-limit.d.ts +19 -0
- package/dist/tools/fs/gh-rate-limit.d.ts.map +1 -0
- package/dist/tools/fs/gh-rate-limit.js +35 -0
- package/dist/tools/fs/gh-rate-limit.js.map +1 -0
- package/dist/tools/fs/index.d.ts +246 -0
- package/dist/tools/fs/index.d.ts.map +1 -0
- package/dist/tools/fs/index.js +2130 -0
- package/dist/tools/fs/index.js.map +1 -0
- package/dist/tools/fs/pdf.d.ts +106 -0
- package/dist/tools/fs/pdf.d.ts.map +1 -0
- package/dist/tools/fs/pdf.js +178 -0
- package/dist/tools/fs/pdf.js.map +1 -0
- package/dist/tools/fs/repo-map.d.ts +15 -0
- package/dist/tools/fs/repo-map.d.ts.map +1 -0
- package/dist/tools/fs/repo-map.js +251 -0
- package/dist/tools/fs/repo-map.js.map +1 -0
- package/dist/tools/fs/safety.d.ts +168 -0
- package/dist/tools/fs/safety.d.ts.map +1 -0
- package/dist/tools/fs/safety.js +479 -0
- package/dist/tools/fs/safety.js.map +1 -0
- package/dist/tools/fs/search.d.ts +118 -0
- package/dist/tools/fs/search.d.ts.map +1 -0
- package/dist/tools/fs/search.js +650 -0
- package/dist/tools/fs/search.js.map +1 -0
- package/dist/tools/gitea-issue.d.ts +39 -0
- package/dist/tools/gitea-issue.d.ts.map +1 -0
- package/dist/tools/gitea-issue.js +91 -0
- package/dist/tools/gitea-issue.js.map +1 -0
- package/dist/tools/monitor.d.ts +64 -0
- package/dist/tools/monitor.d.ts.map +1 -0
- package/dist/tools/monitor.js +135 -0
- package/dist/tools/monitor.js.map +1 -0
- package/dist/tools/scheduler-tools.d.ts +48 -0
- package/dist/tools/scheduler-tools.d.ts.map +1 -0
- package/dist/tools/scheduler-tools.js +449 -0
- package/dist/tools/scheduler-tools.js.map +1 -0
- package/dist/tools/sql-adapters.d.ts +32 -0
- package/dist/tools/sql-adapters.d.ts.map +1 -0
- package/dist/tools/sql-adapters.js +31 -0
- package/dist/tools/sql-adapters.js.map +1 -0
- package/dist/tools/sql.d.ts +36 -0
- package/dist/tools/sql.d.ts.map +1 -0
- package/dist/tools/sql.js +131 -0
- package/dist/tools/sql.js.map +1 -0
- package/dist/tools/task-list.d.ts +26 -0
- package/dist/tools/task-list.d.ts.map +1 -0
- package/dist/tools/task-list.js +352 -0
- package/dist/tools/task-list.js.map +1 -0
- package/dist/tools/todo.d.ts +11 -0
- package/dist/tools/todo.d.ts.map +1 -0
- package/dist/tools/todo.js +126 -0
- package/dist/tools/todo.js.map +1 -0
- package/dist/tools/web.d.ts +59 -0
- package/dist/tools/web.d.ts.map +1 -0
- package/dist/tools/web.js +607 -0
- package/dist/tools/web.js.map +1 -0
- package/dist/tools/worktree.d.ts +88 -0
- package/dist/tools/worktree.d.ts.map +1 -0
- package/dist/tools/worktree.js +434 -0
- package/dist/tools/worktree.js.map +1 -0
- package/docs/A1-ATTRIBUTION-ROUND1-2026-07-09.md +181 -0
- package/docs/AB-ORACLE-GATE-VERDICT-2026-07-10.md +100 -0
- package/docs/ANCHOR-GAP-INVENTORY-2026-07-09.md +143 -0
- package/docs/ARCHITECTURE.md +125 -0
- package/docs/BUGHUNT-2026-07-05-NIGHT.md +98 -0
- package/docs/BUILD.md +63 -0
- package/docs/CANCEL-ASYNC-ATTRIBUTION-2026-07-09.md +98 -0
- package/docs/CC-198-VS-201-DRIFT-2026-07-09.md +70 -0
- package/docs/CC-BASELINE-FAKE-ZERO-AUDIT-2026-07-09.md +51 -0
- package/docs/CC-DRIFT-198-206-AGENT-TYPES-2026-07-10.md +82 -0
- package/docs/CC-DRIFT-198-206-CHANGELOG-2026-07-10.md +82 -0
- package/docs/CC-DRIFT-198-206-REMINDERS-2026-07-10.md +96 -0
- package/docs/CC-DRIFT-198-206-ROADMAP-2026-07-10.md +110 -0
- package/docs/CC-DRIFT-198-206-TOOL-INVENTORY-2026-07-10.md +53 -0
- package/docs/CC-DRIFT-198-206-USAGE-CONSTANTS-2026-07-10.md +64 -0
- package/docs/CC-DRIFT-198-206-WORKFLOW-2026-07-10.md +83 -0
- package/docs/CC-PARITY-CHECKLIST.md +220 -0
- package/docs/CC-PARITY-DEEP-SWEEP-2026-07-07.md +149 -0
- package/docs/CC-SUBAGENT-PROMPT-STUDY-2026-07-09.md +219 -0
- package/docs/CC-TASK-REMINDER-CADENCE-STUDY-2026-07-09.md +396 -0
- package/docs/CC-TOOL-PARITY-SWEEP-2026-07.md +56 -0
- package/docs/CC-TOOL-PROMPT-DEEP-DIFF-2026-07-08.md +274 -0
- package/docs/CC-TOOLSURFACE-DEEP-DIVE-2026-07-07.md +197 -0
- package/docs/CC206-OBSERVER-ANCHORS-2026-07-11.md +463 -0
- package/docs/CC207-CORE-SWEEP-BACKLOG-2026-07-12.md +155 -0
- package/docs/CENTER-CONTROL-PLANE-SEAM.md +86 -0
- package/docs/CLEANUP-CONTRACT-ANCHOR-2026-07-09.md +83 -0
- package/docs/COLD-START-RSI-2026-07-09.md +72 -0
- package/docs/COMPACTION-LIVE-AUDIT-2026-07-09.md +114 -0
- package/docs/CONTEXT-lifecycle-extension-points-and-stop-attribution.md +71 -0
- package/docs/COREWARS-POLYGLOT-TRIAGE-2026-07-09.md +85 -0
- package/docs/DEADTARGET-OVERFULL-HBOX-2026-07-10.md +92 -0
- package/docs/DEADTARGET-PATH-TRACING-REVERSE-2026-07-10.md +87 -0
- package/docs/DEADTARGET-WINNING-AVG-COREWARS-2026-07-10.md +96 -0
- package/docs/DEEPSEEK-API-LIMITS-PROBE-2026-07-09.md +118 -0
- package/docs/DESIGN-140-MOCK-VERIFY-2026-07-11.md +79 -0
- package/docs/DESIGN-140-VERIFICATION-2026-07-11.md +43 -0
- package/docs/DESIGN-DRAFT-workflow-collab-2026-07-11.md +56 -0
- package/docs/DESIGN-ORACLE-GROUNDING-GATE-2026-07-10.md +167 -0
- package/docs/DESIGN-TFRAG-RECONCILE-SCAFFOLD-2026-07-09.md +102 -0
- package/docs/EXP-PA2-PE-DESIGN-2026-07-11.md +220 -0
- package/docs/EXT-DOGFOOD-2026-07-12.md +50 -0
- package/docs/FINAL-VERIFY-SURFACE-AUDIT-2026-07-09.md +44 -0
- package/docs/FRAG-RECON-INVESTIGATION-2026-07-09.md +183 -0
- package/docs/HANDOFF.md +121 -0
- package/docs/KNOWN-ISSUES.md +96 -0
- package/docs/LEGW-WINDOW-TAX-2026-07-10.md +82 -0
- package/docs/LIVE-PROBE-BATCH-2026-07-11.md +207 -0
- package/docs/M2-CERT-ATTRIBUTION-2026-07-10.md +61 -0
- package/docs/M25-LEG-VARIANCE-ATTRIBUTION-2026-07-10.md +81 -0
- package/docs/MAILMAN-TIMEOUT-ATTRIBUTION-2026-07-10.md +88 -0
- package/docs/MEMORY-BACKEND-DIALECT-NOTES.md +69 -0
- package/docs/MTEB-ESCAPE-HATCH-ATTRIBUTION-2026-07-09.md +57 -0
- package/docs/MTEB-LEADERBOARD-ATTRIBUTION-2026-07-10.md +134 -0
- package/docs/ORACLE-GATE-NEGATIVE-SAMPLE-2026-07-11.md +28 -0
- package/docs/PARITY-CONTEXT-TRANSACTIONS-2026-07-10.md +67 -0
- package/docs/PARITY-PROGRESS-MATRIX-2026-07-10.md +37 -0
- package/docs/PARITY-SPOT-AGENT-TYPES-2026-07-10.md +70 -0
- package/docs/PARITY-SPOT-REMINDERS-2026-07-10.md +144 -0
- package/docs/PARITY-SPOT-TOOL-INVENTORY-2026-07-10.md +61 -0
- package/docs/PARITY-SPOT-USAGE-CONSTANTS-2026-07-10.md +95 -0
- package/docs/PARITY-SPOT-WORKFLOW-2026-07-10.md +93 -0
- package/docs/PASSWORD-RECOVERY-PANEL-VERDICT-2026-07-10.md +62 -0
- package/docs/R8-R9-FINALIZE-COORDINATION-2026-07-09.md +124 -0
- package/docs/REPL-CODE-MODE-EVALUATION-2026-07-10.md +187 -0
- package/docs/REPORT-1249-TARGETED.md +48 -0
- package/docs/RESEARCH-3P-MEMORY-SWAP-2026-07-12.md +273 -0
- package/docs/ROADMAP.md +111 -0
- package/docs/RSI-CLOUD-DEPLOY-2026-07-06.md +289 -0
- package/docs/RSI-PROCESS-AI-COLDSTART-2026-07-11.md +68 -0
- package/docs/S18-THOROUGHNESS-AUDIT-2026-07-09.md +113 -0
- package/docs/SERVICE-INTEGRATION-GUIDE.md +298 -0
- package/docs/SUBAGENT-STREAM-RESILIENCE-PARITY-2026-07-10.md +118 -0
- package/docs/SWEBENCH-PRO-RECON-2026-07-11.md +31 -0
- package/docs/TB-EFFICIENCY-TELEMETRY-2026-07-08.md +114 -0
- package/docs/TB-FAILURE-AUTOPSY-2026-07-05-RERUN.md +67 -0
- package/docs/TB-FAIRNESS-AUDIT-2026-07-08.md +141 -0
- package/docs/TB-FULL-1257-2026-07-08.md +77 -0
- package/docs/TB-LEG-GAP-ATTRIBUTION-1261-1263-2026-07-11.md +154 -0
- package/docs/TB-REGRESSION-DAEMON-KILL-2026-07-08.md +58 -0
- package/docs/TB-RSI-CROSSCHECK-2026-07-06.md +68 -0
- package/docs/TB-RSI-LEDGER.md +30 -0
- package/docs/TB-STABLE-SET-2026-07-08.md +127 -0
- package/docs/TB21-RECON-2026-07-11.md +28 -0
- package/docs/TEST-DESIGN-BATCH-1-2-3.md +97 -0
- package/docs/THIRD-PARTY-INTEGRATION.md +45 -0
- package/docs/TOKEN-ESTIMATE-CALIBRATION-LIVE-2026-07-09.md +102 -0
- package/docs/audit-2026-06-10-/347/254/254/344/272/214/350/275/256-/347/251/272/347/231/275/345/214/272/344/270/216/345/277/230/346/216/245/347/272/277.md +147 -0
- package/docs/audit-2026-06-10-/350/256/241/347/256/227bug/346/211/253/346/217/217.md +163 -0
- package/docs/audit-2026-06-11-/344/277/256/345/244/215/345/244/215/345/256/241/344/270/216/345/233/236/345/275/222/344/270/223/346/211/253.md +95 -0
- package/docs/audit-2026-06-12-design71-P1/346/275/234/344/274/217/351/235/242/350/243/201/345/206/263/344/270/216/345/220/236/351/224/231/345/256/241/350/256/241.md +45 -0
- package/docs/audit-2026-06-12-/345/205/254/345/274/200/346/227/213/351/222/256/346/264/273/346/200/247/344/270/216vendored/346/255/273/350/267/257.md +63 -0
- package/docs/audit-2026-06-15/ADDENDUM-second-pass.md +88 -0
- package/docs/audit-2026-06-15/ARCHITECTURE-AND-ROADMAP.md +187 -0
- package/docs/audit-2026-06-15/DOC-CORRECTIONS.md +105 -0
- package/docs/audit-2026-06-15/INDEX.md +49 -0
- package/docs/audit-2026-06-15/ORCHESTRATION-STATUS.md +98 -0
- package/docs/audit-2026-06-15/PRODUCTION-ISSUES.md +189 -0
- package/docs/audit-2026-06-15/REFERENCES-literature.md +139 -0
- package/docs/audit-2026-06-15/VENDOR-REFACTOR-PLAN.md +96 -0
- package/docs/cc-probe-198/README.md +72 -0
- package/docs/cc-probe-198/STABILITY-AUDIT.md +118 -0
- package/docs/cc-probe-198/live-schema-monitor-worktree-2026-07-09.json +56 -0
- package/docs/cc-probe-198/mount-variants.json +536 -0
- package/docs/cc-probe-198/plan-mode-run.json +1 -0
- package/docs/cc-probe-198/probe-bash-bg.json +224 -0
- package/docs/cc-probe-198/probe-edit-mismatch.json +120 -0
- package/docs/cc-probe-198/probe-read-missing.json +62 -0
- package/docs/cc-probe-198/probe-search-empty.json +127 -0
- package/docs/cc-probe-198/probe-task-family.json +227 -0
- package/docs/cc-probe-198/probes.status +6 -0
- package/docs/cc-probe-198/raw-capture-interactive.json +948 -0
- package/docs/cc-probe-198/raw-capture-print.json +787 -0
- package/docs/cc-probe-198/raw-capture2-interactive.json +948 -0
- package/docs/cc-probe-198/raw-capture2-print.json +787 -0
- package/docs/cc-probe-198/system-prompt.txt +135 -0
- package/docs/cc-probe-198/tools-array.json +962 -0
- package/docs/durability-boundary.md +63 -0
- package/docs/fix-2026-06-10-/350/256/241/347/256/227bug/344/277/256/345/244/215-search/346/211/271.md +75 -0
- package/docs/fix-2026-06-11-/347/254/254/344/272/214/350/275/256-/344/277/256/345/244/215-search/346/211/271.md +62 -0
- package/docs/parity-sweep/REPORT-DYNAMIC.md +97 -0
- package/docs/parity-sweep/REPORT-STATIC-GGB.md +127 -0
- package/docs/parity-sweep/REPORT-STATIC-RWE.md +133 -0
- package/docs/vendor-history.md +385 -0
- package/docs/vendored-upstream-diff-2026-07.md +83 -0
- package/package.json +70 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentDefinition } from "../core/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Validate + freeze a declarative sub-agent definition (design/38 1B). A thin, fail-fast factory: it
|
|
4
|
+
* checks the only hard requirement (a non-empty `name`) and returns a shallow-frozen copy so a stored
|
|
5
|
+
* definition can't be mutated out from under the registry. Registry-level checks (name uniqueness,
|
|
6
|
+
* collision with reserved/tool names, model-ref resolution) happen when the set is handed to
|
|
7
|
+
* {@link createSubagentTool}, where the tool name + model catalog are available.
|
|
8
|
+
*/
|
|
9
|
+
export declare function defineAgent(def: AgentDefinition): AgentDefinition;
|
|
10
|
+
//# sourceMappingURL=agent-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-definition.d.ts","sourceRoot":"","sources":["../../src/agents/agent-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,eAAe,CASjE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate + freeze a declarative sub-agent definition (design/38 1B). A thin, fail-fast factory: it
|
|
3
|
+
* checks the only hard requirement (a non-empty `name`) and returns a shallow-frozen copy so a stored
|
|
4
|
+
* definition can't be mutated out from under the registry. Registry-level checks (name uniqueness,
|
|
5
|
+
* collision with reserved/tool names, model-ref resolution) happen when the set is handed to
|
|
6
|
+
* {@link createSubagentTool}, where the tool name + model catalog are available.
|
|
7
|
+
*/
|
|
8
|
+
export function defineAgent(def) {
|
|
9
|
+
if (!def.name || !def.name.trim()) {
|
|
10
|
+
const e = new Error("defineAgent: `name` is required and must be a non-empty string.");
|
|
11
|
+
e.code = "config.agent.invalid";
|
|
12
|
+
throw e;
|
|
13
|
+
}
|
|
14
|
+
// Shallow freeze: the top-level definition can't be reassigned, but a nested `model` Model object stays
|
|
15
|
+
// mutable. Fine here — AgentDefinitions are trusted deployment-side config, not adversarial input.
|
|
16
|
+
return Object.freeze({ ...def });
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=agent-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-definition.js","sourceRoot":"","sources":["../../src/agents/agent-definition.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,GAAoB;IAC9C,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QAClC,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,iEAAiE,CAA8B,CAAC;QACpH,CAAC,CAAC,IAAI,GAAG,sBAAsB,CAAC;QAChC,MAAM,CAAC,CAAC;IACV,CAAC;IACD,wGAAwG;IACxG,mGAAmG;IACnG,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { AgentDefinition } from "../core/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* F1 (design/135 批次3 / PARITY-SPOT-AGENT-TYPES-2026-07-10) — the CC 2.1.198 BUILT-IN `Explore` and
|
|
4
|
+
* `Plan` agent types, ported to sema's AgentDefinition roster shape.
|
|
5
|
+
*
|
|
6
|
+
* 198 锚 (亲核 2026-07-10, drift 调研: 198→204→206 逐字零漂移):
|
|
7
|
+
* - Explore definition `qme` — pretty.js:409186-409198 (`agentType:"Explore"`, whenToUse=nbm,
|
|
8
|
+
* whenToUseLean=rbm, `disallowedTools:[is,NR,s0,xa,Ic,FR]` = Agent/Artifact/ExitPlanMode/Edit/Write/
|
|
9
|
+
* NotebookEdit, `model:"inherit"`, `omitClaudeMd:!0`, getSystemPrompt=tbm).
|
|
10
|
+
* - Explore whenToUse `nbm` / whenToUseLean `rbm` — pretty.js:409173-409174 (verbatim below).
|
|
11
|
+
* - Explore system prompt `tbm()` — pretty.js:409122-409160 (verbatim below, unix+Glob/Grep arm).
|
|
12
|
+
* - Plan definition `Xor` — pretty.js:486943-486953 (`agentType:"Plan"`, single whenToUse, same six
|
|
13
|
+
* disallowedTools, `tools: qme.tools` = undefined, `model:"inherit"`, `omitClaudeMd:!0`).
|
|
14
|
+
* - Plan system prompt `kBm()` — pretty.js:486874-486930 (verbatim below, unix arm).
|
|
15
|
+
* - Registry `HCe` — pretty.js:487221-487240: Explore+Plan ship behind `iAt()` (487127-487131:
|
|
16
|
+
* env kill-switch `CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS` + `tengu_slate_ibis` gate DEFAULT ON)
|
|
17
|
+
* ⇒ GA default-on in 198 (and byte-stable through 204/206 — CC-DRIFT-198-206-AGENT-TYPES 锚 1-7).
|
|
18
|
+
* SDK entrypoints ship them too (only `claude-code-guide` is non-SDK); the SDK-form opt-out is
|
|
19
|
+
* `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` (487221) → sema's deployment-config analog is
|
|
20
|
+
* `SubagentToolOptions.builtinAgents: false` (config-driven, not env-driven).
|
|
21
|
+
*
|
|
22
|
+
* sema adaptations (deliberate, each recorded):
|
|
23
|
+
* - De-branding (prompt-sovereignty / SUBAGENT_PROMPT precedent): CC's persona first sentences name the
|
|
24
|
+
* product ("… for Claude Code, Anthropic's official CLI for Claude." / "… for Claude Code.") — sema
|
|
25
|
+
* stays provider-neutral, the brand clause is dropped; every other byte is CC-verbatim.
|
|
26
|
+
* - Platform arm: CC's `tbm`/`kBm` interpolate per-platform tool guidance (unix Bash vs PowerShell) and
|
|
27
|
+
* a bash-only search mode (`ww()`). sema children run in a POSIX ExecutionEnv with first-party
|
|
28
|
+
* Glob/Grep/Read/Bash under CC-identical names — the unix + Glob/Grep arm is baked verbatim
|
|
29
|
+
* (Mu="Glob" :149761, Jc="Grep" :224202, Ls="Read", Lo="Bash").
|
|
30
|
+
* - `model:"inherit"` — sema shape: `model` omitted on an AgentDefinition = inherit the caller's current
|
|
31
|
+
* model (identical semantics). CC's Explore firstParty opus UPGRADE (`GAe`, 409162-409171: built-in
|
|
32
|
+
* Explore may upshift to opus on first-party subscriptions) is a CC-subscription ladder concern —
|
|
33
|
+
* NOT ported (sema is provider-neutral; inherit is the base arm both sides share).
|
|
34
|
+
* - `omitClaudeMd:!0` (422063: drops the CLAUDE.md user-context layer for these types) — NOT ported this
|
|
35
|
+
* round: sema's project-context layer is assembled in prepare-task (design/113 C4), a concurrent-batch
|
|
36
|
+
* conflict domain at port time. Recorded as the F7 residual; the deployment `loadProjectMemory` seam
|
|
37
|
+
* already receives `isSubagent`/`agentName` and can trim today.
|
|
38
|
+
* - `disallowedTools` → `denyTools` (sema name), with the DELEGATION-tool entry tracking the deployment's
|
|
39
|
+
* actual tool name (default "Agent" = CC-verbatim). "Artifact"/"ExitPlanMode" have first-party sema
|
|
40
|
+
* referents only partially (present_plan canonicalizes to ExitPlanMode; Artifact has none) — a deny of
|
|
41
|
+
* an unmounted name is a documented no-op (tool-filter), kept for CC listing-tail byte parity.
|
|
42
|
+
*/
|
|
43
|
+
/** CC 198 `nbm` (pretty.js:409173) — Explore `whenToUse`, verbatim. */
|
|
44
|
+
export declare const EXPLORE_WHEN_TO_USE = "Fast read-only search agent for locating code. Use it to find files by pattern (eg. \"src/components/**/*.tsx\"), grep for symbols or keywords (eg. \"API endpoints\"), or answer \"where is X defined / which files reference Y.\" Do NOT use it for code review, design-doc auditing, cross-file consistency checks, or open-ended analysis \u2014 it reads excerpts rather than whole files and will miss content past its read window. When calling, specify search breadth: \"quick\" for a single targeted lookup, \"medium\" for moderate exploration, or \"very thorough\" to search across multiple locations and naming conventions.";
|
|
45
|
+
/** CC 198 `rbm` (pretty.js:409174) — Explore `whenToUseLean`, verbatim. */
|
|
46
|
+
export declare const EXPLORE_WHEN_TO_USE_LEAN = "Read-only search agent for broad fan-out searches \u2014 when answering means sweeping many files, directories, or naming conventions and you only need the conclusion, not the file dumps. It reads excerpts rather than whole files, so it locates code; it doesn't review or audit it. Specify search breadth: \"medium\" for moderate exploration, \"very thorough\" for multiple locations and naming conventions.";
|
|
47
|
+
/** CC 198 Plan `whenToUse` (pretty.js:486945), verbatim (Plan has no lean variant in 198). */
|
|
48
|
+
export declare const PLAN_WHEN_TO_USE = "Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs.";
|
|
49
|
+
/** CC 198 `tbm()` (pretty.js:409122-409160) — Explore persona, unix+Glob/Grep arm, first sentence de-branded. */
|
|
50
|
+
export declare const EXPLORE_SYSTEM_PROMPT = "You are a file search specialist. You excel at thoroughly navigating and exploring codebases.\n\n=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===\nThis is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:\n- Creating new files (no Write, touch, or file creation of any kind)\n- Modifying existing files (no Edit operations)\n- Deleting files (no rm or deletion)\n- Moving or copying files (no mv or cp)\n- Creating temporary files anywhere, including /tmp\n- Using redirect operators (>, >>, |) or heredocs to write to files\n- Running ANY commands that change system state\n\nYour role is EXCLUSIVELY to search and analyze existing code. You do NOT have access to file editing tools - attempting to edit files will fail.\n\nYour strengths:\n- Rapidly finding files using glob patterns\n- Searching code and text with powerful regex patterns\n- Reading and analyzing file contents\n\nGuidelines:\n- Use Glob for broad file pattern matching\n- Use Grep for searching file contents with regex\n- Use Read when you know the specific file path you need to read\n- Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)\n- NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification\n- Adapt your search approach based on the thoroughness level specified by the caller\n- Communicate your final report directly as a regular message - do NOT attempt to create files\n\nNOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must:\n- Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations\n- Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files\n\nComplete the user's search request efficiently and report your findings clearly.";
|
|
51
|
+
/** CC 198 `kBm()` (pretty.js:486874-486930) — Plan persona, unix arm, first sentence de-branded. */
|
|
52
|
+
export declare const PLAN_SYSTEM_PROMPT = "You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.\n\n=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===\nThis is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:\n- Creating new files (no Write, touch, or file creation of any kind)\n- Modifying existing files (no Edit operations)\n- Deleting files (no rm or deletion)\n- Moving or copying files (no mv or cp)\n- Creating temporary files anywhere, including /tmp\n- Using redirect operators (>, >>, |) or heredocs to write to files\n- Running ANY commands that change system state\n\nYour role is EXCLUSIVELY to explore the codebase and design implementation plans. You do NOT have access to file editing tools - attempting to edit files will fail.\n\nYou will be provided with a set of requirements and optionally a perspective on how to approach the design process.\n\n## Your Process\n\n1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.\n\n2. **Explore Thoroughly**:\n - Read any files provided to you in the initial prompt\n - Find existing patterns and conventions using Glob, Grep, and Read\n - Understand the current architecture\n - Identify similar features as reference\n - Trace through relevant code paths\n - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)\n - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification\n\n3. **Design Solution**:\n - Create implementation approach based on your assigned perspective\n - Consider trade-offs and architectural decisions\n - Follow existing patterns where appropriate\n\n4. **Detail the Plan**:\n - Provide step-by-step implementation strategy\n - Identify dependencies and sequencing\n - Anticipate potential challenges\n\n## Required Output\n\nEnd your response with:\n\n### Critical Files for Implementation\nList 3-5 files most critical for implementing this plan:\n- path/to/file1.ts\n- path/to/file2.ts\n- path/to/file3.ts\n\nREMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or modify any files. You do NOT have access to file editing tools.";
|
|
53
|
+
/**
|
|
54
|
+
* CC 198 `disallowedTools:[is,NR,s0,xa,Ic,FR]` (pretty.js:409189 Explore / :486948 Plan) — the six-tool
|
|
55
|
+
* deny set shared by both read-only built-ins, constants resolved 亲核: is="Agent"(147382),
|
|
56
|
+
* NR="Artifact"(143265), s0="ExitPlanMode"(149770), xa="Edit"(143358), Ic="Write"(143375),
|
|
57
|
+
* NotebookEdit FR(143373). The delegation-tool entry is parameterized on the deployment's actual tool
|
|
58
|
+
* name (default = "Agent", CC-verbatim).
|
|
59
|
+
*/
|
|
60
|
+
export declare const BUILTIN_READONLY_DENY_TOOLS: (delegationToolName?: string) => string[];
|
|
61
|
+
/**
|
|
62
|
+
* Build the built-in agent definitions offered by {@link import("./subagent.js").createSubagentTool}
|
|
63
|
+
* (CC `HCe` registry analog, SDK arm: Explore + Plan; general-purpose is sema's OMITTED-`subagent_type`
|
|
64
|
+
* fallback and fork lives in the `subagent_type` value domain — neither needs a definition here).
|
|
65
|
+
* A deployment definition of the same name SHADOWS a built-in (fork-shadowing precedent), and
|
|
66
|
+
* `builtinAgents: false` removes them wholesale (CC `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` form).
|
|
67
|
+
*/
|
|
68
|
+
export declare function builtinAgentDefinitions(delegationToolName?: string): AgentDefinition[];
|
|
69
|
+
//# sourceMappingURL=builtin-agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-agents.d.ts","sourceRoot":"","sources":["../../src/agents/builtin-agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,mnBACikB,CAAC;AAElmB,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,4ZACiX,CAAC;AAEvZ,8FAA8F;AAC9F,eAAO,MAAM,gBAAgB,uOACyM,CAAC;AAEvO,iHAAiH;AACjH,eAAO,MAAM,qBAAqB,64DAgC+C,CAAC;AAElF,oGAAoG;AACpG,eAAO,MAAM,kBAAkB,wwEAiDkH,CAAC;AAElJ;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,wBAAwB,MAAM,KAAkC,MAAM,EAO7G,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,kBAAkB,GAAE,MAAqC,GAAG,eAAe,EAAE,CAkBpH"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/** Default delegation-tool name (= subagent.ts `DEFAULT_SUBAGENT_TOOL_NAME`, duplicated here as a
|
|
2
|
+
* literal to keep this module import-cycle-free; CC 198 `is`="Agent" — locked by test). */
|
|
3
|
+
const DEFAULT_DELEGATION_TOOL_NAME = "Agent";
|
|
4
|
+
/**
|
|
5
|
+
* F1 (design/135 批次3 / PARITY-SPOT-AGENT-TYPES-2026-07-10) — the CC 2.1.198 BUILT-IN `Explore` and
|
|
6
|
+
* `Plan` agent types, ported to sema's AgentDefinition roster shape.
|
|
7
|
+
*
|
|
8
|
+
* 198 锚 (亲核 2026-07-10, drift 调研: 198→204→206 逐字零漂移):
|
|
9
|
+
* - Explore definition `qme` — pretty.js:409186-409198 (`agentType:"Explore"`, whenToUse=nbm,
|
|
10
|
+
* whenToUseLean=rbm, `disallowedTools:[is,NR,s0,xa,Ic,FR]` = Agent/Artifact/ExitPlanMode/Edit/Write/
|
|
11
|
+
* NotebookEdit, `model:"inherit"`, `omitClaudeMd:!0`, getSystemPrompt=tbm).
|
|
12
|
+
* - Explore whenToUse `nbm` / whenToUseLean `rbm` — pretty.js:409173-409174 (verbatim below).
|
|
13
|
+
* - Explore system prompt `tbm()` — pretty.js:409122-409160 (verbatim below, unix+Glob/Grep arm).
|
|
14
|
+
* - Plan definition `Xor` — pretty.js:486943-486953 (`agentType:"Plan"`, single whenToUse, same six
|
|
15
|
+
* disallowedTools, `tools: qme.tools` = undefined, `model:"inherit"`, `omitClaudeMd:!0`).
|
|
16
|
+
* - Plan system prompt `kBm()` — pretty.js:486874-486930 (verbatim below, unix arm).
|
|
17
|
+
* - Registry `HCe` — pretty.js:487221-487240: Explore+Plan ship behind `iAt()` (487127-487131:
|
|
18
|
+
* env kill-switch `CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS` + `tengu_slate_ibis` gate DEFAULT ON)
|
|
19
|
+
* ⇒ GA default-on in 198 (and byte-stable through 204/206 — CC-DRIFT-198-206-AGENT-TYPES 锚 1-7).
|
|
20
|
+
* SDK entrypoints ship them too (only `claude-code-guide` is non-SDK); the SDK-form opt-out is
|
|
21
|
+
* `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` (487221) → sema's deployment-config analog is
|
|
22
|
+
* `SubagentToolOptions.builtinAgents: false` (config-driven, not env-driven).
|
|
23
|
+
*
|
|
24
|
+
* sema adaptations (deliberate, each recorded):
|
|
25
|
+
* - De-branding (prompt-sovereignty / SUBAGENT_PROMPT precedent): CC's persona first sentences name the
|
|
26
|
+
* product ("… for Claude Code, Anthropic's official CLI for Claude." / "… for Claude Code.") — sema
|
|
27
|
+
* stays provider-neutral, the brand clause is dropped; every other byte is CC-verbatim.
|
|
28
|
+
* - Platform arm: CC's `tbm`/`kBm` interpolate per-platform tool guidance (unix Bash vs PowerShell) and
|
|
29
|
+
* a bash-only search mode (`ww()`). sema children run in a POSIX ExecutionEnv with first-party
|
|
30
|
+
* Glob/Grep/Read/Bash under CC-identical names — the unix + Glob/Grep arm is baked verbatim
|
|
31
|
+
* (Mu="Glob" :149761, Jc="Grep" :224202, Ls="Read", Lo="Bash").
|
|
32
|
+
* - `model:"inherit"` — sema shape: `model` omitted on an AgentDefinition = inherit the caller's current
|
|
33
|
+
* model (identical semantics). CC's Explore firstParty opus UPGRADE (`GAe`, 409162-409171: built-in
|
|
34
|
+
* Explore may upshift to opus on first-party subscriptions) is a CC-subscription ladder concern —
|
|
35
|
+
* NOT ported (sema is provider-neutral; inherit is the base arm both sides share).
|
|
36
|
+
* - `omitClaudeMd:!0` (422063: drops the CLAUDE.md user-context layer for these types) — NOT ported this
|
|
37
|
+
* round: sema's project-context layer is assembled in prepare-task (design/113 C4), a concurrent-batch
|
|
38
|
+
* conflict domain at port time. Recorded as the F7 residual; the deployment `loadProjectMemory` seam
|
|
39
|
+
* already receives `isSubagent`/`agentName` and can trim today.
|
|
40
|
+
* - `disallowedTools` → `denyTools` (sema name), with the DELEGATION-tool entry tracking the deployment's
|
|
41
|
+
* actual tool name (default "Agent" = CC-verbatim). "Artifact"/"ExitPlanMode" have first-party sema
|
|
42
|
+
* referents only partially (present_plan canonicalizes to ExitPlanMode; Artifact has none) — a deny of
|
|
43
|
+
* an unmounted name is a documented no-op (tool-filter), kept for CC listing-tail byte parity.
|
|
44
|
+
*/
|
|
45
|
+
/** CC 198 `nbm` (pretty.js:409173) — Explore `whenToUse`, verbatim. */
|
|
46
|
+
export const EXPLORE_WHEN_TO_USE = 'Fast read-only search agent for locating code. Use it to find files by pattern (eg. "src/components/**/*.tsx"), grep for symbols or keywords (eg. "API endpoints"), or answer "where is X defined / which files reference Y." Do NOT use it for code review, design-doc auditing, cross-file consistency checks, or open-ended analysis — it reads excerpts rather than whole files and will miss content past its read window. When calling, specify search breadth: "quick" for a single targeted lookup, "medium" for moderate exploration, or "very thorough" to search across multiple locations and naming conventions.';
|
|
47
|
+
/** CC 198 `rbm` (pretty.js:409174) — Explore `whenToUseLean`, verbatim. */
|
|
48
|
+
export const EXPLORE_WHEN_TO_USE_LEAN = "Read-only search agent for broad fan-out searches — when answering means sweeping many files, directories, or naming conventions and you only need the conclusion, not the file dumps. It reads excerpts rather than whole files, so it locates code; it doesn't review or audit it. Specify search breadth: \"medium\" for moderate exploration, \"very thorough\" for multiple locations and naming conventions.";
|
|
49
|
+
/** CC 198 Plan `whenToUse` (pretty.js:486945), verbatim (Plan has no lean variant in 198). */
|
|
50
|
+
export const PLAN_WHEN_TO_USE = "Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs.";
|
|
51
|
+
/** CC 198 `tbm()` (pretty.js:409122-409160) — Explore persona, unix+Glob/Grep arm, first sentence de-branded. */
|
|
52
|
+
export const EXPLORE_SYSTEM_PROMPT = `You are a file search specialist. You excel at thoroughly navigating and exploring codebases.
|
|
53
|
+
|
|
54
|
+
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
|
55
|
+
This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
|
|
56
|
+
- Creating new files (no Write, touch, or file creation of any kind)
|
|
57
|
+
- Modifying existing files (no Edit operations)
|
|
58
|
+
- Deleting files (no rm or deletion)
|
|
59
|
+
- Moving or copying files (no mv or cp)
|
|
60
|
+
- Creating temporary files anywhere, including /tmp
|
|
61
|
+
- Using redirect operators (>, >>, |) or heredocs to write to files
|
|
62
|
+
- Running ANY commands that change system state
|
|
63
|
+
|
|
64
|
+
Your role is EXCLUSIVELY to search and analyze existing code. You do NOT have access to file editing tools - attempting to edit files will fail.
|
|
65
|
+
|
|
66
|
+
Your strengths:
|
|
67
|
+
- Rapidly finding files using glob patterns
|
|
68
|
+
- Searching code and text with powerful regex patterns
|
|
69
|
+
- Reading and analyzing file contents
|
|
70
|
+
|
|
71
|
+
Guidelines:
|
|
72
|
+
- Use Glob for broad file pattern matching
|
|
73
|
+
- Use Grep for searching file contents with regex
|
|
74
|
+
- Use Read when you know the specific file path you need to read
|
|
75
|
+
- Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
|
|
76
|
+
- NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
|
|
77
|
+
- Adapt your search approach based on the thoroughness level specified by the caller
|
|
78
|
+
- Communicate your final report directly as a regular message - do NOT attempt to create files
|
|
79
|
+
|
|
80
|
+
NOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must:
|
|
81
|
+
- Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations
|
|
82
|
+
- Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files
|
|
83
|
+
|
|
84
|
+
Complete the user's search request efficiently and report your findings clearly.`;
|
|
85
|
+
/** CC 198 `kBm()` (pretty.js:486874-486930) — Plan persona, unix arm, first sentence de-branded. */
|
|
86
|
+
export const PLAN_SYSTEM_PROMPT = `You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.
|
|
87
|
+
|
|
88
|
+
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
|
89
|
+
This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:
|
|
90
|
+
- Creating new files (no Write, touch, or file creation of any kind)
|
|
91
|
+
- Modifying existing files (no Edit operations)
|
|
92
|
+
- Deleting files (no rm or deletion)
|
|
93
|
+
- Moving or copying files (no mv or cp)
|
|
94
|
+
- Creating temporary files anywhere, including /tmp
|
|
95
|
+
- Using redirect operators (>, >>, |) or heredocs to write to files
|
|
96
|
+
- Running ANY commands that change system state
|
|
97
|
+
|
|
98
|
+
Your role is EXCLUSIVELY to explore the codebase and design implementation plans. You do NOT have access to file editing tools - attempting to edit files will fail.
|
|
99
|
+
|
|
100
|
+
You will be provided with a set of requirements and optionally a perspective on how to approach the design process.
|
|
101
|
+
|
|
102
|
+
## Your Process
|
|
103
|
+
|
|
104
|
+
1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.
|
|
105
|
+
|
|
106
|
+
2. **Explore Thoroughly**:
|
|
107
|
+
- Read any files provided to you in the initial prompt
|
|
108
|
+
- Find existing patterns and conventions using Glob, Grep, and Read
|
|
109
|
+
- Understand the current architecture
|
|
110
|
+
- Identify similar features as reference
|
|
111
|
+
- Trace through relevant code paths
|
|
112
|
+
- Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
|
|
113
|
+
- NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
|
|
114
|
+
|
|
115
|
+
3. **Design Solution**:
|
|
116
|
+
- Create implementation approach based on your assigned perspective
|
|
117
|
+
- Consider trade-offs and architectural decisions
|
|
118
|
+
- Follow existing patterns where appropriate
|
|
119
|
+
|
|
120
|
+
4. **Detail the Plan**:
|
|
121
|
+
- Provide step-by-step implementation strategy
|
|
122
|
+
- Identify dependencies and sequencing
|
|
123
|
+
- Anticipate potential challenges
|
|
124
|
+
|
|
125
|
+
## Required Output
|
|
126
|
+
|
|
127
|
+
End your response with:
|
|
128
|
+
|
|
129
|
+
### Critical Files for Implementation
|
|
130
|
+
List 3-5 files most critical for implementing this plan:
|
|
131
|
+
- path/to/file1.ts
|
|
132
|
+
- path/to/file2.ts
|
|
133
|
+
- path/to/file3.ts
|
|
134
|
+
|
|
135
|
+
REMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or modify any files. You do NOT have access to file editing tools.`;
|
|
136
|
+
/**
|
|
137
|
+
* CC 198 `disallowedTools:[is,NR,s0,xa,Ic,FR]` (pretty.js:409189 Explore / :486948 Plan) — the six-tool
|
|
138
|
+
* deny set shared by both read-only built-ins, constants resolved 亲核: is="Agent"(147382),
|
|
139
|
+
* NR="Artifact"(143265), s0="ExitPlanMode"(149770), xa="Edit"(143358), Ic="Write"(143375),
|
|
140
|
+
* NotebookEdit FR(143373). The delegation-tool entry is parameterized on the deployment's actual tool
|
|
141
|
+
* name (default = "Agent", CC-verbatim).
|
|
142
|
+
*/
|
|
143
|
+
export const BUILTIN_READONLY_DENY_TOOLS = (delegationToolName = DEFAULT_DELEGATION_TOOL_NAME) => [
|
|
144
|
+
delegationToolName,
|
|
145
|
+
"Artifact",
|
|
146
|
+
"ExitPlanMode",
|
|
147
|
+
"Edit",
|
|
148
|
+
"Write",
|
|
149
|
+
"NotebookEdit",
|
|
150
|
+
];
|
|
151
|
+
/**
|
|
152
|
+
* Build the built-in agent definitions offered by {@link import("./subagent.js").createSubagentTool}
|
|
153
|
+
* (CC `HCe` registry analog, SDK arm: Explore + Plan; general-purpose is sema's OMITTED-`subagent_type`
|
|
154
|
+
* fallback and fork lives in the `subagent_type` value domain — neither needs a definition here).
|
|
155
|
+
* A deployment definition of the same name SHADOWS a built-in (fork-shadowing precedent), and
|
|
156
|
+
* `builtinAgents: false` removes them wholesale (CC `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` form).
|
|
157
|
+
*/
|
|
158
|
+
export function builtinAgentDefinitions(delegationToolName = DEFAULT_DELEGATION_TOOL_NAME) {
|
|
159
|
+
const denyTools = BUILTIN_READONLY_DENY_TOOLS(delegationToolName);
|
|
160
|
+
return [
|
|
161
|
+
{
|
|
162
|
+
name: "Explore",
|
|
163
|
+
whenToUse: EXPLORE_WHEN_TO_USE,
|
|
164
|
+
whenToUseLean: EXPLORE_WHEN_TO_USE_LEAN,
|
|
165
|
+
denyTools,
|
|
166
|
+
systemPrompt: EXPLORE_SYSTEM_PROMPT,
|
|
167
|
+
// model omitted = inherit the caller's model (CC `model:"inherit"`; the firstParty opus upshift GAe is not ported).
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "Plan",
|
|
171
|
+
whenToUse: PLAN_WHEN_TO_USE,
|
|
172
|
+
denyTools: [...denyTools],
|
|
173
|
+
systemPrompt: PLAN_SYSTEM_PROMPT,
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=builtin-agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-agents.js","sourceRoot":"","sources":["../../src/agents/builtin-agents.ts"],"names":[],"mappings":"AAEA;4FAC4F;AAC5F,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,uEAAuE;AACvE,MAAM,CAAC,MAAM,mBAAmB,GAC9B,+lBAA+lB,CAAC;AAElmB,2EAA2E;AAC3E,MAAM,CAAC,MAAM,wBAAwB,GACnC,oZAAoZ,CAAC;AAEvZ,8FAA8F;AAC9F,MAAM,CAAC,MAAM,gBAAgB,GAC3B,oOAAoO,CAAC;AAEvO,iHAAiH;AACjH,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAgC4C,CAAC;AAElF,oGAAoG;AACpG,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iJAiD+G,CAAC;AAElJ;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,qBAA6B,4BAA4B,EAAY,EAAE,CAAC;IAClH,kBAAkB;IAClB,UAAU;IACV,cAAc;IACd,MAAM;IACN,OAAO;IACP,cAAc;CACf,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,qBAA6B,4BAA4B;IAC/F,MAAM,SAAS,GAAG,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;IAClE,OAAO;QACL;YACE,IAAI,EAAE,SAAS;YACf,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,wBAAwB;YACvC,SAAS;YACT,YAAY,EAAE,qBAAqB;YACnC,oHAAoH;SACrH;QACD;YACE,IAAI,EAAE,MAAM;YACZ,SAAS,EAAE,gBAAgB;YAC3B,SAAS,EAAE,CAAC,GAAG,SAAS,CAAC;YACzB,YAAY,EAAE,kBAAkB;SACjC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Runner } from "../core/runner/runtask.js";
|
|
2
|
+
import type { ModelRef, TaskResult, TaskSpec } from "../core/types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Quality-gate cascade (design/27). Run the SAME task across a ladder of models (cheapest → strongest);
|
|
5
|
+
* after each rung a caller-supplied **decidable gate** judges "good enough" — pass = keep it, fail =
|
|
6
|
+
* escalate to the next rung. Classic FrugalGPT cascade, as a thin function over `runner.runTask`
|
|
7
|
+
* (no Runner-core changes).
|
|
8
|
+
*
|
|
9
|
+
* APPLICABILITY: cascade only helps when the gate is **decidable** (a schema check, a verifier model, a
|
|
10
|
+
* concrete assertion). Open-ended "completeness" tasks (find every bug, writing quality) have no oracle —
|
|
11
|
+
* the gate keeps passing the first plausible cheap answer and escalation idles. Those want breadth /
|
|
12
|
+
* adversarial debate (a `team`), not a depth ladder.
|
|
13
|
+
*
|
|
14
|
+
* Cost note (design/27 §2): each rung is an independent COLD `runTask` — every escalation repays the
|
|
15
|
+
* full input cost. Cascade wins when (a) the cheap rung usually passes and (b) the prompt isn't so large
|
|
16
|
+
* that the restart tax dominates. It is NOT always cheaper than running the strongest model directly.
|
|
17
|
+
*
|
|
18
|
+
* Boundary vs teacher mode: teacher injects advice and continues the SAME session (recovery); cascade
|
|
19
|
+
* does independent re-runs on a model ladder (breadth). Orthogonal, not merged.
|
|
20
|
+
*/
|
|
21
|
+
/** A gate's verdict: a bare boolean, or `{ pass, diagnostics }` to attach reasoning to `attempts[]`. */
|
|
22
|
+
export type GateVerdict = boolean | {
|
|
23
|
+
pass: boolean;
|
|
24
|
+
diagnostics?: string;
|
|
25
|
+
};
|
|
26
|
+
export interface CascadeRung {
|
|
27
|
+
/** The model this rung runs on. */
|
|
28
|
+
model: ModelRef;
|
|
29
|
+
/** Optional per-rung overrides (default: inherit the task's). */
|
|
30
|
+
overrides?: Partial<Pick<TaskSpec, "limits" | "degrade" | "systemPrompt">>;
|
|
31
|
+
}
|
|
32
|
+
export interface CascadeConfig {
|
|
33
|
+
/** Model ladder, cheapest → strongest. ≥1 rung; the last rung is the fallback (returned even if it doesn't pass). */
|
|
34
|
+
ladder: CascadeRung[];
|
|
35
|
+
/**
|
|
36
|
+
* Quality gate: given a rung's result, return whether it is good enough (true/`{pass:true}` = keep,
|
|
37
|
+
* false = escalate). Default: `status === "completed"` — and, if `spec.outputSchema` is set, also
|
|
38
|
+
* requires a valid `structuredOutput` (so a schema auto-gives "only keep a rung that actually produced
|
|
39
|
+
* valid structured output"; a prose-only completion escalates). The gate can be a pure check (structured
|
|
40
|
+
* output / fields), a verifier model, semantic agreement, etc. **A throw is treated as "did not pass"**
|
|
41
|
+
* (fail-open to escalate) and recorded as `attempts[].gateError` — so a broken gate can't strand the run,
|
|
42
|
+
* but a verifier-gate's own failure is still visible. The gate must be decidable (see APPLICABILITY).
|
|
43
|
+
*
|
|
44
|
+
* @warning unredacted — the gate receives the UNREDACTED `TaskResult` (model output, structured output,
|
|
45
|
+
* stats); this is prose advisory, not an enforced boundary (design/54 §3.5, [46] DESIGN1). If your gate
|
|
46
|
+
* forwards output to an external service, ensure it has no sensitive data or sanitize first.
|
|
47
|
+
*/
|
|
48
|
+
gate?: (result: TaskResult, rung: {
|
|
49
|
+
index: number;
|
|
50
|
+
model: ModelRef;
|
|
51
|
+
}) => GateVerdict | Promise<GateVerdict>;
|
|
52
|
+
/** Max escalations (rungs run ≤ maxEscalations + 1). Default = `ladder.length - 1` (the whole ladder). */
|
|
53
|
+
maxEscalations?: number;
|
|
54
|
+
/** Stop escalating once cumulative cost reaches this; return the current best. Optional. */
|
|
55
|
+
costCeilingMicroUsd?: number;
|
|
56
|
+
/** Overall wall-clock ceiling for the whole cascade (per-rung time is `spec.limits.timeout`). Optional. */
|
|
57
|
+
totalTimeoutMs?: number;
|
|
58
|
+
/** Per-rung callback (observability). */
|
|
59
|
+
onRung?: (info: {
|
|
60
|
+
index: number;
|
|
61
|
+
model: ModelRef;
|
|
62
|
+
passed: boolean;
|
|
63
|
+
result: TaskResult;
|
|
64
|
+
}) => void;
|
|
65
|
+
}
|
|
66
|
+
export interface CascadeAttempt {
|
|
67
|
+
index: number;
|
|
68
|
+
model: ModelRef;
|
|
69
|
+
passed: boolean;
|
|
70
|
+
costMicroUsd: number;
|
|
71
|
+
status: TaskResult["status"];
|
|
72
|
+
/** The rung's own failure code (e.g. "auth") if its `runTask` failed — distinct from "gate rejected it". */
|
|
73
|
+
errorCode?: string;
|
|
74
|
+
/** Set when the gate THREW (vs returned false) — surfaces a broken verifier-gate (expired key, etc.). */
|
|
75
|
+
gateError?: string;
|
|
76
|
+
/** Optional reasoning the gate attached to its verdict. */
|
|
77
|
+
diagnostics?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface CascadeRunResult extends TaskResult {
|
|
80
|
+
/**
|
|
81
|
+
* The cascade's conclusion, **distinct from the inherited `status`**: `"passed"` = some rung passed the
|
|
82
|
+
* gate; `"exhausted"` = ladder/guards ran out with no rung passing (the last rung's result is returned,
|
|
83
|
+
* and its `status` may still be "completed" — judge the cascade by `cascadeOutcome`, not `status`).
|
|
84
|
+
*/
|
|
85
|
+
cascadeOutcome: "passed" | "exhausted";
|
|
86
|
+
/** True if the returned result came from a rung after the first (i.e. an escalation happened). */
|
|
87
|
+
escalated: boolean;
|
|
88
|
+
/** Which rung (0-based) produced the returned result. */
|
|
89
|
+
finalRung: number;
|
|
90
|
+
/** Per-rung audit detail (cost, pass/fail, why). Each attempt's `costMicroUsd` includes that rung's nested
|
|
91
|
+
* (delegated) cost; the top-level `stats.costMicroUsd` is the sum of the rungs' OWN cost (nested totals live
|
|
92
|
+
* in `stats.nested.costMicroUsd`), so it is NOT the plain sum of `attempts[].costMicroUsd`. */
|
|
93
|
+
attempts: CascadeAttempt[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Side-effect note: `runCascade` runs the task up to N times. If your tools have non-idempotent effects
|
|
97
|
+
* (`effect: "write"`), those execute once PER rung — ensure idempotency, or gate before the side effect
|
|
98
|
+
* (e.g. a structured-output gate). `TaskSpec` never guaranteed idempotency; cascade makes it explicit.
|
|
99
|
+
*/
|
|
100
|
+
export declare function runCascade(runner: Runner, spec: TaskSpec, config: CascadeConfig): Promise<CascadeRunResult>;
|
|
101
|
+
//# sourceMappingURL=cascade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cascade.d.ts","sourceRoot":"","sources":["../../src/agents/cascade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvE;;;;;;;;;;;;;;;;;GAiBG;AAEH,wGAAwG;AACxG,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,KAAK,EAAE,QAAQ,CAAC;IAChB,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC;CAC5E;AAED,MAAM,WAAW,aAAa;IAC5B,qHAAqH;IACrH,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,QAAQ,CAAA;KAAE,KAAK,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5G,0GAA0G;IAC1G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4FAA4F;IAC5F,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,2GAA2G;IAC3G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;CAClG;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC7B,4GAA4G;IAC5G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yGAAyG;IACzG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD;;;;OAIG;IACH,cAAc,EAAE,QAAQ,GAAG,WAAW,CAAC;IACvC,kGAAkG;IAClG,SAAS,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB;;oGAEgG;IAChG,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAeD;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,gBAAgB,CAAC,CA6K3B"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { releaseSession } from "./session-util.js";
|
|
2
|
+
import { mapNestedSuspend, isDurablePause } from "./suspend-guard.js";
|
|
3
|
+
/**
|
|
4
|
+
* Default gate: the rung must have `status === "completed"` — AND, when the task asked for structured
|
|
5
|
+
* output (`spec.outputSchema` set), it must actually have produced a valid `structuredOutput`. So a
|
|
6
|
+
* caller who sets a schema automatically gets "only keep a rung that returned valid structured output"
|
|
7
|
+
* (a cheap rung that completes with prose-only escalates instead of silently passing). Override `gate`
|
|
8
|
+
* to change this.
|
|
9
|
+
*/
|
|
10
|
+
function makeDefaultGate(spec) {
|
|
11
|
+
const requiresStructured = spec.outputSchema != null;
|
|
12
|
+
return (result) => result.status === "completed" && (!requiresStructured || result.structuredOutput !== undefined);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Side-effect note: `runCascade` runs the task up to N times. If your tools have non-idempotent effects
|
|
16
|
+
* (`effect: "write"`), those execute once PER rung — ensure idempotency, or gate before the side effect
|
|
17
|
+
* (e.g. a structured-output gate). `TaskSpec` never guaranteed idempotency; cascade makes it explicit.
|
|
18
|
+
*/
|
|
19
|
+
export async function runCascade(runner, spec, config) {
|
|
20
|
+
const ladder = config.ladder;
|
|
21
|
+
if (!ladder || ladder.length === 0) {
|
|
22
|
+
throw new Error("runCascade: config.ladder must have at least one rung");
|
|
23
|
+
}
|
|
24
|
+
const maxEscalations = config.maxEscalations ?? ladder.length - 1;
|
|
25
|
+
const maxRungs = Math.min(ladder.length, Math.max(0, maxEscalations) + 1);
|
|
26
|
+
const gate = config.gate ?? makeDefaultGate(spec);
|
|
27
|
+
const startedAt = Date.now();
|
|
28
|
+
const attempts = [];
|
|
29
|
+
let totalCost = 0; // ceiling check: OWN + nested costMicroUsd (total spend across rungs)
|
|
30
|
+
// R-5 (round-3 council): keep OWN and NESTED stats DISJOINT (teacher A-7 convention — a consumer adds
|
|
31
|
+
// `stats.X + stats.nested.X` for the true total). B-5 wrongly folded nested INTO the own totals (= double-
|
|
32
|
+
// count once `stats.nested` is also reported). Accumulate every own field separately + a nested object;
|
|
33
|
+
// recalc cacheHitRate from cumulative own prompt/cached. (Was: only tokens/turns/costMicroUsd/costUsd, and
|
|
34
|
+
// those mistakenly included nested.)
|
|
35
|
+
let ownTokens = 0, ownTurns = 0, ownPrompt = 0, ownCached = 0, ownOutput = 0, ownCostMicro = 0, ownCostUsd = 0;
|
|
36
|
+
let ownCacheWrite = 0, ownCacheWriteLong = 0; // additive across rungs (mirror teacher finalize) — else the spread leaks the last rung's value as cumulative
|
|
37
|
+
let nestedTokens = 0, nestedTurns = 0, nestedTasks = 0, nestedCostMicro = 0, nestedCostUsd = 0;
|
|
38
|
+
// costBreakdown sub-fields + humanReview accumulate across rungs too — else the cumulativeStats spread leaks
|
|
39
|
+
// the LAST rung's value, so costBreakdown stops reconciling with the cumulative costMicroUsd (R3 bug-hunt).
|
|
40
|
+
let ownLlmRootMicro = 0, ownCompactionMicro = 0;
|
|
41
|
+
let hrCount = 0, hrWaitMs = 0;
|
|
42
|
+
const hrGates = [];
|
|
43
|
+
// Build the cumulative stats object over a base (last rung's stats) — own fields cumulative, nested
|
|
44
|
+
// disjoint. Closure captures the running accumulators (read at call time, after the loop).
|
|
45
|
+
const cumulativeStats = (baseStats) => ({
|
|
46
|
+
...baseStats,
|
|
47
|
+
tokens: ownTokens,
|
|
48
|
+
turns: ownTurns,
|
|
49
|
+
promptTokens: ownPrompt || undefined,
|
|
50
|
+
totalInputTokens: ownPrompt || undefined,
|
|
51
|
+
cachedTokens: ownCached || undefined,
|
|
52
|
+
outputTokens: ownOutput || undefined,
|
|
53
|
+
cacheWriteTokens: ownCacheWrite || undefined,
|
|
54
|
+
cacheWriteTokensLong: ownCacheWriteLong || undefined,
|
|
55
|
+
cacheHitRate: ownPrompt > 0 ? ownCached / ownPrompt : undefined,
|
|
56
|
+
costMicroUsd: ownCostMicro,
|
|
57
|
+
costUsd: ownCostUsd || undefined,
|
|
58
|
+
nested: nestedTokens > 0 || nestedTasks > 0
|
|
59
|
+
? { tokens: nestedTokens, turns: nestedTurns, tasks: nestedTasks, costMicroUsd: nestedCostMicro || undefined, costUsd: nestedCostUsd || undefined }
|
|
60
|
+
: undefined,
|
|
61
|
+
// Cumulative breakdown (mirrors assemble-result's base), so `llmRoot + nestedSubagent + compaction` still
|
|
62
|
+
// reconciles to the cumulative LLM total instead of describing only the last rung.
|
|
63
|
+
costBreakdown: {
|
|
64
|
+
llmRootMicroUsd: ownLlmRootMicro,
|
|
65
|
+
nestedSubagentMicroUsd: nestedCostMicro,
|
|
66
|
+
memoryConsolidationMicroUsd: 0, // filled async after consolidation, same as assemble-result's base
|
|
67
|
+
compactionMicroUsd: ownCompactionMicro,
|
|
68
|
+
},
|
|
69
|
+
humanReview: hrCount > 0 ? { count: hrCount, totalWaitMs: hrWaitMs, gates: hrGates } : undefined,
|
|
70
|
+
});
|
|
71
|
+
let lastResult;
|
|
72
|
+
let passedRung = -1;
|
|
73
|
+
// Each rung is an independent cold re-run in its OWN session (no carry-forward in v1) — strip `sessionId`
|
|
74
|
+
// once up front rather than re-destructuring `spec` every rung.
|
|
75
|
+
const { sessionId: _drop, ...specBase } = spec;
|
|
76
|
+
for (let i = 0; i < maxRungs; i++) {
|
|
77
|
+
// Before escalating (any rung past the first), honor the cost/time ceilings.
|
|
78
|
+
if (i > 0) {
|
|
79
|
+
if (config.totalTimeoutMs != null && Date.now() - startedAt >= config.totalTimeoutMs)
|
|
80
|
+
break;
|
|
81
|
+
if (config.costCeilingMicroUsd != null && totalCost >= config.costCeilingMicroUsd)
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
const rung = ladder[i];
|
|
85
|
+
const result = await runner.runTask({ ...specBase, model: rung.model, ...(rung.overrides ?? {}) });
|
|
86
|
+
lastResult = result;
|
|
87
|
+
// rungCost (ceiling + reported attempt cost) = total spend = own + nested.
|
|
88
|
+
const s = result.stats;
|
|
89
|
+
const rungCost = (s.costMicroUsd ?? 0) + (s.nested?.costMicroUsd ?? 0);
|
|
90
|
+
totalCost += rungCost;
|
|
91
|
+
// R-5: own fields cumulative (disjoint from nested).
|
|
92
|
+
ownTokens += s.tokens;
|
|
93
|
+
ownTurns += s.turns;
|
|
94
|
+
ownPrompt += s.promptTokens ?? 0;
|
|
95
|
+
ownCached += s.cachedTokens ?? 0;
|
|
96
|
+
ownOutput += s.outputTokens ?? 0;
|
|
97
|
+
ownCacheWrite += s.cacheWriteTokens ?? 0;
|
|
98
|
+
ownCacheWriteLong += s.cacheWriteTokensLong ?? 0;
|
|
99
|
+
ownCostMicro += s.costMicroUsd ?? 0;
|
|
100
|
+
ownCostUsd += s.costUsd ?? 0;
|
|
101
|
+
if (s.costBreakdown) {
|
|
102
|
+
ownLlmRootMicro += s.costBreakdown.llmRootMicroUsd;
|
|
103
|
+
ownCompactionMicro += s.costBreakdown.compactionMicroUsd;
|
|
104
|
+
}
|
|
105
|
+
if (s.humanReview) {
|
|
106
|
+
hrCount += s.humanReview.count;
|
|
107
|
+
hrWaitMs += s.humanReview.totalWaitMs;
|
|
108
|
+
hrGates.push(...s.humanReview.gates);
|
|
109
|
+
}
|
|
110
|
+
if (s.nested) {
|
|
111
|
+
nestedTokens += s.nested.tokens;
|
|
112
|
+
nestedTurns += s.nested.turns;
|
|
113
|
+
nestedTasks += s.nested.tasks;
|
|
114
|
+
nestedCostMicro += s.nested.costMicroUsd ?? 0;
|
|
115
|
+
nestedCostUsd += s.nested.costUsd ?? 0;
|
|
116
|
+
}
|
|
117
|
+
// design/45 §11 Q6 hard boundary: a rung that suspended on a durable approval gate can't be driven
|
|
118
|
+
// from inside the cascade. Stop immediately — do NOT escalate/re-run (side effects) and do NOT
|
|
119
|
+
// release its (pinned) session (that would orphan the checkpoint). Surface it to the top-level caller
|
|
120
|
+
// with the token so they can resume. Attempts so far are reported; this rung counts as the final one.
|
|
121
|
+
if (isDurablePause(result.status)) {
|
|
122
|
+
const mapped = mapNestedSuspend(result); // design/80 D-B: covers needs_review/plan_review too, with the right code
|
|
123
|
+
attempts.push({ index: i, model: rung.model, passed: false, costMicroUsd: rungCost, status: result.status, errorCode: mapped.errorCode });
|
|
124
|
+
return {
|
|
125
|
+
...mapped,
|
|
126
|
+
stats: cumulativeStats(result.stats),
|
|
127
|
+
cascadeOutcome: "exhausted",
|
|
128
|
+
escalated: i > 0,
|
|
129
|
+
finalRung: i,
|
|
130
|
+
attempts,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
let passed = false;
|
|
134
|
+
let gateError;
|
|
135
|
+
let diagnostics;
|
|
136
|
+
try {
|
|
137
|
+
try {
|
|
138
|
+
const verdict = await gate(result, { index: i, model: rung.model });
|
|
139
|
+
if (typeof verdict === "boolean")
|
|
140
|
+
passed = verdict;
|
|
141
|
+
else {
|
|
142
|
+
passed = verdict.pass;
|
|
143
|
+
diagnostics = verdict.diagnostics;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
passed = false; // fail-open: a throwing gate escalates rather than stranding the run
|
|
148
|
+
gateError = e instanceof Error ? e.message : String(e);
|
|
149
|
+
}
|
|
150
|
+
attempts.push({
|
|
151
|
+
index: i,
|
|
152
|
+
model: rung.model,
|
|
153
|
+
passed,
|
|
154
|
+
costMicroUsd: rungCost,
|
|
155
|
+
status: result.status,
|
|
156
|
+
errorCode: result.errorCode,
|
|
157
|
+
gateError,
|
|
158
|
+
diagnostics,
|
|
159
|
+
});
|
|
160
|
+
// onRung is an observability callback — a throw from it must NOT abort the whole cascade and discard the
|
|
161
|
+
// result (fail-open, symmetric with the gate's catch above; the finally still releases the session).
|
|
162
|
+
try {
|
|
163
|
+
config.onRung?.({ index: i, model: rung.model, passed, result });
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
/* swallow: a broken observer can't strand the cascade */
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
finally {
|
|
170
|
+
await releaseSession(runner, result.sessionId); // always release, even if onRung throws
|
|
171
|
+
}
|
|
172
|
+
if (passed) {
|
|
173
|
+
passedRung = i;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const base = lastResult; // at least one rung always ran (ladder non-empty)
|
|
178
|
+
const finalRung = attempts.length - 1;
|
|
179
|
+
return {
|
|
180
|
+
...base,
|
|
181
|
+
// R-5: every field cumulative across rungs, own/nested disjoint (was: only 4 fields, nested-folded).
|
|
182
|
+
stats: cumulativeStats(base.stats),
|
|
183
|
+
cascadeOutcome: passedRung >= 0 ? "passed" : "exhausted",
|
|
184
|
+
escalated: finalRung > 0,
|
|
185
|
+
finalRung,
|
|
186
|
+
attempts,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=cascade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cascade.js","sourceRoot":"","sources":["../../src/agents/cascade.ts"],"names":[],"mappings":"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"}
|