@gajae-code/coding-agent 0.11.1 → 0.11.2
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 +54 -0
- package/dist/types/cli/config-cli.d.ts +11 -1
- 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 +56 -1
- 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 +3 -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/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 +27 -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/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 +3 -0
- package/dist/types/tools/search-tool-bm25.d.ts +3 -4
- package/dist/types/utils/event-bus.d.ts +1 -1
- 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/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 +159 -2
- 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 +320 -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 +28 -8
- 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/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 +778 -93
- 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 +31 -1
- 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 +458 -479
- 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 +13 -5
- package/src/tools/read.ts +37 -1
- package/src/tools/resource-gc.ts +2 -2
- package/src/tools/search-tool-bm25.ts +11 -74
- package/src/utils/event-bus.ts +9 -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
|
@@ -22,6 +22,8 @@ export interface ScopedModelSelection {
|
|
|
22
22
|
export interface ScopedModel extends ScopedModelSelection {
|
|
23
23
|
explicitThinkingLevel: boolean;
|
|
24
24
|
}
|
|
25
|
+
export type { SelectorThinkingSuffix } from "../thinking";
|
|
26
|
+
export { splitSelectorThinkingSuffix } from "../thinking";
|
|
25
27
|
/**
|
|
26
28
|
* Parse a model string in "provider/modelId" format.
|
|
27
29
|
* Returns undefined if the format is invalid.
|
|
@@ -43,11 +45,11 @@ export interface ModelMatchPreferences {
|
|
|
43
45
|
/** Providers to deprioritize when no recent usage is available. */
|
|
44
46
|
deprioritizeProviders?: string[];
|
|
45
47
|
}
|
|
46
|
-
export type CanonicalModelRegistry = Partial<Pick<ModelRegistry, "resolveCanonicalModel" | "getCanonicalVariants" | "getCanonicalId">>;
|
|
48
|
+
export type CanonicalModelRegistry = Partial<Pick<ModelRegistry, "resolveCanonicalModel" | "getCanonicalVariants" | "getCanonicalId" | "seedCanonicalVariant">>;
|
|
47
49
|
export type ModelLookupRegistry = Pick<ModelRegistry, "getAvailable"> & Partial<CanonicalModelRegistry>;
|
|
48
50
|
type CliModelRegistry = Pick<ModelRegistry, "getAll"> & Partial<CanonicalModelRegistry>;
|
|
49
|
-
type InitialModelRegistry = Pick<ModelRegistry, "getAvailable"
|
|
50
|
-
type RestorableModelRegistry = Pick<ModelRegistry, "getAvailable" | "
|
|
51
|
+
type InitialModelRegistry = Pick<ModelRegistry, "getAvailable">;
|
|
52
|
+
type RestorableModelRegistry = Pick<ModelRegistry, "getAvailable" | "getApiKey">;
|
|
51
53
|
/**
|
|
52
54
|
* Find an exact explicit provider/model match.
|
|
53
55
|
* Bare model ids are handled separately so canonical ids can coalesce variants.
|
|
@@ -60,9 +62,23 @@ export interface ParsedModelResult {
|
|
|
60
62
|
warning: string | undefined;
|
|
61
63
|
explicitThinkingLevel: boolean;
|
|
62
64
|
}
|
|
65
|
+
export interface ResolveSelectorOptions {
|
|
66
|
+
allowInvalidThinkingSelectorFallback?: boolean;
|
|
67
|
+
modelRegistry?: CanonicalModelRegistry;
|
|
68
|
+
preferences?: ModelMatchPreferences;
|
|
69
|
+
sessionId?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Resolve one selector through ordered exact, canonical, bare-id, provider-fuzzy,
|
|
73
|
+
* substring/alias, and glob stages. Thinking is split only after a full selector
|
|
74
|
+
* cannot resolve, which preserves OpenRouter route suffixes in concrete IDs.
|
|
75
|
+
*/
|
|
76
|
+
export declare function resolveSelector(selector: string, candidates: Model<Api>[], options?: ResolveSelectorOptions): ParsedModelResult;
|
|
77
|
+
/** @internal Exported for testing and legacy adapters. */
|
|
63
78
|
export declare function parseModelPattern(pattern: string, availableModels: Model<Api>[], preferences?: ModelMatchPreferences, options?: {
|
|
64
79
|
allowInvalidThinkingSelectorFallback?: boolean;
|
|
65
80
|
modelRegistry?: CanonicalModelRegistry;
|
|
81
|
+
sessionId?: string;
|
|
66
82
|
}): ParsedModelResult;
|
|
67
83
|
/**
|
|
68
84
|
* Expand a role alias like "pi/default" to the configured model string.
|
|
@@ -90,6 +106,7 @@ export declare function resolveModelRoleValue(roleValue: ModelSelectorValue | un
|
|
|
90
106
|
settings?: Settings;
|
|
91
107
|
matchPreferences?: ModelMatchPreferences;
|
|
92
108
|
modelRegistry?: CanonicalModelRegistry;
|
|
109
|
+
sessionId?: string;
|
|
93
110
|
}): ResolvedModelRoleValue;
|
|
94
111
|
export declare function extractExplicitThinkingSelector(value: ModelSelectorValue | undefined, settings?: Settings): ThinkingLevel | undefined;
|
|
95
112
|
/**
|
|
@@ -109,7 +126,7 @@ export declare function resolveModelFromSettings(options: {
|
|
|
109
126
|
/**
|
|
110
127
|
* Resolve a list of override patterns to the first matching model.
|
|
111
128
|
*/
|
|
112
|
-
export declare function resolveModelOverride(modelPatterns: string[], modelRegistry: ModelLookupRegistry, settings?: Settings): {
|
|
129
|
+
export declare function resolveModelOverride(modelPatterns: string[], modelRegistry: ModelLookupRegistry, settings?: Settings, sessionId?: string): {
|
|
113
130
|
model?: Model<Api>;
|
|
114
131
|
thinkingLevel?: ThinkingLevel;
|
|
115
132
|
explicitThinkingLevel: boolean;
|
|
@@ -155,7 +172,7 @@ export declare function resolveModelChainWithAuth(modelPatterns: readonly string
|
|
|
155
172
|
* primary resolution unchanged so the existing error path still surfaces
|
|
156
173
|
* a meaningful failure downstream.
|
|
157
174
|
*/
|
|
158
|
-
export declare function resolveModelOverrideWithAuthFallback(modelPatterns: string[], parentActiveModelPattern: string | undefined, modelRegistry: ModelLookupRegistry & Pick<ModelRegistry, "getApiKey">, settings?: Settings,
|
|
175
|
+
export declare function resolveModelOverrideWithAuthFallback(modelPatterns: string[], parentActiveModelPattern: string | undefined, modelRegistry: ModelLookupRegistry & Pick<ModelRegistry, "getApiKey">, settings?: Settings, authSessionId?: string, options?: ModelChainResolutionOptions, canonicalSessionId?: string): Promise<{
|
|
159
176
|
model?: Model<Api>;
|
|
160
177
|
thinkingLevel?: ThinkingLevel;
|
|
161
178
|
explicitThinkingLevel: boolean;
|
|
@@ -177,15 +194,11 @@ export declare function resolveRoleSelection(roles: readonly string[], settings:
|
|
|
177
194
|
thinkingLevel?: ThinkingLevel;
|
|
178
195
|
} | undefined;
|
|
179
196
|
/**
|
|
180
|
-
* Resolve model patterns to actual Model objects with optional thinking levels
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
* Supports models with colons in their IDs (e.g., OpenRouter's model:exacto).
|
|
187
|
-
* The algorithm tries to match the full pattern first, then progressively
|
|
188
|
-
* strips colon-suffixes to find a match.
|
|
197
|
+
* Resolve model patterns to actual Model objects with optional thinking levels.
|
|
198
|
+
* A `:level` suffix is interpreted only after the complete selector fails to
|
|
199
|
+
* resolve, preserving concrete model IDs that contain colon-bearing route suffixes.
|
|
200
|
+
* For each non-glob pattern, alias IDs are preferred over dated versions; otherwise
|
|
201
|
+
* the latest dated version is selected.
|
|
189
202
|
*/
|
|
190
203
|
export declare function resolveModelScope(patterns: string[], modelRegistry: Pick<ModelRegistry, "getAvailable" | "getCanonicalVariants">, preferences?: ModelMatchPreferences): Promise<ScopedModel[]>;
|
|
191
204
|
/**
|
|
@@ -208,9 +221,7 @@ export interface ResolveCliModelResult {
|
|
|
208
221
|
warning: string | undefined;
|
|
209
222
|
error: string | undefined;
|
|
210
223
|
}
|
|
211
|
-
/**
|
|
212
|
-
* Resolve a single model from CLI flags.
|
|
213
|
-
*/
|
|
224
|
+
/** Resolve a single model from CLI flags through the staged selector resolver. */
|
|
214
225
|
export declare function resolveCliModel(options: {
|
|
215
226
|
cliProvider?: string;
|
|
216
227
|
cliModel?: string;
|
|
@@ -247,4 +258,3 @@ export declare function restoreModelFromSession(savedProvider: string, savedMode
|
|
|
247
258
|
model: Model<Api> | undefined;
|
|
248
259
|
fallbackMessage: string | undefined;
|
|
249
260
|
}>;
|
|
250
|
-
export {};
|
|
@@ -62,6 +62,16 @@ export declare const OpenAICompatSchema: z.ZodObject<{
|
|
|
62
62
|
none: "none";
|
|
63
63
|
}>>;
|
|
64
64
|
}, z.core.$strip>;
|
|
65
|
+
export declare const GJC_MODEL_EFFORT_IDS: readonly ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
66
|
+
export declare const GJC_MODEL_ASSIGNMENT_TARGET_IDS: readonly ["default", "executor", "architect", "planner", "critic"];
|
|
67
|
+
export declare const EffortSchema: z.ZodEnum<{
|
|
68
|
+
high: "high";
|
|
69
|
+
low: "low";
|
|
70
|
+
max: "max";
|
|
71
|
+
medium: "medium";
|
|
72
|
+
minimal: "minimal";
|
|
73
|
+
xhigh: "xhigh";
|
|
74
|
+
}>;
|
|
65
75
|
export declare const ModelBindingsSchema: z.ZodObject<{
|
|
66
76
|
modelRoles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
67
77
|
agentModelOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
@@ -73,6 +83,7 @@ export declare const ProfileRoleSchema: z.ZodEnum<{
|
|
|
73
83
|
executor: "executor";
|
|
74
84
|
planner: "planner";
|
|
75
85
|
}>;
|
|
86
|
+
export declare const ProfileModelSelectorPattern: string;
|
|
76
87
|
export declare const ProfileModelSelectorSchema: z.ZodString;
|
|
77
88
|
export declare const ProfileModelMappingSchema: z.ZodRecord<z.ZodEnum<{
|
|
78
89
|
architect: "architect";
|
|
@@ -128,6 +128,11 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
128
128
|
readonly type: "string";
|
|
129
129
|
readonly default: undefined;
|
|
130
130
|
};
|
|
131
|
+
readonly "session.directoryMigration": {
|
|
132
|
+
readonly type: "enum";
|
|
133
|
+
readonly values: readonly ["copy-retain", "disabled"];
|
|
134
|
+
readonly default: "copy-retain";
|
|
135
|
+
};
|
|
131
136
|
readonly "notifications.enabled": {
|
|
132
137
|
readonly type: "boolean";
|
|
133
138
|
readonly default: false;
|
|
@@ -135,6 +140,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
135
140
|
readonly "notifications.telegram.botToken": {
|
|
136
141
|
readonly type: "string";
|
|
137
142
|
readonly default: undefined;
|
|
143
|
+
readonly validate: (value: unknown) => value is string;
|
|
138
144
|
};
|
|
139
145
|
readonly "notifications.telegram.chatId": {
|
|
140
146
|
readonly type: "string";
|
|
@@ -144,6 +150,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
144
150
|
readonly type: "record";
|
|
145
151
|
readonly default: Record<string, unknown>;
|
|
146
152
|
};
|
|
153
|
+
readonly "notifications.telegram.btw.enabled": {
|
|
154
|
+
readonly type: "boolean";
|
|
155
|
+
readonly default: true;
|
|
156
|
+
};
|
|
147
157
|
readonly "notifications.telegram.rich.enabled": {
|
|
148
158
|
readonly type: "boolean";
|
|
149
159
|
readonly default: true;
|
|
@@ -641,6 +651,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
641
651
|
}];
|
|
642
652
|
};
|
|
643
653
|
};
|
|
654
|
+
readonly "tools.preAdmissionArtifactSpill": {
|
|
655
|
+
readonly type: "boolean";
|
|
656
|
+
readonly default: false;
|
|
657
|
+
readonly ui: {
|
|
658
|
+
readonly tab: "tools";
|
|
659
|
+
readonly label: "Pre-admission artifact spill";
|
|
660
|
+
readonly description: "Experimental opt-in: save oversized tool results before provider context construction, retaining a UTF-8-safe head, tail, digest, and artifact receipt inline";
|
|
661
|
+
};
|
|
662
|
+
};
|
|
644
663
|
readonly "tools.readArtifactSpillThreshold": {
|
|
645
664
|
readonly type: "number";
|
|
646
665
|
readonly default: 0;
|
|
@@ -1369,7 +1388,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1369
1388
|
readonly ui: {
|
|
1370
1389
|
readonly tab: "model";
|
|
1371
1390
|
readonly label: "Max Retry Delay";
|
|
1372
|
-
readonly description: "Maximum wait between retries, in ms.
|
|
1391
|
+
readonly description: "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.";
|
|
1373
1392
|
};
|
|
1374
1393
|
};
|
|
1375
1394
|
readonly "retry.requestMaxRetries": {
|
|
@@ -1413,6 +1432,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1413
1432
|
}];
|
|
1414
1433
|
};
|
|
1415
1434
|
};
|
|
1435
|
+
readonly "mouse.enabled": {
|
|
1436
|
+
readonly type: "boolean";
|
|
1437
|
+
readonly default: false;
|
|
1438
|
+
readonly ui: {
|
|
1439
|
+
readonly tab: "interaction";
|
|
1440
|
+
readonly label: "Mouse Support";
|
|
1441
|
+
readonly description: "Enable SGR mouse wheel scrolling and overlay row selection. Disabled in tmux and screen.";
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1416
1444
|
readonly steeringMode: {
|
|
1417
1445
|
readonly type: "enum";
|
|
1418
1446
|
readonly values: readonly ["all", "one-at-a-time"];
|
|
@@ -3171,6 +3199,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3171
3199
|
readonly type: "number";
|
|
3172
3200
|
readonly default: 500;
|
|
3173
3201
|
};
|
|
3202
|
+
readonly "tasksPane.defaultVisible": {
|
|
3203
|
+
readonly type: "boolean";
|
|
3204
|
+
readonly default: false;
|
|
3205
|
+
readonly ui: {
|
|
3206
|
+
readonly tab: "tasks";
|
|
3207
|
+
readonly label: "Tasks Pane Visible By Default";
|
|
3208
|
+
readonly description: "Open the unified tasks pane when the interactive UI starts";
|
|
3209
|
+
};
|
|
3210
|
+
};
|
|
3174
3211
|
readonly "plan.enabled": {
|
|
3175
3212
|
readonly type: "boolean";
|
|
3176
3213
|
readonly default: true;
|
|
@@ -3891,6 +3928,21 @@ export declare function getPathsForTab(tab: SettingTab): SettingPath[];
|
|
|
3891
3928
|
export declare function getType(path: SettingPath): SettingDef["type"];
|
|
3892
3929
|
/** Get enum values for an enum setting */
|
|
3893
3930
|
export declare function getEnumValues(path: SettingPath): readonly string[] | undefined;
|
|
3931
|
+
export declare const CONFIG_SCHEMA_VERSION = 1;
|
|
3932
|
+
export type SettingsSchemaIssue = {
|
|
3933
|
+
path: string;
|
|
3934
|
+
kind: "unknown" | "invalid" | "coerced" | "pending-migration";
|
|
3935
|
+
detail: string;
|
|
3936
|
+
};
|
|
3937
|
+
export type SettingsSchemaReport = {
|
|
3938
|
+
issues: SettingsSchemaIssue[];
|
|
3939
|
+
valid: boolean;
|
|
3940
|
+
};
|
|
3941
|
+
/** Coerce supported scalar legacy values and report unknown or invalid settings without dropping them. */
|
|
3942
|
+
export declare function reconcileSettingsSchema(raw: Record<string, unknown>): {
|
|
3943
|
+
settings: Record<string, unknown>;
|
|
3944
|
+
report: SettingsSchemaReport;
|
|
3945
|
+
};
|
|
3894
3946
|
/** Status line preset - derived from schema */
|
|
3895
3947
|
export type StatusLinePreset = SettingValue<"statusLine.preset">;
|
|
3896
3948
|
/** Status line separator style - derived from schema */
|
|
@@ -4018,6 +4070,9 @@ export interface NotificationsSettings {
|
|
|
4018
4070
|
telegram: {
|
|
4019
4071
|
botToken: string | undefined;
|
|
4020
4072
|
chatId: string | undefined;
|
|
4073
|
+
btw: {
|
|
4074
|
+
enabled: boolean;
|
|
4075
|
+
};
|
|
4021
4076
|
rich: {
|
|
4022
4077
|
enabled: boolean;
|
|
4023
4078
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { procmgr } from "@gajae-code/utils";
|
|
2
2
|
import type { ModelRole } from "../config/model-registry";
|
|
3
|
-
import type
|
|
3
|
+
import { type NotificationSettingsReader, type NotificationSettingsSnapshot } from "../sdk/bus/config";
|
|
4
4
|
import { AgentStorage } from "../session/agent-storage";
|
|
5
5
|
import { type EditMode } from "../utils/edit-mode";
|
|
6
6
|
import { type CasReceipt } from "./atomic-yaml-patch";
|
|
7
7
|
import { type ModelSelectorValue } from "./model-selector-value";
|
|
8
|
-
import { type BashInterceptorRule, type GroupPrefix, type GroupTypeMap, type SettingPath, type SettingValue } from "./settings-schema";
|
|
8
|
+
import { type BashInterceptorRule, type GroupPrefix, type GroupTypeMap, type SettingPath, type SettingsSchemaReport, type SettingValue } from "./settings-schema";
|
|
9
9
|
export type * from "./settings-schema";
|
|
10
10
|
export * from "./settings-schema";
|
|
11
11
|
/** Raw settings object as stored in YAML */
|
|
@@ -21,13 +21,6 @@ export type SettingsAtomicPatch = {
|
|
|
21
21
|
op: "unset";
|
|
22
22
|
};
|
|
23
23
|
export type SettingsAtomicReceipt = CasReceipt;
|
|
24
|
-
export interface GlobalDefaultModelRoleCommit {
|
|
25
|
-
readonly previousDefault: ModelSelectorValue | undefined;
|
|
26
|
-
readonly previousModelRolesExisted: boolean;
|
|
27
|
-
readonly committedDefault: ModelSelectorValue | undefined;
|
|
28
|
-
readonly committedConfigVersion?: string;
|
|
29
|
-
readonly defaultRevision: number;
|
|
30
|
-
}
|
|
31
24
|
export interface SettingsOptions {
|
|
32
25
|
/** Current working directory for project settings discovery */
|
|
33
26
|
cwd?: string;
|
|
@@ -56,6 +49,14 @@ export declare class Settings implements NotificationSettingsReader {
|
|
|
56
49
|
* Call once at startup before accessing `settings`.
|
|
57
50
|
*/
|
|
58
51
|
static init(options?: SettingsOptions): Promise<Settings>;
|
|
52
|
+
/**
|
|
53
|
+
* Load settings for an explicit workspace without changing the global singleton.
|
|
54
|
+
* Managed-session policy resolution must be bound to the workspace being opened.
|
|
55
|
+
*/
|
|
56
|
+
static loadForScope(options: {
|
|
57
|
+
cwd: string;
|
|
58
|
+
agentDir?: string;
|
|
59
|
+
}): Promise<Settings>;
|
|
59
60
|
/**
|
|
60
61
|
* Create an isolated instance for testing with explicit user/global settings.
|
|
61
62
|
* Does not affect the global singleton.
|
|
@@ -86,6 +87,8 @@ export declare class Settings implements NotificationSettingsReader {
|
|
|
86
87
|
getNotificationSettingsSnapshot(): NotificationSettingsSnapshot;
|
|
87
88
|
/** Check whether a setting is present in loaded settings/overrides rather than coming from schema defaults. */
|
|
88
89
|
has(path: SettingPath): boolean;
|
|
90
|
+
/** Diagnostics from schema reconciliation during the most recent load. */
|
|
91
|
+
getSchemaReport(): SettingsSchemaReport;
|
|
89
92
|
/**
|
|
90
93
|
* Set a setting value (sync).
|
|
91
94
|
* Updates global settings and reserves its background persistence slot before
|
|
@@ -143,8 +146,8 @@ export declare class Settings implements NotificationSettingsReader {
|
|
|
143
146
|
*/
|
|
144
147
|
setModelRole(role: ModelRole | string, modelId: ModelSelectorValue): void;
|
|
145
148
|
setGlobalModelRole(role: ModelRole | string, modelId: ModelSelectorValue | undefined): void;
|
|
146
|
-
setGlobalModelRoleAndFlush(role: ModelRole | string, modelId: ModelSelectorValue | undefined): Promise<
|
|
147
|
-
restoreGlobalDefaultModelRoleIfCurrent(commit:
|
|
149
|
+
setGlobalModelRoleAndFlush(role: ModelRole | string, modelId: ModelSelectorValue | undefined): Promise<CasReceipt>;
|
|
150
|
+
restoreGlobalDefaultModelRoleIfCurrent(commit: CasReceipt): Promise<boolean>;
|
|
148
151
|
/**
|
|
149
152
|
* Set an agent model override while keeping any live runtime override aligned.
|
|
150
153
|
*
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
1
2
|
export type CoordinatorMutationClass = "sessions" | "questions" | "reports";
|
|
2
3
|
export interface CoordinatorNamespace {
|
|
3
4
|
profile: string | null;
|
|
4
5
|
repo: string | null;
|
|
6
|
+
identity: string;
|
|
5
7
|
}
|
|
8
|
+
export declare function coordinatorNamespaceIdentity(env?: NodeJS.ProcessEnv): string;
|
|
6
9
|
export interface CoordinatorMcpConfig {
|
|
7
10
|
allowedRoots: string[];
|
|
8
11
|
mutationClasses: Set<CoordinatorMutationClass>;
|
|
@@ -25,3 +28,5 @@ export declare function assertCoordinatorArtifactPath(config: CoordinatorMcpConf
|
|
|
25
28
|
}>;
|
|
26
29
|
export declare function requireCoordinatorMutation(config: CoordinatorMcpConfig, mutationClass: CoordinatorMutationClass, request: CoordinatorMutationRequest): void;
|
|
27
30
|
export declare function coordinatorNamespacePath(config: CoordinatorMcpConfig): string;
|
|
31
|
+
/** Opens and authorizes an artifact by the opened handle identity, not a racy pathname. */
|
|
32
|
+
export declare function safeOpenCoordinatorArtifact(config: CoordinatorMcpConfig, artifactPath: unknown): Promise<fs.FileHandle>;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { WorkflowGate } from "../modes/shared/agent-wire/workflow-gate-types";
|
|
2
|
+
export type PublicReason = "unsupported_gate" | "query_unavailable" | "pagination_malformed" | "row_unrepresentable" | "missing_runtime_turn" | "invalid_runtime_turn" | "invalid_gate_row" | "wrong_session" | "ownership_unavailable" | "ownership_conflict" | "gate_provenance_changed" | "turn_terminal" | "endpoint_changed" | "terminal_race" | "terminal_uncertain" | "session_closing" | "session_unavailable" | "reported_failure" | "validation_rejected";
|
|
3
|
+
export type CoordinatorQuestionStatusV1 = "pending" | "answered" | "stale" | "uncertain";
|
|
4
|
+
export interface CoordinatorQuestionOptionPublicV1 {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
recommended: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface CoordinatorQuestionPublicV1 extends Record<string, unknown> {
|
|
10
|
+
schema_version: 1;
|
|
11
|
+
question_id: string;
|
|
12
|
+
session_id: string;
|
|
13
|
+
turn_id: string;
|
|
14
|
+
status: CoordinatorQuestionStatusV1;
|
|
15
|
+
stage: string;
|
|
16
|
+
kind: string;
|
|
17
|
+
prompt: string;
|
|
18
|
+
multi: boolean;
|
|
19
|
+
allow_empty: boolean;
|
|
20
|
+
options: CoordinatorQuestionOptionPublicV1[];
|
|
21
|
+
other_allowed: boolean;
|
|
22
|
+
clarification_allowed: boolean;
|
|
23
|
+
created_at: string;
|
|
24
|
+
updated_at: string;
|
|
25
|
+
answered_at: string | null;
|
|
26
|
+
reason: PublicReason | null;
|
|
27
|
+
answer_binding?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CoordinatorQuestionDiagnosticPublicV1 {
|
|
30
|
+
schema_version: 1;
|
|
31
|
+
session_id: string;
|
|
32
|
+
turn_id: string | null;
|
|
33
|
+
gate_id: string | null;
|
|
34
|
+
reason: PublicReason;
|
|
35
|
+
observed_at: string;
|
|
36
|
+
}
|
|
37
|
+
export interface CoordinatorQuestionReconciliationPublicV1 {
|
|
38
|
+
attempted: boolean;
|
|
39
|
+
complete: boolean;
|
|
40
|
+
revision: string | null;
|
|
41
|
+
observed_at: string;
|
|
42
|
+
reason: PublicReason | null;
|
|
43
|
+
}
|
|
44
|
+
export interface ListQuestionsSuccessV1 extends Record<string, unknown> {
|
|
45
|
+
ok: true;
|
|
46
|
+
schema_version: 1;
|
|
47
|
+
questions: CoordinatorQuestionPublicV1[];
|
|
48
|
+
diagnostics: CoordinatorQuestionDiagnosticPublicV1[];
|
|
49
|
+
reconciliation: CoordinatorQuestionReconciliationPublicV1;
|
|
50
|
+
}
|
|
51
|
+
export type CoordinatorAskAnswerV1 = {
|
|
52
|
+
selected: string[];
|
|
53
|
+
other?: false;
|
|
54
|
+
} | {
|
|
55
|
+
selected: string[];
|
|
56
|
+
other: true;
|
|
57
|
+
custom: string;
|
|
58
|
+
} | {
|
|
59
|
+
action: "clarify";
|
|
60
|
+
question: string;
|
|
61
|
+
};
|
|
62
|
+
export interface SubmitQuestionAnswerInputV1 {
|
|
63
|
+
session_id: string;
|
|
64
|
+
turn_id: string;
|
|
65
|
+
question_id: string;
|
|
66
|
+
answer_binding: string;
|
|
67
|
+
answer: CoordinatorAskAnswerV1;
|
|
68
|
+
idempotency_key: string;
|
|
69
|
+
allow_mutation: true;
|
|
70
|
+
}
|
|
71
|
+
export type SubmitQuestionAnswerSuccessV1 = {
|
|
72
|
+
ok: true;
|
|
73
|
+
schema_version: 1;
|
|
74
|
+
session_id: string;
|
|
75
|
+
turn_id: string;
|
|
76
|
+
question_id: string;
|
|
77
|
+
operation: "workflow.gate_answer";
|
|
78
|
+
status: "accepted";
|
|
79
|
+
replayed: boolean;
|
|
80
|
+
resolved_at: string;
|
|
81
|
+
};
|
|
82
|
+
export type SubmitQuestionAnswerValidationRejectedV1 = {
|
|
83
|
+
ok: false;
|
|
84
|
+
schema_version: 1;
|
|
85
|
+
session_id: string;
|
|
86
|
+
turn_id: string;
|
|
87
|
+
question_id: string;
|
|
88
|
+
error: {
|
|
89
|
+
code: "validation_rejected";
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
question_status: "pending";
|
|
93
|
+
};
|
|
94
|
+
export type SubmitQuestionAnswerFailureV1 = {
|
|
95
|
+
ok: false;
|
|
96
|
+
error: {
|
|
97
|
+
code: "not_found" | "resource_gone" | "ownership_mismatch" | "terminal_uncertain" | "idempotency_conflict";
|
|
98
|
+
message: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export interface PrivateAskGateCodecV1 {
|
|
102
|
+
schema_version: 1;
|
|
103
|
+
labels: string[];
|
|
104
|
+
recommended_index: number | null;
|
|
105
|
+
multi: boolean;
|
|
106
|
+
allow_empty: boolean;
|
|
107
|
+
other_allowed: true;
|
|
108
|
+
clarification_allowed: true;
|
|
109
|
+
}
|
|
110
|
+
export declare function decodeAskGateV1(gate: WorkflowGate): PrivateAskGateCodecV1 | null;
|
|
111
|
+
export declare function projectAskGateQuestion(input: {
|
|
112
|
+
question_id: string;
|
|
113
|
+
session_id: string;
|
|
114
|
+
turn_id: string;
|
|
115
|
+
status: CoordinatorQuestionStatusV1;
|
|
116
|
+
stage: string;
|
|
117
|
+
kind: string;
|
|
118
|
+
prompt: string;
|
|
119
|
+
codec: PrivateAskGateCodecV1;
|
|
120
|
+
created_at: string;
|
|
121
|
+
updated_at: string;
|
|
122
|
+
answered_at: string | null;
|
|
123
|
+
reason: PublicReason | null;
|
|
124
|
+
answer_binding?: string;
|
|
125
|
+
}): CoordinatorQuestionPublicV1;
|
|
126
|
+
export declare function validateCoordinatorAskAnswer(codec: PrivateAskGateCodecV1, answer: unknown): CoordinatorAskAnswerV1 | null;
|
|
127
|
+
export declare function translateCoordinatorAskAnswer(codec: PrivateAskGateCodecV1, answer: CoordinatorAskAnswerV1): unknown;
|
|
128
|
+
export declare function createAnswerBinding(): string;
|
|
129
|
+
export declare function answerBindingMatches(binding: string, expected: string): boolean;
|