@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
|
@@ -6,12 +6,6 @@ export declare const ROOT_LAUNCH_FLAGS: {
|
|
|
6
6
|
model: FlagDescriptor<"string"> & {
|
|
7
7
|
description: string;
|
|
8
8
|
};
|
|
9
|
-
smol: FlagDescriptor<"string"> & {
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
slow: FlagDescriptor<"string"> & {
|
|
13
|
-
description: string;
|
|
14
|
-
};
|
|
15
9
|
plan: FlagDescriptor<"string"> & {
|
|
16
10
|
description: string;
|
|
17
11
|
};
|
|
@@ -141,12 +135,6 @@ export declare const LAUNCH_PARSE_FLAGS: {
|
|
|
141
135
|
model: FlagDescriptor<"string"> & {
|
|
142
136
|
description: string;
|
|
143
137
|
};
|
|
144
|
-
smol: FlagDescriptor<"string"> & {
|
|
145
|
-
description: string;
|
|
146
|
-
};
|
|
147
|
-
slow: FlagDescriptor<"string"> & {
|
|
148
|
-
description: string;
|
|
149
|
-
};
|
|
150
138
|
plan: FlagDescriptor<"string"> & {
|
|
151
139
|
description: string;
|
|
152
140
|
};
|
|
@@ -101,6 +101,9 @@ export type UpdateTarget = {
|
|
|
101
101
|
} | MigrationUpdateTarget;
|
|
102
102
|
type PathPlatform = NodeJS.Platform;
|
|
103
103
|
type PackageExists = (packageName: string, packageRoot: string) => boolean;
|
|
104
|
+
export declare function resolveProjectLocalPackageInstallForTest(ompPath: string, platform: PathPlatform): {
|
|
105
|
+
packageRoot: string;
|
|
106
|
+
} | undefined;
|
|
104
107
|
export declare function resolveUpdateMethodForTest(ompPath: string, bunBinDir: string | undefined): "bun" | "npm" | "binary";
|
|
105
108
|
export declare function resolveNpmManagedTargetForTest(ompPath: string, platform: PathPlatform, packageExists: PackageExists): PackageManagerTarget | undefined;
|
|
106
109
|
export declare function defaultUserBinaryPath(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): string;
|
|
@@ -184,14 +187,16 @@ export interface BinaryUpdateFlow {
|
|
|
184
187
|
/** Called once fsync has succeeded, right before replacement begins. */
|
|
185
188
|
beforeReplace?(): void;
|
|
186
189
|
}
|
|
190
|
+
export declare function isUpdateStagingNameForTest(targetPath: string, name: string): boolean;
|
|
191
|
+
export declare function isUpdateBackupNameForTest(targetPath: string, name: string): boolean;
|
|
187
192
|
/**
|
|
188
193
|
* Orchestrate download → fsync → replace → verify with a strict ordering
|
|
189
194
|
* contract: the downloaded temp binary MUST be flushed to stable storage
|
|
190
195
|
* before it is published (renamed into place) or exec'd for verification.
|
|
191
196
|
*
|
|
192
197
|
* If fsync fails the temp bytes are not durable, so we abort before
|
|
193
|
-
* replacement/verification
|
|
194
|
-
*
|
|
198
|
+
* replacement/verification. Final cleanup removes the exact staging identity
|
|
199
|
+
* only when no activation record still owns it.
|
|
195
200
|
*/
|
|
196
201
|
export declare function runBinaryUpdateFlow(targetPath: string, url: string, expectedVersion: string, flow: BinaryUpdateFlow): Promise<InstalledVersionVerification>;
|
|
197
202
|
export declare function acquireBinaryUpdateLock(targetPath: string): Promise<() => Promise<void>>;
|
package/dist/types/cli-main.d.ts
CHANGED
|
@@ -27,12 +27,6 @@ export declare class RootHelpCommand extends Command {
|
|
|
27
27
|
model: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
28
28
|
description: string;
|
|
29
29
|
};
|
|
30
|
-
smol: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
31
|
-
description: string;
|
|
32
|
-
};
|
|
33
|
-
slow: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
34
|
-
description: string;
|
|
35
|
-
};
|
|
36
30
|
plan: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
37
31
|
description: string;
|
|
38
32
|
};
|
|
@@ -20,12 +20,6 @@ export default class Index extends Command {
|
|
|
20
20
|
model: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
21
21
|
description: string;
|
|
22
22
|
};
|
|
23
|
-
smol: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
24
|
-
description: string;
|
|
25
|
-
};
|
|
26
|
-
slow: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
27
|
-
description: string;
|
|
28
|
-
};
|
|
29
23
|
plan: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
30
24
|
description: string;
|
|
31
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Import MCP servers, skills, and instructions from other coding agents into GJC.
|
|
2
|
+
* Import MCP servers, skills, slash commands, and instructions from other coding agents into GJC.
|
|
3
3
|
*/
|
|
4
4
|
import { Command } from "@gajae-code/utils/cli";
|
|
5
5
|
export default class Migrate extends Command {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "@gajae-code/utils/cli";
|
|
2
|
+
import { type ProjectEnvSnapshot } from "@gajae-code/utils/env-file";
|
|
2
3
|
import type { Args as ParsedArgs } from "../cli/args";
|
|
3
4
|
import { applyStartupModelProfiles } from "../main";
|
|
4
5
|
import { initializeExtensions } from "../modes/runtime-init";
|
|
@@ -115,6 +116,13 @@ export declare function openLifecycleSessionManager(request: SessionLifecycleLau
|
|
|
115
116
|
* logged and swallowed instead of surfacing as an unhandled rejection.
|
|
116
117
|
*/
|
|
117
118
|
export declare function startMemoryBackendAfterReadiness(start: () => Promise<void>): void;
|
|
119
|
+
/**
|
|
120
|
+
* Cwd-equality test seams accept only an operator value. A project dotenv line,
|
|
121
|
+
* including one Bun expands from `$PWD`, never arms the seam.
|
|
122
|
+
*/
|
|
123
|
+
export declare function sdkCwdEqualityTestSeamActive(name: string, cwd: string, env?: NodeJS.ProcessEnv, snapshots?: readonly ProjectEnvSnapshot[]): boolean;
|
|
124
|
+
/** Copy `env` without project-dotenv values for the four cwd-equality seams. */
|
|
125
|
+
export declare function omitUntrustedSdkCwdEqualitySeams(env: NodeJS.ProcessEnv, snapshots: readonly ProjectEnvSnapshot[]): NodeJS.ProcessEnv;
|
|
118
126
|
/** Runs the same persisted AgentSession bootstrap used by the production CLI. */
|
|
119
127
|
export declare function runSessionHost(timing?: {
|
|
120
128
|
now?: () => number;
|
|
@@ -12,9 +12,9 @@ export interface MapReduceInput {
|
|
|
12
12
|
model: Model<Api>;
|
|
13
13
|
apiKey: string;
|
|
14
14
|
thinkingLevel?: ThinkingLevel;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
secondaryModel: Model<Api>;
|
|
16
|
+
secondaryApiKey: string;
|
|
17
|
+
secondaryThinkingLevel?: ThinkingLevel;
|
|
18
18
|
diff: string;
|
|
19
19
|
stat: string;
|
|
20
20
|
scopeCandidates: string;
|
|
@@ -23,6 +23,6 @@ export interface MapReduceInput {
|
|
|
23
23
|
}
|
|
24
24
|
export declare function shouldUseMapReduce(diff: string, settings?: MapReduceSettings): boolean;
|
|
25
25
|
/**
|
|
26
|
-
* Run map-reduce analysis for large diffs using
|
|
26
|
+
* Run map-reduce analysis for large diffs using the secondary (map) and primary (reduce) models.
|
|
27
27
|
*/
|
|
28
28
|
export declare function runMapReduceAnalysis(input: MapReduceInput): Promise<ConventionalAnalysis>;
|
|
@@ -29,10 +29,14 @@ export type AutoroutingCuratedTierMap = {
|
|
|
29
29
|
};
|
|
30
30
|
export declare const TIER_MAP_VERSION = 1;
|
|
31
31
|
export declare const CURATED_TIER_LABELS: {
|
|
32
|
-
readonly "anthropic/claude-haiku-
|
|
32
|
+
readonly "anthropic/claude-haiku-5-5": readonly [{
|
|
33
33
|
readonly tier: "fast";
|
|
34
34
|
readonly rank: 1;
|
|
35
35
|
}];
|
|
36
|
+
readonly "anthropic/claude-haiku-4-5": readonly [{
|
|
37
|
+
readonly tier: "fast";
|
|
38
|
+
readonly rank: 2;
|
|
39
|
+
}];
|
|
36
40
|
readonly "anthropic/claude-sonnet-5-5": readonly [{
|
|
37
41
|
readonly tier: "balanced";
|
|
38
42
|
readonly rank: 1;
|
|
@@ -132,6 +136,24 @@ export declare const CURATED_TIER_LABELS: {
|
|
|
132
136
|
};
|
|
133
137
|
/** Generated from packages/ai/src/models.json at feature land: 3936 in-scope baseline skips. */
|
|
134
138
|
export declare const TIER_MAP_SKIP_LIST: {
|
|
139
|
+
readonly "amazon-bedrock/anthropic.claude-haiku-5-5": {
|
|
140
|
+
readonly rationale: "Haiku 5.5 Bedrock catalog addition; not yet curated";
|
|
141
|
+
};
|
|
142
|
+
readonly "amazon-bedrock/au.anthropic.claude-haiku-5-5": {
|
|
143
|
+
readonly rationale: "Haiku 5.5 Bedrock catalog addition; not yet curated";
|
|
144
|
+
};
|
|
145
|
+
readonly "amazon-bedrock/eu.anthropic.claude-haiku-5-5": {
|
|
146
|
+
readonly rationale: "Haiku 5.5 Bedrock catalog addition; not yet curated";
|
|
147
|
+
};
|
|
148
|
+
readonly "amazon-bedrock/global.anthropic.claude-haiku-5-5": {
|
|
149
|
+
readonly rationale: "Haiku 5.5 Bedrock catalog addition; not yet curated";
|
|
150
|
+
};
|
|
151
|
+
readonly "amazon-bedrock/jp.anthropic.claude-haiku-5-5": {
|
|
152
|
+
readonly rationale: "Haiku 5.5 Bedrock catalog addition; not yet curated";
|
|
153
|
+
};
|
|
154
|
+
readonly "amazon-bedrock/us.anthropic.claude-haiku-5-5": {
|
|
155
|
+
readonly rationale: "Haiku 5.5 Bedrock catalog addition; not yet curated";
|
|
156
|
+
};
|
|
135
157
|
readonly "amazon-bedrock/au.anthropic.claude-sonnet-5-5": {
|
|
136
158
|
readonly rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated";
|
|
137
159
|
};
|
|
@@ -34,6 +34,11 @@ export declare class ConfigHotReloadWatcher {
|
|
|
34
34
|
start(paths: ConfigHotReloadPaths): Promise<void>;
|
|
35
35
|
/** Rebinds after session or configuration-root changes, fencing old work. */
|
|
36
36
|
rebind(paths: ConfigHotReloadPaths): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Test-only: request the same scan an fs event would schedule. Tests that
|
|
39
|
+
* exercise the watcher cannot rely on platform fs-event delivery timing.
|
|
40
|
+
*/
|
|
41
|
+
__testRequestScan(): void;
|
|
37
42
|
/** Closes all watches and cancels or fences pending and in-flight callbacks. */
|
|
38
43
|
dispose(): void;
|
|
39
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NativeDirectoryTreeResult, NativeExactUnlinkResult } from "@gajae-code/natives";
|
|
1
|
+
import type { NativeDirectoryTreeResult, NativeDirectoryTreeSnapshot, NativeExactUnlinkResult } from "@gajae-code/natives";
|
|
2
2
|
import { renameDirectoryNoReplacePathAsync, renameNoReplacePathAsync } from "@gajae-code/natives";
|
|
3
3
|
export interface FileLockOptions {
|
|
4
4
|
staleMs?: number;
|
|
@@ -15,6 +15,7 @@ export interface FileLockOptions {
|
|
|
15
15
|
previousOwnerHostIds?: readonly string[];
|
|
16
16
|
}
|
|
17
17
|
export type FileLockAcquireReason = "acquire_timeout" | "orphan_transition";
|
|
18
|
+
export type FileLockPublicationFailureCode = "access_denied" | "sharing_violation";
|
|
18
19
|
/**
|
|
19
20
|
* Why the acquire path could not retire a lock directory whose owner it had already
|
|
20
21
|
* proven dead. Attached to `FileLockAcquireError` so a host whose lock-removal path
|
|
@@ -40,17 +41,48 @@ export declare class FileLockAcquireError extends Error {
|
|
|
40
41
|
readonly reason: FileLockAcquireReason;
|
|
41
42
|
readonly orphanPath?: string | undefined;
|
|
42
43
|
readonly removalFailure?: FileLockStaleRemovalFailure | undefined;
|
|
44
|
+
readonly publicationFailureCode?: FileLockPublicationFailureCode | undefined;
|
|
45
|
+
/** True only when exhaustion proved a same-host owner process is live. */
|
|
46
|
+
readonly holderIsLive: boolean;
|
|
43
47
|
readonly code: FileLockAcquireReason;
|
|
44
|
-
constructor(filePath: string, lockPath: string, attempts: number, holder: string, reason?: FileLockAcquireReason, orphanPath?: string | undefined, removalFailure?: FileLockStaleRemovalFailure | undefined
|
|
48
|
+
constructor(filePath: string, lockPath: string, attempts: number, holder: string, reason?: FileLockAcquireReason, orphanPath?: string | undefined, removalFailure?: FileLockStaleRemovalFailure | undefined, publicationFailureCode?: FileLockPublicationFailureCode | undefined,
|
|
49
|
+
/** True only when exhaustion proved a same-host owner process is live. */
|
|
50
|
+
holderIsLive?: boolean);
|
|
51
|
+
}
|
|
52
|
+
export declare class FileLockStagingCleanupError extends Error {
|
|
53
|
+
readonly lockPath: string;
|
|
54
|
+
readonly stagingPath: string;
|
|
55
|
+
readonly code: string | undefined;
|
|
56
|
+
constructor(lockPath: string, stagingPath: string, cause: unknown);
|
|
45
57
|
}
|
|
46
58
|
export declare function isFileLockAcquireTimeout(error: unknown): error is FileLockAcquireError;
|
|
59
|
+
type FileLockStagingFileIdentity = {
|
|
60
|
+
dev: string;
|
|
61
|
+
ino: string;
|
|
62
|
+
};
|
|
63
|
+
type FileLockStagingRootIdentity = {
|
|
64
|
+
rootDev: string;
|
|
65
|
+
rootIno: string;
|
|
66
|
+
treeSnapshot?: NativeDirectoryTreeSnapshot;
|
|
67
|
+
infoFileIdentity?: FileLockStagingFileIdentity;
|
|
68
|
+
};
|
|
47
69
|
export declare const FILE_LOCK_ORPHAN_TRANSITION_ADOPTION_AGE_MS: number;
|
|
48
70
|
/** Release retries cover transient handle denial and a competing exact-removal quarantine cleanup. */
|
|
49
71
|
export declare const FILE_LOCK_RELEASE_RETRY_ATTEMPTS = 20;
|
|
50
72
|
export declare const FILE_LOCK_RELEASE_RETRY_DELAY_MS = 25;
|
|
51
73
|
export declare const FileLockTestHooks: {
|
|
52
74
|
afterParentMkdir?: (lockPath: string) => void | Promise<void>;
|
|
75
|
+
afterStagingInfoWrite?: (stagingPath: string) => void | Promise<void>;
|
|
76
|
+
stagingInfoIdentity?: (infoPath: string, capture: () => Promise<FileLockStagingFileIdentity>) => Promise<FileLockStagingFileIdentity>;
|
|
77
|
+
stagingInfoCleanup?: (infoPath: string, callerFd: number, quarantineName: string) => NativeExactUnlinkResult | Promise<NativeExactUnlinkResult>;
|
|
78
|
+
beforeDetachedLockCleanup?: (detachedPath: string) => boolean | Promise<boolean>;
|
|
79
|
+
afterRemovalOwnerPublish?: (transitionPath: string) => void | Promise<void>;
|
|
80
|
+
afterRemovalTransitionMissing?: (transitionPath: string) => void | Promise<void>;
|
|
81
|
+
afterForeignTransitionMissing?: (transitionPath: string) => void | Promise<void>;
|
|
82
|
+
beforeRemovalRecordUnlink?: (recordPath: string) => boolean | Promise<boolean>;
|
|
53
83
|
beforeRemovalOwnerPublish?: (transitionPath: string) => void | Promise<void>;
|
|
84
|
+
cleanupPendingStaging?: (stagingPath: string) => Promise<void>;
|
|
85
|
+
stagingRootIdentity?: (stagingPath: string) => FileLockStagingRootIdentity | Promise<FileLockStagingRootIdentity>;
|
|
54
86
|
nativePublicationBindings?: () => {
|
|
55
87
|
renameNoReplacePathAsync: typeof renameNoReplacePathAsync;
|
|
56
88
|
renameDirectoryNoReplacePathAsync: typeof renameDirectoryNoReplacePathAsync;
|
|
@@ -59,6 +91,7 @@ export declare const FileLockTestHooks: {
|
|
|
59
91
|
processIncarnation: string | null;
|
|
60
92
|
startTime: string | null;
|
|
61
93
|
};
|
|
94
|
+
processIncarnation?: (pid: number) => string | null;
|
|
62
95
|
nativeQuarantineBindings?: () => NativeFileLockBindings;
|
|
63
96
|
nativeExactRemovalProbe?: () => boolean | Promise<boolean>;
|
|
64
97
|
};
|
|
@@ -177,6 +210,15 @@ type NativeFileLockBindings = {
|
|
|
177
210
|
}, detachOnly?: boolean): NativeExactUnlinkResult;
|
|
178
211
|
};
|
|
179
212
|
export declare function acquireFileLock(filePath: string, options?: FileLockOptions): Promise<() => Promise<void>>;
|
|
213
|
+
/**
|
|
214
|
+
* Describes the retained removal transition blocking `filePath`, if one exists.
|
|
215
|
+
*
|
|
216
|
+
* `acquireFileLock` reports this on exhaustion, but a caller whose own budget
|
|
217
|
+
* aborts the acquisition first would otherwise never learn that a stale
|
|
218
|
+
* transition — not ordinary contention — is what blocked it. Such a caller can
|
|
219
|
+
* ask directly after an abort so the block is surfaced instead of swallowed.
|
|
220
|
+
*/
|
|
221
|
+
export declare function describeRetainedLockTransition(filePath: string, options?: FileLockOptions): Promise<FileLockAcquireError | undefined>;
|
|
180
222
|
/**
|
|
181
223
|
* Serializes all contenders, including callers in the same process. Because this
|
|
182
224
|
* API exposes no ownership token, recursive acquisition is indistinguishable
|
|
@@ -13,8 +13,9 @@ type UserCanonicalVariantSelection = {
|
|
|
13
13
|
type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel" | "sessionId" | "getConfiguredModelChain" | "setConfiguredModelChain"> & {
|
|
14
14
|
credentialSessionId?: string;
|
|
15
15
|
setModelTemporary?: AgentSession["setModelTemporary"];
|
|
16
|
-
setActiveModelProfile?: (name: string | undefined) => void;
|
|
16
|
+
setActiveModelProfile?: (name: string | undefined, activatedByThisProcess?: boolean) => void;
|
|
17
17
|
getActiveModelProfile?: () => string | undefined;
|
|
18
|
+
getActivatedModelProfile?: () => string | undefined;
|
|
18
19
|
/** Record which runtime override keys this activation installed (session-scoped). */
|
|
19
20
|
noteProfileInstalledOverrides?: (modelRoles: readonly string[], agentModelOverrides: readonly string[], preProfileModel: Model<Api> | undefined, baseline?: {
|
|
20
21
|
modelRoles: Readonly<Record<string, ModelSelectorValue>>;
|
|
@@ -25,7 +26,7 @@ type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel
|
|
|
25
26
|
}, manual?: {
|
|
26
27
|
modelRoles: readonly string[];
|
|
27
28
|
agentModelOverrides: readonly string[];
|
|
28
|
-
}) => void;
|
|
29
|
+
}, configuredDefaultChain?: readonly string[]) => void;
|
|
29
30
|
/** Drop the recorded profile-installed override keys (e.g. after materialization). */
|
|
30
31
|
clearProfileInstalledOverrides?: () => void;
|
|
31
32
|
/** Current profile-installed override keys, for deriving the activation base. */
|
|
@@ -52,7 +53,7 @@ type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel
|
|
|
52
53
|
prepareModelSelectionForProfileActivation?: AgentSession["prepareModelSelectionForProfileActivation"];
|
|
53
54
|
commitPreparedProfileModelSelection?: AgentSession["commitPreparedProfileModelSelection"];
|
|
54
55
|
finishPreparedProfileModelSelection?: AgentSession["finishPreparedProfileModelSelection"];
|
|
55
|
-
modelRegistry?: Pick<ModelRegistry, "getSessionCanonicalVariant" | "restoreSessionCanonicalVariant" | "clearCanonicalVariant" | "getAvailable" | "lookupAliasExists" | "resolveModelByLookupAlias" | "authStorage" | "isCredentiallessProvider"> & Partial<Pick<ModelRegistry, "seedCanonicalVariant">>;
|
|
56
|
+
modelRegistry?: Pick<ModelRegistry, "getSessionCanonicalVariant" | "restoreSessionCanonicalVariant" | "clearCanonicalVariant" | "getModelProfile" | "getAvailable" | "lookupAliasExists" | "resolveModelByLookupAlias" | "authStorage" | "isCredentiallessProvider"> & Partial<Pick<ModelRegistry, "seedCanonicalVariant">>;
|
|
56
57
|
getConfiguredModelChainState?: (role: string) => ConfiguredModelChainState | undefined;
|
|
57
58
|
};
|
|
58
59
|
type ConfiguredModelChainState = {
|
|
@@ -69,6 +70,7 @@ type PublishedModelProfileActivationState = {
|
|
|
69
70
|
defaultChainState: ConfiguredModelChainState | undefined;
|
|
70
71
|
defaultFallbackRuntimeState: DefaultFallbackRuntimeState | undefined;
|
|
71
72
|
activeModelProfile: string | undefined;
|
|
73
|
+
activatedModelProfile: string | undefined;
|
|
72
74
|
profileInstalledOverrideState: AgentSessionProfileInstalledOverrideState | undefined;
|
|
73
75
|
sessionDefaultModel: string | undefined;
|
|
74
76
|
persistedModelRoles: Readonly<Record<string, ModelSelectorValue>> | undefined;
|
|
@@ -147,6 +149,7 @@ export interface PreparedModelProfileActivation {
|
|
|
147
149
|
manualModelRoleOverrides: ReadonlySet<string>;
|
|
148
150
|
manualAgentModelOverrides: ReadonlySet<string>;
|
|
149
151
|
previousActiveModelProfile: string | undefined;
|
|
152
|
+
previousActivatedModelProfile: string | undefined;
|
|
150
153
|
/**
|
|
151
154
|
* The session resume default ("provider/id") captured BEFORE activation —
|
|
152
155
|
* the model resume would restore prior to this profile. Snapshotted
|
|
@@ -169,16 +172,26 @@ export interface PreparedModelProfileActivation {
|
|
|
169
172
|
modelRegistry: PrepareModelProfileActivationOptions["modelRegistry"];
|
|
170
173
|
}
|
|
171
174
|
export interface MaterializeModelProfileAssignmentOptions {
|
|
172
|
-
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides">;
|
|
175
|
+
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getActivatedModelProfile" | "getProfileInstalledOverrideState" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides">;
|
|
173
176
|
settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "getOverride" | "override" | "set" | "unset">;
|
|
174
177
|
role: GjcModelAssignmentTargetId;
|
|
175
178
|
selector: string;
|
|
176
179
|
}
|
|
177
180
|
export interface MaterializeModelProfileAssignmentsOptions {
|
|
178
|
-
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides">;
|
|
181
|
+
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getActivatedModelProfile" | "getProfileInstalledOverrideState" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides">;
|
|
179
182
|
settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "getOverride" | "override" | "set" | "unset">;
|
|
180
183
|
assignments: ReadonlyMap<GjcModelAssignmentTargetId, string> | Partial<Record<GjcModelAssignmentTargetId, string>>;
|
|
181
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Resolve the profile a materialization may consume.
|
|
187
|
+
*
|
|
188
|
+
* Only a profile this process actually activated owns role-only materialization.
|
|
189
|
+
* A persisted profile whose activation failed or was only restored from history
|
|
190
|
+
* stays in place. An explicit default selection may supersede that durable profile.
|
|
191
|
+
*/
|
|
192
|
+
export declare function resolveMaterializationProfileIdentity(activatedProfile: string | undefined, durableProfile: string | undefined, includesDefault: boolean): string | undefined;
|
|
193
|
+
/** Resolve startup-override materialization in activated-chain, profile, then global-default order. */
|
|
194
|
+
export declare function resolveMaterializedDefaultSelector(activatedDefaultChain: readonly string[] | undefined, profileDefault: ModelSelectorValue | undefined, globalDefault: ModelSelectorValue | undefined): ModelSelectorValue | undefined;
|
|
182
195
|
export declare function materializeActiveModelProfileAssignment(options: MaterializeModelProfileAssignmentOptions): boolean;
|
|
183
196
|
export declare function materializeActiveModelProfileAssignments(options: MaterializeModelProfileAssignmentsOptions): boolean;
|
|
184
197
|
export declare class ModelProfileCredentialError extends Error {
|
|
@@ -322,6 +335,7 @@ export interface MaterializeModelProfileForDeletionResult {
|
|
|
322
335
|
previousDefaultProfile: string | undefined;
|
|
323
336
|
previousPersistedDefaultProfile: string | undefined;
|
|
324
337
|
previousActiveModelProfile: string | undefined;
|
|
338
|
+
previousActivatedModelProfile: string | undefined;
|
|
325
339
|
previousDefaultChainState: ConfiguredModelChainState | undefined;
|
|
326
340
|
previousDefaultFallbackRuntimeState: DefaultFallbackRuntimeState | undefined;
|
|
327
341
|
previousProfileInstalledOverrideState: AgentSessionProfileInstalledOverrideState | undefined;
|
|
@@ -380,6 +380,8 @@ export interface CanonicalModelSelection {
|
|
|
380
380
|
record: CanonicalModelRecord;
|
|
381
381
|
model: Model<Api> | undefined;
|
|
382
382
|
}
|
|
383
|
+
/** Internal pure parser shared by discovery; exported for regression coverage. */
|
|
384
|
+
export declare function extractGoogleOAuthProjectId(value: string | undefined, accessToken: string): string | undefined;
|
|
383
385
|
export interface ModelsConfigReloadCandidate {
|
|
384
386
|
readonly valid: boolean;
|
|
385
387
|
readonly changed: boolean;
|
|
@@ -460,9 +462,10 @@ export declare class ModelRegistry {
|
|
|
460
462
|
getConfiguredModelBindings(): ConfiguredModelBindings | undefined;
|
|
461
463
|
/**
|
|
462
464
|
* Get all models (embedded + accepted registry + custom).
|
|
465
|
+
* Supplying a credential session selects only that session's Google OAuth discovery catalog.
|
|
463
466
|
* If models.yml had errors, returns embedded plus accepted registry models.
|
|
464
467
|
*/
|
|
465
|
-
getAll(): Model<Api>[];
|
|
468
|
+
getAll(credentialSessionId?: string): Model<Api>[];
|
|
466
469
|
/** Provider ids declared in models.yml, including override-only providers. */
|
|
467
470
|
getConfiguredProviderIds(): readonly string[];
|
|
468
471
|
/** Configured API-key sources in models.yml precedence order, excluding absent environment values. */
|
|
@@ -600,8 +603,9 @@ export declare class ModelRegistry {
|
|
|
600
603
|
* is authoritative for visibility: live discovery only enriches entries and
|
|
601
604
|
* adds unknown ids, and never removes a bundled model. A provider that cannot
|
|
602
605
|
* serve a model reports its own error when the model is used.
|
|
606
|
+
* Without a credential session, project-scoped Google OAuth discoveries are omitted.
|
|
603
607
|
*/
|
|
604
|
-
getAvailable(): Model<Api>[];
|
|
608
|
+
getAvailable(credentialSessionId?: string): Model<Api>[];
|
|
605
609
|
getActiveProviders(): ActiveProviderDescriptor[];
|
|
606
610
|
/**
|
|
607
611
|
* Check whether auth is configured for a model's provider.
|
|
@@ -630,7 +634,7 @@ export declare class ModelRegistry {
|
|
|
630
634
|
/**
|
|
631
635
|
* Find a model by provider and ID.
|
|
632
636
|
*/
|
|
633
|
-
find(provider: string, modelId: string): Model<Api> | undefined;
|
|
637
|
+
find(provider: string, modelId: string, credentialSessionId?: string): Model<Api> | undefined;
|
|
634
638
|
/**
|
|
635
639
|
* Get the base URL associated with a provider, if any model defines one.
|
|
636
640
|
*/
|
|
@@ -647,6 +651,15 @@ export declare class ModelRegistry {
|
|
|
647
651
|
preferredCredentialSelector?: AuthCredentialSelector;
|
|
648
652
|
signal?: AbortSignal;
|
|
649
653
|
}): Promise<string | undefined>;
|
|
654
|
+
/** Get a model API key together with the stored row that resolved it, when any. */
|
|
655
|
+
getApiKeyWithCredentialRowId(model: Model<Api>, sessionId?: string, options?: {
|
|
656
|
+
credentialSelector?: AuthCredentialSelector;
|
|
657
|
+
preferredCredentialSelector?: AuthCredentialSelector;
|
|
658
|
+
signal?: AbortSignal;
|
|
659
|
+
}): Promise<{
|
|
660
|
+
apiKey: string | undefined;
|
|
661
|
+
credentialRowId: number | undefined;
|
|
662
|
+
}>;
|
|
650
663
|
/**
|
|
651
664
|
* Get API key for a provider (e.g., "openai").
|
|
652
665
|
*/
|
|
@@ -144,7 +144,7 @@ export declare function resolveModelFromSettings(options: {
|
|
|
144
144
|
/**
|
|
145
145
|
* Resolve a list of override patterns to the first matching model.
|
|
146
146
|
*/
|
|
147
|
-
export declare function resolveModelOverride(modelPatterns: string[], modelRegistry: ModelLookupRegistry, settings?: Settings, sessionId?: string, aliasIntent?: "preset-equivalent" | "reject"): {
|
|
147
|
+
export declare function resolveModelOverride(modelPatterns: string[], modelRegistry: ModelLookupRegistry, settings?: Settings, sessionId?: string, aliasIntent?: "preset-equivalent" | "reject", credentialSessionId?: string): {
|
|
148
148
|
model?: Model<Api>;
|
|
149
149
|
thinkingLevel?: ThinkingLevel;
|
|
150
150
|
explicitThinkingLevel: boolean;
|
|
@@ -247,7 +247,7 @@ export declare function resolveRoleSelection(roles: readonly string[], settings:
|
|
|
247
247
|
* For each non-glob pattern, alias IDs are preferred over dated versions; otherwise
|
|
248
248
|
* the latest dated version is selected.
|
|
249
249
|
*/
|
|
250
|
-
export declare function resolveModelScope(patterns: string[], modelRegistry: Pick<ModelRegistry, "getAvailable" | "getCanonicalVariants">, preferences?: ModelMatchPreferences): Promise<ScopedModel[]>;
|
|
250
|
+
export declare function resolveModelScope(patterns: string[], modelRegistry: Pick<ModelRegistry, "getAvailable" | "getCanonicalVariants">, preferences?: ModelMatchPreferences, credentialSessionId?: string): Promise<ScopedModel[]>;
|
|
251
251
|
/**
|
|
252
252
|
* Resolve the set of models a session is allowed to use, given the active
|
|
253
253
|
* settings. Starts from `modelRegistry.getAvailable()` (so disabled providers
|
|
@@ -260,7 +260,7 @@ export declare function resolveModelScope(patterns: string[], modelRegistry: Pic
|
|
|
260
260
|
* model matches any pattern — callers MUST treat this as "no usable model"
|
|
261
261
|
* rather than falling back to the global default (see issue #1022).
|
|
262
262
|
*/
|
|
263
|
-
export declare function resolveAllowedModels(modelRegistry: Pick<ModelRegistry, "getAvailable" | "getCanonicalVariants">, settings: Settings | undefined, preferences?: ModelMatchPreferences): Promise<Model<Api>[]>;
|
|
263
|
+
export declare function resolveAllowedModels(modelRegistry: Pick<ModelRegistry, "getAvailable" | "getCanonicalVariants">, settings: Settings | undefined, preferences?: ModelMatchPreferences, credentialSessionId?: string): Promise<Model<Api>[]>;
|
|
264
264
|
export interface ResolveCliModelResult {
|
|
265
265
|
model: Model<Api> | undefined;
|
|
266
266
|
selector?: string;
|
|
@@ -297,11 +297,12 @@ export declare function findInitialModel(options: {
|
|
|
297
297
|
defaultModelId?: string;
|
|
298
298
|
defaultThinkingSelector?: ThinkingLevel;
|
|
299
299
|
modelRegistry: InitialModelRegistry;
|
|
300
|
+
credentialSessionId?: string;
|
|
300
301
|
}): Promise<InitialModelResult>;
|
|
301
302
|
/**
|
|
302
303
|
* Restore model from session, with fallback to available models
|
|
303
304
|
*/
|
|
304
|
-
export declare function restoreModelFromSession(savedProvider: string, savedModelId: string, currentModel: Model<Api> | undefined, shouldPrintMessages: boolean, modelRegistry: RestorableModelRegistry): Promise<{
|
|
305
|
+
export declare function restoreModelFromSession(savedProvider: string, savedModelId: string, currentModel: Model<Api> | undefined, shouldPrintMessages: boolean, modelRegistry: RestorableModelRegistry, credentialSessionId?: string): Promise<{
|
|
305
306
|
model: Model<Api> | undefined;
|
|
306
307
|
fallbackMessage: string | undefined;
|
|
307
308
|
}>;
|
|
@@ -249,6 +249,12 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
249
249
|
readonly description: "Grace period before a master-spawned child orphaned by confirmed master loss is closed.";
|
|
250
250
|
readonly validate: (value: number) => boolean;
|
|
251
251
|
};
|
|
252
|
+
readonly "sdk.brokerAbandonedGraceMs": {
|
|
253
|
+
readonly type: "number";
|
|
254
|
+
readonly default: 120000;
|
|
255
|
+
readonly description: "Grace before a detached broker with no client connection, no live session host, and no open spawn authority exits on its own. A supervised `gjc sdk broker run` service never reaps itself.";
|
|
256
|
+
readonly validate: (value: number) => boolean;
|
|
257
|
+
};
|
|
252
258
|
readonly "notifications.enabled": {
|
|
253
259
|
readonly type: "boolean";
|
|
254
260
|
readonly default: false;
|
|
@@ -1902,7 +1908,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1902
1908
|
readonly ui: {
|
|
1903
1909
|
readonly tab: "interaction";
|
|
1904
1910
|
readonly label: "Prompt Suggestions";
|
|
1905
|
-
readonly description: "Predict your likely next prompt after each turn (
|
|
1911
|
+
readonly description: "Predict your likely next prompt after each turn (one extra default-role model call) and show it as ghost text; Tab accepts";
|
|
1906
1912
|
};
|
|
1907
1913
|
};
|
|
1908
1914
|
readonly "startup.quiet": {
|
|
@@ -3903,6 +3909,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3903
3909
|
readonly type: "array";
|
|
3904
3910
|
readonly default: string[];
|
|
3905
3911
|
};
|
|
3912
|
+
readonly "mcp.discoveryDeferAutoload": {
|
|
3913
|
+
readonly type: "boolean";
|
|
3914
|
+
readonly default: false;
|
|
3915
|
+
};
|
|
3906
3916
|
readonly "mcp.notifications": {
|
|
3907
3917
|
readonly type: "boolean";
|
|
3908
3918
|
readonly default: false;
|
|
@@ -125,6 +125,10 @@ interface CoordinatorEventInput {
|
|
|
125
125
|
payloadRef?: string | null;
|
|
126
126
|
metadata?: Record<string, unknown>;
|
|
127
127
|
}
|
|
128
|
+
/** Test-only access for generated normalization and truncation properties. */
|
|
129
|
+
export declare function webhookEventDiagnosticTokenForTest(eventId: string, maxLength: number): string;
|
|
130
|
+
/** Test-only access for diagnostic record boundary coverage. */
|
|
131
|
+
export declare function appendEventWebhookDiagnosticForTest(namespaceDir: string, eventId: string, error: unknown): Promise<void>;
|
|
128
132
|
/** Test-only helper that waits for startup replay and queued deliveries in a namespace. */
|
|
129
133
|
export declare function awaitEventWebhookDeliveriesForTest(namespaceDir: string): Promise<void>;
|
|
130
134
|
/** Test-only helper that waits for queued Codex wake publishes in a namespace. */
|
|
@@ -14,6 +14,8 @@ export interface BuildImportPreviewOptions {
|
|
|
14
14
|
* plan. Pure reads only — nothing is written until `applyImport`.
|
|
15
15
|
*/
|
|
16
16
|
export declare function buildImportPreview(options: BuildImportPreviewOptions): Promise<ImportPlan>;
|
|
17
|
+
/** Lexical shape of an import destination. Symlink checks are separate. */
|
|
18
|
+
export declare function importDestinationShapeAllowed(root: string, target: string): boolean;
|
|
17
19
|
/**
|
|
18
20
|
* Apply a confirmed plan. The transaction contract:
|
|
19
21
|
*
|
|
@@ -24,7 +24,7 @@ export declare const IMPORT_SOURCE_SCOPES: readonly ImportSourceScope[];
|
|
|
24
24
|
export declare function productLabel(product: ImportProduct): string;
|
|
25
25
|
export declare function sourceScopeLabel(scope: ImportSourceScope): string;
|
|
26
26
|
export declare function sourceConfigDir(product: ImportProduct, sourceScope: ImportSourceScope, projectCwd: string, homeDir: string): string;
|
|
27
|
-
export type InventoryStatus = "enabled" | "disabled" | "invalid" | "shadowed" | "quarantined" | "imported" | "restart-required";
|
|
27
|
+
export type InventoryStatus = "enabled" | "stored-only" | "disabled" | "invalid" | "shadowed" | "quarantined" | "imported" | "restart-required";
|
|
28
28
|
export interface InventoryRow {
|
|
29
29
|
/** Stable row identity: `<surface>:<scope>:<path>` */
|
|
30
30
|
id: string;
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import type { DapAttachSessionOptions, DapBreakpointRecord, DapCapabilities, DapContinueOutcome, DapDataBreakpointInfoResponse, DapDataBreakpointRecord, DapDisassembledInstruction, DapEvaluateArguments, DapEvaluateResponse, DapFunctionBreakpointRecord, DapInstructionBreakpointRecord, DapLaunchSessionOptions, DapModule, DapSessionSummary, DapSource, DapStackFrame, DapThread } from "./types";
|
|
2
|
+
/** Test seam: pauses after cwd containment and before the debuggee spawn. */
|
|
3
|
+
export declare const runInTerminalTestHooks: {
|
|
4
|
+
beforeSpawn?: () => Promise<void>;
|
|
5
|
+
};
|
|
2
6
|
export interface DapOutputSnapshot {
|
|
3
7
|
snapshot: DapSessionSummary;
|
|
4
8
|
output: string;
|
|
5
9
|
}
|
|
10
|
+
export declare function cwdEscapesWorkspace(root: string, candidate: string): boolean;
|
|
6
11
|
export declare class DapSessionManager {
|
|
7
12
|
#private;
|
|
8
13
|
constructor();
|
|
9
14
|
getActiveSession(): DapSessionSummary | null;
|
|
10
15
|
listSessions(): DapSessionSummary[];
|
|
11
16
|
getCapabilities(): DapCapabilities | null;
|
|
12
|
-
launch(options: DapLaunchSessionOptions
|
|
13
|
-
|
|
17
|
+
launch(options: DapLaunchSessionOptions & {
|
|
18
|
+
workspace?: string;
|
|
19
|
+
}, signal?: AbortSignal, timeoutMs?: number): Promise<DapSessionSummary>;
|
|
20
|
+
attach(options: DapAttachSessionOptions & {
|
|
21
|
+
workspace?: string;
|
|
22
|
+
}, signal?: AbortSignal, timeoutMs?: number): Promise<DapSessionSummary>;
|
|
14
23
|
setBreakpoint(file: string, line: number, condition?: string, signal?: AbortSignal, timeoutMs?: number): Promise<{
|
|
15
24
|
snapshot: DapSessionSummary;
|
|
16
25
|
breakpoints: DapBreakpointRecord[];
|
|
@@ -93,8 +93,12 @@ export declare function getUserSkillScanDirs(home: string, userAgentDir?: string
|
|
|
93
93
|
*/
|
|
94
94
|
export declare function getProjectPath(ctx: LoadContext, source: SourceId, subpath: string): string | null;
|
|
95
95
|
/** Build the filesystem authority for a provider read. */
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
type DiscoveryReadContext = Pick<LoadContext, "home" | "isolatedHome" | "userAgentDir" | "homeIdentity" | "userAgentIdentity" | "bypassCache"> & {
|
|
97
|
+
repoRoot?: string | null;
|
|
98
|
+
cwd?: string;
|
|
99
|
+
};
|
|
100
|
+
export declare function getReadOptions(ctx: DiscoveryReadContext, scope: ReadScope): ReadFileOptions | undefined;
|
|
101
|
+
export declare function getReadOptionsForContainment(ctx: DiscoveryReadContext, scope: ReadScope, containmentRoot?: string): Promise<ReadFileOptions | undefined>;
|
|
98
102
|
/**
|
|
99
103
|
* Create source metadata for an item.
|
|
100
104
|
*/
|
|
@@ -336,3 +340,4 @@ export declare function preloadPluginRoots(home: string, cwd?: string): Promise<
|
|
|
336
340
|
* Returns empty array if preloadPluginRoots() hasn't been called.
|
|
337
341
|
*/
|
|
338
342
|
export declare function getPreloadedPluginRoots(): readonly ClaudePluginRoot[];
|
|
343
|
+
export {};
|
|
@@ -41,6 +41,11 @@ export declare class EditTool implements AgentTool<TInput> {
|
|
|
41
41
|
get mode(): EditMode;
|
|
42
42
|
get description(): string;
|
|
43
43
|
get parameters(): TInput;
|
|
44
|
+
matcherDigest(args: unknown): string | undefined;
|
|
45
|
+
matcherEntries(args: unknown): readonly {
|
|
46
|
+
path: string;
|
|
47
|
+
digest: string;
|
|
48
|
+
}[] | undefined;
|
|
44
49
|
/**
|
|
45
50
|
* When in `apply_patch` mode, expose the OpenAI code backend Lark grammar so providers
|
|
46
51
|
* that support OpenAI-style custom tools can emit a grammar-constrained
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { AgentToolResult } from "@gajae-code/agent-core";
|
|
8
8
|
import * as z from "zod/v4";
|
|
9
|
+
import type { Settings } from "../../config/settings";
|
|
9
10
|
import { type WritethroughCallback, type WritethroughDeferredHandle } from "../../lsp";
|
|
10
11
|
import type { ToolSession } from "../../tools";
|
|
11
12
|
import type { EditToolDetails, LspBatchRequest } from "../renderer";
|
|
@@ -53,6 +54,14 @@ export interface ApplyPatchOptions {
|
|
|
53
54
|
/** Explicit artifacts `local` root for this call. The caller session owns it. */
|
|
54
55
|
localRoot?: string;
|
|
55
56
|
signal?: AbortSignal;
|
|
57
|
+
/**
|
|
58
|
+
* Recheck a rename destination while this call holds the path mutation lock.
|
|
59
|
+
* The request preflight runs before that lock.
|
|
60
|
+
*/
|
|
61
|
+
destinationGuard?: {
|
|
62
|
+
settings: Pick<Settings, "get">;
|
|
63
|
+
displayPath: string;
|
|
64
|
+
};
|
|
56
65
|
}
|
|
57
66
|
/** Default filesystem implementation using Bun APIs */
|
|
58
67
|
export declare const defaultFileSystem: FileSystem;
|
|
@@ -9,6 +9,15 @@ export interface PythonRuntimeLifecycleOptions {
|
|
|
9
9
|
signal?: AbortSignal;
|
|
10
10
|
deadlineMs?: number;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A workspace `.venv` or `venv` directory is repository content. Use it only when
|
|
14
|
+
* it is a real virtualenv (`pyvenv.cfg`) whose interpreter file resolves outside
|
|
15
|
+
* the project. An in-tree script or binary is not an interpreter.
|
|
16
|
+
*
|
|
17
|
+
* True when `candidate` is `root` or a descendant after `path.resolve`.
|
|
18
|
+
* A name such as `..payload` stays inside. Only `..` and a parent segment escape.
|
|
19
|
+
*/
|
|
20
|
+
export declare function workspacePathContained(root: string, candidate: string): boolean;
|
|
12
21
|
export interface PythonRuntime {
|
|
13
22
|
/** Path to python executable */
|
|
14
23
|
pythonPath: string;
|