@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
|
@@ -14,10 +14,12 @@ import { Settings } from "../config/settings";
|
|
|
14
14
|
import { type Skill } from "../extensibility/skills";
|
|
15
15
|
import type { HindsightSessionState } from "../hindsight/state";
|
|
16
16
|
import type { LocalProtocolOptions } from "../internal-urls";
|
|
17
|
+
import type { PlanModeState } from "../plan-mode/state";
|
|
17
18
|
import { AgentRegistry } from "../registry/agent-registry";
|
|
18
19
|
import type { ForkContextSeed } from "../session/agent-session";
|
|
19
20
|
import { ArtifactManager } from "../session/artifacts";
|
|
20
21
|
import type { AuthStorage } from "../session/auth-storage";
|
|
22
|
+
import type { ClientBridge } from "../session/client-bridge";
|
|
21
23
|
import { SessionManager, type SessionMemoryMode } from "../session/session-manager";
|
|
22
24
|
import "../tools/yield";
|
|
23
25
|
import type { ContextFileEntry } from "../tools";
|
|
@@ -109,6 +111,21 @@ export interface ExecutorOptions {
|
|
|
109
111
|
* the same immutable child settings snapshot.
|
|
110
112
|
*/
|
|
111
113
|
inheritedServiceTier?: ServiceTier;
|
|
114
|
+
/**
|
|
115
|
+
* Parent ACP/SDK approval mode. `deny` and `prompt` replace the child
|
|
116
|
+
* default (`allow`) before the first prompt. `allow` is that default.
|
|
117
|
+
*/
|
|
118
|
+
sdkPermissionMode?: "prompt" | "allow" | "deny";
|
|
119
|
+
/**
|
|
120
|
+
* Parent plan-mode state. Copied onto the child before the first prompt so
|
|
121
|
+
* `enforcePlanModeWrite` still refuses product-file writes.
|
|
122
|
+
*/
|
|
123
|
+
planModeState?: PlanModeState;
|
|
124
|
+
/**
|
|
125
|
+
* Parent client bridge. Only `requestPermission` is copied onto the child.
|
|
126
|
+
* Terminal, filesystem, and deferAgentInitiatedTurns stay on the parent.
|
|
127
|
+
*/
|
|
128
|
+
clientBridge?: ClientBridge;
|
|
112
129
|
/** Override local:// protocol options so subagent shares parent's local:// root */
|
|
113
130
|
localProtocolOptions?: LocalProtocolOptions;
|
|
114
131
|
/**
|
|
@@ -149,12 +166,12 @@ export interface ExecutorOptions {
|
|
|
149
166
|
}
|
|
150
167
|
export declare class ManagedTaskPersistence {
|
|
151
168
|
#private;
|
|
152
|
-
constructor(artifacts: ArtifactManager, taskId: string);
|
|
169
|
+
constructor(artifacts: ArtifactManager, taskId: string, getArtifacts?: () => ArtifactManager);
|
|
153
170
|
openSession(cwd: string, sessionMemoryMode?: SessionMemoryMode): Promise<SessionManager>;
|
|
154
171
|
openStagedSession(attemptId?: string): Promise<SessionManager>;
|
|
155
172
|
publishOutput(rawOutput: string, metadata: Uint8Array): Promise<void>;
|
|
156
173
|
}
|
|
157
|
-
export declare function createManagedTaskPersistence(artifacts: ArtifactManager, taskId: string): ManagedTaskPersistence;
|
|
174
|
+
export declare function createManagedTaskPersistence(artifacts: ArtifactManager, taskId: string, getArtifacts?: () => ArtifactManager): ManagedTaskPersistence;
|
|
158
175
|
export declare function renderSubagentUserPrompt(assignment: string, independentMode: boolean): string;
|
|
159
176
|
export interface YieldItem {
|
|
160
177
|
data?: unknown;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep a subagent role body inside the host [ROLE] block.
|
|
3
|
+
*
|
|
4
|
+
* The body is the agent instruction. It is inserted between host [ROLE] and
|
|
5
|
+
* [/ROLE]. A literal framing tag would end that block early. Only the four
|
|
6
|
+
* host framing names are rewritten; other brackets stay literal.
|
|
7
|
+
*
|
|
8
|
+
* One left-to-right scan: a gap run, a slash only when it is present, then
|
|
9
|
+
* one more gap run, then the word. A non-matching "[" does not hide a later tag.
|
|
10
|
+
*/
|
|
11
|
+
export declare function containSubagentRoleBody(body: string): string;
|
|
@@ -11,3 +11,13 @@ export declare function canonicalizeAstEditWritePath(absolutePath: string): Prom
|
|
|
11
11
|
* or a symlinked workspace), so an in-workspace real path is reattached to `cwd`.
|
|
12
12
|
*/
|
|
13
13
|
export declare function resolveAstEditPreviewWritePaths(cwd: string, previewedPaths: readonly string[]): Promise<string[]>;
|
|
14
|
+
/** Refusal prefix when a single-file real path leaves its reference root. */
|
|
15
|
+
export declare const AST_EDIT_OUTSIDE_ROOT_MESSAGE = "AST edit target resolves outside its root";
|
|
16
|
+
/**
|
|
17
|
+
* Native astEdit canonicalizes one file and writes that real path. Directory
|
|
18
|
+
* scans do not follow links. A lexical path inside cwd uses the real cwd as
|
|
19
|
+
* the reference root; an explicit path outside cwd uses its real parent, so a
|
|
20
|
+
* direct file there still applies. Returns the lexical path that would leave
|
|
21
|
+
* that root, if any.
|
|
22
|
+
*/
|
|
23
|
+
export declare function astEditSingleFileOutsideReferenceRoot(cwd: string, candidatePaths: readonly string[], signal?: AbortSignal): Promise<string | undefined>;
|
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
*
|
|
26
26
|
* Destination symlinks are followed: the referent is replaced, the link stays.
|
|
27
27
|
* The referent is re-resolved immediately before publication so a retargeted
|
|
28
|
-
* link cannot silently repoint the write
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
28
|
+
* link cannot silently repoint the write. When the lexical destination sits
|
|
29
|
+
* inside the active explicit artifacts local root (`<artifacts>/local`) or a
|
|
30
|
+
* session-scoped `gjc-local` root, the resolved referent and its parent must
|
|
31
|
+
* remain inside that root (a link there must not redirect the write out of
|
|
32
|
+
* the trust boundary).
|
|
32
33
|
*
|
|
33
34
|
* Staging uses exclusive create (`wx`) so a colliding leftover temp is never
|
|
34
35
|
* truncated or unlinked; only the temp this call created is cleaned on failure.
|
|
@@ -57,9 +58,10 @@ export declare function formatFileWriteError(error: unknown, dest: string, optio
|
|
|
57
58
|
export interface WriteFileAtomicallyOptions {
|
|
58
59
|
/**
|
|
59
60
|
* Trusted root that a resolved symlink referent and its parent must not
|
|
60
|
-
* leave. When omitted,
|
|
61
|
-
*
|
|
62
|
-
*
|
|
61
|
+
* leave. When omitted, a destination inside the active explicit artifacts
|
|
62
|
+
* local root (`<artifacts>/local`) uses that root. Otherwise the helper
|
|
63
|
+
* still enforces the session-scoped `gjc-local` boundary implied by a
|
|
64
|
+
* lexical destination under `<tmpdir>/gjc-local/<session-id>`.
|
|
63
65
|
*/
|
|
64
66
|
trustBoundary?: string;
|
|
65
67
|
/** Platform override used by deterministic retry tests. */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type AwaitingInputKind = "browser_auth" | "device_code";
|
|
2
|
+
export interface AwaitingInputSignal {
|
|
3
|
+
kind: AwaitingInputKind;
|
|
4
|
+
/** Epoch milliseconds when the quiet window elapsed after the match. */
|
|
5
|
+
detectedAt: number;
|
|
6
|
+
}
|
|
7
|
+
/** Cancels a scheduled callback. */
|
|
8
|
+
export type CancelScheduled = () => void;
|
|
9
|
+
export interface AwaitingInputDetectorOptions {
|
|
10
|
+
onDetect: (signal: AwaitingInputSignal) => void;
|
|
11
|
+
/** Quiet window after a match before the signal fires. */
|
|
12
|
+
quietMs?: number;
|
|
13
|
+
/** Injectable scheduler; defaults to `setTimeout`. */
|
|
14
|
+
schedule?: (callback: () => void, ms: number) => CancelScheduled;
|
|
15
|
+
/** Injectable clock; defaults to `Date.now`. */
|
|
16
|
+
now?: () => number;
|
|
17
|
+
}
|
|
18
|
+
export declare const AWAITING_INPUT_QUIET_MS = 3000;
|
|
19
|
+
/** Classify an output tail; `undefined` when it does not look like an auth prompt. */
|
|
20
|
+
export declare function classifyAwaitingInput(tail: string): AwaitingInputKind | undefined;
|
|
21
|
+
export declare class AwaitingInputDetector {
|
|
22
|
+
#private;
|
|
23
|
+
constructor(options: AwaitingInputDetectorOptions);
|
|
24
|
+
/** Feed one streamed output chunk. Any new output restarts the quiet window. */
|
|
25
|
+
push(chunk: string): void;
|
|
26
|
+
/** Stop watching; the command exited or was folded. Never fires afterwards. */
|
|
27
|
+
dispose(): void;
|
|
28
|
+
}
|
|
@@ -3,8 +3,25 @@ export interface BashAllowedPrefixesCheck {
|
|
|
3
3
|
reason?: string;
|
|
4
4
|
}
|
|
5
5
|
export type BashRestrictionProfile = "workflow" | "read-only";
|
|
6
|
+
/** Session identities and workspace the restricted `gjc` command may name. */
|
|
7
|
+
export interface GjcSessionBinding {
|
|
8
|
+
sessionId?: string | null;
|
|
9
|
+
/** Owner identity already on the tool session. Role-agent ralplan writes use it. */
|
|
10
|
+
credentialSessionId?: string | null;
|
|
11
|
+
/** Session workspace. A `--worktree-root` must be this repo, not a foreign one. */
|
|
12
|
+
worktreeRoot: string;
|
|
13
|
+
/** Child cwd. Relative `--worktree-root` resolves against it, as ralplan does. */
|
|
14
|
+
invocationCwd: string;
|
|
15
|
+
}
|
|
6
16
|
export interface BashRestrictionOptions {
|
|
7
17
|
profile?: BashRestrictionProfile;
|
|
18
|
+
gjcSessionBinding?: GjcSessionBinding;
|
|
8
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Workflow restricted bash keeps the lexical prefix check, then runs the resolved
|
|
22
|
+
* executable. Callers also skip the shell snapshot and shell prefix, because a
|
|
23
|
+
* snapshot function can be named for that absolute path.
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeWorkflowBashCommand(command: string, allowedPrefixes: readonly string[] | undefined, options?: BashRestrictionOptions): string | undefined;
|
|
9
26
|
export declare function normalizeReadOnlyBashCommand(command: string): string | undefined;
|
|
10
27
|
export declare function checkBashAllowedPrefixes(command: string, allowedPrefixes: readonly string[] | undefined, options?: BashRestrictionOptions): BashAllowedPrefixesCheck;
|
|
@@ -16,6 +16,10 @@ export interface InternalUrlExpansionOptions {
|
|
|
16
16
|
* Resolve a single skill:// URL to its absolute filesystem path.
|
|
17
17
|
* Does NOT read file content or verify existence.
|
|
18
18
|
*/
|
|
19
|
+
export declare function resolveSkillUrl(url: string, skills: readonly Skill[]): {
|
|
20
|
+
skill: Skill;
|
|
21
|
+
lexicalPath: string;
|
|
22
|
+
};
|
|
19
23
|
export declare function resolveSkillUrlToPath(url: string, skills: readonly Skill[]): string;
|
|
20
24
|
/**
|
|
21
25
|
* Expand all skill:// URIs in a bash command string.
|
|
@@ -7,6 +7,7 @@ import type { RenderResultOptions } from "../extensibility/custom-tools/types";
|
|
|
7
7
|
import { type Theme } from "../modes/theme/theme";
|
|
8
8
|
import { type SdkSpawnArgs } from "../sdk/cli/master-cli";
|
|
9
9
|
import type { ToolSession } from ".";
|
|
10
|
+
import { type AwaitingInputSignal } from "./awaiting-input";
|
|
10
11
|
import { type OutputMeta } from "./output-meta";
|
|
11
12
|
export { STEER_FOLD_GRACE_MS, steerFoldReasonLine } from "./steer-fold";
|
|
12
13
|
export declare const BASH_DEFAULT_PREVIEW_LINES = 10;
|
|
@@ -91,6 +92,12 @@ export interface BashToolDetails {
|
|
|
91
92
|
foldReason?: FoldReason;
|
|
92
93
|
/** The accepted model-declared activity declaration, when the call carried one. */
|
|
93
94
|
activity?: BashActivityDeclaration;
|
|
95
|
+
/**
|
|
96
|
+
* Set on a running (partial) update when the foreground command printed an
|
|
97
|
+
* interactive auth prompt and then went quiet. Carries only the prompt kind,
|
|
98
|
+
* never the URL or code.
|
|
99
|
+
*/
|
|
100
|
+
awaitingInput?: AwaitingInputSignal;
|
|
94
101
|
async?: {
|
|
95
102
|
state: "running" | "completed" | "failed";
|
|
96
103
|
jobId: string;
|
|
@@ -55,8 +55,16 @@ export declare class LazyAgentTool implements AgentTool<any, any, any> {
|
|
|
55
55
|
#private;
|
|
56
56
|
readonly descriptor: ToolDescriptor;
|
|
57
57
|
constructor(descriptor: ToolDescriptor, materialized?: AgentTool<any, any, any>, loader?: () => ToolDescriptorLoadResult, session?: ToolSession);
|
|
58
|
-
/**
|
|
59
|
-
|
|
58
|
+
/** Clear a session-bound materialization after its owning session moves. */
|
|
59
|
+
invalidateForSessionMove(expectedCwd?: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Resolve the underlying implementation. Pre-dispatch hooks (TTSR `astCondition`
|
|
62
|
+
* matching) call this to read implementation-only members such as the matcher
|
|
63
|
+
* hooks before the first `execute` would otherwise load the tool.
|
|
64
|
+
* An arrow property (like `execute`) so session guard proxies can forward it
|
|
65
|
+
* without losing access to the private loader state.
|
|
66
|
+
*/
|
|
67
|
+
readonly materialize: () => Promise<AgentTool<any, any, any>>;
|
|
60
68
|
get name(): string;
|
|
61
69
|
get description(): string;
|
|
62
70
|
get parameters(): TSchema;
|
|
@@ -86,6 +94,11 @@ export declare class LazyAgentTool implements AgentTool<any, any, any> {
|
|
|
86
94
|
get mergeCallAndResult(): boolean | undefined;
|
|
87
95
|
get inline(): boolean | undefined;
|
|
88
96
|
get mode(): any;
|
|
97
|
+
get matcherDigest(): ((args: unknown) => string | undefined) | undefined;
|
|
98
|
+
get matcherEntries(): ((args: unknown) => readonly {
|
|
99
|
+
path: string;
|
|
100
|
+
digest: string;
|
|
101
|
+
}[] | undefined) | undefined;
|
|
89
102
|
readonly execute: AgentTool<any, any, any>["execute"];
|
|
90
103
|
}
|
|
91
104
|
export type EffectiveToolDiscoveryMode = "off" | "mcp-only" | "all";
|
|
@@ -31,7 +31,7 @@ type FetchRenderResult = RenderResult & {
|
|
|
31
31
|
/**
|
|
32
32
|
* Try all special handlers
|
|
33
33
|
*/
|
|
34
|
-
declare function handleSpecialUrls(url: string, timeout: number, signal: AbortSignal | undefined, storage: AgentStorage | null): Promise<FetchRenderResult | null>;
|
|
34
|
+
declare function handleSpecialUrls(url: string, timeout: number, signal: AbortSignal | undefined, storage: AgentStorage | null, settings: Settings): Promise<FetchRenderResult | null>;
|
|
35
35
|
/** Test-only seam for verifying lazy special-handler loading and dispatch. */
|
|
36
36
|
export declare const fetchSpecialHandlerTestHooks: {
|
|
37
37
|
dispatch: typeof handleSpecialUrls;
|
|
@@ -74,6 +74,12 @@ export declare const readUrlCacheTestHooks: {
|
|
|
74
74
|
readonly retainedOutputChars: number;
|
|
75
75
|
reset(): void;
|
|
76
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Publish text at an explicit artifact path the way `ArtifactManager.save` does:
|
|
79
|
+
* a temp file opened with `O_NOFOLLOW` and mode 0600, then rename. A symlink is
|
|
80
|
+
* not followed. A pre-existing regular file is replaced, so mode 0644 is not kept.
|
|
81
|
+
*/
|
|
82
|
+
export declare function publishExplicitArtifactText(destination: string, text: string): Promise<void>;
|
|
77
83
|
export declare function loadReadUrlCacheEntry(session: ToolSession, params: {
|
|
78
84
|
path: string;
|
|
79
85
|
raw?: boolean;
|
|
@@ -317,6 +317,8 @@ export interface ToolSession {
|
|
|
317
317
|
from: string;
|
|
318
318
|
to: string;
|
|
319
319
|
}>;
|
|
320
|
+
/** Live ACP/SDK approval mode. Task children copy this at spawn; absent means `allow`. */
|
|
321
|
+
getSdkPermissionMode?: () => "prompt" | "allow" | "deny";
|
|
320
322
|
/** Bridge to the connected client (e.g. ACP editor host). Tools should route fs/terminal/permission requests through this when available. */
|
|
321
323
|
getClientBridge?: () => ClientBridge | undefined;
|
|
322
324
|
/** Get compact conversation context for subagents (excludes tool results, system prompts) */
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
* mirrors `/btw`: the recipient's current model, system prompt, and message
|
|
10
10
|
* history are used to compute a reply without persisting it through the
|
|
11
11
|
* normal stream path. After the reply is generated, both the incoming
|
|
12
|
-
* message and the auto-reply are
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* message and the auto-reply are injected into the recipient's persisted
|
|
13
|
+
* history: an idle recipient gets them immediately, while a streaming recipient
|
|
14
|
+
* receives them at its next step boundary (the live run's next tool boundary)
|
|
15
|
+
* rather than at the end of its turn — an exchange admitted into a run that ends
|
|
16
|
+
* before that boundary is still appended to the outgoing session's history.
|
|
15
17
|
*
|
|
16
18
|
* This avoids the deadlock that arises when the recipient is blocked on a
|
|
17
19
|
* long-running tool call: the side-channel call does not depend on the
|
|
@@ -14,7 +14,7 @@ export interface SessionPythonToolInput {
|
|
|
14
14
|
/** Resolve the GJC session id used for the kernel owner and transcript paths. */
|
|
15
15
|
getSessionId: () => string | null;
|
|
16
16
|
/** Register cleanup with the current logical session lifecycle. */
|
|
17
|
-
registerSessionCleanup: (cleanup: () => Promise<void> | void) => (() => void) |
|
|
17
|
+
registerSessionCleanup: (cleanup: () => Promise<void> | void) => (() => void) | undefined;
|
|
18
18
|
/** Reject execution after the owning session has begun disposal. */
|
|
19
19
|
assertEvalExecutionAllowed?: () => void;
|
|
20
20
|
/** Track this whole invocation through its transcript append. */
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AgentTool, AgentToolResult } from "@gajae-code/agent-core";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
import type { ToolSession } from "./index";
|
|
4
|
+
declare const reportIssueSchema: z.ZodObject<{
|
|
5
|
+
tool: z.ZodString;
|
|
6
|
+
report: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type ReportIssueToolInput = z.infer<typeof reportIssueSchema>;
|
|
9
|
+
export interface ReportIssueToolDetails {
|
|
10
|
+
recorded: boolean;
|
|
11
|
+
tool: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ToolIssueEntry {
|
|
14
|
+
tool: string;
|
|
15
|
+
report: string;
|
|
16
|
+
model: string | null;
|
|
17
|
+
sessionId: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** Normalize and clamp a report to the stored field limits. */
|
|
20
|
+
export declare function normalizeToolIssue(tool: string, report: string): {
|
|
21
|
+
tool: string;
|
|
22
|
+
report: string;
|
|
23
|
+
};
|
|
24
|
+
/** Append one report to the tool-issue database at `dbPath`. */
|
|
25
|
+
export declare function recordToolIssue(dbPath: string, entry: ToolIssueEntry): Promise<void>;
|
|
26
|
+
export declare class ReportIssueTool implements AgentTool<typeof reportIssueSchema, ReportIssueToolDetails> {
|
|
27
|
+
#private;
|
|
28
|
+
readonly name = "report_issue";
|
|
29
|
+
readonly label = "Report Issue";
|
|
30
|
+
readonly loadMode: "essential";
|
|
31
|
+
readonly description: string;
|
|
32
|
+
readonly parameters: z.ZodObject<{
|
|
33
|
+
tool: z.ZodString;
|
|
34
|
+
report: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
readonly strict = true;
|
|
37
|
+
readonly intent: "omit";
|
|
38
|
+
constructor(session: ToolSession, dbPath?: string);
|
|
39
|
+
execute(_toolCallId: string, params: ReportIssueToolInput): Promise<AgentToolResult<ReportIssueToolDetails>>;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -178,4 +178,27 @@ export declare function capCodePointsAndBytes(text: string, maxCodePoints: numbe
|
|
|
178
178
|
/** Shared cadence for await progress refreshes and rendered last-activity age. */
|
|
179
179
|
export declare const SUBAGENT_ACTIVITY_BUCKET_MS = 5000;
|
|
180
180
|
export declare function subagentAwaitRenderedStateSignature(subagents: readonly SubagentSnapshot[], receipt?: Pick<SubagentToolDetails, "awaitOutcome" | "interrupted">): string;
|
|
181
|
+
/** A running subagent with no activity for longer than this counts as idle in the compact panel. */
|
|
182
|
+
export declare const SUBAGENT_COMPACT_IDLE_MS = 30000;
|
|
183
|
+
/** Group counts behind the compact await panel's single summary line. */
|
|
184
|
+
export interface SubagentGroupSummary {
|
|
185
|
+
running: number;
|
|
186
|
+
idle: number;
|
|
187
|
+
retrying: number;
|
|
188
|
+
queued: number;
|
|
189
|
+
paused: number;
|
|
190
|
+
completed: number;
|
|
191
|
+
failed: number;
|
|
192
|
+
cancelled: number;
|
|
193
|
+
/** Running subagents in provider retry, per provider; drives the degradation warning. */
|
|
194
|
+
retryingByProvider: Record<string, number>;
|
|
195
|
+
}
|
|
196
|
+
export declare function summarizeSubagentGroup(subagents: readonly SubagentSnapshot[], nowMs: number): SubagentGroupSummary;
|
|
197
|
+
/**
|
|
198
|
+
* Rendered-state signature for the compact await panel. It covers only what the
|
|
199
|
+
* compact view shows (group counts and the single degradation row), so per-subagent activity that does not move
|
|
200
|
+
* a count no longer re-emits: the update rate is bounded by count transitions and
|
|
201
|
+
* the liveness interval instead of growing with the number of live subagents.
|
|
202
|
+
*/
|
|
203
|
+
export declare function subagentCompactRenderedStateSignature(subagents: readonly SubagentSnapshot[], nowMs: number, receipt?: Pick<SubagentToolDetails, "awaitOutcome" | "interrupted">): string;
|
|
181
204
|
export {};
|
|
@@ -10,6 +10,8 @@ export type TmuxPaneResolver = (options: {
|
|
|
10
10
|
export interface TmuxSelfInjectionOptions {
|
|
11
11
|
env?: Record<string, string | undefined>;
|
|
12
12
|
cwd?: string;
|
|
13
|
+
/** Effective Bash environment for locating shell-runner scripts; never used for tmux identity. */
|
|
14
|
+
executionEnv?: Record<string, string | undefined>;
|
|
13
15
|
resolvePaneId?: TmuxPaneResolver;
|
|
14
16
|
}
|
|
15
17
|
export declare function checkTmuxSelfInjection(command: string, options?: TmuxSelfInjectionOptions, depth?: number): Promise<TmuxSelfInjectionResult>;
|
|
@@ -11,5 +11,5 @@ export interface UltragoalAskGuardContext {
|
|
|
11
11
|
sessionId?: string | null;
|
|
12
12
|
}
|
|
13
13
|
export declare function formatUltragoalAskBlockMessage(diagnostic: UltragoalAskBlockDiagnostic): string;
|
|
14
|
-
export declare function assertUltragoalAskAllowed(cwd: string, context?: UltragoalAskGuardContext, agentDir?: string): Promise<void>;
|
|
14
|
+
export declare function assertUltragoalAskAllowed(cwd: string, context?: UltragoalAskGuardContext, agentDir?: string, pendingQuestions?: unknown): Promise<void>;
|
|
15
15
|
export declare function guardToolForUltragoalAsk<T extends AgentTool>(tool: T, getCwd: () => string, getContext?: () => UltragoalAskGuardContext, getSessionAgentDir?: () => string | undefined): T;
|
|
@@ -37,6 +37,8 @@ export declare class WriteTool implements AgentTool<typeof writeSchema, WriteToo
|
|
|
37
37
|
readonly concurrency = "exclusive";
|
|
38
38
|
readonly loadMode = "discoverable";
|
|
39
39
|
readonly summary = "Write content to a file (creates or overwrites)";
|
|
40
|
+
/** Stream matchers should see the real file content, not its JSON-escaped argument encoding. */
|
|
41
|
+
matcherDigest(args: unknown): string | undefined;
|
|
40
42
|
constructor(session: ToolSession);
|
|
41
43
|
execute(_toolCallId: string, { path, content }: WriteParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<WriteToolDetails>, context?: AgentToolContext): Promise<AgentToolResult<WriteToolDetails>>;
|
|
42
44
|
}
|
|
@@ -7,6 +7,11 @@ import type { AgentMessage } from "@gajae-code/agent-core";
|
|
|
7
7
|
export declare const DEFAULT_FILE_MENTION_INLINE_BYTES: number;
|
|
8
8
|
/** Extract all @filepath mentions from text */
|
|
9
9
|
export declare function extractFileMentions(text: string): string[];
|
|
10
|
+
/**
|
|
11
|
+
* Compare canonical Windows paths without folding directory names: individual
|
|
12
|
+
* directories can opt into case-sensitive names.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isCanonicalWindowsPathWithin(root: string, candidate: string): boolean;
|
|
10
15
|
/**
|
|
11
16
|
* Generate a FileMentionMessage containing the contents of mentioned files.
|
|
12
17
|
* Returns empty array if no files could be read.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MAX_IMAGE_INPUT_BYTES: number;
|
|
2
|
+
export declare const MAX_STAGED_PROMPT_IMAGES = 16;
|
|
3
|
+
export declare const MAX_PASTED_IMAGE_SOURCE_BYTES: number;
|
|
4
|
+
export declare const MAX_PASTED_IMAGE_OUTPUT_BYTES: number;
|
|
5
|
+
export declare const MAX_PASTED_IMAGE_DIMENSION = 20000;
|
|
6
|
+
export declare const MAX_PASTED_IMAGE_PIXELS = 40000000;
|
|
7
|
+
export declare const MAX_PASTED_IMAGE_DECODED_BYTES: number;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ImageContent } from "@gajae-code/ai/core";
|
|
2
|
-
export declare const MAX_IMAGE_INPUT_BYTES: number;
|
|
3
2
|
export declare const SUPPORTED_INPUT_IMAGE_MIME_TYPES: Set<string>;
|
|
4
3
|
export declare function rasterizeSvgInputBytes(inputBuffer: Uint8Array): Promise<Uint8Array>;
|
|
5
4
|
export interface LoadImageInputOptions {
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import type { ImageContent } from "@gajae-code/ai/core";
|
|
2
2
|
import { type LoadedImageInput, transformImageInputBytes } from "./image-loading";
|
|
3
|
-
export declare const MAX_PASTED_IMAGE_SOURCE_BYTES: number;
|
|
4
|
-
export declare const MAX_PASTED_IMAGE_OUTPUT_BYTES: number;
|
|
5
|
-
export declare const MAX_PASTED_IMAGE_DIMENSION = 20000;
|
|
6
|
-
export declare const MAX_PASTED_IMAGE_PIXELS = 40000000;
|
|
7
|
-
export declare const MAX_PASTED_IMAGE_DECODED_BYTES: number;
|
|
8
3
|
export type PastedImageBatchErrorCode = "too-many" | "unsafe-path" | "unsupported-image" | "source-aggregate-too-large" | "output-aggregate-too-large" | "dimensions-too-large";
|
|
9
4
|
export declare class PastedImageBatchError extends Error {
|
|
10
5
|
readonly code: PastedImageBatchErrorCode;
|
|
@@ -23,6 +18,7 @@ export interface PastedImageLoadingDependencies {
|
|
|
23
18
|
transformImageBytes?: typeof transformImageInputBytes;
|
|
24
19
|
}
|
|
25
20
|
export type PastedImageSourcePolicy = "confirmed" | "automatic-temp";
|
|
21
|
+
export declare function isAnimatedImage(bytes: Buffer, mimeType: string): boolean | undefined;
|
|
26
22
|
export interface LoadPastedImageBatchOptions {
|
|
27
23
|
paths: readonly string[];
|
|
28
24
|
autoResize: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Predict the user's likely next prompt after an agent turn
|
|
3
|
-
*
|
|
2
|
+
* Predict the user's likely next prompt after an agent turn with the `default`
|
|
3
|
+
* model role. Native GJC port of the ghost-text prompt-suggestion behavior
|
|
4
4
|
* from Claude Code: the prediction renders as dim ghost text in the empty
|
|
5
5
|
* composer and Tab accepts it.
|
|
6
6
|
*/
|
|
@@ -6,8 +6,17 @@ import type { Settings } from "../config/settings";
|
|
|
6
6
|
* Build a bounded conversation digest for title regeneration. Regeneration
|
|
7
7
|
* reads several messages so a throwaway first prompt can be corrected, while
|
|
8
8
|
* the automatic first-message path intentionally uses only its initial input.
|
|
9
|
+
* `obfuscateText`, when set, runs on each kept message's full text before the
|
|
10
|
+
* per-message character cut so a secret cannot be split by that cut.
|
|
9
11
|
*/
|
|
10
|
-
export declare function buildConversationTitleInput(messages: readonly AgentMessage[]): string | undefined;
|
|
12
|
+
export declare function buildConversationTitleInput(messages: readonly AgentMessage[], obfuscateText?: (text: string) => string): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Obfuscate the full title input, then truncate, then wrap.
|
|
15
|
+
* A secret that crosses the character cap is replaced before the cut, and the
|
|
16
|
+
* `<user-message>` fence stays outside the truncated body.
|
|
17
|
+
*/
|
|
18
|
+
export declare function prepareTitleOutboundText(firstMessage: string, obfuscateText?: (text: string) => string): string;
|
|
19
|
+
export declare function titleInputObfuscator(settings: Settings, activeCwd?: string): Promise<((text: string) => string) | undefined>;
|
|
11
20
|
/**
|
|
12
21
|
* Generate a title for a session based on the provided user-message input.
|
|
13
22
|
* Automatic titles pass the first user message; regeneration passes a bounded
|
|
@@ -15,15 +24,16 @@ export declare function buildConversationTitleInput(messages: readonly AgentMess
|
|
|
15
24
|
*
|
|
16
25
|
* @param firstMessage The first user message or bounded conversation digest
|
|
17
26
|
* @param registry Model registry
|
|
18
|
-
* @param settings Settings used to resolve the
|
|
27
|
+
* @param settings Settings used to resolve the `default` model role
|
|
19
28
|
* @param sessionId Optional session id for sticky API key selection
|
|
20
29
|
* @param currentModel Current model (used to derive title model)
|
|
21
30
|
* @param metadataResolver Optional resolver evaluated after credential selection
|
|
22
31
|
* to produce request metadata (e.g. user_id for session attribution). Using a
|
|
23
32
|
* resolver instead of a pre-evaluated value ensures the metadata's account_uuid
|
|
24
33
|
* reflects the credential actually selected for this request.
|
|
34
|
+
* @param activeCwd Active session cwd for project-scoped secret lookup.
|
|
25
35
|
*/
|
|
26
|
-
export declare function generateSessionTitle(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined): Promise<string | null>;
|
|
36
|
+
export declare function generateSessionTitle(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined, activeCwd?: string): Promise<string | null>;
|
|
27
37
|
export declare function formatSessionTerminalTitle(sessionName: string | undefined, cwd?: string): string;
|
|
28
38
|
/**
|
|
29
39
|
* Set the terminal title using OSC 0 (sets both tab and window title). Unsupported terminals ignore it.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Settings } from "../../config/settings";
|
|
1
2
|
import type { AgentStorage } from "../../session/agent-storage";
|
|
2
3
|
import type { AddressResolver } from "../insane/url-guard";
|
|
3
4
|
export { formatNumber } from "@gajae-code/utils";
|
|
@@ -11,7 +12,13 @@ export interface RenderResult {
|
|
|
11
12
|
truncated: boolean;
|
|
12
13
|
notes: string[];
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* `settings` is the caller's session settings. Handlers must read through it
|
|
17
|
+
* rather than the process-global singleton: the SDK/ACP host path runs tools
|
|
18
|
+
* without ever calling `Settings.init()`, where a global read throws
|
|
19
|
+
* "Settings not initialized" instead of scraping the page.
|
|
20
|
+
*/
|
|
21
|
+
export type SpecialHandler = (url: string, timeout: number, signal?: AbortSignal, storage?: AgentStorage | null, settings?: Settings) => Promise<RenderResult | null>;
|
|
15
22
|
export declare const MAX_OUTPUT_CHARS = 500000;
|
|
16
23
|
export declare const MAX_BYTES: number;
|
|
17
24
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AuthStorage } from "@gajae-code/ai/core";
|
|
2
2
|
import type { SearchResponse } from "../../../web/search/types";
|
|
3
3
|
import type { SearchParams } from "./base";
|
|
4
4
|
import { SearchProvider } from "./base";
|
|
@@ -14,12 +14,11 @@ export interface CodexSearchParams {
|
|
|
14
14
|
* Executes a web search using OpenAI code provider's built-in web search tool.
|
|
15
15
|
*
|
|
16
16
|
* Default-model behavior:
|
|
17
|
-
* -
|
|
18
|
-
* upstream
|
|
19
|
-
* - Otherwise
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* `gpt-5-codex-mini` first on ChatGPT accounts, which OpenAI rejects.
|
|
17
|
+
* - Use `GJC_OPENAI_CODE_WEB_SEARCH_MODEL` (then `PI_CODEX_WEB_SEARCH_MODEL`)
|
|
18
|
+
* exactly once when configured and surface upstream errors without model retries.
|
|
19
|
+
* - Otherwise intersect current account discovery with GPT-6.1 Sol, then GPT-6 Luna.
|
|
20
|
+
* Fail closed when discovery is unavailable or neither candidate is advertised.
|
|
21
|
+
* Retry the next advertised candidate only for the known unsupported-model 400 family.
|
|
23
22
|
*/
|
|
24
23
|
export declare function searchCodex(params: SearchParams): Promise<SearchResponse>;
|
|
25
24
|
/**
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { AuthStorage } from "@gajae-code/ai/core";
|
|
14
14
|
import type { SearchResponse, SearchSource } from "../../../web/search/types";
|
|
15
|
+
import type { AddressResolver } from "../../insane/url-guard";
|
|
15
16
|
import type { SearchParams } from "./base";
|
|
16
17
|
import { SearchProvider } from "./base";
|
|
17
18
|
export interface InsaneRouteAttempt {
|
|
@@ -35,13 +36,18 @@ interface RouteFailure {
|
|
|
35
36
|
attempts: InsaneRouteAttempt[];
|
|
36
37
|
}
|
|
37
38
|
type RouteResult = RouteSuccess | RouteFailure | null;
|
|
38
|
-
export declare function routeInsanePublicUrl(rawUrl: string, signal?: AbortSignal
|
|
39
|
+
export declare function routeInsanePublicUrl(rawUrl: string, signal?: AbortSignal, resolverOption?: {
|
|
40
|
+
resolver?: AddressResolver;
|
|
41
|
+
}): Promise<RouteResult>;
|
|
39
42
|
/** Execute safe Insane Search public-route discovery. */
|
|
40
43
|
export declare function searchInsane(params: {
|
|
41
44
|
query: string;
|
|
42
45
|
num_results?: number;
|
|
43
46
|
recency?: "day" | "week" | "month" | "year";
|
|
44
47
|
signal?: AbortSignal;
|
|
48
|
+
resolverOption?: {
|
|
49
|
+
resolver?: AddressResolver;
|
|
50
|
+
};
|
|
45
51
|
}): Promise<SearchResponse>;
|
|
46
52
|
/** Keyless provider that ports safe upstream public-route fallbacks only. */
|
|
47
53
|
export declare class InsaneProvider extends SearchProvider {
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
* SEARXNG_BASIC_USERNAME - Optional RFC 7617 Basic auth username
|
|
23
23
|
* SEARXNG_BASIC_PASSWORD - Optional RFC 7617 Basic auth password
|
|
24
24
|
*
|
|
25
|
+
* A project settings endpoint must not receive a credential that exists only in
|
|
26
|
+
* the operator environment. The project file can still authenticate with a
|
|
27
|
+
* credential it sets itself, and an operator endpoint still receives an
|
|
28
|
+
* operator environment credential.
|
|
29
|
+
*
|
|
25
30
|
* Reference: https://docs.searxng.org/dev/search_api.html
|
|
26
31
|
*/
|
|
27
32
|
import type { AuthStorage } from "@gajae-code/ai/core";
|