@caupulican/pi-adaptative 0.81.38 → 0.81.40
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 +131 -0
- package/README.md +2 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/README.md +18 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts +133 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts.map +1 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js +198 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js.map +1 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.ts +311 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts +31 -2
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js +823 -79
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.ts +1043 -86
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/__init__.py +43 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/fs.py +270 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/search.py +252 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/strings.py +399 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/text.py +575 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/context.py +52 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/errors.py +49 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/exec.py +734 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/expand.py +238 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/main.py +132 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/nodes.py +116 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/parser.py +287 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/proc.py +137 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/state.py +100 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/tokens.py +579 -0
- package/dist/bundled-resources/skills/tool-call-repair/SKILL.md +19 -9
- package/dist/bundled-resources/skills/tool-call-repair/references/failure-grammar.md +22 -5
- package/dist/bundled-resources/skills/tool-call-repair/references/repair-catalogue.md +7 -7
- package/dist/bundled-resources/skills/tool-call-repair/references/text-protocol-grammar.md +28 -7
- package/dist/cli/args.d.ts +5 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +24 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-directory-layout.d.ts +15 -0
- package/dist/core/agent-directory-layout.d.ts.map +1 -0
- package/dist/core/agent-directory-layout.js +72 -0
- package/dist/core/agent-directory-layout.js.map +1 -0
- package/dist/core/agent-paths.d.ts +66 -0
- package/dist/core/agent-paths.d.ts.map +1 -0
- package/dist/core/agent-paths.js +170 -0
- package/dist/core/agent-paths.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +52 -8
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +397 -79
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +4 -3
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +255 -103
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +754 -1173
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/autonomy/approval-gate.d.ts +3 -2
- package/dist/core/autonomy/approval-gate.d.ts.map +1 -1
- package/dist/core/autonomy/approval-gate.js +6 -28
- package/dist/core/autonomy/approval-gate.js.map +1 -1
- package/dist/core/autonomy/bounded-completion.d.ts +1 -1
- package/dist/core/autonomy/bounded-completion.d.ts.map +1 -1
- package/dist/core/autonomy/bounded-completion.js +1 -1
- package/dist/core/autonomy/bounded-completion.js.map +1 -1
- package/dist/core/autonomy/contracts.d.ts +26 -9
- package/dist/core/autonomy/contracts.d.ts.map +1 -1
- package/dist/core/autonomy/contracts.js.map +1 -1
- package/dist/core/autonomy/foreground-envelope.d.ts +8 -2
- package/dist/core/autonomy/foreground-envelope.d.ts.map +1 -1
- package/dist/core/autonomy/foreground-envelope.js +8 -25
- package/dist/core/autonomy/foreground-envelope.js.map +1 -1
- package/dist/core/autonomy/gates.d.ts.map +1 -1
- package/dist/core/autonomy/gates.js +8 -10
- package/dist/core/autonomy/gates.js.map +1 -1
- package/dist/core/autonomy/lane-private-paths.d.ts +2 -0
- package/dist/core/autonomy/lane-private-paths.d.ts.map +1 -0
- package/dist/core/autonomy/lane-private-paths.js +16 -0
- package/dist/core/autonomy/lane-private-paths.js.map +1 -0
- package/dist/core/autonomy/lane-tool-surface.d.ts +10 -0
- package/dist/core/autonomy/lane-tool-surface.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.js +46 -8
- package/dist/core/autonomy/lane-tool-surface.js.map +1 -1
- package/dist/core/autonomy/lane-tracker.d.ts +24 -1
- package/dist/core/autonomy/lane-tracker.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tracker.js +43 -1
- package/dist/core/autonomy/lane-tracker.js.map +1 -1
- package/dist/core/autonomy/risk-assessment.d.ts +1 -2
- package/dist/core/autonomy/risk-assessment.d.ts.map +1 -1
- package/dist/core/autonomy/risk-assessment.js +1 -123
- package/dist/core/autonomy/risk-assessment.js.map +1 -1
- package/dist/core/autonomy/session-lane-record.d.ts +4 -4
- package/dist/core/autonomy/session-lane-record.d.ts.map +1 -1
- package/dist/core/autonomy/session-lane-record.js +16 -29
- package/dist/core/autonomy/session-lane-record.js.map +1 -1
- package/dist/core/autonomy/telemetry-events.d.ts +1 -1
- package/dist/core/autonomy/telemetry-events.d.ts.map +1 -1
- package/dist/core/autonomy/telemetry-events.js +1 -1
- package/dist/core/autonomy/telemetry-events.js.map +1 -1
- package/dist/core/autonomy-telemetry.d.ts +7 -7
- package/dist/core/autonomy-telemetry.d.ts.map +1 -1
- package/dist/core/autonomy-telemetry.js +9 -9
- package/dist/core/autonomy-telemetry.js.map +1 -1
- package/dist/core/background-lane-controller.d.ts +90 -156
- package/dist/core/background-lane-controller.d.ts.map +1 -1
- package/dist/core/background-lane-controller.js +192 -968
- package/dist/core/background-lane-controller.js.map +1 -1
- package/dist/core/bash-execution-controller.d.ts +4 -0
- package/dist/core/bash-execution-controller.d.ts.map +1 -1
- package/dist/core/bash-execution-controller.js +7 -1
- package/dist/core/bash-execution-controller.js.map +1 -1
- package/dist/core/capability-contract.d.ts +4 -0
- package/dist/core/capability-contract.d.ts.map +1 -0
- package/dist/core/capability-contract.js +28 -0
- package/dist/core/capability-contract.js.map +1 -0
- package/dist/core/compaction-controller.d.ts +90 -0
- package/dist/core/compaction-controller.d.ts.map +1 -0
- package/dist/core/compaction-controller.js +452 -0
- package/dist/core/compaction-controller.js.map +1 -0
- package/dist/core/compaction-support.d.ts +24 -13
- package/dist/core/compaction-support.d.ts.map +1 -1
- package/dist/core/compaction-support.js +43 -7
- package/dist/core/compaction-support.js.map +1 -1
- package/dist/core/context/context-artifacts.d.ts +6 -2
- package/dist/core/context/context-artifacts.d.ts.map +1 -1
- package/dist/core/context/context-artifacts.js +34 -2
- package/dist/core/context/context-artifacts.js.map +1 -1
- package/dist/core/context/context-audit.d.ts +33 -1
- package/dist/core/context/context-audit.d.ts.map +1 -1
- package/dist/core/context/context-audit.js +31 -5
- package/dist/core/context/context-audit.js.map +1 -1
- package/dist/core/context/context-store-retention.d.ts +8 -2
- package/dist/core/context/context-store-retention.d.ts.map +1 -1
- package/dist/core/context/context-store-retention.js +158 -35
- package/dist/core/context/context-store-retention.js.map +1 -1
- package/dist/core/context/okf-memory.d.ts.map +1 -1
- package/dist/core/context/okf-memory.js +9 -11
- package/dist/core/context/okf-memory.js.map +1 -1
- package/dist/core/context/sqlite-runtime-index.d.ts.map +1 -1
- package/dist/core/context/sqlite-runtime-index.js +6 -8
- package/dist/core/context/sqlite-runtime-index.js.map +1 -1
- package/dist/core/context-gc.d.ts +3 -0
- package/dist/core/context-gc.d.ts.map +1 -1
- package/dist/core/context-gc.js +26 -6
- package/dist/core/context-gc.js.map +1 -1
- package/dist/core/context-pipeline.d.ts +26 -4
- package/dist/core/context-pipeline.d.ts.map +1 -1
- package/dist/core/context-pipeline.js +146 -18
- package/dist/core/context-pipeline.js.map +1 -1
- package/dist/core/cost-guard.d.ts +19 -3
- package/dist/core/cost-guard.d.ts.map +1 -1
- package/dist/core/cost-guard.js +18 -3
- package/dist/core/cost-guard.js.map +1 -1
- package/dist/core/default-tool-surface.d.ts.map +1 -1
- package/dist/core/default-tool-surface.js +1 -0
- package/dist/core/default-tool-surface.js.map +1 -1
- package/dist/core/delegation/managed-lane-controller.d.ts +34 -0
- package/dist/core/delegation/managed-lane-controller.d.ts.map +1 -0
- package/dist/core/delegation/managed-lane-controller.js +217 -0
- package/dist/core/delegation/managed-lane-controller.js.map +1 -0
- package/dist/core/delegation/session-worker-claim.d.ts +44 -0
- package/dist/core/delegation/session-worker-claim.d.ts.map +1 -0
- package/dist/core/delegation/session-worker-claim.js +98 -0
- package/dist/core/delegation/session-worker-claim.js.map +1 -0
- package/dist/core/delegation/worker-actions.d.ts +7 -5
- package/dist/core/delegation/worker-actions.d.ts.map +1 -1
- package/dist/core/delegation/worker-actions.js +20 -4
- package/dist/core/delegation/worker-actions.js.map +1 -1
- package/dist/core/delegation/worker-claim.d.ts +56 -0
- package/dist/core/delegation/worker-claim.d.ts.map +1 -0
- package/dist/core/delegation/worker-claim.js +239 -0
- package/dist/core/delegation/worker-claim.js.map +1 -0
- package/dist/core/delegation/worker-delegation-controller.d.ts +110 -0
- package/dist/core/delegation/worker-delegation-controller.d.ts.map +1 -0
- package/dist/core/delegation/worker-delegation-controller.js +861 -0
- package/dist/core/delegation/worker-delegation-controller.js.map +1 -0
- package/dist/core/delegation/worker-delegation-request.d.ts +11 -0
- package/dist/core/delegation/worker-delegation-request.d.ts.map +1 -0
- package/dist/core/delegation/worker-delegation-request.js +2 -0
- package/dist/core/delegation/worker-delegation-request.js.map +1 -0
- package/dist/core/delegation/worker-dispatch-scheduler.d.ts +40 -0
- package/dist/core/delegation/worker-dispatch-scheduler.d.ts.map +1 -0
- package/dist/core/delegation/worker-dispatch-scheduler.js +93 -0
- package/dist/core/delegation/worker-dispatch-scheduler.js.map +1 -0
- package/dist/core/delegation/worker-execution-policy.d.ts +62 -0
- package/dist/core/delegation/worker-execution-policy.d.ts.map +1 -0
- package/dist/core/delegation/worker-execution-policy.js +160 -0
- package/dist/core/delegation/worker-execution-policy.js.map +1 -0
- package/dist/core/delegation/worker-lane-projection.d.ts +14 -0
- package/dist/core/delegation/worker-lane-projection.d.ts.map +1 -0
- package/dist/core/delegation/worker-lane-projection.js +100 -0
- package/dist/core/delegation/worker-lane-projection.js.map +1 -0
- package/dist/core/delegation/worker-lifecycle.d.ts +97 -0
- package/dist/core/delegation/worker-lifecycle.d.ts.map +1 -0
- package/dist/core/delegation/worker-lifecycle.js +339 -0
- package/dist/core/delegation/worker-lifecycle.js.map +1 -0
- package/dist/core/delegation/worker-notification-coordinator.d.ts +36 -0
- package/dist/core/delegation/worker-notification-coordinator.d.ts.map +1 -0
- package/dist/core/delegation/worker-notification-coordinator.js +90 -0
- package/dist/core/delegation/worker-notification-coordinator.js.map +1 -0
- package/dist/core/delegation/worker-profile-resolver.d.ts +55 -0
- package/dist/core/delegation/worker-profile-resolver.d.ts.map +1 -0
- package/dist/core/delegation/worker-profile-resolver.js +113 -0
- package/dist/core/delegation/worker-profile-resolver.js.map +1 -0
- package/dist/core/delegation/worker-runner.d.ts +25 -14
- package/dist/core/delegation/worker-runner.d.ts.map +1 -1
- package/dist/core/delegation/worker-runner.js +122 -53
- package/dist/core/delegation/worker-runner.js.map +1 -1
- package/dist/core/delegation/worker-task-label.d.ts +3 -0
- package/dist/core/delegation/worker-task-label.d.ts.map +1 -0
- package/dist/core/delegation/worker-task-label.js +11 -0
- package/dist/core/delegation/worker-task-label.js.map +1 -0
- package/dist/core/doctor.d.ts +8 -0
- package/dist/core/doctor.d.ts.map +1 -1
- package/dist/core/doctor.js +32 -1
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +5 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +68 -13
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +7 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/storage.d.ts +8 -0
- package/dist/core/extensions/storage.d.ts.map +1 -0
- package/dist/core/extensions/storage.js +28 -0
- package/dist/core/extensions/storage.js.map +1 -0
- package/dist/core/extensions/types.d.ts +101 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/failure-corpus.d.ts +1 -15
- package/dist/core/failure-corpus.d.ts.map +1 -1
- package/dist/core/failure-corpus.js +9 -37
- package/dist/core/failure-corpus.js.map +1 -1
- package/dist/core/foreground-recovery-controller.d.ts +52 -0
- package/dist/core/foreground-recovery-controller.d.ts.map +1 -0
- package/dist/core/foreground-recovery-controller.js +111 -0
- package/dist/core/foreground-recovery-controller.js.map +1 -0
- package/dist/core/gateways/channel-provider.d.ts +3 -0
- package/dist/core/gateways/channel-provider.d.ts.map +1 -1
- package/dist/core/gateways/channel-provider.js +31 -6
- package/dist/core/gateways/channel-provider.js.map +1 -1
- package/dist/core/goal-loop-controller.d.ts +17 -1
- package/dist/core/goal-loop-controller.d.ts.map +1 -1
- package/dist/core/goal-loop-controller.js +79 -11
- package/dist/core/goal-loop-controller.js.map +1 -1
- package/dist/core/goals/goal-acceptance.d.ts +11 -0
- package/dist/core/goals/goal-acceptance.d.ts.map +1 -0
- package/dist/core/goals/goal-acceptance.js +25 -0
- package/dist/core/goals/goal-acceptance.js.map +1 -0
- package/dist/core/goals/goal-auto-continue-controller.d.ts +27 -0
- package/dist/core/goals/goal-auto-continue-controller.d.ts.map +1 -0
- package/dist/core/goals/goal-auto-continue-controller.js +93 -0
- package/dist/core/goals/goal-auto-continue-controller.js.map +1 -0
- package/dist/core/goals/goal-continuation-controller.d.ts +48 -2
- package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-controller.js +87 -0
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.d.ts +39 -0
- package/dist/core/goals/goal-continuation-defaults.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.js +42 -0
- package/dist/core/goals/goal-continuation-defaults.js.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts +5 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.js +56 -15
- package/dist/core/goals/goal-continuation-prompt.js.map +1 -1
- package/dist/core/goals/goal-lifecycle.d.ts +20 -0
- package/dist/core/goals/goal-lifecycle.d.ts.map +1 -0
- package/dist/core/goals/goal-lifecycle.js +17 -0
- package/dist/core/goals/goal-lifecycle.js.map +1 -0
- package/dist/core/goals/goal-runtime-snapshot.d.ts +105 -4
- package/dist/core/goals/goal-runtime-snapshot.d.ts.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.js +91 -6
- package/dist/core/goals/goal-runtime-snapshot.js.map +1 -1
- package/dist/core/goals/goal-state.d.ts +90 -1
- package/dist/core/goals/goal-state.d.ts.map +1 -1
- package/dist/core/goals/goal-state.js +78 -15
- package/dist/core/goals/goal-state.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts +58 -2
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js +82 -6
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/goals/session-goal-state.d.ts +13 -6
- package/dist/core/goals/session-goal-state.d.ts.map +1 -1
- package/dist/core/goals/session-goal-state.js +20 -28
- package/dist/core/goals/session-goal-state.js.map +1 -1
- package/dist/core/human-input.d.ts +100 -0
- package/dist/core/human-input.d.ts.map +1 -0
- package/dist/core/human-input.js +362 -0
- package/dist/core/human-input.js.map +1 -0
- package/dist/core/index.d.ts +9 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +9 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/{telemetry.d.ts → install-telemetry.d.ts} +1 -1
- package/dist/core/install-telemetry.d.ts.map +1 -0
- package/dist/core/{telemetry.js → install-telemetry.js} +1 -1
- package/dist/core/install-telemetry.js.map +1 -0
- package/dist/core/keybindings.d.ts +27 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +34 -8
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/learning/learning-audit.d.ts +2 -4
- package/dist/core/learning/learning-audit.d.ts.map +1 -1
- package/dist/core/learning/learning-audit.js +9 -29
- package/dist/core/learning/learning-audit.js.map +1 -1
- package/dist/core/learning/learning-gate.d.ts.map +1 -1
- package/dist/core/learning/learning-gate.js +1 -6
- package/dist/core/learning/learning-gate.js.map +1 -1
- package/dist/core/learning/observation-store.d.ts +12 -3
- package/dist/core/learning/observation-store.d.ts.map +1 -1
- package/dist/core/learning/observation-store.js +30 -15
- package/dist/core/learning/observation-store.js.map +1 -1
- package/dist/core/learning/session-learning-decision.d.ts +2 -4
- package/dist/core/learning/session-learning-decision.d.ts.map +1 -1
- package/dist/core/learning/session-learning-decision.js +9 -29
- package/dist/core/learning/session-learning-decision.js.map +1 -1
- package/dist/core/learning/skill-curator.d.ts +5 -1
- package/dist/core/learning/skill-curator.d.ts.map +1 -1
- package/dist/core/learning/skill-curator.js +21 -19
- package/dist/core/learning/skill-curator.js.map +1 -1
- package/dist/core/local-runtime-controller.d.ts +65 -3
- package/dist/core/local-runtime-controller.d.ts.map +1 -1
- package/dist/core/local-runtime-controller.js +186 -26
- package/dist/core/local-runtime-controller.js.map +1 -1
- package/dist/core/memory/providers/file-store.d.ts +1 -1
- package/dist/core/memory/providers/file-store.d.ts.map +1 -1
- package/dist/core/memory/providers/file-store.js +6 -6
- package/dist/core/memory/providers/file-store.js.map +1 -1
- package/dist/core/memory-controller.d.ts.map +1 -1
- package/dist/core/memory-controller.js +4 -4
- package/dist/core/memory-controller.js.map +1 -1
- package/dist/core/model-capability.d.ts +34 -0
- package/dist/core/model-capability.d.ts.map +1 -1
- package/dist/core/model-capability.js +43 -1
- package/dist/core/model-capability.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +6 -9
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-router/intent-classifier.d.ts +1 -4
- package/dist/core/model-router/intent-classifier.d.ts.map +1 -1
- package/dist/core/model-router/intent-classifier.js +1 -156
- package/dist/core/model-router/intent-classifier.js.map +1 -1
- package/dist/core/model-router/tool-escalation.d.ts +15 -0
- package/dist/core/model-router/tool-escalation.d.ts.map +1 -1
- package/dist/core/model-router/tool-escalation.js +23 -1
- package/dist/core/model-router/tool-escalation.js.map +1 -1
- package/dist/core/model-router-controller.d.ts +34 -7
- package/dist/core/model-router-controller.d.ts.map +1 -1
- package/dist/core/model-router-controller.js +95 -16
- package/dist/core/model-router-controller.js.map +1 -1
- package/dist/core/model-selection-controller.d.ts +4 -4
- package/dist/core/model-selection-controller.d.ts.map +1 -1
- package/dist/core/model-selection-controller.js.map +1 -1
- package/dist/core/model-tool-protocol.d.ts +23 -0
- package/dist/core/model-tool-protocol.d.ts.map +1 -0
- package/dist/core/model-tool-protocol.js +43 -0
- package/dist/core/model-tool-protocol.js.map +1 -0
- package/dist/core/models/adaptation-store.d.ts +10 -5
- package/dist/core/models/adaptation-store.d.ts.map +1 -1
- package/dist/core/models/adaptation-store.js +129 -81
- package/dist/core/models/adaptation-store.js.map +1 -1
- package/dist/core/models/default-model-suggestions.d.ts.map +1 -1
- package/dist/core/models/default-model-suggestions.js +17 -0
- package/dist/core/models/default-model-suggestions.js.map +1 -1
- package/dist/core/models/fitness-store.d.ts +4 -11
- package/dist/core/models/fitness-store.d.ts.map +1 -1
- package/dist/core/models/fitness-store.js +87 -51
- package/dist/core/models/fitness-store.js.map +1 -1
- package/dist/core/models/host-state-store.d.ts +34 -0
- package/dist/core/models/host-state-store.d.ts.map +1 -0
- package/dist/core/models/host-state-store.js +86 -0
- package/dist/core/models/host-state-store.js.map +1 -0
- package/dist/core/models/llamacpp-runtime.d.ts +180 -0
- package/dist/core/models/llamacpp-runtime.d.ts.map +1 -0
- package/dist/core/models/llamacpp-runtime.js +475 -0
- package/dist/core/models/llamacpp-runtime.js.map +1 -0
- package/dist/core/models/local-registration.d.ts +40 -0
- package/dist/core/models/local-registration.d.ts.map +1 -1
- package/dist/core/models/local-registration.js +94 -5
- package/dist/core/models/local-registration.js.map +1 -1
- package/dist/core/models/local-runtime.d.ts.map +1 -1
- package/dist/core/models/local-runtime.js +6 -5
- package/dist/core/models/local-runtime.js.map +1 -1
- package/dist/core/models/model-ref.d.ts +7 -0
- package/dist/core/models/model-ref.d.ts.map +1 -1
- package/dist/core/models/model-ref.js +26 -0
- package/dist/core/models/model-ref.js.map +1 -1
- package/dist/core/models/needle-runtime.d.ts +257 -0
- package/dist/core/models/needle-runtime.d.ts.map +1 -0
- package/dist/core/models/needle-runtime.js +519 -0
- package/dist/core/models/needle-runtime.js.map +1 -0
- package/dist/core/models/prism-llamacpp-lifecycle.d.ts +89 -0
- package/dist/core/models/prism-llamacpp-lifecycle.d.ts.map +1 -0
- package/dist/core/models/prism-llamacpp-lifecycle.js +121 -0
- package/dist/core/models/prism-llamacpp-lifecycle.js.map +1 -0
- package/dist/core/orchestration/agent-resume.d.ts +24 -0
- package/dist/core/orchestration/agent-resume.d.ts.map +1 -0
- package/dist/core/orchestration/agent-resume.js +90 -0
- package/dist/core/orchestration/agent-resume.js.map +1 -0
- package/dist/core/orchestration/capability-gateway.d.ts +61 -0
- package/dist/core/orchestration/capability-gateway.d.ts.map +1 -0
- package/dist/core/orchestration/capability-gateway.js +152 -0
- package/dist/core/orchestration/capability-gateway.js.map +1 -0
- package/dist/core/orchestration/contracts.d.ts +343 -0
- package/dist/core/orchestration/contracts.d.ts.map +1 -0
- package/dist/core/orchestration/contracts.js +135 -0
- package/dist/core/orchestration/contracts.js.map +1 -0
- package/dist/core/orchestration/delegation-ledger.d.ts +56 -0
- package/dist/core/orchestration/delegation-ledger.d.ts.map +1 -0
- package/dist/core/orchestration/delegation-ledger.js +197 -0
- package/dist/core/orchestration/delegation-ledger.js.map +1 -0
- package/dist/core/orchestration/event-store.d.ts +83 -0
- package/dist/core/orchestration/event-store.d.ts.map +1 -0
- package/dist/core/orchestration/event-store.js +560 -0
- package/dist/core/orchestration/event-store.js.map +1 -0
- package/dist/core/orchestration/lane-tool-manifests.d.ts +9 -0
- package/dist/core/orchestration/lane-tool-manifests.d.ts.map +1 -0
- package/dist/core/orchestration/lane-tool-manifests.js +37 -0
- package/dist/core/orchestration/lane-tool-manifests.js.map +1 -0
- package/dist/core/orchestration/model-binding.d.ts +15 -0
- package/dist/core/orchestration/model-binding.d.ts.map +1 -0
- package/dist/core/orchestration/model-binding.js +29 -0
- package/dist/core/orchestration/model-binding.js.map +1 -0
- package/dist/core/orchestration/policy-compiler.d.ts +49 -0
- package/dist/core/orchestration/policy-compiler.d.ts.map +1 -0
- package/dist/core/orchestration/policy-compiler.js +191 -0
- package/dist/core/orchestration/policy-compiler.js.map +1 -0
- package/dist/core/orchestration/policy-gate.d.ts +18 -0
- package/dist/core/orchestration/policy-gate.d.ts.map +1 -0
- package/dist/core/orchestration/policy-gate.js +24 -0
- package/dist/core/orchestration/policy-gate.js.map +1 -0
- package/dist/core/orchestration/profile-registry.d.ts +51 -0
- package/dist/core/orchestration/profile-registry.d.ts.map +1 -0
- package/dist/core/orchestration/profile-registry.js +393 -0
- package/dist/core/orchestration/profile-registry.js.map +1 -0
- package/dist/core/orchestration/profile-store.d.ts +31 -0
- package/dist/core/orchestration/profile-store.d.ts.map +1 -0
- package/dist/core/orchestration/profile-store.js +136 -0
- package/dist/core/orchestration/profile-store.js.map +1 -0
- package/dist/core/orchestration/risk-budget.d.ts +9 -0
- package/dist/core/orchestration/risk-budget.d.ts.map +1 -0
- package/dist/core/orchestration/risk-budget.js +48 -0
- package/dist/core/orchestration/risk-budget.js.map +1 -0
- package/dist/core/orchestration/task-runtime.d.ts +168 -0
- package/dist/core/orchestration/task-runtime.d.ts.map +1 -0
- package/dist/core/orchestration/task-runtime.js +1600 -0
- package/dist/core/orchestration/task-runtime.js.map +1 -0
- package/dist/core/orchestration/work-state-projection.d.ts +32 -0
- package/dist/core/orchestration/work-state-projection.d.ts.map +1 -0
- package/dist/core/orchestration/work-state-projection.js +116 -0
- package/dist/core/orchestration/work-state-projection.js.map +1 -0
- package/dist/core/orchestration/worker-execution-contract.d.ts +21 -0
- package/dist/core/orchestration/worker-execution-contract.d.ts.map +1 -0
- package/dist/core/orchestration/worker-execution-contract.js +179 -0
- package/dist/core/orchestration/worker-execution-contract.js.map +1 -0
- package/dist/core/orchestration/worker-result-adapter.d.ts +21 -0
- package/dist/core/orchestration/worker-result-adapter.d.ts.map +1 -0
- package/dist/core/orchestration/worker-result-adapter.js +109 -0
- package/dist/core/orchestration/worker-result-adapter.js.map +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +11 -10
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/process-identity.d.ts +11 -0
- package/dist/core/process-identity.d.ts.map +1 -0
- package/dist/core/process-identity.js +26 -0
- package/dist/core/process-identity.js.map +1 -0
- package/dist/core/process-matrix/codes.d.ts +83 -0
- package/dist/core/process-matrix/codes.d.ts.map +1 -0
- package/dist/core/process-matrix/codes.js +15 -0
- package/dist/core/process-matrix/codes.js.map +1 -0
- package/dist/core/process-matrix/resume-launcher.d.ts +26 -0
- package/dist/core/process-matrix/resume-launcher.d.ts.map +1 -0
- package/dist/core/process-matrix/resume-launcher.js +62 -0
- package/dist/core/process-matrix/resume-launcher.js.map +1 -0
- package/dist/core/process-matrix/runtime.d.ts +78 -0
- package/dist/core/process-matrix/runtime.d.ts.map +1 -0
- package/dist/core/process-matrix/runtime.js +633 -0
- package/dist/core/process-matrix/runtime.js.map +1 -0
- package/dist/core/process-matrix/store.d.ts +25 -0
- package/dist/core/process-matrix/store.d.ts.map +1 -0
- package/dist/core/process-matrix/store.js +189 -0
- package/dist/core/process-matrix/store.js.map +1 -0
- package/dist/core/process-matrix/supervisor.d.ts +75 -0
- package/dist/core/process-matrix/supervisor.d.ts.map +1 -0
- package/dist/core/process-matrix/supervisor.js +161 -0
- package/dist/core/process-matrix/supervisor.js.map +1 -0
- package/dist/core/profile-registry.d.ts +7 -0
- package/dist/core/profile-registry.d.ts.map +1 -1
- package/dist/core/profile-registry.js +25 -7
- package/dist/core/profile-registry.js.map +1 -1
- package/dist/core/python-runtime.d.ts.map +1 -1
- package/dist/core/python-runtime.js +3 -3
- package/dist/core/python-runtime.js.map +1 -1
- package/dist/core/reflection-controller.d.ts +33 -9
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +217 -127
- package/dist/core/reflection-controller.js.map +1 -1
- package/dist/core/reload-blockers.d.ts +36 -0
- package/dist/core/reload-blockers.d.ts.map +1 -1
- package/dist/core/reload-blockers.js +50 -8
- package/dist/core/reload-blockers.js.map +1 -1
- package/dist/core/research/evidence-bundle.d.ts.map +1 -1
- package/dist/core/research/evidence-bundle.js +1 -6
- package/dist/core/research/evidence-bundle.js.map +1 -1
- package/dist/core/research/lane-model-resolver.d.ts +33 -0
- package/dist/core/research/lane-model-resolver.d.ts.map +1 -0
- package/dist/core/research/lane-model-resolver.js +65 -0
- package/dist/core/research/lane-model-resolver.js.map +1 -0
- package/dist/core/research/model-fitness-controller.d.ts +38 -0
- package/dist/core/research/model-fitness-controller.d.ts.map +1 -0
- package/dist/core/research/model-fitness-controller.js +106 -0
- package/dist/core/research/model-fitness-controller.js.map +1 -0
- package/dist/core/research/model-fitness.d.ts +1 -1
- package/dist/core/research/model-fitness.d.ts.map +1 -1
- package/dist/core/research/model-fitness.js +4 -4
- package/dist/core/research/model-fitness.js.map +1 -1
- package/dist/core/research/research-gate.d.ts.map +1 -1
- package/dist/core/research/research-gate.js +7 -7
- package/dist/core/research/research-gate.js.map +1 -1
- package/dist/core/research/research-lane-controller.d.ts +62 -0
- package/dist/core/research/research-lane-controller.d.ts.map +1 -0
- package/dist/core/research/research-lane-controller.js +292 -0
- package/dist/core/research/research-lane-controller.js.map +1 -0
- package/dist/core/research/session-evidence-bundle.d.ts +2 -4
- package/dist/core/research/session-evidence-bundle.d.ts.map +1 -1
- package/dist/core/research/session-evidence-bundle.js +10 -46
- package/dist/core/research/session-evidence-bundle.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +15 -9
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/risk-classifier.d.ts +6 -0
- package/dist/core/risk-classifier.d.ts.map +1 -0
- package/dist/core/risk-classifier.js +225 -0
- package/dist/core/risk-classifier.js.map +1 -0
- package/dist/core/runtime-builder.d.ts +76 -17
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +367 -124
- package/dist/core/runtime-builder.js.map +1 -1
- package/dist/core/scout-controller.d.ts +6 -0
- package/dist/core/scout-controller.d.ts.map +1 -1
- package/dist/core/scout-controller.js +66 -52
- package/dist/core/scout-controller.js.map +1 -1
- package/dist/core/sdk.d.ts +6 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +64 -27
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-analytics.d.ts.map +1 -1
- package/dist/core/session-analytics.js +28 -1
- package/dist/core/session-analytics.js.map +1 -1
- package/dist/core/session-image-store.d.ts +33 -0
- package/dist/core/session-image-store.d.ts.map +1 -0
- package/dist/core/session-image-store.js +283 -0
- package/dist/core/session-image-store.js.map +1 -0
- package/dist/core/session-role.d.ts +33 -0
- package/dist/core/session-role.d.ts.map +1 -0
- package/dist/core/session-role.js +58 -0
- package/dist/core/session-role.js.map +1 -0
- package/dist/core/session-snapshot.d.ts +34 -0
- package/dist/core/session-snapshot.d.ts.map +1 -0
- package/dist/core/session-snapshot.js +68 -0
- package/dist/core/session-snapshot.js.map +1 -0
- package/dist/core/session-supervision-runtime.d.ts +31 -0
- package/dist/core/session-supervision-runtime.d.ts.map +1 -0
- package/dist/core/session-supervision-runtime.js +97 -0
- package/dist/core/session-supervision-runtime.js.map +1 -0
- package/dist/core/settings-manager.d.ts +51 -7
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +168 -82
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt-builder.d.ts +12 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.js +6 -0
- package/dist/core/system-prompt-builder.js.map +1 -1
- package/dist/core/system-prompt.d.ts +14 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +20 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tasks/session-task-state.d.ts +13 -6
- package/dist/core/tasks/session-task-state.d.ts.map +1 -1
- package/dist/core/tasks/session-task-state.js +20 -22
- package/dist/core/tasks/session-task-state.js.map +1 -1
- package/dist/core/tasks/task-contract-monitor.d.ts +45 -0
- package/dist/core/tasks/task-contract-monitor.d.ts.map +1 -0
- package/dist/core/tasks/task-contract-monitor.js +56 -0
- package/dist/core/tasks/task-contract-monitor.js.map +1 -0
- package/dist/core/tasks/task-projection.d.ts +20 -0
- package/dist/core/tasks/task-projection.d.ts.map +1 -0
- package/dist/core/tasks/task-projection.js +47 -0
- package/dist/core/tasks/task-projection.js.map +1 -0
- package/dist/core/tasks/task-state.d.ts +12 -0
- package/dist/core/tasks/task-state.d.ts.map +1 -1
- package/dist/core/tasks/task-state.js +56 -12
- package/dist/core/tasks/task-state.js.map +1 -1
- package/dist/core/tool-capability-policy.d.ts +13 -0
- package/dist/core/tool-capability-policy.d.ts.map +1 -0
- package/dist/core/tool-capability-policy.js +85 -0
- package/dist/core/tool-capability-policy.js.map +1 -0
- package/dist/core/tool-gate-controller.d.ts.map +1 -1
- package/dist/core/tool-gate-controller.js +5 -0
- package/dist/core/tool-gate-controller.js.map +1 -1
- package/dist/core/tool-protocol-controller.d.ts +91 -0
- package/dist/core/tool-protocol-controller.d.ts.map +1 -0
- package/dist/core/tool-protocol-controller.js +512 -0
- package/dist/core/tool-protocol-controller.js.map +1 -0
- package/dist/core/tool-recovery-log-records.d.ts +6 -0
- package/dist/core/tool-recovery-log-records.d.ts.map +1 -1
- package/dist/core/tool-recovery-log-records.js +13 -31
- package/dist/core/tool-recovery-log-records.js.map +1 -1
- package/dist/core/tool-selection/promotion.d.ts +54 -0
- package/dist/core/tool-selection/promotion.d.ts.map +1 -0
- package/dist/core/tool-selection/promotion.js +81 -0
- package/dist/core/tool-selection/promotion.js.map +1 -0
- package/dist/core/tool-selection/tool-performance-store.d.ts +39 -6
- package/dist/core/tool-selection/tool-performance-store.d.ts.map +1 -1
- package/dist/core/tool-selection/tool-performance-store.js +153 -110
- package/dist/core/tool-selection/tool-performance-store.js.map +1 -1
- package/dist/core/tool-selection/tool-selection-controller.d.ts +45 -0
- package/dist/core/tool-selection/tool-selection-controller.d.ts.map +1 -1
- package/dist/core/tool-selection/tool-selection-controller.js +96 -0
- package/dist/core/tool-selection/tool-selection-controller.js.map +1 -1
- package/dist/core/tools/ask-question.d.ts +124 -0
- package/dist/core/tools/ask-question.d.ts.map +1 -0
- package/dist/core/tools/ask-question.js +693 -0
- package/dist/core/tools/ask-question.js.map +1 -0
- package/dist/core/tools/bash.d.ts +18 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +95 -16
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/delegate-status.d.ts +44 -2
- package/dist/core/tools/delegate-status.d.ts.map +1 -1
- package/dist/core/tools/delegate-status.js +214 -19
- package/dist/core/tools/delegate-status.js.map +1 -1
- package/dist/core/tools/delegate.d.ts +15 -13
- package/dist/core/tools/delegate.d.ts.map +1 -1
- package/dist/core/tools/delegate.js +124 -22
- package/dist/core/tools/delegate.js.map +1 -1
- package/dist/core/tools/extensionify.d.ts.map +1 -1
- package/dist/core/tools/extensionify.js +1 -0
- package/dist/core/tools/extensionify.js.map +1 -1
- package/dist/core/tools/goal.d.ts +94 -3
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +165 -15
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/model-fitness.d.ts +7 -0
- package/dist/core/tools/model-fitness.d.ts.map +1 -1
- package/dist/core/tools/model-fitness.js +4 -4
- package/dist/core/tools/model-fitness.js.map +1 -1
- package/dist/core/tools/orchestration-panel.d.ts +43 -0
- package/dist/core/tools/orchestration-panel.d.ts.map +1 -0
- package/dist/core/tools/orchestration-panel.js +168 -0
- package/dist/core/tools/orchestration-panel.js.map +1 -0
- package/dist/core/tools/run-process.d.ts +26 -0
- package/dist/core/tools/run-process.d.ts.map +1 -0
- package/dist/core/tools/run-process.js +138 -0
- package/dist/core/tools/run-process.js.map +1 -0
- package/dist/core/tools/shell-contract-router.d.ts +6 -1
- package/dist/core/tools/shell-contract-router.d.ts.map +1 -1
- package/dist/core/tools/shell-contract-router.js +23 -2
- package/dist/core/tools/shell-contract-router.js.map +1 -1
- package/dist/core/tools/shell-session.d.ts +89 -0
- package/dist/core/tools/shell-session.d.ts.map +1 -0
- package/dist/core/tools/shell-session.js +432 -0
- package/dist/core/tools/shell-session.js.map +1 -0
- package/dist/core/tools/task-steps.d.ts +6 -0
- package/dist/core/tools/task-steps.d.ts.map +1 -1
- package/dist/core/tools/task-steps.js +165 -8
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/core/tools/tmux-dispatch.d.ts +84 -0
- package/dist/core/tools/tmux-dispatch.d.ts.map +1 -0
- package/dist/core/tools/tmux-dispatch.js +91 -0
- package/dist/core/tools/tmux-dispatch.js.map +1 -0
- package/dist/core/tools/windows-shell-engine.d.ts +42 -0
- package/dist/core/tools/windows-shell-engine.d.ts.map +1 -0
- package/dist/core/tools/windows-shell-engine.js +151 -0
- package/dist/core/tools/windows-shell-engine.js.map +1 -0
- package/dist/core/tools/windows-shell-state.d.ts +40 -0
- package/dist/core/tools/windows-shell-state.d.ts.map +1 -0
- package/dist/core/tools/windows-shell-state.js +59 -0
- package/dist/core/tools/windows-shell-state.js.map +1 -0
- package/dist/core/tools/worktree-sync.d.ts +24 -0
- package/dist/core/tools/worktree-sync.d.ts.map +1 -0
- package/dist/core/tools/worktree-sync.js +338 -0
- package/dist/core/tools/worktree-sync.js.map +1 -0
- package/dist/core/trust-manager.d.ts +4 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +20 -2
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/util/atomic-file.d.ts +55 -0
- package/dist/core/util/atomic-file.d.ts.map +1 -0
- package/dist/core/util/atomic-file.js +255 -0
- package/dist/core/util/atomic-file.js.map +1 -0
- package/dist/core/util/bounded-jsonl.d.ts +10 -0
- package/dist/core/util/bounded-jsonl.d.ts.map +1 -0
- package/dist/core/util/bounded-jsonl.js +75 -0
- package/dist/core/util/bounded-jsonl.js.map +1 -0
- package/dist/core/util/minimatch-cache.d.ts +33 -0
- package/dist/core/util/minimatch-cache.d.ts.map +1 -0
- package/dist/core/util/minimatch-cache.js +0 -0
- package/dist/core/util/minimatch-cache.js.map +1 -0
- package/dist/core/util/value-guards.d.ts +5 -0
- package/dist/core/util/value-guards.d.ts.map +1 -0
- package/dist/core/util/value-guards.js +12 -0
- package/dist/core/util/value-guards.js.map +1 -0
- package/dist/core/worktree-sync/codes.d.ts +227 -0
- package/dist/core/worktree-sync/codes.d.ts.map +1 -0
- package/dist/core/worktree-sync/codes.js +14 -0
- package/dist/core/worktree-sync/codes.js.map +1 -0
- package/dist/core/worktree-sync/git-engine.d.ts +156 -0
- package/dist/core/worktree-sync/git-engine.d.ts.map +1 -0
- package/dist/core/worktree-sync/git-engine.js +1191 -0
- package/dist/core/worktree-sync/git-engine.js.map +1 -0
- package/dist/core/worktree-sync/lane-gate.d.ts +75 -0
- package/dist/core/worktree-sync/lane-gate.d.ts.map +1 -0
- package/dist/core/worktree-sync/lane-gate.js +360 -0
- package/dist/core/worktree-sync/lane-gate.js.map +1 -0
- package/dist/core/worktree-sync/runtime.d.ts +47 -0
- package/dist/core/worktree-sync/runtime.d.ts.map +1 -0
- package/dist/core/worktree-sync/runtime.js +96 -0
- package/dist/core/worktree-sync/runtime.js.map +1 -0
- package/dist/core/worktree-sync/store.d.ts +69 -0
- package/dist/core/worktree-sync/store.d.ts.map +1 -0
- package/dist/core/worktree-sync/store.js +252 -0
- package/dist/core/worktree-sync/store.js.map +1 -0
- package/dist/core/worktree-sync/watcher.d.ts +29 -0
- package/dist/core/worktree-sync/watcher.d.ts.map +1 -0
- package/dist/core/worktree-sync/watcher.js +93 -0
- package/dist/core/worktree-sync/watcher.js.map +1 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +179 -1
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +7 -0
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +197 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.d.ts +16 -1
- package/dist/modes/interactive/auto-learn-controller.d.ts.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.js +50 -8
- package/dist/modes/interactive/auto-learn-controller.js.map +1 -1
- package/dist/modes/interactive/clipboard-input.d.ts +7 -1
- package/dist/modes/interactive/clipboard-input.d.ts.map +1 -1
- package/dist/modes/interactive/clipboard-input.js +44 -6
- package/dist/modes/interactive/clipboard-input.js.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.js +23 -1
- package/dist/modes/interactive/components/profile-resource-editor.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +2 -2
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/config-backup.d.ts.map +1 -1
- package/dist/modes/interactive/config-backup.js +5 -4
- package/dist/modes/interactive/config-backup.js.map +1 -1
- package/dist/modes/interactive/extension-ui-host.d.ts +14 -0
- package/dist/modes/interactive/extension-ui-host.d.ts.map +1 -1
- package/dist/modes/interactive/extension-ui-host.js +76 -15
- package/dist/modes/interactive/extension-ui-host.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +4 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +67 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/key-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/key-handlers.js +1 -1
- package/dist/modes/interactive/key-handlers.js.map +1 -1
- package/dist/modes/interactive/local-model-commands.d.ts +43 -0
- package/dist/modes/interactive/local-model-commands.d.ts.map +1 -1
- package/dist/modes/interactive/local-model-commands.js +290 -3
- package/dist/modes/interactive/local-model-commands.js.map +1 -1
- package/dist/modes/interactive/profile-menu-controller.d.ts.map +1 -1
- package/dist/modes/interactive/profile-menu-controller.js +7 -7
- package/dist/modes/interactive/profile-menu-controller.js.map +1 -1
- package/dist/modes/interactive/report-commands.d.ts.map +1 -1
- package/dist/modes/interactive/report-commands.js +21 -0
- package/dist/modes/interactive/report-commands.js.map +1 -1
- package/dist/modes/interactive/session-flow-commands.d.ts +17 -2
- package/dist/modes/interactive/session-flow-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-flow-commands.js +74 -21
- package/dist/modes/interactive/session-flow-commands.js.map +1 -1
- package/dist/modes/interactive/session-io-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-io-commands.js +16 -6
- package/dist/modes/interactive/session-io-commands.js.map +1 -1
- package/dist/modes/interactive/session-replacement-errors.d.ts +7 -0
- package/dist/modes/interactive/session-replacement-errors.d.ts.map +1 -0
- package/dist/modes/interactive/session-replacement-errors.js +15 -0
- package/dist/modes/interactive/session-replacement-errors.js.map +1 -0
- package/dist/modes/interactive/startup-checks.d.ts.map +1 -1
- package/dist/modes/interactive/startup-checks.js +1 -1
- package/dist/modes/interactive/startup-checks.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +82 -23
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +15 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js +138 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +2 -13
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts +1 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts +1 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +52 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/fs-watch.d.ts +11 -0
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js +20 -2
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/highlight-js-languages.d.ts +4 -0
- package/dist/utils/highlight-js-languages.d.ts.map +1 -0
- package/dist/utils/highlight-js-languages.js +573 -0
- package/dist/utils/highlight-js-languages.js.map +1 -0
- package/dist/utils/platform.d.ts +3 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +8 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/shell.d.ts +7 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +21 -6
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +53 -5
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +112 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/work-directory.d.ts +11 -0
- package/dist/utils/work-directory.d.ts.map +1 -1
- package/dist/utils/work-directory.js +30 -9
- package/dist/utils/work-directory.js.map +1 -1
- package/docs/UI_POLISH_ORCHESTRATION.md +44 -0
- package/docs/UI_QUALITY_ORCHESTRATION.md +30 -0
- package/docs/docs.json +4 -0
- package/docs/extensions.md +62 -2
- package/docs/harness-architecture.md +156 -0
- package/docs/keybindings.md +11 -1
- package/docs/process-matrix.md +153 -0
- package/docs/rpc.md +45 -2
- package/docs/sessions.md +15 -0
- package/docs/settings.md +128 -11
- package/docs/task-steps.md +8 -0
- package/docs/telemetry.md +19 -0
- package/docs/tmux-agent-manager.md +92 -2
- package/docs/ui-reference/README.md +9 -0
- package/docs/ui-reference/orchestration-after.txt +7 -0
- package/docs/ui-reference/orchestration-before.txt +7 -0
- package/docs/ui-reference/orchestration-reference.txt +6 -0
- package/docs/usage.md +14 -2
- package/docs/windows.md +52 -3
- package/docs/work-directory.md +42 -2
- package/docs/worktree-sync.md +250 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/question.ts +34 -245
- package/examples/extensions/questionnaire.ts +41 -407
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +10 -4
- package/dist/core/delegation/session-worker-result.d.ts +0 -16
- package/dist/core/delegation/session-worker-result.d.ts.map +0 -1
- package/dist/core/delegation/session-worker-result.js +0 -53
- package/dist/core/delegation/session-worker-result.js.map +0 -1
- package/dist/core/delegation/worker-result.d.ts +0 -15
- package/dist/core/delegation/worker-result.d.ts.map +0 -1
- package/dist/core/delegation/worker-result.js +0 -161
- package/dist/core/delegation/worker-result.js.map +0 -1
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js.map +0 -1
- package/docs/integration-sweep-builder-blueprint-2026-07-09.md +0 -365
- package/docs/integration-sweep-resume-2026-07-09.md +0 -407
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Agent, AgentEvent, AgentLoopConfig, AgentMessage, AgentState, AgentTool, StreamIdleOptions, ThinkingLevel } from "@caupulican/pi-agent-core";
|
|
2
2
|
import { type CustomMessage } from "@caupulican/pi-agent-core";
|
|
3
|
-
import {
|
|
4
|
-
import type { CacheRetention, ImageContent, Message, Model, StopReason, TextContent,
|
|
5
|
-
import type { CapabilityEnvelope, EvidenceBundle, LearningDecision,
|
|
3
|
+
import type { BranchSummaryEntry, CompactionResult, SessionManager } from "@caupulican/pi-agent-core/node";
|
|
4
|
+
import type { Api, CacheRetention, ImageContent, Message, Model, StopReason, TextContent, Usage } from "@caupulican/pi-ai";
|
|
5
|
+
import type { CapabilityEnvelope, EvidenceBundle, LearningDecision, WorkerClaim, WorkerRequest } from "./autonomy/contracts.ts";
|
|
6
6
|
import type { LaneRecord, LaneTerminalStatus } from "./autonomy/lane-tracker.ts";
|
|
7
7
|
import type { AutonomyDiagnosticSnapshot, AutonomyStatusSnapshot, GateOutcomeHistoryEntry } from "./autonomy/status.ts";
|
|
8
8
|
import type { BashResult } from "./bash-executor.ts";
|
|
@@ -18,21 +18,23 @@ import type { ContextGcReport } from "./context-gc.ts";
|
|
|
18
18
|
import type { SessionCostSummary } from "./cost/cost-summary.ts";
|
|
19
19
|
import type { DailyUsageTotals } from "./cost/daily-usage.ts";
|
|
20
20
|
import { type CostGuardDecision } from "./cost-guard.ts";
|
|
21
|
+
import type { WorkerDelegationRequest } from "./delegation/worker-delegation-request.ts";
|
|
21
22
|
import type { WorkerRunOutcome } from "./delegation/worker-runner.ts";
|
|
22
23
|
import type { ContextUsage, ExtensionCommandContextActions, ExtensionContext, ExtensionErrorListener, ExtensionRunner, ExtensionUIContext, InputSource, ReplacedSessionContext, SessionStartEvent, ShutdownHandler, ToolDefinition, ToolInfo } from "./extensions/index.ts";
|
|
23
24
|
import { type ChannelProvider, GatewayRegistry, type JobSchedulerProvider } from "./gateways/channel-provider.ts";
|
|
24
25
|
import type { GoalContinuationPrompt, GoalContinuationPromptLimits } from "./goals/goal-continuation-prompt.ts";
|
|
25
26
|
import { type GoalRuntimeSnapshot, type GoalRuntimeSnapshotSettings } from "./goals/goal-runtime-snapshot.ts";
|
|
26
|
-
import type
|
|
27
|
+
import { type GoalState } from "./goals/goal-state.ts";
|
|
27
28
|
import type { LearningAuditRecord } from "./learning/learning-audit.ts";
|
|
28
29
|
import type { DemandSignals, ReflectionResult } from "./learning/reflection-engine.ts";
|
|
29
30
|
import { type CurationProposals } from "./learning/skill-curator.ts";
|
|
30
31
|
import type { MemoryProvider } from "./memory/memory-provider.ts";
|
|
31
|
-
import { type ModelCapabilityProfile } from "./model-capability.ts";
|
|
32
|
+
import { type LaneWorkerRefusal, type ModelCapabilityProfile } from "./model-capability.ts";
|
|
32
33
|
import type { ModelRegistry } from "./model-registry.ts";
|
|
33
|
-
import { type NativeToolProbeGrade } from "./models/adaptation-store.ts";
|
|
34
34
|
import type { StoredFitnessReport } from "./models/fitness-store.ts";
|
|
35
|
+
import type { PrismLlamaCppRuntime } from "./models/llamacpp-runtime.ts";
|
|
35
36
|
import type { LocalRuntimeDeps, OllamaRuntime, TransformersRuntime } from "./models/local-runtime.ts";
|
|
37
|
+
import type { OrchestrationProfile } from "./orchestration/contracts.ts";
|
|
36
38
|
import { type PromptTemplate } from "./prompt-templates.ts";
|
|
37
39
|
import type { ModelFitnessReport } from "./research/model-fitness.ts";
|
|
38
40
|
import type { ResearchRunResult } from "./research/research-runner.ts";
|
|
@@ -41,6 +43,7 @@ import type { ResourceLoader } from "./resource-loader.ts";
|
|
|
41
43
|
import { type ToolArgumentValidationStats } from "./session-analytics.ts";
|
|
42
44
|
import type { ResourceProfileFilterSettings, SettingsManager } from "./settings-manager.ts";
|
|
43
45
|
import { type TaskStepsState } from "./tasks/task-state.ts";
|
|
46
|
+
import { type ToolProbeReport } from "./tool-protocol-controller.ts";
|
|
44
47
|
import type { BashOperations } from "./tools/bash.ts";
|
|
45
48
|
/**
|
|
46
49
|
* Test hook: override the stream-idle bounds so a stall can be provoked in-suite without a
|
|
@@ -137,7 +140,7 @@ export interface AgentSessionConfig {
|
|
|
137
140
|
agentDir?: string;
|
|
138
141
|
/** Models to cycle through with Ctrl+P (from --models flag) */
|
|
139
142
|
scopedModels?: Array<{
|
|
140
|
-
model: Model<
|
|
143
|
+
model: Model<Api>;
|
|
141
144
|
thinkingLevel?: ThinkingLevel;
|
|
142
145
|
}>;
|
|
143
146
|
/** Resource loader for skills, prompts, themes, context files, system prompt */
|
|
@@ -182,6 +185,8 @@ export interface AgentSessionConfig {
|
|
|
182
185
|
* defaults to the real, best-effort collector.
|
|
183
186
|
*/
|
|
184
187
|
collectWorkspaceSources?: typeof collectWorkspaceSources;
|
|
188
|
+
/** Immutable owner-authored orchestration policy; dispatch cannot mutate it. */
|
|
189
|
+
orchestrationProfile?: OrchestrationProfile;
|
|
185
190
|
/**
|
|
186
191
|
* Injected fetch/spawn/exists for the local (Ollama) runtime health-check + boot used by the
|
|
187
192
|
* model router before a turn routed to a local model (see LocalRuntimeController.ensureLocalModelReady).
|
|
@@ -214,30 +219,27 @@ export interface PromptOptions {
|
|
|
214
219
|
/** Whether an idle active goal should auto-inject bounded continuation prompts after this prompt settles. Default: true. */
|
|
215
220
|
autoContinueGoal?: boolean;
|
|
216
221
|
}
|
|
217
|
-
export type ToolProbeVerdict
|
|
218
|
-
export interface ToolProbeResult {
|
|
219
|
-
model: string;
|
|
220
|
-
verdict: ToolProbeVerdict;
|
|
221
|
-
variant?: TextToolProtocolVariant;
|
|
222
|
-
nativeGrade?: NativeToolProbeGrade;
|
|
223
|
-
diagnostic?: string;
|
|
224
|
-
}
|
|
225
|
-
export interface ToolProbeReport {
|
|
226
|
-
results: ToolProbeResult[];
|
|
227
|
-
table: string;
|
|
228
|
-
}
|
|
222
|
+
export type { ToolProbeReport, ToolProbeResult, ToolProbeVerdict } from "./tool-protocol-controller.ts";
|
|
229
223
|
/** Result from cycleModel() */
|
|
230
224
|
export interface ModelCycleResult {
|
|
231
|
-
model: Model<
|
|
225
|
+
model: Model<Api>;
|
|
232
226
|
thinkingLevel: ThinkingLevel;
|
|
233
227
|
/** Whether cycling through scoped models (--models flag) or all available */
|
|
234
228
|
isScoped: boolean;
|
|
235
229
|
}
|
|
236
230
|
/** Session statistics for /session command */
|
|
231
|
+
export interface CompactionGateCheckStats {
|
|
232
|
+
failures: number;
|
|
233
|
+
minScore?: number;
|
|
234
|
+
maxScore?: number;
|
|
235
|
+
threshold?: number;
|
|
236
|
+
comparator?: "minimum" | "maximum";
|
|
237
|
+
}
|
|
237
238
|
export interface CompactionGateStats {
|
|
238
239
|
gateFailures: number;
|
|
239
240
|
deterministicGapFills: number;
|
|
240
241
|
compactionsWithGateFailures: number;
|
|
242
|
+
checks: Record<string, CompactionGateCheckStats>;
|
|
241
243
|
}
|
|
242
244
|
export interface SessionStats {
|
|
243
245
|
sessionFile: string | undefined;
|
|
@@ -261,6 +263,35 @@ export interface SessionStats {
|
|
|
261
263
|
}
|
|
262
264
|
/** customType for spawned-usage roll-up entries (Cost Aggregation, Model A). */
|
|
263
265
|
export declare const SPAWNED_USAGE_CUSTOM_TYPE = "spawned_usage";
|
|
266
|
+
/**
|
|
267
|
+
* customType for a persisted runaway-loop-backstop entry: the agent loop stopped a turn stuck
|
|
268
|
+
* repeating one identical tool-call signature. This is the session-log/telemetry sink for
|
|
269
|
+
* {@link Agent.onRunawayStop} — see `_installAgentToolHooks`.
|
|
270
|
+
*/
|
|
271
|
+
export declare const RUNAWAY_STOP_CUSTOM_TYPE = "runaway_stop";
|
|
272
|
+
/** Payload persisted for a {@link RUNAWAY_STOP_CUSTOM_TYPE} entry. */
|
|
273
|
+
export interface RunawayStopRecord {
|
|
274
|
+
signature: string;
|
|
275
|
+
repeats: number;
|
|
276
|
+
model?: string;
|
|
277
|
+
provider?: string;
|
|
278
|
+
at: string;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* customType for a persisted tool-validation-escalation entry: the agent loop bounced the same
|
|
282
|
+
* tool-call validation failure enough times to escalate. This is the session-log/telemetry sink for
|
|
283
|
+
* {@link Agent.onToolValidationEscalation} — see `_installAgentToolHooks`.
|
|
284
|
+
*/
|
|
285
|
+
export declare const TOOL_VALIDATION_ESCALATION_CUSTOM_TYPE = "tool_validation_escalation";
|
|
286
|
+
/** Payload persisted for a {@link TOOL_VALIDATION_ESCALATION_CUSTOM_TYPE} entry. */
|
|
287
|
+
export interface ToolValidationEscalationRecord {
|
|
288
|
+
tool: string;
|
|
289
|
+
signature: string;
|
|
290
|
+
repeats: number;
|
|
291
|
+
model: string;
|
|
292
|
+
provider: string;
|
|
293
|
+
at: string;
|
|
294
|
+
}
|
|
264
295
|
/**
|
|
265
296
|
* A single spawned/subagent usage report, persisted as a `CustomEntry`
|
|
266
297
|
* (`customType: "spawned_usage"`). Persistence-only — does NOT enter LLM context.
|
|
@@ -297,7 +328,7 @@ export interface IsolatedCompletionOptions {
|
|
|
297
328
|
/** The isolated conversation (e.g. the reflection prompt). NOT the main session history. */
|
|
298
329
|
messages: Message[];
|
|
299
330
|
/** Model to use. Defaults to the session model; callers should pass a cheap model. */
|
|
300
|
-
model?: Model<
|
|
331
|
+
model?: Model<Api>;
|
|
301
332
|
/** Thinking level. Defaults to "off" to keep the call cheap. */
|
|
302
333
|
thinkingLevel?: ThinkingLevel;
|
|
303
334
|
/** Output token cap. */
|
|
@@ -319,12 +350,38 @@ export interface IsolatedCompletionOptions {
|
|
|
319
350
|
/** Abort signal. */
|
|
320
351
|
signal?: AbortSignal;
|
|
321
352
|
/**
|
|
322
|
-
* Prompt-cache retention for this isolated call.
|
|
323
|
-
*
|
|
324
|
-
*
|
|
353
|
+
* Prompt-cache retention for this isolated call. REQUIRED — the provider-level default is
|
|
354
|
+
* `"short"`, the opposite of this primitive's old implicit default, so a caller that forgot to
|
|
355
|
+
* set it would silently pay full input price forever. Pass `"none"` explicitly to preserve full
|
|
356
|
+
* isolation (no caching); callers whose `systemPrompt` is STATIC across calls (e.g. reflection,
|
|
357
|
+
* #33) should pass `"short"`/`"long"` so the provider reuses the cached prefix and bills only the
|
|
358
|
+
* variable tail.
|
|
359
|
+
*/
|
|
360
|
+
cacheRetention: CacheRetention;
|
|
361
|
+
/**
|
|
362
|
+
* Lane/caller kind (e.g. `"reflection"`, `"research"`, `"worker"`, `"fitness"`) used to derive this
|
|
363
|
+
* call's synthetic cache-affinity key (see {@link computeLaneAffinityKey}). Omitted callers fall
|
|
364
|
+
* back to {@link DEFAULT_ISOLATED_LANE_KIND} — still a stable, namespaced key, just not
|
|
365
|
+
* lane-differentiated. Never the real session id.
|
|
325
366
|
*/
|
|
326
|
-
|
|
367
|
+
laneKind?: string;
|
|
327
368
|
}
|
|
369
|
+
/** Fallback {@link IsolatedCompletionOptions.laneKind} for callers that do not tag their lane. */
|
|
370
|
+
export declare const DEFAULT_ISOLATED_LANE_KIND = "isolated";
|
|
371
|
+
/**
|
|
372
|
+
* Derive a STABLE synthetic cache-affinity key for an isolated completion lane. Isolated calls
|
|
373
|
+
* deliberately never carry the real session id (see reflection-controller.ts's isolation invariants —
|
|
374
|
+
* an isolated call must not entangle with the main session), which today also means every isolated
|
|
375
|
+
* call looks like a brand-new, uncorrelated session to providers with session-affinity headers /
|
|
376
|
+
* `prompt_cache_key` (anthropic.ts's `x-session-affinity`, openai-responses.ts /
|
|
377
|
+
* openai-completions.ts's `prompt_cache_key`), defeating their cache routing.
|
|
378
|
+
*
|
|
379
|
+
* This key is deterministic per `(laneKind, model, systemPrompt)` — the SAME lane calling the SAME
|
|
380
|
+
* model with the SAME (static) system prompt always gets the SAME key, so repeat calls route to the
|
|
381
|
+
* same cache-warm backend — while remaining fully synthetic: it is a salted hash, namespaced with a
|
|
382
|
+
* `lane:` prefix, and never derived from or equal to the real session id.
|
|
383
|
+
*/
|
|
384
|
+
export declare function computeLaneAffinityKey(laneKind: string, model: Model<Api> | undefined, systemPrompt: string): string;
|
|
328
385
|
/** Result of an isolated completion: the text, the usage spent, and the stop reason. */
|
|
329
386
|
export interface IsolatedCompletionResult {
|
|
330
387
|
text: string;
|
|
@@ -356,7 +413,7 @@ export interface GoalContinuationOnceResult {
|
|
|
356
413
|
snapshot: GoalRuntimeSnapshot;
|
|
357
414
|
prompt?: GoalContinuationPrompt;
|
|
358
415
|
}
|
|
359
|
-
export type GoalContinuationLoopStopReason = "continuation_not_allowed" | "max_turns_reached" | "wall_clock_budget_reached" | "goal_state_not_advanced";
|
|
416
|
+
export type GoalContinuationLoopStopReason = "continuation_not_allowed" | "max_turns_reached" | "wall_clock_budget_reached" | "goal_state_not_advanced" | "goal_budget_exhausted" | "already_continuing" | "session_disposed" | "goal_tool_unavailable" | "worker_in_flight";
|
|
360
417
|
export interface GoalContinuationLoopOptions extends GoalContinuationOnceOptions {
|
|
361
418
|
maxTurns: number;
|
|
362
419
|
/** 0 or undefined disables wall-clock budget. */
|
|
@@ -383,17 +440,16 @@ export declare class AgentSession {
|
|
|
383
440
|
private _queuedExtensionCommands;
|
|
384
441
|
private _pendingNextTurnMessages;
|
|
385
442
|
private _streamingPromptSubmissionTail;
|
|
443
|
+
/** Serializes owner-input overlays so concurrent worker terminals cannot replace each other. */
|
|
444
|
+
private _humanInputTail;
|
|
445
|
+
private _activeHumanInputRequestIds;
|
|
386
446
|
/**
|
|
387
447
|
* The last tool set requested via setActiveToolsByName BEFORE model-capability filtering, so
|
|
388
448
|
* switching from a small-window model back to a large one restores the full requested set.
|
|
389
449
|
*/
|
|
390
450
|
private _requestedActiveToolNames;
|
|
391
|
-
private _compactionAbortController;
|
|
392
|
-
private _autoCompactionAbortController;
|
|
393
|
-
private _overflowRecoveryAttempted;
|
|
394
451
|
private _unboundToolGrantWarnings;
|
|
395
452
|
private _branchSummaryAbortController;
|
|
396
|
-
private _retryController;
|
|
397
453
|
private readonly _modelSelection;
|
|
398
454
|
private readonly _bash;
|
|
399
455
|
private readonly _profileFilter;
|
|
@@ -405,23 +461,21 @@ export declare class AgentSession {
|
|
|
405
461
|
private _resourceLoader;
|
|
406
462
|
private _customTools;
|
|
407
463
|
private _cwd;
|
|
464
|
+
/** Per-agent persistent shell session identity: stable across runtime reloads, disposed with the session. */
|
|
465
|
+
private readonly _shellSessionKey;
|
|
408
466
|
private _agentDir;
|
|
409
467
|
private _collectWorkspaceSources;
|
|
410
468
|
private readonly _localRuntimeController;
|
|
411
|
-
private readonly
|
|
469
|
+
private readonly _toolProtocol;
|
|
412
470
|
private _prefixWarmer;
|
|
413
471
|
private readonly _completedPrefixWarms;
|
|
414
|
-
private readonly _repairModeSessionCounts;
|
|
415
|
-
private readonly _textProtocolParseFailures;
|
|
416
|
-
private _textProtocolParseObservedThisTurn;
|
|
417
|
-
private _textProtocolValidationOutcomeThisTurn;
|
|
418
472
|
/** Assembles the session's base system prompt from live session state (see
|
|
419
473
|
* system-prompt-builder.ts); owns the paired _baseSystemPromptOptions. */
|
|
420
474
|
private readonly _systemPromptBuilder;
|
|
421
|
-
/**
|
|
475
|
+
/** Autonomy telemetry sink + status/diagnostic snapshots (see autonomy-telemetry.ts); owns
|
|
422
476
|
* the latest gate outcome and the bounded gate-outcome history. */
|
|
423
477
|
private readonly _autonomyTelemetry;
|
|
424
|
-
/** Goal auto-continue + research lane +
|
|
478
|
+
/** Goal auto-continue + research lane + profile-bound worker delegation + model-fitness probe (see
|
|
425
479
|
* background-lane-controller.ts); owns the lane timers/guards, the last research-lane skip
|
|
426
480
|
* reason, the live LaneTracker, and the in-flight research/worker abort controllers. */
|
|
427
481
|
private readonly _backgroundLanes;
|
|
@@ -430,6 +484,7 @@ export declare class AgentSession {
|
|
|
430
484
|
* effectiveness tracker, and the extension-contributed pending providers. */
|
|
431
485
|
private readonly _memory;
|
|
432
486
|
private readonly _compactionSupport;
|
|
487
|
+
private readonly _compaction;
|
|
433
488
|
/** Per-turn context-shaping subsystem (see context-pipeline.ts); owns the latest
|
|
434
489
|
* audit/policy/correlation/enforcement/gc reports, the brain-curation sidecar + its skip reasons,
|
|
435
490
|
* and the tool-output artifact store. Invoked stage-by-stage from the context transform. */
|
|
@@ -447,17 +502,25 @@ export declare class AgentSession {
|
|
|
447
502
|
private readonly _analytics;
|
|
448
503
|
private readonly _treeNavigator;
|
|
449
504
|
private _lastCostGuardDecision?;
|
|
505
|
+
/**
|
|
506
|
+
* `getSpawnedUsage().cost` snapshotted at the start of the CURRENT foreground prompt cycle (see
|
|
507
|
+
* `_promptUnserialized`), so the cost guard can attribute only background/spawned spend since THIS
|
|
508
|
+
* turn began, not the session's entire lifetime spend. Reset on every new user prompt; every
|
|
509
|
+
* round-trip within the same turn (tool-call iterations) shares this one baseline.
|
|
510
|
+
*/
|
|
511
|
+
private _costGuardTurnBaselineUsd;
|
|
450
512
|
/** Per-turn model-router subsystem (see model-router-controller.ts); owns the transient route/intent,
|
|
451
513
|
* the cheap-turn session buffer, the escalation/retry flags, and the sticky last-decision/skip-reason
|
|
452
514
|
* used by the status report. Its parallel routed drive path delegates every turn back to
|
|
453
515
|
* {@link _runAgentPrompt} so the drive loop stays host-side. */
|
|
454
516
|
private readonly _modelRouter;
|
|
455
|
-
private readonly
|
|
517
|
+
private readonly _foregroundRecovery;
|
|
456
518
|
private readonly _failureCorpus;
|
|
457
519
|
private readonly _toolRecoveryLogger;
|
|
458
520
|
private readonly _toolRecoveryEventLogPath;
|
|
459
521
|
private _skillCuratorInstance?;
|
|
460
522
|
private _disposed;
|
|
523
|
+
private _disposeCompletion;
|
|
461
524
|
private readonly _reflectionAbort;
|
|
462
525
|
/** Native reflection engine + learning-apply/rollback path (see reflection-controller.ts); owns no
|
|
463
526
|
* session state, applies durable writes through the bundled memory tool and the session log. */
|
|
@@ -520,6 +583,16 @@ export declare class AgentSession {
|
|
|
520
583
|
* model, full system prompt, converted messages, and tool schemas are known. The guard is a
|
|
521
584
|
* projection threshold rather than a hard output cap: warning mode never reduces capability, while
|
|
522
585
|
* opt-in downgrade changes only this request's reasoning effort. Best-effort: never throws.
|
|
586
|
+
*
|
|
587
|
+
* The ceiling is turn-cumulative: the next foreground call's projection is folded together with
|
|
588
|
+
* background/research/worker/reflection spend recorded SINCE THIS TURN BEGAN — {@link getSpawnedUsage}'s
|
|
589
|
+
* already-recorded rollup (the same read-side-deduped total the footer's SUBAGENTS line uses) minus the
|
|
590
|
+
* baseline snapshotted before a new turn enters routing in `_promptUnserialized`
|
|
591
|
+
* ({@link _costGuardTurnBaselineUsd}) — so a
|
|
592
|
+
* turn that is cheap in the foreground but has spent heavily via background lanes THIS turn still trips
|
|
593
|
+
* the warning, while a prior turn's background spend does not keep every later turn's guard stuck
|
|
594
|
+
* "over". A background lane that finishes mid-turn is attributed to whichever turn it completes in.
|
|
595
|
+
* Per-lane dollar caps (research/worker `maxUsd`) are separate and untouched by this guard.
|
|
523
596
|
*/
|
|
524
597
|
private _resolveCostGuardRequestReasoning;
|
|
525
598
|
/** Latest cost-guard decision (for the host footer/UI to surface a warning). Undefined if disabled. */
|
|
@@ -545,36 +618,14 @@ export declare class AgentSession {
|
|
|
545
618
|
restorePromotedSkill(name: string): boolean;
|
|
546
619
|
private _installAgentTurnRefresh;
|
|
547
620
|
private _createAgentContextSnapshot;
|
|
548
|
-
|
|
549
|
-
private _toolRepairSettings;
|
|
550
|
-
private _applyToolRepairLayerSettings;
|
|
551
|
-
private _getModelAdaptationRulesForPrompt;
|
|
552
|
-
private _textProtocolFlag;
|
|
553
|
-
private _streamForToolProbe;
|
|
554
|
-
private _textProtocolCalibrationContext;
|
|
555
|
-
private _messageHasToolCallWithStringArgument;
|
|
556
|
-
private _nativeToolProbeSystemPrompt;
|
|
557
|
-
private _runNativeReadTaskProbeTrial;
|
|
558
|
-
private _runNativeEchoToolProbeTrial;
|
|
559
|
-
private _gradeNativeToolCallingForModel;
|
|
560
|
-
private _runTextProtocolTrial;
|
|
561
|
-
private _calibrateTextToolProtocolForModel;
|
|
562
|
-
private _ensureTextToolProtocolForActiveModel;
|
|
563
|
-
private _modelRef;
|
|
564
|
-
private _formatToolProbeReport;
|
|
565
|
-
private _storeToolProbe;
|
|
621
|
+
/** Compatibility seam retained for focused auto-probe regressions. */
|
|
566
622
|
private _probeToolCallingForModel;
|
|
567
|
-
|
|
623
|
+
/** Compatibility seam retained for focused protocol-selection doctrine regressions. */
|
|
624
|
+
private _resolveModelToolProtocol;
|
|
568
625
|
probeToolCalling(target?: string): Promise<ToolProbeReport>;
|
|
569
|
-
private _handleTextToolProtocolParse;
|
|
570
|
-
private _handleTextToolProtocolValidationOutcome;
|
|
571
|
-
private _recordTextToolProtocolParseOutcomeFromLastAssistant;
|
|
572
|
-
private _looksLikeTextToolProtocolAttempt;
|
|
573
|
-
private _tagModelAdaptationRuleTeaching;
|
|
574
|
-
private _repairSessionCount;
|
|
575
|
-
private _handleModelAdaptationTelemetry;
|
|
576
626
|
/** Tool-build call-site delegation to {@link ContextPipeline.getToolArtifactStore}. */
|
|
577
627
|
private _getToolArtifactStore;
|
|
628
|
+
private _getSessionImageStore;
|
|
578
629
|
/**
|
|
579
630
|
* Context-transform hot-path delegation to {@link ContextPipeline.runContextAudit}. Kept as a
|
|
580
631
|
* one-line method (not inlined) so the transform stays the single owner of the pass ordering.
|
|
@@ -663,18 +714,55 @@ export declare class AgentSession {
|
|
|
663
714
|
private _applyContextGc;
|
|
664
715
|
/** Read-only inspection of the latest context-gc report (delegates to {@link ContextPipeline.getContextGcReport}). */
|
|
665
716
|
getContextGcReport(messages?: AgentMessage[]): ContextGcReport;
|
|
666
|
-
/**
|
|
667
|
-
* Context-transform hot-path delegation to {@link ContextPipeline.estimateCurrentContextTokens}. Kept
|
|
668
|
-
* as a one-line method (not inlined) so the transform stays the single owner of the pass ordering;
|
|
669
|
-
* also feeds the per-turn cost guard.
|
|
670
|
-
*/
|
|
671
|
-
private _estimateCurrentContextTokens;
|
|
672
717
|
private _installAgentToolHooks;
|
|
718
|
+
/**
|
|
719
|
+
* The runaway-loop backstop ({@link Agent.maxStallTurns}) stopped a turn stuck repeating one
|
|
720
|
+
* identical tool-call signature. Previously silent — this is the first host handler. Records a
|
|
721
|
+
* session-log/telemetry entry (see {@link RUNAWAY_STOP_CUSTOM_TYPE}) and surfaces a user-visible
|
|
722
|
+
* warning through the same event the context-window/compaction backstops use.
|
|
723
|
+
*/
|
|
724
|
+
private _handleRunawayStop;
|
|
725
|
+
/**
|
|
726
|
+
* Evidence-gated native→phone auto-probe for a LOCAL/MANAGED model (never cloud — see
|
|
727
|
+
* {@link isLocalOrManagedRouterModel}) that just crossed the tool-argument-validation escalation
|
|
728
|
+
* threshold — repeated identical validation failures with no successful native call in between,
|
|
729
|
+
* which is exactly the graded evidence {@link Agent.onToolValidationEscalation} already requires
|
|
730
|
+
* before firing. Runs the SAME probe `/toolprobe` uses ({@link _probeToolCallingForModel}: native
|
|
731
|
+
* trials first, so a model that can actually tool-call natively still resolves to verdict
|
|
732
|
+
* "native" and is never phoned) entirely OFF the hot path — fired here but never awaited by the
|
|
733
|
+
* caller, so a slow or failing probe can never block or throw the user's in-flight turn.
|
|
734
|
+
* Anti-loop: skipped when this session already auto-probed this model, or a fresh persisted
|
|
735
|
+
* verdict already exists (enforced by {@link ToolProtocolController}) — otherwise a model that keeps
|
|
736
|
+
* failing validation every turn would re-fire the (multi-completion) probe every single turn.
|
|
737
|
+
*/
|
|
738
|
+
private _maybeAutoProbeOnValidationEscalation;
|
|
739
|
+
/**
|
|
740
|
+
* A repeated identical tool-argument-validation failure crossed the escalation threshold
|
|
741
|
+
* ({@link Agent.toolValidationEscalationThreshold}) — the graded evidence the capability-gate
|
|
742
|
+
* spine acts on. Always records a session-log/telemetry entry (see {@link
|
|
743
|
+
* TOOL_VALIDATION_ESCALATION_CUSTOM_TYPE}), then branches on the failing model's class:
|
|
744
|
+
* - LOCAL/MANAGED ({@link isLocalOrManagedRouterModel}, never cloud): the failure is evidence the
|
|
745
|
+
* model may lack native tool-calling, so it fires the evidence-gated native→phone auto-probe
|
|
746
|
+
* off the hot path ({@link _maybeAutoProbeOnValidationEscalation}). Escalating a local model's
|
|
747
|
+
* ROUTER TIER on a tool-call failure would not fix a capability problem, so this branch never
|
|
748
|
+
* touches the model router.
|
|
749
|
+
* - CLOUD (known tool-capable): the failure is evidence the routed tier is too weak for this
|
|
750
|
+
* request, so it escalates via {@link ModelRouterController.requestValidationFailureEscalation}
|
|
751
|
+
* — de-conflated from the beforeToolCall mutation gate ({@link
|
|
752
|
+
* ModelRouterController.maybeEscalateToolCall}/`shouldEscalateModelRouterTool`): repeated
|
|
753
|
+
* validation failure is grounds to escalate REGARDLESS of the failing tool's mutation status,
|
|
754
|
+
* so a read-only tool's repeated failure now escalates too (previously a no-op, since the old
|
|
755
|
+
* code reused the mutation gate verbatim for this unrelated signal). Cloud models are never
|
|
756
|
+
* probe-gated or phoned by this handler.
|
|
757
|
+
* If the registry can no longer resolve `event.model`/`event.provider` (e.g. the model was
|
|
758
|
+
* unregistered mid-session), falls back to the cloud/tier-escalation path — the previously
|
|
759
|
+
* existing behavior — rather than silently dropping the signal.
|
|
760
|
+
*/
|
|
761
|
+
private _handleToolValidationEscalation;
|
|
673
762
|
/** Emit an event to all listeners */
|
|
674
763
|
private _emit;
|
|
675
764
|
private _notifyWorkerTerminalHandoff;
|
|
676
765
|
private _emitQueueUpdate;
|
|
677
|
-
private _lastAssistantMessage;
|
|
678
766
|
/**
|
|
679
767
|
* User messages already painted to the UI by an early, synthetic `message_start` fired from
|
|
680
768
|
* `_promptUnserialized` — before the model-router judge's bounded LLM call — so the prompt
|
|
@@ -726,10 +814,12 @@ export declare class AgentSession {
|
|
|
726
814
|
* Call this when completely done with the session.
|
|
727
815
|
*/
|
|
728
816
|
dispose(): void;
|
|
817
|
+
/** Dispose synchronously-visible state, then await all session-owned asynchronous shutdowns. */
|
|
818
|
+
disposeAndWait(): Promise<void>;
|
|
729
819
|
/** Full agent state */
|
|
730
820
|
get state(): AgentState;
|
|
731
821
|
/** Current model (may be undefined if not yet selected) */
|
|
732
|
-
get model(): Model<
|
|
822
|
+
get model(): Model<Api> | undefined;
|
|
733
823
|
/** Current thinking level */
|
|
734
824
|
get thinkingLevel(): ThinkingLevel;
|
|
735
825
|
/** Whether agent is currently streaming a response */
|
|
@@ -743,14 +833,14 @@ export declare class AgentSession {
|
|
|
743
833
|
* Returns the names of tools currently set on the agent.
|
|
744
834
|
*/
|
|
745
835
|
getActiveToolNames(): string[];
|
|
746
|
-
/**
|
|
836
|
+
/** Build a foreground {@link CapabilityEnvelope} from the live session state (active tools, cwd, cost ceiling). */
|
|
747
837
|
private _buildForegroundEnvelopeFromState;
|
|
748
838
|
/**
|
|
749
|
-
*
|
|
839
|
+
* (Re)build the foreground envelope for the current turn. Visibility only -- the foreground
|
|
750
840
|
* envelope is NOT enforced this round. Best-effort: never throws into the turn.
|
|
751
841
|
*/
|
|
752
842
|
private _refreshForegroundEnvelope;
|
|
753
|
-
/**
|
|
843
|
+
/** The auto-constructed foreground envelope for the current/most-recent turn (visibility only). */
|
|
754
844
|
getForegroundEnvelope(): CapabilityEnvelope | undefined;
|
|
755
845
|
/**
|
|
756
846
|
* Get all configured tools with name, description, parameter schema, prompt guidelines, and source metadata.
|
|
@@ -764,7 +854,7 @@ export declare class AgentSession {
|
|
|
764
854
|
* Changes take effect on the next agent turn.
|
|
765
855
|
*
|
|
766
856
|
* artifact_retrieve is auto-activated as a companion whenever an artifact-producing tool
|
|
767
|
-
* (grep, find, or
|
|
857
|
+
* (grep, find, run_toolkit_script, or ask_question) ends up in the resulting active set and artifact_retrieve
|
|
768
858
|
* is registered (i.e. not excluded/
|
|
769
859
|
* blocked/outside an allowlist -- the registry itself is built with that same filter,
|
|
770
860
|
* so registry presence already tracks "allowed"). This is enforced here, not just in
|
|
@@ -791,12 +881,12 @@ export declare class AgentSession {
|
|
|
791
881
|
get sessionName(): string | undefined;
|
|
792
882
|
/** Scoped models for cycling (from --models flag) */
|
|
793
883
|
get scopedModels(): ReadonlyArray<{
|
|
794
|
-
model: Model<
|
|
884
|
+
model: Model<Api>;
|
|
795
885
|
thinkingLevel?: ThinkingLevel;
|
|
796
886
|
}>;
|
|
797
887
|
/** Update scoped models for cycling */
|
|
798
888
|
setScopedModels(scopedModels: Array<{
|
|
799
|
-
model: Model<
|
|
889
|
+
model: Model<Api>;
|
|
800
890
|
thinkingLevel?: ThinkingLevel;
|
|
801
891
|
}>): void;
|
|
802
892
|
/** File-based prompt templates */
|
|
@@ -807,10 +897,20 @@ export declare class AgentSession {
|
|
|
807
897
|
private _refreshBaseSystemPrompt;
|
|
808
898
|
/**
|
|
809
899
|
* Build a system prompt for a specific tool surface WITHOUT touching the session's base prompt
|
|
810
|
-
* state (
|
|
900
|
+
* state (used by the router's model swap; see {@link SystemPromptBuilder.buildSystemPromptForToolNames}).
|
|
811
901
|
*/
|
|
812
902
|
private _buildSystemPromptForToolNames;
|
|
813
903
|
private _runAgentPrompt;
|
|
904
|
+
private _queueWorkerHumanInput;
|
|
905
|
+
private _schedulePendingWorkerHumanInputs;
|
|
906
|
+
private _scheduleWorkerHumanInput;
|
|
907
|
+
private _resolveWorkerHumanInput;
|
|
908
|
+
/**
|
|
909
|
+
* Re-enter an interrupted ask_question call from its durable request snapshot. Pending requests
|
|
910
|
+
* are presented again; already-checkpointed answers are replayed without asking twice. The
|
|
911
|
+
* original toolCallId is preserved so provider tool-call ordering remains valid on /resume.
|
|
912
|
+
*/
|
|
913
|
+
resumePendingHumanInput(): Promise<boolean>;
|
|
814
914
|
/**
|
|
815
915
|
* Shared {@link OllamaRuntime} for a given server, lazily created and cached by baseUrl so every
|
|
816
916
|
* caller — the router's readiness gate and any host UI's own model-lifecycle commands (e.g.
|
|
@@ -819,11 +919,25 @@ export declare class AgentSession {
|
|
|
819
919
|
*/
|
|
820
920
|
getLocalRuntime(baseUrl?: string): OllamaRuntime;
|
|
821
921
|
getTransformersRuntime(modelId: string, baseUrl?: string): TransformersRuntime;
|
|
922
|
+
/** Shared {@link PrismLlamaCppRuntime} for pi's own managed prism install — see
|
|
923
|
+
* {@link LocalRuntimeController.getPrismLlamaCppRuntime}. Delegates so `/models` and the
|
|
924
|
+
* readiness gate share the SAME cached instance, same contract as getLocalRuntime above. */
|
|
925
|
+
getPrismLlamaCppRuntime(): PrismLlamaCppRuntime;
|
|
822
926
|
/** models.json registers a local model's baseUrl as `<server>/v1` (OpenAI-compat); the runtime's
|
|
823
927
|
* own health/boot endpoints are on the Ollama-native server root. Delegates to
|
|
824
928
|
* {@link LocalRuntimeController}; kept here for `_warnIfManualModelChoiceIsRisky`'s own use. */
|
|
825
929
|
private _deriveOllamaServerUrl;
|
|
826
930
|
private _ensureRouteModelReady;
|
|
931
|
+
/**
|
|
932
|
+
* Every local model the CURRENT (post-reload) configuration could still route a turn to —
|
|
933
|
+
* the foreground model plus any router tier (cheap/medium/expensive) that still resolves to a
|
|
934
|
+
* real, authed, non-exhausted model. Fed to {@link LocalRuntimeController.reconcile} via the
|
|
935
|
+
* `reconcileLocalRuntimes` hook above, ONLY after a reload generation has fully committed, so a
|
|
936
|
+
* local model dropped from the live configuration has its pi-spawned runtime stopped instead of
|
|
937
|
+
* leaking a child process, while one still referenced here is left untouched. Read-only — never
|
|
938
|
+
* used for routing itself.
|
|
939
|
+
*/
|
|
940
|
+
private _collectEligibleLocalModelsForReconcile;
|
|
827
941
|
getModelRouterStatus(formatLabel?: (label: string) => string): string;
|
|
828
942
|
private _handlePostAgentRun;
|
|
829
943
|
/**
|
|
@@ -926,7 +1040,7 @@ export declare class AgentSession {
|
|
|
926
1040
|
* Abort current operation and wait for agent to become idle.
|
|
927
1041
|
*/
|
|
928
1042
|
abort(): Promise<void>;
|
|
929
|
-
setModel(model: Model<
|
|
1043
|
+
setModel(model: Model<Api>, options?: {
|
|
930
1044
|
persistSettings?: boolean;
|
|
931
1045
|
}): Promise<void>;
|
|
932
1046
|
/** Re-resolve startup profile model/thinking after allowed extension providers are bound. */
|
|
@@ -977,7 +1091,18 @@ export declare class AgentSession {
|
|
|
977
1091
|
private _checkContextWindowUsageWarning;
|
|
978
1092
|
private _checkCompaction;
|
|
979
1093
|
private _measureLiveContextTokensForCompaction;
|
|
1094
|
+
/**
|
|
1095
|
+
* Internal: Run auto-compaction with events.
|
|
1096
|
+
*/
|
|
980
1097
|
private _runAutoCompaction;
|
|
1098
|
+
/**
|
|
1099
|
+
* Run one compaction attempt, retrying retryable provider failures (stream stalls,
|
|
1100
|
+
* 429/5xx, network drops) with the session's retry policy. The reliability kernel
|
|
1101
|
+
* classifies a stall as retryable by design (see withStreamIdleWatchdog); without this
|
|
1102
|
+
* loop a single transient killed the whole compaction while ordinary turns survived the
|
|
1103
|
+
* same failure via auto-retry. Caller aborts are never retried; sleepAbortable rejects
|
|
1104
|
+
* with the abort reason if the signal fires mid-backoff.
|
|
1105
|
+
*/
|
|
981
1106
|
private _compactWithRetry;
|
|
982
1107
|
/**
|
|
983
1108
|
* Toggle auto-compaction setting.
|
|
@@ -995,11 +1120,11 @@ export declare class AgentSession {
|
|
|
995
1120
|
/** Register a memory provider contributed by an extension; applied on the next memory (re)init. */
|
|
996
1121
|
registerMemoryProvider(provider: MemoryProvider): void;
|
|
997
1122
|
registerContextMemoryProvider(provider: ContextMemoryProvider): void;
|
|
998
|
-
/**
|
|
1123
|
+
/** The gateway/scheduler registry. A deployment runner registers providers and drives start/stop. */
|
|
999
1124
|
get gateways(): GatewayRegistry;
|
|
1000
|
-
/**
|
|
1125
|
+
/** Register a deployment-supplied transport channel (gateway). */
|
|
1001
1126
|
registerChannelProvider(provider: ChannelProvider): void;
|
|
1002
|
-
/**
|
|
1127
|
+
/** Register a deployment-supplied job scheduler (cron). */
|
|
1003
1128
|
registerJobScheduler(provider: JobSchedulerProvider): void;
|
|
1004
1129
|
private _refreshToolRegistry;
|
|
1005
1130
|
reload(): Promise<void>;
|
|
@@ -1023,14 +1148,6 @@ export declare class AgentSession {
|
|
|
1023
1148
|
* Falls back to full reload if any individual load/unload fails.
|
|
1024
1149
|
*/
|
|
1025
1150
|
reconcileLoadedExtensions(): Promise<void>;
|
|
1026
|
-
/**
|
|
1027
|
-
* Check if an error is retryable (transient provider/network failures). Billing/quota and auth
|
|
1028
|
-
* are terminal; context overflow is handled by compaction, not retry. The verdict comes from the
|
|
1029
|
-
* reliability kernel's classifier, fed the host-computed context-overflow flag.
|
|
1030
|
-
*/
|
|
1031
|
-
private _classifyAssistantError;
|
|
1032
|
-
private _isRetryableError;
|
|
1033
|
-
private _prepareRetry;
|
|
1034
1151
|
/**
|
|
1035
1152
|
* Cancel in-progress retry.
|
|
1036
1153
|
*/
|
|
@@ -1096,6 +1213,21 @@ export declare class AgentSession {
|
|
|
1096
1213
|
* Retrieve the latest valid goal state snapshot from the session log.
|
|
1097
1214
|
*/
|
|
1098
1215
|
getGoalStateSnapshot(): GoalState | undefined;
|
|
1216
|
+
/**
|
|
1217
|
+
* Persist one submitted continuation pass's turn/wall-clock/spend contribution onto the active
|
|
1218
|
+
* goal's durable cumulative budget (see `GoalState.continuationTurnsUsed` et al.). This is the
|
|
1219
|
+
* "persistence dep" `GoalLoopController` calls once per pass actually submitted — it, not the
|
|
1220
|
+
* loop controller, is where USD gets attributed: it reads the session's OWN cumulative model
|
|
1221
|
+
* spend (`getCostSummary().ownCost` — deliberately excludes worker/subagent spend, which is
|
|
1222
|
+
* tracked and budgeted separately) and threads that single absolute reading into a
|
|
1223
|
+
* `record_continuation_budget` event; the pure reducer in `goal-state.ts` derives the delta.
|
|
1224
|
+
* A no-op when no goal state exists (defensive — in practice this is only ever called right
|
|
1225
|
+
* after a pass the loop already confirmed was submitted against an active goal).
|
|
1226
|
+
*/
|
|
1227
|
+
recordGoalContinuationPass(pass: {
|
|
1228
|
+
turns: number;
|
|
1229
|
+
wallClockMs: number;
|
|
1230
|
+
}): void;
|
|
1099
1231
|
/** Save native task-step state to the active session log. */
|
|
1100
1232
|
saveTaskStepsStateSnapshot(state: TaskStepsState): string;
|
|
1101
1233
|
/** Retrieve the latest valid native task-step state from the active session log. */
|
|
@@ -1107,26 +1239,43 @@ export declare class AgentSession {
|
|
|
1107
1239
|
*/
|
|
1108
1240
|
saveEvidenceBundleSnapshot(bundle: EvidenceBundle): string;
|
|
1109
1241
|
/**
|
|
1110
|
-
* Retrieve the latest valid evidence bundle snapshot from the
|
|
1242
|
+
* Retrieve the latest valid evidence bundle snapshot from the active branch.
|
|
1111
1243
|
*/
|
|
1112
1244
|
getEvidenceBundleSnapshot(): EvidenceBundle | undefined;
|
|
1245
|
+
/** Retrieve all valid evidence bundle snapshots from the active branch. */
|
|
1113
1246
|
getEvidenceBundleSnapshots(): EvidenceBundle[];
|
|
1114
1247
|
/** Live lane records tracked by this process (running and terminal). */
|
|
1115
1248
|
getLaneRecords(): LaneRecord[];
|
|
1116
1249
|
private _emitAutonomyTelemetry;
|
|
1117
1250
|
private _recordGateOutcome;
|
|
1118
|
-
/**
|
|
1251
|
+
/** Copies of the bounded gate-outcome history, oldest first, latest last. */
|
|
1119
1252
|
getGateOutcomeHistory(): GateOutcomeHistoryEntry[];
|
|
1120
|
-
|
|
1121
|
-
|
|
1253
|
+
saveWorkerClaimSnapshot(claim: WorkerClaim, request?: WorkerRequest): string;
|
|
1254
|
+
getWorkerClaimSnapshots(): WorkerClaim[];
|
|
1122
1255
|
saveLearningDecisionSnapshot(decision: LearningDecision): string;
|
|
1123
1256
|
getLearningDecisionSnapshots(): LearningDecision[];
|
|
1257
|
+
/**
|
|
1258
|
+
* The single injection point that makes the goal-continuation snapshot lane-aware:
|
|
1259
|
+
* `laneRecords` feeds BOTH `evaluateGoalContinuation`'s "waiting" branch (a worker dispatched
|
|
1260
|
+
* against an open requirement) and the per-goal worker-spend overlay — read fresh here so BOTH the
|
|
1261
|
+
* goal loop (`GoalLoopController`) and the idle scheduler (`BackgroundLaneController`) see the
|
|
1262
|
+
* same live lane state, since both reach this same method.
|
|
1263
|
+
*/
|
|
1124
1264
|
getGoalRuntimeSnapshot(settings: GoalRuntimeSnapshotSettings): GoalRuntimeSnapshot;
|
|
1125
1265
|
/**
|
|
1126
1266
|
* Capability profile derived from the CURRENT session model's own metadata (context window),
|
|
1127
1267
|
* honoring the modelCapability.mode setting ("off" disables, a class name forces).
|
|
1128
1268
|
*/
|
|
1129
1269
|
getModelCapabilityProfile(): ModelCapabilityProfile;
|
|
1270
|
+
/**
|
|
1271
|
+
* Whether the CURRENT session model may drive a worktree-sync lane worker (see
|
|
1272
|
+
* `evaluateLaneWorkerRefusal` in model-capability.ts): full capability class, a DECLARED
|
|
1273
|
+
* (registry) context window, an ADVERTISED native tool-call path (`Model.textToolCallProtocol`
|
|
1274
|
+
* unset/false -- `true` means phone-only), and no graded `/toolprobe` demotion to
|
|
1275
|
+
* "text-protocol"/"none" on record. An unprobed model (no verdict on record yet) is eligible on
|
|
1276
|
+
* its advertised support alone. `undefined` means eligible.
|
|
1277
|
+
*/
|
|
1278
|
+
getLaneWorkerRefusal(): LaneWorkerRefusal | undefined;
|
|
1130
1279
|
/**
|
|
1131
1280
|
* Run one bounded, read-only research pass and persist its results. Delegates to
|
|
1132
1281
|
* {@link BackgroundLaneController}; see there for the full gating/budget/dedupe contract.
|
|
@@ -1137,14 +1286,10 @@ export declare class AgentSession {
|
|
|
1137
1286
|
goalId?: string;
|
|
1138
1287
|
}): Promise<ResearchLaneRunOutcome>;
|
|
1139
1288
|
/**
|
|
1140
|
-
* Run one bounded
|
|
1289
|
+
* Run one bounded profile-bound worker delegation. Delegates to {@link BackgroundLaneController};
|
|
1141
1290
|
* consumed by the `delegate` tool.
|
|
1142
1291
|
*/
|
|
1143
|
-
runWorkerDelegationOnce(request:
|
|
1144
|
-
instructions: string;
|
|
1145
|
-
systemPrompt?: string;
|
|
1146
|
-
memoryRead?: boolean;
|
|
1147
|
-
}): Promise<WorkerDelegationRunOutcome>;
|
|
1292
|
+
runWorkerDelegationOnce(request: WorkerDelegationRequest): Promise<WorkerDelegationRunOutcome>;
|
|
1148
1293
|
/**
|
|
1149
1294
|
* Probe a candidate model against the subagent contracts. Delegates to
|
|
1150
1295
|
* {@link BackgroundLaneController}; probe spend is reported through spawned-usage accounting.
|
|
@@ -1163,6 +1308,13 @@ export declare class AgentSession {
|
|
|
1163
1308
|
/** Fitness reports persisted for THIS host (measured evidence for architect/profile decisions). */
|
|
1164
1309
|
getStoredFitnessReports(): StoredFitnessReport[];
|
|
1165
1310
|
continueGoalOnce(options: GoalContinuationOnceOptions): Promise<GoalContinuationOnceResult>;
|
|
1311
|
+
/**
|
|
1312
|
+
* Public entry point for BOTH idle autosteer and manual (`/goal start`, `/goal-continue`)
|
|
1313
|
+
* continuation. Delegates to {@link BackgroundLaneController.continueGoalLoopExclusive}, the
|
|
1314
|
+
* single-flight guard that prevents two goal loops from racing to submit prompts through the
|
|
1315
|
+
* same session (which throws "Agent is already processing" from the second submission). Do not
|
|
1316
|
+
* call `this._goalContinuation.continueGoalLoop` directly from here — that bypasses the guard.
|
|
1317
|
+
*/
|
|
1166
1318
|
continueGoalLoop(options: GoalContinuationLoopOptions): Promise<GoalContinuationLoopResult>;
|
|
1167
1319
|
/**
|
|
1168
1320
|
* Run a one-shot LLM completion fully ISOLATED from the main session — the load-bearing primitive
|
|
@@ -1170,13 +1322,13 @@ export declare class AgentSession {
|
|
|
1170
1322
|
*/
|
|
1171
1323
|
runIsolatedCompletion(opts: IsolatedCompletionOptions): Promise<IsolatedCompletionResult>;
|
|
1172
1324
|
/**
|
|
1173
|
-
* Native end-of-loop reflection pass
|
|
1325
|
+
* Native end-of-loop reflection pass. Delegates to {@link ReflectionController}; returns null
|
|
1174
1326
|
* when the demand gate skips or in a child session.
|
|
1175
1327
|
*/
|
|
1176
1328
|
runReflectionPass(input: {
|
|
1177
1329
|
signals: DemandSignals;
|
|
1178
1330
|
recentTurnText: string;
|
|
1179
|
-
model?: Model<
|
|
1331
|
+
model?: Model<Api>;
|
|
1180
1332
|
thinkingLevel?: ThinkingLevel;
|
|
1181
1333
|
signal?: AbortSignal;
|
|
1182
1334
|
/** Stable id so a duplicate scheduling/retry of the same pass can't double-count its cost. */
|