@gajae-code/coding-agent 0.11.0 → 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 +63 -1
- package/dist/types/async/job-manager.d.ts +46 -7
- 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-receipt-freshness.d.ts +11 -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/command-controller.d.ts +2 -2
- package/dist/types/modes/controllers/extension-ui-controller.d.ts +1 -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 +21 -19
- 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 +21 -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 +22 -15
- 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/ensure.d.ts +9 -0
- 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/discord-daemon.d.ts +5 -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 +69 -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/tools/subagent-render.d.ts +1 -0
- package/dist/types/tools/subagent.d.ts +6 -1
- 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 +39 -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 +455 -69
- 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 +83 -12
- package/src/gjc-runtime/ultragoal-pipeline.ts +306 -0
- package/src/gjc-runtime/ultragoal-receipt-freshness.ts +102 -1
- package/src/gjc-runtime/ultragoal-runtime.ts +156 -1319
- 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/command-controller.ts +9 -15
- package/src/modes/controllers/event-controller.ts +3 -2
- package/src/modes/controllers/extension-ui-controller.ts +72 -25
- 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 +302 -1151
- 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 +78 -19
- 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 +47 -20
- 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 +21 -2
- package/src/sdk/broker/ensure.ts +85 -25
- 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 +14 -4
- 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/discord-daemon.ts +25 -8
- package/src/sdk/bus/html-format.ts +20 -3
- package/src/sdk/bus/index.ts +834 -113
- package/src/sdk/bus/lifecycle-control-runtime.ts +91 -33
- package/src/sdk/bus/native-runtime-compatibility.ts +1 -1
- 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 +1491 -247
- 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 +1901 -637
- 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 +62 -37
- 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/tools/subagent-render.ts +19 -8
- package/src/tools/subagent.ts +84 -32
- 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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Container } from "@gajae-code/tui";
|
|
2
|
+
export interface CommandPaletteAction {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
handler: () => void | Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export interface CommandPaletteEntry {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
category?: string;
|
|
12
|
+
keybinding?: string;
|
|
13
|
+
bindingHint?: string;
|
|
14
|
+
searchText?: string;
|
|
15
|
+
handler?: () => void | Promise<void>;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class CommandPaletteComponent extends Container {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(entries: CommandPaletteEntry[], onSelect: (entry: CommandPaletteEntry) => void, onCancel: () => void);
|
|
21
|
+
render(width: number): string[];
|
|
22
|
+
handleInput(data: string): void;
|
|
23
|
+
getEntries(): readonly CommandPaletteEntry[];
|
|
24
|
+
}
|
|
25
|
+
/** Backward-compatible name retained for extensions and existing call sites. */
|
|
26
|
+
export declare class CommandPalette extends CommandPaletteComponent {
|
|
27
|
+
}
|
|
@@ -7,4 +7,5 @@ export declare class CustomProviderWizardComponent extends Container {
|
|
|
7
7
|
constructor(onSubmit: (input: CustomProviderWizardSubmit) => void, onCancel: () => void, onRender?: () => void);
|
|
8
8
|
setSubmitError(error: string): void;
|
|
9
9
|
handleInput(keyData: string): void;
|
|
10
|
+
complete(): void;
|
|
10
11
|
}
|
|
@@ -2,6 +2,7 @@ export * from "./assistant-message";
|
|
|
2
2
|
export * from "./bash-execution";
|
|
3
3
|
export * from "./bordered-loader";
|
|
4
4
|
export * from "./branch-summary-message";
|
|
5
|
+
export * from "./chrome";
|
|
5
6
|
export * from "./compaction-summary-message";
|
|
6
7
|
export * from "./countdown-timer";
|
|
7
8
|
export * from "./custom-editor";
|
|
@@ -22,11 +23,11 @@ export * from "./read-tool-group";
|
|
|
22
23
|
export * from "./session-selector";
|
|
23
24
|
export * from "./settings-selector";
|
|
24
25
|
export * from "./show-images-selector";
|
|
25
|
-
export * from "./status-line";
|
|
26
26
|
export * from "./theme-selector";
|
|
27
27
|
export * from "./thinking-selector";
|
|
28
28
|
export * from "./todo-reminder";
|
|
29
29
|
export * from "./tool-execution";
|
|
30
|
+
export * from "./tool-status-header";
|
|
30
31
|
export * from "./tree-selector";
|
|
31
32
|
export * from "./ttsr-notification";
|
|
32
33
|
export * from "./user-message";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Container, type KeyId, type MouseEvent } from "@gajae-code/tui";
|
|
2
|
+
export declare const PLAN_REVIEW_ACTIONS: readonly ["Approve and execute", "Approve and compact context", "Approve and keep context", "Refine plan"];
|
|
3
|
+
export type PlanReviewAction = (typeof PLAN_REVIEW_ACTIONS)[number];
|
|
4
|
+
export type PlanPreviewFocus = "preview" | "sourceSelect" | "commentInput" | "actionBar";
|
|
5
|
+
export interface PlanPreviewOptions {
|
|
6
|
+
externalEditorKey?: string;
|
|
7
|
+
externalEditorKeys?: readonly KeyId[];
|
|
8
|
+
onExternalEditor?: () => Promise<string | null>;
|
|
9
|
+
}
|
|
10
|
+
export interface PlanComment {
|
|
11
|
+
id: string;
|
|
12
|
+
startLine: number;
|
|
13
|
+
endLine: number;
|
|
14
|
+
text: string;
|
|
15
|
+
snapshotHash: string;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
}
|
|
18
|
+
export interface PlanPreviewResult {
|
|
19
|
+
action?: PlanReviewAction;
|
|
20
|
+
comments: PlanComment[];
|
|
21
|
+
notes: string;
|
|
22
|
+
snapshotHash: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function planSnapshotHash(content: string): string;
|
|
25
|
+
export declare function serializePlanReviewComments(content: string, hash: string, comments: readonly PlanComment[], notes?: string): string;
|
|
26
|
+
/** Modal pre-decision review. Its result is consumed by InteractiveMode, which owns audit and dispatch semantics. */
|
|
27
|
+
export declare class PlanPreviewOverlay extends Container {
|
|
28
|
+
#private;
|
|
29
|
+
private readonly done;
|
|
30
|
+
private readonly requestRender;
|
|
31
|
+
private readonly options;
|
|
32
|
+
content: string | null;
|
|
33
|
+
snapshotHash: string;
|
|
34
|
+
lines: string[];
|
|
35
|
+
constructor(content: string | null, done: (result: PlanPreviewResult) => void, requestRender: () => void, options?: PlanPreviewOptions);
|
|
36
|
+
get focusState(): PlanPreviewFocus;
|
|
37
|
+
get comments(): readonly PlanComment[];
|
|
38
|
+
get pageOffset(): number;
|
|
39
|
+
get sourceLine(): number;
|
|
40
|
+
render(width: number): string[];
|
|
41
|
+
handleMouse(event: MouseEvent): void;
|
|
42
|
+
handleInput(key: string): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Container } from "@gajae-code/tui";
|
|
2
|
+
import type { QueuedMessageEditEntry } from "../../session/agent-session";
|
|
3
|
+
export declare class QueuePaneComponent extends Container {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(entries: QueuedMessageEditEntry[], options: {
|
|
6
|
+
selectedIndex?: number;
|
|
7
|
+
onDelete: (entry: QueuedMessageEditEntry, index: number) => void;
|
|
8
|
+
onMove: (entry: QueuedMessageEditEntry, index: number, direction: "up" | "down") => void;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
});
|
|
11
|
+
handleInput(keyData: string): void;
|
|
12
|
+
}
|
|
@@ -24,7 +24,13 @@ export declare class ReadToolGroupComponent extends Container implements ToolExe
|
|
|
24
24
|
isError?: boolean;
|
|
25
25
|
}, isPartial?: boolean, toolCallId?: string): void;
|
|
26
26
|
setArgsComplete(_toolCallId?: string): void;
|
|
27
|
+
/** Applies automatic expansion unless this renderer instance has an explicit fold choice. */
|
|
27
28
|
setExpanded(expanded: boolean): void;
|
|
29
|
+
/**
|
|
30
|
+
* Applies and pins an explicit fold choice for this renderer instance only.
|
|
31
|
+
* Transcript rebuilds recreate components from global state and drop this pin.
|
|
32
|
+
*/
|
|
33
|
+
setManuallyExpanded(expanded: boolean): void;
|
|
28
34
|
getComponent(): Component;
|
|
29
35
|
}
|
|
30
36
|
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Container } from "@gajae-code/tui";
|
|
2
1
|
import type { KeyId } from "../../config/keybindings";
|
|
3
2
|
import type { SessionObserverRegistry } from "../session-observer-registry";
|
|
4
|
-
|
|
3
|
+
import { TranscriptViewerOverlay } from "./transcript-viewer-overlay";
|
|
4
|
+
/** Session-observer adapter. The shared viewer owns navigation and fold state. */
|
|
5
|
+
export declare class SessionObserverOverlayComponent extends TranscriptViewerOverlay {
|
|
5
6
|
#private;
|
|
6
7
|
constructor(registry: SessionObserverRegistry, onDone: () => void, observeKeys: KeyId[]);
|
|
7
|
-
render(width: number): string[];
|
|
8
|
-
/** Rebuild content from live registry data */
|
|
9
8
|
refreshFromRegistry(): void;
|
|
10
9
|
handleInput(keyData: string): void;
|
|
11
10
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Container } from "@gajae-code/tui";
|
|
2
|
+
import type { SessionInfo } from "../../session/session-manager";
|
|
3
|
+
export type SessionLiveness = "active" | "stale" | "unknown";
|
|
4
|
+
export interface DashboardSession {
|
|
5
|
+
id: string;
|
|
6
|
+
cwd: string;
|
|
7
|
+
title: string;
|
|
8
|
+
modified: Date;
|
|
9
|
+
messageCount: number;
|
|
10
|
+
messageCountIsEstimate?: boolean;
|
|
11
|
+
liveness: SessionLiveness;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reads the opt-in presence sidecar beside a session transcript. A missing or
|
|
15
|
+
* malformed sidecar deliberately means unknown: transcript modification time is
|
|
16
|
+
* not a process-liveness signal.
|
|
17
|
+
*/
|
|
18
|
+
export declare function sessionLivenessFromPresence(sessionPath: string, readFile?: (filePath: string) => string, now?: number): SessionLiveness;
|
|
19
|
+
export declare function dashboardSessions(sessions: readonly SessionInfo[], options?: {
|
|
20
|
+
readFile?: (filePath: string) => string;
|
|
21
|
+
now?: number;
|
|
22
|
+
}): DashboardSession[];
|
|
23
|
+
/** Read-only top-level inventory. This component never opens, resumes, or mutates a session. */
|
|
24
|
+
export declare class SessionsDashboardComponent extends Container {
|
|
25
|
+
#private;
|
|
26
|
+
private readonly sessions;
|
|
27
|
+
private readonly onClose;
|
|
28
|
+
private readonly requestRender?;
|
|
29
|
+
constructor(sessions: readonly DashboardSession[], onClose: () => void, requestRender?: (() => void) | undefined);
|
|
30
|
+
render(width: number): string[];
|
|
31
|
+
handleInput(keyData: string): void;
|
|
32
|
+
}
|
|
@@ -4,7 +4,7 @@ import { type Component, Container } from "@gajae-code/tui";
|
|
|
4
4
|
import { type SettingPath } from "../../config/settings";
|
|
5
5
|
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
|
|
6
6
|
import { type NotificationsEditorOperations } from "./notifications-settings-editor";
|
|
7
|
-
import type { StatusLineSegmentOptions } from "./status-
|
|
7
|
+
import type { StatusLineSegmentOptions } from "./tool-status-header";
|
|
8
8
|
/**
|
|
9
9
|
* Dynamic context for settings that need runtime data.
|
|
10
10
|
* Some settings (like thinking level) are managed by the session, not Settings.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../../config/settings-schema";
|
|
2
2
|
import type { AgentSession } from "../../../session/agent-session";
|
|
3
3
|
import type { JobsSnapshot } from "../../jobs-observer";
|
|
4
|
-
import type { StatusLineSegmentOptions, StatusLineSettings } from "../status-
|
|
4
|
+
import type { StatusLineSegmentOptions, StatusLineSettings } from "../tool-status-header";
|
|
5
5
|
export type { StatusLinePreset, StatusLineSegmentId, StatusLineSegmentOptions, StatusLineSeparatorStyle, StatusLineSettings, };
|
|
6
6
|
export type RGB = readonly [number, number, number];
|
|
7
7
|
export interface SegmentContext {
|
|
@@ -1,94 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
|
|
3
|
-
import type { AgentSession } from "../../session/agent-session";
|
|
4
|
-
import { type SkillActiveEntry } from "../../skill-state/active-state";
|
|
5
|
-
import { type JobsSnapshot } from "../jobs-observer";
|
|
6
|
-
export interface StatusLineSegmentOptions {
|
|
7
|
-
model?: {
|
|
8
|
-
showThinkingLevel?: boolean;
|
|
9
|
-
showContextPercent?: boolean;
|
|
10
|
-
};
|
|
11
|
-
path?: {
|
|
12
|
-
abbreviate?: boolean;
|
|
13
|
-
maxLength?: number;
|
|
14
|
-
stripWorkPrefix?: boolean;
|
|
15
|
-
};
|
|
16
|
-
git?: {
|
|
17
|
-
showBranch?: boolean;
|
|
18
|
-
showStaged?: boolean;
|
|
19
|
-
showUnstaged?: boolean;
|
|
20
|
-
showUntracked?: boolean;
|
|
21
|
-
};
|
|
22
|
-
time?: {
|
|
23
|
-
format?: "12h" | "24h";
|
|
24
|
-
showSeconds?: boolean;
|
|
25
|
-
};
|
|
26
|
-
usage?: {
|
|
27
|
-
mode?: "used" | "remaining";
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export interface StatusLineSettings {
|
|
31
|
-
preset?: StatusLinePreset;
|
|
32
|
-
leftSegments?: StatusLineSegmentId[];
|
|
33
|
-
rightSegments?: StatusLineSegmentId[];
|
|
34
|
-
separator?: StatusLineSeparatorStyle;
|
|
35
|
-
segmentOptions?: StatusLineSegmentOptions;
|
|
36
|
-
previewHighlightSegment?: StatusLineSegmentId;
|
|
37
|
-
showHookStatus?: boolean;
|
|
38
|
-
showSkillHud?: boolean;
|
|
39
|
-
sessionAccent?: boolean;
|
|
40
|
-
maxRows?: number;
|
|
41
|
-
}
|
|
42
|
-
export interface StatusLineComponentOptions {
|
|
43
|
-
version?: string;
|
|
44
|
-
}
|
|
45
|
-
export declare class StatusLineComponent implements Component {
|
|
46
|
-
#private;
|
|
47
|
-
private readonly session;
|
|
48
|
-
constructor(session: AgentSession, options?: StatusLineComponentOptions);
|
|
49
|
-
updateSettings(settings: StatusLineSettings): void;
|
|
50
|
-
setAutoCompactEnabled(enabled: boolean): void;
|
|
51
|
-
setSubagentCount(count: number): void;
|
|
52
|
-
setJobs(jobs: JobsSnapshot): void;
|
|
53
|
-
setSessionStartTime(time: number): void;
|
|
54
|
-
setPlanModeStatus(status: {
|
|
55
|
-
enabled: boolean;
|
|
56
|
-
paused: boolean;
|
|
57
|
-
} | undefined): void;
|
|
58
|
-
setGoalModeStatus(status: {
|
|
59
|
-
enabled: boolean;
|
|
60
|
-
paused: boolean;
|
|
61
|
-
} | undefined): void;
|
|
62
|
-
setSkillHudEntriesForTest(entries: SkillActiveEntry[]): void;
|
|
63
|
-
setHookStatus(key: string, text: string | undefined): void;
|
|
64
|
-
watchBranch(onBranchChange: () => void): void;
|
|
65
|
-
dispose(): void;
|
|
66
|
-
invalidate(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Background-refresh the OAuth quota report. Guarded by a 5-min TTL on both
|
|
69
|
-
* success (cache lifetime) and error (backoff). Exposed (non-private) so
|
|
70
|
-
* unit tests can verify the backoff invariant.
|
|
71
|
-
*/
|
|
72
|
-
refreshUsageInBackground(): void;
|
|
73
|
-
getTopBorder(width: number): {
|
|
74
|
-
content: string;
|
|
75
|
-
width: number;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Multi-row-aware content for the settings preview: the wrapped rows joined
|
|
79
|
-
* with newlines so a single `Text` renders them stacked. Honors the current
|
|
80
|
-
* `maxRows`; identical to the single status line when `maxRows` is 1 or when
|
|
81
|
-
* everything fits on one row.
|
|
82
|
-
*/
|
|
83
|
-
getPreviewContent(width: number): string;
|
|
84
|
-
getCacheStatsForTest(): {
|
|
85
|
-
rowHits: number;
|
|
86
|
-
rowMisses: number;
|
|
87
|
-
};
|
|
88
|
-
invalidateBranchForTest(): void;
|
|
89
|
-
setCachedPrForTest(pr: {
|
|
90
|
-
number: number;
|
|
91
|
-
url: string;
|
|
92
|
-
} | null): void;
|
|
93
|
-
render(width: number): string[];
|
|
94
|
-
}
|
|
1
|
+
export * from "./tool-status-header";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Container, type SelectItem, SelectList } from "@gajae-code/tui";
|
|
2
|
+
import type { TaskRow, TasksAggregator } from "../tasks-aggregator";
|
|
3
|
+
export interface TasksPaneCallbacks {
|
|
4
|
+
close(): void;
|
|
5
|
+
requestRender(): void;
|
|
6
|
+
}
|
|
7
|
+
/** A compact, read-only unified task list. Source-specific controls remain in their owners. */
|
|
8
|
+
export declare class TasksPaneComponent extends Container {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(aggregator: TasksAggregator, callbacks: TasksPaneCallbacks);
|
|
11
|
+
getFocus(): SelectList;
|
|
12
|
+
handleInput(data: string): void;
|
|
13
|
+
refresh(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function taskItem(row: TaskRow): SelectItem;
|
|
@@ -20,6 +20,15 @@ export interface ToolExecutionHandle {
|
|
|
20
20
|
}, isPartial?: boolean, toolCallId?: string): void;
|
|
21
21
|
setArgsComplete(toolCallId?: string): void;
|
|
22
22
|
setExpanded(expanded: boolean): void;
|
|
23
|
+
/**
|
|
24
|
+
* Applies an explicit fold choice for this renderer instance. The pin lasts
|
|
25
|
+
* only for this instance; transcript rebuilds recreate it from global state.
|
|
26
|
+
* Optional for source compatibility: this interface is publicly exported and
|
|
27
|
+
* pre-existing structural implementers must keep compiling. Dispatchers must
|
|
28
|
+
* guard with `typeof handle.setManuallyExpanded === "function"` and fall
|
|
29
|
+
* back to {@link setExpanded}.
|
|
30
|
+
*/
|
|
31
|
+
setManuallyExpanded?(expanded: boolean): void;
|
|
23
32
|
}
|
|
24
33
|
/**
|
|
25
34
|
* Component that renders a tool call with its result (updateable)
|
|
@@ -48,7 +57,13 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
48
57
|
*/
|
|
49
58
|
stopAnimation(): void;
|
|
50
59
|
dispose(): void;
|
|
60
|
+
/** Applies automatic expansion unless this renderer instance has an explicit fold choice. */
|
|
51
61
|
setExpanded(expanded: boolean): void;
|
|
62
|
+
/**
|
|
63
|
+
* Applies and pins an explicit fold choice for this renderer instance only.
|
|
64
|
+
* Transcript rebuilds recreate components from global state and drop this pin.
|
|
65
|
+
*/
|
|
66
|
+
setManuallyExpanded(expanded: boolean): void;
|
|
52
67
|
setShowImages(show: boolean): void;
|
|
53
68
|
invalidate(): void;
|
|
54
69
|
render(width: number): string[];
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type Component } from "@gajae-code/tui";
|
|
2
|
+
import type { AppKeybinding, KeybindingsManager } from "../../config/keybindings";
|
|
3
|
+
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
|
|
4
|
+
import type { AgentSession } from "../../session/agent-session";
|
|
5
|
+
import { type SkillActiveEntry } from "../../skill-state/active-state";
|
|
6
|
+
import type { ActionRegistry, FocusDomain } from "../action-registry";
|
|
7
|
+
import { type JobsSnapshot } from "../jobs-observer";
|
|
8
|
+
export interface StatusLineSegmentOptions {
|
|
9
|
+
model?: {
|
|
10
|
+
showThinkingLevel?: boolean;
|
|
11
|
+
showContextPercent?: boolean;
|
|
12
|
+
};
|
|
13
|
+
path?: {
|
|
14
|
+
abbreviate?: boolean;
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
stripWorkPrefix?: boolean;
|
|
17
|
+
};
|
|
18
|
+
git?: {
|
|
19
|
+
showBranch?: boolean;
|
|
20
|
+
showStaged?: boolean;
|
|
21
|
+
showUnstaged?: boolean;
|
|
22
|
+
showUntracked?: boolean;
|
|
23
|
+
};
|
|
24
|
+
time?: {
|
|
25
|
+
format?: "12h" | "24h";
|
|
26
|
+
showSeconds?: boolean;
|
|
27
|
+
};
|
|
28
|
+
usage?: {
|
|
29
|
+
mode?: "used" | "remaining";
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface StatusLineSettings {
|
|
33
|
+
preset?: StatusLinePreset;
|
|
34
|
+
leftSegments?: StatusLineSegmentId[];
|
|
35
|
+
rightSegments?: StatusLineSegmentId[];
|
|
36
|
+
separator?: StatusLineSeparatorStyle;
|
|
37
|
+
segmentOptions?: StatusLineSegmentOptions;
|
|
38
|
+
previewHighlightSegment?: StatusLineSegmentId;
|
|
39
|
+
showHookStatus?: boolean;
|
|
40
|
+
showSkillHud?: boolean;
|
|
41
|
+
sessionAccent?: boolean;
|
|
42
|
+
maxRows?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface StatusLineComponentOptions {
|
|
45
|
+
version?: string;
|
|
46
|
+
actionRegistry?: ActionRegistry<void>;
|
|
47
|
+
getKeybindings?: () => KeybindingsManager;
|
|
48
|
+
focusDomain?: FocusDomain;
|
|
49
|
+
}
|
|
50
|
+
export interface StatusLineActionHint {
|
|
51
|
+
id: AppKeybinding;
|
|
52
|
+
content: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Produces whole, bound action hints for the current focus domain. The registry
|
|
56
|
+
* remains the authority for availability; KEYBINDINGS remains the authority for
|
|
57
|
+
* whether an action has a binding and the active manager supplies overrides.
|
|
58
|
+
*/
|
|
59
|
+
export declare function getAvailableActionHints(actionRegistry: ActionRegistry<void> | undefined, getKeybindings: (() => KeybindingsManager) | undefined, width: number, domain?: FocusDomain): StatusLineActionHint[];
|
|
60
|
+
export declare class StatusLineComponent implements Component {
|
|
61
|
+
#private;
|
|
62
|
+
private readonly session;
|
|
63
|
+
constructor(session: AgentSession, options?: StatusLineComponentOptions);
|
|
64
|
+
updateSettings(settings: StatusLineSettings): void;
|
|
65
|
+
setActionRegistry(actionRegistry: ActionRegistry<void>, getKeybindings: () => KeybindingsManager): void;
|
|
66
|
+
setFocusDomain(domain: FocusDomain): void;
|
|
67
|
+
setAutoCompactEnabled(enabled: boolean): void;
|
|
68
|
+
setSubagentCount(count: number): void;
|
|
69
|
+
setJobs(jobs: JobsSnapshot): void;
|
|
70
|
+
setSessionStartTime(time: number): void;
|
|
71
|
+
setPlanModeStatus(status: {
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
paused: boolean;
|
|
74
|
+
} | undefined): void;
|
|
75
|
+
setGoalModeStatus(status: {
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
paused: boolean;
|
|
78
|
+
} | undefined): void;
|
|
79
|
+
setSkillHudEntriesForTest(entries: SkillActiveEntry[]): void;
|
|
80
|
+
setHookStatus(key: string, text: string | undefined): void;
|
|
81
|
+
watchBranch(onBranchChange: () => void): void;
|
|
82
|
+
dispose(): void;
|
|
83
|
+
invalidate(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Background-refresh the OAuth quota report. Guarded by a 5-min TTL on both
|
|
86
|
+
* success (cache lifetime) and error (backoff). Exposed (non-private) so
|
|
87
|
+
* unit tests can verify the backoff invariant.
|
|
88
|
+
*/
|
|
89
|
+
refreshUsageInBackground(): void;
|
|
90
|
+
getTopBorder(width: number): {
|
|
91
|
+
content: string;
|
|
92
|
+
width: number;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Multi-row-aware content for the settings preview: the wrapped rows joined
|
|
96
|
+
* with newlines so a single `Text` renders them stacked. Honors the current
|
|
97
|
+
* `maxRows`; identical to the single status line when `maxRows` is 1 or when
|
|
98
|
+
* everything fits on one row.
|
|
99
|
+
*/
|
|
100
|
+
getPreviewContent(width: number): string;
|
|
101
|
+
getCacheStatsForTest(): {
|
|
102
|
+
rowHits: number;
|
|
103
|
+
rowMisses: number;
|
|
104
|
+
};
|
|
105
|
+
invalidateBranchForTest(): void;
|
|
106
|
+
setCachedPrForTest(pr: {
|
|
107
|
+
number: number;
|
|
108
|
+
url: string;
|
|
109
|
+
} | null): void;
|
|
110
|
+
render(width: number): string[];
|
|
111
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Container, type MouseEvent } from "@gajae-code/tui";
|
|
2
|
+
import type { TranscriptItemRegistry, TranscriptSourcePayload } from "../transcript-item-registry";
|
|
3
|
+
export type TranscriptViewerEntry = {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
payload: TranscriptSourcePayload;
|
|
8
|
+
copyable?: boolean;
|
|
9
|
+
foldable?: boolean;
|
|
10
|
+
rawViewable?: boolean;
|
|
11
|
+
getDisplayText?: (expanded: boolean) => string;
|
|
12
|
+
};
|
|
13
|
+
export type TranscriptViewerOverlayOptions = {
|
|
14
|
+
title?: string;
|
|
15
|
+
getEntries: () => readonly TranscriptViewerEntry[];
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
requestRender?: () => void;
|
|
18
|
+
copyToClipboard?: (text: string) => void;
|
|
19
|
+
onError?: (message: string) => void;
|
|
20
|
+
enterExpands?: boolean;
|
|
21
|
+
initialSelection?: "first" | "latest";
|
|
22
|
+
followTail?: boolean;
|
|
23
|
+
getHeaderLines?: () => readonly string[];
|
|
24
|
+
getFooterLines?: () => readonly string[];
|
|
25
|
+
maxExpandedLines?: number;
|
|
26
|
+
footerControls?: string;
|
|
27
|
+
getEntryText?: (entry: TranscriptViewerEntry, expanded: boolean) => string;
|
|
28
|
+
};
|
|
29
|
+
/** Message-agnostic, modal transcript browser over resolved projection entries. */
|
|
30
|
+
export declare class TranscriptViewerOverlay extends Container {
|
|
31
|
+
#private;
|
|
32
|
+
constructor(options: TranscriptViewerOverlayOptions);
|
|
33
|
+
get selectedEntryId(): string | undefined;
|
|
34
|
+
get isFullscreen(): boolean;
|
|
35
|
+
refresh(identityMap?: ReadonlyMap<string, string>): void;
|
|
36
|
+
render(width: number): string[];
|
|
37
|
+
handleMouse(event: MouseEvent): void;
|
|
38
|
+
handleInput(keyData: string): void;
|
|
39
|
+
resetSourceState(): void;
|
|
40
|
+
}
|
|
41
|
+
/** Main-session adapter over the registry's canonical payload resolver. */
|
|
42
|
+
export declare function transcriptViewerEntries(registry: TranscriptItemRegistry): TranscriptViewerEntry[];
|
|
@@ -22,9 +22,9 @@ export declare class CommandController {
|
|
|
22
22
|
handleToolsCommand(): void;
|
|
23
23
|
handleContextCommand(): void;
|
|
24
24
|
handleMemoryCommand(text: string): Promise<void>;
|
|
25
|
-
handleClearCommand(): Promise<
|
|
25
|
+
handleClearCommand(): Promise<boolean>;
|
|
26
26
|
handleContextClearCommand(): Promise<void>;
|
|
27
|
-
handleDropCommand(): Promise<
|
|
27
|
+
handleDropCommand(): Promise<boolean>;
|
|
28
28
|
handleForkCommand(): Promise<void>;
|
|
29
29
|
handleMoveCommand(targetPath: string): Promise<void>;
|
|
30
30
|
handleRenameCommand(title: string): Promise<void>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type Goal } from "../../goals/state";
|
|
2
|
+
import type { AgentSession, AgentSessionEvent } from "../../session/agent-session";
|
|
3
|
+
import type { SessionContext, SessionManager } from "../../session/session-manager";
|
|
4
|
+
import type { SubmittedUserInput } from "../types";
|
|
5
|
+
import type { ModeGate } from "./mode-gate";
|
|
6
|
+
interface GoalModeControllerContext {
|
|
7
|
+
readonly session: AgentSession;
|
|
8
|
+
readonly sessionManager: SessionManager;
|
|
9
|
+
readonly modeGate: ModeGate;
|
|
10
|
+
get planModeActive(): boolean;
|
|
11
|
+
get inputCallback(): ((input: SubmittedUserInput) => void) | undefined;
|
|
12
|
+
get hasPendingSubmission(): boolean;
|
|
13
|
+
get hasPendingImages(): boolean;
|
|
14
|
+
get editorText(): string;
|
|
15
|
+
startPendingSubmission(input: {
|
|
16
|
+
text: string;
|
|
17
|
+
customType?: string;
|
|
18
|
+
display?: boolean;
|
|
19
|
+
}): SubmittedUserInput;
|
|
20
|
+
showStatus(message: string): void;
|
|
21
|
+
showWarning(message: string): void;
|
|
22
|
+
showError(message: string): void;
|
|
23
|
+
showHookConfirm(title: string, message: string): Promise<boolean>;
|
|
24
|
+
showHookSelector(title: string, options: string[]): Promise<string | undefined>;
|
|
25
|
+
showHookEditor(title: string, options?: {
|
|
26
|
+
promptStyle?: boolean;
|
|
27
|
+
}): Promise<string | undefined>;
|
|
28
|
+
updateGoalModeStatus(status: {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
paused: boolean;
|
|
31
|
+
} | undefined): void;
|
|
32
|
+
}
|
|
33
|
+
/** Owns goal-mode state, continuation scheduling, commands, and session restoration. */
|
|
34
|
+
export declare class GoalModeController {
|
|
35
|
+
#private;
|
|
36
|
+
private readonly ctx;
|
|
37
|
+
constructor(ctx: GoalModeControllerContext);
|
|
38
|
+
get enabled(): boolean;
|
|
39
|
+
get paused(): boolean;
|
|
40
|
+
setEnabledForCompatibility(enabled: boolean): void;
|
|
41
|
+
setPausedForCompatibility(paused: boolean): void;
|
|
42
|
+
beforeGetUserInput(): Promise<void>;
|
|
43
|
+
scheduleContinuation(): void;
|
|
44
|
+
cancelContinuation(): void;
|
|
45
|
+
onPendingSubmissionFinished(customType?: string): void;
|
|
46
|
+
onUserSubmission(): void;
|
|
47
|
+
handleSessionEvent(event: AgentSessionEvent): Promise<void>;
|
|
48
|
+
restoreFromSession(sessionContext: SessionContext): Promise<boolean>;
|
|
49
|
+
handleCommand(rest?: string): Promise<void>;
|
|
50
|
+
enter(options: {
|
|
51
|
+
objective?: string;
|
|
52
|
+
provenance?: Goal["provenance"];
|
|
53
|
+
resume?: boolean;
|
|
54
|
+
silent?: boolean;
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
exit(options?: {
|
|
57
|
+
silent?: boolean;
|
|
58
|
+
paused?: boolean;
|
|
59
|
+
reason?: "completed" | "paused" | "dropped";
|
|
60
|
+
}): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { type AutocompleteProvider, type SlashCommand } from "@gajae-code/tui";
|
|
2
|
-
import type
|
|
2
|
+
import { type ComposerSubmissionOptions, type InteractiveModeContext } from "../../modes/types";
|
|
3
|
+
import { ActionRegistry } from "../action-registry";
|
|
4
|
+
export declare const INTERACTIVE_ABORT_CLEANUP_TIMEOUT_MS = 5000;
|
|
5
|
+
export declare const BACKGROUND_FOLD_DOUBLE_PRESS_MS = 750;
|
|
3
6
|
export declare class InputController {
|
|
4
7
|
#private;
|
|
5
8
|
private ctx;
|
|
9
|
+
readonly actionRegistry: ActionRegistry<void>;
|
|
6
10
|
constructor(ctx: InteractiveModeContext);
|
|
7
11
|
setupKeyHandlers(): void;
|
|
8
12
|
setupEditorSubmitHandler(): void;
|
|
13
|
+
submitText(text: string, composer: ComposerSubmissionOptions): Promise<void>;
|
|
9
14
|
handleCtrlC(): void;
|
|
10
15
|
handleCtrlD(): void;
|
|
11
16
|
handleCtrlZ(): void;
|
|
17
|
+
toggleQueuePane(): void;
|
|
18
|
+
sendNow(): Promise<void>;
|
|
12
19
|
handleDequeue(): void;
|
|
13
20
|
/** Send editor text as a follow-up message (queued behind current stream). */
|
|
14
21
|
handleFollowUp(): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ExclusiveMode = "goal" | "plan";
|
|
2
|
+
/** Owns the mutual-exclusion state for interactive goal and plan modes. */
|
|
3
|
+
export declare class ModeGate {
|
|
4
|
+
#private;
|
|
5
|
+
get activeMode(): ExclusiveMode | undefined;
|
|
6
|
+
enter(mode: ExclusiveMode): boolean;
|
|
7
|
+
exit(mode: ExclusiveMode): void;
|
|
8
|
+
}
|