@gajae-code/coding-agent 0.11.1 → 0.11.3
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 +64 -0
- package/dist/types/cli/config-cli.d.ts +11 -1
- package/dist/types/cli/launch-disposition.d.ts +23 -0
- package/dist/types/cli/notify-cli.d.ts +1 -0
- package/dist/types/cli/session-picker.d.ts +2 -1
- package/dist/types/cli/setup-cli.d.ts +1 -1
- package/dist/types/commands/mcp-serve.d.ts +33 -0
- package/dist/types/commands/mcp.d.ts +1 -1
- package/dist/types/commands/notify.d.ts +0 -2
- package/dist/types/commands/sdk.d.ts +1 -1
- package/dist/types/config/atomic-yaml-patch.d.ts +18 -0
- package/dist/types/config/file-lock.d.ts +14 -4
- package/dist/types/config/keybindings.d.ts +42 -1
- package/dist/types/config/model-auth.d.ts +3 -0
- package/dist/types/config/model-bindings-applier.d.ts +13 -0
- package/dist/types/config/model-discovery-manager.d.ts +49 -0
- package/dist/types/config/model-equivalence.d.ts +20 -0
- package/dist/types/config/model-registry.d.ts +16 -15
- package/dist/types/config/model-resolver.d.ts +28 -18
- package/dist/types/config/models-config-schema.d.ts +11 -0
- package/dist/types/config/settings-schema.d.ts +141 -11
- package/dist/types/config/settings.d.ts +14 -11
- package/dist/types/coordinator-mcp/policy.d.ts +5 -0
- package/dist/types/coordinator-mcp/question-gate-codec.d.ts +129 -0
- package/dist/types/coordinator-mcp/question-state.d.ts +356 -0
- package/dist/types/coordinator-mcp/server.d.ts +4 -0
- package/dist/types/discovery/helpers.d.ts +0 -6
- package/dist/types/edit/index.d.ts +3 -0
- package/dist/types/eval/py/env.d.ts +9 -0
- package/dist/types/extensibility/extensions/loader.d.ts +2 -1
- package/dist/types/extensibility/extensions/runner.d.ts +2 -2
- package/dist/types/extensibility/extensions/types.d.ts +34 -3
- package/dist/types/extensibility/hooks/runner.d.ts +1 -1
- package/dist/types/extensibility/shared-events.d.ts +2 -0
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +10 -1
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +44 -0
- package/dist/types/gjc-runtime/goal-mode-request.d.ts +11 -1
- package/dist/types/gjc-runtime/launch-worktree.d.ts +4 -2
- package/dist/types/gjc-runtime/linux-proc.d.ts +29 -0
- package/dist/types/gjc-runtime/session-resolution.d.ts +2 -2
- package/dist/types/gjc-runtime/state-migrations.d.ts +1 -1
- package/dist/types/gjc-runtime/state-writer.d.ts +2 -1
- package/dist/types/gjc-runtime/team-launch.d.ts +59 -0
- package/dist/types/gjc-runtime/team-notify.d.ts +45 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +29 -121
- package/dist/types/gjc-runtime/team-store.d.ts +160 -0
- package/dist/types/gjc-runtime/team-workers.d.ts +78 -0
- package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +8 -0
- package/dist/types/gjc-runtime/ultragoal-change-set.d.ts +13 -0
- package/dist/types/gjc-runtime/ultragoal-evidence.d.ts +38 -0
- package/dist/types/gjc-runtime/ultragoal-guard.d.ts +7 -0
- package/dist/types/gjc-runtime/ultragoal-pipeline.d.ts +23 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +55 -33
- package/dist/types/gjc-runtime/workflow-cli-common.d.ts +8 -0
- package/dist/types/gjc-runtime/workflow-manifest.d.ts +3 -0
- package/dist/types/goals/continuation-timeout-guard.d.ts +22 -0
- package/dist/types/goals/runtime.d.ts +1 -0
- package/dist/types/goals/state.d.ts +8 -0
- package/dist/types/harness-control-plane/lifecycle-reconciliation.d.ts +17 -0
- package/dist/types/harness-control-plane/phase-rollup.d.ts +4 -7
- package/dist/types/harness-control-plane/receipt-ingest.d.ts +5 -0
- package/dist/types/harness-control-plane/receipt-spool.d.ts +4 -0
- package/dist/types/hindsight/state.d.ts +11 -4
- package/dist/types/lsp/lspmux.d.ts +5 -3
- package/dist/types/lsp/path-trust.d.ts +1 -0
- package/dist/types/main.d.ts +4 -2
- package/dist/types/memories/storage.d.ts +1 -0
- package/dist/types/modes/action-registry.d.ts +29 -0
- package/dist/types/modes/components/chrome.d.ts +14 -0
- package/dist/types/modes/components/command-palette.d.ts +27 -0
- package/dist/types/modes/components/custom-provider-wizard.d.ts +1 -0
- package/dist/types/modes/components/index.d.ts +2 -1
- package/dist/types/modes/components/pet-selector.d.ts +1 -1
- package/dist/types/modes/components/plan-preview-overlay.d.ts +43 -0
- package/dist/types/modes/components/queue-mode-selector.d.ts +1 -1
- package/dist/types/modes/components/queue-pane.d.ts +12 -0
- package/dist/types/modes/components/read-tool-group.d.ts +6 -0
- package/dist/types/modes/components/session-observer-overlay.d.ts +3 -4
- package/dist/types/modes/components/sessions-dashboard.d.ts +32 -0
- package/dist/types/modes/components/settings-selector.d.ts +1 -1
- package/dist/types/modes/components/show-images-selector.d.ts +1 -1
- package/dist/types/modes/components/status-line/types.d.ts +1 -1
- package/dist/types/modes/components/status-line.d.ts +1 -94
- package/dist/types/modes/components/tasks-pane.d.ts +15 -0
- package/dist/types/modes/components/theme-selector.d.ts +1 -1
- package/dist/types/modes/components/tool-execution.d.ts +15 -0
- package/dist/types/modes/components/tool-status-header.d.ts +111 -0
- package/dist/types/modes/components/transcript-viewer-overlay.d.ts +42 -0
- package/dist/types/modes/controllers/goal-mode-controller.d.ts +62 -0
- package/dist/types/modes/controllers/input-controller.d.ts +8 -1
- package/dist/types/modes/controllers/mode-gate.d.ts +8 -0
- package/dist/types/modes/controllers/plan-mode-controller.d.ts +65 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +15 -3
- package/dist/types/modes/controllers/stt-controller.d.ts +26 -0
- package/dist/types/modes/interactive-mode.d.ts +19 -17
- package/dist/types/modes/jobs-observer.d.ts +2 -0
- package/dist/types/modes/prompt-action-autocomplete.d.ts +4 -0
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +4 -11
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +20 -2
- package/dist/types/modes/shared/agent-wire/workflow-gate-types.d.ts +31 -0
- package/dist/types/modes/tasks-aggregator.d.ts +39 -0
- package/dist/types/modes/transcript-item-registry.d.ts +60 -0
- package/dist/types/modes/types.d.ts +20 -13
- package/dist/types/modes/utils/ui-helpers.d.ts +2 -2
- package/dist/types/runtime-mcp/manager.d.ts +1 -1
- package/dist/types/sdk/broker/broker.d.ts +78 -12
- package/dist/types/sdk/broker/lifecycle-codec.d.ts +4 -0
- package/dist/types/sdk/broker/lifecycle-ledger.d.ts +15 -1
- package/dist/types/sdk/broker/lifecycle.d.ts +6 -2
- package/dist/types/sdk/broker/process-incarnation.d.ts +2 -0
- package/dist/types/sdk/broker/session-index.d.ts +0 -1
- package/dist/types/sdk/broker/state-version.d.ts +2 -0
- package/dist/types/sdk/bus/chat-effect-journal.d.ts +1 -0
- package/dist/types/sdk/bus/config-commands.d.ts +1 -1
- package/dist/types/sdk/bus/config.d.ts +11 -0
- package/dist/types/sdk/bus/daemon-paths.d.ts +1 -0
- package/dist/types/sdk/bus/html-format.d.ts +3 -2
- package/dist/types/sdk/bus/index.d.ts +29 -0
- package/dist/types/sdk/bus/lifecycle-control-runtime.d.ts +4 -0
- package/dist/types/sdk/bus/notification-service.d.ts +20 -0
- package/dist/types/sdk/bus/rate-limit-pool.d.ts +13 -2
- package/dist/types/sdk/bus/recent-activity.d.ts +21 -12
- package/dist/types/sdk/bus/rich-document.d.ts +7 -0
- package/dist/types/sdk/bus/rich-render.d.ts +18 -41
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +9 -4
- package/dist/types/sdk/bus/telegram-daemon.d.ts +46 -3
- package/dist/types/sdk/bus/threaded-inbound.d.ts +1 -1
- package/dist/types/sdk/bus/threaded-render.d.ts +13 -0
- package/dist/types/sdk/bus/topic-registry.d.ts +24 -2
- package/dist/types/sdk/host/control/operations.d.ts +1 -1
- package/dist/types/sdk/host/host.d.ts +2 -0
- package/dist/types/sdk/index.d.ts +1 -0
- package/dist/types/sdk/session-directory.d.ts +56 -0
- package/dist/types/sdk/session.d.ts +2 -0
- package/dist/types/session/agent-session.d.ts +82 -47
- package/dist/types/session/agent-storage.d.ts +7 -0
- package/dist/types/session/fallback-chain-controller.d.ts +10 -2
- package/dist/types/session/internal/managed-session-scope.d.ts +102 -0
- package/dist/types/session/internal/managed-session-storage.d.ts +38 -0
- package/dist/types/session/messages.d.ts +16 -0
- package/dist/types/session/session-manager-internal.d.ts +14 -0
- package/dist/types/session/session-manager.d.ts +82 -12
- package/dist/types/session/session-storage.d.ts +43 -3
- package/dist/types/session/volatile-context-pruning.d.ts +15 -0
- package/dist/types/skill-state/{deep-interview-mutation-guard.d.ts → workflow-mutation-guard.d.ts} +24 -8
- package/dist/types/skill-state/workflow-state-contract.d.ts +1 -3
- package/dist/types/slash-commands/builtin-registry.d.ts +4 -1
- package/dist/types/system-prompt.d.ts +2 -11
- package/dist/types/task/executor.d.ts +3 -1
- package/dist/types/thinking.d.ts +7 -0
- package/dist/types/tool-discovery/tool-index.d.ts +1 -50
- package/dist/types/tools/ask.d.ts +64 -2
- package/dist/types/tools/bash.d.ts +3 -0
- package/dist/types/tools/browser/dead-tab-recovery.d.ts +24 -0
- package/dist/types/tools/browser/tab-supervisor.d.ts +21 -0
- package/dist/types/tools/cron.d.ts +2 -0
- package/dist/types/tools/fetch.d.ts +1 -0
- package/dist/types/tools/index.d.ts +30 -15
- package/dist/types/tools/output-meta.d.ts +1 -0
- package/dist/types/tools/read.d.ts +5 -0
- package/dist/types/tools/search-tool-bm25.d.ts +3 -4
- package/dist/types/tools/subagent.d.ts +1 -0
- package/dist/types/utils/event-bus.d.ts +1 -1
- package/dist/types/utils/file-mentions.d.ts +3 -3
- package/dist/types/web/search/index.d.ts +3 -1
- package/package.json +21 -9
- package/scripts/build-sdk-package-smoke.ts +34 -1
- package/scripts/generate-hotkeys-docs.ts +74 -0
- package/scripts/generate-sdk-operation-inventory.ts +64 -20
- package/scripts/verify-gjc-sdk-canonicalization.ts +182 -2
- package/src/async/job-manager.ts +49 -6
- package/src/cli/config-cli.ts +75 -2
- package/src/cli/launch-disposition.ts +42 -0
- package/src/cli/notify-cli.ts +92 -26
- package/src/cli/session-picker.ts +20 -3
- package/src/cli/setup-cli.ts +1 -1
- package/src/cli.ts +1 -1
- package/src/commands/config.ts +1 -1
- package/src/commands/harness.ts +34 -106
- package/src/commands/launch.ts +6 -4
- package/src/commands/mcp-serve.ts +85 -8
- package/src/commands/mcp.ts +2 -2
- package/src/commands/notify.ts +8 -4
- package/src/commands/sdk.ts +61 -40
- package/src/commands/ultragoal.ts +4 -1
- package/src/config/atomic-yaml-patch.ts +80 -13
- package/src/config/file-lock.ts +105 -43
- package/src/config/keybindings.ts +64 -20
- package/src/config/model-auth.ts +9 -0
- package/src/config/model-bindings-applier.ts +139 -0
- package/src/config/model-discovery-manager.ts +224 -0
- package/src/config/model-equivalence.ts +66 -0
- package/src/config/model-registry.ts +169 -302
- package/src/config/model-resolver.ts +361 -369
- package/src/config/models-config-schema.ts +5 -4
- package/src/config/settings-schema.ts +214 -12
- package/src/config/settings.ts +458 -482
- package/src/coordinator-mcp/policy.ts +76 -11
- package/src/coordinator-mcp/question-gate-codec.ts +274 -0
- package/src/coordinator-mcp/question-state.ts +778 -0
- package/src/coordinator-mcp/server.ts +1702 -238
- package/src/debug/index.ts +1 -1
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +13 -1
- package/src/defaults/gjc/skills/team/SKILL.md +16 -0
- package/src/discovery/helpers.ts +1 -50
- package/src/edit/index.ts +64 -0
- package/src/eval/py/env.ts +26 -0
- package/src/eval/py/kernel.ts +5 -3
- package/src/extensibility/extensions/loader.ts +9 -1
- package/src/extensibility/extensions/runner.ts +12 -3
- package/src/extensibility/extensions/types.ts +39 -1
- package/src/extensibility/gjc-plugins/installer.ts +16 -16
- package/src/extensibility/hooks/runner.ts +2 -2
- package/src/extensibility/runtime-skill-discovery.ts +33 -13
- package/src/extensibility/shared-events.ts +2 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +63 -3
- package/src/gjc-runtime/deep-interview-runtime.ts +76 -27
- package/src/gjc-runtime/deep-interview-state.ts +317 -5
- package/src/gjc-runtime/goal-mode-request.ts +55 -8
- package/src/gjc-runtime/launch-tmux.ts +2 -5
- package/src/gjc-runtime/launch-worktree.ts +5 -5
- package/src/gjc-runtime/linux-proc.ts +71 -0
- package/src/gjc-runtime/ralplan-runtime.ts +74 -90
- package/src/gjc-runtime/session-resolution.ts +18 -3
- package/src/gjc-runtime/session-state-sidecar.ts +6 -107
- package/src/gjc-runtime/state-migrations.ts +1 -1
- package/src/gjc-runtime/state-runtime.ts +327 -249
- package/src/gjc-runtime/state-writer.ts +36 -40
- package/src/gjc-runtime/team-launch.ts +319 -0
- package/src/gjc-runtime/team-notify.ts +326 -0
- package/src/gjc-runtime/team-runtime.ts +1099 -1482
- package/src/gjc-runtime/team-store.ts +828 -0
- package/src/gjc-runtime/team-workers.ts +962 -0
- package/src/gjc-runtime/tmux-owner-isolation-cli.ts +2 -11
- package/src/gjc-runtime/tmux-owner-isolation.ts +14 -9
- package/src/gjc-runtime/tmux-sessions.ts +4 -21
- package/src/gjc-runtime/ultragoal-change-set.ts +172 -0
- package/src/gjc-runtime/ultragoal-evidence.ts +874 -0
- package/src/gjc-runtime/ultragoal-guard.ts +29 -5
- package/src/gjc-runtime/ultragoal-pipeline.ts +306 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +84 -1311
- package/src/gjc-runtime/workflow-cli-common.ts +30 -0
- package/src/gjc-runtime/workflow-manifest.generated.json +58 -0
- package/src/gjc-runtime/workflow-manifest.ts +18 -0
- package/src/goals/continuation-timeout-guard.ts +79 -0
- package/src/goals/runtime.ts +7 -5
- package/src/goals/state.ts +18 -0
- package/src/harness-control-plane/lifecycle-reconciliation.ts +64 -0
- package/src/harness-control-plane/phase-rollup.ts +4 -7
- package/src/harness-control-plane/receipt-ingest.ts +5 -0
- package/src/harness-control-plane/receipt-spool.ts +51 -7
- package/src/harness-control-plane/session-lease.ts +12 -130
- package/src/hindsight/backend.ts +26 -27
- package/src/hindsight/state.ts +101 -32
- package/src/hooks/skill-state.ts +17 -11
- package/src/internal-urls/docs-index.generated.ts +21 -18
- package/src/lsp/client.ts +1 -1
- package/src/lsp/config.ts +145 -26
- package/src/lsp/index.ts +1 -1
- package/src/lsp/lspmux.ts +39 -10
- package/src/lsp/path-trust.ts +81 -0
- package/src/main.ts +127 -30
- package/src/memories/index.ts +1 -0
- package/src/memories/storage.ts +6 -2
- package/src/modes/action-registry.ts +165 -0
- package/src/modes/components/chrome.ts +40 -0
- package/src/modes/components/command-palette.ts +168 -0
- package/src/modes/components/custom-editor.ts +1 -1
- package/src/modes/components/custom-provider-wizard.ts +51 -14
- package/src/modes/components/index.ts +2 -1
- package/src/modes/components/pet-selector.ts +11 -17
- package/src/modes/components/plan-preview-overlay.ts +295 -0
- package/src/modes/components/queue-mode-selector.ts +10 -27
- package/src/modes/components/queue-pane.ts +79 -0
- package/src/modes/components/read-tool-group.ts +13 -0
- package/src/modes/components/session-observer-overlay.ts +207 -772
- package/src/modes/components/sessions-dashboard.ts +181 -0
- package/src/modes/components/settings-selector.ts +1 -1
- package/src/modes/components/show-images-selector.ts +10 -24
- package/src/modes/components/status-line/types.ts +1 -1
- package/src/modes/components/status-line.ts +1 -969
- package/src/modes/components/tasks-pane.ts +73 -0
- package/src/modes/components/theme-selector.ts +11 -31
- package/src/modes/components/tool-execution.ts +22 -0
- package/src/modes/components/tool-status-header.ts +1056 -0
- package/src/modes/components/transcript-viewer-overlay.ts +384 -0
- package/src/modes/controllers/btw-controller.ts +1 -0
- package/src/modes/controllers/event-controller.ts +3 -2
- package/src/modes/controllers/extension-ui-controller.ts +24 -1
- package/src/modes/controllers/goal-mode-controller.ts +474 -0
- package/src/modes/controllers/input-controller.ts +764 -229
- package/src/modes/controllers/mode-gate.ts +24 -0
- package/src/modes/controllers/plan-mode-controller.ts +517 -0
- package/src/modes/controllers/selector-controller.ts +225 -10
- package/src/modes/controllers/stt-controller.ts +125 -0
- package/src/modes/interactive-mode.ts +289 -1150
- package/src/modes/jobs-observer.ts +3 -0
- package/src/modes/prompt-action-autocomplete.ts +7 -0
- package/src/modes/runtime-init.ts +8 -0
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +31 -106
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +71 -16
- package/src/modes/shared/agent-wire/workflow-gate-types.ts +177 -0
- package/src/modes/tasks-aggregator.ts +199 -0
- package/src/modes/transcript-item-registry.ts +229 -0
- package/src/modes/types.ts +45 -18
- package/src/modes/utils/ui-helpers.ts +17 -9
- package/src/prompts/agent-fragments/ralplan-persistence.md +6 -0
- package/src/prompts/agent-fragments/restricted-bash.md +1 -0
- package/src/prompts/agents/architect.md +2 -8
- package/src/prompts/agents/critic.md +2 -8
- package/src/prompts/agents/executor.md +3 -0
- package/src/prompts/agents/planner.md +4 -12
- package/src/prompts/system/custom-system-prompt.md +1 -23
- package/src/prompts/system/plan-mode-approved.md +8 -0
- package/src/prompts/system/system-prompt.md +17 -96
- package/src/prompts/tools/bash.md +4 -4
- package/src/prompts/tools/browser.md +15 -52
- package/src/prompts/tools/find.md +2 -2
- package/src/prompts/tools/hashline.md +13 -55
- package/src/prompts/tools/read.md +3 -6
- package/src/prompts/tools/search-tool-bm25.md +0 -2
- package/src/prompts/tools/search.md +2 -4
- package/src/prompts/tools/skill-discovery.md +1 -2
- package/src/prompts/tools/task.md +1 -1
- package/src/runtime-mcp/manager.ts +1 -1
- package/src/sdk/broker/broker.ts +206 -78
- package/src/sdk/broker/discovery.ts +1 -1
- package/src/sdk/broker/ensure.ts +3 -1
- package/src/sdk/broker/lifecycle-codec.ts +11 -0
- package/src/sdk/broker/lifecycle-ledger.ts +371 -74
- package/src/sdk/broker/lifecycle.ts +1399 -142
- package/src/sdk/broker/process-incarnation.ts +5 -13
- package/src/sdk/broker/session-index.ts +145 -56
- package/src/sdk/broker/state-version.ts +21 -0
- package/src/sdk/broker/transport.ts +1 -1
- package/src/sdk/bus/chat-daemon-cli.ts +2 -0
- package/src/sdk/bus/chat-daemon-control.ts +8 -28
- package/src/sdk/bus/chat-effect-journal.ts +10 -2
- package/src/sdk/bus/config-commands.ts +5 -4
- package/src/sdk/bus/config.ts +98 -0
- package/src/sdk/bus/conversation-store.ts +5 -29
- package/src/sdk/bus/daemon-paths.ts +2 -0
- package/src/sdk/bus/html-format.ts +20 -3
- package/src/sdk/bus/index.ts +782 -94
- package/src/sdk/bus/lifecycle-control-runtime.ts +91 -33
- package/src/sdk/bus/natives-augment.d.ts +26 -1
- package/src/sdk/bus/notification-service.ts +168 -20
- package/src/sdk/bus/rate-limit-pool.ts +58 -14
- package/src/sdk/bus/recent-activity.ts +188 -74
- package/src/sdk/bus/rich-document.ts +258 -0
- package/src/sdk/bus/rich-render.ts +62 -70
- package/src/sdk/bus/telegram-daemon-cli.ts +15 -59
- package/src/sdk/bus/telegram-daemon-contract.ts +9 -4
- package/src/sdk/bus/telegram-daemon.ts +1389 -237
- package/src/sdk/bus/threaded-inbound.ts +8 -3
- package/src/sdk/bus/threaded-render.ts +57 -1
- package/src/sdk/bus/topic-registry.ts +120 -13
- package/src/sdk/host/control/dispatch.ts +14 -2
- package/src/sdk/host/control/operations.ts +6 -1
- package/src/sdk/host/host.ts +44 -2
- package/src/sdk/host/query/handlers.ts +20 -22
- package/src/sdk/host/query/revision-store.ts +80 -57
- package/src/sdk/index.ts +1 -0
- package/src/sdk/protocol/operation-inventory.generated.json +943 -1907
- package/src/sdk/session-directory.ts +141 -0
- package/src/sdk/session.ts +462 -480
- package/src/session/agent-session.ts +1700 -583
- package/src/session/agent-storage.ts +18 -0
- package/src/session/cache-economics.ts +25 -8
- package/src/session/fallback-chain-controller.ts +53 -3
- package/src/session/internal/managed-session-scope.ts +2226 -0
- package/src/session/internal/managed-session-storage.ts +453 -0
- package/src/session/messages.ts +91 -2
- package/src/session/session-manager-internal.ts +33 -0
- package/src/session/session-manager.ts +1112 -333
- package/src/session/session-storage.ts +444 -39
- package/src/session/volatile-context-pruning.ts +78 -0
- package/src/setup/credential-auto-import.ts +2 -1
- package/src/setup/hermes/templates/operator-instructions.v1.md +1 -1
- package/src/setup/provider-onboarding.ts +36 -61
- package/src/setup/provider-presets.json +5 -0
- package/src/skill-state/active-state.ts +3 -13
- package/src/skill-state/{deep-interview-mutation-guard.ts → workflow-mutation-guard.ts} +47 -29
- package/src/skill-state/workflow-state-contract.ts +6 -41
- package/src/slash-commands/builtin-registry.ts +46 -11
- package/src/system-prompt.ts +37 -44
- package/src/task/agents.ts +19 -1
- package/src/task/executor.ts +90 -6
- package/src/task/index.ts +36 -21
- package/src/thinking.ts +21 -6
- package/src/tool-discovery/tool-index.ts +2 -134
- package/src/tools/ask.ts +157 -21
- package/src/tools/ast-edit.ts +1 -1
- package/src/tools/bash.ts +38 -0
- package/src/tools/browser/dead-tab-recovery.ts +78 -0
- package/src/tools/browser/tab-supervisor.ts +282 -36
- package/src/tools/computer.ts +10 -3
- package/src/tools/cron.ts +30 -16
- package/src/tools/eval.ts +1 -2
- package/src/tools/fetch.ts +11 -4
- package/src/tools/index.ts +76 -24
- package/src/tools/output-meta.ts +19 -7
- package/src/tools/read.ts +219 -64
- package/src/tools/resource-gc.ts +2 -2
- package/src/tools/search-tool-bm25.ts +11 -74
- package/src/tools/subagent.ts +43 -2
- package/src/utils/event-bus.ts +9 -4
- package/src/utils/file-mentions.ts +4 -4
- package/src/web/search/index.ts +3 -3
- package/dist/types/discovery/plugin-dir-roots.d.ts +0 -15
- package/dist/types/runtime-mcp/discoverable-tool-metadata.d.ts +0 -7
- package/src/discovery/plugin-dir-roots.ts +0 -28
- package/src/runtime-mcp/discoverable-tool-metadata.ts +0 -25
|
@@ -50,7 +50,9 @@ export const OpenAICompatSchema = z.object({
|
|
|
50
50
|
toolStrictMode: z.enum(["all_strict", "none"]).optional(),
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
const
|
|
53
|
+
export const GJC_MODEL_EFFORT_IDS = ["minimal", "low", "medium", "high", "xhigh", "max"] as const;
|
|
54
|
+
export const GJC_MODEL_ASSIGNMENT_TARGET_IDS = ["default", "executor", "architect", "planner", "critic"] as const;
|
|
55
|
+
export const EffortSchema = z.enum(GJC_MODEL_EFFORT_IDS);
|
|
54
56
|
const CacheRetentionSchema = z.enum(["none", "short", "long"]);
|
|
55
57
|
|
|
56
58
|
const ThinkingControlModeSchema = z.enum([
|
|
@@ -85,9 +87,8 @@ export const ModelBindingsSchema = z.object({
|
|
|
85
87
|
agentModelOverrides: z.record(z.string(), stringOrNonEmptyArray(PermissiveModelSelectorSchema)).optional(),
|
|
86
88
|
});
|
|
87
89
|
|
|
88
|
-
export const ProfileRoleSchema = z.enum(
|
|
89
|
-
|
|
90
|
-
const ProfileModelSelectorPattern = "^[^,/]+/[^,:]+(?::(?:minimal|low|medium|high|xhigh|max))?$";
|
|
90
|
+
export const ProfileRoleSchema = z.enum(GJC_MODEL_ASSIGNMENT_TARGET_IDS);
|
|
91
|
+
export const ProfileModelSelectorPattern = `^[^,/]+/[^,:]+(?::(?:${EffortSchema.options.join("|")}))?$`;
|
|
91
92
|
|
|
92
93
|
export const ProfileModelSelectorSchema = z
|
|
93
94
|
.string()
|
|
@@ -270,12 +270,22 @@ export const SETTINGS_SCHEMA = {
|
|
|
270
270
|
// per-machine overrides remain trivial.
|
|
271
271
|
"auth.broker.url": { type: "string", default: undefined },
|
|
272
272
|
"auth.broker.token": { type: "string", default: undefined },
|
|
273
|
+
"session.directoryMigration": {
|
|
274
|
+
type: "enum",
|
|
275
|
+
values: ["copy-retain", "disabled"] as const,
|
|
276
|
+
default: "copy-retain",
|
|
277
|
+
},
|
|
273
278
|
|
|
274
279
|
// Notifications (shared daemon with Telegram/Discord/Slack presentation adapters)
|
|
275
280
|
"notifications.enabled": { type: "boolean", default: false },
|
|
276
|
-
"notifications.telegram.botToken": {
|
|
281
|
+
"notifications.telegram.botToken": {
|
|
282
|
+
type: "string",
|
|
283
|
+
default: undefined,
|
|
284
|
+
validate: (value: unknown) => typeof value === "string",
|
|
285
|
+
},
|
|
277
286
|
"notifications.telegram.chatId": { type: "string", default: undefined },
|
|
278
287
|
"notifications.telegram.activation": { type: "record", default: {} as Record<string, unknown> },
|
|
288
|
+
"notifications.telegram.btw.enabled": { type: "boolean", default: true },
|
|
279
289
|
"notifications.telegram.rich.enabled": {
|
|
280
290
|
type: "boolean",
|
|
281
291
|
default: true,
|
|
@@ -646,20 +656,30 @@ export const SETTINGS_SCHEMA = {
|
|
|
646
656
|
],
|
|
647
657
|
},
|
|
648
658
|
},
|
|
659
|
+
"tools.preAdmissionArtifactSpill": {
|
|
660
|
+
type: "boolean",
|
|
661
|
+
default: false,
|
|
662
|
+
ui: {
|
|
663
|
+
tab: "tools",
|
|
664
|
+
label: "Pre-admission artifact spill",
|
|
665
|
+
description:
|
|
666
|
+
"Experimental opt-in: save oversized tool results before provider context construction, retaining a UTF-8-safe head, tail, digest, and artifact receipt inline",
|
|
667
|
+
},
|
|
668
|
+
},
|
|
649
669
|
|
|
650
670
|
"tools.readArtifactSpillThreshold": {
|
|
651
671
|
type: "number",
|
|
652
|
-
default:
|
|
672
|
+
default: 256,
|
|
653
673
|
ui: {
|
|
654
674
|
tab: "tools",
|
|
655
|
-
label: "
|
|
675
|
+
label: "Read artifact spill threshold (KB)",
|
|
656
676
|
description:
|
|
657
|
-
"
|
|
677
|
+
"Explicit large reads above this combined size are saved as an artifact with a bounded head-and-tail snippet inline. Bare reads, directories, and converted-document receipts remain inline.",
|
|
658
678
|
options: [
|
|
659
|
-
{ value: "0", label: "Off", description: "
|
|
679
|
+
{ value: "0", label: "Off", description: "No read-specific spill (backstop only)" },
|
|
660
680
|
{ value: "50", label: "50 KB", description: "~12.5K tokens" },
|
|
661
681
|
{ value: "100", label: "100 KB", description: "~25K tokens" },
|
|
662
|
-
{ value: "256", label: "256 KB", description: "~64K tokens" },
|
|
682
|
+
{ value: "256", label: "256 KB", description: "Default; ~64K tokens" },
|
|
663
683
|
{ value: "512", label: "512 KB", description: "~128K tokens" },
|
|
664
684
|
{ value: "1000", label: "1 MB", description: "~250K tokens" },
|
|
665
685
|
],
|
|
@@ -668,17 +688,17 @@ export const SETTINGS_SCHEMA = {
|
|
|
668
688
|
|
|
669
689
|
"tools.fileMentionInlineBytes": {
|
|
670
690
|
type: "number",
|
|
671
|
-
default:
|
|
691
|
+
default: 10,
|
|
672
692
|
ui: {
|
|
673
693
|
tab: "tools",
|
|
674
694
|
label: "File-mention inline cap (KB)",
|
|
675
695
|
description:
|
|
676
|
-
"Inline byte cap for auto-read `@path` file mentions,
|
|
696
|
+
"Inline byte cap for auto-read `@path` file mentions, aligned with the 10 KiB bare-read receipt so incidental mentions stay within the same bounded context budget. The full file is still available via the read tool.",
|
|
677
697
|
options: [
|
|
678
698
|
{ value: "5", label: "5 KB", description: "~1.25K tokens" },
|
|
679
|
-
{ value: "10", label: "10 KB", description: "~2.5K tokens" },
|
|
680
|
-
{ value: "20", label: "20 KB", description: "
|
|
681
|
-
{ value: "50", label: "50 KB", description: "~12.5K tokens (matches read
|
|
699
|
+
{ value: "10", label: "10 KB", description: "Default; ~2.5K tokens" },
|
|
700
|
+
{ value: "20", label: "20 KB", description: "~5K tokens" },
|
|
701
|
+
{ value: "50", label: "50 KB", description: "~12.5K tokens (matches bare-read receipt)" },
|
|
682
702
|
],
|
|
683
703
|
},
|
|
684
704
|
},
|
|
@@ -1151,7 +1171,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
1151
1171
|
tab: "model",
|
|
1152
1172
|
label: "Max Retry Delay",
|
|
1153
1173
|
description:
|
|
1154
|
-
"Maximum wait between retries, in ms.
|
|
1174
|
+
"Maximum wait between retries, in ms. Legacy retries clamp provider Retry-After hints to this value; managed fallback honors typed Retry-After hints even when they exceed it.",
|
|
1155
1175
|
},
|
|
1156
1176
|
},
|
|
1157
1177
|
"retry.requestMaxRetries": {
|
|
@@ -1198,6 +1218,15 @@ export const SETTINGS_SCHEMA = {
|
|
|
1198
1218
|
// Interaction
|
|
1199
1219
|
// ────────────────────────────────────────────────────────────────────────
|
|
1200
1220
|
|
|
1221
|
+
"mouse.enabled": {
|
|
1222
|
+
type: "boolean",
|
|
1223
|
+
default: false,
|
|
1224
|
+
ui: {
|
|
1225
|
+
tab: "interaction",
|
|
1226
|
+
label: "Mouse Support",
|
|
1227
|
+
description: "Enable SGR mouse wheel scrolling and overlay row selection. Disabled in tmux and screen.",
|
|
1228
|
+
},
|
|
1229
|
+
},
|
|
1201
1230
|
// Conversation flow
|
|
1202
1231
|
steeringMode: {
|
|
1203
1232
|
type: "enum",
|
|
@@ -1987,6 +2016,51 @@ export const SETTINGS_SCHEMA = {
|
|
|
1987
2016
|
],
|
|
1988
2017
|
},
|
|
1989
2018
|
},
|
|
2019
|
+
"read.receiptBudgetLines": {
|
|
2020
|
+
type: "number",
|
|
2021
|
+
default: 50,
|
|
2022
|
+
ui: {
|
|
2023
|
+
tab: "editing",
|
|
2024
|
+
label: "Read Receipt Line Budget",
|
|
2025
|
+
description: "Maximum lines included in a bare read receipt before a selector footer is shown",
|
|
2026
|
+
options: [
|
|
2027
|
+
{ value: "25", label: "25 lines" },
|
|
2028
|
+
{ value: "50", label: "50 lines", description: "Default" },
|
|
2029
|
+
{ value: "100", label: "100 lines" },
|
|
2030
|
+
{ value: "200", label: "200 lines" },
|
|
2031
|
+
],
|
|
2032
|
+
},
|
|
2033
|
+
},
|
|
2034
|
+
"read.receiptBudgetBytes": {
|
|
2035
|
+
type: "number",
|
|
2036
|
+
default: 10,
|
|
2037
|
+
ui: {
|
|
2038
|
+
tab: "editing",
|
|
2039
|
+
label: "Read Receipt Byte Budget (KB)",
|
|
2040
|
+
description: "Maximum UTF-8 body size for a bare read receipt before a selector footer is shown",
|
|
2041
|
+
options: [
|
|
2042
|
+
{ value: "5", label: "5 KB", description: "~1.25K tokens" },
|
|
2043
|
+
{ value: "10", label: "10 KB", description: "Default; ~2.5K tokens" },
|
|
2044
|
+
{ value: "20", label: "20 KB", description: "~5K tokens" },
|
|
2045
|
+
{ value: "50", label: "50 KB", description: "~12.5K tokens" },
|
|
2046
|
+
],
|
|
2047
|
+
},
|
|
2048
|
+
},
|
|
2049
|
+
"read.summaryMaxBytes": {
|
|
2050
|
+
type: "number",
|
|
2051
|
+
default: 20,
|
|
2052
|
+
ui: {
|
|
2053
|
+
tab: "editing",
|
|
2054
|
+
label: "Read Summary Size Budget (KB)",
|
|
2055
|
+
description: "Maximum UTF-8 size for a structural read summary before additional units are elided",
|
|
2056
|
+
options: [
|
|
2057
|
+
{ value: "10", label: "10 KB", description: "~2.5K tokens" },
|
|
2058
|
+
{ value: "20", label: "20 KB", description: "Default; ~5K tokens" },
|
|
2059
|
+
{ value: "50", label: "50 KB", description: "~12.5K tokens" },
|
|
2060
|
+
{ value: "100", label: "100 KB", description: "~25K tokens" },
|
|
2061
|
+
],
|
|
2062
|
+
},
|
|
2063
|
+
},
|
|
1990
2064
|
|
|
1991
2065
|
"read.summarize.enabled": {
|
|
1992
2066
|
type: "boolean",
|
|
@@ -2758,6 +2832,15 @@ export const SETTINGS_SCHEMA = {
|
|
|
2758
2832
|
// Tasks
|
|
2759
2833
|
// ────────────────────────────────────────────────────────────────────────
|
|
2760
2834
|
|
|
2835
|
+
"tasksPane.defaultVisible": {
|
|
2836
|
+
type: "boolean",
|
|
2837
|
+
default: false,
|
|
2838
|
+
ui: {
|
|
2839
|
+
tab: "tasks",
|
|
2840
|
+
label: "Tasks Pane Visible By Default",
|
|
2841
|
+
description: "Open the unified tasks pane when the interactive UI starts",
|
|
2842
|
+
},
|
|
2843
|
+
},
|
|
2761
2844
|
// Plan mode
|
|
2762
2845
|
"plan.enabled": {
|
|
2763
2846
|
type: "boolean",
|
|
@@ -3408,6 +3491,122 @@ export function getEnumValues(path: SettingPath): readonly string[] | undefined
|
|
|
3408
3491
|
return "values" in def ? (def.values as readonly string[]) : undefined;
|
|
3409
3492
|
}
|
|
3410
3493
|
|
|
3494
|
+
export const CONFIG_SCHEMA_VERSION = 1;
|
|
3495
|
+
|
|
3496
|
+
export type SettingsSchemaIssue = {
|
|
3497
|
+
path: string;
|
|
3498
|
+
kind: "unknown" | "invalid" | "coerced" | "pending-migration";
|
|
3499
|
+
detail: string;
|
|
3500
|
+
};
|
|
3501
|
+
|
|
3502
|
+
export type SettingsSchemaReport = { issues: SettingsSchemaIssue[]; valid: boolean };
|
|
3503
|
+
|
|
3504
|
+
function schemaValueAtPath(value: Record<string, unknown>, path: string): unknown {
|
|
3505
|
+
let current: unknown = value;
|
|
3506
|
+
for (const segment of path.split(".")) {
|
|
3507
|
+
if (!current || typeof current !== "object" || Array.isArray(current)) return undefined;
|
|
3508
|
+
current = (current as Record<string, unknown>)[segment];
|
|
3509
|
+
}
|
|
3510
|
+
return current;
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
function schemaSetAtPath(value: Record<string, unknown>, path: string, next: unknown): void {
|
|
3514
|
+
const segments = path.split(".");
|
|
3515
|
+
let current = value;
|
|
3516
|
+
for (const segment of segments.slice(0, -1)) {
|
|
3517
|
+
const child = current[segment];
|
|
3518
|
+
if (!child || typeof child !== "object" || Array.isArray(child)) current[segment] = {};
|
|
3519
|
+
current = current[segment] as Record<string, unknown>;
|
|
3520
|
+
}
|
|
3521
|
+
current[segments.at(-1)!] = next;
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
function schemaPaths(value: Record<string, unknown>, prefix = ""): string[] {
|
|
3525
|
+
const paths: string[] = [];
|
|
3526
|
+
for (const [key, child] of Object.entries(value)) {
|
|
3527
|
+
const path = prefix ? `${prefix}.${key}` : key;
|
|
3528
|
+
const definition = SETTINGS_SCHEMA[path as SettingPath];
|
|
3529
|
+
// Records intentionally accept user-defined keys; validate their entries below.
|
|
3530
|
+
if (definition?.type === "record") {
|
|
3531
|
+
paths.push(path);
|
|
3532
|
+
} else if (child && typeof child === "object" && !Array.isArray(child)) {
|
|
3533
|
+
paths.push(...schemaPaths(child as Record<string, unknown>, path));
|
|
3534
|
+
} else {
|
|
3535
|
+
paths.push(path);
|
|
3536
|
+
}
|
|
3537
|
+
}
|
|
3538
|
+
return paths;
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
function validSettingValue(definition: (typeof SETTINGS_SCHEMA)[SettingPath], value: unknown): boolean {
|
|
3542
|
+
return (
|
|
3543
|
+
(definition.type === "boolean" && typeof value === "boolean") ||
|
|
3544
|
+
(definition.type === "string" && typeof value === "string") ||
|
|
3545
|
+
(definition.type === "number" &&
|
|
3546
|
+
typeof value === "number" &&
|
|
3547
|
+
Number.isFinite(value) &&
|
|
3548
|
+
(!("validate" in definition) || !definition.validate || definition.validate(value))) ||
|
|
3549
|
+
(definition.type === "enum" &&
|
|
3550
|
+
typeof value === "string" &&
|
|
3551
|
+
(definition.values as readonly string[]).includes(value)) ||
|
|
3552
|
+
(definition.type === "array" && Array.isArray(value)) ||
|
|
3553
|
+
(definition.type === "record" && !!value && typeof value === "object" && !Array.isArray(value))
|
|
3554
|
+
);
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3557
|
+
/** Coerce supported scalar legacy values and report unknown or invalid settings without dropping them. */
|
|
3558
|
+
export function reconcileSettingsSchema(raw: Record<string, unknown>): {
|
|
3559
|
+
settings: Record<string, unknown>;
|
|
3560
|
+
report: SettingsSchemaReport;
|
|
3561
|
+
} {
|
|
3562
|
+
const settings = structuredClone(raw);
|
|
3563
|
+
const issues: SettingsSchemaIssue[] = [];
|
|
3564
|
+
const knownPaths = new Set(Object.keys(SETTINGS_SCHEMA));
|
|
3565
|
+
for (const path of schemaPaths(settings)) {
|
|
3566
|
+
if (path === "configSchemaVersion" || knownPaths.has(path)) continue;
|
|
3567
|
+
if (![...knownPaths].some(known => known.startsWith(`${path}.`))) {
|
|
3568
|
+
issues.push({ path, kind: "unknown", detail: "Setting is not recognized by this version." });
|
|
3569
|
+
}
|
|
3570
|
+
}
|
|
3571
|
+
for (const path of Object.keys(SETTINGS_SCHEMA) as SettingPath[]) {
|
|
3572
|
+
const value = schemaValueAtPath(settings, path);
|
|
3573
|
+
if (value === undefined) continue;
|
|
3574
|
+
const definition = SETTINGS_SCHEMA[path];
|
|
3575
|
+
let next = value;
|
|
3576
|
+
if (definition.type === "boolean" && (value === "true" || value === "false")) next = value === "true";
|
|
3577
|
+
if (
|
|
3578
|
+
definition.type === "number" &&
|
|
3579
|
+
typeof value === "string" &&
|
|
3580
|
+
value.trim() !== "" &&
|
|
3581
|
+
Number.isFinite(Number(value))
|
|
3582
|
+
) {
|
|
3583
|
+
next = Number(value);
|
|
3584
|
+
}
|
|
3585
|
+
if (next !== value) {
|
|
3586
|
+
schemaSetAtPath(settings, path, next);
|
|
3587
|
+
issues.push({ path, kind: "coerced", detail: `Coerced ${typeof value} to ${definition.type}.` });
|
|
3588
|
+
}
|
|
3589
|
+
if (!validSettingValue(definition, next))
|
|
3590
|
+
issues.push({ path, kind: "invalid", detail: `Expected ${definition.type}.` });
|
|
3591
|
+
if (
|
|
3592
|
+
definition.type === "record" &&
|
|
3593
|
+
"valueSchema" in definition &&
|
|
3594
|
+
definition.valueSchema &&
|
|
3595
|
+
validSettingValue(definition, next)
|
|
3596
|
+
) {
|
|
3597
|
+
for (const [key, entry] of Object.entries(next as Record<string, unknown>)) {
|
|
3598
|
+
if (
|
|
3599
|
+
definition.valueSchema.type === "model-selector-value" &&
|
|
3600
|
+
!(typeof entry === "string" || (Array.isArray(entry) && entry.every(item => typeof item === "string")))
|
|
3601
|
+
) {
|
|
3602
|
+
issues.push({ path: `${path}.${key}`, kind: "invalid", detail: "Expected model-selector-value." });
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
return { settings, report: { issues, valid: !issues.some(issue => issue.kind === "invalid") } };
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3411
3610
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
3412
3611
|
// Derived Types from Schema
|
|
3413
3612
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -3560,6 +3759,9 @@ export interface NotificationsSettings {
|
|
|
3560
3759
|
telegram: {
|
|
3561
3760
|
botToken: string | undefined;
|
|
3562
3761
|
chatId: string | undefined;
|
|
3762
|
+
btw: {
|
|
3763
|
+
enabled: boolean;
|
|
3764
|
+
};
|
|
3563
3765
|
rich: {
|
|
3564
3766
|
enabled: boolean;
|
|
3565
3767
|
};
|