@gajae-code/coding-agent 0.18.11 → 0.19.0
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 +760 -0
- package/dist/types/async/job-manager.d.ts +7 -3
- package/dist/types/async/result-formatting.d.ts +2 -0
- package/dist/types/autoresearch/git.d.ts +1 -1
- package/dist/types/capability/fs.d.ts +2 -2
- package/dist/types/capability/rule.d.ts +7 -2
- package/dist/types/cli/accounts-cli.d.ts +2 -2
- package/dist/types/cli/append-system-prompt.d.ts +6 -0
- package/dist/types/cli/args.d.ts +7 -2
- package/dist/types/cli/customize-doctor-precedence.d.ts +16 -0
- package/dist/types/cli/customize-doctor.d.ts +4 -3
- package/dist/types/cli/doctor/install-repairs.d.ts +4 -1
- package/dist/types/cli/install-activation.d.ts +10 -4
- package/dist/types/cli/public-command-errors.d.ts +2 -0
- package/dist/types/cli/root-flags.d.ts +0 -12
- package/dist/types/cli/update-cli.d.ts +21 -3
- package/dist/types/cli-main.d.ts +0 -6
- package/dist/types/cli-ordinary.d.ts +2 -2
- package/dist/types/commands/accounts.d.ts +2 -1
- package/dist/types/commands/launch.d.ts +0 -6
- package/dist/types/commands/migrate.d.ts +1 -1
- package/dist/types/commands/sdk.d.ts +13 -0
- package/dist/types/commit/changelog/index.d.ts +1 -0
- package/dist/types/commit/map-reduce/index.d.ts +4 -4
- package/dist/types/config/autorouting-tier-map.d.ts +53 -1
- package/dist/types/config/config-hot-reload-trust.d.ts +12 -0
- package/dist/types/config/config-hot-reload.d.ts +44 -0
- package/dist/types/config/file-lock.d.ts +52 -3
- package/dist/types/config/model-discovery-manager.d.ts +2 -0
- package/dist/types/config/model-profile-activation.d.ts +79 -9
- package/dist/types/config/model-registry.d.ts +72 -8
- package/dist/types/config/model-resolver.d.ts +7 -4
- package/dist/types/config/models-config-schema.d.ts +10 -0
- package/dist/types/config/settings-schema.d.ts +57 -4
- package/dist/types/config/settings.d.ts +33 -1
- package/dist/types/coordinator-mcp/server.d.ts +4 -0
- package/dist/types/customization/import.d.ts +2 -0
- package/dist/types/customization/types.d.ts +1 -1
- package/dist/types/dap/config.d.ts +8 -4
- package/dist/types/dap/session.d.ts +11 -2
- package/dist/types/debug/system-info.d.ts +6 -1
- package/dist/types/discovery/helpers.d.ts +7 -2
- package/dist/types/discovery/mcp-compat.d.ts +3 -1
- package/dist/types/edit/index.d.ts +5 -0
- package/dist/types/edit/modes/patch.d.ts +14 -0
- package/dist/types/edit/modes/replace.d.ts +3 -0
- package/dist/types/eval/py/runtime.d.ts +9 -0
- package/dist/types/exec/bash-executor.d.ts +12 -0
- package/dist/types/export/ttsr.d.ts +19 -0
- package/dist/types/extensibility/extensions/types.d.ts +5 -1
- package/dist/types/extensibility/slash-commands.d.ts +1 -0
- package/dist/types/gjc-runtime/managed-owner-admission.d.ts +3 -0
- package/dist/types/gjc-runtime/ralplan-current-final.d.ts +54 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +5 -0
- package/dist/types/gjc-runtime/session-state-lock.d.ts +2 -0
- package/dist/types/gjc-runtime/state-runtime.d.ts +0 -2
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +24 -0
- package/dist/types/gjc-runtime/ultragoal-change-set.d.ts +6 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +1 -0
- package/dist/types/harness-control-plane/receipt-spool.d.ts +4 -0
- package/dist/types/hindsight/content.d.ts +5 -6
- package/dist/types/internal-urls/types.d.ts +2 -0
- package/dist/types/lsp/clients/swiftlint-client.d.ts +0 -4
- package/dist/types/main.d.ts +23 -18
- package/dist/types/migrate/action-planner.d.ts +10 -1
- package/dist/types/migrate/adapters/codex.d.ts +2 -1
- package/dist/types/migrate/adapters/index.d.ts +42 -1
- package/dist/types/migrate/executor.d.ts +3 -1
- package/dist/types/migrate/hook-module.d.ts +23 -0
- package/dist/types/migrate/report.d.ts +2 -1
- package/dist/types/migrate/types.d.ts +82 -3
- package/dist/types/modes/components/agent-dashboard.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +43 -0
- package/dist/types/modes/components/settings-selector.d.ts +6 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +2 -0
- package/dist/types/modes/prompt-suggestion-controller.d.ts +1 -1
- package/dist/types/modes/theme/theme.d.ts +1 -0
- package/dist/types/modes/utils/host-status.d.ts +15 -11
- package/dist/types/runtime-mcp/content-limits.d.ts +4 -0
- package/dist/types/runtime-mcp/manager.d.ts +7 -0
- package/dist/types/runtime-mcp/plugin-mcp-name-filter.d.ts +22 -0
- package/dist/types/runtime-mcp/project-host-values.d.ts +11 -5
- package/dist/types/runtime-mcp/tool-bridge.d.ts +4 -0
- package/dist/types/sdk/broker/broker-exit.d.ts +3 -3
- package/dist/types/sdk/broker/broker.d.ts +29 -2
- package/dist/types/sdk/broker/daemon-entry.d.ts +11 -1
- package/dist/types/sdk/broker/doctor-restart.d.ts +1 -1
- package/dist/types/sdk/broker/ensure.d.ts +141 -9
- package/dist/types/sdk/broker/hop.d.ts +45 -0
- package/dist/types/sdk/broker/lifecycle-ledger.d.ts +18 -10
- package/dist/types/sdk/broker/lifecycle.d.ts +22 -0
- package/dist/types/sdk/broker/lock-host-identity.d.ts +5 -0
- package/dist/types/sdk/broker/session-index.d.ts +6 -1
- package/dist/types/sdk/broker/transport.d.ts +2 -0
- package/dist/types/sdk/bus/chat-command-policy.d.ts +2 -1
- package/dist/types/sdk/bus/index.d.ts +44 -0
- package/dist/types/sdk/bus/reconciliation-store.d.ts +10 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +9 -1
- package/dist/types/sdk/bus/telegram-daemon.d.ts +2 -0
- package/dist/types/sdk/bus/threaded-render.d.ts +2 -1
- package/dist/types/sdk/cli/session-cli.d.ts +0 -1
- package/dist/types/sdk/host/control/operations.d.ts +5 -1
- package/dist/types/sdk/host/events.d.ts +4 -0
- package/dist/types/sdk/host/host.d.ts +2 -1
- package/dist/types/sdk/host/prompt-image-upload.d.ts +43 -0
- package/dist/types/sdk/host/session-runtime.d.ts +40 -8
- package/dist/types/sdk/host/surface-policy.d.ts +2 -1
- package/dist/types/sdk/lifecycle/service.d.ts +12 -0
- package/dist/types/sdk/prompt-deadline-flush.d.ts +42 -4
- package/dist/types/sdk/prompt-deadline-manager.d.ts +2 -0
- package/dist/types/sdk/prompt-status.d.ts +11 -4
- package/dist/types/sdk/protocol/adapter-validation.d.ts +10 -4
- package/dist/types/sdk/reconciliation-extensions.d.ts +1 -1
- package/dist/types/sdk/session-list.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +107 -9
- package/dist/types/session/internal/managed-session-scope.d.ts +2 -2
- package/dist/types/session/internal/managed-session-storage.d.ts +1 -1
- package/dist/types/session/internal/native-publish-outcome.d.ts +1 -1
- package/dist/types/session/messages.d.ts +5 -1
- package/dist/types/session/session-manager.d.ts +29 -3
- package/dist/types/session/startup-auth-config.d.ts +24 -2
- package/dist/types/session/streaming-output.d.ts +11 -0
- package/dist/types/session/terminal-abort.d.ts +3 -1
- package/dist/types/session-import/service.d.ts +1 -1
- package/dist/types/skill-state/workflow-mutation-guard.d.ts +20 -4
- package/dist/types/slash-commands/helpers/mcp.d.ts +5 -0
- package/dist/types/slash-commands/helpers/provider-auth-status.d.ts +8 -0
- package/dist/types/ssh/ssh-executor.d.ts +8 -1
- package/dist/types/system-prompt.d.ts +3 -2
- package/dist/types/task/executor.d.ts +19 -2
- package/dist/types/task/role-body.d.ts +11 -0
- package/dist/types/tools/ast-edit-write-path.d.ts +10 -0
- package/dist/types/tools/atomic-file-write.d.ts +9 -7
- package/dist/types/tools/awaiting-input.d.ts +28 -0
- package/dist/types/tools/bash-allowed-prefixes.d.ts +17 -0
- package/dist/types/tools/bash-skill-urls.d.ts +4 -0
- package/dist/types/tools/bash.d.ts +7 -0
- package/dist/types/tools/descriptors.d.ts +15 -2
- package/dist/types/tools/fetch.d.ts +7 -1
- package/dist/types/tools/index.d.ts +2 -0
- package/dist/types/tools/irc.d.ts +5 -3
- package/dist/types/tools/python.d.ts +1 -1
- package/dist/types/tools/report-issue.d.ts +41 -0
- package/dist/types/tools/subagent.d.ts +23 -0
- package/dist/types/tools/tmux-self-injection-guard.d.ts +2 -0
- package/dist/types/tools/ultragoal-ask-guard.d.ts +1 -1
- package/dist/types/tools/write.d.ts +2 -0
- package/dist/types/utils/file-mentions.d.ts +5 -0
- package/dist/types/utils/image-limits.d.ts +7 -0
- package/dist/types/utils/image-loading.d.ts +0 -1
- package/dist/types/utils/open.d.ts +0 -1
- package/dist/types/utils/pasted-image-loading.d.ts +1 -5
- package/dist/types/utils/prompt-suggestion.d.ts +2 -2
- package/dist/types/utils/shell-snapshot.d.ts +2 -0
- package/dist/types/utils/title-generator.d.ts +13 -3
- package/dist/types/web/scrapers/types.d.ts +8 -1
- package/dist/types/web/search/providers/codex.d.ts +6 -7
- package/dist/types/web/search/providers/insane.d.ts +7 -1
- package/dist/types/web/search/providers/searxng.d.ts +5 -0
- package/package.json +10 -9
- package/scripts/acp-conformance-agent.ts +12 -2
- package/scripts/build-binary.ts +2 -1
- package/scripts/capture-subagent-compact-panel-showcase.ts +105 -0
- package/scripts/generate-docs-index.ts +8 -1
- package/scripts/generate-sdk-operation-inventory.ts +38 -4
- package/src/async/job-manager.ts +356 -56
- package/src/async/result-formatting.ts +40 -0
- package/src/autoresearch/git.ts +9 -2
- package/src/autoresearch/prompts/prompt-setup.md +1 -1
- package/src/capability/fs.ts +58 -22
- package/src/capability/index.ts +2 -2
- package/src/capability/rule.ts +11 -2
- package/src/cli/accounts-cli.ts +176 -8
- package/src/cli/append-system-prompt.ts +12 -0
- package/src/cli/args.ts +11 -7
- package/src/cli/auth-broker-cli.ts +21 -11
- package/src/cli/customize-doctor-precedence.ts +31 -0
- package/src/cli/customize-doctor.ts +49 -39
- package/src/cli/doctor/install-repairs.ts +35 -5
- package/src/cli/fast-help.ts +1 -3
- package/src/cli/install-activation.ts +47 -4
- package/src/cli/migrate-cli.ts +19 -6
- package/src/cli/public-command-errors.ts +6 -0
- package/src/cli/root-flags.ts +2 -4
- package/src/cli/stats-cli.ts +9 -5
- package/src/cli/update-cli.ts +471 -13
- package/src/cli-ordinary.ts +7 -2
- package/src/commands/accounts.ts +10 -5
- package/src/commands/harness.ts +25 -15
- package/src/commands/migrate.ts +3 -3
- package/src/commands/sdk.ts +277 -50
- package/src/commands/ultragoal.ts +16 -8
- package/src/commit/agentic/agent.ts +6 -6
- package/src/commit/analysis/conventional.ts +14 -5
- package/src/commit/changelog/index.ts +39 -1
- package/src/commit/map-reduce/index.ts +7 -7
- package/src/commit/message.ts +10 -3
- package/src/commit/pipeline.ts +12 -12
- package/src/config/autorouting-tier-map.ts +50 -1
- package/src/config/config-file.ts +106 -3
- package/src/config/config-hot-reload-trust.ts +148 -0
- package/src/config/config-hot-reload.ts +742 -0
- package/src/config/file-lock.ts +1615 -328
- package/src/config/keybindings.ts +154 -7
- package/src/config/model-bindings-applier.ts +85 -47
- package/src/config/model-discovery-manager.ts +10 -0
- package/src/config/model-profile-activation.ts +889 -148
- package/src/config/model-registry.ts +1706 -205
- package/src/config/model-resolver.ts +52 -22
- package/src/config/models-config-schema.ts +6 -0
- package/src/config/settings-schema.ts +73 -4
- package/src/config/settings.ts +460 -24
- package/src/coordinator-mcp/policy.ts +26 -1
- package/src/coordinator-mcp/server.ts +37 -2
- package/src/crash/sanitize.ts +7 -1
- package/src/customization/import.ts +279 -8
- package/src/customization/inventory.ts +24 -8
- package/src/customization/types.ts +1 -0
- package/src/dap/client.ts +3 -2
- package/src/dap/config.ts +31 -11
- package/src/dap/defaults.json +1 -1
- package/src/dap/session.ts +161 -36
- package/src/debug/crash-diagnostics.ts +89 -6
- package/src/debug/report-bundle.ts +90 -2
- package/src/debug/system-info.ts +8 -3
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/shared/base-url.ts +21 -7
- package/src/discovery/agents-md.ts +1 -1
- package/src/discovery/builtin.ts +4 -3
- package/src/discovery/helpers.ts +25 -16
- package/src/discovery/mcp-compat.ts +120 -17
- package/src/edit/apply-patch/index.ts +12 -1
- package/src/edit/index.ts +204 -22
- package/src/edit/modes/patch.ts +214 -8
- package/src/edit/modes/replace.ts +136 -0
- package/src/eval/js/context-manager.ts +29 -3
- package/src/eval/js/worker-entry.ts +51 -18
- package/src/eval/py/executor.ts +14 -4
- package/src/eval/py/runner.py +144 -5
- package/src/eval/py/runtime.ts +44 -4
- package/src/exec/bash-executor.ts +81 -4
- package/src/exec/bash-shell-guardian.ts +4 -1
- package/src/exec/bash-shell-supervisor.ts +8 -4
- package/src/exec/isolated-shell.ts +5 -1
- package/src/exec/non-interactive-env.ts +0 -1
- package/src/export/html/index.ts +86 -6
- package/src/export/ttsr.ts +176 -1
- package/src/extensibility/custom-tools/wrapper.ts +3 -1
- package/src/extensibility/extensions/loader.ts +10 -1
- package/src/extensibility/extensions/ouroboros-ooo-bridge.ts +63 -1
- package/src/extensibility/extensions/types.ts +5 -1
- package/src/extensibility/hooks/loader.ts +10 -2
- package/src/extensibility/plugins/marketplace/fetcher.ts +2 -2
- package/src/extensibility/plugins/marketplace/manager.ts +36 -10
- package/src/extensibility/slash-commands.ts +5 -0
- package/src/gjc-runtime/gc-runtime.ts +37 -7
- package/src/gjc-runtime/launch-tmux.ts +30 -15
- package/src/gjc-runtime/launch-worktree.test.ts +148 -0
- package/src/gjc-runtime/launch-worktree.ts +101 -14
- package/src/gjc-runtime/managed-owner-admission.ts +46 -2
- package/src/gjc-runtime/ralplan-current-final.ts +294 -0
- package/src/gjc-runtime/ralplan-runtime.ts +95 -1
- package/src/gjc-runtime/session-resolution.ts +38 -6
- package/src/gjc-runtime/session-state-lock.ts +59 -14
- package/src/gjc-runtime/state-runtime.ts +23 -19
- package/src/gjc-runtime/state-writer.ts +109 -5
- package/src/gjc-runtime/tmux-sessions.ts +93 -13
- package/src/gjc-runtime/ultragoal-change-set.ts +90 -11
- package/src/gjc-runtime/ultragoal-guard.ts +9 -1
- package/src/gjc-runtime/ultragoal-runtime.ts +15 -5
- package/src/harness-control-plane/finalize.ts +11 -0
- package/src/harness-control-plane/receipt-spool.ts +105 -28
- package/src/harness-control-plane/storage.ts +124 -6
- package/src/hindsight/content.ts +116 -16
- package/src/hindsight/mental-models.ts +22 -10
- package/src/hindsight/state.ts +7 -4
- package/src/hooks/native-skill-hook.ts +17 -12
- package/src/internal-urls/artifact-protocol.ts +3 -1
- package/src/internal-urls/docs-index.generated.ts +23 -22
- package/src/internal-urls/local-protocol.ts +167 -8
- package/src/internal-urls/types.ts +2 -0
- package/src/lsp/client.ts +2 -1
- package/src/lsp/clients/biome-client.ts +2 -0
- package/src/lsp/clients/swiftlint-client.ts +2 -0
- package/src/lsp/index.ts +29 -0
- package/src/lsp/workspace-path.ts +23 -0
- package/src/main.ts +330 -92
- package/src/memories/index.ts +25 -2
- package/src/migrate/action-planner.ts +574 -2
- package/src/migrate/adapters/claude-code.ts +162 -5
- package/src/migrate/adapters/codex.ts +77 -7
- package/src/migrate/adapters/index.ts +258 -5
- package/src/migrate/adapters/opencode.ts +10 -1
- package/src/migrate/executor.ts +222 -7
- package/src/migrate/hook-module.ts +193 -0
- package/src/migrate/report.ts +63 -2
- package/src/migrate/types.ts +84 -4
- package/src/modes/DESIGN.md +51 -0
- package/src/modes/acp/acp-agent.ts +10 -1
- package/src/modes/acp/permission-mode.ts +18 -1
- package/src/modes/components/agent-dashboard.ts +20 -4
- package/src/modes/components/assistant-message.ts +55 -1
- package/src/modes/components/customization/customization-dashboard.ts +7 -0
- package/src/modes/components/customization/import-wizard.ts +29 -3
- package/src/modes/components/model-selector.ts +157 -103
- package/src/modes/components/settings-selector.ts +103 -37
- package/src/modes/components/welcome.ts +3 -1
- package/src/modes/controllers/command-controller.ts +300 -9
- package/src/modes/controllers/event-controller.ts +1 -1
- package/src/modes/controllers/extension-ui-controller.ts +31 -1
- package/src/modes/controllers/goal-mode-controller.ts +79 -10
- package/src/modes/controllers/input-controller.ts +2 -0
- package/src/modes/controllers/plan-mode-controller.ts +66 -11
- package/src/modes/controllers/runtime-mcp-command-controller.ts +7 -6
- package/src/modes/controllers/selector-controller.ts +76 -7
- package/src/modes/interactive-mode.ts +123 -4
- package/src/modes/prompt-suggestion-controller.ts +1 -1
- package/src/modes/runtime-init.ts +5 -1
- package/src/modes/theme/theme.ts +15 -0
- package/src/modes/utils/host-status.ts +21 -10
- package/src/prompts/agent-fragments/browser-aside.md +2 -2
- package/src/prompts/system/irc-incoming.md +3 -1
- package/src/prompts/tools/debug.md +1 -1
- package/src/prompts/tools/irc.md +1 -1
- package/src/prompts/tools/read.md +1 -1
- package/src/prompts/tools/report-issue.md +13 -0
- package/src/prompts/tools/task.md +1 -1
- package/src/runtime-credential-selector.ts +2 -2
- package/src/runtime-mcp/content-limits.ts +7 -0
- package/src/runtime-mcp/manager-pool.test.ts +5 -4
- package/src/runtime-mcp/manager.ts +40 -3
- package/src/runtime-mcp/oauth-flow.ts +32 -6
- package/src/runtime-mcp/plugin-mcp-name-filter.ts +62 -0
- package/src/runtime-mcp/project-host-values.ts +12 -8
- package/src/runtime-mcp/render.ts +16 -1
- package/src/runtime-mcp/tool-bridge.ts +194 -21
- package/src/runtime-mcp/transports/stdio.ts +2 -1
- package/src/sdk/broker/broker-exit.ts +10 -5
- package/src/sdk/broker/broker.ts +484 -85
- package/src/sdk/broker/daemon-entry.ts +338 -116
- package/src/sdk/broker/doctor-restart.ts +2 -1
- package/src/sdk/broker/ensure.ts +1214 -268
- package/src/sdk/broker/hop.ts +286 -0
- package/src/sdk/broker/lifecycle-ledger.ts +38 -11
- package/src/sdk/broker/lifecycle.ts +102 -6
- package/src/sdk/broker/lock-host-identity.ts +29 -0
- package/src/sdk/broker/session-index.ts +91 -16
- package/src/sdk/broker/transport.ts +17 -1
- package/src/sdk/bus/chat-command-policy.ts +16 -3
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +460 -35
- package/src/sdk/bus/reconciliation-store.ts +201 -8
- package/src/sdk/bus/session-control.ts +2 -0
- package/src/sdk/bus/slack-daemon.ts +105 -9
- package/src/sdk/bus/telegram-daemon-contract.ts +9 -1
- package/src/sdk/bus/telegram-daemon.ts +10 -2
- package/src/sdk/bus/threaded-render.ts +20 -1
- package/src/sdk/cli/session-cli.ts +23 -6
- package/src/sdk/host/control/dispatch.ts +13 -1
- package/src/sdk/host/control/operations.ts +10 -1
- package/src/sdk/host/events.ts +67 -4
- package/src/sdk/host/host.ts +8 -2
- package/src/sdk/host/prompt-image-upload.ts +438 -0
- package/src/sdk/host/sdk-surface-parity.test.ts +15 -0
- package/src/sdk/host/session-runtime.test.ts +1737 -129
- package/src/sdk/host/session-runtime.ts +684 -83
- package/src/sdk/host/surface-policy.ts +4 -0
- package/src/sdk/host/websocket-transport.lifecycle.test.ts +90 -2
- package/src/sdk/host/websocket-transport.ts +19 -7
- package/src/sdk/lifecycle/service.ts +15 -1
- package/src/sdk/prompt-deadline-flush.ts +78 -5
- package/src/sdk/prompt-deadline-manager.ts +68 -14
- package/src/sdk/prompt-status.ts +6 -4
- package/src/sdk/protocol/adapter-validation.ts +81 -12
- package/src/sdk/protocol/operation-inventory.generated.json +261 -2
- package/src/sdk/protocol/operation-registry.ts +33 -3
- package/src/sdk/reconciliation-extensions.ts +1 -0
- package/src/sdk/session-list.ts +1 -0
- package/src/sdk/session.ts +237 -97
- package/src/session/agent-session.ts +2726 -479
- package/src/session/history-storage.ts +182 -12
- package/src/session/internal/managed-session-scope.ts +173 -57
- package/src/session/internal/managed-session-storage.ts +85 -12
- package/src/session/internal/native-publish-outcome.ts +5 -1
- package/src/session/messages.ts +47 -6
- package/src/session/session-manager.ts +326 -19
- package/src/session/startup-auth-config.ts +116 -8
- package/src/session/streaming-output.ts +262 -4
- package/src/session/terminal-abort.ts +14 -2
- package/src/session-import/redact.ts +53 -2
- package/src/session-import/service.ts +1 -0
- package/src/skill-state/workflow-mutation-guard.ts +2145 -206
- package/src/slash-commands/builtin-registry.ts +21 -6
- package/src/slash-commands/helpers/credential-switch.ts +10 -5
- package/src/slash-commands/helpers/mcp.ts +11 -3
- package/src/slash-commands/helpers/provider-auth-status.ts +456 -0
- package/src/ssh/ssh-executor.ts +9 -2
- package/src/stt/recorder.ts +26 -9
- package/src/system-prompt.ts +61 -16
- package/src/task/executor.ts +115 -20
- package/src/task/index.ts +389 -175
- package/src/task/role-body.ts +84 -0
- package/src/task/token-log-mode.test.ts +162 -0
- package/src/task/token-log.ts +91 -2
- package/src/tools/archive-reader.ts +650 -37
- package/src/tools/ask.ts +1 -0
- package/src/tools/ast-edit-write-path.ts +64 -0
- package/src/tools/ast-edit.ts +18 -1
- package/src/tools/ast-grep.ts +7 -2
- package/src/tools/atomic-file-write.ts +46 -15
- package/src/tools/auto-generated-guard.ts +15 -3
- package/src/tools/awaiting-input.ts +114 -0
- package/src/tools/bash-allowed-prefixes.ts +214 -6
- package/src/tools/bash-interactive.ts +14 -2
- package/src/tools/bash-skill-urls.ts +58 -5
- package/src/tools/bash.ts +113 -26
- package/src/tools/browser/tab-worker.ts +39 -13
- package/src/tools/browser.ts +17 -7
- package/src/tools/cron.ts +10 -1
- package/src/tools/debug.ts +16 -8
- package/src/tools/descriptors.test.ts +44 -0
- package/src/tools/descriptors.ts +50 -6
- package/src/tools/eval.ts +15 -0
- package/src/tools/fetch.ts +93 -4
- package/src/tools/gh.ts +27 -12
- package/src/tools/image-gen.ts +20 -6
- package/src/tools/index.ts +2 -0
- package/src/tools/irc.ts +5 -3
- package/src/tools/monitor.ts +9 -1
- package/src/tools/output-meta.ts +74 -5
- package/src/tools/python.ts +1 -1
- package/src/tools/read.ts +26 -37
- package/src/tools/recipe/runner.ts +23 -12
- package/src/tools/render-utils.ts +2 -2
- package/src/tools/report-issue.ts +184 -0
- package/src/tools/search.ts +3 -2
- package/src/tools/ssh.ts +274 -8
- package/src/tools/subagent-render.ts +114 -12
- package/src/tools/subagent.ts +118 -5
- package/src/tools/tmux-self-injection-guard.ts +3301 -122
- package/src/tools/todo-write.ts +41 -3
- package/src/tools/tool-catalog.generated.ts +32 -4
- package/src/tools/ultragoal-ask-guard.ts +13 -1
- package/src/tools/write.ts +42 -3
- package/src/tui/tree-list.ts +15 -1
- package/src/utils/commit-message-generator.ts +12 -4
- package/src/utils/external-editor.ts +21 -7
- package/src/utils/file-mentions.ts +75 -7
- package/src/utils/git.ts +38 -7
- package/src/utils/image-limits.ts +8 -0
- package/src/utils/image-loading.ts +1 -1
- package/src/utils/open.ts +73 -4
- package/src/utils/pasted-image-loading.ts +9 -8
- package/src/utils/prompt-suggestion.ts +5 -4
- package/src/utils/shell-snapshot.ts +9 -1
- package/src/utils/title-generator.ts +72 -22
- package/src/web/scrapers/index.ts +3 -1
- package/src/web/scrapers/types.ts +8 -0
- package/src/web/scrapers/youtube.ts +3 -2
- package/src/web/search/index.ts +2 -1
- package/src/web/search/providers/codex.ts +29 -32
- package/src/web/search/providers/insane.ts +91 -28
- package/src/web/search/providers/searxng.ts +62 -10
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ProjectEnvSnapshot } from "@gajae-code/utils/env-file";
|
|
1
2
|
import { type ProviderAuthority } from "./tmux-common";
|
|
2
3
|
import { type OwnerIsolationProbeSync, type OwnerVerdict, type PlanResponse, type TmuxOwnerIsolationExecutionDependencies, type TmuxOwnerIsolationExecutionResult } from "./tmux-owner-isolation";
|
|
3
4
|
export interface ManagedTmuxLaunchSpec {
|
|
@@ -106,6 +107,29 @@ export type CreateOwnerIsolationTestDependencies = {
|
|
|
106
107
|
export declare function __setCreateOwnerIsolationForTests(dependencies: CreateOwnerIsolationTestDependencies | null): void;
|
|
107
108
|
/** @internal Test-only seam; production mutations always use live fail-closed proofs. */
|
|
108
109
|
export declare function __setMutationServerProofForTests(dependency: ((tmuxCommand: string, env: NodeJS.ProcessEnv) => unknown) | null): void;
|
|
110
|
+
/**
|
|
111
|
+
* Drop project-dotenv copies of the tmux session name, coordinator id, and
|
|
112
|
+
* state-file path. A pin is kept only when every snapshot accepts it, so a
|
|
113
|
+
* declaration Bun loaded before `chdir` is refused even if the launch cwd no
|
|
114
|
+
* longer contains that file. Acceptance uses the shared helper, but the
|
|
115
|
+
* original string stays: callers trim at use, and a later check must see the
|
|
116
|
+
* same value that was accepted.
|
|
117
|
+
*/
|
|
118
|
+
export declare function trustedTmuxLaunchIdentityEnv(env: NodeJS.ProcessEnv, snapshots: readonly ProjectEnvSnapshot[]): NodeJS.ProcessEnv;
|
|
119
|
+
export declare function tmuxLaunchIdentityEnv(env: NodeJS.ProcessEnv, cwd: string): NodeJS.ProcessEnv;
|
|
120
|
+
/**
|
|
121
|
+
* Session id the launched child must see. A trusted pin is passed through.
|
|
122
|
+
* A rejected project pin is replaced by the same fallback the launch plan uses
|
|
123
|
+
* for the session root, which also stops Bun from reloading that dotenv value
|
|
124
|
+
* (`GJC_TMUX_LAUNCHED=1` skips the planner filter). An omitted id stays omitted.
|
|
125
|
+
*/
|
|
126
|
+
export declare function resolvedChildGjcSessionId(input: {
|
|
127
|
+
trusted: string | undefined;
|
|
128
|
+
inherited: string | undefined;
|
|
129
|
+
projectDeclared: boolean;
|
|
130
|
+
fallback: string;
|
|
131
|
+
}): string | undefined;
|
|
132
|
+
export declare function childGjcSessionIdAssignment(env: NodeJS.ProcessEnv, identityEnv: NodeJS.ProcessEnv, cwd: string, fallbackSessionId: string): Record<string, string>;
|
|
109
133
|
export declare function listGjcTmuxSessions(env?: NodeJS.ProcessEnv): GjcTmuxSessionStatus[];
|
|
110
134
|
/** @internal */
|
|
111
135
|
export declare function listTmuxSessionsForGc(env?: NodeJS.ProcessEnv): GjcTmuxSessionsForGc;
|
|
@@ -28,11 +28,17 @@ export declare function computeUltragoalReviewSourceHash(changeSet: UltragoalCha
|
|
|
28
28
|
export declare function spawnText(command: string[], options: {
|
|
29
29
|
cwd: string;
|
|
30
30
|
timeoutMs?: number;
|
|
31
|
+
stdin?: string;
|
|
31
32
|
}): Promise<{
|
|
32
33
|
ok: boolean;
|
|
33
34
|
stdout: string;
|
|
34
35
|
stderr: string;
|
|
35
36
|
}>;
|
|
37
|
+
/**
|
|
38
|
+
* The canonical empty tree object for SHA-1 repositories. Use getEmptyTreeId()
|
|
39
|
+
* to derive the format-specific ID for a given repository.
|
|
40
|
+
*/
|
|
41
|
+
export declare const GIT_EMPTY_TREE_SHA = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
36
42
|
export declare function resolveGitBase(cwd: string, branch?: string): Promise<string>;
|
|
37
43
|
export declare function parseGitNameStatus(output: string): UltragoalChangeSetPath[];
|
|
38
44
|
export declare function parseGitUntrackedPaths(output: string): UltragoalChangeSetPath[];
|
|
@@ -191,6 +191,7 @@ export declare function resolveUltragoalNudgeBudget(cwd: string, agentDir?: stri
|
|
|
191
191
|
export declare function selectUltragoalNudgeTarget(plan: UltragoalPlan, options?: {
|
|
192
192
|
currentGoalObjective?: string;
|
|
193
193
|
retryFailed?: boolean;
|
|
194
|
+
excludedGoalIds?: readonly string[];
|
|
194
195
|
}): UltragoalNudgeTarget | null;
|
|
195
196
|
/**
|
|
196
197
|
* Atomic consuming writer. Locks the ledger path, rereads + counts nudge rows for the
|
|
@@ -10,6 +10,10 @@ export interface ReceiptSpoolAppendResult {
|
|
|
10
10
|
cursor: string;
|
|
11
11
|
path: string;
|
|
12
12
|
}
|
|
13
|
+
/** True only when an exception's `code` is `ENOENT`. Other codes propagate. */
|
|
14
|
+
export declare function isEnoent(error: unknown): boolean;
|
|
15
|
+
/** A spool directory the startup project snapshot does not declare. */
|
|
16
|
+
export declare function trustedReceiptSpoolDir(raw: string | undefined): string | undefined;
|
|
13
17
|
/** @internal Test-only instrumentation for steady-state spool scan coverage. */
|
|
14
18
|
export declare function receiptSpoolFullScanCountForTesting(): number;
|
|
15
19
|
/** @internal Test-only cache reset. */
|
|
@@ -20,12 +20,11 @@ export interface RecallResultLike {
|
|
|
20
20
|
/**
|
|
21
21
|
* Strip `<memories>`, `<mental_models>`, and legacy memory blocks.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* retaining.
|
|
23
|
+
* Matching is case-insensitive and allows whitespace inside the tag.
|
|
24
|
+
* Both per-turn recall and curated mental models are injected around the
|
|
25
|
+
* prompt. If a closer, a case variant, or an early-ended frame leaks into
|
|
26
|
+
* the retention transcript, the next retain stores the breakout as a new
|
|
27
|
+
* memory. Always strip before retaining.
|
|
29
28
|
*/
|
|
30
29
|
export declare function stripMemoryTags(content: string): string;
|
|
31
30
|
/** Format recall results into a bullet list for context injection. */
|
|
@@ -20,6 +20,8 @@ export interface InternalResource {
|
|
|
20
20
|
size?: number;
|
|
21
21
|
/** Underlying filesystem path (for debugging, not exposed to agent) */
|
|
22
22
|
sourcePath?: string;
|
|
23
|
+
/** True when model-facing reads must wrap the selected content as untrusted. */
|
|
24
|
+
untrusted?: boolean;
|
|
23
25
|
/** Additional notes about resolution */
|
|
24
26
|
notes?: string[];
|
|
25
27
|
/**
|
package/dist/types/main.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ImageContent } from "@gajae-code/ai/core";
|
|
8
8
|
import { postmortem } from "@gajae-code/utils";
|
|
9
|
-
import type
|
|
9
|
+
import { type Args } from "./cli/args";
|
|
10
10
|
import { ModelRegistry } from "./config/model-registry";
|
|
11
11
|
import { Settings } from "./config/settings";
|
|
12
12
|
import type { ExtensionUIContext } from "./extensibility/extensions/types";
|
|
@@ -45,7 +45,7 @@ export declare function initializeInteractiveModeWithStartupUpdate(mode: Startup
|
|
|
45
45
|
* Every other local-session flag is rejected so the broker-backed ACP host
|
|
46
46
|
* never appears to accept options it cannot apply to its remote session.
|
|
47
47
|
*/
|
|
48
|
-
export declare function resolveAcpStartupOptions(parsed: Pick<Args, "allowHome" | "apiKey" | "appendSystemPrompt" | "credential" | "preferCredential" | "continue" | "default" | "cwd" | "fileArgs" | "fork" | "hooks" | "messages" | "mpreset" | "mcpConfig" | "model" | "models" | "noLsp" | "noMcp" | "noPty" | "noRules" | "noSession" | "noSkills" | "noTitle" | "noTools" | "pluginDirs" | "print" | "provider" | "providerSessionId" | "resume" | "sessionDir" | "skills" | "
|
|
48
|
+
export declare function resolveAcpStartupOptions(parsed: Pick<Args, "allowHome" | "apiKey" | "appendSystemPrompt" | "credential" | "preferCredential" | "continue" | "default" | "cwd" | "fileArgs" | "fork" | "hooks" | "messages" | "mpreset" | "mcpConfig" | "model" | "models" | "noLsp" | "noMcp" | "noPty" | "noRules" | "noSession" | "noSkills" | "noTitle" | "noTools" | "pluginDirs" | "print" | "provider" | "providerSessionId" | "resume" | "sessionDir" | "skills" | "plan" | "systemPrompt" | "thinking" | "tmux" | "tools" | "extensions" | "unknownFlags">, sessionOptions: Pick<CreateAgentSessionOptions, "model" | "modelPattern" | "thinkingLevel">): AcpStartupOptions;
|
|
49
49
|
declare function readPipedInput(): Promise<string | undefined>;
|
|
50
50
|
export interface InteractiveModeNotify {
|
|
51
51
|
kind: "warn" | "error" | "info";
|
|
@@ -130,6 +130,7 @@ type RunPrintMode = (session: AgentSession, options: PrintModeOptions) => Promis
|
|
|
130
130
|
export interface RunRootCommandDependencies {
|
|
131
131
|
createAgentSession?: typeof createAgentSession;
|
|
132
132
|
createSessionManager?: typeof createSessionManager;
|
|
133
|
+
registerDirectSession?: typeof registerDirectSession;
|
|
133
134
|
discoverAuthStorage?: typeof discoverAuthStorage;
|
|
134
135
|
resolveStartupAuthConfig?: typeof resolveStartupAuthConfig;
|
|
135
136
|
runAcpMode?: (options?: {
|
|
@@ -173,25 +174,29 @@ interface DirectSessionRegistrationDependencies {
|
|
|
173
174
|
attestationEpoch: string;
|
|
174
175
|
};
|
|
175
176
|
}
|
|
176
|
-
/** Register a durable direct CLI session while leaving ephemeral sessions lock-free. */
|
|
177
|
-
export declare function registerDirectSession(sessionManager: DirectSessionManager | undefined, agentDir: string, lifecycleRequestId: string | undefined, dependencies?: DirectSessionRegistrationDependencies): Promise<void>;
|
|
178
|
-
export interface ModelRoleOverrides {
|
|
179
|
-
smol?: string;
|
|
180
|
-
slow?: string;
|
|
181
|
-
plan?: string;
|
|
182
|
-
}
|
|
183
177
|
/**
|
|
184
|
-
*
|
|
178
|
+
* Handle for a direct CLI session's broker-index registration.
|
|
185
179
|
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* invocation never inherits an earlier one's values.
|
|
180
|
+
* A direct session registers once at startup, but `/new`, `/resume` and forks
|
|
181
|
+
* replace the manager's session id inside the same process. The index row is
|
|
182
|
+
* keyed on that id, so without a follow-up the successor is never indexed and the
|
|
183
|
+
* predecessor stays live for as long as this pid is alive (the broker keeps
|
|
184
|
+
* heartbeating a live pid). `syncIdentity` moves the registration to whichever
|
|
185
|
+
* id the manager the session has adopted currently reports.
|
|
193
186
|
*/
|
|
194
|
-
export
|
|
187
|
+
export interface DirectSessionRegistration {
|
|
188
|
+
/**
|
|
189
|
+
* Register the current manager's session id and release the one it replaced.
|
|
190
|
+
*
|
|
191
|
+
* `adoptedManager` rebinds the registration to the manager the session now
|
|
192
|
+
* owns: a bounded cold-sidecar fork adopts its own forked manager before it
|
|
193
|
+
* emits `session_switch`, so the wired handler must hand that manager over or
|
|
194
|
+
* the sync keeps reading the startup manager's predecessor id.
|
|
195
|
+
*/
|
|
196
|
+
syncIdentity(adoptedManager?: DirectSessionManager): Promise<void>;
|
|
197
|
+
}
|
|
198
|
+
/** Register a durable direct CLI session while leaving ephemeral sessions lock-free. */
|
|
199
|
+
export declare function registerDirectSession(sessionManager: DirectSessionManager | undefined, agentDir: string, lifecycleRequestId: string | undefined, dependencies?: DirectSessionRegistrationDependencies): Promise<DirectSessionRegistration>;
|
|
195
200
|
/**
|
|
196
201
|
* Apply the `--no-pty` / `--no-title` terminal-control flags to the environment.
|
|
197
202
|
*
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Central migration action planner.
|
|
3
|
+
*
|
|
4
|
+
* Reads destination state ONCE and produces an immutable list of actions that
|
|
5
|
+
* both dry-run and live execution consume unchanged. This is the single place
|
|
6
|
+
* that decides add/update/skip/fail, destinations, and warnings, guaranteeing
|
|
7
|
+
* dry-run/live parity.
|
|
8
|
+
*/
|
|
9
|
+
import type { AdapterResult, ManualAction, MigrateAction, MigrateDestinations, MigrateWarning } from "./types";
|
|
2
10
|
export interface PlanInput {
|
|
3
11
|
results: AdapterResult[];
|
|
4
12
|
destinations: MigrateDestinations;
|
|
@@ -7,5 +15,6 @@ export interface PlanInput {
|
|
|
7
15
|
export interface PlanOutput {
|
|
8
16
|
actions: MigrateAction[];
|
|
9
17
|
warnings: MigrateWarning[];
|
|
18
|
+
manualActions: ManualAction[];
|
|
10
19
|
}
|
|
11
20
|
export declare function planMigration(input: PlanInput): Promise<PlanOutput>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Codex adapter: reads `~/.codex/config.toml` ([mcp_servers])
|
|
2
|
+
* Codex adapter: reads `~/.codex/config.toml` ([mcp_servers]), user prompts,
|
|
3
|
+
* and user-level `~/.codex/AGENTS.md` instructions. Project AGENTS.md is native GJC input.
|
|
3
4
|
*/
|
|
4
5
|
import { type Adapter } from "./index";
|
|
5
6
|
export declare const codexAdapter: Adapter;
|
|
@@ -1,19 +1,39 @@
|
|
|
1
|
-
import type { AdapterResult, MigrateSource, SkillCandidate, SourceDiagnostic } from "../types";
|
|
1
|
+
import type { AdapterResult, AgentCandidate, InstructionCandidate, MigrateSource, SkillCandidate, SlashCommandCandidate, SourceDiagnostic } from "../types";
|
|
2
2
|
export interface AdapterOptions {
|
|
3
3
|
/** Home directory root; overridable for tests. */
|
|
4
4
|
homeDir: string;
|
|
5
|
+
/** Source scope for instructions and Claude Code commands. */
|
|
6
|
+
scope: "project" | "user";
|
|
7
|
+
/** Project root used when importing project instructions and commands. */
|
|
8
|
+
cwd: string;
|
|
5
9
|
}
|
|
6
10
|
export interface Adapter {
|
|
7
11
|
source: MigrateSource;
|
|
8
12
|
collect(options: AdapterOptions): Promise<AdapterResult>;
|
|
9
13
|
}
|
|
10
14
|
export declare function getAdapter(source: MigrateSource): Adapter;
|
|
15
|
+
/** Collect one source instruction file without interpreting or rewriting its content. */
|
|
16
|
+
export declare function collectInstructionFile(filePath: string, source: MigrateSource): Promise<{
|
|
17
|
+
candidates: InstructionCandidate[];
|
|
18
|
+
diagnostics: SourceDiagnostic[];
|
|
19
|
+
}>;
|
|
11
20
|
/** Read a text file, classifying absence/IO errors into source diagnostics. */
|
|
12
21
|
export declare function readSourceText(filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): Promise<{
|
|
13
22
|
text: string;
|
|
14
23
|
} | {
|
|
15
24
|
diagnostic: SourceDiagnostic;
|
|
16
25
|
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Read an optional settings file. A missing file is expected (most setups do not
|
|
28
|
+
* have every settings file), so unlike `readSourceText` it produces no diagnostic.
|
|
29
|
+
*/
|
|
30
|
+
export declare function readOptionalJson(filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): Promise<{
|
|
31
|
+
data: Record<string, unknown>;
|
|
32
|
+
} | {
|
|
33
|
+
diagnostic: SourceDiagnostic;
|
|
34
|
+
} | {
|
|
35
|
+
absent: true;
|
|
36
|
+
}>;
|
|
17
37
|
/** Parse JSON text, classifying parse errors into a `failed_invalid_source` diagnostic. */
|
|
18
38
|
export declare function parseSourceJson(text: string, filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): {
|
|
19
39
|
data: Record<string, unknown>;
|
|
@@ -35,6 +55,27 @@ export declare function collectMarkdownPrompts(dir: string, source: MigrateSourc
|
|
|
35
55
|
candidates: SkillCandidate[];
|
|
36
56
|
diagnostics: SourceDiagnostic[];
|
|
37
57
|
}>;
|
|
58
|
+
/** Bundled agent names an imported agent must never shadow. */
|
|
59
|
+
export declare const PROTECTED_AGENT_NAMES: ReadonlySet<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Collect subagents from a flat `<agentsDir>/*.md` directory. Frontmatter is
|
|
62
|
+
* rewritten so the loaded name matches the destination file name, and tool lists
|
|
63
|
+
* are translated to GJC tools.
|
|
64
|
+
*/
|
|
65
|
+
export declare function collectMarkdownAgents(dir: string, source: MigrateSource): Promise<{
|
|
66
|
+
candidates: AgentCandidate[];
|
|
67
|
+
diagnostics: SourceDiagnostic[];
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Collect Markdown slash commands. Nested command directories are represented
|
|
71
|
+
* with colon-separated names, matching Claude Code's `/group:command` syntax.
|
|
72
|
+
*/
|
|
73
|
+
export declare function collectMarkdownCommands(dir: string, source: MigrateSource, options?: {
|
|
74
|
+
recursive?: boolean;
|
|
75
|
+
}): Promise<{
|
|
76
|
+
candidates: SlashCommandCandidate[];
|
|
77
|
+
diagnostics: SourceDiagnostic[];
|
|
78
|
+
}>;
|
|
38
79
|
/**
|
|
39
80
|
* Recursively collect skill candidates from any `**/SKILL.md` under `root`.
|
|
40
81
|
* The slug derives from the directory that directly contains the `SKILL.md`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render a gjc hook module from imported foreign hook commands.
|
|
3
|
+
*
|
|
4
|
+
* Claude Code hooks are shell commands: the runtime writes a JSON payload to
|
|
5
|
+
* stdin and reads the exit code. `PreToolUse` blocks on exit 2 with stderr as the
|
|
6
|
+
* reason; every other event is observational. gjc hooks are TypeScript modules
|
|
7
|
+
* that subscribe to events in-process, so the importer reproduces the foreign
|
|
8
|
+
* contract rather than rewriting the commands.
|
|
9
|
+
*
|
|
10
|
+
* Only events whose semantics are unambiguous are translated. The payload keeps
|
|
11
|
+
* the foreign field names so an existing script that reads its JSON keeps working;
|
|
12
|
+
* fields this host cannot supply are omitted instead of guessed, which the module
|
|
13
|
+
* header states.
|
|
14
|
+
*/
|
|
15
|
+
import type { HookCandidate, MigrateSource } from "./types";
|
|
16
|
+
export declare function isSupportedHookEvent(event: string): boolean;
|
|
17
|
+
/** Foreign events this importer translates, for user-facing messages. */
|
|
18
|
+
export declare const SUPPORTED_HOOK_EVENTS: readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Build the module source. The result is deterministic for a given candidate
|
|
21
|
+
* list, so a dry-run report and a live write describe the same file.
|
|
22
|
+
*/
|
|
23
|
+
export declare function renderHookModule(source: MigrateSource, candidates: readonly HookCandidate[]): string;
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* Secret values are never read upstream, so the report only ever contains field
|
|
5
5
|
* names in warnings — but rendering still treats action/warning text as opaque.
|
|
6
6
|
*/
|
|
7
|
-
import { type MigrateAction, type MigrateDestinations, type MigrateReport, type MigrateSource, type MigrateWarning } from "./types";
|
|
7
|
+
import { type ManualAction, type MigrateAction, type MigrateDestinations, type MigrateReport, type MigrateSource, type MigrateWarning } from "./types";
|
|
8
8
|
export interface BuildReportInput {
|
|
9
9
|
actions: MigrateAction[];
|
|
10
10
|
warnings: MigrateWarning[];
|
|
11
11
|
sources: MigrateSource[];
|
|
12
12
|
destinations: MigrateDestinations;
|
|
13
|
+
manualActions: ManualAction[];
|
|
13
14
|
dryRun: boolean;
|
|
14
15
|
project: boolean;
|
|
15
16
|
force: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared types for `gjc migrate`.
|
|
3
3
|
*
|
|
4
|
-
* Imports MCP servers and
|
|
5
|
-
* OpenCode) into native GJC config. See the consensus plan under
|
|
4
|
+
* Imports MCP servers, skills, slash commands, and instruction files from other coding agents
|
|
5
|
+
* (Claude Code, Codex, OpenCode) into native GJC config. See the consensus plan under
|
|
6
6
|
* `.gjc/plans/ralplan/` for the full taxonomy and force/collision semantics.
|
|
7
7
|
*/
|
|
8
8
|
import type { MCPServerConfig } from "../runtime-mcp/types";
|
|
@@ -12,7 +12,7 @@ export declare const MIGRATE_SOURCES: readonly MigrateSource[];
|
|
|
12
12
|
/** Canonical, deterministic ordering used when expanding `--from all` / repeated `--from`. */
|
|
13
13
|
export declare const CANONICAL_SOURCE_ORDER: readonly MigrateSource[];
|
|
14
14
|
/** What kind of thing an action/coverage row is about. */
|
|
15
|
-
export type MigrateItemType = "mcp" | "skill" | "source";
|
|
15
|
+
export type MigrateItemType = "mcp" | "skill" | "command" | "agent" | "hook" | "instruction" | "source";
|
|
16
16
|
/**
|
|
17
17
|
* Per-item outcome taxonomy.
|
|
18
18
|
*
|
|
@@ -42,6 +42,28 @@ export interface SkillCandidate {
|
|
|
42
42
|
content: string;
|
|
43
43
|
warnings: string[];
|
|
44
44
|
}
|
|
45
|
+
/** An instructions file imported as the active GJC AGENTS.md for its scope. */
|
|
46
|
+
export interface InstructionCandidate {
|
|
47
|
+
source: MigrateSource;
|
|
48
|
+
name: string;
|
|
49
|
+
content: string;
|
|
50
|
+
}
|
|
51
|
+
/** A Markdown subagent collected from a foreign coding-agent setup. */
|
|
52
|
+
export interface AgentCandidate {
|
|
53
|
+
source: MigrateSource;
|
|
54
|
+
/** Agent name exactly as it will be loaded from `<agentsDir>/<name>.md`. */
|
|
55
|
+
name: string;
|
|
56
|
+
/** Full Markdown content with normalized GJC frontmatter. */
|
|
57
|
+
content: string;
|
|
58
|
+
warnings: string[];
|
|
59
|
+
}
|
|
60
|
+
/** A Markdown slash command collected from a foreign coding-agent setup. */
|
|
61
|
+
export interface SlashCommandCandidate {
|
|
62
|
+
source: MigrateSource;
|
|
63
|
+
/** Name without the leading slash; nested path components use `:`. */
|
|
64
|
+
name: string;
|
|
65
|
+
content: string;
|
|
66
|
+
}
|
|
45
67
|
/**
|
|
46
68
|
* Source-level diagnostic for a single source/type pair (e.g. "codex mcp config
|
|
47
69
|
* was malformed"). Distinct from per-item actions so absent/unreadable sources
|
|
@@ -53,11 +75,46 @@ export interface SourceDiagnostic {
|
|
|
53
75
|
status: Extract<MigrationStatus, "skipped_absent_source" | "failed_invalid_source" | "failed_io">;
|
|
54
76
|
message: string;
|
|
55
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* A foreign hook command that maps onto a gjc hook event.
|
|
80
|
+
*
|
|
81
|
+
* Claude Code hooks are shell commands that receive a JSON payload on stdin and
|
|
82
|
+
* signal a block with exit code 2; gjc hooks are TypeScript modules. The
|
|
83
|
+
* importer generates a module that reproduces that contract for the events whose
|
|
84
|
+
* semantics are unambiguous.
|
|
85
|
+
*/
|
|
86
|
+
export interface HookCandidate {
|
|
87
|
+
source: MigrateSource;
|
|
88
|
+
/** Foreign event name, e.g. `PreToolUse`. */
|
|
89
|
+
event: string;
|
|
90
|
+
/** Tool-name matcher; empty or absent means every tool. */
|
|
91
|
+
matcher?: string;
|
|
92
|
+
/** Shell command exactly as the source declared it. */
|
|
93
|
+
command: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A source setting the migration cannot express in gjc. Reported instead of
|
|
97
|
+
* guessed at: silently translating an approval or hook policy would change what
|
|
98
|
+
* the agent is allowed to do. Secret values are never read, so detail may name
|
|
99
|
+
* keys but never their contents.
|
|
100
|
+
*/
|
|
101
|
+
export interface ManualAction {
|
|
102
|
+
source: MigrateSource;
|
|
103
|
+
/** Setting area, e.g. `hooks`, `settings.model`, `env`. */
|
|
104
|
+
area: string;
|
|
105
|
+
/** One-line instruction naming the concrete follow-up. */
|
|
106
|
+
detail: string;
|
|
107
|
+
}
|
|
56
108
|
/** Normalized candidates + diagnostics returned by an adapter. */
|
|
57
109
|
export interface AdapterResult {
|
|
58
110
|
mcpCandidates: McpCandidate[];
|
|
59
111
|
skillCandidates: SkillCandidate[];
|
|
112
|
+
slashCommandCandidates: SlashCommandCandidate[];
|
|
113
|
+
agentCandidates: AgentCandidate[];
|
|
114
|
+
hookCandidates: HookCandidate[];
|
|
115
|
+
instructionCandidates: InstructionCandidate[];
|
|
60
116
|
diagnostics: SourceDiagnostic[];
|
|
117
|
+
manualActions: ManualAction[];
|
|
61
118
|
}
|
|
62
119
|
/** A single planned action consumed identically by dry-run and live execution. */
|
|
63
120
|
export interface MigrateAction {
|
|
@@ -80,6 +137,18 @@ export interface MigrateAction {
|
|
|
80
137
|
skill?: {
|
|
81
138
|
content: string;
|
|
82
139
|
};
|
|
140
|
+
command?: {
|
|
141
|
+
content: string;
|
|
142
|
+
};
|
|
143
|
+
agent?: {
|
|
144
|
+
content: string;
|
|
145
|
+
};
|
|
146
|
+
hook?: {
|
|
147
|
+
content: string;
|
|
148
|
+
};
|
|
149
|
+
instruction?: {
|
|
150
|
+
content: string;
|
|
151
|
+
};
|
|
83
152
|
}
|
|
84
153
|
export interface MigrateWarning {
|
|
85
154
|
source: MigrateSource;
|
|
@@ -91,6 +160,11 @@ export type StatusCounts = Record<MigrationStatus, number>;
|
|
|
91
160
|
export interface MigrateDestinations {
|
|
92
161
|
mcpConfigPath: string;
|
|
93
162
|
skillsDir: string;
|
|
163
|
+
commandsDir: string;
|
|
164
|
+
agentsDir: string;
|
|
165
|
+
/** Directory that receives generated hook modules. */
|
|
166
|
+
hooksDir: string;
|
|
167
|
+
instructionsPath: string;
|
|
94
168
|
}
|
|
95
169
|
/** The full machine-readable report emitted with `--json`. */
|
|
96
170
|
export interface MigrateReport {
|
|
@@ -105,6 +179,10 @@ export interface MigrateReport {
|
|
|
105
179
|
byType: {
|
|
106
180
|
mcp: StatusCounts;
|
|
107
181
|
skill: StatusCounts;
|
|
182
|
+
command: StatusCounts;
|
|
183
|
+
agent: StatusCounts;
|
|
184
|
+
hook: StatusCounts;
|
|
185
|
+
instruction: StatusCounts;
|
|
108
186
|
source: StatusCounts;
|
|
109
187
|
};
|
|
110
188
|
bySource: Record<MigrateSource, StatusCounts>;
|
|
@@ -121,6 +199,7 @@ export interface MigrateReport {
|
|
|
121
199
|
warnings?: string[];
|
|
122
200
|
}>;
|
|
123
201
|
warnings: MigrateWarning[];
|
|
202
|
+
manualActions: ManualAction[];
|
|
124
203
|
}
|
|
125
204
|
/** Create a zeroed status-count record. */
|
|
126
205
|
export declare function emptyStatusCounts(): StatusCounts;
|
|
@@ -8,7 +8,7 @@ interface AgentDashboardModelContext {
|
|
|
8
8
|
defaultModelPattern?: string;
|
|
9
9
|
credentialSessionId?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function resolveAgentCreationModel(modelPatterns: string[], modelRegistry: ModelRegistry, settings: Settings | undefined): import("@gajae-code/ai").Model<import("@gajae-code/ai").Api>;
|
|
11
|
+
export declare function resolveAgentCreationModel(modelPatterns: string[], modelRegistry: ModelRegistry, settings: Settings | undefined, credentialSessionId?: string): import("@gajae-code/ai").Model<import("@gajae-code/ai").Api>;
|
|
12
12
|
export declare function updateAgentModelOverride(overrides: Record<string, ModelSelectorValue>, agentName: string, rawValue: string): Record<string, ModelSelectorValue>;
|
|
13
13
|
export declare class AgentDashboard extends Container {
|
|
14
14
|
#private;
|
|
@@ -5,10 +5,53 @@ import { type AutoroutingSetup } from "../../config/autorouting-contract";
|
|
|
5
5
|
import type { GjcModelAssignmentTargetId, ModelRegistry } from "../../config/model-registry";
|
|
6
6
|
import { type ScopedModelSelection } from "../../config/model-resolver";
|
|
7
7
|
import type { ModelProfileConfig } from "../../config/models-config-schema";
|
|
8
|
+
import { type ProviderAuthState } from "../../config/provider-ranking";
|
|
8
9
|
import type { Settings } from "../../config/settings";
|
|
9
10
|
import type { SmartRoutingIntent, SmartRoutingPreview } from "./smart-routing-panel";
|
|
10
11
|
import { SmartRoutingPanelComponent } from "./smart-routing-panel";
|
|
12
|
+
export declare function assignFuzzyScoresToModels(items: ModelItem[], query: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Compute and assign fuzzy scores to canonical model items based on a query.
|
|
15
|
+
*/
|
|
16
|
+
export declare function assignFuzzyScoresToCanonicalModels(items: CanonicalModelItem[], query: string): void;
|
|
17
|
+
export interface RankedModelOrderContext {
|
|
18
|
+
roles: RoleAssignments;
|
|
19
|
+
mruIndex: ReadonlyMap<string, number>;
|
|
20
|
+
providerAuthStateById: ReadonlyMap<string, ProviderAuthState>;
|
|
21
|
+
}
|
|
22
|
+
/** Ranking shared by the provider view: fuzzy quality, default, MRU, provider, recency. */
|
|
23
|
+
export declare function compareModelItemsForRanking(a: ModelItem, b: ModelItem, context: RankedModelOrderContext): number;
|
|
24
|
+
/** Ranking shared by the canonical view: fuzzy quality, default, MRU, provider, then id. */
|
|
25
|
+
export declare function compareCanonicalModelItemsForRanking(a: CanonicalModelItem, b: CanonicalModelItem, context: RankedModelOrderContext): number;
|
|
26
|
+
interface ModelItem {
|
|
27
|
+
kind: "provider";
|
|
28
|
+
provider: string;
|
|
29
|
+
id: string;
|
|
30
|
+
model: Model;
|
|
31
|
+
selector: string;
|
|
32
|
+
thinkingLevel?: ThinkingLevel;
|
|
33
|
+
explicitThinkingLevel?: boolean;
|
|
34
|
+
fuzzyScore?: number;
|
|
35
|
+
}
|
|
36
|
+
interface CanonicalModelItem {
|
|
37
|
+
kind: "canonical";
|
|
38
|
+
id: string;
|
|
39
|
+
model: Model;
|
|
40
|
+
selector: string;
|
|
41
|
+
variantCount: number;
|
|
42
|
+
searchText: string;
|
|
43
|
+
normalizedSearchText: string;
|
|
44
|
+
compactSearchText: string;
|
|
45
|
+
thinkingLevel?: ThinkingLevel;
|
|
46
|
+
explicitThinkingLevel?: boolean;
|
|
47
|
+
fuzzyScore?: number;
|
|
48
|
+
}
|
|
11
49
|
type ScopedModelItem = ScopedModelSelection;
|
|
50
|
+
interface RoleAssignment {
|
|
51
|
+
model: Model;
|
|
52
|
+
thinkingLevel: ThinkingLevel;
|
|
53
|
+
}
|
|
54
|
+
type RoleAssignments = Record<string, RoleAssignment | undefined>;
|
|
12
55
|
export type ModelSelectorSelection = {
|
|
13
56
|
kind: "assignment";
|
|
14
57
|
model: Model;
|
|
@@ -69,6 +69,10 @@ export interface SettingsCallbacks {
|
|
|
69
69
|
onPetCommit?: (mode: string) => boolean;
|
|
70
70
|
/** Called for status line preview while configuring */
|
|
71
71
|
onStatusLinePreview?: (settings: StatusLinePreviewSettings) => void;
|
|
72
|
+
/** Called when a status-line submenu begins an uncommitted preview. */
|
|
73
|
+
onStatusLinePreviewStart?: () => void;
|
|
74
|
+
/** Called when a status-line preview is committed, cancelled, or disposed. */
|
|
75
|
+
onStatusLinePreviewEnd?: () => void;
|
|
72
76
|
/** Get current rendered status line for inline preview */
|
|
73
77
|
getStatusLinePreview?: (width?: number) => string;
|
|
74
78
|
/** Render a status-line preview for supplied draft settings without mutating the live status line. */
|
|
@@ -97,6 +101,8 @@ export declare class SettingsSelectorComponent extends Container {
|
|
|
97
101
|
private readonly notificationsOperations?;
|
|
98
102
|
constructor(context: SettingsRuntimeContext, callbacks: SettingsCallbacks, notificationsOperations?: NotificationsEditorOperations | undefined);
|
|
99
103
|
getFocusComponent(): Component;
|
|
104
|
+
/** Refresh saved rows and model-profile choices without replacing active editors. */
|
|
105
|
+
refreshFromConfiguration(availableModelProfiles: readonly string[]): void;
|
|
100
106
|
dispose(): void;
|
|
101
107
|
handleInput(data: string): void;
|
|
102
108
|
}
|
|
@@ -84,6 +84,8 @@ export declare class SelectorController {
|
|
|
84
84
|
component: Component;
|
|
85
85
|
focus: Component;
|
|
86
86
|
}): void;
|
|
87
|
+
/** Refresh accepted disk configuration without discarding an open preview. */
|
|
88
|
+
refreshConfiguration(): void;
|
|
87
89
|
showCommandPalette(commands: SlashCommand[], actions: CommandPaletteAction[], executeSlashCommand: (name: string) => Promise<void>): void;
|
|
88
90
|
showProviderOnboarding(): void;
|
|
89
91
|
showFrictionlessOnboarding(): Promise<void>;
|
|
@@ -3,7 +3,7 @@ import type { InteractiveModeContext } from "./types";
|
|
|
3
3
|
* Owns the ghost-text next-prompt prediction lifecycle for interactive mode.
|
|
4
4
|
*
|
|
5
5
|
* After each agent turn ends (and only when `promptSuggestions` is enabled
|
|
6
|
-
* and the composer is empty), a
|
|
6
|
+
* and the composer is empty), a model prediction of the user's next
|
|
7
7
|
* prompt is generated in the background. The result renders as dim ghost
|
|
8
8
|
* text in the empty composer via the autocomplete provider's inline hint;
|
|
9
9
|
* Tab accepts it, typing dismisses it, and a new turn clears it.
|
|
@@ -27,6 +27,7 @@ export declare class Theme {
|
|
|
27
27
|
strikethrough(text: string): string;
|
|
28
28
|
inverse(text: string): string;
|
|
29
29
|
getFgAnsi(color: ThemeColor): string;
|
|
30
|
+
getSvgPalette(): Readonly<Record<string, string>>;
|
|
30
31
|
getBgAnsi(color: ThemeBg): string;
|
|
31
32
|
getColorMode(): ColorMode;
|
|
32
33
|
getThinkingBorderColor(level: ThinkingLevel | Effort): (str: string) => string;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Host-terminal agent status markers.
|
|
3
3
|
*
|
|
4
|
-
* Interactive turns announce their state as an OSC 777 sequence:
|
|
4
|
+
* Interactive turns can announce their state as an OSC 777 sequence:
|
|
5
5
|
*
|
|
6
6
|
* ESC ] 777 ; notify;Terax;gjc;<event> BEL
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* exists.
|
|
8
|
+
* OSC 777 is the rxvt `notify` extension, not a private sequence: a terminal
|
|
9
|
+
* that implements it does not discard the payload, it raises a desktop
|
|
10
|
+
* notification. Ghostty parses `777;notify` in `osc/parsers/rxvt_extension.zig`
|
|
11
|
+
* and maps it to `show_desktop_notification`, so emitting it unconditionally
|
|
12
|
+
* made every turn pop notifications titled `Terax` in Ghostty and cmux.
|
|
14
13
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Emission is therefore opt-in. A host that wants per-turn agent status exports
|
|
15
|
+
* `GJC_HOST_STATUS=terax` from its shell integration; every other host gets no
|
|
16
|
+
* escape sequence at all. `notify;Terax;` is the wire identifier of that
|
|
17
|
+
* protocol, and gjc is still named in the payload as the reporting agent.
|
|
18
18
|
*
|
|
19
19
|
* Interactive TUI only. Print and RPC mode stdout stays byte-for-byte parseable
|
|
20
20
|
* because they never reach these controllers.
|
|
21
21
|
*/
|
|
22
22
|
export type HostStatusEvent = "working" | "attention" | "finished";
|
|
23
|
-
|
|
23
|
+
/** The host marker value that opts a terminal into agent-status markers. */
|
|
24
|
+
export declare const HOST_STATUS_MARKER_ENV = "GJC_HOST_STATUS";
|
|
25
|
+
/** Whether the current host opted in to agent-status markers. */
|
|
26
|
+
export declare function hostStatusEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
27
|
+
export declare function emitHostStatus(event: HostStatusEvent, output?: Pick<NodeJS.WriteStream, "write">, env?: NodeJS.ProcessEnv): void;
|