@gajae-code/coding-agent 0.18.12 → 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 +467 -0
- package/dist/types/capability/rule.d.ts +7 -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/public-command-errors.d.ts +1 -0
- package/dist/types/cli/root-flags.d.ts +0 -12
- package/dist/types/cli/update-cli.d.ts +7 -2
- package/dist/types/cli-main.d.ts +0 -6
- 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 +8 -0
- package/dist/types/commit/map-reduce/index.d.ts +4 -4
- package/dist/types/config/autorouting-tier-map.d.ts +23 -1
- package/dist/types/config/config-hot-reload.d.ts +5 -0
- package/dist/types/config/file-lock.d.ts +44 -2
- package/dist/types/config/model-profile-activation.d.ts +19 -5
- package/dist/types/config/model-registry.d.ts +16 -3
- package/dist/types/config/model-resolver.d.ts +5 -4
- package/dist/types/config/settings-schema.d.ts +11 -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/session.d.ts +11 -2
- package/dist/types/discovery/helpers.d.ts +7 -2
- package/dist/types/edit/index.d.ts +5 -0
- package/dist/types/edit/modes/patch.d.ts +9 -0
- package/dist/types/eval/py/runtime.d.ts +9 -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/ralplan-current-final.d.ts +54 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +5 -0
- 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 +1 -1
- package/dist/types/migrate/adapters/index.d.ts +35 -3
- 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 +69 -2
- 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/prompt-suggestion-controller.d.ts +1 -1
- package/dist/types/modes/utils/host-status.d.ts +15 -11
- package/dist/types/runtime-mcp/project-host-values.d.ts +11 -5
- package/dist/types/sdk/broker/broker-exit.d.ts +1 -1
- package/dist/types/sdk/broker/broker.d.ts +22 -1
- package/dist/types/sdk/broker/ensure.d.ts +5 -2
- package/dist/types/sdk/broker/hop.d.ts +9 -0
- package/dist/types/sdk/broker/lifecycle.d.ts +22 -0
- package/dist/types/sdk/broker/session-index.d.ts +2 -0
- package/dist/types/sdk/broker/transport.d.ts +2 -0
- package/dist/types/sdk/bus/index.d.ts +21 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +7 -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/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 +8 -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-status.d.ts +11 -4
- package/dist/types/session/agent-session.d.ts +50 -8
- package/dist/types/session/session-manager.d.ts +16 -0
- package/dist/types/skill-state/workflow-mutation-guard.d.ts +13 -1
- package/dist/types/slash-commands/helpers/mcp.d.ts +5 -0
- package/dist/types/ssh/ssh-executor.d.ts +8 -1
- package/dist/types/system-prompt.d.ts +3 -2
- package/dist/types/task/role-body.d.ts +11 -0
- package/dist/types/tools/awaiting-input.d.ts +28 -0
- package/dist/types/tools/bash-allowed-prefixes.d.ts +6 -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 +13 -2
- package/dist/types/tools/fetch.d.ts +6 -0
- package/dist/types/tools/irc.d.ts +5 -3
- 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/search/providers/codex.d.ts +6 -7
- package/package.json +9 -8
- package/scripts/acp-conformance-agent.ts +12 -2
- package/scripts/generate-sdk-operation-inventory.ts +16 -0
- package/src/capability/fs.ts +31 -3
- package/src/capability/rule.ts +11 -2
- package/src/cli/append-system-prompt.ts +12 -0
- package/src/cli/args.ts +11 -7
- package/src/cli/customize-doctor-precedence.ts +31 -0
- package/src/cli/customize-doctor.ts +49 -39
- package/src/cli/fast-help.ts +0 -2
- package/src/cli/migrate-cli.ts +14 -3
- package/src/cli/public-command-errors.ts +2 -0
- package/src/cli/root-flags.ts +0 -2
- package/src/cli/update-cli.ts +247 -6
- package/src/commands/harness.ts +25 -15
- package/src/commands/migrate.ts +3 -3
- package/src/commands/sdk.ts +81 -11
- package/src/commit/agentic/agent.ts +6 -6
- package/src/commit/analysis/conventional.ts +14 -5
- package/src/commit/map-reduce/index.ts +7 -7
- package/src/commit/pipeline.ts +12 -12
- package/src/config/autorouting-tier-map.ts +20 -1
- package/src/config/config-file.ts +106 -3
- package/src/config/config-hot-reload.ts +8 -0
- package/src/config/file-lock.ts +1431 -304
- package/src/config/keybindings.ts +154 -7
- package/src/config/model-profile-activation.ts +177 -39
- package/src/config/model-registry.ts +380 -55
- package/src/config/model-resolver.ts +49 -21
- package/src/config/settings-schema.ts +13 -1
- package/src/config/settings.ts +2 -0
- package/src/coordinator-mcp/server.ts +37 -2
- package/src/crash/sanitize.ts +3 -1
- package/src/customization/import.ts +276 -7
- package/src/customization/inventory.ts +24 -8
- package/src/customization/types.ts +1 -0
- package/src/dap/client.ts +3 -2
- package/src/dap/session.ts +161 -36
- package/src/debug/crash-diagnostics.ts +87 -5
- package/src/debug/report-bundle.ts +71 -2
- package/src/discovery/builtin.ts +4 -3
- package/src/discovery/helpers.ts +24 -14
- package/src/edit/index.ts +191 -5
- package/src/edit/modes/patch.ts +27 -0
- package/src/eval/py/runtime.ts +44 -4
- package/src/exec/non-interactive-env.ts +0 -1
- package/src/export/html/index.ts +60 -20
- package/src/export/ttsr.ts +176 -1
- package/src/extensibility/extensions/loader.ts +2 -0
- 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/manager.ts +36 -10
- package/src/extensibility/slash-commands.ts +5 -0
- package/src/gjc-runtime/gc-runtime.ts +4 -1
- package/src/gjc-runtime/launch-tmux.ts +23 -13
- package/src/gjc-runtime/ralplan-current-final.ts +294 -0
- package/src/gjc-runtime/ralplan-runtime.ts +95 -1
- 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 +3 -1
- package/src/internal-urls/artifact-protocol.ts +3 -1
- package/src/internal-urls/docs-index.generated.ts +14 -14
- package/src/internal-urls/local-protocol.ts +28 -3
- 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/main.ts +330 -92
- package/src/memories/index.ts +25 -2
- package/src/migrate/action-planner.ts +517 -2
- package/src/migrate/adapters/claude-code.ts +141 -3
- package/src/migrate/adapters/codex.ts +57 -5
- package/src/migrate/adapters/index.ts +240 -5
- package/src/migrate/adapters/opencode.ts +4 -0
- package/src/migrate/executor.ts +141 -3
- package/src/migrate/hook-module.ts +193 -0
- package/src/migrate/report.ts +45 -1
- package/src/migrate/types.ts +73 -3
- package/src/modes/acp/acp-agent.ts +10 -1
- package/src/modes/components/agent-dashboard.ts +20 -4
- 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/welcome.ts +3 -1
- package/src/modes/controllers/command-controller.ts +271 -16
- 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 +49 -4
- package/src/modes/controllers/runtime-mcp-command-controller.ts +7 -6
- package/src/modes/controllers/selector-controller.ts +14 -1
- package/src/modes/interactive-mode.ts +55 -4
- package/src/modes/prompt-suggestion-controller.ts +1 -1
- package/src/modes/runtime-init.ts +5 -1
- 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/irc.md +1 -1
- package/src/runtime-mcp/manager.ts +8 -3
- package/src/runtime-mcp/project-host-values.ts +12 -8
- package/src/runtime-mcp/tool-bridge.ts +68 -4
- package/src/runtime-mcp/transports/stdio.ts +2 -1
- package/src/sdk/broker/broker-exit.ts +2 -0
- package/src/sdk/broker/broker.ts +143 -4
- package/src/sdk/broker/ensure.ts +74 -6
- package/src/sdk/broker/hop.ts +13 -1
- package/src/sdk/broker/lifecycle-ledger.ts +3 -0
- package/src/sdk/broker/lifecycle.ts +102 -6
- package/src/sdk/broker/session-index.ts +29 -4
- package/src/sdk/broker/transport.ts +17 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +408 -14
- 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 +7 -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 +2 -0
- 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 +1537 -24
- package/src/sdk/host/session-runtime.ts +332 -36
- 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 +14 -1
- package/src/sdk/prompt-status.ts +6 -4
- package/src/sdk/protocol/adapter-validation.ts +28 -1
- package/src/sdk/protocol/operation-inventory.generated.json +160 -0
- package/src/sdk/protocol/operation-registry.ts +33 -3
- package/src/sdk/session.ts +123 -36
- package/src/session/agent-session.ts +1614 -329
- package/src/session/history-storage.ts +182 -12
- package/src/session/internal/managed-session-scope.ts +47 -18
- package/src/session/internal/managed-session-storage.ts +71 -1
- package/src/session/session-manager.ts +90 -5
- package/src/session-import/redact.ts +53 -2
- package/src/skill-state/workflow-mutation-guard.ts +1498 -18
- package/src/slash-commands/builtin-registry.ts +6 -3
- package/src/slash-commands/helpers/mcp.ts +11 -3
- 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 +12 -8
- 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-grep.ts +7 -2
- package/src/tools/auto-generated-guard.ts +12 -3
- package/src/tools/awaiting-input.ts +114 -0
- package/src/tools/bash-allowed-prefixes.ts +61 -1
- package/src/tools/bash-skill-urls.ts +58 -5
- package/src/tools/bash.ts +99 -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 +9 -2
- package/src/tools/descriptors.test.ts +4 -4
- package/src/tools/descriptors.ts +16 -4
- package/src/tools/eval.ts +15 -0
- package/src/tools/fetch.ts +90 -2
- package/src/tools/gh.ts +27 -12
- package/src/tools/image-gen.ts +20 -6
- package/src/tools/irc.ts +5 -3
- package/src/tools/monitor.ts +9 -1
- package/src/tools/output-meta.ts +51 -3
- package/src/tools/read.ts +9 -2
- package/src/tools/recipe/runner.ts +23 -12
- package/src/tools/render-utils.ts +2 -2
- package/src/tools/search.ts +3 -2
- package/src/tools/ssh.ts +274 -8
- package/src/tools/subagent.ts +10 -4
- package/src/tools/tmux-self-injection-guard.ts +3301 -122
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/tools/ultragoal-ask-guard.ts +13 -1
- package/src/tools/write.ts +7 -0
- package/src/tui/tree-list.ts +15 -1
- package/src/utils/commit-message-generator.ts +3 -2
- package/src/utils/external-editor.ts +21 -7
- package/src/utils/file-mentions.ts +46 -6
- 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 +65 -20
- package/src/web/search/index.ts +2 -1
- package/src/web/search/providers/codex.ts +29 -32
|
@@ -305,6 +305,8 @@ export interface AgentSessionConfig {
|
|
|
305
305
|
workflowGatePublication?: "endpoint" | "local";
|
|
306
306
|
/** Tool registry for LSP and settings */
|
|
307
307
|
toolRegistry?: Map<string, AgentTool>;
|
|
308
|
+
/** Publish committed active tool names to tool execution contexts. */
|
|
309
|
+
onToolNamesChanged?: (toolNames: string[]) => void;
|
|
308
310
|
/**
|
|
309
311
|
* Tool objects this session's builder constructed from built-in descriptors, captured
|
|
310
312
|
* before any extension, MCP, or dynamically registered tool could claim their registry
|
|
@@ -372,6 +374,8 @@ export interface AgentSessionConfig {
|
|
|
372
374
|
defaultSelectedMCPServerNames?: string[];
|
|
373
375
|
/** MCP tool names that should seed brand-new sessions created from this AgentSession. */
|
|
374
376
|
defaultSelectedMCPToolNames?: string[];
|
|
377
|
+
/** Conventional autoload MCP names for the current catalog when autoload is not deferred. */
|
|
378
|
+
defaultSelectedConventionalMCPToolNames?: string[];
|
|
375
379
|
/** MCP capabilities that are always active and never part of persisted user selection. */
|
|
376
380
|
mandatoryMCPToolNames?: string[];
|
|
377
381
|
/** TTSR manager for time-traveling stream rules */
|
|
@@ -485,6 +489,10 @@ export interface PromptOptions {
|
|
|
485
489
|
/** Internal host capability; ordinary package callers cannot construct the branded value. */
|
|
486
490
|
sdkRunCapability?: unknown;
|
|
487
491
|
}
|
|
492
|
+
export type QueuedRunStartFailure = {
|
|
493
|
+
readonly disposition: "not-started";
|
|
494
|
+
readonly error: unknown;
|
|
495
|
+
};
|
|
488
496
|
export interface SendUserMessageOptions {
|
|
489
497
|
deliverAs?: QueuedInputDelivery;
|
|
490
498
|
/** Preserve a busy SDK dispatch as queued work across an admission fence. */
|
|
@@ -498,6 +506,8 @@ export interface SendUserMessageOptions {
|
|
|
498
506
|
startsOwnRun?: boolean;
|
|
499
507
|
removed?: boolean;
|
|
500
508
|
}) => void;
|
|
509
|
+
/** Internal positive core refusal, never a provider or teardown failure. */
|
|
510
|
+
onQueuedRunStartFailed?: (failure: QueuedRunStartFailure) => void;
|
|
501
511
|
/** Internal dispatch disposition used before actual queue consumption. */
|
|
502
512
|
onDispatchDisposition?: (promotion: {
|
|
503
513
|
startsOwnRun: boolean;
|
|
@@ -738,6 +748,7 @@ export interface AgentSessionProfileInstalledOverrideState {
|
|
|
738
748
|
manualModelRoles: ReadonlySet<string>;
|
|
739
749
|
manualAgentModelOverrides: ReadonlySet<string>;
|
|
740
750
|
configuredAgentModelOverrides: ReadonlySet<string>;
|
|
751
|
+
configuredDefaultChain?: readonly string[];
|
|
741
752
|
preProfileModel: Model | undefined;
|
|
742
753
|
}
|
|
743
754
|
export interface PreparedProfileModelSelection {
|
|
@@ -817,19 +828,27 @@ export declare class AgentSession {
|
|
|
817
828
|
session_id?: string;
|
|
818
829
|
} | undefined;
|
|
819
830
|
/**
|
|
820
|
-
* Live prompt marker or
|
|
821
|
-
* cwd-local mutation guard must honor after
|
|
831
|
+
* Live prompt marker or durable workflow identity — the effective state the
|
|
832
|
+
* cwd-local mutation guard must honor during and after a workflow prompt.
|
|
822
833
|
*/
|
|
823
834
|
getEffectiveActiveWorkflowSkillState(): {
|
|
824
835
|
skill: string;
|
|
825
836
|
sessionId: string;
|
|
826
837
|
} | undefined;
|
|
838
|
+
/** Refresh durable workflow identity before a terminal or safety-sensitive operation. */
|
|
839
|
+
refreshEffectiveActiveWorkflowSkillState(): Promise<{
|
|
840
|
+
skill: string;
|
|
841
|
+
sessionId: string;
|
|
842
|
+
} | undefined>;
|
|
827
843
|
/** Replace the session-owned MCP manager after a cwd rescope. */
|
|
828
844
|
replaceOwnedMcpManager(next: MCPManager | undefined): Promise<void>;
|
|
829
|
-
/** Swap named custom tools and
|
|
845
|
+
/** Swap named custom tools and restore authoritative MCP selections as late tools arrive. */
|
|
830
846
|
replaceNamedCustomTools(previousNames: readonly string[], nextTools: readonly CustomTool[], options?: {
|
|
831
847
|
mandatoryMCPToolNames?: readonly string[];
|
|
848
|
+
defaultSelectedConventionalMCPToolNames?: readonly string[];
|
|
832
849
|
activateNewTools?: boolean;
|
|
850
|
+
inactiveNewToolNames?: readonly string[];
|
|
851
|
+
persistMCPSelection?: boolean;
|
|
833
852
|
}): Promise<void>;
|
|
834
853
|
/** Best-effort accessor for the active skill's `current_phase` field from
|
|
835
854
|
* its persisted mode-state file. Used by the `skill` tool to enforce the
|
|
@@ -893,6 +912,8 @@ export declare class AgentSession {
|
|
|
893
912
|
* manager's stable control-plane records (they outlive AsyncJob eviction).
|
|
894
913
|
*/
|
|
895
914
|
getSubagentLifecycleStatuses(): SubagentLifecycle[];
|
|
915
|
+
/** Notify UI projections after a committed session-identity transition. */
|
|
916
|
+
notifySessionIdentityChanged(): Promise<void>;
|
|
896
917
|
/**
|
|
897
918
|
* Emit a UI-only notice to the session. Surfaces in interactive mode as a
|
|
898
919
|
* `showWarning` / `showError` / `showStatus` line; non-interactive modes
|
|
@@ -911,6 +932,8 @@ export declare class AgentSession {
|
|
|
911
932
|
* Multiple listeners can be added. Returns unsubscribe function for this listener.
|
|
912
933
|
*/
|
|
913
934
|
subscribe(listener: AgentSessionEventListener): () => void;
|
|
935
|
+
/** Subscribe to committed session identity changes that affect UI projections. */
|
|
936
|
+
subscribeSessionIdentityChanges(listener: () => void | Promise<void>): () => void;
|
|
914
937
|
/**
|
|
915
938
|
* Remove all listeners, flush pending writes, and disconnect from agent.
|
|
916
939
|
* Call this when completely done with the session.
|
|
@@ -996,6 +1019,7 @@ export declare class AgentSession {
|
|
|
996
1019
|
type: "agent_end";
|
|
997
1020
|
}>): void;
|
|
998
1021
|
flushParkedAgentEndForCoordinatorPersistForTests(): void;
|
|
1022
|
+
waitForAgentEndHandlingForTests(): Promise<void>;
|
|
999
1023
|
drainAsyncJobDeliveriesForAcp(options?: {
|
|
1000
1024
|
timeoutMs?: number;
|
|
1001
1025
|
}): Promise<boolean>;
|
|
@@ -1097,6 +1121,11 @@ export declare class AgentSession {
|
|
|
1097
1121
|
* deliberately bypassed: suppression is runtime state, not user authority.
|
|
1098
1122
|
*/
|
|
1099
1123
|
controlExactMcpServer(action: ExactMcpControlAction, name: string): Promise<ExactMcpControlResult | undefined>;
|
|
1124
|
+
/** Whether the current context has committed persisted, constructor, or caller MCP selection authority. */
|
|
1125
|
+
hasCommittedMCPToolSelectionAuthority(): boolean;
|
|
1126
|
+
/** Whether the current context has committed or pending caller MCP selection authority. */
|
|
1127
|
+
hasMCPToolSelectionAuthority(): boolean;
|
|
1128
|
+
getActiveMCPToolNames(): string[];
|
|
1100
1129
|
getSelectedMCPToolNames(): string[];
|
|
1101
1130
|
isToolDiscoveryEnabled(): boolean;
|
|
1102
1131
|
getDiscoverableTools(filter?: {
|
|
@@ -1104,7 +1133,9 @@ export declare class AgentSession {
|
|
|
1104
1133
|
}): DiscoverableTool[];
|
|
1105
1134
|
getDiscoverableToolSearchIndex(): DiscoverableToolSearchIndex;
|
|
1106
1135
|
getSelectedDiscoveredToolNames(): string[];
|
|
1107
|
-
activateDiscoveredTools(toolNames: string[]
|
|
1136
|
+
activateDiscoveredTools(toolNames: string[], options?: {
|
|
1137
|
+
persistMCPSelection?: boolean;
|
|
1138
|
+
}): Promise<string[]>;
|
|
1108
1139
|
/**
|
|
1109
1140
|
* Reload the SSH tool from disk-backed capability discovery and make the
|
|
1110
1141
|
* refreshed definition visible to the next model call without restarting.
|
|
@@ -1117,8 +1148,15 @@ export declare class AgentSession {
|
|
|
1117
1148
|
* Only tools in the registry can be enabled. Unknown tool names are ignored.
|
|
1118
1149
|
* Also rebuilds the system prompt to reflect the new tool set.
|
|
1119
1150
|
* Changes take effect before the next model call.
|
|
1151
|
+
* Use `explicit: false` for internal filtering and `persistMCPSelection: false` when the live
|
|
1152
|
+
* selection must not be written to the session transcript. Internal mode transitions may set
|
|
1153
|
+
* `retryOnMcpCatalogChange` when a catalog publication must not leave their tool swap unapplied.
|
|
1120
1154
|
*/
|
|
1121
|
-
setActiveToolsByName(toolNames: string[]
|
|
1155
|
+
setActiveToolsByName(toolNames: string[], options?: {
|
|
1156
|
+
explicit?: boolean;
|
|
1157
|
+
persistMCPSelection?: boolean;
|
|
1158
|
+
retryOnMcpCatalogChange?: boolean;
|
|
1159
|
+
}): Promise<void>;
|
|
1122
1160
|
/** Rebuild the base system prompt using the current active tool set. */
|
|
1123
1161
|
refreshBaseSystemPrompt(): Promise<void>;
|
|
1124
1162
|
/**
|
|
@@ -1517,9 +1555,12 @@ export declare class AgentSession {
|
|
|
1517
1555
|
cause?: ModelChangeCause;
|
|
1518
1556
|
onMutationStarted?: () => void;
|
|
1519
1557
|
}): Promise<void>;
|
|
1520
|
-
|
|
1558
|
+
/** History may restore the identity without proving this process activated the profile. */
|
|
1559
|
+
setActiveModelProfile(name: string | undefined, activatedByThisProcess?: boolean): void;
|
|
1521
1560
|
markProfileRoleOverrideManual(path: "modelRoles" | "task.agentModelOverrides", role: string): void;
|
|
1522
1561
|
getActiveModelProfile(): string | undefined;
|
|
1562
|
+
/** A restored profile identity is not eligible for role-only materialization until activation succeeds. */
|
|
1563
|
+
getActivatedModelProfile(): string | undefined;
|
|
1523
1564
|
setUnavailableModelProfile(name: string | undefined): void;
|
|
1524
1565
|
getUnavailableModelProfile(): string | undefined;
|
|
1525
1566
|
/** Revision fence for deferred activation after a user model selection. */
|
|
@@ -1553,7 +1594,7 @@ export declare class AgentSession {
|
|
|
1553
1594
|
}, manual?: {
|
|
1554
1595
|
modelRoles: readonly string[];
|
|
1555
1596
|
agentModelOverrides: readonly string[];
|
|
1556
|
-
}): void;
|
|
1597
|
+
}, configuredDefaultChain?: readonly string[]): void;
|
|
1557
1598
|
getProfileInstalledOverrideState(): AgentSessionProfileInstalledOverrideState;
|
|
1558
1599
|
restoreProfileInstalledOverrideState(state: AgentSessionProfileInstalledOverrideState): void;
|
|
1559
1600
|
/** Drop the recorded profile-installed override keys after materialization. */
|
|
@@ -1938,7 +1979,8 @@ export declare class AgentSession {
|
|
|
1938
1979
|
* the reply is generated, both the incoming question and the auto-reply are
|
|
1939
1980
|
* queued for injection into the recipient's persisted history so the model
|
|
1940
1981
|
* sees the exchange on its next turn. Injection happens immediately when the
|
|
1941
|
-
* session is idle
|
|
1982
|
+
* session is idle; a busy session steers the exchange into the live run, which
|
|
1983
|
+
* commits it at its next tool boundary.
|
|
1942
1984
|
*/
|
|
1943
1985
|
respondAsBackground(args: {
|
|
1944
1986
|
from: string;
|
|
@@ -41,6 +41,17 @@ export interface PreparedNewSession {
|
|
|
41
41
|
readonly artifactsDir: string | null;
|
|
42
42
|
readonly managedLegacyLocalMigrationSource: ManagedLegacyLocalMigrationSource | null;
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Resident text is a second plaintext copy of assistant and tool output.
|
|
46
|
+
* A cache root inside a Git worktree can be staged by a later `git add`, so
|
|
47
|
+
* that root stays in memory. Both the lexical directory and the canonical
|
|
48
|
+
* directory are classified: a symlink outside the worktree must not hide a
|
|
49
|
+
* target inside it, and a lexical worktree path stays refused when its
|
|
50
|
+
* canonical target is outside. A missing or non-directory root still reaches
|
|
51
|
+
* the resident-cache trust check when both views are outside a worktree.
|
|
52
|
+
* No existing directory within 64 ancestors, or a resolver error, stays in memory.
|
|
53
|
+
*/
|
|
54
|
+
export declare function residentTextCacheRootAllowsDisk(cacheRoot: string): boolean;
|
|
44
55
|
export interface SessionEntryBase {
|
|
45
56
|
type: string;
|
|
46
57
|
id: string;
|
|
@@ -1092,6 +1103,11 @@ export interface ResolvedSessionMatch {
|
|
|
1092
1103
|
session: SessionInfo;
|
|
1093
1104
|
scope: "local" | "global";
|
|
1094
1105
|
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Equal session id first, the same `id ===` check managed resume already uses.
|
|
1108
|
+
* Prefix matching stays for every other argument, in list order.
|
|
1109
|
+
*/
|
|
1110
|
+
export declare function pickResumableSession(sessions: readonly SessionInfo[], sessionArg: string): SessionInfo | undefined;
|
|
1095
1111
|
export declare function resolveResumableSession(sessionArg: string, cwd: string, sessionDir?: string, storage?: SessionStorage, managedAgentDir?: string): Promise<ResolvedSessionMatch | undefined>;
|
|
1096
1112
|
interface SessionManagerStateSnapshot {
|
|
1097
1113
|
sessionId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentTool } from "@gajae-code/agent-core";
|
|
2
|
-
import { readVisibleSkillActiveState } from "./active-state";
|
|
2
|
+
import { readVisibleSkillActiveState, type SkillActiveEntry } from "./active-state";
|
|
3
3
|
export declare const DEEP_INTERVIEW_MUTATION_BLOCK_MESSAGE = "Deep-interview phase boundary: continue gathering context/questions/risks and emit a handoff/spec before code edits. Mutation tools and patch execution are blocked while deep-interview is active; finalize specs through `gjc deep-interview --write --stage final` or hand off to an execution phase.";
|
|
4
4
|
export declare const WORKFLOW_STATE_MUTATION_BLOCK_MESSAGE = ".gjc workflow state and artifacts are runtime-owned. Agent mutation tools cannot edit `.gjc/**`; use the sanctioned `gjc` CLI instead.";
|
|
5
5
|
export declare const RALPLAN_MUTATION_BLOCK_MESSAGE = "Ralplan planning phase boundary: keep refining the consensus plan and persist plan artifacts through `gjc ralplan --write` (stage scratch files under a temp dir if needed). Product-code mutation tools and patch execution are blocked while ralplan is active; mutate only after the plan is approved and execution begins.";
|
|
@@ -49,6 +49,18 @@ export declare function readWorkflowGuardContext(cwd: string, options?: {
|
|
|
49
49
|
sessionId?: string;
|
|
50
50
|
threadId?: string;
|
|
51
51
|
}): Promise<WorkflowGuardContext>;
|
|
52
|
+
/**
|
|
53
|
+
* Pick the single CURRENT workflow entry among active entries.
|
|
54
|
+
*
|
|
55
|
+
* Steady state has exactly one active workflow skill (handoff demotes the prior
|
|
56
|
+
* to `active:false`, which `listActiveSkills` already filters out). If several
|
|
57
|
+
* are momentarily active, prefer the most-recently-updated entry so a stale
|
|
58
|
+
* planning row (e.g. a still-active ralplan `final`) can never be selected over a
|
|
59
|
+
* newer executor (ultragoal/autoresearch), and a planning *return* (newer `updated_at`)
|
|
60
|
+
* reliably wins. Ties fall back to the resolved top-level `skill`, then to the
|
|
61
|
+
* first entry, matching how the HUD/chain guard pick `activeSkills[0]`.
|
|
62
|
+
*/
|
|
63
|
+
export declare function resolveCurrentWorkflowEntry(entries: SkillActiveEntry[], topLevelSkill: string): SkillActiveEntry;
|
|
52
64
|
export declare function assertWorkflowMutationRawPathsAllowed(input: {
|
|
53
65
|
cwd: string;
|
|
54
66
|
sessionId?: string;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ParsedSlashCommand, SlashCommandResult, SlashCommandRuntime } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* One terminal row for an untrusted MCP server or tool name.
|
|
4
|
+
* Ordinary names are unchanged. Controls, OSC, and line breaks are not.
|
|
5
|
+
*/
|
|
6
|
+
export declare function mcpTerminalLabel(value: string): string;
|
|
2
7
|
/** ACP/text-mode `/mcp` handler. Shared by both dispatchers via the spec. */
|
|
3
8
|
export declare function handleMcpAcp(command: ParsedSlashCommand, runtime: SlashCommandRuntime): Promise<SlashCommandResult>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Settings } from "../config/settings";
|
|
2
|
+
import { type TerminalArtifactPublisher } from "../session/streaming-output";
|
|
2
3
|
import { type SSHConnectionTarget } from "./connection-manager";
|
|
3
4
|
export interface SSHExecutorOptions {
|
|
4
5
|
/** Session settings used for output policy. */
|
|
@@ -16,6 +17,8 @@ export interface SSHExecutorOptions {
|
|
|
16
17
|
/** Artifact path/id for full output storage */
|
|
17
18
|
artifactPath?: string;
|
|
18
19
|
artifactId?: string;
|
|
20
|
+
/** Session-owned publisher for managed sessions without a writable artifact path. */
|
|
21
|
+
artifactPublisher?: TerminalArtifactPublisher;
|
|
19
22
|
}
|
|
20
23
|
export interface SSHResult {
|
|
21
24
|
/** Combined stdout + stderr output (sanitized, possibly truncated) */
|
|
@@ -34,7 +37,11 @@ export interface SSHResult {
|
|
|
34
37
|
outputLines: number;
|
|
35
38
|
/** Number of bytes included in the output text */
|
|
36
39
|
outputBytes: number;
|
|
37
|
-
/** Artifact ID if
|
|
40
|
+
/** Artifact ID if output was saved to artifact storage. */
|
|
38
41
|
artifactId?: string;
|
|
42
|
+
/** Bytes omitted from artifact storage after its hard cap was reached. */
|
|
43
|
+
artifactTruncatedBytes?: number;
|
|
44
|
+
/** Bounded diagnostic when artifact storage failed. */
|
|
45
|
+
artifactFailureDiagnostic?: string;
|
|
39
46
|
}
|
|
40
47
|
export declare function executeSSH(host: SSHConnectionTarget, command: string, options?: SSHExecutorOptions): Promise<SSHResult>;
|
|
@@ -59,8 +59,9 @@ export declare function loadProjectContextFiles(options?: LoadContextFilesOption
|
|
|
59
59
|
depth?: number;
|
|
60
60
|
}>>;
|
|
61
61
|
/**
|
|
62
|
-
* Load the
|
|
63
|
-
*
|
|
62
|
+
* Load the user system prompt customization from SYSTEM.md.
|
|
63
|
+
* A repository SYSTEM.md is untrusted project text. It must not replace the
|
|
64
|
+
* user file or become the customization block.
|
|
64
65
|
*/
|
|
65
66
|
export declare function loadSystemPromptFiles(options?: LoadContextFilesOptions): Promise<string | null>;
|
|
66
67
|
export interface SystemPromptToolMetadata {
|
|
@@ -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;
|
|
@@ -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
|
+
}
|
|
@@ -17,5 +17,11 @@ export interface BashRestrictionOptions {
|
|
|
17
17
|
profile?: BashRestrictionProfile;
|
|
18
18
|
gjcSessionBinding?: GjcSessionBinding;
|
|
19
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;
|
|
20
26
|
export declare function normalizeReadOnlyBashCommand(command: string): string | undefined;
|
|
21
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;
|
|
@@ -57,8 +57,14 @@ export declare class LazyAgentTool implements AgentTool<any, any, any> {
|
|
|
57
57
|
constructor(descriptor: ToolDescriptor, materialized?: AgentTool<any, any, any>, loader?: () => ToolDescriptorLoadResult, session?: ToolSession);
|
|
58
58
|
/** Clear a session-bound materialization after its owning session moves. */
|
|
59
59
|
invalidateForSessionMove(expectedCwd?: string): void;
|
|
60
|
-
/**
|
|
61
|
-
|
|
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>>;
|
|
62
68
|
get name(): string;
|
|
63
69
|
get description(): string;
|
|
64
70
|
get parameters(): TSchema;
|
|
@@ -88,6 +94,11 @@ export declare class LazyAgentTool implements AgentTool<any, any, any> {
|
|
|
88
94
|
get mergeCallAndResult(): boolean | undefined;
|
|
89
95
|
get inline(): boolean | undefined;
|
|
90
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;
|
|
91
102
|
readonly execute: AgentTool<any, any, any>["execute"];
|
|
92
103
|
}
|
|
93
104
|
export type EffectiveToolDiscoveryMode = "off" | "mcp-only" | "all";
|
|
@@ -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;
|
|
@@ -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
|
|
@@ -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,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
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/coding-agent",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"description": "Gajae Code CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
7
|
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
58
58
|
"@babel/parser": "^7.29.3",
|
|
59
59
|
"@mozilla/readability": "^0.6.0",
|
|
60
|
-
"@gajae-code/stats": "0.
|
|
61
|
-
"@gajae-code/agent-core": "0.
|
|
62
|
-
"@gajae-code/ai": "0.
|
|
63
|
-
"@gajae-code/natives": "0.
|
|
64
|
-
"@gajae-code/tui": "0.
|
|
65
|
-
"@gajae-code/utils": "0.
|
|
60
|
+
"@gajae-code/stats": "0.19.0",
|
|
61
|
+
"@gajae-code/agent-core": "0.19.0",
|
|
62
|
+
"@gajae-code/ai": "0.19.0",
|
|
63
|
+
"@gajae-code/natives": "0.19.0",
|
|
64
|
+
"@gajae-code/tui": "0.19.0",
|
|
65
|
+
"@gajae-code/utils": "0.19.0",
|
|
66
66
|
"@puppeteer/browsers": "^2.13.0",
|
|
67
67
|
"@types/turndown": "5.0.6",
|
|
68
68
|
"@xterm/headless": "^6.0.0",
|
|
@@ -91,7 +91,8 @@
|
|
|
91
91
|
"@babel/types": "^7.29.0",
|
|
92
92
|
"@types/babel__traverse": "^7.28.0",
|
|
93
93
|
"@types/bun": "^1.3.14",
|
|
94
|
-
"@types/ws": "^8.5.13"
|
|
94
|
+
"@types/ws": "^8.5.13",
|
|
95
|
+
"fast-check": "4.10.2"
|
|
95
96
|
},
|
|
96
97
|
"engines": {
|
|
97
98
|
"bun": ">=1.4.0"
|