@caupulican/pi-adaptative 0.94.0 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/README.md +32 -13
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts +7 -4
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js +173 -293
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.ts +247 -392
- package/dist/bundled-resources/extensions/tmux-agent-manager/launch-profile.d.ts +52 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/launch-profile.d.ts.map +1 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/launch-profile.js +118 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/launch-profile.js.map +1 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/launch-profile.ts +169 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/templates/builder-validator.json +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/templates/provider-prompt-smoke.json +1 -1
- package/dist/bundled-resources/skills/pi-harness-learning/SKILL.md +13 -7
- package/dist/bundled-resources/skills/worker-profile-writer/SKILL.md +11 -11
- package/dist/core/agent-paths.d.ts +2 -0
- package/dist/core/agent-paths.d.ts.map +1 -1
- package/dist/core/agent-paths.js +7 -0
- package/dist/core/agent-paths.js.map +1 -1
- package/dist/core/agent-session.d.ts +11 -41
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +98 -161
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/autonomy/envelope-enforcement.d.ts +6 -1
- package/dist/core/autonomy/envelope-enforcement.d.ts.map +1 -1
- package/dist/core/autonomy/envelope-enforcement.js +26 -25
- package/dist/core/autonomy/envelope-enforcement.js.map +1 -1
- package/dist/core/autonomy/lane-private-paths.d.ts.map +1 -1
- package/dist/core/autonomy/lane-private-paths.js +2 -1
- package/dist/core/autonomy/lane-private-paths.js.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.d.ts +8 -8
- package/dist/core/autonomy/lane-tool-surface.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.js +45 -30
- package/dist/core/autonomy/lane-tool-surface.js.map +1 -1
- package/dist/core/autonomy/worker-session-private-scope.d.ts +12 -0
- package/dist/core/autonomy/worker-session-private-scope.d.ts.map +1 -0
- package/dist/core/autonomy/worker-session-private-scope.js +42 -0
- package/dist/core/autonomy/worker-session-private-scope.js.map +1 -0
- package/dist/core/autonomy/worker-tool-adapter-registry.d.ts +65 -0
- package/dist/core/autonomy/worker-tool-adapter-registry.d.ts.map +1 -0
- package/dist/core/autonomy/worker-tool-adapter-registry.js +145 -0
- package/dist/core/autonomy/worker-tool-adapter-registry.js.map +1 -0
- package/dist/core/background-lane-controller.d.ts +9 -1
- package/dist/core/background-lane-controller.d.ts.map +1 -1
- package/dist/core/background-lane-controller.js +76 -6
- package/dist/core/background-lane-controller.js.map +1 -1
- package/dist/core/background-tool-task-controller.d.ts +23 -2
- package/dist/core/background-tool-task-controller.d.ts.map +1 -1
- package/dist/core/background-tool-task-controller.js +132 -17
- package/dist/core/background-tool-task-controller.js.map +1 -1
- package/dist/core/context/long-term-memory-trigger.d.ts +3 -1
- package/dist/core/context/long-term-memory-trigger.d.ts.map +1 -1
- package/dist/core/context/long-term-memory-trigger.js +1 -1
- package/dist/core/context/long-term-memory-trigger.js.map +1 -1
- package/dist/core/context/okf-memory-provider.d.ts +3 -0
- package/dist/core/context/okf-memory-provider.d.ts.map +1 -1
- package/dist/core/context/okf-memory-provider.js +66 -31
- package/dist/core/context/okf-memory-provider.js.map +1 -1
- package/dist/core/context/okf-memory.d.ts +18 -1
- package/dist/core/context/okf-memory.d.ts.map +1 -1
- package/dist/core/context/okf-memory.js +48 -0
- package/dist/core/context/okf-memory.js.map +1 -1
- package/dist/core/cost-guard-controller.d.ts +37 -0
- package/dist/core/cost-guard-controller.d.ts.map +1 -0
- package/dist/core/cost-guard-controller.js +71 -0
- package/dist/core/cost-guard-controller.js.map +1 -0
- package/dist/core/cost-guard.d.ts +9 -4
- package/dist/core/cost-guard.d.ts.map +1 -1
- package/dist/core/cost-guard.js +7 -3
- package/dist/core/cost-guard.js.map +1 -1
- package/dist/core/delegation/worker-agent-control.d.ts +4 -0
- package/dist/core/delegation/worker-agent-control.d.ts.map +1 -1
- package/dist/core/delegation/worker-agent-control.js.map +1 -1
- package/dist/core/delegation/worker-attempt-executor.d.ts +1 -1
- package/dist/core/delegation/worker-attempt-executor.d.ts.map +1 -1
- package/dist/core/delegation/worker-attempt-executor.js +0 -1
- package/dist/core/delegation/worker-attempt-executor.js.map +1 -1
- package/dist/core/delegation/worker-authority-resolver.d.ts +16 -3
- package/dist/core/delegation/worker-authority-resolver.d.ts.map +1 -1
- package/dist/core/delegation/worker-authority-resolver.js +114 -55
- package/dist/core/delegation/worker-authority-resolver.js.map +1 -1
- package/dist/core/delegation/worker-claim.d.ts +1 -2
- package/dist/core/delegation/worker-claim.d.ts.map +1 -1
- package/dist/core/delegation/worker-claim.js.map +1 -1
- package/dist/core/delegation/worker-delegation-controller.d.ts +19 -6
- package/dist/core/delegation/worker-delegation-controller.d.ts.map +1 -1
- package/dist/core/delegation/worker-delegation-controller.js +125 -40
- package/dist/core/delegation/worker-delegation-controller.js.map +1 -1
- package/dist/core/delegation/worker-delegation-request.d.ts +3 -3
- package/dist/core/delegation/worker-delegation-request.d.ts.map +1 -1
- package/dist/core/delegation/worker-delegation-request.js +13 -19
- package/dist/core/delegation/worker-delegation-request.js.map +1 -1
- package/dist/core/delegation/worker-execution-policy.d.ts +3 -2
- package/dist/core/delegation/worker-execution-policy.d.ts.map +1 -1
- package/dist/core/delegation/worker-execution-policy.js +54 -39
- package/dist/core/delegation/worker-execution-policy.js.map +1 -1
- package/dist/core/delegation/worker-fleet-limits.d.ts +3 -3
- package/dist/core/delegation/worker-fleet-limits.d.ts.map +1 -1
- package/dist/core/delegation/worker-fleet-limits.js +7 -7
- package/dist/core/delegation/worker-fleet-limits.js.map +1 -1
- package/dist/core/delegation/worker-machine-scope.d.ts +12 -0
- package/dist/core/delegation/worker-machine-scope.d.ts.map +1 -0
- package/dist/core/delegation/worker-machine-scope.js +38 -0
- package/dist/core/delegation/worker-machine-scope.js.map +1 -0
- package/dist/core/delegation/worker-notification-coordinator.d.ts +10 -0
- package/dist/core/delegation/worker-notification-coordinator.d.ts.map +1 -1
- package/dist/core/delegation/worker-notification-coordinator.js +69 -3
- package/dist/core/delegation/worker-notification-coordinator.js.map +1 -1
- package/dist/core/delegation/worker-recovery-coordinator.d.ts.map +1 -1
- package/dist/core/delegation/worker-recovery-coordinator.js +6 -1
- package/dist/core/delegation/worker-recovery-coordinator.js.map +1 -1
- package/dist/core/delegation/worker-runner.d.ts +5 -7
- package/dist/core/delegation/worker-runner.d.ts.map +1 -1
- package/dist/core/delegation/worker-runner.js +1 -4
- package/dist/core/delegation/worker-runner.js.map +1 -1
- package/dist/core/delegation/worker-write-reservation-coordinator.d.ts +3 -2
- package/dist/core/delegation/worker-write-reservation-coordinator.d.ts.map +1 -1
- package/dist/core/delegation/worker-write-reservation-coordinator.js +50 -25
- package/dist/core/delegation/worker-write-reservation-coordinator.js.map +1 -1
- package/dist/core/durable-custom-message-turn-controller.d.ts +6 -0
- package/dist/core/durable-custom-message-turn-controller.d.ts.map +1 -1
- package/dist/core/durable-custom-message-turn-controller.js +38 -15
- package/dist/core/durable-custom-message-turn-controller.js.map +1 -1
- package/dist/core/extension-binding-controller.d.ts +5 -1
- package/dist/core/extension-binding-controller.d.ts.map +1 -1
- package/dist/core/extension-binding-controller.js +15 -0
- package/dist/core/extension-binding-controller.js.map +1 -1
- package/dist/core/extensions/factory-runtime.d.ts.map +1 -1
- package/dist/core/extensions/factory-runtime.js +5 -0
- package/dist/core/extensions/factory-runtime.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +8 -4
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/foreground-terminal-handoff-controller.d.ts +31 -0
- package/dist/core/foreground-terminal-handoff-controller.d.ts.map +1 -1
- package/dist/core/foreground-terminal-handoff-controller.js +239 -55
- package/dist/core/foreground-terminal-handoff-controller.js.map +1 -1
- package/dist/core/goals/goal-session-controller.d.ts +2 -0
- package/dist/core/goals/goal-session-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-session-controller.js +8 -0
- package/dist/core/goals/goal-session-controller.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts +5 -4
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js +23 -19
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/learning/auto-learn-settings.d.ts +84 -0
- package/dist/core/learning/auto-learn-settings.d.ts.map +1 -0
- package/dist/core/learning/auto-learn-settings.js +66 -0
- package/dist/core/learning/auto-learn-settings.js.map +1 -0
- package/dist/core/learning/learning-audit.d.ts +5 -1
- package/dist/core/learning/learning-audit.d.ts.map +1 -1
- package/dist/core/learning/learning-audit.js +32 -1
- package/dist/core/learning/learning-audit.js.map +1 -1
- package/dist/core/learning/reflection-engine.d.ts +24 -0
- package/dist/core/learning/reflection-engine.d.ts.map +1 -1
- package/dist/core/learning/reflection-engine.js +104 -8
- package/dist/core/learning/reflection-engine.js.map +1 -1
- package/dist/core/local-prefix-warm-controller.d.ts +24 -0
- package/dist/core/local-prefix-warm-controller.d.ts.map +1 -0
- package/dist/core/local-prefix-warm-controller.js +79 -0
- package/dist/core/local-prefix-warm-controller.js.map +1 -0
- package/dist/core/memory/okf-project-memory-store.d.ts +28 -0
- package/dist/core/memory/okf-project-memory-store.d.ts.map +1 -0
- package/dist/core/memory/okf-project-memory-store.js +111 -0
- package/dist/core/memory/okf-project-memory-store.js.map +1 -0
- package/dist/core/memory/providers/file-store.d.ts +44 -1
- package/dist/core/memory/providers/file-store.d.ts.map +1 -1
- package/dist/core/memory/providers/file-store.js +341 -24
- package/dist/core/memory/providers/file-store.js.map +1 -1
- package/dist/core/memory/worker-memory-tools.d.ts +5 -0
- package/dist/core/memory/worker-memory-tools.d.ts.map +1 -0
- package/dist/core/memory/worker-memory-tools.js +5 -0
- package/dist/core/memory/worker-memory-tools.js.map +1 -0
- package/dist/core/memory-controller.d.ts +10 -1
- package/dist/core/memory-controller.d.ts.map +1 -1
- package/dist/core/memory-controller.js +72 -8
- package/dist/core/memory-controller.js.map +1 -1
- package/dist/core/model-capability.d.ts +7 -0
- package/dist/core/model-capability.d.ts.map +1 -1
- package/dist/core/model-capability.js +12 -0
- package/dist/core/model-capability.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +2 -10
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-router-controller.d.ts +3 -2
- package/dist/core/model-router-controller.d.ts.map +1 -1
- package/dist/core/model-router-controller.js +3 -2
- package/dist/core/model-router-controller.js.map +1 -1
- package/dist/core/orchestration/contracts.d.ts +16 -12
- package/dist/core/orchestration/contracts.d.ts.map +1 -1
- package/dist/core/orchestration/contracts.js +2 -2
- package/dist/core/orchestration/contracts.js.map +1 -1
- package/dist/core/orchestration/lane-tool-manifests.d.ts +2 -2
- package/dist/core/orchestration/lane-tool-manifests.d.ts.map +1 -1
- package/dist/core/orchestration/lane-tool-manifests.js +6 -1
- package/dist/core/orchestration/lane-tool-manifests.js.map +1 -1
- package/dist/core/orchestration/profile-registry.d.ts.map +1 -1
- package/dist/core/orchestration/profile-registry.js +14 -0
- package/dist/core/orchestration/profile-registry.js.map +1 -1
- package/dist/core/orchestration/task-profile-writer.d.ts +7 -4
- package/dist/core/orchestration/task-profile-writer.d.ts.map +1 -1
- package/dist/core/orchestration/task-profile-writer.js +71 -59
- package/dist/core/orchestration/task-profile-writer.js.map +1 -1
- package/dist/core/orchestration/thinking-level-schema.d.ts +7 -0
- package/dist/core/orchestration/thinking-level-schema.d.ts.map +1 -0
- package/dist/core/orchestration/thinking-level-schema.js +19 -0
- package/dist/core/orchestration/thinking-level-schema.js.map +1 -0
- package/dist/core/orchestration/worker-execution-contract.d.ts.map +1 -1
- package/dist/core/orchestration/worker-execution-contract.js +12 -5
- package/dist/core/orchestration/worker-execution-contract.js.map +1 -1
- package/dist/core/provider-prompt-contracts.d.ts +1 -4
- package/dist/core/provider-prompt-contracts.d.ts.map +1 -1
- package/dist/core/provider-prompt-contracts.js +13 -29
- package/dist/core/provider-prompt-contracts.js.map +1 -1
- package/dist/core/provider-request-context-controller.d.ts +2 -0
- package/dist/core/provider-request-context-controller.d.ts.map +1 -1
- package/dist/core/provider-request-context-controller.js +10 -3
- package/dist/core/provider-request-context-controller.js.map +1 -1
- package/dist/core/reflection-controller.d.ts +63 -27
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +300 -132
- package/dist/core/reflection-controller.js.map +1 -1
- package/dist/core/runtime-builder.d.ts +1 -0
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +25 -14
- package/dist/core/runtime-builder.js.map +1 -1
- package/dist/core/secrets/credential-exposure-guard.d.ts.map +1 -1
- package/dist/core/secrets/credential-exposure-guard.js +55 -10
- package/dist/core/secrets/credential-exposure-guard.js.map +1 -1
- package/dist/core/session-role.d.ts +6 -8
- package/dist/core/session-role.d.ts.map +1 -1
- package/dist/core/session-role.js +8 -18
- package/dist/core/session-role.js.map +1 -1
- package/dist/core/settings-manager.d.ts +13 -16
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +53 -50
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skill-vault.d.ts +15 -0
- package/dist/core/skill-vault.d.ts.map +1 -1
- package/dist/core/skill-vault.js +79 -45
- package/dist/core/skill-vault.js.map +1 -1
- package/dist/core/skills.d.ts +3 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -6
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt-builder.d.ts +2 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.js +52 -12
- package/dist/core/system-prompt-builder.js.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tool-capability-policy.d.ts +3 -0
- package/dist/core/tool-capability-policy.d.ts.map +1 -1
- package/dist/core/tool-capability-policy.js +13 -2
- package/dist/core/tool-capability-policy.js.map +1 -1
- package/dist/core/toolkit/script-runner.d.ts +2 -1
- package/dist/core/toolkit/script-runner.d.ts.map +1 -1
- package/dist/core/toolkit/script-runner.js +10 -2
- package/dist/core/toolkit/script-runner.js.map +1 -1
- package/dist/core/tools/delegate-status.d.ts +3 -1
- package/dist/core/tools/delegate-status.d.ts.map +1 -1
- package/dist/core/tools/delegate-status.js +5 -1
- package/dist/core/tools/delegate-status.js.map +1 -1
- package/dist/core/tools/delegate.d.ts +4 -13
- package/dist/core/tools/delegate.d.ts.map +1 -1
- package/dist/core/tools/delegate.js +173 -73
- package/dist/core/tools/delegate.js.map +1 -1
- package/dist/core/tools/goal.d.ts +3 -4
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +24 -7
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/profile-writer.d.ts +2 -8
- package/dist/core/tools/profile-writer.d.ts.map +1 -1
- package/dist/core/tools/profile-writer.js +6 -18
- package/dist/core/tools/profile-writer.js.map +1 -1
- package/dist/core/tools/run-toolkit-script.d.ts +1 -1
- package/dist/core/tools/run-toolkit-script.d.ts.map +1 -1
- package/dist/core/tools/run-toolkit-script.js +2 -2
- package/dist/core/tools/run-toolkit-script.js.map +1 -1
- package/dist/core/tools/skill-audit.d.ts +28 -1
- package/dist/core/tools/skill-audit.d.ts.map +1 -1
- package/dist/core/tools/skill-audit.js +56 -12
- package/dist/core/tools/skill-audit.js.map +1 -1
- package/dist/core/tools/skill.d.ts +12 -1
- package/dist/core/tools/skill.d.ts.map +1 -1
- package/dist/core/tools/skill.js +52 -0
- package/dist/core/tools/skill.js.map +1 -1
- package/dist/core/tools/skillify.d.ts.map +1 -1
- package/dist/core/tools/skillify.js +16 -7
- package/dist/core/tools/skillify.js.map +1 -1
- package/dist/core/tools/task-steps.js +1 -1
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/core/tools/tmux-dispatch.d.ts +4 -16
- package/dist/core/tools/tmux-dispatch.d.ts.map +1 -1
- package/dist/core/tools/tmux-dispatch.js +5 -20
- package/dist/core/tools/tmux-dispatch.js.map +1 -1
- package/dist/core/tools/tool-task.d.ts +1 -0
- package/dist/core/tools/tool-task.d.ts.map +1 -1
- package/dist/core/tools/tool-task.js +13 -8
- package/dist/core/tools/tool-task.js.map +1 -1
- package/dist/core/util/atomic-file.d.ts +2 -0
- package/dist/core/util/atomic-file.d.ts.map +1 -1
- package/dist/core/util/atomic-file.js +4 -0
- package/dist/core/util/atomic-file.js.map +1 -1
- package/dist/core/worktree-sync/codes.d.ts +1 -2
- package/dist/core/worktree-sync/codes.d.ts.map +1 -1
- package/dist/core/worktree-sync/codes.js +1 -2
- package/dist/core/worktree-sync/codes.js.map +1 -1
- package/dist/core/worktree-sync/lane-gate.d.ts +4 -8
- package/dist/core/worktree-sync/lane-gate.d.ts.map +1 -1
- package/dist/core/worktree-sync/lane-gate.js +5 -51
- package/dist/core/worktree-sync/lane-gate.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.d.ts +6 -7
- package/dist/modes/interactive/auto-learn-controller.d.ts.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.js +32 -207
- package/dist/modes/interactive/auto-learn-controller.js.map +1 -1
- package/dist/modes/interactive/autonomy-commands.js +2 -2
- package/dist/modes/interactive/autonomy-commands.js.map +1 -1
- package/dist/modes/interactive/components/activity-lane.d.ts.map +1 -1
- package/dist/modes/interactive/components/activity-lane.js +12 -23
- package/dist/modes/interactive/components/activity-lane.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +142 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/fitness-role-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/fitness-role-selector.js +2 -2
- package/dist/modes/interactive/components/fitness-role-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +150 -73
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/report-commands.d.ts.map +1 -1
- package/dist/modes/interactive/report-commands.js +8 -4
- package/dist/modes/interactive/report-commands.js.map +1 -1
- package/dist/modes/interactive/settings-selector-flow.d.ts.map +1 -1
- package/dist/modes/interactive/settings-selector-flow.js +10 -0
- package/dist/modes/interactive/settings-selector-flow.js.map +1 -1
- package/docs/extensions.md +8 -0
- package/docs/harness-architecture.md +28 -32
- package/docs/index.md +1 -1
- package/docs/process-matrix.md +8 -6
- package/docs/resources.md +1 -1
- package/docs/settings.md +61 -51
- package/docs/tmux-agent-manager.md +47 -40
- package/docs/usage.md +1 -1
- package/docs/worker-profiles.md +8 -6
- package/docs/worktree-sync.md +26 -20
- 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/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/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts +0 -133
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts.map +0 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js +0 -199
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js.map +0 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.ts +0 -312
package/docs/settings.md
CHANGED
|
@@ -113,7 +113,7 @@ The agent is instructed to edit only that source checkout, preserve unrelated ch
|
|
|
113
113
|
| `autonomy.mode` | string | `"off"` | Low-config autonomy preset: `"off"`, `"safe"`, `"balanced"`, or `"full"` |
|
|
114
114
|
| `autonomy.maxStallTurns` | number | `20` | Maximum provider rounds in one foreground goal loop before Pi stops continuing |
|
|
115
115
|
|
|
116
|
-
Use `/settings` → **Autonomy** to choose one preset and the foreground goal-loop round budget, or `/autonomy off|safe|balanced|full` to switch the preset while preserving the configured round budget.
|
|
116
|
+
Use `/settings` → **Autonomy** to choose one preset and the foreground goal-loop round budget, or `/autonomy off|safe|balanced|full` to switch the preset while preserving the configured round budget. Main-session reflection is enabled in every mode, including `off`; eligible turns queue a durable root-only cue for the orchestrator's next ordinary current-session provider turn. It does not create a separate or background model request, and increasing autonomy never disables learning. `full` additionally grants standing authority for broader user/project skill, extension/tool, autonomy-setting, and authorized self-modification work when validation and rollback evidence are recorded.
|
|
117
117
|
|
|
118
118
|
Hard stops still require explicit foreground approval even in `full`: publishing, npm release, git push, tag creation, credential disclosure or provider-auth changes, destructive user-data deletion, network-exposed services, or authority expansion beyond this policy. An active user-plane `secret_store` grant is the narrow exception: model-blind activation and migration from named accessible sources require no duplicate confirmation. `/autonomy status` shows the active grant and the Auto Learn audit/log directory.
|
|
119
119
|
|
|
@@ -135,10 +135,10 @@ Hard stops still require explicit foreground approval even in `full`: publishing
|
|
|
135
135
|
| `modelRouter.cheapModel` | string | - | Model pattern for read-only, research, explanation, and question turns |
|
|
136
136
|
| `modelRouter.mediumModel` | string | - | Model pattern for scoped implementation/planning turns |
|
|
137
137
|
| `modelRouter.expensiveModel` | string | - | Model pattern for high-impact, modify, implementation, and escalated tool-heavy turns |
|
|
138
|
-
| `modelRouter.learningModel` | string | `"active"` | Model pattern for background
|
|
138
|
+
| `modelRouter.learningModel` | string | `"active"` | Model pattern for explicit/background Auto Learn, learn, and skill-creator work; automatic reflection uses the orchestrator's current session turn; `"active"` uses the current session model |
|
|
139
139
|
| `failover.subscriptionHop` | boolean | `true` | Allow subscription/OAuth quota failures to switch once to an authenticated provider default; metered/API-key quota failures always halt for explicit user choice |
|
|
140
140
|
|
|
141
|
-
Use `/settings` → **Model Router** to configure these fields globally or for the current project's `.pi/settings.json`. `/session` and `/usage` show the active router state, diagnostics, and per-tier fitness when the gate is enabled. Profile files can also include a `modelRouter` block so a situation can carry its own cheap, medium, expensive, and learning
|
|
141
|
+
Use `/settings` → **Model Router** to configure these fields globally or for the current project's `.pi/settings.json`. `/session` and `/usage` show the active router state, diagnostics, and per-tier fitness when the gate is enabled. Profile files can also include a `modelRouter` block so a situation can carry its own cheap, medium, expensive, and learning model together with its model, thinking level, soul, and resource filters. Automatic reflection does not select a separate reflection model.
|
|
142
142
|
|
|
143
143
|
Fitness applicability is intentionally split by autonomy level:
|
|
144
144
|
|
|
@@ -162,17 +162,17 @@ Fitness applicability is intentionally split by autonomy level:
|
|
|
162
162
|
|
|
163
163
|
### Worker Delegation
|
|
164
164
|
|
|
165
|
-
Pi's native delegation runtime
|
|
165
|
+
Pi's native delegation runtime manages durable, persistent leaf workers. A profile is not required. A fresh worker inherits the foreground model, live thinking level, and every active classified tool the native lane can materialize. It receives machine-wide read/write/process/network authority by default while raw Pi auth, session, settings, and memory state remain denied. Workers never receive `delegate`, descendant spawning, reflection, or memory mutation.
|
|
166
166
|
|
|
167
|
-
Whenever `delegate` is active, root
|
|
167
|
+
Whenever `delegate` is active, the root prompt uses a provider-neutral decision rule: delegate useful independent research, implementation, tests, or specialist review early; keep dependent or trivial work local. Reasoning level, provider identity, and model identity do not enable or suppress that policy; the model-capability profile may still narrow tools for very small context windows.
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
For a fresh `delegate start`, the orchestrator may optionally set `model`, `thinkingLevel`, one `path`, and `toolNames`. Omitted fields inherit. `path` changes the worker's real working directory and narrows direct read/write authority to that workspace; omitting it keeps the parent working directory for process execution without narrowing machine scope. Tool overrides may only narrow the compatible inherited surface and an unavailable or root-only requested tool fails admission instead of being silently ignored. The host derives capabilities and paths, applies global kill switches and private-state denials, and persists the exact immutable grant before execution. Reusing an `agentId` keeps its admitted grant and transcript, so overrides are rejected on reuse.
|
|
170
170
|
|
|
171
|
-
`workerDelegation.modelPins` optionally lets the owner fix the provider, model, and thinking level used by each fresh worker role. With no pins, delegation keeps the adaptive behavior above exactly. An applicable pin
|
|
171
|
+
`workerDelegation.modelPins` optionally lets the owner fix the provider, model, and thinking level used by each fresh worker role. With no pins, delegation keeps the adaptive behavior above exactly. An applicable pin is a hard ceiling: a conflicting explicit `model` or `thinkingLevel` override fails closed with `worker_model_pin_conflict:<role>` instead of silently running a different model, while an omitted override uses the pin. Owner-authored preset bindings are still narrowed to the pin. Tools, resources, workspace, and budgets follow normal admission. This applies to fresh workers and mandatory verifiers. The admitted binding is persisted and reported by `delegate start`; queued work, retries, resumes, recovery, and later tasks on a reused `agentId` keep that immutable contract even if settings change.
|
|
172
172
|
|
|
173
173
|
Pin precedence is deliberately different from ordinary deep-merged settings: global role, global default, trusted local role, trusted local default, then adaptive routing. A global default therefore wins over every project role. Within trusted local settings, the user-level directory overlay wins over the project file at the same role/default tier. Untrusted project settings are ignored. Every binding must contain an exact `provider`, `modelId`, and supported `thinkingLevel`. Malformed pin configuration blocks fresh worker admission with `worker_model_pins_invalid`; an unavailable applicable pin blocks with `worker_model_pin_unavailable:<role>`. Neither condition falls back to another model. Configure pins directly in JSON; `/settings` does not edit them.
|
|
174
174
|
|
|
175
|
-
A `roles`-only configuration (no `default` in any scope) leaves every role not listed under `roles`
|
|
175
|
+
A `roles`-only configuration (no `default` in any scope) leaves every role not listed under `roles` unpinned. This is valid but easy to configure by accident, so settings diagnostics list unpinned roles. Add a `default` to close the gap for every role, or pin every role explicitly under `roles` if adaptive routing is never intended.
|
|
176
176
|
|
|
177
177
|
```json
|
|
178
178
|
{
|
|
@@ -207,36 +207,22 @@ For a new logical agent, `forkTurns` chooses immutable sanitized birth context:
|
|
|
207
207
|
"action": "start",
|
|
208
208
|
"instructions": "Implement and verify the scheduler change.",
|
|
209
209
|
"forkTurns": "3",
|
|
210
|
-
"
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
"capabilities": [
|
|
215
|
-
"filesystem.read",
|
|
216
|
-
"filesystem.write",
|
|
217
|
-
"worktree.read",
|
|
218
|
-
"worktree.mutate",
|
|
219
|
-
"process.exec",
|
|
220
|
-
"memory.query",
|
|
221
|
-
"workflow.delegate"
|
|
222
|
-
],
|
|
223
|
-
"toolNames": ["read", "grep", "find", "ls", "write", "edit", "memory", "bash", "delegate"],
|
|
224
|
-
"readPaths": ["."],
|
|
225
|
-
"writePaths": ["packages/coding-agent"],
|
|
226
|
-
"budget": { "maxTokens": 32000, "maxCostUsd": 2, "maxToolCalls": 80 }
|
|
227
|
-
}
|
|
210
|
+
"model": { "provider": "openai-codex", "modelId": "gpt-5.5" },
|
|
211
|
+
"thinkingLevel": "high",
|
|
212
|
+
"path": "/home/me/GitHub/project",
|
|
213
|
+
"toolNames": ["read", "grep", "find", "ls", "write", "edit", "python", "bash"]
|
|
228
214
|
}
|
|
229
215
|
```
|
|
230
216
|
|
|
231
|
-
Fleet creation is bounded before Pi creates a durable task, conversation, agent, or queue entry:
|
|
217
|
+
Fleet creation is bounded before Pi creates a durable task, conversation, agent, or queue entry: one session may retain at most 256 logical agents, and the scheduler may retain at most 256 queued dispatches. Every compiled worker profile has zero descendant depth and fan-out even if a legacy profile contains recursive limits. Admission preserves queue and durable-projection headroom for mandatory verifiers. A verifier dispatch that encounters saturation remains represented by its durable subject and replays on a queue-capacity event. `workerDelegation.maxConcurrent` is the global running-agent limit; excess admitted work enters the bounded durable queue. Worker token, cost, tool-call, active-wall-clock, and attempt usage are reconstructed from durable checkpoints and checked before more work is admitted. The default delegation baseline adds no cost or active-time ceiling; positive global settings, profile budgets, and inherited foreground ceilings remain authoritative when explicitly configured.
|
|
232
218
|
|
|
233
|
-
`delegate` exposes the shared durable
|
|
219
|
+
`delegate` exposes the shared durable worker state to the owning root through distinct control actions:
|
|
234
220
|
|
|
235
221
|
- `tasks` returns a bounded view of durable DAG tasks, dependencies, status, latest attempt/agent dispatch, verifier state, terminal reason, and persisted retry eligibility. `start.dependsOn` accepts only existing same-objective task IDs; forward, cross-objective, self, and cyclic edges fail before dispatch.
|
|
236
|
-
- `list` returns safe metadata for session agents, including
|
|
237
|
-
- `transcript` pages bounded messages
|
|
222
|
+
- `list` returns safe metadata for session agents, including state and reusable activity; it does not expose private resume state.
|
|
223
|
+
- `transcript` pages bounded messages for the session root with an opaque raw-entry cursor and page size of 1-64. A page may be empty and still provide `nextCursor` after visiting non-message entries; an individually oversized message is omitted and counted rather than partially returned.
|
|
238
224
|
- `send` and `broadcast` queue bounded, non-waking, threaded peer evidence; broadcast canonicalizes a bounded target set and reports acceptance per target. Peer content is untrusted data, never authority.
|
|
239
|
-
- `follow_up`, `interrupt`, `resume`, and `cancel`
|
|
225
|
+
- `follow_up`, `interrupt`, `resume`, and `cancel` let the owning root steer worker lifecycle. `resume` keeps the admitted model, transcript, resources, and grant; a paused objective retains its suspended attempt without starting or cancelling it until objective resume drains the scheduler. `cancel` terminates only the selected current task.
|
|
240
226
|
- `reply` answers one exact reply-expected request. The session root consumes replies through the acknowledged `inbox`, event-driven `inbox_wait`, and `inbox_ack` flow instead of unsolicited transcript injection.
|
|
241
227
|
- `wait` and `wait_many` are event-driven; `wait_many` accepts a bounded canonical target set and completes in `any` or `all` mode. `retire` replay-safely closes only an idle leaf after its mailbox and reply obligations clear, preserving its binding and transcript.
|
|
242
228
|
|
|
@@ -244,7 +230,7 @@ Transient attempt retries are evidence-gated. A classified provider or transport
|
|
|
244
230
|
|
|
245
231
|
`delegate` returns a stable agent/lane identity immediately. A fresh `start` does not accept `laneId`; omit it, retain the returned `agentId`, and pass that `agentId` to a later `start` to reuse the persistent worker. Completion persists a bounded terminal handoff before waking the parent; late output stays in the worker transcript instead of racing into the active foreground transcript. Review-pending results remain `partial` and project blockers remain `blocked` in lane status and terminal handoffs instead of either being collapsed into harness failures. A scheduled transient retry is reported as nonterminal with its durable state retained. A full parent mailbox retains the attempt-keyed handoff until an explicit terminal, mailbox-capacity, state-change, or recovery event drains it—there is no retry polling loop. Exact replays are inert, conflicts fail closed, and delivery errors remain retained. Use `delegate { action: "status", laneId }` for bounded lane-result retrieval.
|
|
246
232
|
|
|
247
|
-
Global profiles live at `~/.pi/agent/profiles/orchestration/<id>.json`; project profiles live at `.pi/profiles/orchestration/<id>.json`. They are optional presets for model, reasoning, tools, resources, budget, verification, prompt defaults
|
|
233
|
+
Global profiles live at `~/.pi/agent/profiles/orchestration/<id>.json`; project profiles live at `.pi/profiles/orchestration/<id>.json`. They are optional presets for model, reasoning, tools, resources, workspace, budget, verification, and prompt defaults. Select one with `profileId` on a call or configure `workerDelegation.orchestrationProfile`. Profile `maxConcurrent` is retained in the authored schema but does not override the global scheduler. `delegate` actions `profile_inspect` and `profile_create` manage immutable session-scoped narrowings. `profile_create` can omit `baseProfileId`; Pi then derives the foreground model, live thinking, compatible tools, and machine scope before applying optional `model`, `thinkingLevel`, `path`, and `toolNames` narrowing.
|
|
248
234
|
|
|
249
235
|
A preset with `requireIndependentVerification: true` still names an owner-authored `verificationProfileId`. The runtime creates a separate durable verifier task and accepts the implementation only after a typed verifier decision. A profile using `run_process` must declare `executionPolicy`; that tool launches only listed executables as direct argv. The platform shell is different: it is a real persistent per-agent shell and is not OS/container isolation. Shell commands can exercise the host process, filesystem, network, and credentials available to Pi; direct `write`/`edit` path scopes do not sandbox shell side effects.
|
|
250
236
|
|
|
@@ -252,13 +238,12 @@ Direct `write`/`edit` calls use review-after-apply semantics. The compiled grant
|
|
|
252
238
|
|
|
253
239
|
| Setting | Type | Default | Description |
|
|
254
240
|
|---------|------|---------|-------------|
|
|
255
|
-
| `workerDelegation.enabled` | boolean | `true` | Enable autonomous
|
|
241
|
+
| `workerDelegation.enabled` | boolean | `true` | Enable autonomous persistent leaf workers; explicit `false` is a hard off-switch |
|
|
256
242
|
| `workerDelegation.orchestrationProfile` | string | - | Optional default execution preset; agents may replace its defaults within inherited authority |
|
|
257
|
-
| `workerDelegation.maxUsd` | number | `0` |
|
|
258
|
-
| `workerDelegation.maxWallClockMs` | number | `0` |
|
|
243
|
+
| `workerDelegation.maxUsd` | number | `0` | USD ceiling for one worker task; `0` is unbounded and a positive value explicitly enables the ceiling |
|
|
244
|
+
| `workerDelegation.maxWallClockMs` | number | `0` | Active wall-clock ceiling for one worker task; `0` is unbounded and a positive value explicitly enables the ceiling |
|
|
259
245
|
| `workerDelegation.maxConcurrent` | number | `20` | Global running-agent concurrency inside the fixed fleet and queue bounds |
|
|
260
246
|
| `workerDelegation.writeEnabled` | boolean | `true` | Expose direct `write`/`edit`; explicit `false` revokes them for newly admitted work and narrows resumed grants |
|
|
261
|
-
| `workerDelegation.writePaths` | string[] | `["."]` | Global envelope for direct child writes; an explicit empty array revokes direct `write`/`edit` |
|
|
262
247
|
| `workerDelegation.modelPins` | object | - | Optional exact `default` and per-role provider/model/thinking bindings for fresh workers; malformed or unavailable applicable pins fail closed |
|
|
263
248
|
|
|
264
249
|
### Tool Repair
|
|
@@ -287,21 +272,35 @@ Environment kill switches override their diagnostic layers: `PI_TOOL_REPAIR_DISA
|
|
|
287
272
|
|
|
288
273
|
### Auto Learn Advanced
|
|
289
274
|
|
|
275
|
+
Native reflection belongs only to the main/orchestrator session. Eligible turns append a durable cue to the orchestrator's next ordinary current-session provider turn; reflection never starts a separate/background model request. Workers cannot run reflection or mutate durable memory; they return evidence to the parent, which decides what should be retained. A fresh main session uses this audited learning policy:
|
|
276
|
+
|
|
290
277
|
| Setting | Type | Default | Description |
|
|
291
278
|
|---------|------|---------|-------------|
|
|
292
|
-
| `
|
|
279
|
+
| `learningPolicy.enabled` | boolean | `true` | Route reflection writes through the decision/audit/rollback policy |
|
|
280
|
+
| `learningPolicy.autoApplyEnabled` | boolean | `true` | Apply eligible additive or organizational learning without asking the user to babysit it |
|
|
281
|
+
| `learningPolicy.confidenceThreshold` | number | `50` | Minimum confidence for automatic application |
|
|
282
|
+
| `learningPolicy.minObservations` | number | `1` | Minimum repeated observations for automatic application |
|
|
283
|
+
| `learningPolicy.allowedAutoApplyLayers` | string[] | `["memory", "skill"]` | Layers eligible for automatic application; other layers remain proposals |
|
|
284
|
+
| `learningPolicy.requireRollbackPlan` | boolean | `true` | Require an inverse plan before an automatic durable write |
|
|
285
|
+
| `learningPolicy.autoApplySupersessions` | boolean | `false` | Keep memory replacement/removal approval-gated unless explicitly enabled |
|
|
286
|
+
|
|
287
|
+
Safe `memory_add`, `okf_add`, and `okf_organize` writes can therefore land autonomously, including moving an exact hot-memory fact from `MEMORY.md` into structured OKF storage. Clean skill promotion is also eligible after overlap checks. `memory_replace` and `memory_remove` remain proposals by default because they supersede existing knowledge. Every applied write records its decision, outcome, and rollback data.
|
|
288
|
+
|
|
289
|
+
| Setting | Type | Default | Description |
|
|
290
|
+
|---------|------|---------|-------------|
|
|
291
|
+
| `autoLearn.enabled` | boolean | `true` in every autonomy mode | Enable root-session current-turn reflection. Disabling it immediately dismisses any pending cue and removes the standing reflection contract; re-enabling does not resurrect dismissed evidence. Automatic reflection never schedules a separate or background model request. |
|
|
293
292
|
| `autoLearn.model` | string | `modelRouter.learningModel`, otherwise `"active"` | Legacy/direct override for the background learner; `"active"` uses the current session model, otherwise use a `pi --model` pattern |
|
|
294
|
-
| `autoLearn.longSessionMessages` | number | `32` |
|
|
295
|
-
| `autoLearn.longSessionContextPercent` | number | `70` |
|
|
296
|
-
| `autoLearn.cooldownMinutes` | number | `
|
|
293
|
+
| `autoLearn.longSessionMessages` | number | `32` | Readiness threshold after this many message entries in the active branch for an eligible learner run |
|
|
294
|
+
| `autoLearn.longSessionContextPercent` | number | `70` | Readiness threshold when current context usage reaches this percent |
|
|
295
|
+
| `autoLearn.cooldownMinutes` | number | `1440` | Per-session-tenant cooldown between learner launches |
|
|
297
296
|
| `autoLearn.leaseMinutes` | number | `90` | Shared-state lease duration for a running background learner |
|
|
298
|
-
| `autoLearn.maxConcurrentLearners` | number | `
|
|
297
|
+
| `autoLearn.maxConcurrentLearners` | number | `1` | Maximum running Auto Learn background learners per session tenant |
|
|
299
298
|
| `autoLearn.applyHighConfidence` | boolean | `false` | Allow the learner to apply high-confidence memory candidates; broader write authority is controlled by `autonomy.mode` |
|
|
300
|
-
| `autoLearn.reflectionReview` | boolean | `true` | When
|
|
301
|
-
| `autoLearn.reflectionMinToolCalls` | number | `
|
|
302
|
-
| `autoLearn.reflectionCooldownMinutes` | number | `
|
|
299
|
+
| `autoLearn.reflectionReview` | boolean | `true` | When enabled, allow root-only automatic reflection cues after eligible corrective or complex turns; the cue is consumed by the next ordinary current-session turn |
|
|
300
|
+
| `autoLearn.reflectionMinToolCalls` | number | `12` | Queue a root-session reflection cue after this many tool calls in one completed turn |
|
|
301
|
+
| `autoLearn.reflectionCooldownMinutes` | number | `1440` | Per-session-tenant cooldown between automatic root-session reflection cues; corrective and complex-task signals can bypass it |
|
|
303
302
|
|
|
304
|
-
Use `/settings` → **Model Router** for the preferred place to choose the
|
|
303
|
+
Use `/settings` → **Model Router** for the preferred place to choose the learner/skill-creator model. Automatic reflection uses the orchestrator's current session turn rather than a separate or background model request. Use `/settings` → **Auto Learn Advanced** for readiness/cooldown/concurrency overrides and the legacy direct `autoLearn.model` override. Use `/autonomy status` for the compact preset dashboard, `/auto-learn status` to inspect readiness and running leases, or `/auto-learn run` to explicitly start one bounded background learner immediately. Workers never receive reflection or durable-memory mutation authority; they return evidence to the root orchestrator.
|
|
305
304
|
|
|
306
305
|
When enabled, Auto Learn keeps a small shared state file for visibility/cooldowns, but prompt/log/session artifacts are isolated under per-session-tenant directories so one session's learner does not consume another session's concurrency budget. Learners must confront available user/project memory first, using existing rules, preferences, corrections, and project facts to decide whether each candidate is useful, unique versus merge/upgrade-worthy, and agent-improving. Candidate validation is chunked/vectorized instead of one memory query per candidate. Successful Auto Learn workers purge their internal prompt/log/session artifacts after exit; the 7-day retention pruner is a fallback for unfinished or failed artifacts, and active leases are skipped so running learners are not raced. Provider/user history pruning is delegated to the continuous-learning tool after it records a learning outcome: only files older than 7 days whose current fingerprint still matches a successfully extracted index entry are deleted, and active/current sessions are protected.
|
|
307
306
|
|
|
@@ -312,13 +311,13 @@ When enabled, Auto Learn keeps a small shared state file for visibility/cooldown
|
|
|
312
311
|
"model": "active",
|
|
313
312
|
"longSessionMessages": 32,
|
|
314
313
|
"longSessionContextPercent": 70,
|
|
315
|
-
"cooldownMinutes":
|
|
314
|
+
"cooldownMinutes": 1440,
|
|
316
315
|
"leaseMinutes": 90,
|
|
317
|
-
"maxConcurrentLearners":
|
|
316
|
+
"maxConcurrentLearners": 1,
|
|
318
317
|
"applyHighConfidence": false,
|
|
319
318
|
"reflectionReview": true,
|
|
320
|
-
"reflectionMinToolCalls":
|
|
321
|
-
"reflectionCooldownMinutes":
|
|
319
|
+
"reflectionMinToolCalls": 12,
|
|
320
|
+
"reflectionCooldownMinutes": 1440
|
|
322
321
|
}
|
|
323
322
|
}
|
|
324
323
|
```
|
|
@@ -349,10 +348,21 @@ The checkpoint owns user intent mechanically: `## Active Task` copies the latest
|
|
|
349
348
|
|
|
350
349
|
| Setting | Type | Default | Description |
|
|
351
350
|
|---------|------|---------|-------------|
|
|
352
|
-
| `costGuard.
|
|
351
|
+
| `costGuard.enabled` | boolean | `false` | Explicitly enable foreground per-turn cost projections and enforcement |
|
|
352
|
+
| `costGuard.maxTurnUsd` | number | `0` | Projected per-turn USD ceiling; a positive legacy value remains dormant until `enabled` is `true` |
|
|
353
353
|
| `costGuard.action` | string | `"warn"` | `"warn"` only reports the estimate; `"downgrade"` also lowers reasoning one rung for that request without changing saved/profile state |
|
|
354
354
|
|
|
355
|
-
The projection uses the session response reserve, cached-input rates, and model-declared long-context tiers. ChatGPT subscription usage is marked `(sub)` and does not enter the USD guard.
|
|
355
|
+
The projection uses the session response reserve, cached-input rates, and model-declared long-context tiers. ChatGPT subscription usage is marked `(sub)` and does not enter the USD guard. Enable it explicitly through `/settings` → **Foreground cost guard**, or in JSON:
|
|
356
|
+
|
|
357
|
+
```json
|
|
358
|
+
{
|
|
359
|
+
"costGuard": {
|
|
360
|
+
"enabled": true,
|
|
361
|
+
"maxTurnUsd": 0.5,
|
|
362
|
+
"action": "warn"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
```
|
|
356
366
|
|
|
357
367
|
### Context GC
|
|
358
368
|
|
|
@@ -31,12 +31,17 @@ Run `/tmux-agents` or call `tmux_agent_manager` with `action: "status"` to check
|
|
|
31
31
|
|
|
32
32
|
## Completion contract
|
|
33
33
|
|
|
34
|
-
`fire_task` creates panes
|
|
34
|
+
`fire_task` creates idle panes and arms one event-driven `tmux pipe-pane` watcher per worker. It then
|
|
35
|
+
starts every provider with the initial prompt file as part of the same CLI command
|
|
36
|
+
(`--prompt-interactive` for Agy), so task delivery cannot race TUI startup. Each watcher:
|
|
35
37
|
|
|
36
38
|
1. consumes pane output as it arrives;
|
|
37
39
|
2. writes one atomic terminal result when it sees the worker's `DONE` or `BLOCKED` marker, the pane closes, or its one-shot deadline expires;
|
|
38
40
|
3. updates tmux status metadata and emits a display notification.
|
|
39
41
|
|
|
42
|
+
On deadline, the watcher persists `timeout` first and then terminates its owned pane. A timed-out
|
|
43
|
+
provider process therefore cannot remain live and continue spending resources.
|
|
44
|
+
|
|
40
45
|
The parent Pi session watches result-file events. Once a turn's worker is terminal, it records a per-agent notification marker (`notifiedTurn`) and sends a bounded, source-labelled untrusted handoff with `triggerTurn: true`. Startup performs one reconciliation pass for terminal events produced while Pi was offline, and also reconciles tmux **sessions**: see [Persistence](#persistence-follow-ups-reconcile-dismiss) below.
|
|
41
46
|
|
|
42
47
|
Do not poll pane state, capture pane output, or inspect logs merely to detect completion. Use `job_status` or terminal artifacts after the handoff only when its bounded evidence is insufficient.
|
|
@@ -53,13 +58,14 @@ actions manage that persistence:
|
|
|
53
58
|
(relaunch with `fire_task` instead) or if the job was `dismiss`ed.
|
|
54
59
|
- **`dismiss`** — stops tracking a job (no more re-arming, no more handoffs) without killing its tmux
|
|
55
60
|
session; the pane keeps running and can still be attached to (`tmux attach -t <session>`) or stopped
|
|
56
|
-
later with `stop_job`/`stop_session`.
|
|
61
|
+
later with `stop_job`/`stop_session`. Dismiss detaches the completion watcher, so its old deadline no
|
|
62
|
+
longer owns that pane.
|
|
57
63
|
- **Session reconcile** — on session start, Pi diffs live tmux sessions against its own job records for
|
|
58
64
|
jobs it started. A session that has disappeared while its job was not yet terminal is marked orphaned
|
|
59
|
-
(informational only —
|
|
65
|
+
(informational only — reconciliation never kills it to produce this state, and the job directory is never
|
|
60
66
|
deleted automatically). A session that is still alive with a pending turn has its watcher re-armed so
|
|
61
|
-
the job can still complete normally.
|
|
62
|
-
`stop_job`/`stop_session` confirm path.
|
|
67
|
+
the job can still complete normally. Manual early termination stays behind the explicit
|
|
68
|
+
`stop_job`/`stop_session` confirm path; a managed deadline terminates only its owned pane.
|
|
63
69
|
|
|
64
70
|
An idle worker (no turn currently dispatched) does not hold this session's reload-quiesce; `/reload` is
|
|
65
71
|
never blocked merely because a persistent tmux worker exists between turns.
|
|
@@ -68,33 +74,36 @@ Running managed lanes are checkpointed at dispatch and rehydrated with the same
|
|
|
68
74
|
`/reload`. A later terminal event therefore completes the existing goal binding instead of minting a
|
|
69
75
|
replacement lane or risking a duplicate dispatch.
|
|
70
76
|
|
|
71
|
-
##
|
|
72
|
-
|
|
73
|
-
A real
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
77
|
+
## Autonomous dispatch profiles
|
|
78
|
+
|
|
79
|
+
A real `fire_task` or `send_followup` runs autonomously without a UI prompt or CLI allow flag. Tmux
|
|
80
|
+
availability detection happens inside every action; `guard` is diagnostic only and is never a required
|
|
81
|
+
handshake.
|
|
82
|
+
|
|
83
|
+
Before `fire_task` creates any pane, watcher, prompt, or job artifact, it derives one immutable internal
|
|
84
|
+
execution profile per worker and durably reserves that worker's managed lane. Omitted tool and thinking
|
|
85
|
+
fields inherit the orchestrator's eligible worker surface. Omitted `path` uses the normal process cwd
|
|
86
|
+
while inheriting the host-derived full-machine scope except private harness paths. An explicit `path`
|
|
87
|
+
sets the process cwd and passes an immutable child-scope channel that enforces that workspace for Pi's
|
|
88
|
+
structured filesystem tools. Follow-up turns reuse the persisted profile and may change instructions,
|
|
89
|
+
never authority.
|
|
90
|
+
|
|
91
|
+
For `pi` workers, `tools`, `resourceProfile`, `thinkingLevel`, and `worktreeLane` become Pi CLI flags. The shared worker
|
|
92
|
+
ceiling removes memory, root-owned durable state, and agent-launching controls while retaining ordinary
|
|
93
|
+
inherited capabilities such as Python. When `resourceProfile` is omitted, the host compiles the
|
|
94
|
+
orchestrator's effective extension/skill/prompt/theme/agent/tool filters into a one-shot child profile;
|
|
95
|
+
an explicit value overrides that inheritance. The structured read/write/edit/search tools hard-deny
|
|
96
|
+
Pi's private auth, session, memory, settings, state, and work roots, and an explicit `path` further
|
|
97
|
+
restricts those structural calls to that workspace. Arbitrary process tools such as bash and
|
|
98
|
+
Python remain deliberate host-trust boundaries and can reach OS-visible files; this profile is not
|
|
99
|
+
misrepresented as process sandboxing. These fields are rejected for non-Pi providers because arbitrary
|
|
100
|
+
external CLIs own their own tool, thinking, and workspace controls; put native provider options in
|
|
101
|
+
`command` instead. A non-Pi `path` changes its cwd only. Its durable profile records one machine-wide,
|
|
102
|
+
host-trusted process (`bash` capability) rather than projecting the parent's Pi tool names or claiming
|
|
103
|
+
CLI/OS sandbox enforcement.
|
|
104
|
+
|
|
105
|
+
Any cooperative self-reported worker usage is **advisory** — a claim to review, never a hard cap across
|
|
106
|
+
the process boundary (the child bills under its own authentication).
|
|
98
107
|
|
|
99
108
|
Dispatched tmux workers appear as `tmux-worker` lanes alongside in-process worker lanes in `/autonomy`
|
|
100
109
|
and `delegate { action: "status" }`; a worker's self-reported changed files are re-checked against the session's active
|
|
@@ -105,16 +114,14 @@ write scope and flagged for parent review when out of scope, exactly like an in-
|
|
|
105
114
|
The `goal` tool's `dispatch_worker` action can bind a single open requirement to a persistent tmux worker
|
|
106
115
|
instead of the default in-process one: pass `dispatchTarget: "tmux"`. Core invokes `fire_task` itself (the
|
|
107
116
|
same call the model would make) with exactly one `pi` agent, so the dispatch maps 1:1 to the
|
|
108
|
-
requirement's bound lane
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
same lane machinery as an in-process worker.
|
|
117
|
+
requirement's bound lane. The same autonomous profile derivation and pre-launch durable reservation
|
|
118
|
+
apply. A successful tmux dispatch waits and resumes through the same lane machinery as an in-process
|
|
119
|
+
worker.
|
|
112
120
|
|
|
113
121
|
When no worker was dispatched, the tool response's `dispatchSkipReason` explains why:
|
|
114
122
|
|
|
115
|
-
- `no_standing_grant` — no covering grant, and this call had no UI to prompt (run `grant_dispatch` first).
|
|
116
123
|
- `tmux_extension_not_loaded` — `tmux_agent_manager` is not loaded in this session (see Enable above).
|
|
117
|
-
- `tmux_dispatch_failed` — the `fire_task` launch threw
|
|
124
|
+
- `tmux_dispatch_failed` — the `fire_task` launch threw (an invalid `launchKey`, a
|
|
118
125
|
live session-name collision, an environment failure).
|
|
119
126
|
- `tmux_dispatch_incomplete` — the launch call returned without the job/agent details needed to identify
|
|
120
127
|
the new lane.
|
|
@@ -130,8 +137,8 @@ When no worker was dispatched, the tool response's `dispatchSkipReason` explains
|
|
|
130
137
|
|
|
131
138
|
## Safety
|
|
132
139
|
|
|
133
|
-
Launch actions run directly unless `dryRun: true` is requested
|
|
134
|
-
|
|
140
|
+
Launch actions run directly unless `dryRun: true` is requested. Stop actions can discard active pane
|
|
141
|
+
work, so they remain previews by default and require
|
|
135
142
|
`confirm: "yes-tmux-stop"` for execution. Existing sessions are never replaced silently; `force: true`
|
|
136
143
|
archives an old job directory but does not kill a live tmux session.
|
|
137
144
|
|
package/docs/usage.md
CHANGED
|
@@ -316,6 +316,6 @@ pi --exclude-tools ask_question
|
|
|
316
316
|
|
|
317
317
|
## Design Principles
|
|
318
318
|
|
|
319
|
-
Pi keeps the core focused and pushes project-specific workflows into extensions, skills, prompt templates, and packages. Core includes the cross-project lifecycle primitives it depends on itself: native goals, task steps, durable
|
|
319
|
+
Pi keeps the core focused and pushes project-specific workflows into extensions, skills, prompt templates, and packages. Core includes the cross-project lifecycle primitives it depends on itself: native goals, task steps, durable root-managed leaf-worker orchestration, and a platform-selected shell. Broader integrations such as MCP and external-provider teams remain extension/package territory.
|
|
320
320
|
|
|
321
321
|
For the full rationale, read the [blog post](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/).
|
package/docs/worker-profiles.md
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
# Task worker presets
|
|
2
2
|
|
|
3
|
-
Native delegation does not require a profile. `delegate
|
|
3
|
+
Native delegation does not require a profile. The model-facing `delegate start` action exposes only top-level `model`, `thinkingLevel`, `path`, and `toolNames` overrides. Omitted fields inherit the live compatible foreground model, thinking level, classified tools, and machine scope. Pi compiles that request into an immutable host execution grant; the model does not provide an authority envelope, role/capability grant, budget, or tool-call ceiling. Budgets, leases, and other limits come from host settings and owner-authored profiles.
|
|
4
4
|
|
|
5
5
|
`delegate` profile actions remain useful when the foreground orchestrator wants a reusable session-scoped preset. They do not edit user or project profile files. Task presets are:
|
|
6
6
|
|
|
7
|
-
- Derived
|
|
7
|
+
- Derived from an owner-authored base profile or the live compatible foreground contract.
|
|
8
8
|
- Immutable and assigned a `task-...` ID by Pi.
|
|
9
9
|
- Stored on the owning session branch, never shared across independent sessions.
|
|
10
10
|
- Limited to 32 presets per session.
|
|
11
|
-
- Unable to add tools or resources
|
|
11
|
+
- Unable to add tools or resources; tools may only narrow the inherited surface and resources/budgets stay host-owned.
|
|
12
12
|
- Limited to configured, authenticated, non-exhausted models and a reasoning level that model supports.
|
|
13
13
|
|
|
14
|
-
Use `delegate { action: "profile_inspect" }` when
|
|
14
|
+
Use `delegate { action: "profile_inspect" }` when reusable owner-authored bases or model combinations are unknown. Otherwise `profile_create` can derive directly from the live foreground contract. Supply a concise task and only the model, thinking, path, or tool narrowing worth preserving. Pass the returned profile ID unchanged to `delegate start`; never invent one.
|
|
15
15
|
|
|
16
|
-
Worker agents do not receive
|
|
16
|
+
Worker agents are root-managed leaves. They do not receive root-only profile/status/control actions or `delegate`, and cannot create descendants. The root owns worker lifecycle, queue admission, budgets, leases, cancellation, status, and bounded transcript retrieval. Each fresh worker receives a new classified tool surface and the live compatible model, thinking level, tools, and machine scope; top-level overrides can narrow or focus that inherited base. Worker output is untrusted evidence delivered to the owning root through the durable terminal handoff.
|
|
17
|
+
|
|
18
|
+
The root `memory` tool and raw memory prompt snapshot never enter a worker or child session. When retrieval is enabled and the admitted profile or dispatch selects `memory_read`, Pi materializes a fresh query-only broker with `memory.query` authority and returns bounded, source-labeled evidence; it cannot write memory or expose memory files.
|
|
17
19
|
|
|
18
20
|
New agents may receive immutable sanitized birth context with `forkTurns: "none"`, `"all"`, or a positive user-turn count such as `"3"`. Omitted starts receive no parent transcript, so a self-contained task cannot inherit and mistake parent-level orchestration intent for child ownership. Explicit inheritance remains available inside the exact provider/model boundary. Crossing either provider or model defaults to no inherited turns, and an explicit non-`none` cross-boundary fork is rejected. Tool calls/results, reasoning/commentary, system/developer/custom messages, mailbox controls, non-text content, and incomplete assistant output never enter the snapshot. Dispatching another task with an existing `agentId` reuses that agent's durable transcript and cannot replace its birth context.
|
|
19
21
|
|
|
20
22
|
`delegate tasks` is the bounded view of the same durable task/DAG runtime used for dispatch and recovery. A new task may name existing same-objective task IDs with `dependsOn`; it remains pending until those dependencies complete, while invalid or cyclic edges fail closed. Evidence-classified transient failures retain their attempt/retry count and exact `notBefore` deadline across restart. Agent, task, and attempt projections are independently capped at 256 entries.
|
|
21
23
|
|
|
22
|
-
Pi admits fleet and queue capacity before registering
|
|
24
|
+
Pi admits fleet and queue capacity before registering each root-dispatched worker; every accepted queued worker then has a stable agent ID. Queue and projection admission preserve one continuation slot for every pending mandatory verifier, and a verifier blocked by saturation is retried from durable subject state when capacity changes. The root yields its scheduler slot while waiting for an event-driven state change. A worker cannot wait for itself or for a queued target blocked by its own write reservation; that wait fails immediately and tells the worker to finish its task so the root can continue coordination. Every terminal worker writes one bounded, idempotent handoff to the owning root's mailbox. Review-pending results retain terminal status `partial`, and project-level blockers retain `blocked`; neither is projected as a harness failure. Evidence-classified retries stay nonterminal and report that their durable state is preserved. A full mailbox retains that handoff by terminal attempt ID until an explicit capacity/state/recovery signal drains it; no timer polls for delivery. The root receives the handoff without transcript races and resumes once when idle. Worker output remains in the worker transcript. `interrupt`, `resume`, `cancel`, and `follow_up` are root-owned; a paused objective keeps a suspended worker nonterminal until resume. `retire` closes only an idle leaf with no unresolved mailbox/reply work and preserves its binding and transcript. A resumed worker retains the exact admitted preset or adaptive grant, model, resources, lineage, and transcript.
|
package/docs/worktree-sync.md
CHANGED
|
@@ -164,24 +164,22 @@ environment value a lane-bound process can set to shed the worker ceiling below.
|
|
|
164
164
|
|
|
165
165
|
### Forbidden-tool ceiling
|
|
166
166
|
|
|
167
|
-
A worker session can never activate: `goal`, `
|
|
168
|
-
`
|
|
169
|
-
`context_scout`, `python`. This is enforced as the FIRST line of the tool registry's allow
|
|
167
|
+
A worker session can never activate: the legacy composite `goal`, `secret_store`, `memory`, `delegate`,
|
|
168
|
+
`improvement_loop`, `model_fitness`, `tmux_agent_manager`, or `context_scout`. This is enforced as the FIRST line of the tool registry's allow
|
|
170
169
|
predicate (`RuntimeBuilder.refreshToolRegistry`'s `isAllowedTool`) -- it wins over an allow-list,
|
|
171
|
-
an exclude-list, or an active resource profile that names the tool explicitly. `goal
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
by removing the tool.
|
|
170
|
+
an exclude-list, or an active resource profile that names the tool explicitly. The legacy `goal`
|
|
171
|
+
stays root-only because its composite action set embeds `dispatch_worker`; its non-dispatching
|
|
172
|
+
`create_goal`/`get_goal`/`update_goal` lifecycle tools inherit normally. `delegate`,
|
|
173
|
+
`tmux_agent_manager`, `context_scout`, and `model_fitness` launch agent/provider worker loops.
|
|
174
|
+
`memory` and `improvement_loop` mutate root-owned reflection state, while `secret_store` mutates
|
|
175
|
+
machine credential/project bindings. Ordinary tools including `pipeline`, `ask_question`, `skill`,
|
|
176
|
+
`extensionify`, `skillify`, and `run_toolkit_script` inherit when the orchestrator exposes them.
|
|
177
|
+
|
|
178
|
+
`bash` and `python` are deliberately **not** forbidden. Removing only one execution route would not
|
|
179
|
+
create a meaningful filesystem boundary. Pi hard-denies private harness roots for structural
|
|
180
|
+
read/write/edit/search calls, but arbitrary process code remains a deliberate host-trust boundary and
|
|
181
|
+
can reach any file visible to the OS account. The harness does not claim a process sandbox it does not
|
|
182
|
+
have; lane G8/G10 and the land gate remain the backstops for repository integration.
|
|
185
183
|
|
|
186
184
|
### `worktree_sync` tool scoping for a worker
|
|
187
185
|
|
|
@@ -207,7 +205,15 @@ deliberately engine-level and applies to `land`/`release_lane` ONLY -- `sync`/`c
|
|
|
207
205
|
from the tool-layer `laneKey` check above. `release_lane`'s existing G11 discard-confirm requirement
|
|
208
206
|
is unaffected: it still applies once ownership no longer conflicts.
|
|
209
207
|
|
|
210
|
-
###
|
|
208
|
+
### Structural path envelopes
|
|
209
|
+
|
|
210
|
+
Every worker session wraps structural read/write/edit/grep/find/ls calls in a symlink-safe private-path
|
|
211
|
+
envelope. `auth.json`, `MEMORY.md`, `USER.md`, settings/model files, session/state/work roots, and the
|
|
212
|
+
active project's `.pi/settings.json` are denied before the underlying tool runs. The positive scope is
|
|
213
|
+
empty for an unrestricted worker, meaning arbitrary sibling projects and machine paths remain available
|
|
214
|
+
as required by the inherited full-machine profile. A managed Pi worker launched with an explicit profile
|
|
215
|
+
`path` receives that path through an immutable startup channel, and the same envelope then denies
|
|
216
|
+
structural access outside it.
|
|
211
217
|
|
|
212
218
|
For a lane-bound session, `edit`/`write` targets are checked against the lane's own worktree root
|
|
213
219
|
(`WorktreeLaneGate.checkMutation`'s `targetPath` parameter, resolved by `RuntimeBuilder`'s tool
|
|
@@ -216,8 +222,8 @@ lane's worktree root and the target are both resolved through `realpath` (walkin
|
|
|
216
222
|
nearest EXISTING ancestor when the target itself does not exist yet, so a not-yet-created file
|
|
217
223
|
cannot be smuggled through a symlink that escapes the lane). A target outside the resolved lane root
|
|
218
224
|
is refused (`path_outside_lane`). No active lane record leaves the existing fail-open behavior
|
|
219
|
-
unchanged.
|
|
220
|
-
described above.
|
|
225
|
+
unchanged. Arbitrary process code is untouched by the structural envelope and retains the explicit
|
|
226
|
+
host-trust semantics described above.
|
|
221
227
|
|
|
222
228
|
### Zero state/settings footprint
|
|
223
229
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.95.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.95.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|