@caupulican/pi-adaptative 0.81.39 → 0.81.41
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 +77 -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 +3 -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 +4 -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 +4 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +31 -1
- 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 +25 -2
- package/dist/core/agent-paths.d.ts.map +1 -1
- package/dist/core/agent-paths.js +79 -4
- package/dist/core/agent-paths.js.map +1 -1
- package/dist/core/agent-session-contracts.d.ts +293 -0
- package/dist/core/agent-session-contracts.d.ts.map +1 -0
- package/dist/core/agent-session-contracts.js +26 -0
- package/dist/core/agent-session-contracts.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 +400 -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 +74 -518
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +370 -1432
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +3 -1
- package/dist/core/auth-storage.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 +48 -9
- 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 +56 -236
- package/dist/core/background-lane-controller.d.ts.map +1 -1
- package/dist/core/background-lane-controller.js +141 -1273
- package/dist/core/background-lane-controller.js.map +1 -1
- package/dist/core/bedrock-sso-login.d.ts +16 -0
- package/dist/core/bedrock-sso-login.d.ts.map +1 -0
- package/dist/core/bedrock-sso-login.js +98 -0
- package/dist/core/bedrock-sso-login.js.map +1 -0
- 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 +13 -17
- package/dist/core/compaction-support.d.ts.map +1 -1
- package/dist/core/compaction-support.js +3 -3
- 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 +1 -1
- package/dist/core/context-pipeline.d.ts.map +1 -1
- package/dist/core/context-pipeline.js +16 -37
- package/dist/core/context-pipeline.js.map +1 -1
- package/dist/core/cost/cost-summary.d.ts.map +1 -1
- package/dist/core/cost/cost-summary.js +5 -3
- package/dist/core/cost/cost-summary.js.map +1 -1
- package/dist/core/cost/daily-usage.d.ts.map +1 -1
- package/dist/core/cost/daily-usage.js +4 -5
- package/dist/core/cost/daily-usage.js.map +1 -1
- package/dist/core/default-tool-surface.d.ts.map +1 -1
- package/dist/core/default-tool-surface.js +2 -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/extension-import-authority.d.ts +6 -0
- package/dist/core/extension-import-authority.d.ts.map +1 -0
- package/dist/core/extension-import-authority.js +10 -0
- package/dist/core/extension-import-authority.js.map +1 -0
- 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 +52 -18
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +20 -5
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/stale-context.d.ts +2 -0
- package/dist/core/extensions/stale-context.d.ts.map +1 -0
- package/dist/core/extensions/stale-context.js +2 -0
- package/dist/core/extensions/stale-context.js.map +1 -0
- 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 +78 -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 +53 -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 +14 -9
- package/dist/core/goal-loop-controller.d.ts.map +1 -1
- package/dist/core/goal-loop-controller.js +47 -75
- package/dist/core/goal-loop-controller.js.map +1 -1
- package/dist/core/goals/compact-goal-context.d.ts +11 -0
- package/dist/core/goals/compact-goal-context.d.ts.map +1 -0
- package/dist/core/goals/compact-goal-context.js +59 -0
- package/dist/core/goals/compact-goal-context.js.map +1 -0
- 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 +27 -0
- package/dist/core/goals/goal-acceptance.js.map +1 -0
- package/dist/core/goals/goal-auto-continue-controller.d.ts +28 -0
- package/dist/core/goals/goal-auto-continue-controller.d.ts.map +1 -0
- package/dist/core/goals/goal-auto-continue-controller.js +90 -0
- package/dist/core/goals/goal-auto-continue-controller.js.map +1 -0
- package/dist/core/goals/goal-continuation-controller.d.ts +2 -2
- package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-controller.js +52 -11
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.d.ts +4 -29
- package/dist/core/goals/goal-continuation-defaults.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.js +4 -32
- package/dist/core/goals/goal-continuation-defaults.js.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts +8 -18
- package/dist/core/goals/goal-continuation-prompt.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.js +9 -179
- package/dist/core/goals/goal-continuation-prompt.js.map +1 -1
- package/dist/core/goals/goal-lifecycle.d.ts +43 -0
- package/dist/core/goals/goal-lifecycle.d.ts.map +1 -0
- package/dist/core/goals/goal-lifecycle.js +102 -0
- package/dist/core/goals/goal-lifecycle.js.map +1 -0
- package/dist/core/goals/goal-record.d.ts +17 -0
- package/dist/core/goals/goal-record.d.ts.map +1 -0
- package/dist/core/goals/goal-record.js +31 -0
- package/dist/core/goals/goal-record.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-session-controller.d.ts +42 -0
- package/dist/core/goals/goal-session-controller.d.ts.map +1 -0
- package/dist/core/goals/goal-session-controller.js +128 -0
- package/dist/core/goals/goal-session-controller.js.map +1 -0
- package/dist/core/goals/goal-state.d.ts +46 -25
- package/dist/core/goals/goal-state.d.ts.map +1 -1
- package/dist/core/goals/goal-state.js +91 -24
- package/dist/core/goals/goal-state.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts +9 -10
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js +60 -75
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/goals/session-goal-state.d.ts +20 -12
- package/dist/core/goals/session-goal-state.d.ts.map +1 -1
- package/dist/core/goals/session-goal-state.js +133 -33
- package/dist/core/goals/session-goal-state.js.map +1 -1
- package/dist/core/human-input-controller.d.ts +47 -0
- package/dist/core/human-input-controller.d.ts.map +1 -0
- package/dist/core/human-input-controller.js +181 -0
- package/dist/core/human-input-controller.js.map +1 -0
- 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/local-runtime-controller.d.ts +1 -1
- package/dist/core/local-runtime-controller.d.ts.map +1 -1
- package/dist/core/local-runtime-controller.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 +0 -19
- package/dist/core/model-capability.d.ts.map +1 -1
- package/dist/core/model-capability.js +1 -19
- package/dist/core/model-capability.js.map +1 -1
- package/dist/core/model-registry.d.ts +6 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +13 -5
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +17 -2
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +38 -25
- 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 +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 +5 -5
- 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 +200 -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 +20 -3
- 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 +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-filter-controller.d.ts +8 -1
- package/dist/core/profile-filter-controller.d.ts.map +1 -1
- package/dist/core/profile-filter-controller.js +23 -5
- package/dist/core/profile-filter-controller.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/prompt-templates.d.ts +1 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +18 -29
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/reflection-controller.d.ts +5 -5
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +5 -2
- 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/request-auth.d.ts +7 -0
- package/dist/core/request-auth.d.ts.map +1 -0
- package/dist/core/request-auth.js +8 -0
- package/dist/core/request-auth.js.map +1 -0
- 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 +23 -8
- 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 +233 -0
- package/dist/core/risk-classifier.js.map +1 -0
- package/dist/core/runtime-builder.d.ts +41 -23
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +365 -253
- 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 +68 -25
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/secrets/credential-exposure-guard.d.ts +9 -0
- package/dist/core/secrets/credential-exposure-guard.d.ts.map +1 -0
- package/dist/core/secrets/credential-exposure-guard.js +241 -0
- package/dist/core/secrets/credential-exposure-guard.js.map +1 -0
- package/dist/core/secrets/secret-dotenv.d.ts +27 -0
- package/dist/core/secrets/secret-dotenv.d.ts.map +1 -0
- package/dist/core/secrets/secret-dotenv.js +183 -0
- package/dist/core/secrets/secret-dotenv.js.map +1 -0
- package/dist/core/secrets/secret-vault-format.d.ts +112 -0
- package/dist/core/secrets/secret-vault-format.d.ts.map +1 -0
- package/dist/core/secrets/secret-vault-format.js +397 -0
- package/dist/core/secrets/secret-vault-format.js.map +1 -0
- package/dist/core/secrets/secret-vault.d.ts +72 -0
- package/dist/core/secrets/secret-vault.d.ts.map +1 -0
- package/dist/core/secrets/secret-vault.js +671 -0
- package/dist/core/secrets/secret-vault.js.map +1 -0
- package/dist/core/session-analytics.d.ts +4 -23
- package/dist/core/session-analytics.d.ts.map +1 -1
- package/dist/core/session-analytics.js +67 -70
- 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 +11 -4
- package/dist/core/session-role.d.ts.map +1 -1
- package/dist/core/session-role.js +24 -5
- 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/session-tree-navigator.d.ts +4 -6
- package/dist/core/session-tree-navigator.d.ts.map +1 -1
- package/dist/core/session-tree-navigator.js +4 -1
- package/dist/core/session-tree-navigator.js.map +1 -1
- package/dist/core/settings-manager.d.ts +10 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +81 -29
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.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 +86 -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 +8 -2
- package/dist/core/tool-gate-controller.js.map +1 -1
- package/dist/core/tool-protocol-controller.d.ts +89 -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-recovery-stats.d.ts +21 -1
- package/dist/core/tool-recovery-stats.d.ts.map +1 -1
- package/dist/core/tool-recovery-stats.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/bash.d.ts +5 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +59 -5
- package/dist/core/tools/bash.js.map +1 -1
- 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 +148 -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 +106 -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/git-filter.d.ts +1 -8
- package/dist/core/tools/git-filter.d.ts.map +1 -1
- package/dist/core/tools/git-filter.js +2 -63
- package/dist/core/tools/git-filter.js.map +1 -1
- package/dist/core/tools/goal.d.ts +10 -8
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +106 -28
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -0
- package/dist/core/tools/index.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 +40 -0
- package/dist/core/tools/orchestration-panel.d.ts.map +1 -0
- package/dist/core/tools/orchestration-panel.js +124 -0
- package/dist/core/tools/orchestration-panel.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +11 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +36 -3
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/python.d.ts +2 -0
- package/dist/core/tools/python.d.ts.map +1 -1
- package/dist/core/tools/python.js +3 -1
- package/dist/core/tools/python.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- 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/search-command-guard.d.ts +14 -0
- package/dist/core/tools/search-command-guard.d.ts.map +1 -0
- package/dist/core/tools/search-command-guard.js +333 -0
- package/dist/core/tools/search-command-guard.js.map +1 -0
- package/dist/core/tools/secret-store.d.ts +38 -0
- package/dist/core/tools/secret-store.d.ts.map +1 -0
- package/dist/core/tools/secret-store.js +412 -0
- package/dist/core/tools/secret-store.js.map +1 -0
- package/dist/core/tools/shell-command-parser.d.ts +16 -0
- package/dist/core/tools/shell-command-parser.d.ts.map +1 -0
- package/dist/core/tools/shell-command-parser.js +113 -0
- package/dist/core/tools/shell-command-parser.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 +99 -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/atomic-file.d.ts +6 -2
- package/dist/core/util/atomic-file.d.ts.map +1 -1
- package/dist/core/util/atomic-file.js +4 -4
- package/dist/core/util/atomic-file.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 +15 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +149 -51
- 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/auth-dialogs-controller.d.ts +4 -0
- package/dist/modes/interactive/auth-dialogs-controller.d.ts.map +1 -1
- package/dist/modes/interactive/auth-dialogs-controller.js +60 -1
- package/dist/modes/interactive/auth-dialogs-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/activity-lane.d.ts +55 -0
- package/dist/modes/interactive/components/activity-lane.d.ts.map +1 -0
- package/dist/modes/interactive/components/activity-lane.js +304 -0
- package/dist/modes/interactive/components/activity-lane.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +19 -10
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/expandable-text.d.ts +12 -0
- package/dist/modes/interactive/components/expandable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/expandable-text.js +17 -0
- package/dist/modes/interactive/components/expandable-text.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +15 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +30 -21
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +6 -1
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +2 -2
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +23 -14
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +6 -6
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +19 -11
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +53 -20
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-group.js +3 -0
- package/dist/modes/interactive/components/tool-group.js.map +1 -1
- package/dist/modes/interactive/components/usage-action-selector.d.ts +16 -0
- package/dist/modes/interactive/components/usage-action-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/usage-action-selector.js +46 -0
- package/dist/modes/interactive/components/usage-action-selector.js.map +1 -0
- 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 +77 -15
- package/dist/modes/interactive/extension-ui-host.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +15 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +27 -19
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/history-reload-math.d.ts +6 -2
- package/dist/modes/interactive/history-reload-math.d.ts.map +1 -1
- package/dist/modes/interactive/history-reload-math.js +10 -5
- package/dist/modes/interactive/history-reload-math.js.map +1 -1
- package/dist/modes/interactive/interactive-event-controller.d.ts +74 -0
- package/dist/modes/interactive/interactive-event-controller.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-event-controller.js +328 -0
- package/dist/modes/interactive/interactive-event-controller.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +22 -24
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +245 -595
- 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/loaded-resources-view.d.ts +20 -0
- package/dist/modes/interactive/loaded-resources-view.d.ts.map +1 -0
- package/dist/modes/interactive/loaded-resources-view.js +147 -0
- package/dist/modes/interactive/loaded-resources-view.js.map +1 -0
- 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/resource-display.d.ts.map +1 -1
- package/dist/modes/interactive/resource-display.js +8 -2
- package/dist/modes/interactive/resource-display.js.map +1 -1
- package/dist/modes/interactive/resource-shell-commands.d.ts +1 -5
- package/dist/modes/interactive/resource-shell-commands.d.ts.map +1 -1
- package/dist/modes/interactive/resource-shell-commands.js +0 -5
- package/dist/modes/interactive/resource-shell-commands.js.map +1 -1
- package/dist/modes/interactive/session-flow-commands.d.ts +27 -8
- package/dist/modes/interactive/session-flow-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-flow-commands.js +150 -64
- 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/interactive/usage-commands.d.ts +34 -0
- package/dist/modes/interactive/usage-commands.d.ts.map +1 -0
- package/dist/modes/interactive/usage-commands.js +225 -0
- package/dist/modes/interactive/usage-commands.js.map +1 -0
- 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/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +5 -3
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +3 -1
- package/dist/utils/version-check.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 +38 -0
- package/docs/UI_QUALITY_ORCHESTRATION.md +28 -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/providers.md +9 -1
- 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 +14 -0
- package/docs/ui-reference/orchestration-before.txt +13 -0
- package/docs/ui-reference/orchestration-reference.txt +16 -0
- package/docs/usage.md +22 -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 +13 -13
- 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
package/docs/extensions.md
CHANGED
|
@@ -13,6 +13,7 @@ Extensions are TypeScript modules that extend pi's behavior. They can subscribe
|
|
|
13
13
|
- **Custom UI components** - Full TUI components with keyboard input via `ctx.ui.custom()` for complex interactions
|
|
14
14
|
- **Custom commands** - Register commands like `/mycommand` via `pi.registerCommand()`
|
|
15
15
|
- **Session persistence** - Store state that survives restarts via `pi.appendEntry()`
|
|
16
|
+
- **Owned storage** - Keep durable state, rebuildable cache, and bounded work in one extension namespace
|
|
16
17
|
- **Custom rendering** - Control how tool calls/results and messages appear in TUI
|
|
17
18
|
|
|
18
19
|
**Example use cases:**
|
|
@@ -1268,6 +1269,49 @@ export default function (pi: ExtensionAPI) {
|
|
|
1268
1269
|
|
|
1269
1270
|
## ExtensionAPI Methods
|
|
1270
1271
|
|
|
1272
|
+
### pi.getStorage(namespace)
|
|
1273
|
+
|
|
1274
|
+
Bind one portable storage namespace to the current extension generation:
|
|
1275
|
+
|
|
1276
|
+
```typescript
|
|
1277
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
1278
|
+
import { join } from "node:path";
|
|
1279
|
+
|
|
1280
|
+
export default function (pi: ExtensionAPI) {
|
|
1281
|
+
const storage = pi.getStorage("my-extension");
|
|
1282
|
+
|
|
1283
|
+
pi.registerCommand("save-extension-state", {
|
|
1284
|
+
handler: async (_args, ctx) => {
|
|
1285
|
+
await mkdir(storage.stateDir, { recursive: true });
|
|
1286
|
+
await writeFile(join(storage.stateDir, "state.json"), JSON.stringify({ cwd: ctx.cwd }), "utf8");
|
|
1287
|
+
},
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
```
|
|
1291
|
+
|
|
1292
|
+
The returned paths have separate lifecycles:
|
|
1293
|
+
|
|
1294
|
+
- `stateDir` → `~/.pi/agent/state/extensions/<namespace>/`: durable machine state. Deleting it loses history.
|
|
1295
|
+
- `cacheDir` → `~/.pi/agent/cache/extensions/<namespace>/`: rebuildable data. It must be safe to delete.
|
|
1296
|
+
- `acquireWorkRun()` → `~/.pi/agent/work/extensions/<namespace>/<run-id>/`: transient output with an ownership manifest, active lease, and hard retention ceilings.
|
|
1297
|
+
|
|
1298
|
+
Calling `getStorage()` is zero-write. It validates the namespace and only returns paths; create `stateDir` or `cacheDir` when the extension actually writes. A generation may bind only one namespace, repeated calls with that namespace return the same view, and unrelated loaded extensions cannot claim the same namespace. Names are lowercase portable path segments of at most 64 characters; traversal, separators, uppercase ambiguity, trailing dots, and Windows-reserved names are rejected.
|
|
1299
|
+
|
|
1300
|
+
Work leases are released automatically if the factory fails and when the extension unloads or reloads. Release a lease sooner when the operation is finished; release is idempotent and does not immediately delete its artifacts:
|
|
1301
|
+
|
|
1302
|
+
```typescript
|
|
1303
|
+
const run = storage.acquireWorkRun({ runId: "export-1", retention: { maxRuns: 8 } });
|
|
1304
|
+
try {
|
|
1305
|
+
await writeFile(join(run.path, "report.json"), JSON.stringify(report), "utf8");
|
|
1306
|
+
} finally {
|
|
1307
|
+
run.release();
|
|
1308
|
+
}
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
Extension-selected retention can only reduce the harness defaults. It cannot exceed 30 days, 64 inactive runs, 512 MiB, 10,000 scanned runs, or 100,000 recursively scanned entries, and it cannot be disabled through this API. Do not create extension-specific directories directly beside `auth.json` and `settings.json`. Do not store credentials in extension state or cache; use Pi authentication configuration, environment-backed references, or an external credential manager.
|
|
1312
|
+
|
|
1313
|
+
Extensions are trusted process code, so Pi cannot prevent one from bypassing this API and writing an arbitrary filesystem path. The enforceable package contract is: bundled/packaged extensions use `getStorage()`, transient artifacts go through bounded leases, and `pi doctor` makes nonconforming root writers visible. Durable state must compact its own history; rebuildable cache must impose its own file/byte policy. Neither directory is an unbounded artifact sink.
|
|
1314
|
+
|
|
1271
1315
|
### pi.on(event, handler)
|
|
1272
1316
|
|
|
1273
1317
|
Subscribe to events. See [Events](#events) for event types and return values.
|
|
@@ -1684,6 +1728,15 @@ pi.registerCommand("my-setup-teardown", {
|
|
|
1684
1728
|
|
|
1685
1729
|
## State Management
|
|
1686
1730
|
|
|
1731
|
+
Use the storage class that matches the data:
|
|
1732
|
+
|
|
1733
|
+
- Branch/session state that must follow conversation history belongs in tool result `details` or `pi.appendEntry()`.
|
|
1734
|
+
- Durable extension-global machine state belongs in `pi.getStorage(...).stateDir`.
|
|
1735
|
+
- Recomputable indexes and downloaded derivatives belong in `cacheDir`.
|
|
1736
|
+
- Reports, downloads, subprocess output, and scratch files belong in a leased `acquireWorkRun()` directory.
|
|
1737
|
+
|
|
1738
|
+
Never place extension artifacts directly under `~/.pi/agent/`; `pi doctor` reports unexpected root entries without moving or deleting them.
|
|
1739
|
+
|
|
1687
1740
|
Extensions with state should store it in tool result `details` for proper branching support:
|
|
1688
1741
|
|
|
1689
1742
|
```typescript
|
|
@@ -2011,6 +2064,10 @@ import {
|
|
|
2011
2064
|
DEFAULT_MAX_BYTES, // 50KB
|
|
2012
2065
|
DEFAULT_MAX_LINES, // 2000
|
|
2013
2066
|
} from "@caupulican/pi-adaptative";
|
|
2067
|
+
import { writeFile } from "node:fs/promises";
|
|
2068
|
+
import { join } from "node:path";
|
|
2069
|
+
|
|
2070
|
+
const storage = pi.getStorage("my-extension");
|
|
2014
2071
|
|
|
2015
2072
|
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
2016
2073
|
const output = await runCommand();
|
|
@@ -2024,8 +2081,11 @@ async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
|
2024
2081
|
let result = truncation.content;
|
|
2025
2082
|
|
|
2026
2083
|
if (truncation.truncated) {
|
|
2027
|
-
// Write full output
|
|
2028
|
-
const
|
|
2084
|
+
// Write full output into this extension's bounded work area
|
|
2085
|
+
const run = storage.acquireWorkRun();
|
|
2086
|
+
const tempFile = join(run.path, "full-output.txt");
|
|
2087
|
+
await writeFile(tempFile, output, "utf8");
|
|
2088
|
+
run.release();
|
|
2029
2089
|
|
|
2030
2090
|
// Inform the LLM where to find complete output
|
|
2031
2091
|
result += `\n\n[Output truncated: ${truncation.outputLines} of ${truncation.totalLines} lines`;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Harness architecture
|
|
2
|
+
|
|
3
|
+
Pi Adaptative has one production harness. `AgentSession` is its public facade and composition root;
|
|
4
|
+
the low-level agent loop and provider transports remain separate packages. The deleted
|
|
5
|
+
`packages/agent` `AgentHarness` was a competing implementation and must not be restored.
|
|
6
|
+
|
|
7
|
+
## Package boundaries
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
coding-agent/AgentSession
|
|
11
|
+
├─ runtime + resource policy RuntimeBuilder, ResourceLoader, ProfileFilterController
|
|
12
|
+
├─ model execution policy ModelSelection, ModelRouter, LocalRuntime, ToolProtocolController
|
|
13
|
+
├─ foreground turn coordination ContextPipeline, CompactionController, ForegroundRecoveryController
|
|
14
|
+
└─ child work coordination WorkerDelegation, BackgroundLane, Reflection, managed-lane bridge
|
|
15
|
+
│
|
|
16
|
+
▼
|
|
17
|
+
agent ai
|
|
18
|
+
agent loop + session tree model metadata + provider transports + wire-format repair
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Provider-specific request and response behavior belongs in `packages/ai`. Provider-neutral choices
|
|
22
|
+
about which model, reasoning level, tools, resources, or lane to use belong in `packages/coding-agent`.
|
|
23
|
+
`packages/agent` owns the reusable loop, session tree, retry primitives, and compaction mechanics; it
|
|
24
|
+
does not own a second application harness.
|
|
25
|
+
|
|
26
|
+
## Model execution contract
|
|
27
|
+
|
|
28
|
+
Every foreground or child request resolves the same four facts before transport:
|
|
29
|
+
|
|
30
|
+
1. Model identity and metadata come from `ModelRegistry` as `Model<Api>`.
|
|
31
|
+
2. Authentication and headers come from the registry for that exact model.
|
|
32
|
+
3. `resolveModelThinkingLevel()` applies explicit intent, model defaults, harness fallback, and
|
|
33
|
+
capability clamping.
|
|
34
|
+
4. `resolveModelToolProtocol()` selects native calls, a forced text fallback, or the exact calibrated
|
|
35
|
+
text dialect. Foreground and isolated tool loops use the same result.
|
|
36
|
+
|
|
37
|
+
Provider adapters may translate those facts to their wire protocol, but must not make orchestration
|
|
38
|
+
policy. Tool names that collide with a provider-reserved namespace are mapped only at the provider
|
|
39
|
+
boundary and mapped back for local execution and history.
|
|
40
|
+
|
|
41
|
+
## UAC is construction-time omission
|
|
42
|
+
|
|
43
|
+
UAC's primary guarantee is that a withheld capability is not materialized. Runtime checks remain a
|
|
44
|
+
second line of defense, not the main implementation.
|
|
45
|
+
|
|
46
|
+
- `RuntimeBuilder` resolves one access policy before invoking built-in or override tool factories.
|
|
47
|
+
The same policy governs registration and activation, preventing construction/activation drift.
|
|
48
|
+
- `ResourceLoader` filters extension paths before module import and filters skill, prompt, theme, and
|
|
49
|
+
context paths before content loading. Live extension loading repeats the profile check before
|
|
50
|
+
import.
|
|
51
|
+
- Isolated research and worker lanes create fresh tools only for their expanded lane grant. They do
|
|
52
|
+
not copy the foreground registry, extensions, skills, shell, or mutable memory surface.
|
|
53
|
+
- Worker orchestration state is lazily materialized only when the active surface grants `delegate`
|
|
54
|
+
(or a managed-lane terminal report requires the shared notifier); worker-role sessions allocate no
|
|
55
|
+
worker scheduler, lifecycle store, or notification coordinator.
|
|
56
|
+
- Managed children carry parent identity. A valid parent PID classifies the process as a worker before
|
|
57
|
+
settings, stores, resources, or tools are built, so the hard worker ceiling cannot be re-granted by
|
|
58
|
+
a permissive profile.
|
|
59
|
+
- Per-call path/capability gates still validate every isolated lane tool invocation. Worktree-bound
|
|
60
|
+
workers additionally run behind the lane mutation gate.
|
|
61
|
+
|
|
62
|
+
An extension is the unit of module loading. If a profile grants an extension, its module code may
|
|
63
|
+
register several definitions before tool-level filtering. Profiles that need zero extension
|
|
64
|
+
footprint must omit that extension at the resource layer, not merely block one of its tools.
|
|
65
|
+
|
|
66
|
+
## Child work contracts
|
|
67
|
+
|
|
68
|
+
Owner-authored orchestration profiles are the routing authority. A profile fixes role, ordered model
|
|
69
|
+
policy, exact thinking level, tool names, resource profiles, semantic capability ceiling, budgets,
|
|
70
|
+
concurrency, lease duration, and verification policy. An architect profile additionally declares the
|
|
71
|
+
only worker profile IDs it may dispatch. The model-facing dispatch request contains a task, profile
|
|
72
|
+
ID, instructions, and resource pointers; it has no model, thinking, tool, budget, or concurrency
|
|
73
|
+
override fields.
|
|
74
|
+
|
|
75
|
+
The durable control plane is an append-only session event store projected into objectives, DAG
|
|
76
|
+
tasks, attempts, leases, checkpoints, logical agent bindings, typed results, and a notification
|
|
77
|
+
outbox. Every result carries its attempt lease and fencing token. A stale worker therefore cannot
|
|
78
|
+
win a race after retry or resume. In-process isolated completions have no resumable transcript: an
|
|
79
|
+
interrupted lease is fenced and its persisted dispatch is re-queued as a new attempt. A process-backed
|
|
80
|
+
Pi worker instead retains its logical agent ID and resume context and is woken with `/resume` against
|
|
81
|
+
the same session, worktree, orchestration profile, and checkpoint pointers when present.
|
|
82
|
+
|
|
83
|
+
Policy is a mandatory pre-lease gate. An attempt cannot lease without a compiled execution grant.
|
|
84
|
+
When compilation crosses owner authority or budget, the gate persists a typed approval request and
|
|
85
|
+
an owner notification; approval and rejection replay as durable human decisions. Approval alone is
|
|
86
|
+
never authority: an approved attempt remains unleaseable until policy compiles and binds a new grant
|
|
87
|
+
under the expanded owner authorization. Pausing an objective blocks lease, start, and agent resume;
|
|
88
|
+
cancellation remains a replayable terminal transition across its open tasks and attempts.
|
|
89
|
+
|
|
90
|
+
Acceptance is a runtime invariant, not a worker claim. Task criterion IDs must refer to their
|
|
91
|
+
objective, a completed criterion-bound result must carry trusted evidence for every linked criterion,
|
|
92
|
+
and an objective cannot close until all required criteria have trusted evidence in its task results.
|
|
93
|
+
|
|
94
|
+
In-process workers are bounded child loops with fresh context, a synthetic cache-affinity key, a
|
|
95
|
+
profile-pinned model and exact reasoning level, a construction-filtered tool surface,
|
|
96
|
+
turn/time/token/tool/cost bounds, and parent validation of the result. Process-capable profiles may
|
|
97
|
+
expose `run_process`, which uses an exact executable allowlist, direct argv, a scoped environment,
|
|
98
|
+
bounded output, and process-tree termination; unrestricted shell is not inherited. Worker output is
|
|
99
|
+
untrusted; the parent retrieves it through `delegate_status` after a terminal lane event. A profile
|
|
100
|
+
that requires independent verification names a separate owner-pinned verifier profile. The runtime
|
|
101
|
+
automatically dispatches that verifier as a durable task, withholds the implementation's terminal
|
|
102
|
+
handoff, and reconciles the typed verdict before the implementation can become accepted. Restart
|
|
103
|
+
recovery closes both persistence gaps: an implementation awaiting a not-yet-created verifier is
|
|
104
|
+
re-dispatched, while a persisted verifier result awaiting reconciliation is applied exactly once.
|
|
105
|
+
|
|
106
|
+
Out-of-process managed workers use the same lifecycle shape:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
queued → running → terminal signal → bounded persisted handoff → parent notification → explicit retrieval
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Completion discovery is event-driven. A parent never polls pane output to learn whether work ended,
|
|
113
|
+
and a late worker result is never injected into an active foreground transcript. Every managed
|
|
114
|
+
process must emit a terminal signal even on failure, persist a bounded handoff, and wake its owner.
|
|
115
|
+
|
|
116
|
+
## Runtime generations and reload
|
|
117
|
+
|
|
118
|
+
A runtime generation consists of the selected resource profile, loaded resources, base tool
|
|
119
|
+
definitions, extension runner, wrapped registry, active tool request, and derived system prompt.
|
|
120
|
+
Reload constructs and doctors a candidate generation, then commits it or restores the complete prior
|
|
121
|
+
snapshot. Model/profile changes are re-applied only after extension providers are bound. In-flight
|
|
122
|
+
turns, compaction, and child work register with the shared quiescence gate, so live mutation never
|
|
123
|
+
races an active execution unit.
|
|
124
|
+
|
|
125
|
+
## Ownership rules for further growth
|
|
126
|
+
|
|
127
|
+
- Keep `AgentSession` as facade and composition root; move coherent state machines into controllers
|
|
128
|
+
with narrow dependencies instead of adding another facade with overlapping state.
|
|
129
|
+
- Add a capability decision to the shared model/resource contract first, then consume it everywhere.
|
|
130
|
+
Do not add provider-name branches to orchestration code when model metadata can express the fact.
|
|
131
|
+
- Decide resource and tool authority before loading or construction. Keep execution gates for path,
|
|
132
|
+
argument, and race-sensitive checks.
|
|
133
|
+
- A background process is incomplete until its terminal event, durable bounded handoff, and owner
|
|
134
|
+
notification all succeed or are reported failed.
|
|
135
|
+
- Persist only serializable facts and stable identities. Runtime tools, extension functions, streams,
|
|
136
|
+
and credentials are reconstructed dependencies, never session payloads.
|
|
137
|
+
- New harness behavior requires a focused faux-provider regression. Provider APIs and paid tokens are
|
|
138
|
+
not used by the coding-agent suite.
|
|
139
|
+
|
|
140
|
+
Worker lifecycle, scheduling, execution, verification, recovery, and notification are owned by
|
|
141
|
+
`WorkerDelegationController`. `ResearchLaneController`, `ModelFitnessController`, and
|
|
142
|
+
`GoalAutoContinueController` own their respective timers, guards, cancellation, accounting, and
|
|
143
|
+
persistence; research and fitness share only the provider-neutral `LaneModelResolver`.
|
|
144
|
+
`BackgroundLaneController` only coordinates these owners and their shared lane read model;
|
|
145
|
+
`ManagedLaneController` owns the distinct out-of-process managed-lane bridge. `ToolProtocolController` owns model protocol selection, probing, calibration,
|
|
146
|
+
circuit breaking, repair teaching, and its per-turn state. `CompactionController` owns manual and
|
|
147
|
+
automatic detection, execution, retries, cancellation, persistence, and extension notification;
|
|
148
|
+
`CompactionSupport` is its provider-neutral model/auth/settings policy.
|
|
149
|
+
`ForegroundRecoveryController` owns the terminal-response latch and ordered retry, quota failover,
|
|
150
|
+
retry closeout, compaction, and queued-continuation decisions. Foreground prompt submission remains
|
|
151
|
+
an `AgentSession` transaction because it composes those independent owners and the public event
|
|
152
|
+
surface; extracting it today would create a callback-heavy proxy rather than a new state owner. Its
|
|
153
|
+
contract is balanced routing events, commit-on-success `nextTurn` consumption, stable per-turn cost
|
|
154
|
+
accounting, and bounded early-message identity cleanup.
|
|
155
|
+
`HostStateStore` owns validated versioned host partitions, lock-scoped mutations, atomic replacement,
|
|
156
|
+
and worker-role zero-write behavior for fitness, model adaptation, and tool-selection evidence.
|
package/docs/keybindings.md
CHANGED
|
@@ -87,7 +87,17 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+1
|
|
|
87
87
|
| `app.exit` | `ctrl+d` | Exit (when editor empty) |
|
|
88
88
|
| `app.suspend` | `ctrl+z` (none on Windows) | Suspend to background |
|
|
89
89
|
| `app.editor.external` | `ctrl+g` | Open in external editor (`$VISUAL` or `$EDITOR`) |
|
|
90
|
-
| `app.clipboard.pasteImage` | `alt+v` | Paste image
|
|
90
|
+
| `app.clipboard.pasteImage` | `ctrl+v` (Unix/macOS), `alt+v` (Windows), both (WSL) | Paste image or clipboard text |
|
|
91
|
+
|
|
92
|
+
### Native Questions
|
|
93
|
+
|
|
94
|
+
These actions apply while the built-in `ask_question` interaction has focus. The dialog also uses the configurable `tui.select.*` and `tui.input.*` actions above, plus `app.clipboard.pasteImage` while entering a custom **Other** answer.
|
|
95
|
+
|
|
96
|
+
| Keybinding id | Default | Description |
|
|
97
|
+
|--------|---------|-------------|
|
|
98
|
+
| `app.question.next` | `tab`, `right` | Move to the next question or review |
|
|
99
|
+
| `app.question.previous` | `shift+tab`, `left` | Move to the previous question |
|
|
100
|
+
| `app.question.toggle` | `space` | Toggle a multi-select answer |
|
|
91
101
|
|
|
92
102
|
### Sessions
|
|
93
103
|
|
package/docs/process-matrix.md
CHANGED
|
@@ -15,20 +15,49 @@ process breaks.
|
|
|
15
15
|
|
|
16
16
|
Every `pi` process registers exactly one entry in the matrix, keyed by `<role>-<sessionId>`, under
|
|
17
17
|
`state/process-matrix/` (see `agent-paths.ts` -- durable, survives `/reload` and crashes, not the
|
|
18
|
-
transient `work/` tree).
|
|
18
|
+
transient `work/` tree). The session ID is derived from the entry's single `AgentIdentityContract`;
|
|
19
|
+
process entries and resumable payloads do not carry parallel agent/session/lane context fields. All
|
|
20
|
+
post-registration transitions use the same per-entry lock and replace/delete only the exact process
|
|
21
|
+
generation they observed. An older same-session process therefore loses write ownership as soon as a
|
|
22
|
+
newer process registers; its late heartbeat, reconciliation, or exit hook cannot overwrite the newer
|
|
23
|
+
entry.
|
|
19
24
|
|
|
20
25
|
- **Master** (no declared parent): writes its own entry once at startup, heartbeats it on an
|
|
21
26
|
interval, and -- once, at startup -- scans the matrix for **orphaned workers**: worker entries
|
|
22
|
-
whose recorded parent pid is dead.
|
|
27
|
+
whose recorded parent pid is dead. `/new`, `/resume`, and `/fork` replace this session-owned
|
|
28
|
+
runtime, so its identity, notifications, and scan always follow the active session.
|
|
23
29
|
- **Worker** (launched with `PI_PARENT_PID` / `--parent-pid` set): self-registers its own entry
|
|
24
30
|
(the only writer of that entry during normal operation) and watches its parent's liveness on a
|
|
25
31
|
poll interval.
|
|
26
32
|
|
|
27
33
|
### Resume: a master never auto-kills what it finds
|
|
28
34
|
|
|
29
|
-
On startup, a master's orphan scan finds worker entries whose parent
|
|
30
|
-
those workers are also dead -- a worker can outlive a crashed parent --
|
|
31
|
-
|
|
35
|
+
On startup or in-process session resume, a master's orphan scan finds worker entries whose parent
|
|
36
|
+
is dead. It never assumes those workers are also dead -- a worker can outlive a crashed parent --
|
|
37
|
+
so it never kills anything. Recovery is identity-fenced:
|
|
38
|
+
|
|
39
|
+
- If the worker's recorded `parentSessionId` and `taskRef` exactly match the active session and its
|
|
40
|
+
active goal/task identity, resume restores that existing ownership without another approval. A
|
|
41
|
+
live worker is re-adopted; a dead worker with a complete resumable Pi context is relaunched as the
|
|
42
|
+
same logical agent. Terminal or still-blocked goals disable automatic recovery. This works in
|
|
43
|
+
interactive, print, and RPC modes and is the process-level counterpart to `/resume` restoring the
|
|
44
|
+
goal before supervisors start.
|
|
45
|
+
- Every foreign orphan remains owner-gated. Interactive mode offers resume/adopt/cleanup; headless
|
|
46
|
+
modes report it without writes or process actions.
|
|
47
|
+
|
|
48
|
+
When a foreign worker's own process is dead and its resumable payload contains a Pi session
|
|
49
|
+
context, the first prompt offers to resume that same logical agent. Acceptance launches the exact
|
|
50
|
+
persisted session file with its agent ID, cwd, worktree, orchestration profile, resource pointers,
|
|
51
|
+
and bounded wake task. The direct-argv launch prefers the exact persisted `sessionFile` over an ID
|
|
52
|
+
lookup, carries the stable logical-agent ID in `PI_ORCHESTRATION_AGENT_ID`, and names the latest
|
|
53
|
+
checkpoint plus bounded context pointers in the wake prompt instead of copying a second transcript.
|
|
54
|
+
The resumed process overwrites the same `<role>-<sessionId>` matrix entry. The launcher publishes its
|
|
55
|
+
PID before self-registration, and terminal persistence plus delivery acknowledgement conditionally
|
|
56
|
+
replace only the process generation they observed. A stale completion can therefore never close a
|
|
57
|
+
newer replacement. The terminal event is first persisted as an undelivered matrix handoff, then
|
|
58
|
+
delivered to the owning parent session and marked delivered. If that owner switched sessions before
|
|
59
|
+
the event arrived, the bounded handoff survives and replays on its next resume instead of being
|
|
60
|
+
injected into the wrong transcript. A still-live foreign orphan follows the adopt/cleanup flow below.
|
|
32
61
|
|
|
33
62
|
1. Ask: *"adopt worker `<entryId>` (lane `<laneKey>`)?"* Yes → this session becomes the worker's
|
|
34
63
|
new parent (an adoption grant is written into the worker's own entry).
|
|
@@ -37,16 +66,17 @@ silently repurposes anything. Instead, for each orphan, **interactively**:
|
|
|
37
66
|
killed).
|
|
38
67
|
3. If both declined: leave the entry untouched.
|
|
39
68
|
|
|
40
|
-
**Non-interactively** (print/RPC mode, or no TTY),
|
|
41
|
-
and writes nothing
|
|
42
|
-
|
|
69
|
+
**Non-interactively** (print/RPC mode, or no TTY), foreign orphans are report-only: the scan logs
|
|
70
|
+
what it found and writes nothing. Exact-session recovery remains active because it restores an
|
|
71
|
+
already-recorded authority relationship rather than claiming another session's worker.
|
|
43
72
|
|
|
44
73
|
### A worker on parent death: wind down, never vanish
|
|
45
74
|
|
|
46
75
|
A worker polls its parent's pid on `watcherPollMs`. The moment that pid is no longer alive, it:
|
|
47
76
|
|
|
48
77
|
1. Marks its own entry `winding_down` (reason `parent_lost`), then `resumable` with a payload
|
|
49
|
-
|
|
78
|
+
containing one clone of its logical-agent identity (exact Pi session/cwd/profile/lane context),
|
|
79
|
+
its stable task reference, and a bounded task summary.
|
|
50
80
|
2. Emits one steer notice into its own session.
|
|
51
81
|
3. Starts a bounded grace window (`adoptionGraceMs`), polling its own entry every
|
|
52
82
|
`watcherPollMs` for a directive a new master may have written (see above):
|
|
@@ -67,10 +97,13 @@ Cross-process, like `PI_WORKTREE_LANE`/`--worktree-lane`:
|
|
|
67
97
|
|---|---|---|
|
|
68
98
|
| `PI_PARENT_PID` | `--parent-pid <pid>` | Declares this process as a worker of `<pid>`. A malformed or non-positive value is ignored (never a crash on bad env) -- the process falls back to acting as a master. |
|
|
69
99
|
| `PI_PARENT_SESSION` | `--parent-session <id>` | The parent's sessionId, recorded alongside the pid for diagnostics/adoption. |
|
|
100
|
+
| `PI_ORCHESTRATION_AGENT_ID` | launch-only | Pins the logical agent identity across the initial process and exact-session resumes. |
|
|
101
|
+
| `PI_TASK_REF` | `--task-ref <id>` | Pins the goal/task identity used to fence automatic recovery across process generations. |
|
|
70
102
|
|
|
71
|
-
`tmux_agent_manager`'s `fire_task` sets
|
|
72
|
-
|
|
73
|
-
dispatch -- see `dispatch-grant.ts`'s
|
|
103
|
+
`tmux_agent_manager`'s `fire_task` sets the parent pid/session and logical agent ID automatically on
|
|
104
|
+
every `pi`-provider child it launches. Goal-bound launches also set `PI_TASK_REF` from `goalId`, the
|
|
105
|
+
same way lane-first dispatch threads `--worktree-lane` -- see `dispatch-grant.ts`'s
|
|
106
|
+
`LaunchProfileSource`.
|
|
74
107
|
|
|
75
108
|
## Settings
|
|
76
109
|
|
|
@@ -91,12 +124,11 @@ process-matrix entry are a sanctioned artifact, exactly like its own session tra
|
|
|
91
124
|
ceiling is untouched, and this is not a new escalation surface. A worker never writes any *other*
|
|
92
125
|
session's entry.
|
|
93
126
|
|
|
94
|
-
The
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
than assumed. Outside that one handshake, a master never writes another session's entry.
|
|
127
|
+
The narrow exceptions on the master side are identity-fenced exact-session recovery and the
|
|
128
|
+
ask-gated foreign-orphan scan. Exact recovery may restore the same recorded parent session without
|
|
129
|
+
another prompt. Claiming or cleaning up a foreign orphan still requires explicit owner approval and
|
|
130
|
+
writes only that orphan's entry. Outside those handshakes, a master never writes another session's
|
|
131
|
+
entry.
|
|
100
132
|
|
|
101
133
|
## Foreign-CLI limitation
|
|
102
134
|
|
|
@@ -110,11 +142,12 @@ cooperative boundary this system cannot structurally enforce across an arbitrary
|
|
|
110
142
|
|
|
111
143
|
- It never kills a process. Every termination is either the process's own cooperative self-exit or
|
|
112
144
|
an owner-confirmed grant the process itself later notices and applies.
|
|
113
|
-
- It does not re-attach a tmux pane or re-dispatch a lane
|
|
114
|
-
worker considers its parent
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
145
|
+
- It does not re-attach a tmux pane or re-dispatch a lane when adopting a still-live worker --
|
|
146
|
+
adoption changes who that worker considers its parent. Relaunch is reserved for a dead worker
|
|
147
|
+
with a complete persisted Pi resume context. Exact session+task recovery is automatic; every
|
|
148
|
+
mismatched or foreign identity remains owner-gated.
|
|
149
|
+
- Correctness never depends on a heartbeat or watcher tick arriving. Each master activation runs
|
|
150
|
+
the pure reconciliation pass once: a Pi worker interrupted before its own resumable write is
|
|
151
|
+
repaired from its durable logical-agent identity, closed and unrecoverable records are removed,
|
|
152
|
+
undelivered terminal handoffs are retained, and resumable/adopted/pending-terminal records remain
|
|
153
|
+
recoverable for at most 30 days before expiry.
|
package/docs/providers.md
CHANGED
|
@@ -202,7 +202,7 @@ export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o
|
|
|
202
202
|
### Amazon Bedrock
|
|
203
203
|
|
|
204
204
|
```bash
|
|
205
|
-
# Option 1: AWS Profile
|
|
205
|
+
# Option 1: AWS Profile (recommended for IAM Identity Center / SSO)
|
|
206
206
|
export AWS_PROFILE=your-profile
|
|
207
207
|
|
|
208
208
|
# Option 2: IAM Keys
|
|
@@ -216,6 +216,14 @@ export AWS_BEARER_TOKEN_BEDROCK=...
|
|
|
216
216
|
export AWS_REGION=us-west-2
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
+
For an SSO profile, AWS CLI v2 is required and the modern `sso-session` profile format is recommended.
|
|
220
|
+
Start Pi with `AWS_PROFILE` set, or run `/login amazon-bedrock` and enter the profile name for the
|
|
221
|
+
current Pi process. Pi runs `aws sso login --profile <profile>` without a shell. The AWS SDK refreshes
|
|
222
|
+
ordinary role credentials; if the underlying SSO session later expires, Pi performs one foreground
|
|
223
|
+
login and replays the Bedrock request once, only before a response has started. Background and worker
|
|
224
|
+
requests never open a browser and instead return an authentication-required error to the owning
|
|
225
|
+
session.
|
|
226
|
+
|
|
219
227
|
Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`).
|
|
220
228
|
|
|
221
229
|
```bash
|
package/docs/rpc.md
CHANGED
|
@@ -1063,7 +1063,7 @@ Extensions can request user interaction via `ctx.ui.select()`, `ctx.ui.confirm()
|
|
|
1063
1063
|
|
|
1064
1064
|
There are two categories of extension UI methods:
|
|
1065
1065
|
|
|
1066
|
-
- **Dialog methods** (`select`, `confirm`, `input`, `editor`): emit an `extension_ui_request` on stdout and block until the client sends back an `extension_ui_response` on stdin with the matching `id`.
|
|
1066
|
+
- **Dialog methods** (`questions`, `select`, `confirm`, `input`, `editor`): emit an `extension_ui_request` on stdout and block until the client sends back an `extension_ui_response` on stdin with the matching `id`.
|
|
1067
1067
|
- **Fire-and-forget methods** (`notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`): emit an `extension_ui_request` on stdout but do not expect a response. The client can display the information or ignore it.
|
|
1068
1068
|
|
|
1069
1069
|
If a dialog method includes a `timeout` field, the agent-side will auto-resolve with a default value when the timeout expires. The client does not need to track timeouts.
|
|
@@ -1084,6 +1084,33 @@ Note: `ctx.hasUI` is `true` in RPC mode because the dialog and fire-and-forget m
|
|
|
1084
1084
|
|
|
1085
1085
|
All requests have `type: "extension_ui_request"`, a unique `id`, and a `method` field.
|
|
1086
1086
|
|
|
1087
|
+
#### questions
|
|
1088
|
+
|
|
1089
|
+
Present the native structured owner-input contract. `request.questions` contains one to four questions, each with a stable `id`, heading, prompt, two to four options, and optional `multiSelect`. `acceptsImages` reports whether the routed model can receive image answer blocks.
|
|
1090
|
+
|
|
1091
|
+
```json
|
|
1092
|
+
{
|
|
1093
|
+
"type": "extension_ui_request",
|
|
1094
|
+
"id": "uuid-q",
|
|
1095
|
+
"method": "questions",
|
|
1096
|
+
"request": {
|
|
1097
|
+
"requestId": "human-input:call-1",
|
|
1098
|
+
"acceptsImages": true,
|
|
1099
|
+
"questions": [{
|
|
1100
|
+
"id": "scope",
|
|
1101
|
+
"header": "Scope",
|
|
1102
|
+
"question": "How broad should this be?",
|
|
1103
|
+
"options": [
|
|
1104
|
+
{"label": "Focused", "description": "Change only the failing workflow."},
|
|
1105
|
+
{"label": "Complete", "description": "Cover the full related surface."}
|
|
1106
|
+
]
|
|
1107
|
+
}]
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
```
|
|
1111
|
+
|
|
1112
|
+
Expected response: `extension_ui_response` with an `answers` array and optional `images` array, or `cancelled: true`. Free-form answer text is not length-clamped by the protocol; Pi externalizes large values before they enter model context. Clients must not send `customArtifact`: artifact references are harness-owned. Submitted images are validated and retained in the bounded session image store before the answer checkpoint so `/resume` can restore them.
|
|
1113
|
+
|
|
1087
1114
|
#### select
|
|
1088
1115
|
|
|
1089
1116
|
Prompt the user to choose from a list. Dialog methods with a `timeout` field include the timeout in milliseconds; the agent auto-resolves with `undefined` if the client doesn't respond in time.
|
|
@@ -1227,7 +1254,23 @@ Set the text in the input editor. Fire-and-forget.
|
|
|
1227
1254
|
|
|
1228
1255
|
### Extension UI Responses (stdin)
|
|
1229
1256
|
|
|
1230
|
-
Responses are sent for dialog methods only (`select`, `confirm`, `input`, `editor`). The `id` must match the request.
|
|
1257
|
+
Responses are sent for dialog methods only (`questions`, `select`, `confirm`, `input`, `editor`). The `id` must match the request. Malformed, ambiguous, unknown, or expired responses fail closed with an `extension_ui_response` error instead of settling another request.
|
|
1258
|
+
|
|
1259
|
+
#### Structured question response
|
|
1260
|
+
|
|
1261
|
+
```json
|
|
1262
|
+
{
|
|
1263
|
+
"type": "extension_ui_response",
|
|
1264
|
+
"id": "uuid-q",
|
|
1265
|
+
"answers": [{
|
|
1266
|
+
"id": "scope",
|
|
1267
|
+
"header": "Scope",
|
|
1268
|
+
"question": "How broad should this be?",
|
|
1269
|
+
"selected": ["Focused"],
|
|
1270
|
+
"skipped": false
|
|
1271
|
+
}]
|
|
1272
|
+
}
|
|
1273
|
+
```
|
|
1231
1274
|
|
|
1232
1275
|
#### Value response (select, input, editor)
|
|
1233
1276
|
|
package/docs/sessions.md
CHANGED
|
@@ -38,6 +38,18 @@ For the JSONL file format and SessionManager API, see [Session Format](session-f
|
|
|
38
38
|
|
|
39
39
|
`/resume` opens an interactive session picker for the current project. `pi -r` opens the same picker at startup.
|
|
40
40
|
|
|
41
|
+
If the selected session contains a blocked durable goal, Pi applies the same transition as
|
|
42
|
+
`/goal resume` before restarting that session's worker and process supervisors. `pi -c`, `pi -r`, and
|
|
43
|
+
`--session` use the same startup rule. Active goals remain active; completed or cancelled goals are
|
|
44
|
+
never reopened automatically.
|
|
45
|
+
|
|
46
|
+
Session replacement has an explicit recovery boundary. Preparation failure leaves the current runtime
|
|
47
|
+
untouched. If retiring the current runtime, rebinding, or starting supervision fails, Pi completes every
|
|
48
|
+
cleanup step, cleans the candidate, and reconstructs the previous session from its durable manager. A
|
|
49
|
+
failure in an extension's post-replacement `withSession` callback is reported separately because the
|
|
50
|
+
replacement is already valid and remains active. Process shutdown uses the same draining teardown and
|
|
51
|
+
waits for an already-admitted replacement before disposing the runtime it leaves active.
|
|
52
|
+
|
|
41
53
|
In the picker you can:
|
|
42
54
|
|
|
43
55
|
- search by typing
|
|
@@ -49,6 +61,9 @@ In the picker you can:
|
|
|
49
61
|
|
|
50
62
|
When available, pi uses the `trash` CLI for deletion instead of permanently removing files.
|
|
51
63
|
|
|
64
|
+
Use `/goal resume` when you want to resume the blocked goal in the current session without switching
|
|
65
|
+
sessions.
|
|
66
|
+
|
|
52
67
|
## Naming Sessions
|
|
53
68
|
|
|
54
69
|
Use `/name <name>` to set a human-readable session name:
|