@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
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { GjcTeamConfig, GjcTeamLivenessRecoveryResult, GjcTeamPhase, GjcTeamShutdownMode, GjcTeamSnapshot, GjcTeamWorker, GjcTeamWorkerLifecycle, GjcTeamWorkerLifecycleState, GjcWorkerStatusState, WorkerHeartbeatFile, WorkerStatusFile } from "./team-runtime";
|
|
2
|
+
import type { GjcTeamTask, GjcTeamTaskClaim, GjcTeamTaskMutationCapability } from "./team-store";
|
|
3
|
+
export interface GjcTeamWorkerLifecycleContext {
|
|
4
|
+
config: GjcTeamConfig;
|
|
5
|
+
worker: GjcTeamWorker;
|
|
6
|
+
cwd: string;
|
|
7
|
+
env: NodeJS.ProcessEnv;
|
|
8
|
+
}
|
|
9
|
+
export interface GjcTeamWorkerRuntime {
|
|
10
|
+
findTeamDir(teamName: string, cwd: string, env: NodeJS.ProcessEnv): Promise<string>;
|
|
11
|
+
readConfig(dir: string): Promise<GjcTeamConfig>;
|
|
12
|
+
assertKnownWorker(config: GjcTeamConfig, worker: string): void;
|
|
13
|
+
assertKnownParticipant(config: GjcTeamConfig, worker: string): void;
|
|
14
|
+
findKnownWorker(config: GjcTeamConfig, worker: string): GjcTeamWorker;
|
|
15
|
+
workerDir(dir: string, worker: string): string;
|
|
16
|
+
readJson<T>(filePath: string): Promise<T | null>;
|
|
17
|
+
writeJson(filePath: string, value: unknown): Promise<void>;
|
|
18
|
+
appendEvent(dir: string, event: {
|
|
19
|
+
type: string;
|
|
20
|
+
worker?: string;
|
|
21
|
+
task_id?: string;
|
|
22
|
+
message: string;
|
|
23
|
+
data?: Record<string, unknown>;
|
|
24
|
+
}): Promise<unknown>;
|
|
25
|
+
now(): string;
|
|
26
|
+
nowMs(): number;
|
|
27
|
+
stableHash(value: string): string;
|
|
28
|
+
}
|
|
29
|
+
export interface GjcTeamWorkerOrchestrationRuntime extends GjcTeamWorkerRuntime {
|
|
30
|
+
readTasks(dir: string): Promise<GjcTeamTask[]>;
|
|
31
|
+
withTaskMutation<T>(dir: string, fn: (capability: GjcTeamTaskMutationCapability) => Promise<T>): Promise<T>;
|
|
32
|
+
appendTelemetry(dir: string, event: {
|
|
33
|
+
type: string;
|
|
34
|
+
message: string;
|
|
35
|
+
data?: Record<string, unknown>;
|
|
36
|
+
}): Promise<unknown>;
|
|
37
|
+
paneBelongsToTeamTarget(config: GjcTeamConfig, paneId: string): boolean;
|
|
38
|
+
parseDurationEnv(env: NodeJS.ProcessEnv, name: string, fallback: number): number;
|
|
39
|
+
parseHeartbeatStaleMs(env: NodeJS.ProcessEnv): number;
|
|
40
|
+
killWorkerPanes(config: GjcTeamConfig): void;
|
|
41
|
+
removeCleanCreatedWorktrees(workers: GjcTeamWorker[]): Promise<void>;
|
|
42
|
+
readMonitorSnapshot(dir: string): Promise<unknown>;
|
|
43
|
+
hasPendingIntegration(dir: string, config: GjcTeamConfig, monitor: unknown): Promise<boolean>;
|
|
44
|
+
writePhase(dir: string, phase: GjcTeamPhase): Promise<void>;
|
|
45
|
+
readSnapshot(teamName: string, cwd: string, env: NodeJS.ProcessEnv): Promise<GjcTeamSnapshot>;
|
|
46
|
+
}
|
|
47
|
+
export declare function workerLifecycleContext(config: GjcTeamConfig, worker: GjcTeamWorker, cwd: string, env: NodeJS.ProcessEnv): GjcTeamWorkerLifecycleContext;
|
|
48
|
+
export type GjcShutdownAuthority = {
|
|
49
|
+
state: "proven_absent";
|
|
50
|
+
} | {
|
|
51
|
+
state: "valid_present";
|
|
52
|
+
} | {
|
|
53
|
+
state: "invalid_or_unreadable";
|
|
54
|
+
};
|
|
55
|
+
export declare function isGjcShutdownRequestRecord(value: unknown): boolean;
|
|
56
|
+
/** Distinguishes a missing shutdown record from a present JSON `null` or invalid record. */
|
|
57
|
+
export declare function readGjcShutdownAuthority(runtime: GjcTeamWorkerRuntime, filePath: string): Promise<GjcShutdownAuthority>;
|
|
58
|
+
export declare function parseGjcWorkerStatusState(value: unknown): GjcWorkerStatusState;
|
|
59
|
+
export declare function lifecycleStateForWorkerStatus(status: GjcWorkerStatusState): GjcTeamWorkerLifecycleState;
|
|
60
|
+
export declare function readWorkerStatusFile(runtime: GjcTeamWorkerRuntime, dir: string, worker: string): Promise<WorkerStatusFile>;
|
|
61
|
+
export declare function readWorkerLifecycleRecord(runtime: GjcTeamWorkerRuntime, dir: string, worker: GjcTeamWorker): Promise<GjcTeamWorkerLifecycle>;
|
|
62
|
+
export declare function readWorkerLifecycleById(runtime: GjcTeamWorkerRuntime, dir: string, config: GjcTeamConfig): Promise<Record<string, GjcTeamWorkerLifecycle>>;
|
|
63
|
+
export declare function writeWorkerLifecycleRecord(runtime: GjcTeamWorkerRuntime, dir: string, worker: GjcTeamWorker, lifecycleState: GjcTeamWorkerLifecycleState, updates?: Partial<GjcTeamWorkerLifecycle>): Promise<GjcTeamWorkerLifecycle>;
|
|
64
|
+
export declare function writeWorkerLifecycleForConfig(runtime: GjcTeamWorkerRuntime, dir: string, config: GjcTeamConfig, lifecycleState: GjcTeamWorkerLifecycleState, updatesFor?: (worker: GjcTeamWorker) => Partial<GjcTeamWorkerLifecycle>): Promise<Record<string, GjcTeamWorkerLifecycle>>;
|
|
65
|
+
export declare function readGjcWorkerStatus(runtime: GjcTeamWorkerRuntime, teamName: string, worker: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<WorkerStatusFile>;
|
|
66
|
+
export declare function updateGjcWorkerStatus(runtime: GjcTeamWorkerRuntime, teamName: string, worker: string, status: GjcWorkerStatusState, cwd?: string, env?: NodeJS.ProcessEnv, currentTaskId?: string, reason?: string): Promise<WorkerStatusFile>;
|
|
67
|
+
export declare function readGjcWorkerHeartbeat(runtime: GjcTeamWorkerRuntime, teamName: string, worker: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<WorkerHeartbeatFile | null>;
|
|
68
|
+
export declare function updateGjcWorkerHeartbeat(runtime: GjcTeamWorkerRuntime, teamName: string, worker: string, heartbeat: WorkerHeartbeatFile, cwd?: string, env?: NodeJS.ProcessEnv): Promise<WorkerHeartbeatFile>;
|
|
69
|
+
export declare function writeGjcWorkerStartupAck(runtime: GjcTeamWorkerRuntime, teamName: string, worker: string, cwd: string, env: NodeJS.ProcessEnv, input: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
70
|
+
export declare function writeGjcShutdownRequest(runtime: GjcTeamWorkerRuntime, teamName: string, worker: string, requestedBy: string, cwd: string | undefined, env: NodeJS.ProcessEnv | undefined, requestId: string, mode?: GjcTeamShutdownMode, requestedAt?: string): Promise<Record<string, unknown>>;
|
|
71
|
+
export declare function readGjcShutdownAck(runtime: GjcTeamWorkerRuntime, teamName: string, worker: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<Record<string, unknown> | null>;
|
|
72
|
+
export declare const GJC_TEAM_CONTINUATION_PROMPT = "Continue only your current claimed GJC team task. Re-read current GJC team state; do not replay prior output; report status.";
|
|
73
|
+
export declare function gjcContinuationReservationDigest(reservation: Record<string, unknown>): string;
|
|
74
|
+
export declare function isValidGjcContinuationReservation(value: unknown, incident: string, attempt: number, config: GjcTeamConfig, worker: string, task: GjcTeamTask, claim: GjcTeamTaskClaim, heartbeatAt: string, paneId: string): value is Record<string, unknown>;
|
|
75
|
+
export declare function isValidGjcContinuationOutcome(value: unknown, reservation: Record<string, unknown>, incident: string, attempt: number): value is Record<string, unknown>;
|
|
76
|
+
export declare function reconcileGjcTeamStaleClaims(runtime: GjcTeamWorkerOrchestrationRuntime, teamName: string, dir: string, config: GjcTeamConfig, env: NodeJS.ProcessEnv): Promise<GjcTeamLivenessRecoveryResult>;
|
|
77
|
+
export declare function reconcileGjcTeamStaleClaimsUnlocked(runtime: GjcTeamWorkerOrchestrationRuntime, teamName: string, dir: string, config: GjcTeamConfig, env: NodeJS.ProcessEnv, capability: GjcTeamTaskMutationCapability): Promise<GjcTeamLivenessRecoveryResult>;
|
|
78
|
+
export declare function shutdownGjcTeamWorkers(runtime: GjcTeamWorkerOrchestrationRuntime, teamName: string, cwd: string, env: NodeJS.ProcessEnv): Promise<GjcTeamSnapshot>;
|
|
@@ -150,6 +150,14 @@ export interface TmuxOwnerIsolationExecutionDependencies {
|
|
|
150
150
|
}): void;
|
|
151
151
|
}
|
|
152
152
|
export declare function isExactScopedBootstrapSuccessReceipt(stdout: string): boolean;
|
|
153
|
+
export declare function isSafeServerProof(server: TmuxServerProof, platform?: NodeJS.Platform): server is TmuxServerProof & {
|
|
154
|
+
state: "safe";
|
|
155
|
+
pid: number;
|
|
156
|
+
startTime: string;
|
|
157
|
+
cgroup: CgroupInfo;
|
|
158
|
+
};
|
|
159
|
+
/** Compares the stable identity fields of independently observed tmux servers. */
|
|
160
|
+
export declare function sameServerIdentity(left: TmuxServerProof, right: TmuxServerProof): boolean;
|
|
153
161
|
/**
|
|
154
162
|
* Synchronous equivalent of the target-server truth table for managed callers.
|
|
155
163
|
* Attempt persistence is injected so a caller can use its existing atomic state writer.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UltragoalChangeSet, type UltragoalChangeSetPath } from "./ultragoal-runtime";
|
|
2
|
+
export declare function spawnText(command: string[], options: {
|
|
3
|
+
cwd: string;
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
}): Promise<{
|
|
6
|
+
ok: boolean;
|
|
7
|
+
stdout: string;
|
|
8
|
+
stderr: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function resolveGitBase(cwd: string, branch?: string): Promise<string>;
|
|
11
|
+
export declare function parseGitNameStatus(output: string): UltragoalChangeSetPath[];
|
|
12
|
+
export declare function computeCheckpointChangeSet(cwd: string): Promise<UltragoalChangeSet | undefined>;
|
|
13
|
+
export declare function parseUnifiedDiffPaths(diff: string): UltragoalChangeSetPath[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type JsonObject, type SurfaceFamily } from "./ultragoal-runtime";
|
|
2
|
+
export declare function pngCrc32(bytes: Buffer): number;
|
|
3
|
+
export declare function parsePngDimensions(bytes: Buffer): {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
headerBytes: number;
|
|
7
|
+
sampleBytes?: Buffer;
|
|
8
|
+
} | null;
|
|
9
|
+
export declare function parseJpegDimensions(bytes: Buffer): {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
headerBytes: number;
|
|
13
|
+
sampleBytes?: Buffer;
|
|
14
|
+
} | null;
|
|
15
|
+
export declare function validateStructuralArtifact(cwd: string, row: JsonObject, fieldName: string, options: {
|
|
16
|
+
surfaceFamily: SurfaceFamily;
|
|
17
|
+
live: boolean;
|
|
18
|
+
}): Promise<boolean>;
|
|
19
|
+
export declare function isAllowedGitReplayCommand(args: readonly string[]): boolean;
|
|
20
|
+
export declare function readCliReplayRecord(cwd: string, row: JsonObject, fieldName: string): Promise<JsonObject | null>;
|
|
21
|
+
export interface ReplayProcessHandle {
|
|
22
|
+
readonly exited: Promise<number>;
|
|
23
|
+
kill(signal?: number | NodeJS.Signals): void;
|
|
24
|
+
}
|
|
25
|
+
export declare function waitForReplayProcessWithTimeout(process: ReplayProcessHandle, timeoutMs: number, graceMs?: number): Promise<number>;
|
|
26
|
+
export declare function validateReplayExemptFallback(cwd: string, record: JsonObject, fieldName: string, artifactRefs: Map<string, JsonObject>, options: {
|
|
27
|
+
surfaceFamily: SurfaceFamily;
|
|
28
|
+
live: boolean;
|
|
29
|
+
}): Promise<boolean>;
|
|
30
|
+
export declare function validateCliReplay(cwd: string, row: JsonObject, fieldName: string, options: {
|
|
31
|
+
live: boolean;
|
|
32
|
+
}): Promise<boolean>;
|
|
33
|
+
export declare function validateLiveSurfaceProofPresence(cwd: string, family: SurfaceFamily, artifactIds: string[], artifactRefs: Map<string, JsonObject>): Promise<void>;
|
|
34
|
+
export declare function validateSurfaceStructuralRequirement(cwd: string, family: SurfaceFamily, artifactIds: string[], artifactRefs: Map<string, JsonObject>, fieldName: string): Promise<void>;
|
|
35
|
+
export declare function validateArtifactProof(cwd: string, row: JsonObject, fieldName: string, options: {
|
|
36
|
+
surfaceFamily: SurfaceFamily;
|
|
37
|
+
live: boolean;
|
|
38
|
+
}): Promise<void>;
|
|
@@ -17,6 +17,13 @@ export interface UltragoalAskBlockDiagnostic {
|
|
|
17
17
|
export interface CurrentGoalLike {
|
|
18
18
|
objective: string;
|
|
19
19
|
status?: string;
|
|
20
|
+
provenance?: {
|
|
21
|
+
source: "ultragoal";
|
|
22
|
+
runId: string;
|
|
23
|
+
goalId: string;
|
|
24
|
+
} | {
|
|
25
|
+
source: "user";
|
|
26
|
+
};
|
|
20
27
|
}
|
|
21
28
|
export declare function validateCompletionReceipt(input: {
|
|
22
29
|
plan: UltragoalPlan;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type JsonObject, type UltragoalGoal, type UltragoalPipelineOverlapReceipt, type UltragoalPlan } from "./ultragoal-runtime";
|
|
2
|
+
export declare function requirePipelineStartable(plan: UltragoalPlan, prior: UltragoalGoal, next: UltragoalGoal): void;
|
|
3
|
+
export declare function startUltragoalPipelineOverlap(input: {
|
|
4
|
+
cwd: string;
|
|
5
|
+
priorGoalId: string;
|
|
6
|
+
nextGoalId: string;
|
|
7
|
+
reviewHandles: JsonObject | JsonObject[];
|
|
8
|
+
qaHandles: JsonObject | JsonObject[];
|
|
9
|
+
implementationHandle: JsonObject;
|
|
10
|
+
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
11
|
+
export declare function joinUltragoalPipelineOverlap(input: {
|
|
12
|
+
cwd: string;
|
|
13
|
+
overlapId: string;
|
|
14
|
+
reviewResult: JsonObject;
|
|
15
|
+
qaResult: JsonObject;
|
|
16
|
+
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
17
|
+
export declare function rebaselineUltragoalPipelineOverlap(input: {
|
|
18
|
+
cwd: string;
|
|
19
|
+
overlapId: string;
|
|
20
|
+
goalId: string;
|
|
21
|
+
evidence: string;
|
|
22
|
+
targetState: JsonObject;
|
|
23
|
+
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
@@ -209,11 +209,15 @@ export interface UltragoalCommandResult {
|
|
|
209
209
|
stderr?: string;
|
|
210
210
|
createdPlan?: boolean;
|
|
211
211
|
}
|
|
212
|
-
interface JsonObject {
|
|
212
|
+
export interface JsonObject {
|
|
213
213
|
[key: string]: unknown;
|
|
214
214
|
}
|
|
215
|
+
export declare function currentUltragoalSessionId(cwd: string): string;
|
|
216
|
+
export declare const PASSED_STATUS = "passed";
|
|
215
217
|
export declare function hashStructuredValue(value: unknown): string;
|
|
216
218
|
export declare function getUltragoalPaths(cwd: string, sessionId?: string | null): UltragoalPaths;
|
|
219
|
+
export declare function isEnoent(error: unknown): boolean;
|
|
220
|
+
export declare function appendLedger(cwd: string, event: JsonObject, sessionId?: string | null): Promise<UltragoalLedgerEvent>;
|
|
217
221
|
export declare function readUltragoalLedger(cwd: string, sessionId?: string | null): Promise<UltragoalLedgerEvent[]>;
|
|
218
222
|
export declare const DEFAULT_ULTRAGOAL_NUDGE_BUDGET = 10;
|
|
219
223
|
/** Pure: count ledger `nudge` rows for an exact goalId. */
|
|
@@ -255,6 +259,25 @@ export declare function recordUltragoalNudgeIfBudgetRemaining(input: {
|
|
|
255
259
|
reason: string;
|
|
256
260
|
currentGoalObjective?: string;
|
|
257
261
|
}): Promise<UltragoalNudgeOutcome>;
|
|
262
|
+
export declare function writePlan(cwd: string, plan: UltragoalPlan, sessionId?: string | null): Promise<void>;
|
|
263
|
+
export declare function nonEmptyString(value: unknown): string | null;
|
|
264
|
+
export declare function stringArray(value: unknown): string[] | null;
|
|
265
|
+
export declare function hashPipelineMetadata(metadata: Omit<UltragoalPipelineMetadata, "metadataHash">): string;
|
|
266
|
+
export declare function validateValidationBatchPipelineExclusion(goal: UltragoalGoal): void;
|
|
267
|
+
export declare function targetsAreDisjoint(left: UltragoalPipelineTargets, right: UltragoalPipelineTargets): boolean;
|
|
268
|
+
export declare function targetsOverlap(left: UltragoalPipelineTargets, right: UltragoalPipelineTargets): boolean;
|
|
269
|
+
export declare function requireNonEmptyPipelineTargets(value: unknown, fieldName: string): UltragoalPipelineTargets;
|
|
270
|
+
export declare function collectPipelineBlockerFootprints(result: JsonObject, fieldName: string): UltragoalPipelineTargets[];
|
|
271
|
+
export declare function pipelinePeer(plan: UltragoalPlan, metadata: UltragoalPipelineMetadata): UltragoalGoal | undefined;
|
|
272
|
+
export declare function handleIdsFromValue(value: JsonObject | JsonObject[], fieldName: string): string[];
|
|
273
|
+
export declare function resultHandleIds(value: JsonObject, fieldName: string): string[];
|
|
274
|
+
export declare function requireCoveredHandles(expected: readonly string[], actual: readonly string[], fieldName: string): void;
|
|
275
|
+
export declare function requireFreshPipelineMetadata(goal: UltragoalGoal): UltragoalPipelineMetadata;
|
|
276
|
+
export declare function openPipelineOverlap(plan: UltragoalPlan): {
|
|
277
|
+
prior: UltragoalGoal;
|
|
278
|
+
next: UltragoalGoal;
|
|
279
|
+
overlapId: string;
|
|
280
|
+
} | null;
|
|
258
281
|
export declare function readUltragoalPlan(cwd: string, sessionId?: string | null): Promise<UltragoalPlan | null>;
|
|
259
282
|
export declare function getUltragoalStatus(cwd: string, sessionId?: string | null): Promise<UltragoalStatusSummary>;
|
|
260
283
|
export declare function buildUltragoalHudSummary(summary: UltragoalStatusSummary, latestLedger?: UltragoalLedgerEvent): WorkflowHudSummary;
|
|
@@ -276,27 +299,10 @@ export interface UltragoalRunCompletionState {
|
|
|
276
299
|
hasBlockers: boolean;
|
|
277
300
|
needsFinalAggregateReceipt: boolean;
|
|
278
301
|
}
|
|
279
|
-
export declare function
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
reviewHandles: JsonObject | JsonObject[];
|
|
284
|
-
qaHandles: JsonObject | JsonObject[];
|
|
285
|
-
implementationHandle: JsonObject;
|
|
286
|
-
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
287
|
-
export declare function joinUltragoalPipelineOverlap(input: {
|
|
288
|
-
cwd: string;
|
|
289
|
-
overlapId: string;
|
|
290
|
-
reviewResult: JsonObject;
|
|
291
|
-
qaResult: JsonObject;
|
|
292
|
-
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
293
|
-
export declare function rebaselineUltragoalPipelineOverlap(input: {
|
|
294
|
-
cwd: string;
|
|
295
|
-
overlapId: string;
|
|
296
|
-
goalId: string;
|
|
297
|
-
evidence: string;
|
|
298
|
-
targetState: JsonObject;
|
|
299
|
-
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
302
|
+
export declare function requireJsonObjectValue(value: unknown, fieldName: string): JsonObject;
|
|
303
|
+
export declare function requireJsonObjectOrArrayValue(value: unknown, fieldName: string): JsonObject | JsonObject[];
|
|
304
|
+
import { joinUltragoalPipelineOverlap, rebaselineUltragoalPipelineOverlap, startUltragoalPipelineOverlap } from "./ultragoal-pipeline";
|
|
305
|
+
export { joinUltragoalPipelineOverlap, rebaselineUltragoalPipelineOverlap, startUltragoalPipelineOverlap };
|
|
300
306
|
export declare function getUltragoalRunCompletionState(plan: UltragoalPlan, options?: {
|
|
301
307
|
retryFailed?: boolean;
|
|
302
308
|
}): UltragoalRunCompletionState;
|
|
@@ -309,16 +315,25 @@ export declare function startNextUltragoalGoal(input: {
|
|
|
309
315
|
goal?: UltragoalGoal;
|
|
310
316
|
allComplete: boolean;
|
|
311
317
|
}>;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
318
|
+
export declare function qualityGateObject(value: unknown): JsonObject | null;
|
|
319
|
+
export declare function nonEmptyStringArray(value: unknown): string[] | null;
|
|
320
|
+
export declare function requireQualityGateObject(value: unknown, fieldName: string): JsonObject;
|
|
321
|
+
export declare function requireObjectArray(value: unknown, fieldName: string): JsonObject[];
|
|
322
|
+
export declare function requiredStringField(row: JsonObject, key: string, fieldName: string): string;
|
|
323
|
+
export declare function requireStringLinks(value: unknown, fieldName: string): string[];
|
|
324
|
+
export declare function requireResolvedLinks(ids: string[], map: Map<string, JsonObject>, fieldName: string): void;
|
|
325
|
+
export declare function normalizedEvidenceKind(row: JsonObject): string;
|
|
326
|
+
export declare function evidenceKindMatches(kind: string, words: string[]): boolean;
|
|
327
|
+
export type SurfaceFamily = "web" | "cli" | "native" | "api-package" | "algorithm-math" | "unknown";
|
|
328
|
+
export type UltragoalChangeStatus = "added" | "modified" | "deleted" | "renamed" | "copied" | "unknown";
|
|
329
|
+
export type UltragoalChangeCategory = "code" | "generated-binding" | "tool" | "settings-registry" | "prompt-doc-behavior" | "docs-static" | "other";
|
|
330
|
+
export interface UltragoalChangeSetPath extends JsonObject {
|
|
316
331
|
path: string;
|
|
317
332
|
status: UltragoalChangeStatus;
|
|
318
333
|
oldPath?: string;
|
|
319
334
|
category?: UltragoalChangeCategory;
|
|
320
335
|
}
|
|
321
|
-
interface UltragoalChangeSet extends JsonObject {
|
|
336
|
+
export interface UltragoalChangeSet extends JsonObject {
|
|
322
337
|
source: "checkpoint-git" | "review-pr" | "review-branch" | "review-worktree" | "review-spec";
|
|
323
338
|
baseRef?: string;
|
|
324
339
|
headRef?: string;
|
|
@@ -328,13 +343,19 @@ interface UltragoalChangeSet extends JsonObject {
|
|
|
328
343
|
rawDiff?: string;
|
|
329
344
|
trusted: true;
|
|
330
345
|
}
|
|
346
|
+
export declare function normalizeRepoPath(value: string): string;
|
|
347
|
+
export declare function categorizeComputerChangePath(value: string): UltragoalChangeCategory;
|
|
348
|
+
export declare function isSettingsSchemaPath(value: string): boolean;
|
|
331
349
|
export declare function normalizeSurfaceToken(value: string): string;
|
|
332
350
|
export declare function surfaceFamily(value: string): SurfaceFamily;
|
|
333
|
-
export
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
export declare function
|
|
351
|
+
export declare function isLiveSurfaceFamily(family: SurfaceFamily): boolean;
|
|
352
|
+
export declare function isSubstantiveEvidence(value: unknown): boolean;
|
|
353
|
+
export declare function hasTypedVerifiedReceipt(value: unknown): boolean;
|
|
354
|
+
export declare function hasExistingNonEmptyArtifact(cwd: string, value: unknown): Promise<boolean>;
|
|
355
|
+
export declare function readArtifactBytes(cwd: string, row: JsonObject, fieldName: string): Promise<Buffer | null>;
|
|
356
|
+
import { validateArtifactProof, validateCliReplay, validateLiveSurfaceProofPresence, validateReplayExemptFallback, validateStructuralArtifact, validateSurfaceStructuralRequirement, waitForReplayProcessWithTimeout } from "./ultragoal-evidence";
|
|
357
|
+
export type { ReplayProcessHandle } from "./ultragoal-evidence";
|
|
358
|
+
export { validateArtifactProof, validateCliReplay, validateLiveSurfaceProofPresence, validateReplayExemptFallback, validateStructuralArtifact, validateSurfaceStructuralRequirement, waitForReplayProcessWithTimeout, };
|
|
338
359
|
export declare function validateExecutorQaRedTeamEvidenceForReview(cwd: string, executorQa: Record<string, unknown>, options?: {
|
|
339
360
|
mode?: "review";
|
|
340
361
|
changeSet?: UltragoalChangeSet;
|
|
@@ -405,6 +426,7 @@ interface UltragoalReviewResult extends JsonObject {
|
|
|
405
426
|
weakContractCapApplied: boolean;
|
|
406
427
|
blockerGoalIds?: string[];
|
|
407
428
|
}
|
|
408
|
-
|
|
429
|
+
import { computeCheckpointChangeSet, parseGitNameStatus, parseUnifiedDiffPaths, resolveGitBase, spawnText } from "./ultragoal-change-set";
|
|
430
|
+
export { computeCheckpointChangeSet, parseGitNameStatus, parseUnifiedDiffPaths, resolveGitBase, spawnText };
|
|
409
431
|
export declare function runUltragoalReview(cwd: string, args: readonly string[]): Promise<UltragoalReviewResult>;
|
|
410
432
|
export declare function runNativeUltragoalCommand(args: string[], cwd?: string): Promise<UltragoalCommandResult>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class CommandError extends Error {
|
|
2
|
+
readonly exitStatus: number;
|
|
3
|
+
constructor(exitStatus: number, message: string);
|
|
4
|
+
}
|
|
5
|
+
export declare function flagValue(args: readonly string[], flag: string): string | undefined;
|
|
6
|
+
export declare function hasFlag(args: readonly string[], flag: string): boolean;
|
|
7
|
+
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
8
|
+
export declare function assertSafePathComponent(value: string, label: string): void;
|
|
@@ -44,6 +44,9 @@ export interface SkillManifest {
|
|
|
44
44
|
retention: RetentionPolicy[];
|
|
45
45
|
hudFields: string[];
|
|
46
46
|
graphLabel: string;
|
|
47
|
+
stopReleasingPhases: readonly string[];
|
|
48
|
+
phaseLock: readonly string[];
|
|
49
|
+
canonicalOverrides: readonly string[];
|
|
47
50
|
}
|
|
48
51
|
export declare const WORKFLOW_MANIFEST: Record<CanonicalGjcWorkflowSkill, SkillManifest>;
|
|
49
52
|
export declare function getSkillManifest(skill: CanonicalGjcWorkflowSkill): SkillManifest;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ToolOutcomeKind = "timeout" | "success" | "other-error";
|
|
2
|
+
export interface TimeoutToolOutcome {
|
|
3
|
+
toolName: string;
|
|
4
|
+
argsKey: string;
|
|
5
|
+
kind: ToolOutcomeKind;
|
|
6
|
+
}
|
|
7
|
+
export interface TimeoutHoldState {
|
|
8
|
+
heldSnapshotKey?: string;
|
|
9
|
+
fingerprint?: string;
|
|
10
|
+
streak: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function toResultText(result: unknown): string;
|
|
13
|
+
export declare function classifyToolOutcome(isError: unknown, text: string): ToolOutcomeKind;
|
|
14
|
+
export declare function canonicalArgsKey(args: unknown): string;
|
|
15
|
+
export declare function turnTimeoutFingerprint(outcomes: readonly TimeoutToolOutcome[]): string | null;
|
|
16
|
+
export declare function decideTimeoutHold(prev: TimeoutHoldState, turn: {
|
|
17
|
+
snapshotKey: string;
|
|
18
|
+
fingerprint: string | null;
|
|
19
|
+
}): {
|
|
20
|
+
hold: boolean;
|
|
21
|
+
next: TimeoutHoldState;
|
|
22
|
+
};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { UsageStatistics } from "../session/session-manager";
|
|
2
2
|
export type GoalStatus = "active" | "paused" | "complete" | "dropped";
|
|
3
|
+
export type GoalProvenance = {
|
|
4
|
+
source: "ultragoal";
|
|
5
|
+
runId: string;
|
|
6
|
+
goalId: string;
|
|
7
|
+
} | {
|
|
8
|
+
source: "user";
|
|
9
|
+
};
|
|
3
10
|
export interface Goal {
|
|
4
11
|
id: string;
|
|
5
12
|
objective: string;
|
|
@@ -8,6 +15,7 @@ export interface Goal {
|
|
|
8
15
|
timeUsedSeconds: number;
|
|
9
16
|
createdAt: number;
|
|
10
17
|
updatedAt: number;
|
|
18
|
+
provenance?: GoalProvenance;
|
|
11
19
|
}
|
|
12
20
|
export interface GoalModeState {
|
|
13
21
|
enabled: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Observation, SessionState } from "./types";
|
|
2
|
+
export declare const OWNER_STARTUP_BLOCKER = "owner-died-before-first-prompt";
|
|
3
|
+
export interface CompletedTerminalEvent {
|
|
4
|
+
cursor: number;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
kind: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function isOwnerLivenessBlocker(blocker: string): boolean;
|
|
9
|
+
export declare function needsVanishedOwnerBlock(state: SessionState, observation: Observation, completedTerminal: CompletedTerminalEvent | null): boolean;
|
|
10
|
+
export declare function reconcileOwnerLifecycle(input: {
|
|
11
|
+
state: SessionState;
|
|
12
|
+
observation: Observation;
|
|
13
|
+
completedTerminal: CompletedTerminalEvent | null;
|
|
14
|
+
startupBlocked: boolean;
|
|
15
|
+
persist: (state: SessionState) => Promise<void>;
|
|
16
|
+
nowIso: () => string;
|
|
17
|
+
}): Promise<SessionState>;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Phase-boundary receipt rollup builder (receipt-of-receipts).
|
|
2
|
+
* EXPERIMENTAL: Phase-boundary receipt rollup builder (receipt-of-receipts).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* the standard receipt envelope and validated fail-closed like every other
|
|
8
|
-
* family (see `validatePhaseRollup` in receipts.ts). Pure builder — no runtime
|
|
9
|
-
* injection behavior is changed here.
|
|
4
|
+
* This builder is not wired into finalize or retire yet; child receipts remain
|
|
5
|
+
* authoritative until a lifecycle integration preserves their supersession
|
|
6
|
+
* semantics. It is retained for controlled integration experiments only.
|
|
10
7
|
*/
|
|
11
8
|
import type { TaskResultReceipt } from "../task/receipt";
|
|
12
9
|
import { type BuildReceiptInput, type PhaseRollupEvidence, type ReceiptEnvelope } from "./receipts";
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL: Receipt ingestion is a pure evaluator and is not yet wired to
|
|
3
|
+
* finalize or retire lifecycle mutation. Callers must not treat its result as
|
|
4
|
+
* authoritative lifecycle persistence.
|
|
5
|
+
*/
|
|
1
6
|
import type { ReceiptEnvelope } from "./receipts";
|
|
2
7
|
import type { HarnessLifecycle, ReceiptFamily, SessionState } from "./types";
|
|
3
8
|
export declare const RECEIPT_DIGEST_MAX_CHARS = 280;
|
|
@@ -10,6 +10,10 @@ export interface ReceiptSpoolAppendResult {
|
|
|
10
10
|
cursor: string;
|
|
11
11
|
path: string;
|
|
12
12
|
}
|
|
13
|
+
/** @internal Test-only instrumentation for steady-state spool scan coverage. */
|
|
14
|
+
export declare function receiptSpoolFullScanCountForTesting(): number;
|
|
15
|
+
/** @internal Test-only cache reset. */
|
|
16
|
+
export declare function resetReceiptSpoolCursorCacheForTesting(): void;
|
|
13
17
|
export declare function withReceiptSpoolDir<T>(spoolDir: string, fn: () => Promise<T>): Promise<T>;
|
|
14
18
|
export declare function resolveReceiptSpoolDir(env?: NodeJS.ProcessEnv): string | undefined;
|
|
15
19
|
export declare function receiptSpoolPath(spoolDir: string): string;
|
|
@@ -44,7 +44,7 @@ export declare class HindsightRetainQueue {
|
|
|
44
44
|
get depth(): number;
|
|
45
45
|
enqueue(content: string, context?: string): void;
|
|
46
46
|
flush(): Promise<void>;
|
|
47
|
-
dispose(): void
|
|
47
|
+
dispose(): Promise<void>;
|
|
48
48
|
}
|
|
49
49
|
/** Per-session Hindsight runtime state owned by its AgentSession. */
|
|
50
50
|
export declare class HindsightSessionState {
|
|
@@ -64,6 +64,7 @@ export declare class HindsightSessionState {
|
|
|
64
64
|
lastRetainedTurn: number;
|
|
65
65
|
hasRecalledForFirstTurn: boolean;
|
|
66
66
|
lastRecallSnippet?: string;
|
|
67
|
+
lastInjectedRecallSnippetHash?: string;
|
|
67
68
|
/** Cached `<mental_models>` block injected into developer instructions. */
|
|
68
69
|
mentalModelsSnippet?: string;
|
|
69
70
|
/** When the cached snippet was last refreshed; gates the agent_end re-list. */
|
|
@@ -81,19 +82,25 @@ export declare class HindsightSessionState {
|
|
|
81
82
|
constructor(options: HindsightSessionStateOptions);
|
|
82
83
|
setSessionId(sessionId: string): void;
|
|
83
84
|
resetConversationTracking(): void;
|
|
85
|
+
/** Return the current recall payload, resolving subagent aliases to their primary state. */
|
|
86
|
+
getRecallSnippet(): string | undefined;
|
|
87
|
+
/** Return the current recall payload without consuming its one-shot injection eligibility. */
|
|
88
|
+
getRecallSnippetForInjection(): string | undefined;
|
|
89
|
+
/** Mark a recall payload consumed only after it has been accepted for provider injection. */
|
|
90
|
+
markRecallSnippetInjected(snippet: string): boolean;
|
|
84
91
|
enqueueRetain(content: string, context?: string): void;
|
|
85
92
|
flushRetainQueue(): Promise<void>;
|
|
86
93
|
recallForContext(query: string, signal?: AbortSignal): Promise<RecallOutcome>;
|
|
87
|
-
retainSession(messages: HindsightMessage[]): Promise<
|
|
94
|
+
retainSession(messages: HindsightMessage[]): Promise<boolean>;
|
|
88
95
|
maybeRetainOnAgentEnd(): Promise<void>;
|
|
89
96
|
forceRetainCurrentSession(): Promise<void>;
|
|
90
97
|
maybeRecallOnAgentStart(): Promise<void>;
|
|
91
98
|
beforeAgentStartPrompt(promptText: string): Promise<string | undefined>;
|
|
92
99
|
recallForCompaction(messages: HindsightMessage[]): Promise<string | undefined>;
|
|
93
100
|
runMentalModelLoad(scope: BankScope): Promise<void>;
|
|
94
|
-
refreshMentalModelsSnippet(): Promise<
|
|
101
|
+
refreshMentalModelsSnippet(): Promise<boolean>;
|
|
95
102
|
reloadMentalModels(): Promise<boolean>;
|
|
96
103
|
attachSessionListeners(): void;
|
|
97
|
-
dispose(): void
|
|
104
|
+
dispose(): Promise<void>;
|
|
98
105
|
}
|
|
99
106
|
export {};
|
|
@@ -25,9 +25,11 @@ interface LspmuxState {
|
|
|
25
25
|
* Detect lspmux availability and state.
|
|
26
26
|
* Results are cached for STATE_CACHE_TTL_MS.
|
|
27
27
|
*
|
|
28
|
-
* Set PI_DISABLE_LSPMUX=1 to disable.
|
|
28
|
+
* Set GJC_DISABLE_LSPMUX=1 or PI_DISABLE_LSPMUX=1 to disable.
|
|
29
29
|
*/
|
|
30
|
-
export declare function detectLspmux(): Promise<LspmuxState>;
|
|
30
|
+
export declare function detectLspmux(cwd?: string): Promise<LspmuxState>;
|
|
31
|
+
/** Reset cached lspmux detection state for focused tests. */
|
|
32
|
+
export declare function resetLspmuxStateForTesting(): void;
|
|
31
33
|
/**
|
|
32
34
|
* Check if a server command is supported by lspmux.
|
|
33
35
|
*/
|
|
@@ -54,5 +56,5 @@ export declare function wrapWithLspmux(originalCommand: string, originalArgs: st
|
|
|
54
56
|
* @param args - Original command arguments
|
|
55
57
|
* @returns Command and args to use (possibly wrapped with lspmux)
|
|
56
58
|
*/
|
|
57
|
-
export declare function getLspmuxCommand(command: string, args?: string[]): Promise<LspmuxWrappedCommand>;
|
|
59
|
+
export declare function getLspmuxCommand(command: string, args?: string[], cwd?: string): Promise<LspmuxWrappedCommand>;
|
|
58
60
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isProjectControlledPath(candidate: string, cwd: string): boolean;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import type { SubmittedUserInput } from "./modes/types";
|
|
|
18
18
|
import type { MCPManager } from "./runtime-mcp";
|
|
19
19
|
import { type CreateAgentSessionOptions, createAgentSession, discoverAuthStorage } from "./sdk";
|
|
20
20
|
import type { AgentSession } from "./session/agent-session";
|
|
21
|
-
import { type ResumeSessionIdentity, type SessionInfo, SessionManager, type StrictSessionOpenResult } from "./session/session-manager";
|
|
21
|
+
import { type ResumeSessionIdentity, type SessionDirectoryMigrationPolicy, type SessionInfo, SessionManager, type StrictSessionOpenResult } from "./session/session-manager";
|
|
22
22
|
import { runStartupCredentialAutoImportIfNeeded } from "./setup/credential-auto-import";
|
|
23
23
|
import type { LspStartupServerInfo } from "./tools";
|
|
24
24
|
import type { EventBus } from "./utils/event-bus";
|
|
@@ -87,7 +87,7 @@ type CreateInteractiveMode = (options: InteractiveModeFactoryOptions) => Interac
|
|
|
87
87
|
type ResumePickerTerminalCheck = () => boolean;
|
|
88
88
|
type ListForResumePickerReadOnly = (cwd: string, sessionDir?: string) => Promise<SessionInfo[]>;
|
|
89
89
|
type SelectResumeSession = (sessions: SessionInfo[]) => Promise<SessionSelectionResult>;
|
|
90
|
-
type OpenExistingSessionStrict = (identity: ResumeSessionIdentity, sessionDir?: string) => Promise<StrictSessionOpenResult>;
|
|
90
|
+
type OpenExistingSessionStrict = (identity: ResumeSessionIdentity, sessionDir?: string, migrationPolicy?: SessionDirectoryMigrationPolicy) => Promise<StrictSessionOpenResult>;
|
|
91
91
|
export declare const BARE_RESUME_CONFLICT_ERROR = "--resume without a session cannot be combined with --continue, --fork, or --no-session.";
|
|
92
92
|
export declare const BARE_RESUME_INTERACTIVE_ERROR = "--resume requires an interactive terminal; use --resume <id>.";
|
|
93
93
|
export declare const BARE_RESUME_OPEN_ERROR = "Could not open the selected session. Use --resume <id>.";
|
|
@@ -127,6 +127,7 @@ export interface RunRootCommandDependencies {
|
|
|
127
127
|
selectResumeSession?: SelectResumeSession;
|
|
128
128
|
openExistingSessionStrict?: OpenExistingSessionStrict;
|
|
129
129
|
initializeSettings?: typeof Settings.init;
|
|
130
|
+
loadSettingsForScope?: typeof Settings.loadForScope;
|
|
130
131
|
}
|
|
131
132
|
export declare function runRootCommand(parsed: Args, rawArgs: string[], deps?: RunRootCommandDependencies): Promise<void>;
|
|
132
133
|
export declare function main(args: string[]): Promise<void>;
|
|
@@ -33,6 +33,7 @@ export declare function clearMemoryData(db: Database): void;
|
|
|
33
33
|
export declare function upsertThreads(db: Database, threads: MemoryThread[]): void;
|
|
34
34
|
export declare function claimStage1Jobs(db: Database, params: {
|
|
35
35
|
nowSec: number;
|
|
36
|
+
cwd: string;
|
|
36
37
|
threadScanLimit: number;
|
|
37
38
|
maxRolloutsPerStartup: number;
|
|
38
39
|
maxRolloutAgeDays: number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AppKeybinding } from "../config/keybindings";
|
|
2
|
+
export type FocusDomain = "composer" | "selector" | "overlay" | "global";
|
|
3
|
+
export interface ActionMetadata {
|
|
4
|
+
id: AppKeybinding;
|
|
5
|
+
title: string;
|
|
6
|
+
category: string;
|
|
7
|
+
bindingId?: AppKeybinding;
|
|
8
|
+
domains: readonly FocusDomain[];
|
|
9
|
+
exclusiveGroup?: string | false;
|
|
10
|
+
}
|
|
11
|
+
export declare const APP_ACTION_METADATA: readonly ActionMetadata[];
|
|
12
|
+
export interface ActionDefinition<Context> extends ActionMetadata {
|
|
13
|
+
availability(context: Context): boolean;
|
|
14
|
+
execute(context: Context): void | Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export interface ActionRegistryOptions<Context> {
|
|
17
|
+
context: Context;
|
|
18
|
+
showError(error: string): void;
|
|
19
|
+
}
|
|
20
|
+
export declare class ActionRegistry<Context> {
|
|
21
|
+
#private;
|
|
22
|
+
private readonly options;
|
|
23
|
+
constructor(options: ActionRegistryOptions<Context>);
|
|
24
|
+
register(action: ActionDefinition<Context>): void;
|
|
25
|
+
get(id: AppKeybinding): ActionDefinition<Context> | undefined;
|
|
26
|
+
all(): readonly ActionDefinition<Context>[];
|
|
27
|
+
isAvailable(id: AppKeybinding): boolean;
|
|
28
|
+
execute(id: AppKeybinding): Promise<boolean>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Container, type SelectItem, SelectList } from "@gajae-code/tui";
|
|
2
|
+
export interface FramedSelectOptions {
|
|
3
|
+
maxVisible?: number;
|
|
4
|
+
selectedValue?: string;
|
|
5
|
+
onSelect?: (item: SelectItem) => void;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
onSelectionChange?: (item: SelectItem) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface FramedSelect {
|
|
10
|
+
container: Container;
|
|
11
|
+
selectList: SelectList;
|
|
12
|
+
}
|
|
13
|
+
/** Build the shared border/list selector chrome used by compact mode selectors. */
|
|
14
|
+
export declare function FramedSelect(title: string | undefined, items: ReadonlyArray<SelectItem>, opts?: FramedSelectOptions): FramedSelect;
|