@caupulican/pi-adaptative 0.81.37 → 0.81.39
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 +91 -0
- package/README.md +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/README.md +18 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts +131 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts.map +1 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js +196 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js.map +1 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.ts +308 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts +22 -2
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js +585 -24
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.ts +749 -27
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/__init__.py +43 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/fs.py +270 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/search.py +252 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/strings.py +399 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/text.py +575 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/context.py +52 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/errors.py +49 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/exec.py +734 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/expand.py +238 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/main.py +132 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/nodes.py +116 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/parser.py +287 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/proc.py +137 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/state.py +100 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/tokens.py +579 -0
- package/dist/bundled-resources/skills/tool-call-repair/SKILL.md +19 -9
- package/dist/bundled-resources/skills/tool-call-repair/references/failure-grammar.md +22 -5
- package/dist/bundled-resources/skills/tool-call-repair/references/repair-catalogue.md +5 -5
- package/dist/bundled-resources/skills/tool-call-repair/references/text-protocol-grammar.md +28 -7
- package/dist/cli/args.d.ts +3 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +15 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-paths.d.ts +49 -0
- package/dist/core/agent-paths.d.ts.map +1 -0
- package/dist/core/agent-paths.js +107 -0
- package/dist/core/agent-paths.js.map +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +3 -3
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +234 -17
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +484 -62
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/autonomy/contracts.d.ts +9 -0
- package/dist/core/autonomy/contracts.d.ts.map +1 -1
- package/dist/core/autonomy/contracts.js.map +1 -1
- package/dist/core/autonomy/lane-tracker.d.ts +10 -1
- package/dist/core/autonomy/lane-tracker.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tracker.js +5 -1
- package/dist/core/autonomy/lane-tracker.js.map +1 -1
- package/dist/core/background-lane-controller.d.ts +122 -6
- package/dist/core/background-lane-controller.d.ts.map +1 -1
- package/dist/core/background-lane-controller.js +447 -90
- package/dist/core/background-lane-controller.js.map +1 -1
- package/dist/core/bash-execution-controller.d.ts +4 -0
- package/dist/core/bash-execution-controller.d.ts.map +1 -1
- package/dist/core/bash-execution-controller.js +7 -1
- package/dist/core/bash-execution-controller.js.map +1 -1
- package/dist/core/compaction-support.d.ts +13 -3
- package/dist/core/compaction-support.d.ts.map +1 -1
- package/dist/core/compaction-support.js +43 -7
- package/dist/core/compaction-support.js.map +1 -1
- package/dist/core/context/context-audit.d.ts +33 -1
- package/dist/core/context/context-audit.d.ts.map +1 -1
- package/dist/core/context/context-audit.js +31 -5
- package/dist/core/context/context-audit.js.map +1 -1
- package/dist/core/context/sqlite-runtime-index.d.ts.map +1 -1
- package/dist/core/context/sqlite-runtime-index.js +13 -7
- package/dist/core/context/sqlite-runtime-index.js.map +1 -1
- package/dist/core/context-gc.d.ts.map +1 -1
- package/dist/core/context-gc.js +16 -1
- package/dist/core/context-gc.js.map +1 -1
- package/dist/core/context-pipeline.d.ts +26 -4
- package/dist/core/context-pipeline.d.ts.map +1 -1
- package/dist/core/context-pipeline.js +137 -14
- package/dist/core/context-pipeline.js.map +1 -1
- package/dist/core/cost-guard.d.ts +19 -3
- package/dist/core/cost-guard.d.ts.map +1 -1
- package/dist/core/cost-guard.js +18 -3
- package/dist/core/cost-guard.js.map +1 -1
- package/dist/core/delegation/session-worker-result.d.ts +34 -4
- package/dist/core/delegation/session-worker-result.d.ts.map +1 -1
- package/dist/core/delegation/session-worker-result.js +64 -4
- package/dist/core/delegation/session-worker-result.js.map +1 -1
- package/dist/core/delegation/worker-actions.d.ts.map +1 -1
- package/dist/core/delegation/worker-actions.js +1 -1
- package/dist/core/delegation/worker-actions.js.map +1 -1
- package/dist/core/delegation/worker-result.d.ts +42 -1
- package/dist/core/delegation/worker-result.d.ts.map +1 -1
- package/dist/core/delegation/worker-result.js +68 -0
- package/dist/core/delegation/worker-result.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +23 -7
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +51 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/goal-loop-controller.d.ts +17 -1
- package/dist/core/goal-loop-controller.d.ts.map +1 -1
- package/dist/core/goal-loop-controller.js +79 -11
- package/dist/core/goal-loop-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-controller.d.ts +48 -2
- package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-controller.js +77 -0
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.d.ts +39 -0
- package/dist/core/goals/goal-continuation-defaults.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.js +42 -0
- package/dist/core/goals/goal-continuation-defaults.js.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts +4 -0
- package/dist/core/goals/goal-continuation-prompt.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.js +51 -10
- package/dist/core/goals/goal-continuation-prompt.js.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.d.ts +101 -2
- package/dist/core/goals/goal-runtime-snapshot.d.ts.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.js +87 -4
- package/dist/core/goals/goal-runtime-snapshot.js.map +1 -1
- package/dist/core/goals/goal-state.d.ts +89 -1
- package/dist/core/goals/goal-state.d.ts.map +1 -1
- package/dist/core/goals/goal-state.js +71 -5
- package/dist/core/goals/goal-state.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts +56 -2
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js +111 -5
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/goals/session-goal-state.d.ts +11 -2
- package/dist/core/goals/session-goal-state.d.ts.map +1 -1
- package/dist/core/goals/session-goal-state.js +32 -17
- package/dist/core/goals/session-goal-state.js.map +1 -1
- package/dist/core/keybindings.d.ts +10 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +10 -2
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/learning/observation-store.d.ts +12 -3
- package/dist/core/learning/observation-store.d.ts.map +1 -1
- package/dist/core/learning/observation-store.js +30 -15
- package/dist/core/learning/observation-store.js.map +1 -1
- package/dist/core/learning/skill-curator.d.ts +5 -1
- package/dist/core/learning/skill-curator.d.ts.map +1 -1
- package/dist/core/learning/skill-curator.js +21 -19
- package/dist/core/learning/skill-curator.js.map +1 -1
- package/dist/core/local-runtime-controller.d.ts +65 -3
- package/dist/core/local-runtime-controller.d.ts.map +1 -1
- package/dist/core/local-runtime-controller.js +186 -26
- package/dist/core/local-runtime-controller.js.map +1 -1
- package/dist/core/memory/providers/file-store.d.ts +1 -1
- package/dist/core/memory/providers/file-store.d.ts.map +1 -1
- package/dist/core/memory/providers/file-store.js +6 -6
- package/dist/core/memory/providers/file-store.js.map +1 -1
- package/dist/core/model-capability.d.ts +34 -0
- package/dist/core/model-capability.d.ts.map +1 -1
- package/dist/core/model-capability.js +42 -1
- package/dist/core/model-capability.js.map +1 -1
- package/dist/core/model-router/tool-escalation.d.ts +15 -0
- package/dist/core/model-router/tool-escalation.d.ts.map +1 -1
- package/dist/core/model-router/tool-escalation.js +23 -1
- package/dist/core/model-router/tool-escalation.js.map +1 -1
- package/dist/core/model-router-controller.d.ts +34 -7
- package/dist/core/model-router-controller.d.ts.map +1 -1
- package/dist/core/model-router-controller.js +95 -16
- package/dist/core/model-router-controller.js.map +1 -1
- package/dist/core/models/adaptation-store.d.ts +7 -0
- package/dist/core/models/adaptation-store.d.ts.map +1 -1
- package/dist/core/models/adaptation-store.js +47 -11
- package/dist/core/models/adaptation-store.js.map +1 -1
- package/dist/core/models/default-model-suggestions.d.ts.map +1 -1
- package/dist/core/models/default-model-suggestions.js +17 -0
- package/dist/core/models/default-model-suggestions.js.map +1 -1
- package/dist/core/models/fitness-store.d.ts +3 -0
- package/dist/core/models/fitness-store.d.ts.map +1 -1
- package/dist/core/models/fitness-store.js +11 -2
- package/dist/core/models/fitness-store.js.map +1 -1
- package/dist/core/models/llamacpp-runtime.d.ts +180 -0
- package/dist/core/models/llamacpp-runtime.d.ts.map +1 -0
- package/dist/core/models/llamacpp-runtime.js +475 -0
- package/dist/core/models/llamacpp-runtime.js.map +1 -0
- package/dist/core/models/local-registration.d.ts +40 -0
- package/dist/core/models/local-registration.d.ts.map +1 -1
- package/dist/core/models/local-registration.js +94 -5
- package/dist/core/models/local-registration.js.map +1 -1
- package/dist/core/models/local-runtime.d.ts.map +1 -1
- package/dist/core/models/local-runtime.js +9 -7
- package/dist/core/models/local-runtime.js.map +1 -1
- package/dist/core/models/model-ref.d.ts +7 -0
- package/dist/core/models/model-ref.d.ts.map +1 -1
- package/dist/core/models/model-ref.js +26 -0
- package/dist/core/models/model-ref.js.map +1 -1
- package/dist/core/models/needle-runtime.d.ts +257 -0
- package/dist/core/models/needle-runtime.d.ts.map +1 -0
- package/dist/core/models/needle-runtime.js +519 -0
- package/dist/core/models/needle-runtime.js.map +1 -0
- package/dist/core/models/prism-llamacpp-lifecycle.d.ts +89 -0
- package/dist/core/models/prism-llamacpp-lifecycle.d.ts.map +1 -0
- package/dist/core/models/prism-llamacpp-lifecycle.js +121 -0
- package/dist/core/models/prism-llamacpp-lifecycle.js.map +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +11 -10
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/process-matrix/codes.d.ts +72 -0
- package/dist/core/process-matrix/codes.d.ts.map +1 -0
- package/dist/core/process-matrix/codes.js +15 -0
- package/dist/core/process-matrix/codes.js.map +1 -0
- package/dist/core/process-matrix/runtime.d.ts +63 -0
- package/dist/core/process-matrix/runtime.d.ts.map +1 -0
- package/dist/core/process-matrix/runtime.js +310 -0
- package/dist/core/process-matrix/runtime.js.map +1 -0
- package/dist/core/process-matrix/store.d.ts +22 -0
- package/dist/core/process-matrix/store.d.ts.map +1 -0
- package/dist/core/process-matrix/store.js +80 -0
- package/dist/core/process-matrix/store.js.map +1 -0
- package/dist/core/process-matrix/supervisor.d.ts +72 -0
- package/dist/core/process-matrix/supervisor.d.ts.map +1 -0
- package/dist/core/process-matrix/supervisor.js +130 -0
- package/dist/core/process-matrix/supervisor.js.map +1 -0
- package/dist/core/profile-registry.d.ts +7 -0
- package/dist/core/profile-registry.d.ts.map +1 -1
- package/dist/core/profile-registry.js +20 -0
- package/dist/core/profile-registry.js.map +1 -1
- package/dist/core/python-runtime.d.ts.map +1 -1
- package/dist/core/python-runtime.js +3 -3
- package/dist/core/python-runtime.js.map +1 -1
- package/dist/core/reflection-controller.d.ts +29 -5
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +215 -126
- package/dist/core/reflection-controller.js.map +1 -1
- package/dist/core/reload-blockers.d.ts +36 -0
- package/dist/core/reload-blockers.d.ts.map +1 -1
- package/dist/core/reload-blockers.js +44 -0
- package/dist/core/reload-blockers.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +8 -7
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-builder.d.ts +58 -5
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +209 -25
- package/dist/core/runtime-builder.js.map +1 -1
- package/dist/core/scout-controller.d.ts +6 -0
- package/dist/core/scout-controller.d.ts.map +1 -1
- package/dist/core/scout-controller.js +66 -52
- package/dist/core/scout-controller.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -3
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-role.d.ts +31 -0
- package/dist/core/session-role.d.ts.map +1 -0
- package/dist/core/session-role.js +52 -0
- package/dist/core/session-role.js.map +1 -0
- package/dist/core/settings-manager.d.ts +42 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +94 -60
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt-builder.d.ts +12 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.js +6 -0
- package/dist/core/system-prompt-builder.js.map +1 -1
- package/dist/core/system-prompt.d.ts +14 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +20 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tasks/session-task-state.d.ts +11 -2
- package/dist/core/tasks/session-task-state.d.ts.map +1 -1
- package/dist/core/tasks/session-task-state.js +27 -11
- package/dist/core/tasks/session-task-state.js.map +1 -1
- package/dist/core/tasks/task-contract-monitor.d.ts +45 -0
- package/dist/core/tasks/task-contract-monitor.d.ts.map +1 -0
- package/dist/core/tasks/task-contract-monitor.js +56 -0
- package/dist/core/tasks/task-contract-monitor.js.map +1 -0
- package/dist/core/tasks/task-state.d.ts +8 -0
- package/dist/core/tasks/task-state.d.ts.map +1 -1
- package/dist/core/tasks/task-state.js +28 -1
- package/dist/core/tasks/task-state.js.map +1 -1
- package/dist/core/tool-gate-controller.d.ts.map +1 -1
- package/dist/core/tool-gate-controller.js +5 -0
- package/dist/core/tool-gate-controller.js.map +1 -1
- package/dist/core/tool-recovery-log-records.d.ts +7 -0
- package/dist/core/tool-recovery-log-records.d.ts.map +1 -1
- package/dist/core/tool-recovery-log-records.js +14 -6
- package/dist/core/tool-recovery-log-records.js.map +1 -1
- package/dist/core/tool-selection/promotion.d.ts +54 -0
- package/dist/core/tool-selection/promotion.d.ts.map +1 -0
- package/dist/core/tool-selection/promotion.js +81 -0
- package/dist/core/tool-selection/promotion.js.map +1 -0
- package/dist/core/tool-selection/tool-performance-store.d.ts +37 -0
- package/dist/core/tool-selection/tool-performance-store.d.ts.map +1 -1
- package/dist/core/tool-selection/tool-performance-store.js +87 -3
- package/dist/core/tool-selection/tool-performance-store.js.map +1 -1
- package/dist/core/tool-selection/tool-selection-controller.d.ts +45 -0
- package/dist/core/tool-selection/tool-selection-controller.d.ts.map +1 -1
- package/dist/core/tool-selection/tool-selection-controller.js +96 -0
- package/dist/core/tool-selection/tool-selection-controller.js.map +1 -1
- package/dist/core/tools/bash.d.ts +18 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +97 -18
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/delegate-status.d.ts +14 -0
- package/dist/core/tools/delegate-status.d.ts.map +1 -1
- package/dist/core/tools/delegate-status.js +82 -7
- package/dist/core/tools/delegate-status.js.map +1 -1
- package/dist/core/tools/delegate.d.ts.map +1 -1
- package/dist/core/tools/delegate.js +25 -8
- package/dist/core/tools/delegate.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +52 -44
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/goal.d.ts +94 -3
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +165 -15
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +5 -4
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/model-fitness.d.ts +7 -0
- package/dist/core/tools/model-fitness.d.ts.map +1 -1
- package/dist/core/tools/model-fitness.js +2 -2
- package/dist/core/tools/model-fitness.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/shell-contract-router.d.ts +6 -1
- package/dist/core/tools/shell-contract-router.d.ts.map +1 -1
- package/dist/core/tools/shell-contract-router.js +69 -13
- package/dist/core/tools/shell-contract-router.js.map +1 -1
- package/dist/core/tools/shell-session.d.ts +89 -0
- package/dist/core/tools/shell-session.d.ts.map +1 -0
- package/dist/core/tools/shell-session.js +432 -0
- package/dist/core/tools/shell-session.js.map +1 -0
- package/dist/core/tools/task-steps.d.ts +4 -0
- package/dist/core/tools/task-steps.d.ts.map +1 -1
- package/dist/core/tools/task-steps.js +63 -8
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/core/tools/tmux-dispatch.d.ts +86 -0
- package/dist/core/tools/tmux-dispatch.d.ts.map +1 -0
- package/dist/core/tools/tmux-dispatch.js +91 -0
- package/dist/core/tools/tmux-dispatch.js.map +1 -0
- package/dist/core/tools/windows-shell-engine.d.ts +42 -0
- package/dist/core/tools/windows-shell-engine.d.ts.map +1 -0
- package/dist/core/tools/windows-shell-engine.js +153 -0
- package/dist/core/tools/windows-shell-engine.js.map +1 -0
- package/dist/core/tools/windows-shell-state.d.ts +40 -0
- package/dist/core/tools/windows-shell-state.d.ts.map +1 -0
- package/dist/core/tools/windows-shell-state.js +59 -0
- package/dist/core/tools/windows-shell-state.js.map +1 -0
- package/dist/core/tools/worktree-sync.d.ts +24 -0
- package/dist/core/tools/worktree-sync.d.ts.map +1 -0
- package/dist/core/tools/worktree-sync.js +338 -0
- package/dist/core/tools/worktree-sync.js.map +1 -0
- package/dist/core/trust-manager.d.ts +4 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +20 -2
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/util/atomic-file.d.ts +55 -0
- package/dist/core/util/atomic-file.d.ts.map +1 -0
- package/dist/core/util/atomic-file.js +255 -0
- package/dist/core/util/atomic-file.js.map +1 -0
- package/dist/core/util/minimatch-cache.d.ts +33 -0
- package/dist/core/util/minimatch-cache.d.ts.map +1 -0
- package/dist/core/util/minimatch-cache.js +0 -0
- package/dist/core/util/minimatch-cache.js.map +1 -0
- package/dist/core/worktree-sync/codes.d.ts +227 -0
- package/dist/core/worktree-sync/codes.d.ts.map +1 -0
- package/dist/core/worktree-sync/codes.js +14 -0
- package/dist/core/worktree-sync/codes.js.map +1 -0
- package/dist/core/worktree-sync/git-engine.d.ts +156 -0
- package/dist/core/worktree-sync/git-engine.d.ts.map +1 -0
- package/dist/core/worktree-sync/git-engine.js +1191 -0
- package/dist/core/worktree-sync/git-engine.js.map +1 -0
- package/dist/core/worktree-sync/lane-gate.d.ts +75 -0
- package/dist/core/worktree-sync/lane-gate.d.ts.map +1 -0
- package/dist/core/worktree-sync/lane-gate.js +360 -0
- package/dist/core/worktree-sync/lane-gate.js.map +1 -0
- package/dist/core/worktree-sync/runtime.d.ts +47 -0
- package/dist/core/worktree-sync/runtime.d.ts.map +1 -0
- package/dist/core/worktree-sync/runtime.js +96 -0
- package/dist/core/worktree-sync/runtime.js.map +1 -0
- package/dist/core/worktree-sync/store.d.ts +69 -0
- package/dist/core/worktree-sync/store.d.ts.map +1 -0
- package/dist/core/worktree-sync/store.js +247 -0
- package/dist/core/worktree-sync/store.js.map +1 -0
- package/dist/core/worktree-sync/watcher.d.ts +29 -0
- package/dist/core/worktree-sync/watcher.d.ts.map +1 -0
- package/dist/core/worktree-sync/watcher.js +93 -0
- package/dist/core/worktree-sync/watcher.js.map +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +94 -0
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +9 -0
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +38 -0
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.d.ts +16 -1
- package/dist/modes/interactive/auto-learn-controller.d.ts.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.js +50 -8
- package/dist/modes/interactive/auto-learn-controller.js.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.js +23 -1
- package/dist/modes/interactive/components/profile-resource-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +4 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/local-model-commands.d.ts +43 -0
- package/dist/modes/interactive/local-model-commands.d.ts.map +1 -1
- package/dist/modes/interactive/local-model-commands.js +290 -3
- package/dist/modes/interactive/local-model-commands.js.map +1 -1
- package/dist/modes/interactive/session-flow-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-flow-commands.js +24 -4
- package/dist/modes/interactive/session-flow-commands.js.map +1 -1
- package/dist/utils/fs-watch.d.ts +11 -0
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js +20 -2
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/highlight-js-languages.d.ts +4 -0
- package/dist/utils/highlight-js-languages.d.ts.map +1 -0
- package/dist/utils/highlight-js-languages.js +573 -0
- package/dist/utils/highlight-js-languages.js.map +1 -0
- package/dist/utils/shell.d.ts +7 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +39 -9
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +53 -5
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +112 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/development.md +2 -0
- package/docs/packages.md +1 -1
- package/docs/process-matrix.md +120 -0
- package/docs/settings.md +5 -2
- package/docs/tmux-agent-manager.md +85 -2
- package/docs/windows.md +52 -3
- package/docs/work-directory.md +29 -0
- package/docs/worktree-sync.md +250 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +10 -4
- package/docs/integration-sweep-builder-blueprint-2026-07-09.md +0 -365
- package/docs/integration-sweep-resume-2026-07-09.md +0 -407
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { createHash } from "crypto";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync } from "fs";
|
|
3
|
-
import { minimatch } from "minimatch";
|
|
4
3
|
import { homedir } from "os";
|
|
5
4
|
import { basename, dirname, join, relative, resolve, sep } from "path";
|
|
6
5
|
import lockfile from "proper-lockfile";
|
|
7
6
|
import { CONFIG_DIR_NAME, getAgentDir, getProfilesDir } from "../config.js";
|
|
8
7
|
import { normalizePath, resolvePath } from "../utils/paths.js";
|
|
8
|
+
import { configFile } from "./agent-paths.js";
|
|
9
|
+
import { DEFAULT_CONTEXT_GC_SETTINGS } from "./context-gc.js";
|
|
9
10
|
import { DEFAULT_GOAL_AUTO_CONTINUE, DEFAULT_GOAL_AUTO_CONTINUE_DELAY_MS, DEFAULT_GOAL_CONTINUE_MAX_STALL_TURNS, DEFAULT_GOAL_CONTINUE_MAX_TURNS, DEFAULT_GOAL_CONTINUE_MAX_WALL_CLOCK_MINUTES, MAX_GOAL_AUTO_CONTINUE_DELAY_MS, MAX_GOAL_CONTINUE_MAX_STALL_TURNS, MAX_GOAL_CONTINUE_MAX_TURNS, MAX_GOAL_CONTINUE_MAX_WALL_CLOCK_MINUTES, } from "./goals/goal-continuation-defaults.js";
|
|
10
11
|
import { DEFAULT_HTTP_IDLE_TIMEOUT_MS, parseHttpIdleTimeoutMs } from "./http-dispatcher.js";
|
|
11
12
|
import { ProfileRegistry } from "./profile-registry.js";
|
|
12
13
|
import { mergeResourceProfileMap, mergeResourceProfileSettings } from "./resource-profile-blocks.js";
|
|
14
|
+
import { isWorkerSession } from "./session-role.js";
|
|
13
15
|
import { validateSkillName } from "./skills.js";
|
|
16
|
+
import { matchesCompiledPattern } from "./util/minimatch-cache.js";
|
|
14
17
|
export const MEMORY_RETRIEVAL_MAX_RESULTS_MIN = 1;
|
|
15
18
|
export const MEMORY_RETRIEVAL_MAX_RESULTS_MAX = 20;
|
|
16
19
|
const MEMORY_RETRIEVAL_MAX_RESULTS_DEFAULT = 5;
|
|
@@ -40,7 +43,13 @@ export const DEFAULT_WORKER_DELEGATION_MAX_USD = 0.5;
|
|
|
40
43
|
export const DEFAULT_WORKER_DELEGATION_MAX_WALL_CLOCK_MS = 120_000;
|
|
41
44
|
export const MAX_WORKER_DELEGATION_MAX_USD = 5;
|
|
42
45
|
export const MAX_WORKER_DELEGATION_MAX_WALL_CLOCK_MS = 3_600_000;
|
|
43
|
-
export const
|
|
46
|
+
export const DEFAULT_WORKTREE_SYNC_POLICY = "on_land_mandatory";
|
|
47
|
+
export const DEFAULT_WORKTREE_SYNC_GATE_TIMEOUT_MS = 900_000;
|
|
48
|
+
export const DEFAULT_WORKTREE_SYNC_MAX_LANES = 5;
|
|
49
|
+
export const DEFAULT_PROCESS_MATRIX_HEARTBEAT_MS = 30_000;
|
|
50
|
+
export const DEFAULT_PROCESS_MATRIX_ADOPTION_GRACE_MS = 300_000;
|
|
51
|
+
export const DEFAULT_PROCESS_MATRIX_WATCHER_POLL_MS = 25_000;
|
|
52
|
+
export const DEFAULT_LEARNING_POLICY_ENABLED = true;
|
|
44
53
|
export const DEFAULT_LEARNING_POLICY_AUTO_APPLY_ENABLED = false;
|
|
45
54
|
export const DEFAULT_LEARNING_POLICY_CONFIDENCE_THRESHOLD = 90;
|
|
46
55
|
export const DEFAULT_LEARNING_POLICY_MIN_OBSERVATIONS = 2;
|
|
@@ -95,10 +104,14 @@ function findDirectoryProfileRoot(cwd) {
|
|
|
95
104
|
export function getDirectoryResourceProfileInfo(cwd, agentDir = getAgentDir()) {
|
|
96
105
|
const root = findDirectoryProfileRoot(cwd);
|
|
97
106
|
const hash = createHash("sha256").update(root).digest("hex").slice(0, 16);
|
|
107
|
+
// resource-profiles/ stays at the agentDir root (not state/): moving it needs the two user-visible
|
|
108
|
+
// scope descriptions in profile-menu-controller.ts updated in the same change, which has not
|
|
109
|
+
// happened yet. Still routed through the SSOT root accessor so the eventual move is a one-line
|
|
110
|
+
// change here.
|
|
98
111
|
return {
|
|
99
112
|
root,
|
|
100
113
|
hash,
|
|
101
|
-
path: join(resolvePath(agentDir), "resource-profiles", hash, "settings.json"),
|
|
114
|
+
path: join(configFile(resolvePath(agentDir), "resource-profiles"), hash, "settings.json"),
|
|
102
115
|
};
|
|
103
116
|
}
|
|
104
117
|
export function matchesResourceProfilePattern(resourcePath, patterns, baseDir = "") {
|
|
@@ -114,12 +127,12 @@ export function matchesResourceProfilePattern(resourcePath, patterns, baseDir =
|
|
|
114
127
|
const parentDirPosix = toPosixPath(parentDir);
|
|
115
128
|
return patterns.some((pattern) => {
|
|
116
129
|
const normalizedPattern = toPosixPath(pattern);
|
|
117
|
-
return (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
130
|
+
return (matchesCompiledPattern(rel, normalizedPattern) ||
|
|
131
|
+
matchesCompiledPattern(name, normalizedPattern) ||
|
|
132
|
+
matchesCompiledPattern(filePathPosix, normalizedPattern) ||
|
|
133
|
+
matchesCompiledPattern(parentRel, normalizedPattern) ||
|
|
134
|
+
matchesCompiledPattern(parentName, normalizedPattern) ||
|
|
135
|
+
matchesCompiledPattern(parentDirPosix, normalizedPattern));
|
|
123
136
|
});
|
|
124
137
|
}
|
|
125
138
|
function normalizeResourceProfileNames(value) {
|
|
@@ -784,12 +797,12 @@ export class SettingsManager {
|
|
|
784
797
|
return matchesResourceProfilePattern(resourcePath, filter.block, baseDir);
|
|
785
798
|
}
|
|
786
799
|
/**
|
|
787
|
-
* Situational soul(s) of the currently active profile(s)
|
|
800
|
+
* Situational soul(s) of the currently active profile(s): a system-prompt identity prefix
|
|
788
801
|
* injected while the profile is active. Multiple active profiles' souls are concatenated.
|
|
789
802
|
*/
|
|
790
803
|
getActiveProfileSoul() {
|
|
791
804
|
// First-wins precedence (like profile model/thinking): the most-specific active profile's soul
|
|
792
|
-
// is the identity — concatenating multiple souls would inject contradictory identities
|
|
805
|
+
// is the identity — concatenating multiple souls would inject contradictory identities.
|
|
793
806
|
const registry = this.getProfileRegistry();
|
|
794
807
|
const seen = new Set();
|
|
795
808
|
for (const profileName of this.getActiveResourceProfileNames()) {
|
|
@@ -1502,6 +1515,12 @@ export class SettingsManager {
|
|
|
1502
1515
|
this.modifiedProjectNestedFields.clear();
|
|
1503
1516
|
}
|
|
1504
1517
|
enqueueWrite(scope, task) {
|
|
1518
|
+
// Zero-footprint (worker session): this is the universal disk-write choke for every settings
|
|
1519
|
+
// scope (save() -> "global", saveProjectSettings() -> "project", directoryProfile writes) --
|
|
1520
|
+
// a worker session never writes settings.json (or any scoped variant) to disk. In-memory
|
|
1521
|
+
// settings are already updated by the caller before reaching here, so reads are unaffected.
|
|
1522
|
+
if (isWorkerSession())
|
|
1523
|
+
return;
|
|
1505
1524
|
this.writeQueue = this.writeQueue
|
|
1506
1525
|
.then(() => {
|
|
1507
1526
|
if (scope === "project") {
|
|
@@ -1867,63 +1886,40 @@ export class SettingsManager {
|
|
|
1867
1886
|
this.save();
|
|
1868
1887
|
}
|
|
1869
1888
|
getContextGcSettings() {
|
|
1889
|
+
// Per-field fallback throughout (never a whole-object `??`) so an explicit partial override --
|
|
1890
|
+
// e.g. only `contextGc.minToolResultChars`, or only `semanticMemory.enabled` -- still gets the
|
|
1891
|
+
// canonical default for every field it didn't set. Every fallback DERIVES from context-gc.ts's
|
|
1892
|
+
// exported DEFAULT_CONTEXT_GC_SETTINGS (the same object applyContextGc's own normalizer falls
|
|
1893
|
+
// back to) instead of a hand-kept copy, so this method and context-gc.ts's defaults can never
|
|
1894
|
+
// drift again -- hand-copied fallbacks here previously (a) missed the "<task_steps_context"
|
|
1895
|
+
// marker context-gc.ts's own default carries, silently disabling GC packing
|
|
1896
|
+
// for that page under default settings, and (b) diverged on the `tools` list (missing
|
|
1897
|
+
// "run_toolkit_script", present only here) -- both classes of drift are now structurally
|
|
1898
|
+
// impossible since there is exactly one place these defaults are written down.
|
|
1870
1899
|
return {
|
|
1871
|
-
enabled: this.settings.contextGc?.enabled ??
|
|
1872
|
-
preserveRecentMessages: this.settings.contextGc?.preserveRecentMessages ??
|
|
1873
|
-
minToolResultChars: this.settings.contextGc?.minToolResultChars ??
|
|
1874
|
-
tools: this.settings.contextGc?.tools ??
|
|
1875
|
-
"read",
|
|
1876
|
-
"bash",
|
|
1877
|
-
"python",
|
|
1878
|
-
"powershell",
|
|
1879
|
-
"rg",
|
|
1880
|
-
"grep",
|
|
1881
|
-
"find",
|
|
1882
|
-
"ls",
|
|
1883
|
-
"skill_open",
|
|
1884
|
-
"automata_graph_status",
|
|
1885
|
-
"automata_graph_search",
|
|
1886
|
-
"automata_graph_query",
|
|
1887
|
-
"automata_graph_neighbors",
|
|
1888
|
-
"automata_graph_path",
|
|
1889
|
-
"automata_graph_pointer_pack",
|
|
1890
|
-
"learning_query_memory",
|
|
1891
|
-
"subagent",
|
|
1892
|
-
"delegate",
|
|
1893
|
-
"task_steps",
|
|
1894
|
-
"task_background",
|
|
1895
|
-
"task_goal",
|
|
1896
|
-
"run_ledger",
|
|
1897
|
-
"context_headroom_retrieve",
|
|
1898
|
-
"headroom_retrieve",
|
|
1899
|
-
],
|
|
1900
|
+
enabled: this.settings.contextGc?.enabled ?? DEFAULT_CONTEXT_GC_SETTINGS.enabled,
|
|
1901
|
+
preserveRecentMessages: this.settings.contextGc?.preserveRecentMessages ?? DEFAULT_CONTEXT_GC_SETTINGS.preserveRecentMessages,
|
|
1902
|
+
minToolResultChars: this.settings.contextGc?.minToolResultChars ?? DEFAULT_CONTEXT_GC_SETTINGS.minToolResultChars,
|
|
1903
|
+
tools: this.settings.contextGc?.tools ?? DEFAULT_CONTEXT_GC_SETTINGS.tools,
|
|
1900
1904
|
semanticMemory: {
|
|
1901
|
-
enabled: this.settings.contextGc?.semanticMemory?.enabled ??
|
|
1902
|
-
preserveRecentPages: this.settings.contextGc?.semanticMemory?.preserveRecentPages ??
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
// emits; must be present here because a non-empty settings list fully replaces
|
|
1907
|
-
// the context-gc code default that already includes it.
|
|
1908
|
-
"<memory_context",
|
|
1909
|
-
"<automata_context",
|
|
1910
|
-
"<automata_response",
|
|
1911
|
-
"<automata_query",
|
|
1912
|
-
"<automata_fetch",
|
|
1913
|
-
"<memory_lifecycle_audit",
|
|
1914
|
-
"<memory_lifecycle_purge",
|
|
1915
|
-
"<automata_doctor",
|
|
1916
|
-
"<automata_optimizer",
|
|
1917
|
-
"<automata_mesh",
|
|
1918
|
-
],
|
|
1905
|
+
enabled: this.settings.contextGc?.semanticMemory?.enabled ?? DEFAULT_CONTEXT_GC_SETTINGS.semanticMemory.enabled,
|
|
1906
|
+
preserveRecentPages: this.settings.contextGc?.semanticMemory?.preserveRecentPages ??
|
|
1907
|
+
DEFAULT_CONTEXT_GC_SETTINGS.semanticMemory.preserveRecentPages,
|
|
1908
|
+
minChars: this.settings.contextGc?.semanticMemory?.minChars ?? DEFAULT_CONTEXT_GC_SETTINGS.semanticMemory.minChars,
|
|
1909
|
+
markers: this.settings.contextGc?.semanticMemory?.markers ?? DEFAULT_CONTEXT_GC_SETTINGS.semanticMemory.markers,
|
|
1919
1910
|
},
|
|
1920
1911
|
};
|
|
1921
1912
|
}
|
|
1922
1913
|
getContextPromptEnforcementSettings() {
|
|
1914
|
+
// Enforcement's own default MIRRORS the live context-gc settings (not a second hardcoded
|
|
1915
|
+
// literal) so tuning contextGc.preserveRecentMessages/minToolResultChars moves this default
|
|
1916
|
+
// with it instead of silently drifting. An explicitly configured enforcement value always
|
|
1917
|
+
// wins over the mirror -- see the ContextPromptEnforcementSettings doc comment.
|
|
1918
|
+
const gcSettings = this.getContextGcSettings();
|
|
1923
1919
|
return {
|
|
1924
1920
|
enabled: this.settings.contextPolicy?.enforcement?.enabled ?? false,
|
|
1925
|
-
preserveRecentMessages: this.settings.contextPolicy?.enforcement?.preserveRecentMessages ??
|
|
1926
|
-
minChars: this.settings.contextPolicy?.enforcement?.minChars ??
|
|
1921
|
+
preserveRecentMessages: this.settings.contextPolicy?.enforcement?.preserveRecentMessages ?? gcSettings.preserveRecentMessages,
|
|
1922
|
+
minChars: this.settings.contextPolicy?.enforcement?.minChars ?? gcSettings.minToolResultChars,
|
|
1927
1923
|
};
|
|
1928
1924
|
}
|
|
1929
1925
|
getContextCurationSettings() {
|
|
@@ -2408,6 +2404,44 @@ export class SettingsManager {
|
|
|
2408
2404
|
this.markModified("researchLane");
|
|
2409
2405
|
this.save();
|
|
2410
2406
|
}
|
|
2407
|
+
getWorktreeSyncSettings() {
|
|
2408
|
+
const configured = this.settings.worktreeSync ?? {};
|
|
2409
|
+
const resolved = {
|
|
2410
|
+
enabled: configured.enabled !== false,
|
|
2411
|
+
syncPolicy: configured.syncPolicy === "overlap_mandatory" || configured.syncPolicy === "land_time_only"
|
|
2412
|
+
? configured.syncPolicy
|
|
2413
|
+
: DEFAULT_WORKTREE_SYNC_POLICY,
|
|
2414
|
+
gate: configured.gate === "off" ? "off" : "on",
|
|
2415
|
+
gateTimeoutMs: sanitizeIntegerSetting(configured.gateTimeoutMs, DEFAULT_WORKTREE_SYNC_GATE_TIMEOUT_MS, 1000, 3_600_000),
|
|
2416
|
+
maxLanes: sanitizeIntegerSetting(configured.maxLanes, DEFAULT_WORKTREE_SYNC_MAX_LANES, 1, 32),
|
|
2417
|
+
workerLand: configured.workerLand === "allow" ? "allow" : "deny",
|
|
2418
|
+
};
|
|
2419
|
+
if (typeof configured.mainBranch === "string" && configured.mainBranch.trim().length > 0) {
|
|
2420
|
+
resolved.mainBranch = configured.mainBranch.trim();
|
|
2421
|
+
}
|
|
2422
|
+
if (typeof configured.gateCommand === "string" && configured.gateCommand.trim().length > 0) {
|
|
2423
|
+
resolved.gateCommand = configured.gateCommand.trim();
|
|
2424
|
+
}
|
|
2425
|
+
if (typeof configured.worktreesRoot === "string" && configured.worktreesRoot.trim().length > 0) {
|
|
2426
|
+
resolved.worktreesRoot = configured.worktreesRoot.trim();
|
|
2427
|
+
}
|
|
2428
|
+
return resolved;
|
|
2429
|
+
}
|
|
2430
|
+
getProcessMatrixSettings() {
|
|
2431
|
+
const configured = this.settings.processMatrix ?? {};
|
|
2432
|
+
return {
|
|
2433
|
+
enabled: configured.enabled !== false,
|
|
2434
|
+
heartbeatMs: sanitizeIntegerSetting(configured.heartbeatMs, DEFAULT_PROCESS_MATRIX_HEARTBEAT_MS, 1000, 600_000),
|
|
2435
|
+
adoptionGraceMs: sanitizeIntegerSetting(configured.adoptionGraceMs, DEFAULT_PROCESS_MATRIX_ADOPTION_GRACE_MS, 5000, 3_600_000),
|
|
2436
|
+
watcherPollMs: sanitizeIntegerSetting(configured.watcherPollMs, DEFAULT_PROCESS_MATRIX_WATCHER_POLL_MS, 1000, 600_000),
|
|
2437
|
+
};
|
|
2438
|
+
}
|
|
2439
|
+
getWindowsShellSettings() {
|
|
2440
|
+
const configured = this.settings.windowsShell ?? {};
|
|
2441
|
+
return {
|
|
2442
|
+
pythonEngine: configured.pythonEngine !== false,
|
|
2443
|
+
};
|
|
2444
|
+
}
|
|
2411
2445
|
getWorkerDelegationSettings() {
|
|
2412
2446
|
const configured = this.settings.workerDelegation ?? {};
|
|
2413
2447
|
const resolved = {
|