@caupulican/pi-adaptative 0.81.39 → 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 +52 -0
- package/README.md +2 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts +2 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js +2 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.ts +3 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts +9 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js +290 -107
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.ts +357 -122
- package/dist/bundled-resources/skills/tool-call-repair/references/repair-catalogue.md +2 -2
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +9 -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 +19 -2
- package/dist/core/agent-paths.d.ts.map +1 -1
- package/dist/core/agent-paths.js +67 -4
- package/dist/core/agent-paths.js.map +1 -1
- 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 +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +71 -136
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +477 -1318
- 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 +20 -12
- 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 +14 -0
- package/dist/core/autonomy/lane-tracker.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tracker.js +38 -0
- 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 +54 -236
- package/dist/core/background-lane-controller.d.ts.map +1 -1
- package/dist/core/background-lane-controller.js +140 -1273
- package/dist/core/background-lane-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 +12 -11
- package/dist/core/compaction-support.d.ts.map +1 -1
- 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-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 +10 -5
- package/dist/core/context-gc.js.map +1 -1
- package/dist/core/context-pipeline.d.ts.map +1 -1
- package/dist/core/context-pipeline.js +9 -4
- package/dist/core/context-pipeline.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-result.d.ts → worker-claim.d.ts} +13 -13
- package/dist/core/delegation/worker-claim.d.ts.map +1 -0
- package/dist/core/delegation/{worker-result.js → worker-claim.js} +61 -51
- 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 +50 -15
- 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 +6 -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 +70 -21
- 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/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 +1 -1
- package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-controller.js +10 -0
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts +1 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.js +6 -6
- 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 +11 -9
- package/dist/core/goals/goal-runtime-snapshot.d.ts.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.js +10 -8
- package/dist/core/goals/goal-runtime-snapshot.js.map +1 -1
- package/dist/core/goals/goal-state.d.ts +1 -0
- package/dist/core/goals/goal-state.d.ts.map +1 -1
- package/dist/core/goals/goal-state.js +7 -10
- package/dist/core/goals/goal-state.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts +8 -6
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js +11 -41
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/goals/session-goal-state.d.ts +2 -4
- package/dist/core/goals/session-goal-state.d.ts.map +1 -1
- package/dist/core/goals/session-goal-state.js +10 -33
- 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 +17 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +24 -6
- 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/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/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.map +1 -1
- package/dist/core/model-capability.js +1 -0
- 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-controller.d.ts.map +1 -1
- package/dist/core/model-router-controller.js +2 -2
- 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 +4 -6
- package/dist/core/models/adaptation-store.d.ts.map +1 -1
- package/dist/core/models/adaptation-store.js +95 -83
- package/dist/core/models/adaptation-store.js.map +1 -1
- package/dist/core/models/fitness-store.d.ts +2 -12
- package/dist/core/models/fitness-store.d.ts.map +1 -1
- package/dist/core/models/fitness-store.js +84 -57
- 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/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/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 +14 -3
- package/dist/core/process-matrix/codes.d.ts.map +1 -1
- package/dist/core/process-matrix/codes.js.map +1 -1
- 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 +37 -22
- package/dist/core/process-matrix/runtime.d.ts.map +1 -1
- package/dist/core/process-matrix/runtime.js +399 -76
- package/dist/core/process-matrix/runtime.js.map +1 -1
- package/dist/core/process-matrix/store.d.ts +5 -2
- package/dist/core/process-matrix/store.d.ts.map +1 -1
- package/dist/core/process-matrix/store.js +123 -14
- package/dist/core/process-matrix/store.js.map +1 -1
- package/dist/core/process-matrix/supervisor.d.ts +10 -7
- package/dist/core/process-matrix/supervisor.d.ts.map +1 -1
- package/dist/core/process-matrix/supervisor.js +45 -14
- package/dist/core/process-matrix/supervisor.js.map +1 -1
- package/dist/core/profile-registry.d.ts.map +1 -1
- package/dist/core/profile-registry.js +6 -8
- package/dist/core/profile-registry.js.map +1 -1
- package/dist/core/reflection-controller.d.ts +4 -4
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +2 -1
- package/dist/core/reflection-controller.js.map +1 -1
- package/dist/core/reload-blockers.d.ts.map +1 -1
- package/dist/core/reload-blockers.js +6 -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 +7 -2
- 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 +26 -20
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +237 -178
- package/dist/core/runtime-builder.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 +61 -24
- 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 +6 -4
- package/dist/core/session-role.d.ts.map +1 -1
- package/dist/core/session-role.js +10 -4
- package/dist/core/session-role.js.map +1 -1
- 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 +9 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +80 -28
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tasks/session-task-state.d.ts +2 -4
- package/dist/core/tasks/session-task-state.d.ts.map +1 -1
- package/dist/core/tasks/session-task-state.js +10 -28
- package/dist/core/tasks/session-task-state.js.map +1 -1
- 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 +4 -0
- package/dist/core/tasks/task-state.d.ts.map +1 -1
- package/dist/core/tasks/task-state.js +28 -11
- 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-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 +2 -3
- package/dist/core/tool-recovery-log-records.d.ts.map +1 -1
- package/dist/core/tool-recovery-log-records.js +9 -35
- package/dist/core/tool-recovery-log-records.js.map +1 -1
- package/dist/core/tool-selection/tool-performance-store.d.ts +3 -7
- package/dist/core/tool-selection/tool-performance-store.d.ts.map +1 -1
- package/dist/core/tool-selection/tool-performance-store.js +97 -138
- package/dist/core/tool-selection/tool-performance-store.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/delegate-status.d.ts +31 -3
- package/dist/core/tools/delegate-status.d.ts.map +1 -1
- package/dist/core/tools/delegate-status.js +149 -29
- 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 +108 -23
- 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 +5 -5
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +10 -10
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/model-fitness.d.ts.map +1 -1
- package/dist/core/tools/model-fitness.js +2 -2
- 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/task-steps.d.ts +2 -0
- package/dist/core/tools/task-steps.d.ts.map +1 -1
- package/dist/core/tools/task-steps.js +102 -0
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/core/tools/tmux-dispatch.d.ts +3 -5
- package/dist/core/tools/tmux-dispatch.d.ts.map +1 -1
- package/dist/core/tools/tmux-dispatch.js +4 -4
- package/dist/core/tools/tmux-dispatch.js.map +1 -1
- package/dist/core/tools/windows-shell-engine.d.ts.map +1 -1
- package/dist/core/tools/windows-shell-engine.js +4 -6
- package/dist/core/tools/windows-shell-engine.js.map +1 -1
- 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/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/store.d.ts +3 -3
- package/dist/core/worktree-sync/store.d.ts.map +1 -1
- package/dist/core/worktree-sync/store.js +10 -5
- package/dist/core/worktree-sync/store.js.map +1 -1
- 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 +128 -44
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +4 -6
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +186 -28
- package/dist/migrations.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/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 +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +63 -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/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 +50 -17
- 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/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/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 +59 -26
- package/docs/rpc.md +45 -2
- package/docs/sessions.md +15 -0
- package/docs/settings.md +125 -11
- package/docs/task-steps.md +8 -0
- package/docs/telemetry.md +19 -0
- package/docs/tmux-agent-manager.md +10 -3
- 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/work-directory.md +19 -8
- 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 +4 -4
- package/dist/core/delegation/session-worker-result.d.ts +0 -46
- package/dist/core/delegation/session-worker-result.d.ts.map +0 -1
- package/dist/core/delegation/session-worker-result.js +0 -113
- package/dist/core/delegation/session-worker-result.js.map +0 -1
- package/dist/core/delegation/worker-result.d.ts.map +0 -1
- 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
|
@@ -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,6 +18,7 @@ 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";
|
|
@@ -30,10 +31,10 @@ import { type CurationProposals } from "./learning/skill-curator.ts";
|
|
|
30
31
|
import type { MemoryProvider } from "./memory/memory-provider.ts";
|
|
31
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
35
|
import type { PrismLlamaCppRuntime } from "./models/llamacpp-runtime.ts";
|
|
36
36
|
import type { LocalRuntimeDeps, OllamaRuntime, TransformersRuntime } from "./models/local-runtime.ts";
|
|
37
|
+
import type { OrchestrationProfile } from "./orchestration/contracts.ts";
|
|
37
38
|
import { type PromptTemplate } from "./prompt-templates.ts";
|
|
38
39
|
import type { ModelFitnessReport } from "./research/model-fitness.ts";
|
|
39
40
|
import type { ResearchRunResult } from "./research/research-runner.ts";
|
|
@@ -42,6 +43,7 @@ import type { ResourceLoader } from "./resource-loader.ts";
|
|
|
42
43
|
import { type ToolArgumentValidationStats } from "./session-analytics.ts";
|
|
43
44
|
import type { ResourceProfileFilterSettings, SettingsManager } from "./settings-manager.ts";
|
|
44
45
|
import { type TaskStepsState } from "./tasks/task-state.ts";
|
|
46
|
+
import { type ToolProbeReport } from "./tool-protocol-controller.ts";
|
|
45
47
|
import type { BashOperations } from "./tools/bash.ts";
|
|
46
48
|
/**
|
|
47
49
|
* Test hook: override the stream-idle bounds so a stall can be provoked in-suite without a
|
|
@@ -138,7 +140,7 @@ export interface AgentSessionConfig {
|
|
|
138
140
|
agentDir?: string;
|
|
139
141
|
/** Models to cycle through with Ctrl+P (from --models flag) */
|
|
140
142
|
scopedModels?: Array<{
|
|
141
|
-
model: Model<
|
|
143
|
+
model: Model<Api>;
|
|
142
144
|
thinkingLevel?: ThinkingLevel;
|
|
143
145
|
}>;
|
|
144
146
|
/** Resource loader for skills, prompts, themes, context files, system prompt */
|
|
@@ -183,6 +185,8 @@ export interface AgentSessionConfig {
|
|
|
183
185
|
* defaults to the real, best-effort collector.
|
|
184
186
|
*/
|
|
185
187
|
collectWorkspaceSources?: typeof collectWorkspaceSources;
|
|
188
|
+
/** Immutable owner-authored orchestration policy; dispatch cannot mutate it. */
|
|
189
|
+
orchestrationProfile?: OrchestrationProfile;
|
|
186
190
|
/**
|
|
187
191
|
* Injected fetch/spawn/exists for the local (Ollama) runtime health-check + boot used by the
|
|
188
192
|
* model router before a turn routed to a local model (see LocalRuntimeController.ensureLocalModelReady).
|
|
@@ -215,30 +219,27 @@ export interface PromptOptions {
|
|
|
215
219
|
/** Whether an idle active goal should auto-inject bounded continuation prompts after this prompt settles. Default: true. */
|
|
216
220
|
autoContinueGoal?: boolean;
|
|
217
221
|
}
|
|
218
|
-
export type ToolProbeVerdict
|
|
219
|
-
export interface ToolProbeResult {
|
|
220
|
-
model: string;
|
|
221
|
-
verdict: ToolProbeVerdict;
|
|
222
|
-
variant?: TextToolProtocolVariant;
|
|
223
|
-
nativeGrade?: NativeToolProbeGrade;
|
|
224
|
-
diagnostic?: string;
|
|
225
|
-
}
|
|
226
|
-
export interface ToolProbeReport {
|
|
227
|
-
results: ToolProbeResult[];
|
|
228
|
-
table: string;
|
|
229
|
-
}
|
|
222
|
+
export type { ToolProbeReport, ToolProbeResult, ToolProbeVerdict } from "./tool-protocol-controller.ts";
|
|
230
223
|
/** Result from cycleModel() */
|
|
231
224
|
export interface ModelCycleResult {
|
|
232
|
-
model: Model<
|
|
225
|
+
model: Model<Api>;
|
|
233
226
|
thinkingLevel: ThinkingLevel;
|
|
234
227
|
/** Whether cycling through scoped models (--models flag) or all available */
|
|
235
228
|
isScoped: boolean;
|
|
236
229
|
}
|
|
237
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
|
+
}
|
|
238
238
|
export interface CompactionGateStats {
|
|
239
239
|
gateFailures: number;
|
|
240
240
|
deterministicGapFills: number;
|
|
241
241
|
compactionsWithGateFailures: number;
|
|
242
|
+
checks: Record<string, CompactionGateCheckStats>;
|
|
242
243
|
}
|
|
243
244
|
export interface SessionStats {
|
|
244
245
|
sessionFile: string | undefined;
|
|
@@ -327,7 +328,7 @@ export interface IsolatedCompletionOptions {
|
|
|
327
328
|
/** The isolated conversation (e.g. the reflection prompt). NOT the main session history. */
|
|
328
329
|
messages: Message[];
|
|
329
330
|
/** Model to use. Defaults to the session model; callers should pass a cheap model. */
|
|
330
|
-
model?: Model<
|
|
331
|
+
model?: Model<Api>;
|
|
331
332
|
/** Thinking level. Defaults to "off" to keep the call cheap. */
|
|
332
333
|
thinkingLevel?: ThinkingLevel;
|
|
333
334
|
/** Output token cap. */
|
|
@@ -380,7 +381,7 @@ export declare const DEFAULT_ISOLATED_LANE_KIND = "isolated";
|
|
|
380
381
|
* same cache-warm backend — while remaining fully synthetic: it is a salted hash, namespaced with a
|
|
381
382
|
* `lane:` prefix, and never derived from or equal to the real session id.
|
|
382
383
|
*/
|
|
383
|
-
export declare function computeLaneAffinityKey(laneKind: string, model: Model<
|
|
384
|
+
export declare function computeLaneAffinityKey(laneKind: string, model: Model<Api> | undefined, systemPrompt: string): string;
|
|
384
385
|
/** Result of an isolated completion: the text, the usage spent, and the stop reason. */
|
|
385
386
|
export interface IsolatedCompletionResult {
|
|
386
387
|
text: string;
|
|
@@ -439,17 +440,16 @@ export declare class AgentSession {
|
|
|
439
440
|
private _queuedExtensionCommands;
|
|
440
441
|
private _pendingNextTurnMessages;
|
|
441
442
|
private _streamingPromptSubmissionTail;
|
|
443
|
+
/** Serializes owner-input overlays so concurrent worker terminals cannot replace each other. */
|
|
444
|
+
private _humanInputTail;
|
|
445
|
+
private _activeHumanInputRequestIds;
|
|
442
446
|
/**
|
|
443
447
|
* The last tool set requested via setActiveToolsByName BEFORE model-capability filtering, so
|
|
444
448
|
* switching from a small-window model back to a large one restores the full requested set.
|
|
445
449
|
*/
|
|
446
450
|
private _requestedActiveToolNames;
|
|
447
|
-
private _compactionAbortController;
|
|
448
|
-
private _autoCompactionAbortController;
|
|
449
|
-
private _overflowRecoveryAttempted;
|
|
450
451
|
private _unboundToolGrantWarnings;
|
|
451
452
|
private _branchSummaryAbortController;
|
|
452
|
-
private _retryController;
|
|
453
453
|
private readonly _modelSelection;
|
|
454
454
|
private readonly _bash;
|
|
455
455
|
private readonly _profileFilter;
|
|
@@ -466,31 +466,16 @@ export declare class AgentSession {
|
|
|
466
466
|
private _agentDir;
|
|
467
467
|
private _collectWorkspaceSources;
|
|
468
468
|
private readonly _localRuntimeController;
|
|
469
|
-
private readonly
|
|
469
|
+
private readonly _toolProtocol;
|
|
470
470
|
private _prefixWarmer;
|
|
471
471
|
private readonly _completedPrefixWarms;
|
|
472
|
-
private readonly _repairModeSessionCounts;
|
|
473
|
-
private readonly _textProtocolParseFailures;
|
|
474
|
-
private _textProtocolParseObservedThisTurn;
|
|
475
|
-
/** Total text-protocol parse-failure events observed this session, backing the
|
|
476
|
-
* {@link TEXT_TOOL_PROTOCOL_STEER_INTERVAL} throttle on {@link _maybeInjectTextProtocolCorrectiveSteer}. */
|
|
477
|
-
private _textProtocolCorrectiveSteerCount;
|
|
478
|
-
/** Monotonic counter backing tool-probe/text-protocol-calibration spawned-usage reportIds
|
|
479
|
-
* (see {@link _nextProbeUsageReportId}); guarantees each probe/calibration completion in the
|
|
480
|
-
* session lands in the cost ledger exactly once, even across repeated /toolprobe invocations. */
|
|
481
|
-
private _toolProbeUsageReportSeq;
|
|
482
|
-
/** Anti-loop: modelKeys the evidence-gated auto-probe has already fired for THIS session (see
|
|
483
|
-
* {@link _maybeAutoProbeOnValidationEscalation}), so a burst of validation-escalation events for
|
|
484
|
-
* the same still-failing model never re-fires the probe more than once per session. */
|
|
485
|
-
private readonly _autoProbedModels;
|
|
486
|
-
private _textProtocolValidationOutcomeThisTurn;
|
|
487
472
|
/** Assembles the session's base system prompt from live session state (see
|
|
488
473
|
* system-prompt-builder.ts); owns the paired _baseSystemPromptOptions. */
|
|
489
474
|
private readonly _systemPromptBuilder;
|
|
490
475
|
/** Autonomy telemetry sink + status/diagnostic snapshots (see autonomy-telemetry.ts); owns
|
|
491
476
|
* the latest gate outcome and the bounded gate-outcome history. */
|
|
492
477
|
private readonly _autonomyTelemetry;
|
|
493
|
-
/** Goal auto-continue + research lane +
|
|
478
|
+
/** Goal auto-continue + research lane + profile-bound worker delegation + model-fitness probe (see
|
|
494
479
|
* background-lane-controller.ts); owns the lane timers/guards, the last research-lane skip
|
|
495
480
|
* reason, the live LaneTracker, and the in-flight research/worker abort controllers. */
|
|
496
481
|
private readonly _backgroundLanes;
|
|
@@ -499,6 +484,7 @@ export declare class AgentSession {
|
|
|
499
484
|
* effectiveness tracker, and the extension-contributed pending providers. */
|
|
500
485
|
private readonly _memory;
|
|
501
486
|
private readonly _compactionSupport;
|
|
487
|
+
private readonly _compaction;
|
|
502
488
|
/** Per-turn context-shaping subsystem (see context-pipeline.ts); owns the latest
|
|
503
489
|
* audit/policy/correlation/enforcement/gc reports, the brain-curation sidecar + its skip reasons,
|
|
504
490
|
* and the tool-output artifact store. Invoked stage-by-stage from the context transform. */
|
|
@@ -528,12 +514,13 @@ export declare class AgentSession {
|
|
|
528
514
|
* used by the status report. Its parallel routed drive path delegates every turn back to
|
|
529
515
|
* {@link _runAgentPrompt} so the drive loop stays host-side. */
|
|
530
516
|
private readonly _modelRouter;
|
|
531
|
-
private readonly
|
|
517
|
+
private readonly _foregroundRecovery;
|
|
532
518
|
private readonly _failureCorpus;
|
|
533
519
|
private readonly _toolRecoveryLogger;
|
|
534
520
|
private readonly _toolRecoveryEventLogPath;
|
|
535
521
|
private _skillCuratorInstance?;
|
|
536
522
|
private _disposed;
|
|
523
|
+
private _disposeCompletion;
|
|
537
524
|
private readonly _reflectionAbort;
|
|
538
525
|
/** Native reflection engine + learning-apply/rollback path (see reflection-controller.ts); owns no
|
|
539
526
|
* session state, applies durable writes through the bundled memory tool and the session log. */
|
|
@@ -600,7 +587,8 @@ export declare class AgentSession {
|
|
|
600
587
|
* The ceiling is turn-cumulative: the next foreground call's projection is folded together with
|
|
601
588
|
* background/research/worker/reflection spend recorded SINCE THIS TURN BEGAN — {@link getSpawnedUsage}'s
|
|
602
589
|
* already-recorded rollup (the same read-side-deduped total the footer's SUBAGENTS line uses) minus the
|
|
603
|
-
* baseline snapshotted
|
|
590
|
+
* baseline snapshotted before a new turn enters routing in `_promptUnserialized`
|
|
591
|
+
* ({@link _costGuardTurnBaselineUsd}) — so a
|
|
604
592
|
* turn that is cheap in the foreground but has spent heavily via background lanes THIS turn still trips
|
|
605
593
|
* the warning, while a prior turn's background spend does not keep every later turn's guard stuck
|
|
606
594
|
* "over". A background lane that finishes mid-turn is attributed to whichever turn it completes in.
|
|
@@ -630,67 +618,14 @@ export declare class AgentSession {
|
|
|
630
618
|
restorePromotedSkill(name: string): boolean;
|
|
631
619
|
private _installAgentTurnRefresh;
|
|
632
620
|
private _createAgentContextSnapshot;
|
|
633
|
-
|
|
634
|
-
private _toolRepairSettings;
|
|
635
|
-
private _applyToolRepairLayerSettings;
|
|
636
|
-
private _getModelAdaptationRulesForPrompt;
|
|
637
|
-
private _textProtocolFlag;
|
|
638
|
-
private _streamForToolProbe;
|
|
639
|
-
/** Builds a reportId that uniquely identifies one probe/calibration completion within the
|
|
640
|
-
* session: the model, a caller-supplied `kind` (e.g. "read-task", "echo", or
|
|
641
|
-
* "text-protocol:<variant>"), and a monotonic sequence number. The sequence number (not
|
|
642
|
-
* wall-clock time or randomness) is what guarantees no collision even when the same model+kind
|
|
643
|
-
* is probed again later in the session (e.g. a repeated /toolprobe run), so genuine repeat spend
|
|
644
|
-
* is never silently deduped away. */
|
|
645
|
-
private _nextProbeUsageReportId;
|
|
646
|
-
private _resolveProbeStreamCountingUsage;
|
|
647
|
-
private _textProtocolCalibrationContext;
|
|
648
|
-
private _messageHasToolCallWithStringArgument;
|
|
649
|
-
private _nativeToolProbeSystemPrompt;
|
|
650
|
-
private _runNativeReadTaskProbeTrial;
|
|
651
|
-
private _runNativeEchoToolProbeTrial;
|
|
652
|
-
private _gradeNativeToolCallingForModel;
|
|
653
|
-
private _runTextProtocolTrial;
|
|
654
|
-
private _calibrateTextToolProtocolForModel;
|
|
655
|
-
private _ensureTextToolProtocolForActiveModel;
|
|
656
|
-
private _modelRef;
|
|
657
|
-
/** The persisted `/toolprobe` verdict on record for this model, if any (undefined = unprobed). */
|
|
658
|
-
private _toolProbeVerdict;
|
|
659
|
-
private _formatToolProbeReport;
|
|
660
|
-
private _storeToolProbe;
|
|
621
|
+
/** Compatibility seam retained for focused auto-probe regressions. */
|
|
661
622
|
private _probeToolCallingForModel;
|
|
662
|
-
|
|
623
|
+
/** Compatibility seam retained for focused protocol-selection doctrine regressions. */
|
|
624
|
+
private _resolveModelToolProtocol;
|
|
663
625
|
probeToolCalling(target?: string): Promise<ToolProbeReport>;
|
|
664
|
-
/**
|
|
665
|
-
* The text-protocol circuit breaker. Every parse failure (from either the
|
|
666
|
-
* live per-completion {@link Agent.onTextToolProtocolParse} callback or the post-hoc detection in
|
|
667
|
-
* {@link _recordTextToolProtocolParseOutcomeFromLastAssistant}) gets a throttled one-line
|
|
668
|
-
* corrective steer for the next turn. On the 3rd consecutive SAME-SIGNATURE failure — graded
|
|
669
|
-
* evidence a model genuinely cannot speak this dialect, not a single bad turn — the breaker also
|
|
670
|
-
* demotes the persisted tool-probe verdict to "none" so {@link _textProtocolFlag} reads false next
|
|
671
|
-
* turn and native is attempted instead of thrashing on a protocol this model has proven it can't
|
|
672
|
-
* follow.
|
|
673
|
-
*/
|
|
674
|
-
private _handleTextToolProtocolParse;
|
|
675
|
-
/**
|
|
676
|
-
* A phone model whose envelope fails to parse gets no corrective guidance today —
|
|
677
|
-
* the runaway-loop backstop only trips on repeated PARSED tool-call signatures (agent-loop.ts), so
|
|
678
|
-
* an every-turn unparseable-prose model never trips it. Inject a one-line reminder of the envelope
|
|
679
|
-
* shape as a nextTurn message, reusing {@link formatVariantEnvelope} so the reminder can never
|
|
680
|
-
* drift from the grammar the primer actually teaches. Throttled to the first failure this session
|
|
681
|
-
* and then every {@link TEXT_TOOL_PROTOCOL_STEER_INTERVAL}th after — the breaker above is what
|
|
682
|
-
* actually demotes a genuinely-failing model at the 3rd same-signature failure; this is guidance,
|
|
683
|
-
* not a second counter.
|
|
684
|
-
*/
|
|
685
|
-
private _maybeInjectTextProtocolCorrectiveSteer;
|
|
686
|
-
private _handleTextToolProtocolValidationOutcome;
|
|
687
|
-
private _recordTextToolProtocolParseOutcomeFromLastAssistant;
|
|
688
|
-
private _looksLikeTextToolProtocolAttempt;
|
|
689
|
-
private _tagModelAdaptationRuleTeaching;
|
|
690
|
-
private _repairSessionCount;
|
|
691
|
-
private _handleModelAdaptationTelemetry;
|
|
692
626
|
/** Tool-build call-site delegation to {@link ContextPipeline.getToolArtifactStore}. */
|
|
693
627
|
private _getToolArtifactStore;
|
|
628
|
+
private _getSessionImageStore;
|
|
694
629
|
/**
|
|
695
630
|
* Context-transform hot-path delegation to {@link ContextPipeline.runContextAudit}. Kept as a
|
|
696
631
|
* one-line method (not inlined) so the transform stays the single owner of the pass ordering.
|
|
@@ -779,12 +714,6 @@ export declare class AgentSession {
|
|
|
779
714
|
private _applyContextGc;
|
|
780
715
|
/** Read-only inspection of the latest context-gc report (delegates to {@link ContextPipeline.getContextGcReport}). */
|
|
781
716
|
getContextGcReport(messages?: AgentMessage[]): ContextGcReport;
|
|
782
|
-
/**
|
|
783
|
-
* Context-transform hot-path delegation to {@link ContextPipeline.estimateCurrentContextTokens}. Kept
|
|
784
|
-
* as a one-line method (not inlined) so the transform stays the single owner of the pass ordering;
|
|
785
|
-
* also feeds the per-turn cost guard.
|
|
786
|
-
*/
|
|
787
|
-
private _estimateCurrentContextTokens;
|
|
788
717
|
private _installAgentToolHooks;
|
|
789
718
|
/**
|
|
790
719
|
* The runaway-loop backstop ({@link Agent.maxStallTurns}) stopped a turn stuck repeating one
|
|
@@ -793,11 +722,6 @@ export declare class AgentSession {
|
|
|
793
722
|
* warning through the same event the context-window/compaction backstops use.
|
|
794
723
|
*/
|
|
795
724
|
private _handleRunawayStop;
|
|
796
|
-
/** Anti-loop: true when this model's persisted tool-probe verdict was written within the
|
|
797
|
-
* auto-probe freshness window ({@link AUTO_TOOL_PROBE_FRESHNESS_MS}) — covers a very recent
|
|
798
|
-
* explicit `/toolprobe` run or a fresh circuit-breaker demote from an EARLIER session, complementing
|
|
799
|
-
* the in-session {@link _autoProbedModels} latch. */
|
|
800
|
-
private _hasFreshToolProbeVerdict;
|
|
801
725
|
/**
|
|
802
726
|
* Evidence-gated native→phone auto-probe for a LOCAL/MANAGED model (never cloud — see
|
|
803
727
|
* {@link isLocalOrManagedRouterModel}) that just crossed the tool-argument-validation escalation
|
|
@@ -808,7 +732,7 @@ export declare class AgentSession {
|
|
|
808
732
|
* "native" and is never phoned) entirely OFF the hot path — fired here but never awaited by the
|
|
809
733
|
* caller, so a slow or failing probe can never block or throw the user's in-flight turn.
|
|
810
734
|
* Anti-loop: skipped when this session already auto-probed this model, or a fresh persisted
|
|
811
|
-
* verdict already exists ({@link
|
|
735
|
+
* verdict already exists (enforced by {@link ToolProtocolController}) — otherwise a model that keeps
|
|
812
736
|
* failing validation every turn would re-fire the (multi-completion) probe every single turn.
|
|
813
737
|
*/
|
|
814
738
|
private _maybeAutoProbeOnValidationEscalation;
|
|
@@ -839,7 +763,6 @@ export declare class AgentSession {
|
|
|
839
763
|
private _emit;
|
|
840
764
|
private _notifyWorkerTerminalHandoff;
|
|
841
765
|
private _emitQueueUpdate;
|
|
842
|
-
private _lastAssistantMessage;
|
|
843
766
|
/**
|
|
844
767
|
* User messages already painted to the UI by an early, synthetic `message_start` fired from
|
|
845
768
|
* `_promptUnserialized` — before the model-router judge's bounded LLM call — so the prompt
|
|
@@ -891,10 +814,12 @@ export declare class AgentSession {
|
|
|
891
814
|
* Call this when completely done with the session.
|
|
892
815
|
*/
|
|
893
816
|
dispose(): void;
|
|
817
|
+
/** Dispose synchronously-visible state, then await all session-owned asynchronous shutdowns. */
|
|
818
|
+
disposeAndWait(): Promise<void>;
|
|
894
819
|
/** Full agent state */
|
|
895
820
|
get state(): AgentState;
|
|
896
821
|
/** Current model (may be undefined if not yet selected) */
|
|
897
|
-
get model(): Model<
|
|
822
|
+
get model(): Model<Api> | undefined;
|
|
898
823
|
/** Current thinking level */
|
|
899
824
|
get thinkingLevel(): ThinkingLevel;
|
|
900
825
|
/** Whether agent is currently streaming a response */
|
|
@@ -929,7 +854,7 @@ export declare class AgentSession {
|
|
|
929
854
|
* Changes take effect on the next agent turn.
|
|
930
855
|
*
|
|
931
856
|
* artifact_retrieve is auto-activated as a companion whenever an artifact-producing tool
|
|
932
|
-
* (grep, find, or
|
|
857
|
+
* (grep, find, run_toolkit_script, or ask_question) ends up in the resulting active set and artifact_retrieve
|
|
933
858
|
* is registered (i.e. not excluded/
|
|
934
859
|
* blocked/outside an allowlist -- the registry itself is built with that same filter,
|
|
935
860
|
* so registry presence already tracks "allowed"). This is enforced here, not just in
|
|
@@ -956,12 +881,12 @@ export declare class AgentSession {
|
|
|
956
881
|
get sessionName(): string | undefined;
|
|
957
882
|
/** Scoped models for cycling (from --models flag) */
|
|
958
883
|
get scopedModels(): ReadonlyArray<{
|
|
959
|
-
model: Model<
|
|
884
|
+
model: Model<Api>;
|
|
960
885
|
thinkingLevel?: ThinkingLevel;
|
|
961
886
|
}>;
|
|
962
887
|
/** Update scoped models for cycling */
|
|
963
888
|
setScopedModels(scopedModels: Array<{
|
|
964
|
-
model: Model<
|
|
889
|
+
model: Model<Api>;
|
|
965
890
|
thinkingLevel?: ThinkingLevel;
|
|
966
891
|
}>): void;
|
|
967
892
|
/** File-based prompt templates */
|
|
@@ -976,6 +901,16 @@ export declare class AgentSession {
|
|
|
976
901
|
*/
|
|
977
902
|
private _buildSystemPromptForToolNames;
|
|
978
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>;
|
|
979
914
|
/**
|
|
980
915
|
* Shared {@link OllamaRuntime} for a given server, lazily created and cached by baseUrl so every
|
|
981
916
|
* caller — the router's readiness gate and any host UI's own model-lifecycle commands (e.g.
|
|
@@ -1105,7 +1040,7 @@ export declare class AgentSession {
|
|
|
1105
1040
|
* Abort current operation and wait for agent to become idle.
|
|
1106
1041
|
*/
|
|
1107
1042
|
abort(): Promise<void>;
|
|
1108
|
-
setModel(model: Model<
|
|
1043
|
+
setModel(model: Model<Api>, options?: {
|
|
1109
1044
|
persistSettings?: boolean;
|
|
1110
1045
|
}): Promise<void>;
|
|
1111
1046
|
/** Re-resolve startup profile model/thinking after allowed extension providers are bound. */
|
|
@@ -1156,7 +1091,18 @@ export declare class AgentSession {
|
|
|
1156
1091
|
private _checkContextWindowUsageWarning;
|
|
1157
1092
|
private _checkCompaction;
|
|
1158
1093
|
private _measureLiveContextTokensForCompaction;
|
|
1094
|
+
/**
|
|
1095
|
+
* Internal: Run auto-compaction with events.
|
|
1096
|
+
*/
|
|
1159
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
|
+
*/
|
|
1160
1106
|
private _compactWithRetry;
|
|
1161
1107
|
/**
|
|
1162
1108
|
* Toggle auto-compaction setting.
|
|
@@ -1202,14 +1148,6 @@ export declare class AgentSession {
|
|
|
1202
1148
|
* Falls back to full reload if any individual load/unload fails.
|
|
1203
1149
|
*/
|
|
1204
1150
|
reconcileLoadedExtensions(): Promise<void>;
|
|
1205
|
-
/**
|
|
1206
|
-
* Check if an error is retryable (transient provider/network failures). Billing/quota and auth
|
|
1207
|
-
* are terminal; context overflow is handled by compaction, not retry. The verdict comes from the
|
|
1208
|
-
* reliability kernel's classifier, fed the host-computed context-overflow flag.
|
|
1209
|
-
*/
|
|
1210
|
-
private _classifyAssistantError;
|
|
1211
|
-
private _isRetryableError;
|
|
1212
|
-
private _prepareRetry;
|
|
1213
1151
|
/**
|
|
1214
1152
|
* Cancel in-progress retry.
|
|
1215
1153
|
*/
|
|
@@ -1301,9 +1239,10 @@ export declare class AgentSession {
|
|
|
1301
1239
|
*/
|
|
1302
1240
|
saveEvidenceBundleSnapshot(bundle: EvidenceBundle): string;
|
|
1303
1241
|
/**
|
|
1304
|
-
* Retrieve the latest valid evidence bundle snapshot from the
|
|
1242
|
+
* Retrieve the latest valid evidence bundle snapshot from the active branch.
|
|
1305
1243
|
*/
|
|
1306
1244
|
getEvidenceBundleSnapshot(): EvidenceBundle | undefined;
|
|
1245
|
+
/** Retrieve all valid evidence bundle snapshots from the active branch. */
|
|
1307
1246
|
getEvidenceBundleSnapshots(): EvidenceBundle[];
|
|
1308
1247
|
/** Live lane records tracked by this process (running and terminal). */
|
|
1309
1248
|
getLaneRecords(): LaneRecord[];
|
|
@@ -1311,8 +1250,8 @@ export declare class AgentSession {
|
|
|
1311
1250
|
private _recordGateOutcome;
|
|
1312
1251
|
/** Copies of the bounded gate-outcome history, oldest first, latest last. */
|
|
1313
1252
|
getGateOutcomeHistory(): GateOutcomeHistoryEntry[];
|
|
1314
|
-
|
|
1315
|
-
|
|
1253
|
+
saveWorkerClaimSnapshot(claim: WorkerClaim, request?: WorkerRequest): string;
|
|
1254
|
+
getWorkerClaimSnapshots(): WorkerClaim[];
|
|
1316
1255
|
saveLearningDecisionSnapshot(decision: LearningDecision): string;
|
|
1317
1256
|
getLearningDecisionSnapshots(): LearningDecision[];
|
|
1318
1257
|
/**
|
|
@@ -1347,14 +1286,10 @@ export declare class AgentSession {
|
|
|
1347
1286
|
goalId?: string;
|
|
1348
1287
|
}): Promise<ResearchLaneRunOutcome>;
|
|
1349
1288
|
/**
|
|
1350
|
-
* Run one bounded
|
|
1289
|
+
* Run one bounded profile-bound worker delegation. Delegates to {@link BackgroundLaneController};
|
|
1351
1290
|
* consumed by the `delegate` tool.
|
|
1352
1291
|
*/
|
|
1353
|
-
runWorkerDelegationOnce(request:
|
|
1354
|
-
instructions: string;
|
|
1355
|
-
systemPrompt?: string;
|
|
1356
|
-
memoryRead?: boolean;
|
|
1357
|
-
}): Promise<WorkerDelegationRunOutcome>;
|
|
1292
|
+
runWorkerDelegationOnce(request: WorkerDelegationRequest): Promise<WorkerDelegationRunOutcome>;
|
|
1358
1293
|
/**
|
|
1359
1294
|
* Probe a candidate model against the subagent contracts. Delegates to
|
|
1360
1295
|
* {@link BackgroundLaneController}; probe spend is reported through spawned-usage accounting.
|
|
@@ -1393,7 +1328,7 @@ export declare class AgentSession {
|
|
|
1393
1328
|
runReflectionPass(input: {
|
|
1394
1329
|
signals: DemandSignals;
|
|
1395
1330
|
recentTurnText: string;
|
|
1396
|
-
model?: Model<
|
|
1331
|
+
model?: Model<Api>;
|
|
1397
1332
|
thinkingLevel?: ThinkingLevel;
|
|
1398
1333
|
signal?: AbortSignal;
|
|
1399
1334
|
/** Stable id so a duplicate scheduling/retry of the same pass can't double-count its cost. */
|