@caupulican/pi-adaptative 0.81.40 → 0.81.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js +1 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.ts +1 -0
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +22 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-paths.d.ts +6 -0
- package/dist/core/agent-paths.d.ts.map +1 -1
- package/dist/core/agent-paths.js +12 -0
- package/dist/core/agent-paths.js.map +1 -1
- package/dist/core/agent-session-contracts.d.ts +293 -0
- package/dist/core/agent-session-contracts.d.ts.map +1 -0
- package/dist/core/agent-session-contracts.js +26 -0
- package/dist/core/agent-session-contracts.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +3 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +26 -405
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +86 -307
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +3 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.js +2 -1
- package/dist/core/autonomy/lane-tool-surface.js.map +1 -1
- package/dist/core/background-lane-controller.d.ts +3 -1
- package/dist/core/background-lane-controller.d.ts.map +1 -1
- package/dist/core/background-lane-controller.js +1 -0
- package/dist/core/background-lane-controller.js.map +1 -1
- package/dist/core/bedrock-sso-login.d.ts +16 -0
- package/dist/core/bedrock-sso-login.d.ts.map +1 -0
- package/dist/core/bedrock-sso-login.js +98 -0
- package/dist/core/bedrock-sso-login.js.map +1 -0
- package/dist/core/compaction-controller.d.ts.map +1 -1
- package/dist/core/compaction-controller.js +1 -1
- package/dist/core/compaction-controller.js.map +1 -1
- package/dist/core/compaction-support.d.ts +3 -8
- package/dist/core/compaction-support.d.ts.map +1 -1
- package/dist/core/compaction-support.js +3 -3
- package/dist/core/compaction-support.js.map +1 -1
- package/dist/core/context-pipeline.d.ts +1 -1
- package/dist/core/context-pipeline.d.ts.map +1 -1
- package/dist/core/context-pipeline.js +7 -33
- package/dist/core/context-pipeline.js.map +1 -1
- package/dist/core/cost/cost-summary.d.ts.map +1 -1
- package/dist/core/cost/cost-summary.js +5 -3
- package/dist/core/cost/cost-summary.js.map +1 -1
- package/dist/core/cost/daily-usage.d.ts.map +1 -1
- package/dist/core/cost/daily-usage.js +4 -5
- package/dist/core/cost/daily-usage.js.map +1 -1
- package/dist/core/default-tool-surface.d.ts.map +1 -1
- package/dist/core/default-tool-surface.js +1 -0
- package/dist/core/default-tool-surface.js.map +1 -1
- package/dist/core/extension-import-authority.d.ts +6 -0
- package/dist/core/extension-import-authority.d.ts.map +1 -0
- package/dist/core/extension-import-authority.js +10 -0
- package/dist/core/extension-import-authority.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +2 -3
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +14 -5
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/stale-context.d.ts +2 -0
- package/dist/core/extensions/stale-context.d.ts.map +1 -0
- package/dist/core/extensions/stale-context.js +2 -0
- package/dist/core/extensions/stale-context.js.map +1 -0
- package/dist/core/extensions/types.d.ts +8 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/foreground-recovery-controller.d.ts +1 -0
- package/dist/core/foreground-recovery-controller.d.ts.map +1 -1
- package/dist/core/foreground-recovery-controller.js +13 -13
- package/dist/core/foreground-recovery-controller.js.map +1 -1
- package/dist/core/goal-loop-controller.d.ts +14 -9
- package/dist/core/goal-loop-controller.d.ts.map +1 -1
- package/dist/core/goal-loop-controller.js +47 -75
- package/dist/core/goal-loop-controller.js.map +1 -1
- package/dist/core/goals/compact-goal-context.d.ts +11 -0
- package/dist/core/goals/compact-goal-context.d.ts.map +1 -0
- package/dist/core/goals/compact-goal-context.js +59 -0
- package/dist/core/goals/compact-goal-context.js.map +1 -0
- package/dist/core/goals/goal-acceptance.d.ts.map +1 -1
- package/dist/core/goals/goal-acceptance.js +2 -0
- package/dist/core/goals/goal-acceptance.js.map +1 -1
- package/dist/core/goals/goal-auto-continue-controller.d.ts +2 -1
- package/dist/core/goals/goal-auto-continue-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-auto-continue-controller.js +5 -8
- package/dist/core/goals/goal-auto-continue-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-controller.d.ts +2 -2
- package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-controller.js +42 -11
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.d.ts +4 -29
- package/dist/core/goals/goal-continuation-defaults.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.js +4 -32
- package/dist/core/goals/goal-continuation-defaults.js.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts +8 -18
- package/dist/core/goals/goal-continuation-prompt.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.js +9 -179
- package/dist/core/goals/goal-continuation-prompt.js.map +1 -1
- package/dist/core/goals/goal-lifecycle.d.ts +35 -12
- package/dist/core/goals/goal-lifecycle.d.ts.map +1 -1
- package/dist/core/goals/goal-lifecycle.js +98 -13
- package/dist/core/goals/goal-lifecycle.js.map +1 -1
- package/dist/core/goals/goal-record.d.ts +17 -0
- package/dist/core/goals/goal-record.d.ts.map +1 -0
- package/dist/core/goals/goal-record.js +31 -0
- package/dist/core/goals/goal-record.js.map +1 -0
- package/dist/core/goals/goal-session-controller.d.ts +42 -0
- package/dist/core/goals/goal-session-controller.d.ts.map +1 -0
- package/dist/core/goals/goal-session-controller.js +128 -0
- package/dist/core/goals/goal-session-controller.js.map +1 -0
- package/dist/core/goals/goal-state.d.ts +45 -25
- package/dist/core/goals/goal-state.d.ts.map +1 -1
- package/dist/core/goals/goal-state.js +85 -15
- package/dist/core/goals/goal-state.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts +1 -4
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js +49 -34
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/goals/session-goal-state.d.ts +18 -8
- package/dist/core/goals/session-goal-state.d.ts.map +1 -1
- package/dist/core/goals/session-goal-state.js +134 -11
- package/dist/core/goals/session-goal-state.js.map +1 -1
- package/dist/core/human-input-controller.d.ts +47 -0
- package/dist/core/human-input-controller.d.ts.map +1 -0
- package/dist/core/human-input-controller.js +181 -0
- package/dist/core/human-input-controller.js.map +1 -0
- package/dist/core/local-runtime-controller.d.ts +1 -1
- package/dist/core/local-runtime-controller.d.ts.map +1 -1
- package/dist/core/local-runtime-controller.js.map +1 -1
- package/dist/core/model-capability.d.ts +0 -19
- package/dist/core/model-capability.d.ts.map +1 -1
- package/dist/core/model-capability.js +0 -19
- package/dist/core/model-capability.js.map +1 -1
- package/dist/core/model-registry.d.ts +6 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +13 -5
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +16 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +32 -16
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-router-controller.d.ts +1 -1
- package/dist/core/model-router-controller.d.ts.map +1 -1
- package/dist/core/model-router-controller.js.map +1 -1
- package/dist/core/model-selection-controller.d.ts +1 -1
- package/dist/core/model-selection-controller.d.ts.map +1 -1
- package/dist/core/model-selection-controller.js.map +1 -1
- package/dist/core/orchestration/delegation-ledger.d.ts.map +1 -1
- package/dist/core/orchestration/delegation-ledger.js +3 -0
- package/dist/core/orchestration/delegation-ledger.js.map +1 -1
- package/dist/core/orchestration/work-state-projection.d.ts.map +1 -1
- package/dist/core/orchestration/work-state-projection.js +1 -1
- package/dist/core/orchestration/work-state-projection.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +20 -3
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/profile-filter-controller.d.ts +8 -1
- package/dist/core/profile-filter-controller.d.ts.map +1 -1
- package/dist/core/profile-filter-controller.js +23 -5
- package/dist/core/profile-filter-controller.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +1 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +18 -29
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/reflection-controller.d.ts +1 -1
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +3 -1
- package/dist/core/reflection-controller.js.map +1 -1
- package/dist/core/request-auth.d.ts +7 -0
- package/dist/core/request-auth.d.ts.map +1 -0
- package/dist/core/request-auth.js +8 -0
- package/dist/core/request-auth.js.map +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +16 -6
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/risk-classifier.d.ts.map +1 -1
- package/dist/core/risk-classifier.js +8 -0
- package/dist/core/risk-classifier.js.map +1 -1
- package/dist/core/runtime-builder.d.ts +15 -3
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +132 -79
- package/dist/core/runtime-builder.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +7 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/secrets/credential-exposure-guard.d.ts +9 -0
- package/dist/core/secrets/credential-exposure-guard.d.ts.map +1 -0
- package/dist/core/secrets/credential-exposure-guard.js +241 -0
- package/dist/core/secrets/credential-exposure-guard.js.map +1 -0
- package/dist/core/secrets/secret-dotenv.d.ts +27 -0
- package/dist/core/secrets/secret-dotenv.d.ts.map +1 -0
- package/dist/core/secrets/secret-dotenv.js +183 -0
- package/dist/core/secrets/secret-dotenv.js.map +1 -0
- package/dist/core/secrets/secret-vault-format.d.ts +112 -0
- package/dist/core/secrets/secret-vault-format.d.ts.map +1 -0
- package/dist/core/secrets/secret-vault-format.js +397 -0
- package/dist/core/secrets/secret-vault-format.js.map +1 -0
- package/dist/core/secrets/secret-vault.d.ts +72 -0
- package/dist/core/secrets/secret-vault.d.ts.map +1 -0
- package/dist/core/secrets/secret-vault.js +671 -0
- package/dist/core/secrets/secret-vault.js.map +1 -0
- package/dist/core/session-analytics.d.ts +4 -23
- package/dist/core/session-analytics.d.ts.map +1 -1
- package/dist/core/session-analytics.js +39 -69
- package/dist/core/session-analytics.js.map +1 -1
- package/dist/core/session-role.d.ts +5 -0
- package/dist/core/session-role.d.ts.map +1 -1
- package/dist/core/session-role.js +14 -1
- package/dist/core/session-role.js.map +1 -1
- package/dist/core/session-tree-navigator.d.ts +4 -6
- package/dist/core/session-tree-navigator.d.ts.map +1 -1
- package/dist/core/session-tree-navigator.js +4 -1
- package/dist/core/session-tree-navigator.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tool-capability-policy.d.ts.map +1 -1
- package/dist/core/tool-capability-policy.js +1 -0
- package/dist/core/tool-capability-policy.js.map +1 -1
- package/dist/core/tool-gate-controller.d.ts.map +1 -1
- package/dist/core/tool-gate-controller.js +8 -2
- package/dist/core/tool-gate-controller.js.map +1 -1
- package/dist/core/tool-protocol-controller.d.ts +2 -4
- package/dist/core/tool-protocol-controller.d.ts.map +1 -1
- package/dist/core/tool-protocol-controller.js.map +1 -1
- package/dist/core/tool-recovery-stats.d.ts +21 -1
- package/dist/core/tool-recovery-stats.d.ts.map +1 -1
- package/dist/core/tool-recovery-stats.js.map +1 -1
- package/dist/core/tools/bash.d.ts +5 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +59 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/delegate-status.d.ts.map +1 -1
- package/dist/core/tools/delegate-status.js +6 -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 +6 -8
- package/dist/core/tools/delegate.js.map +1 -1
- package/dist/core/tools/git-filter.d.ts +1 -8
- package/dist/core/tools/git-filter.d.ts.map +1 -1
- package/dist/core/tools/git-filter.js +2 -63
- package/dist/core/tools/git-filter.js.map +1 -1
- package/dist/core/tools/goal.d.ts +5 -3
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +97 -19
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/orchestration-panel.d.ts +1 -4
- package/dist/core/tools/orchestration-panel.d.ts.map +1 -1
- package/dist/core/tools/orchestration-panel.js +0 -44
- package/dist/core/tools/orchestration-panel.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +11 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +36 -3
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/python.d.ts +2 -0
- package/dist/core/tools/python.d.ts.map +1 -1
- package/dist/core/tools/python.js +3 -1
- package/dist/core/tools/python.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/search-command-guard.d.ts +14 -0
- package/dist/core/tools/search-command-guard.d.ts.map +1 -0
- package/dist/core/tools/search-command-guard.js +333 -0
- package/dist/core/tools/search-command-guard.js.map +1 -0
- package/dist/core/tools/secret-store.d.ts +38 -0
- package/dist/core/tools/secret-store.d.ts.map +1 -0
- package/dist/core/tools/secret-store.js +412 -0
- package/dist/core/tools/secret-store.js.map +1 -0
- package/dist/core/tools/shell-command-parser.d.ts +16 -0
- package/dist/core/tools/shell-command-parser.d.ts.map +1 -0
- package/dist/core/tools/shell-command-parser.js +113 -0
- package/dist/core/tools/shell-command-parser.js.map +1 -0
- package/dist/core/tools/task-steps.d.ts.map +1 -1
- package/dist/core/tools/task-steps.js +4 -7
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/core/util/atomic-file.d.ts +6 -2
- package/dist/core/util/atomic-file.d.ts.map +1 -1
- package/dist/core/util/atomic-file.js +4 -4
- package/dist/core/util/atomic-file.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +25 -11
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/auth-dialogs-controller.d.ts +4 -0
- package/dist/modes/interactive/auth-dialogs-controller.d.ts.map +1 -1
- package/dist/modes/interactive/auth-dialogs-controller.js +60 -1
- package/dist/modes/interactive/auth-dialogs-controller.js.map +1 -1
- package/dist/modes/interactive/components/activity-lane.d.ts +55 -0
- package/dist/modes/interactive/components/activity-lane.d.ts.map +1 -0
- package/dist/modes/interactive/components/activity-lane.js +304 -0
- package/dist/modes/interactive/components/activity-lane.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +19 -10
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/expandable-text.d.ts +12 -0
- package/dist/modes/interactive/components/expandable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/expandable-text.js +17 -0
- package/dist/modes/interactive/components/expandable-text.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +15 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +30 -21
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +6 -1
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +2 -2
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +23 -14
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +4 -4
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +19 -11
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +53 -20
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-group.js +3 -0
- package/dist/modes/interactive/components/tool-group.js.map +1 -1
- package/dist/modes/interactive/components/usage-action-selector.d.ts +16 -0
- package/dist/modes/interactive/components/usage-action-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/usage-action-selector.js +46 -0
- package/dist/modes/interactive/components/usage-action-selector.js.map +1 -0
- package/dist/modes/interactive/extension-ui-host.d.ts.map +1 -1
- package/dist/modes/interactive/extension-ui-host.js +1 -0
- package/dist/modes/interactive/extension-ui-host.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +15 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +27 -19
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/history-reload-math.d.ts +6 -2
- package/dist/modes/interactive/history-reload-math.d.ts.map +1 -1
- package/dist/modes/interactive/history-reload-math.js +10 -5
- package/dist/modes/interactive/history-reload-math.js.map +1 -1
- package/dist/modes/interactive/interactive-event-controller.d.ts +74 -0
- package/dist/modes/interactive/interactive-event-controller.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-event-controller.js +328 -0
- package/dist/modes/interactive/interactive-event-controller.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +20 -25
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +196 -608
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/loaded-resources-view.d.ts +20 -0
- package/dist/modes/interactive/loaded-resources-view.d.ts.map +1 -0
- package/dist/modes/interactive/loaded-resources-view.js +147 -0
- package/dist/modes/interactive/loaded-resources-view.js.map +1 -0
- package/dist/modes/interactive/resource-display.d.ts.map +1 -1
- package/dist/modes/interactive/resource-display.js +8 -2
- package/dist/modes/interactive/resource-display.js.map +1 -1
- package/dist/modes/interactive/resource-shell-commands.d.ts +1 -5
- package/dist/modes/interactive/resource-shell-commands.d.ts.map +1 -1
- package/dist/modes/interactive/resource-shell-commands.js +0 -5
- package/dist/modes/interactive/resource-shell-commands.js.map +1 -1
- package/dist/modes/interactive/session-flow-commands.d.ts +10 -6
- package/dist/modes/interactive/session-flow-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-flow-commands.js +123 -70
- package/dist/modes/interactive/session-flow-commands.js.map +1 -1
- package/dist/modes/interactive/usage-commands.d.ts +34 -0
- package/dist/modes/interactive/usage-commands.d.ts.map +1 -0
- package/dist/modes/interactive/usage-commands.js +225 -0
- package/dist/modes/interactive/usage-commands.js.map +1 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +5 -3
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +3 -1
- package/dist/utils/version-check.js.map +1 -1
- package/docs/UI_POLISH_ORCHESTRATION.md +25 -31
- package/docs/UI_QUALITY_ORCHESTRATION.md +22 -24
- package/docs/providers.md +9 -1
- package/docs/ui-reference/README.md +6 -6
- package/docs/ui-reference/orchestration-after.txt +14 -7
- package/docs/ui-reference/orchestration-before.txt +12 -6
- package/docs/ui-reference/orchestration-reference.txt +15 -5
- package/docs/usage.md +9 -1
- 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 +13 -13
- package/package.json +4 -4
|
@@ -46,6 +46,8 @@ import { evaluateSurfaceFitness } from "./model-router/fitness-gate.js";
|
|
|
46
46
|
import { FitnessStore } from "./models/fitness-store.js";
|
|
47
47
|
import { describeInFlightWorkUnit, getInFlightWorkUnits } from "./reload-blockers.js";
|
|
48
48
|
import { ScoutController } from "./scout-controller.js";
|
|
49
|
+
import { wrapToolWithCredentialExposureGuard } from "./secrets/credential-exposure-guard.js";
|
|
50
|
+
import { SecretVault } from "./secrets/secret-vault.js";
|
|
49
51
|
import { getSessionRole, isWorkerSession, WORKER_FORBIDDEN_TOOLS } from "./session-role.js";
|
|
50
52
|
import { matchesResourceProfilePattern, } from "./settings-manager.js";
|
|
51
53
|
import { createSyntheticSourceInfo } from "./source-info.js";
|
|
@@ -65,9 +67,12 @@ import { resolveToCwd } from "./tools/path-utils.js";
|
|
|
65
67
|
import { createReadTool } from "./tools/read.js";
|
|
66
68
|
import { createRunProcessToolDefinition } from "./tools/run-process.js";
|
|
67
69
|
import { createRunToolkitScriptToolDefinition } from "./tools/run-toolkit-script.js";
|
|
70
|
+
import { createSecretStoreToolDefinition } from "./tools/secret-store.js";
|
|
71
|
+
import { disposePersistentShellSession } from "./tools/shell-session.js";
|
|
68
72
|
import { createTaskStepsToolDefinition } from "./tools/task-steps.js";
|
|
69
73
|
import { dispatchTmuxWorker } from "./tools/tmux-dispatch.js";
|
|
70
74
|
import { createToolDefinitionFromAgentTool } from "./tools/tool-definition-wrapper.js";
|
|
75
|
+
import { disposeWindowsShellState } from "./tools/windows-shell-state.js";
|
|
71
76
|
import { createWorktreeSyncToolDefinition } from "./tools/worktree-sync.js";
|
|
72
77
|
import { createLane } from "./worktree-sync/git-engine.js";
|
|
73
78
|
import { WorktreeLaneGate } from "./worktree-sync/lane-gate.js";
|
|
@@ -117,11 +122,22 @@ export class RuntimeBuilder {
|
|
|
117
122
|
_toolPromptSnippets = new Map();
|
|
118
123
|
_toolPromptGuidelines = new Map();
|
|
119
124
|
_baseToolDefinitions = new Map();
|
|
125
|
+
/** Exact extensions the owner approved through the live-load API. Discovery never populates this set. */
|
|
126
|
+
_explicitLiveExtensionPaths = new Set();
|
|
120
127
|
_reloadPromise;
|
|
121
128
|
_reloadRequested = false;
|
|
129
|
+
_secretVault;
|
|
122
130
|
deps;
|
|
123
131
|
constructor(deps) {
|
|
124
132
|
this.deps = deps;
|
|
133
|
+
this._secretVault = new SecretVault({
|
|
134
|
+
agentDir: deps.getAgentDir(),
|
|
135
|
+
onEnvironmentChanged: () => {
|
|
136
|
+
const sessionKey = deps.getShellSessionKey();
|
|
137
|
+
disposePersistentShellSession(sessionKey);
|
|
138
|
+
disposeWindowsShellState(sessionKey);
|
|
139
|
+
},
|
|
140
|
+
});
|
|
125
141
|
}
|
|
126
142
|
/**
|
|
127
143
|
* Resolve the construction and activation policy once for a runtime generation. This is the
|
|
@@ -173,9 +189,9 @@ export class RuntimeBuilder {
|
|
|
173
189
|
resolveScoutModel: async () => resolveScoutModel(this.deps.getModelRegistry(), this.deps.getSettingsManager().getScoutSettings().model, this.deps.getAgentDir(), (model) => this.deps.isModelExhausted(model)),
|
|
174
190
|
getCwd: () => cwd,
|
|
175
191
|
buildReadOnlyTools: (toolCwd) => [
|
|
176
|
-
createReadTool(toolCwd),
|
|
177
|
-
createGrepTool(toolCwd, { artifactStore }),
|
|
178
|
-
createFindTool(toolCwd, { artifactStore }),
|
|
192
|
+
wrapToolWithCredentialExposureGuard(createReadTool(toolCwd), toolCwd, this._secretVault),
|
|
193
|
+
wrapToolWithCredentialExposureGuard(createGrepTool(toolCwd, { artifactStore }), toolCwd, this._secretVault),
|
|
194
|
+
wrapToolWithCredentialExposureGuard(createFindTool(toolCwd, { artifactStore }), toolCwd, this._secretVault),
|
|
179
195
|
],
|
|
180
196
|
streamFn: this.deps.getAgent().streamFn,
|
|
181
197
|
fileExists: (path) => existsSync(resolveCwdPath(cwd, path)),
|
|
@@ -278,9 +294,13 @@ export class RuntimeBuilder {
|
|
|
278
294
|
definition,
|
|
279
295
|
sourceInfo: createSyntheticSourceInfo(`<builtin:${definition.name}>`, { source: "builtin" }),
|
|
280
296
|
})), runner);
|
|
281
|
-
const toolRegistry = new Map(wrappedBuiltInTools.map((tool) =>
|
|
297
|
+
const toolRegistry = new Map(wrappedBuiltInTools.map((tool) => {
|
|
298
|
+
const guarded = wrapToolWithCredentialExposureGuard(tool, this.deps.getCwd(), this._secretVault);
|
|
299
|
+
return [guarded.name, guarded];
|
|
300
|
+
}));
|
|
282
301
|
for (const tool of wrappedExtensionTools) {
|
|
283
|
-
|
|
302
|
+
const guarded = wrapToolWithCredentialExposureGuard(tool, this.deps.getCwd(), this._secretVault);
|
|
303
|
+
toolRegistry.set(guarded.name, guarded);
|
|
284
304
|
}
|
|
285
305
|
this._toolRegistry = toolRegistry;
|
|
286
306
|
const requestedBase = options?.activeToolNames
|
|
@@ -453,7 +473,12 @@ export class RuntimeBuilder {
|
|
|
453
473
|
shellPath,
|
|
454
474
|
sessionKey: this.deps.getShellSessionKey(),
|
|
455
475
|
platform: process.platform,
|
|
476
|
+
spawnHook: (context) => ({
|
|
477
|
+
...context,
|
|
478
|
+
env: { ...context.env, ...this._secretVault.getEnvironmentForCwd(context.cwd) },
|
|
479
|
+
}),
|
|
456
480
|
},
|
|
481
|
+
python: { environment: (cwd) => this._secretVault.getEnvironmentForCwd(cwd) },
|
|
457
482
|
grep: { artifactStore: toolArtifactStore },
|
|
458
483
|
find: { artifactStore: toolArtifactStore },
|
|
459
484
|
artifact_retrieve: { artifactStore: toolArtifactStore },
|
|
@@ -496,8 +521,8 @@ export class RuntimeBuilder {
|
|
|
496
521
|
if (toolAccess.allows("goal")) {
|
|
497
522
|
const goalToolDefinition = createGoalToolDefinition({
|
|
498
523
|
getGoalState: () => this.deps.getGoalStateSnapshot(),
|
|
499
|
-
saveGoalState: (state) => {
|
|
500
|
-
this.deps.saveGoalStateSnapshot(state);
|
|
524
|
+
saveGoalState: (state, expected) => {
|
|
525
|
+
this.deps.saveGoalStateSnapshot(state, expected);
|
|
501
526
|
},
|
|
502
527
|
// kind:"tool" evidence refs verify against real session records.
|
|
503
528
|
hasToolCallId: (toolCallId) => hasAnsweredToolCallOnBranch(this.deps.getSessionManager(), toolCallId),
|
|
@@ -564,6 +589,10 @@ export class RuntimeBuilder {
|
|
|
564
589
|
});
|
|
565
590
|
this._baseToolDefinitions.set(askQuestionToolDefinition.name, askQuestionToolDefinition);
|
|
566
591
|
}
|
|
592
|
+
if (toolAccess.allows("secret_store")) {
|
|
593
|
+
const secretStoreToolDefinition = createSecretStoreToolDefinition({ vault: this._secretVault });
|
|
594
|
+
this._baseToolDefinitions.set(secretStoreToolDefinition.name, secretStoreToolDefinition);
|
|
595
|
+
}
|
|
567
596
|
if (toolAccess.allows("delegate")) {
|
|
568
597
|
const delegateToolDefinition = createDelegateToolDefinition({
|
|
569
598
|
startWorkerDelegation: (args) => this.deps.startWorkerDelegation(args),
|
|
@@ -692,7 +721,7 @@ export class RuntimeBuilder {
|
|
|
692
721
|
extensionsResult.runtime.flagValues.set(name, value);
|
|
693
722
|
}
|
|
694
723
|
}
|
|
695
|
-
const extensions = this.deps.filterExtensionsForRuntime(extensionsResult.extensions);
|
|
724
|
+
const extensions = this.deps.filterExtensionsForRuntime(extensionsResult.extensions, this._explicitLiveExtensionPaths);
|
|
696
725
|
const runtimeExtensionPaths = new Set(extensions.map((extension) => extension.path));
|
|
697
726
|
extensionsResult.runtime.pendingProviderRegistrations =
|
|
698
727
|
extensionsResult.runtime.pendingProviderRegistrations.filter((registration) => runtimeExtensionPaths.has(registration.extensionPath));
|
|
@@ -809,6 +838,15 @@ export class RuntimeBuilder {
|
|
|
809
838
|
deferExtensionDispose: true,
|
|
810
839
|
skipSettingsReload: true,
|
|
811
840
|
});
|
|
841
|
+
// A live-load call is an exact session-owned grant. Resource discovery deliberately cannot
|
|
842
|
+
// recreate it without a profile, so restore only those approved paths into the new runtime
|
|
843
|
+
// generation before binding it.
|
|
844
|
+
for (const extensionPath of this._explicitLiveExtensionPaths) {
|
|
845
|
+
if (this.deps.isExtensionPathAllowed(extensionPath, "explicit") &&
|
|
846
|
+
!this.deps.getResourceLoader().getLoadedExtension(extensionPath)) {
|
|
847
|
+
await this._importExtension(extensionPath);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
812
850
|
// Replace the previous extension-owned provider generation before binding the new one. The
|
|
813
851
|
// bulk refresh also preserves API/OAuth streams for surviving non-extension providers.
|
|
814
852
|
this.deps.getModelRegistry().unregisterProviders(previousExtensionProviderNames);
|
|
@@ -874,9 +912,23 @@ export class RuntimeBuilder {
|
|
|
874
912
|
*/
|
|
875
913
|
async unloadExtensionLive(extensionPath) {
|
|
876
914
|
this._assertReloadQuiescent("unload extension");
|
|
915
|
+
try {
|
|
916
|
+
await this._unloadExtensionLive(extensionPath, true, true);
|
|
917
|
+
}
|
|
918
|
+
catch (error) {
|
|
919
|
+
await this._recoverLiveExtensionFailure();
|
|
920
|
+
throw error;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
async _unloadExtensionLive(extensionPath, revokeExplicitGrant, notify) {
|
|
877
924
|
const ext = this.deps.getResourceLoader().getLoadedExtension(extensionPath);
|
|
925
|
+
const explicitGrantPath = ext?.path ?? extensionPath;
|
|
926
|
+
const hadExplicitGrant = this._explicitLiveExtensionPaths.has(explicitGrantPath);
|
|
927
|
+
if (revokeExplicitGrant) {
|
|
928
|
+
this._explicitLiveExtensionPaths.delete(explicitGrantPath);
|
|
929
|
+
}
|
|
878
930
|
if (!ext) {
|
|
879
|
-
return;
|
|
931
|
+
return;
|
|
880
932
|
}
|
|
881
933
|
const previousRunner = this.deps.getExtensionRunner();
|
|
882
934
|
try {
|
|
@@ -901,7 +953,7 @@ export class RuntimeBuilder {
|
|
|
901
953
|
flagValues: previousFlagValues,
|
|
902
954
|
includeAllExtensionTools: true,
|
|
903
955
|
});
|
|
904
|
-
previousRunner.
|
|
956
|
+
previousRunner.retire();
|
|
905
957
|
const memorySnapshot = this.deps.createMemoryReloadSnapshot();
|
|
906
958
|
this.deps.restoreMemoryReloadSnapshot({
|
|
907
959
|
...memorySnapshot,
|
|
@@ -911,16 +963,13 @@ export class RuntimeBuilder {
|
|
|
911
963
|
runtime.memoryProvidersByExtension.delete(ext.path);
|
|
912
964
|
runtime.contextMemoryProvidersByExtension.delete(ext.path);
|
|
913
965
|
await this.deps.initializeMemory();
|
|
914
|
-
|
|
915
|
-
|
|
966
|
+
if (notify) {
|
|
967
|
+
this.deps.notifyExtensionsChanged();
|
|
968
|
+
}
|
|
916
969
|
}
|
|
917
970
|
catch (error) {
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
await this.reload();
|
|
921
|
-
}
|
|
922
|
-
catch {
|
|
923
|
-
// Suppress nested error; original error will be thrown below
|
|
971
|
+
if (revokeExplicitGrant && hadExplicitGrant) {
|
|
972
|
+
this._explicitLiveExtensionPaths.add(explicitGrantPath);
|
|
924
973
|
}
|
|
925
974
|
throw error;
|
|
926
975
|
}
|
|
@@ -933,15 +982,26 @@ export class RuntimeBuilder {
|
|
|
933
982
|
*/
|
|
934
983
|
async loadExtensionLive(extensionPath) {
|
|
935
984
|
this._assertReloadQuiescent("load extension");
|
|
936
|
-
|
|
937
|
-
|
|
985
|
+
this._assertExtensionLoadAllowed(extensionPath, "explicit");
|
|
986
|
+
try {
|
|
987
|
+
await this._loadExtensionLive(extensionPath, "explicit", true);
|
|
988
|
+
}
|
|
989
|
+
catch (error) {
|
|
990
|
+
await this._recoverLiveExtensionFailure();
|
|
991
|
+
throw error;
|
|
938
992
|
}
|
|
993
|
+
}
|
|
994
|
+
async _loadExtensionLive(extensionPath, authority, notify) {
|
|
939
995
|
const previousRunner = this.deps.getExtensionRunner();
|
|
996
|
+
let explicitGrantPath;
|
|
997
|
+
let hadExplicitGrant = false;
|
|
940
998
|
try {
|
|
941
999
|
// Load the extension with fresh import
|
|
942
|
-
const
|
|
943
|
-
if (
|
|
944
|
-
|
|
1000
|
+
const extension = await this._importExtension(extensionPath);
|
|
1001
|
+
if (authority === "explicit") {
|
|
1002
|
+
explicitGrantPath = extension.path;
|
|
1003
|
+
hadExplicitGrant = this._explicitLiveExtensionPaths.has(explicitGrantPath);
|
|
1004
|
+
this._explicitLiveExtensionPaths.add(explicitGrantPath);
|
|
945
1005
|
}
|
|
946
1006
|
// Rebuild runtime to aggregate tools/commands/handlers/providers
|
|
947
1007
|
const activeToolNames = this.deps.getRequestedActiveToolNames() ?? this.deps.getActiveToolNames();
|
|
@@ -956,20 +1016,38 @@ export class RuntimeBuilder {
|
|
|
956
1016
|
// Activate newly registered legacy/context providers immediately. Reinitialization also
|
|
957
1017
|
// refreshes provider tools and preserves all providers owned by existing extensions.
|
|
958
1018
|
await this.deps.initializeMemory();
|
|
959
|
-
|
|
960
|
-
|
|
1019
|
+
previousRunner.retire();
|
|
1020
|
+
if (notify) {
|
|
1021
|
+
this.deps.notifyExtensionsChanged();
|
|
1022
|
+
}
|
|
961
1023
|
}
|
|
962
1024
|
catch (error) {
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
await this.reload();
|
|
966
|
-
}
|
|
967
|
-
catch {
|
|
968
|
-
// Suppress nested error; original error will be thrown below
|
|
1025
|
+
if (explicitGrantPath && !hadExplicitGrant) {
|
|
1026
|
+
this._explicitLiveExtensionPaths.delete(explicitGrantPath);
|
|
969
1027
|
}
|
|
970
1028
|
throw error;
|
|
971
1029
|
}
|
|
972
1030
|
}
|
|
1031
|
+
async _importExtension(extensionPath) {
|
|
1032
|
+
const { extension, error } = await this.deps.getResourceLoader().loadSingleExtension(extensionPath);
|
|
1033
|
+
if (error || !extension) {
|
|
1034
|
+
throw new Error(error || `Failed to load extension: ${extensionPath}`);
|
|
1035
|
+
}
|
|
1036
|
+
return extension;
|
|
1037
|
+
}
|
|
1038
|
+
_assertExtensionLoadAllowed(extensionPath, authority) {
|
|
1039
|
+
if (!this.deps.isExtensionPathAllowed(extensionPath, authority)) {
|
|
1040
|
+
throw new Error(`Cannot load extension outside the active resource profile: ${extensionPath}`);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
async _recoverLiveExtensionFailure() {
|
|
1044
|
+
try {
|
|
1045
|
+
await this.reload();
|
|
1046
|
+
}
|
|
1047
|
+
catch {
|
|
1048
|
+
// Preserve the original live-operation error; recovery is best effort.
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
973
1051
|
/**
|
|
974
1052
|
* Reconcile loaded extensions with the active profile.
|
|
975
1053
|
* Loads extensions that should be enabled but aren't, and unloads extensions that shouldn't be.
|
|
@@ -980,66 +1058,41 @@ export class RuntimeBuilder {
|
|
|
980
1058
|
try {
|
|
981
1059
|
// Get all discoverable extension paths
|
|
982
1060
|
const allDiscoverablePaths = await this.deps.getResourceLoader().getDiscoverableExtensionPaths();
|
|
983
|
-
// Get the target enabled set based on profile filters
|
|
984
|
-
const targetEnabledSet = new Set();
|
|
985
|
-
for (const path of allDiscoverablePaths) {
|
|
986
|
-
if (this.deps.getSettingsManager().isResourceAllowedByProfile("extensions", path)) {
|
|
987
|
-
targetEnabledSet.add(path);
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
// Get currently loaded set
|
|
991
1061
|
const loadedExtensions = this.deps.getResourceLoader().getExtensions().extensions;
|
|
992
|
-
const
|
|
993
|
-
for (const
|
|
994
|
-
|
|
995
|
-
}
|
|
996
|
-
// Collect unloads and loads
|
|
997
|
-
const toUnload = [];
|
|
998
|
-
const toLoad = [];
|
|
999
|
-
for (const path of loadedSet) {
|
|
1000
|
-
if (!targetEnabledSet.has(path)) {
|
|
1001
|
-
toUnload.push(path);
|
|
1002
|
-
}
|
|
1062
|
+
const targetAuthorities = new Map();
|
|
1063
|
+
for (const extension of this.deps.filterExtensionsForRuntime(loadedExtensions, this._explicitLiveExtensionPaths)) {
|
|
1064
|
+
targetAuthorities.set(extension.path, "loaded");
|
|
1003
1065
|
}
|
|
1004
|
-
for (const path of
|
|
1005
|
-
if (
|
|
1006
|
-
|
|
1066
|
+
for (const path of this._explicitLiveExtensionPaths) {
|
|
1067
|
+
if (this.deps.isExtensionPathAllowed(path, "explicit")) {
|
|
1068
|
+
targetAuthorities.set(path, "explicit");
|
|
1007
1069
|
}
|
|
1008
1070
|
}
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
for (const path of toUnload) {
|
|
1013
|
-
try {
|
|
1014
|
-
await this.unloadExtensionLive(path);
|
|
1015
|
-
}
|
|
1016
|
-
catch (error) {
|
|
1017
|
-
errors.push(error instanceof Error ? error : new Error(String(error)));
|
|
1071
|
+
for (const path of allDiscoverablePaths) {
|
|
1072
|
+
if (this.deps.isExtensionPathAllowed(path, "profile") && !targetAuthorities.has(path)) {
|
|
1073
|
+
targetAuthorities.set(path, "profile");
|
|
1018
1074
|
}
|
|
1019
1075
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1076
|
+
// Apply unloads first, then loads. A failed mutation stops the generation immediately; the
|
|
1077
|
+
// outer recovery reload restores one coherent runtime instead of compounding partial changes.
|
|
1078
|
+
for (const extension of [...loadedExtensions]) {
|
|
1079
|
+
if (targetAuthorities.has(extension.path) || targetAuthorities.has(extension.resolvedPath))
|
|
1080
|
+
continue;
|
|
1081
|
+
this._assertReloadQuiescent("reconcile extensions");
|
|
1082
|
+
await this._unloadExtensionLive(extension.path, false, false);
|
|
1027
1083
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1084
|
+
for (const [path, authority] of targetAuthorities) {
|
|
1085
|
+
if (authority === "loaded" || this.deps.getResourceLoader().getLoadedExtension(path))
|
|
1086
|
+
continue;
|
|
1087
|
+
this._assertReloadQuiescent("reconcile extensions");
|
|
1088
|
+
this._assertExtensionLoadAllowed(path, authority);
|
|
1089
|
+
await this._loadExtensionLive(path, authority, false);
|
|
1031
1090
|
}
|
|
1032
1091
|
// Single notification at the end
|
|
1033
1092
|
this.deps.notifyExtensionsChanged();
|
|
1034
1093
|
}
|
|
1035
1094
|
catch (error) {
|
|
1036
|
-
|
|
1037
|
-
try {
|
|
1038
|
-
await this.reload();
|
|
1039
|
-
}
|
|
1040
|
-
catch {
|
|
1041
|
-
// Suppress nested error; original error will be thrown below
|
|
1042
|
-
}
|
|
1095
|
+
await this._recoverLiveExtensionFailure();
|
|
1043
1096
|
throw error;
|
|
1044
1097
|
}
|
|
1045
1098
|
}
|