@gajae-code/coding-agent 0.15.5 → 0.15.6
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 +26 -1
- package/dist/types/async/job-manager.d.ts +83 -0
- package/dist/types/cli/auth-gateway-cli.d.ts +17 -0
- package/dist/types/cli/model-presets-cli.d.ts +9 -0
- package/dist/types/cli/update-cli.d.ts +2 -0
- package/dist/types/commands/auth-gateway.d.ts +3 -0
- package/dist/types/commands/gc.d.ts +13 -0
- package/dist/types/commands/model-presets.d.ts +21 -0
- package/dist/types/config/autorouting-tier-map.d.ts +96 -0
- package/dist/types/config/file-lock.d.ts +49 -2
- package/dist/types/config/internal/model-preset-registry-test-state.d.ts +4 -0
- package/dist/types/config/internal/model-preset-registry-test-support.d.ts +3 -0
- package/dist/types/config/keybindings.d.ts +3 -2
- package/dist/types/config/model-preset-registry.d.ts +368 -0
- package/dist/types/config/model-profile-activation.d.ts +39 -0
- package/dist/types/config/model-profiles.d.ts +5 -3
- package/dist/types/config/model-registry.d.ts +11 -5
- package/dist/types/config/settings-schema.d.ts +9 -0
- package/dist/types/coordinator-mcp/model-preset.d.ts +7 -5
- package/dist/types/coordinator-mcp/projection-scan.d.ts +46 -0
- package/dist/types/extensibility/extensions/types.d.ts +2 -5
- package/dist/types/gjc-runtime/empty-delete-gc.d.ts +58 -0
- package/dist/types/gjc-runtime/gc-runtime.d.ts +2 -0
- package/dist/types/gjc-runtime/session-state-lock.d.ts +35 -6
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/main.d.ts +3 -1
- package/dist/types/modes/components/jobs-overlay-model.d.ts +4 -2
- package/dist/types/modes/jobs-observer.d.ts +36 -0
- package/dist/types/sdk/broker/broker.d.ts +3 -0
- package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +3 -0
- package/dist/types/sdk/bus/prompt-reconciliation.d.ts +4 -0
- package/dist/types/sdk/client/discovery.d.ts +1 -0
- package/dist/types/sdk/host/model-pin.d.ts +7 -2
- package/dist/types/sdk/host/sdk-run-capability.d.ts +1 -0
- package/dist/types/sdk/host/session-runtime.d.ts +15 -1
- package/dist/types/sdk/prompt-deadline-manager.d.ts +11 -1
- package/dist/types/sdk/protocol/adapter-validation.d.ts +2 -0
- package/dist/types/sdk/router/session-router.d.ts +9 -0
- package/dist/types/session/account-inventory.d.ts +1 -0
- package/dist/types/session/agent-session.d.ts +19 -7
- package/dist/types/session/fold-coordinator.d.ts +201 -0
- package/dist/types/session/sdk-run-capability-internal.d.ts +7 -0
- package/dist/types/session/sdk-run-capability.d.ts +2 -0
- package/dist/types/telemetry/control.d.ts +11 -0
- package/dist/types/telemetry/events.d.ts +20 -0
- package/dist/types/telemetry/index.d.ts +3 -0
- package/dist/types/telemetry/transport.d.ts +22 -0
- package/dist/types/tools/bash-interactive.d.ts +23 -0
- package/dist/types/tools/index.d.ts +6 -5
- package/dist/types/web/search/providers/base.d.ts +9 -4
- package/dist/types/web/search/providers/xai.d.ts +2 -1
- package/dist/types/web/search/types.d.ts +14 -0
- package/package.json +10 -7
- package/scripts/generate-hotkeys-docs.ts +4 -0
- package/scripts/generate-sdk-operation-inventory.ts +3 -3
- package/src/async/job-manager.ts +671 -39
- package/src/cli/auth-broker-cli.ts +40 -12
- package/src/cli/auth-gateway-cli.ts +273 -97
- package/src/cli/config-cli.ts +2 -2
- package/src/cli/fast-help.ts +3 -0
- package/src/cli/model-presets-cli.ts +100 -0
- package/src/cli/update-cli.ts +40 -5
- package/src/cli.ts +6 -2
- package/src/commands/auth-gateway.ts +12 -8
- package/src/commands/gc.ts +19 -0
- package/src/commands/model-presets.ts +24 -0
- package/src/config/autorouting-tier-map.ts +32 -0
- package/src/config/file-lock-gc.ts +9 -4
- package/src/config/file-lock.ts +775 -59
- package/src/config/internal/model-preset-registry-test-state.ts +28 -0
- package/src/config/internal/model-preset-registry-test-support.ts +11 -0
- package/src/config/keybindings.ts +6 -2
- package/src/config/model-preset-registry.ts +2799 -0
- package/src/config/model-profile-activation.ts +115 -28
- package/src/config/model-profile-contract.ts +4 -1
- package/src/config/model-profiles.ts +51 -9
- package/src/config/model-registry.ts +1021 -122
- package/src/config/settings-schema.ts +11 -0
- package/src/config/settings.ts +6 -1
- package/src/coordinator-mcp/model-preset.ts +32 -17
- package/src/coordinator-mcp/projection-scan.ts +571 -0
- package/src/coordinator-mcp/server.ts +19 -24
- package/src/coordinator-mcp/session-reaper.ts +9 -3
- package/src/extensibility/extensions/loader.ts +0 -1
- package/src/extensibility/extensions/types.ts +2 -3
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +1 -0
- package/src/gjc-runtime/empty-delete-gc.ts +301 -0
- package/src/gjc-runtime/gc-render.ts +29 -0
- package/src/gjc-runtime/gc-runtime.ts +174 -11
- package/src/gjc-runtime/session-state-lock.ts +1242 -141
- package/src/gjc-runtime/session-state-sidecar.ts +76 -3
- package/src/index.ts +1 -0
- package/src/internal-urls/docs-index.generated.ts +9 -8
- package/src/lsp/config.ts +4 -3
- package/src/lsp/path-trust.ts +12 -6
- package/src/main.ts +9 -2
- package/src/modes/acp/acp-agent.ts +11 -5
- package/src/modes/components/jobs-overlay-model.ts +99 -16
- package/src/modes/components/model-selector.ts +158 -18
- package/src/modes/components/status-line/segments.ts +6 -1
- package/src/modes/controllers/extension-ui-controller.ts +1 -1
- package/src/modes/controllers/input-controller.ts +23 -6
- package/src/modes/interactive-mode.ts +14 -1
- package/src/modes/jobs-observer.ts +149 -16
- package/src/modes/runtime-init.ts +1 -1
- package/src/modes/utils/injected-user-submission.ts +15 -1
- package/src/prompts/tools/bash.md +2 -2
- package/src/prompts/tools/fold-receipt.md +3 -0
- package/src/prompts/tools/job.md +1 -1
- package/src/sdk/acp/adapter.ts +17 -2
- package/src/sdk/broker/broker.ts +48 -21
- package/src/sdk/broker/lifecycle.ts +32 -6
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/chat-daemon-runtime.ts +11 -1
- package/src/sdk/bus/kind-aware-reconciliation.ts +36 -6
- package/src/sdk/bus/prompt-reconciliation.ts +28 -4
- package/src/sdk/bus/slack-conversation.ts +5 -1
- package/src/sdk/cli/session-cli.ts +12 -1
- package/src/sdk/client/discovery.ts +3 -1
- package/src/sdk/host/control/dispatch.ts +3 -0
- package/src/sdk/host/model-pin.ts +185 -25
- package/src/sdk/host/sdk-run-capability.ts +1 -0
- package/src/sdk/host/session-runtime.test.ts +371 -37
- package/src/sdk/host/session-runtime.ts +364 -52
- package/src/sdk/prompt-deadline-manager.ts +16 -1
- package/src/sdk/protocol/adapter-validation.ts +27 -0
- package/src/sdk/protocol/operation-inventory.generated.json +2 -2
- package/src/sdk/protocol/operation-registry.ts +4 -1
- package/src/sdk/router/session-router.ts +228 -96
- package/src/sdk/session.ts +83 -12
- package/src/session/account-inventory.ts +27 -11
- package/src/session/agent-session.ts +678 -103
- package/src/session/fold-coordinator.ts +433 -0
- package/src/session/sdk-run-capability-internal.ts +15 -0
- package/src/session/sdk-run-capability.ts +2 -0
- package/src/session/session-manager.ts +5 -4
- package/src/setup/provider-presets.json +1 -1
- package/src/slash-commands/helpers/credential-switch.ts +6 -1
- package/src/task/executor.ts +19 -3
- package/src/telemetry/control.ts +26 -0
- package/src/telemetry/events.ts +142 -0
- package/src/telemetry/index.ts +3 -0
- package/src/telemetry/transport.ts +87 -0
- package/src/tools/bash-interactive.ts +182 -85
- package/src/tools/bash.ts +772 -67
- package/src/tools/index.ts +7 -5
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/web/search/provider.ts +120 -11
- package/src/web/search/providers/anthropic.ts +89 -17
- package/src/web/search/providers/base.ts +9 -4
- package/src/web/search/providers/gemini.ts +87 -15
- package/src/web/search/providers/openai-compatible.ts +23 -8
- package/src/web/search/providers/xai.ts +98 -12
- package/src/web/search/types.ts +16 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import type { Api, Model } from "@gajae-code/ai/core";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
import { type ModelProfileDefinition } from "./model-profiles";
|
|
4
|
+
import type { ModelsConfig } from "./models-config-schema";
|
|
5
|
+
export declare const MODEL_PRESET_REGISTRY_CONTRACT_VERSION = "1.0.0";
|
|
6
|
+
export declare const DEFAULT_MODEL_PRESET_REGISTRY_URL = "https://raw.githubusercontent.com/Yeachan-Heo/gajae-code-presets/dev/latest.json";
|
|
7
|
+
export declare const MODEL_PRESET_REGISTRY_REFRESH_INTERVAL_MS: number;
|
|
8
|
+
export declare const MODEL_PRESET_REGISTRY_STARTUP_DELAY_MS = 30000;
|
|
9
|
+
export declare const MODEL_PRESET_REGISTRY_MAX_MANIFEST_BYTES: number;
|
|
10
|
+
export declare const MODEL_PRESET_REGISTRY_MAX_SNAPSHOT_BYTES: number;
|
|
11
|
+
export declare const MODEL_PRESET_REGISTRY_MAX_PROFILES_BYTES: number;
|
|
12
|
+
export declare const MODEL_PRESET_REGISTRY_MAX_PRESETS_BYTES: number;
|
|
13
|
+
export interface ModelPresetRegistryTrustedKey {
|
|
14
|
+
keyId: string;
|
|
15
|
+
publicKeyPem: string;
|
|
16
|
+
validFrom: string;
|
|
17
|
+
revokedAt?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const ModelPresetRegistryManifestSchema: z.ZodObject<{
|
|
20
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
21
|
+
signed: z.ZodObject<{
|
|
22
|
+
registryRevision: z.ZodNumber;
|
|
23
|
+
revision: z.ZodString;
|
|
24
|
+
publishedAt: z.ZodString;
|
|
25
|
+
compatibility: z.ZodObject<{
|
|
26
|
+
consumerContract: z.ZodObject<{
|
|
27
|
+
minVersion: z.ZodString;
|
|
28
|
+
maxVersion: z.ZodString;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
snapshot: z.ZodObject<{
|
|
32
|
+
path: z.ZodString;
|
|
33
|
+
sha256: z.ZodString;
|
|
34
|
+
bytes: z.ZodNumber;
|
|
35
|
+
count: z.ZodNumber;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
contents: z.ZodObject<{
|
|
38
|
+
presets: z.ZodObject<{
|
|
39
|
+
path: z.ZodString;
|
|
40
|
+
sha256: z.ZodString;
|
|
41
|
+
bytes: z.ZodNumber;
|
|
42
|
+
count: z.ZodNumber;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
profiles: z.ZodObject<{
|
|
45
|
+
path: z.ZodString;
|
|
46
|
+
sha256: z.ZodString;
|
|
47
|
+
bytes: z.ZodNumber;
|
|
48
|
+
count: z.ZodNumber;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
provenance: z.ZodObject<{
|
|
52
|
+
sourceRepository: z.ZodLiteral<"https://github.com/Yeachan-Heo/gajae-code">;
|
|
53
|
+
sourceRevision: z.ZodString;
|
|
54
|
+
sourcePaths: z.ZodArray<z.ZodString>;
|
|
55
|
+
generatedBy: z.ZodString;
|
|
56
|
+
generatedAt: z.ZodString;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
signature: z.ZodObject<{
|
|
60
|
+
algorithm: z.ZodLiteral<"Ed25519">;
|
|
61
|
+
keyId: z.ZodString;
|
|
62
|
+
value: z.ZodString;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
export declare const ModelPresetRegistrySnapshotSchema: z.ZodObject<{
|
|
66
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
67
|
+
registryRevision: z.ZodNumber;
|
|
68
|
+
revision: z.ZodString;
|
|
69
|
+
compatibility: z.ZodObject<{
|
|
70
|
+
consumerContract: z.ZodObject<{
|
|
71
|
+
minVersion: z.ZodString;
|
|
72
|
+
maxVersion: z.ZodString;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
provenance: z.ZodObject<{
|
|
76
|
+
sourceRepository: z.ZodLiteral<"https://github.com/Yeachan-Heo/gajae-code">;
|
|
77
|
+
sourceRevision: z.ZodString;
|
|
78
|
+
sourcePaths: z.ZodArray<z.ZodString>;
|
|
79
|
+
generatedBy: z.ZodString;
|
|
80
|
+
generatedAt: z.ZodString;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
contents: z.ZodObject<{
|
|
83
|
+
presets: z.ZodObject<{
|
|
84
|
+
path: z.ZodString;
|
|
85
|
+
sha256: z.ZodString;
|
|
86
|
+
bytes: z.ZodNumber;
|
|
87
|
+
count: z.ZodNumber;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
profiles: z.ZodObject<{
|
|
90
|
+
path: z.ZodString;
|
|
91
|
+
sha256: z.ZodString;
|
|
92
|
+
bytes: z.ZodNumber;
|
|
93
|
+
count: z.ZodNumber;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
}, z.core.$strict>;
|
|
97
|
+
export declare const ModelPresetRegistryProfilesSchema: z.ZodObject<{
|
|
98
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
99
|
+
revision: z.ZodString;
|
|
100
|
+
dynamicProviders: z.ZodArray<z.ZodString>;
|
|
101
|
+
profiles: z.ZodArray<z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
displayName: z.ZodString;
|
|
104
|
+
providerGroup: z.ZodString;
|
|
105
|
+
requiredProviders: z.ZodArray<z.ZodString>;
|
|
106
|
+
alternativeProviderGroups: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
107
|
+
roleBindings: z.ZodObject<{
|
|
108
|
+
default: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
109
|
+
executor: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
110
|
+
architect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
111
|
+
planner: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
112
|
+
critic: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
export declare const ModelPresetRegistryPresetsSchema: z.ZodObject<{
|
|
117
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
118
|
+
revision: z.ZodString;
|
|
119
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
provider: z.ZodString;
|
|
122
|
+
name: z.ZodString;
|
|
123
|
+
api: z.ZodEnum<{
|
|
124
|
+
"anthropic-messages": "anthropic-messages";
|
|
125
|
+
"azure-openai-responses": "azure-openai-responses";
|
|
126
|
+
"bedrock-converse-stream": "bedrock-converse-stream";
|
|
127
|
+
"cursor-agent": "cursor-agent";
|
|
128
|
+
"google-gemini-cli": "google-gemini-cli";
|
|
129
|
+
"google-generative-ai": "google-generative-ai";
|
|
130
|
+
"google-vertex": "google-vertex";
|
|
131
|
+
"ollama-chat": "ollama-chat";
|
|
132
|
+
"openai-codex-responses": "openai-codex-responses";
|
|
133
|
+
"openai-completions": "openai-completions";
|
|
134
|
+
"openai-responses": "openai-responses";
|
|
135
|
+
}>;
|
|
136
|
+
reasoning: z.ZodBoolean;
|
|
137
|
+
input: z.ZodArray<z.ZodEnum<{
|
|
138
|
+
image: "image";
|
|
139
|
+
text: "text";
|
|
140
|
+
}>>;
|
|
141
|
+
output: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
142
|
+
image: "image";
|
|
143
|
+
text: "text";
|
|
144
|
+
}>>>;
|
|
145
|
+
cost: z.ZodObject<{
|
|
146
|
+
input: z.ZodNumber;
|
|
147
|
+
output: z.ZodNumber;
|
|
148
|
+
cacheRead: z.ZodNumber;
|
|
149
|
+
cacheWrite: z.ZodNumber;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
contextWindow: z.ZodNumber;
|
|
152
|
+
maxTokens: z.ZodNumber;
|
|
153
|
+
compat: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
maxTokensField: z.ZodOptional<z.ZodLiteral<"max_tokens">>;
|
|
155
|
+
reasoningContentField: z.ZodOptional<z.ZodLiteral<"reasoning_content">>;
|
|
156
|
+
thinkingFormat: z.ZodOptional<z.ZodLiteral<"zai">>;
|
|
157
|
+
reasoningEffortMap: z.ZodOptional<z.ZodObject<{
|
|
158
|
+
minimal: z.ZodOptional<z.ZodEnum<{
|
|
159
|
+
high: "high";
|
|
160
|
+
low: "low";
|
|
161
|
+
max: "max";
|
|
162
|
+
medium: "medium";
|
|
163
|
+
minimal: "minimal";
|
|
164
|
+
xhigh: "xhigh";
|
|
165
|
+
}>>;
|
|
166
|
+
low: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
high: "high";
|
|
168
|
+
low: "low";
|
|
169
|
+
max: "max";
|
|
170
|
+
medium: "medium";
|
|
171
|
+
minimal: "minimal";
|
|
172
|
+
xhigh: "xhigh";
|
|
173
|
+
}>>;
|
|
174
|
+
medium: z.ZodOptional<z.ZodEnum<{
|
|
175
|
+
high: "high";
|
|
176
|
+
low: "low";
|
|
177
|
+
max: "max";
|
|
178
|
+
medium: "medium";
|
|
179
|
+
minimal: "minimal";
|
|
180
|
+
xhigh: "xhigh";
|
|
181
|
+
}>>;
|
|
182
|
+
high: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
high: "high";
|
|
184
|
+
low: "low";
|
|
185
|
+
max: "max";
|
|
186
|
+
medium: "medium";
|
|
187
|
+
minimal: "minimal";
|
|
188
|
+
xhigh: "xhigh";
|
|
189
|
+
}>>;
|
|
190
|
+
xhigh: z.ZodOptional<z.ZodEnum<{
|
|
191
|
+
high: "high";
|
|
192
|
+
low: "low";
|
|
193
|
+
max: "max";
|
|
194
|
+
medium: "medium";
|
|
195
|
+
minimal: "minimal";
|
|
196
|
+
xhigh: "xhigh";
|
|
197
|
+
}>>;
|
|
198
|
+
max: z.ZodOptional<z.ZodEnum<{
|
|
199
|
+
high: "high";
|
|
200
|
+
low: "low";
|
|
201
|
+
max: "max";
|
|
202
|
+
medium: "medium";
|
|
203
|
+
minimal: "minimal";
|
|
204
|
+
xhigh: "xhigh";
|
|
205
|
+
}>>;
|
|
206
|
+
}, z.core.$strict>>;
|
|
207
|
+
requiresAssistantContentForToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
requiresReasoningContentForToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
supportsMultipleSystemMessages: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
|
|
212
|
+
supportsStore: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
supportsToolChoice: z.ZodOptional<z.ZodBoolean>;
|
|
214
|
+
supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
thinking: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
mode: z.ZodEnum<{
|
|
218
|
+
"anthropic-adaptive": "anthropic-adaptive";
|
|
219
|
+
"anthropic-budget-effort": "anthropic-budget-effort";
|
|
220
|
+
budget: "budget";
|
|
221
|
+
effort: "effort";
|
|
222
|
+
"google-level": "google-level";
|
|
223
|
+
}>;
|
|
224
|
+
minLevel: z.ZodOptional<z.ZodEnum<{
|
|
225
|
+
high: "high";
|
|
226
|
+
low: "low";
|
|
227
|
+
max: "max";
|
|
228
|
+
medium: "medium";
|
|
229
|
+
minimal: "minimal";
|
|
230
|
+
xhigh: "xhigh";
|
|
231
|
+
}>>;
|
|
232
|
+
maxLevel: z.ZodOptional<z.ZodEnum<{
|
|
233
|
+
high: "high";
|
|
234
|
+
low: "low";
|
|
235
|
+
max: "max";
|
|
236
|
+
medium: "medium";
|
|
237
|
+
minimal: "minimal";
|
|
238
|
+
xhigh: "xhigh";
|
|
239
|
+
}>>;
|
|
240
|
+
defaultLevel: z.ZodOptional<z.ZodEnum<{
|
|
241
|
+
high: "high";
|
|
242
|
+
low: "low";
|
|
243
|
+
max: "max";
|
|
244
|
+
medium: "medium";
|
|
245
|
+
minimal: "minimal";
|
|
246
|
+
xhigh: "xhigh";
|
|
247
|
+
}>>;
|
|
248
|
+
levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
249
|
+
high: "high";
|
|
250
|
+
low: "low";
|
|
251
|
+
max: "max";
|
|
252
|
+
medium: "medium";
|
|
253
|
+
minimal: "minimal";
|
|
254
|
+
xhigh: "xhigh";
|
|
255
|
+
}>>>;
|
|
256
|
+
}, z.core.$strict>>;
|
|
257
|
+
longContextPricing: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
threshold: z.ZodNumber;
|
|
259
|
+
cost: z.ZodObject<{
|
|
260
|
+
input: z.ZodNumber;
|
|
261
|
+
output: z.ZodNumber;
|
|
262
|
+
cacheRead: z.ZodNumber;
|
|
263
|
+
cacheWrite: z.ZodNumber;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
}, z.core.$strict>>;
|
|
266
|
+
applyPatchToolType: z.ZodOptional<z.ZodLiteral<"freeform">>;
|
|
267
|
+
preferWebsockets: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
+
premiumMultiplier: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
270
|
+
contextPromotionTarget: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strict>>;
|
|
272
|
+
}, z.core.$strict>;
|
|
273
|
+
export type ModelPresetRegistryManifest = z.infer<typeof ModelPresetRegistryManifestSchema>;
|
|
274
|
+
export type ModelPresetRegistrySnapshot = z.infer<typeof ModelPresetRegistrySnapshotSchema>;
|
|
275
|
+
export type ModelPresetRegistryProfiles = z.infer<typeof ModelPresetRegistryProfilesSchema>;
|
|
276
|
+
export type ModelPresetRegistryPresets = z.infer<typeof ModelPresetRegistryPresetsSchema>;
|
|
277
|
+
export interface ModelPresetRegistryDependencies {
|
|
278
|
+
agentDir?: string;
|
|
279
|
+
manifestUrl?: string;
|
|
280
|
+
fetch?: typeof fetch;
|
|
281
|
+
now?: () => Date;
|
|
282
|
+
timeoutMs?: number;
|
|
283
|
+
maxManifestBytes?: number;
|
|
284
|
+
maxSnapshotBytes?: number;
|
|
285
|
+
maxProfilesBytes?: number;
|
|
286
|
+
maxPresetsBytes?: number;
|
|
287
|
+
maxStateBytes?: number;
|
|
288
|
+
automaticRefresh?: boolean;
|
|
289
|
+
startupDelayMs?: number;
|
|
290
|
+
refreshIntervalMs?: number;
|
|
291
|
+
knownManifestSha256?: string;
|
|
292
|
+
}
|
|
293
|
+
export interface AcceptedModelPresetRegistry {
|
|
294
|
+
profiles: Map<string, ModelProfileDefinition>;
|
|
295
|
+
presets: Model<Api>[];
|
|
296
|
+
dynamicProviders: string[];
|
|
297
|
+
revision?: number;
|
|
298
|
+
revisionId?: string;
|
|
299
|
+
manifestSha256?: string;
|
|
300
|
+
keyId?: string;
|
|
301
|
+
sourceRevision?: string;
|
|
302
|
+
retainedProfiles: string[];
|
|
303
|
+
retainedPresets: string[];
|
|
304
|
+
error?: string;
|
|
305
|
+
disabled: boolean;
|
|
306
|
+
pinnedRevision?: number;
|
|
307
|
+
}
|
|
308
|
+
export type ModelPresetRegistryRefreshResult = {
|
|
309
|
+
status: "updated";
|
|
310
|
+
revision: number;
|
|
311
|
+
revisionId: string;
|
|
312
|
+
manifestSha256: string;
|
|
313
|
+
retainedProfiles: string[];
|
|
314
|
+
retainedPresets: string[];
|
|
315
|
+
} | {
|
|
316
|
+
status: "not_modified";
|
|
317
|
+
revision?: number;
|
|
318
|
+
} | {
|
|
319
|
+
status: "disabled";
|
|
320
|
+
revision?: number;
|
|
321
|
+
};
|
|
322
|
+
export interface ModelPresetRegistryStatus {
|
|
323
|
+
contractVersion: string;
|
|
324
|
+
source: "embedded" | "registry";
|
|
325
|
+
cacheHealth: "empty" | "valid" | "corrupt";
|
|
326
|
+
activeRevision?: number;
|
|
327
|
+
activeRevisionId?: string;
|
|
328
|
+
highestSeenRevision?: number;
|
|
329
|
+
manifestSha256?: string;
|
|
330
|
+
snapshotSha256?: string;
|
|
331
|
+
profilesSha256?: string;
|
|
332
|
+
presetsSha256?: string;
|
|
333
|
+
keyId?: string;
|
|
334
|
+
sourceRevision?: string;
|
|
335
|
+
acceptedAt?: string;
|
|
336
|
+
publishedAt?: string;
|
|
337
|
+
lastCheckedAt?: string;
|
|
338
|
+
lastError?: string;
|
|
339
|
+
disabled: boolean;
|
|
340
|
+
pinnedRevision?: number;
|
|
341
|
+
retainedProfiles: string[];
|
|
342
|
+
retainedPresets: string[];
|
|
343
|
+
historyRevisions: number[];
|
|
344
|
+
profileCount: number;
|
|
345
|
+
presetCount: number;
|
|
346
|
+
}
|
|
347
|
+
export declare function canonicalModelPresetRegistryJson(value: unknown): string;
|
|
348
|
+
export declare function loadAcceptedModelPresetRegistry(agentDir?: string, dependencies?: Omit<ModelPresetRegistryDependencies, "agentDir">): AcceptedModelPresetRegistry;
|
|
349
|
+
/**
|
|
350
|
+
* Async accepted-registry loader for validation paths that can await disk I/O.
|
|
351
|
+
* It mirrors the synchronous loader's fail-closed result contract while using
|
|
352
|
+
* Bun file reads for state/control payloads.
|
|
353
|
+
*/
|
|
354
|
+
export declare function loadAcceptedModelPresetRegistryAsync(agentDir?: string, dependencies?: Omit<ModelPresetRegistryDependencies, "agentDir">): Promise<AcceptedModelPresetRegistry>;
|
|
355
|
+
export declare function loadAcceptedModelPresetProfiles(agentDir?: string, dependencies?: Omit<ModelPresetRegistryDependencies, "agentDir">): AcceptedModelPresetRegistry;
|
|
356
|
+
export declare function loadEffectiveModelProfiles(userProfiles: ModelsConfig["profiles"] | undefined, agentDir?: string, dependencies?: Omit<ModelPresetRegistryDependencies, "agentDir">): Map<string, ModelProfileDefinition>;
|
|
357
|
+
export declare function refreshModelPresetRegistry(dependencies?: ModelPresetRegistryDependencies): Promise<ModelPresetRegistryRefreshResult>;
|
|
358
|
+
export declare function setModelPresetRegistryDisabled(options: ModelPresetRegistryDependencies & {
|
|
359
|
+
disabled: boolean;
|
|
360
|
+
}): Promise<void>;
|
|
361
|
+
export declare function setModelPresetRegistryPin(options: ModelPresetRegistryDependencies & {
|
|
362
|
+
revision?: number;
|
|
363
|
+
}): Promise<void>;
|
|
364
|
+
export declare function rollbackModelPresetRegistry(options: ModelPresetRegistryDependencies & {
|
|
365
|
+
revision?: number;
|
|
366
|
+
}): Promise<void>;
|
|
367
|
+
export declare function getModelPresetRegistryStatus(dependencies?: ModelPresetRegistryDependencies): ModelPresetRegistryStatus;
|
|
368
|
+
export declare function refreshModelPresetRegistryInBackground(dependencies?: ModelPresetRegistryDependencies, onAccepted?: () => void): () => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ThinkingLevel } from "@gajae-code/agent-core";
|
|
2
2
|
import type { Api, Model } from "@gajae-code/ai/core";
|
|
3
3
|
import type { AgentSession, DefaultFallbackRuntimeState } from "../session/agent-session";
|
|
4
|
+
import { type ModelProfileDefinition } from "./model-profiles";
|
|
4
5
|
export { resolveModelProfileName } from "./model-profile-contract";
|
|
5
6
|
import { type GjcModelAssignmentTargetId, type ModelRegistry } from "./model-registry";
|
|
6
7
|
import { type ModelSelectorValue } from "./model-selector-value";
|
|
@@ -129,6 +130,44 @@ export declare class ModelProfileCredentialError extends Error {
|
|
|
129
130
|
constructor(profileLabel: string, providers: readonly string[], role?: string);
|
|
130
131
|
}
|
|
131
132
|
export declare function formatModelProfileCredentialError(profileLabel: string, providers: readonly string[]): string;
|
|
133
|
+
/**
|
|
134
|
+
* Resolve the explicitly configured OpenAI-compatible proxy provider id for a
|
|
135
|
+
* preset. Returns undefined when unset or empty. Passwords/labels are never
|
|
136
|
+
* treated as proxy ids here; only lowercase provider ids from settings.
|
|
137
|
+
*/
|
|
138
|
+
export declare function resolveProxyProviderId(settings: Pick<Settings, "get"> | undefined): string | undefined;
|
|
139
|
+
export type ProxyProviderConfig = {
|
|
140
|
+
status: "unset";
|
|
141
|
+
} | {
|
|
142
|
+
status: "configured";
|
|
143
|
+
id: string;
|
|
144
|
+
} | {
|
|
145
|
+
status: "invalid";
|
|
146
|
+
value: string;
|
|
147
|
+
};
|
|
148
|
+
export declare function inspectProxyProviderId(settings: Pick<Settings, "get"> | undefined): ProxyProviderConfig;
|
|
149
|
+
/** Passive surfaces fail closed on malformed settings instead of throwing. */
|
|
150
|
+
export declare function tryResolveProxyProviderId(settings: Pick<Settings, "get"> | undefined): string | undefined;
|
|
151
|
+
export type ModelProfileProxyMode = "fallback" | "always";
|
|
152
|
+
export declare function resolveProxyMode(settings: Pick<Settings, "get"> | undefined): ModelProfileProxyMode;
|
|
153
|
+
/**
|
|
154
|
+
* Rewrite a qualified provider selector so its model is served through the
|
|
155
|
+
* configured proxy. The proxy catalog uses sub-provider-prefixed model ids
|
|
156
|
+
* (e.g. `xiaomi/mimo-v2.5-pro` under `litellm`). Exact provider-prefixed
|
|
157
|
+
* matches win; a unique final-segment match is accepted for gateways that do
|
|
158
|
+
* not retain the upstream provider prefix. Missing or ambiguous matches fail
|
|
159
|
+
* closed rather than leaving an unauthenticated role selector behind.
|
|
160
|
+
*/
|
|
161
|
+
export declare function getProxyRoutableProviders(profile: ModelProfileDefinition): ReadonlySet<string>;
|
|
162
|
+
/**
|
|
163
|
+
* Profile sources whose non-default qualified role bindings are part of the
|
|
164
|
+
* activation contract. Proxy rewrites run before role resolution, so a
|
|
165
|
+
* rewritten selector satisfies this prerequisite when its concrete proxy
|
|
166
|
+
* model is present in the effective catalog. Embedded built-ins intentionally
|
|
167
|
+
* retain their legacy tolerance for stale qualified role tails.
|
|
168
|
+
*/
|
|
169
|
+
export declare function requiresQualifiedModelProfileRoleResolution(profile: Pick<ModelProfileDefinition, "source">): boolean;
|
|
170
|
+
export declare function rewriteSelectorForProxy(selector: string, proxyProvider: string, proxyMode: ModelProfileProxyMode, allModels: Model<Api>[], directlyAuthenticated: ReadonlySet<string>, routableProviders: ReadonlySet<string>): string;
|
|
132
171
|
export declare function prepareModelProfileActivation(options: PrepareModelProfileActivationOptions): Promise<PreparedModelProfileActivation>;
|
|
133
172
|
export declare function applyPreparedModelProfileActivation(prepared: PreparedModelProfileActivation, options?: ApplyModelProfileActivationOptions): Promise<void>;
|
|
134
173
|
export interface MaterializeModelProfileForDeletionResult {
|
|
@@ -5,6 +5,7 @@ export interface ModelProfileDefinition {
|
|
|
5
5
|
name: string;
|
|
6
6
|
requiredProviders: string[];
|
|
7
7
|
displayName?: string;
|
|
8
|
+
providerGroup?: string;
|
|
8
9
|
/**
|
|
9
10
|
* Optional groups of providers that are interchangeable fallbacks.
|
|
10
11
|
* Each group is an array of provider ids where at least one must be
|
|
@@ -16,7 +17,7 @@ export interface ModelProfileDefinition {
|
|
|
16
17
|
*/
|
|
17
18
|
alternativeProviderGroups?: readonly (readonly string[])[];
|
|
18
19
|
modelMapping: Partial<Record<ModelProfileRole, ModelSelectorValue>>;
|
|
19
|
-
source: "builtin" | "user";
|
|
20
|
+
source: "builtin" | "registry" | "user";
|
|
20
21
|
}
|
|
21
22
|
export interface ResolvedProfileBinding {
|
|
22
23
|
defaultSelector?: ModelSelectorValue;
|
|
@@ -45,10 +46,11 @@ export interface ModelProfilePresentation {
|
|
|
45
46
|
displayName: string;
|
|
46
47
|
providerGroup: string;
|
|
47
48
|
}
|
|
48
|
-
export declare function getModelProfilePresentation(profile: string | Pick<ModelProfileDefinition, "name" | "displayName">): ModelProfilePresentation;
|
|
49
|
+
export declare function getModelProfilePresentation(profile: string | Pick<ModelProfileDefinition, "name" | "displayName" | "providerGroup">): ModelProfilePresentation;
|
|
49
50
|
export declare function formatModelProfileDisplayLabel(profile: Pick<ModelProfileDefinition, "name" | "displayName">): string;
|
|
50
51
|
export declare function groupModelProfilesForPresetLanding(profiles: ReadonlyMap<string, ModelProfileDefinition>): Map<string, ModelProfileDefinition[]>;
|
|
51
52
|
export declare function recommendModelProfileForProvider(providerId: string, profiles: ReadonlyMap<string, ModelProfileDefinition>): ModelProfileDefinition | undefined;
|
|
52
|
-
export
|
|
53
|
+
export type RegistryModelProfilesInput = ReadonlyMap<string, ModelProfileDefinition> | readonly ModelProfileDefinition[] | Readonly<Record<string, ModelProfileDefinition>>;
|
|
54
|
+
export declare function mergeModelProfiles(userProfiles?: ModelsConfig["profiles"], registryProfiles?: RegistryModelProfilesInput): Map<string, ModelProfileDefinition>;
|
|
53
55
|
export declare function resolveProfileBindings(definition: ModelProfileDefinition): ResolvedProfileBinding;
|
|
54
56
|
export declare function formatAvailableProfileNames(profiles: ReadonlyMap<string, ModelProfileDefinition>): string;
|
|
@@ -4,10 +4,11 @@ import { type ThemeColor } from "../modes/theme/theme";
|
|
|
4
4
|
import { type ActiveProviderDescriptor } from "../sdk/providers";
|
|
5
5
|
import type { AuthStorage } from "../session/auth-storage";
|
|
6
6
|
import type { ActiveSearchModelContext, WebSearchMode } from "../web/search/types";
|
|
7
|
-
import {
|
|
7
|
+
import { ConfigError, ConfigFile } from "./config-file";
|
|
8
8
|
import { isAuthenticated, kNoAuth } from "./model-auth";
|
|
9
9
|
import { type ConfiguredModelBindings } from "./model-bindings-applier";
|
|
10
10
|
import { type ProviderDiscoveryState } from "./model-discovery-manager";
|
|
11
|
+
import { type ModelPresetRegistryDependencies } from "./model-preset-registry";
|
|
11
12
|
export type { ProviderDiscoveryState, ProviderDiscoveryStatus } from "./model-discovery-manager";
|
|
12
13
|
import { type CanonicalModelIndex, type CanonicalModelRecord, type CanonicalModelVariant, type ModelEquivalenceConfig } from "./model-equivalence";
|
|
13
14
|
import { type ModelProfileDefinition } from "./model-profiles";
|
|
@@ -301,6 +302,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
301
302
|
}>;
|
|
302
303
|
/** Provider override config (baseUrl, headers, apiKey, compat, transport) without custom models */
|
|
303
304
|
interface ProviderOverride {
|
|
305
|
+
api?: Api;
|
|
304
306
|
baseUrl?: string;
|
|
305
307
|
headers?: Record<string, string>;
|
|
306
308
|
apiKey?: string;
|
|
@@ -309,6 +311,7 @@ interface ProviderOverride {
|
|
|
309
311
|
transport?: Model<Api>["transport"];
|
|
310
312
|
requestTransform?: ModelRequestTransform;
|
|
311
313
|
cacheRetention?: CacheRetention;
|
|
314
|
+
isOAuth?: boolean;
|
|
312
315
|
}
|
|
313
316
|
/**
|
|
314
317
|
* Merge a freshly discovered model with the matching bundled/configured entry
|
|
@@ -349,12 +352,13 @@ export declare class ModelRegistry {
|
|
|
349
352
|
/**
|
|
350
353
|
* @param authStorage - Auth storage for API key resolution
|
|
351
354
|
*/
|
|
352
|
-
constructor(authStorage: AuthStorage, modelsPath?: string, registrySettings?: Pick<Settings, "get" | "getGlobal"
|
|
355
|
+
constructor(authStorage: AuthStorage, modelsPath?: string, registrySettings?: Pick<Settings, "get" | "getGlobal">, modelPresetRegistryDependencies?: ModelPresetRegistryDependencies);
|
|
356
|
+
dispose(): Promise<void>;
|
|
353
357
|
onCatalogChanged(listener: () => void): () => void;
|
|
354
358
|
/** Replace the read-only settings snapshot used by profile-scoped resolution. */
|
|
355
359
|
setScopedSettings(settingsReader: Pick<Settings, "get" | "getGlobal">): void;
|
|
356
360
|
/**
|
|
357
|
-
* Reload models from disk (
|
|
361
|
+
* Reload models from disk (embedded + accepted registry + custom from models.yml).
|
|
358
362
|
*/
|
|
359
363
|
refresh(strategy?: ModelRefreshStrategy): Promise<void>;
|
|
360
364
|
refreshInBackground(strategy?: ModelRefreshStrategy): void;
|
|
@@ -384,8 +388,8 @@ export declare class ModelRegistry {
|
|
|
384
388
|
/** The currently configured modelBindings, for pre-profile baseline lookup. */
|
|
385
389
|
getConfiguredModelBindings(): ConfiguredModelBindings | undefined;
|
|
386
390
|
/**
|
|
387
|
-
* Get all models (
|
|
388
|
-
* If models.
|
|
391
|
+
* Get all models (embedded + accepted registry + custom).
|
|
392
|
+
* If models.yml had errors, returns embedded plus accepted registry models.
|
|
389
393
|
*/
|
|
390
394
|
getAll(): Model<Api>[];
|
|
391
395
|
/** Provider ids declared in models.yml, including override-only providers. */
|
|
@@ -520,6 +524,8 @@ export declare class ModelRegistry {
|
|
|
520
524
|
* Get the base URL associated with a provider, if any model defines one.
|
|
521
525
|
*/
|
|
522
526
|
getProviderBaseUrl(provider: string): string | undefined;
|
|
527
|
+
/** Opaque owner token for registry-scoped AuthStorage reads. */
|
|
528
|
+
getAuthStorageOwner(): object;
|
|
523
529
|
getProviderWebSearchMode(provider: string): WebSearchMode | undefined;
|
|
524
530
|
getActiveSearchModelContext(model: Model<Api>): ActiveSearchModelContext;
|
|
525
531
|
/**
|
|
@@ -1888,6 +1888,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1888
1888
|
}];
|
|
1889
1889
|
};
|
|
1890
1890
|
};
|
|
1891
|
+
readonly "telemetry.enabled": {
|
|
1892
|
+
readonly type: "boolean";
|
|
1893
|
+
readonly default: false;
|
|
1894
|
+
readonly ui: {
|
|
1895
|
+
readonly tab: "interaction";
|
|
1896
|
+
readonly label: "Anonymous Usage Telemetry";
|
|
1897
|
+
readonly description: "Send minimal allowlisted update and adoption events. Disabled by default; no prompts, paths, environment, identity, or arbitrary errors are collected.";
|
|
1898
|
+
};
|
|
1899
|
+
};
|
|
1891
1900
|
readonly "starReminder.enabled": {
|
|
1892
1901
|
readonly type: "boolean";
|
|
1893
1902
|
readonly default: true;
|
|
@@ -2,20 +2,22 @@ export interface CoordinatorModelProfile {
|
|
|
2
2
|
name: string;
|
|
3
3
|
}
|
|
4
4
|
/**
|
|
5
|
-
* Loads the merged
|
|
5
|
+
* Loads the merged embedded + accepted registry + custom model-profile names
|
|
6
6
|
* without loading the session-host model registry. The child still owns
|
|
7
7
|
* profile activation; this validates the selection before session creation.
|
|
8
8
|
*/
|
|
9
9
|
export type CoordinatorModelProfileLoader = () => Map<string, CoordinatorModelProfile> | Promise<Map<string, CoordinatorModelProfile>>;
|
|
10
10
|
/**
|
|
11
|
-
* Thrown by the default loader when `models.yml`
|
|
12
|
-
* unreadable. This lets the resolver fail closed with a
|
|
13
|
-
* instead of silently collapsing a broken registry to
|
|
14
|
-
* (which would misreport a caller's valid custom
|
|
11
|
+
* Thrown by the default loader when `models.yml` or the accepted preset
|
|
12
|
+
* registry is invalid or unreadable. This lets the resolver fail closed with a
|
|
13
|
+
* distinct, stable reason instead of silently collapsing a broken registry to
|
|
14
|
+
* the built-ins-only set (which would misreport a caller's valid custom
|
|
15
|
+
* profile as unknown).
|
|
15
16
|
*/
|
|
16
17
|
export declare class CoordinatorModelProfileRegistryError extends Error {
|
|
17
18
|
constructor(cause?: unknown);
|
|
18
19
|
}
|
|
20
|
+
export declare function createCoordinatorModelProfileLoader(agentDir: string): CoordinatorModelProfileLoader;
|
|
19
21
|
export declare const loadCoordinatorModelProfiles: CoordinatorModelProfileLoader;
|
|
20
22
|
export type CoordinatorMpresetResolution = {
|
|
21
23
|
ok: true;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Test-only platform seam; production always follows the host platform. */
|
|
2
|
+
export declare const ProjectionScanTestHooks: {
|
|
3
|
+
platform?: NodeJS.Platform;
|
|
4
|
+
};
|
|
5
|
+
/** Post-filter parse-candidate cap. Exhaustion returns an explicit incomplete result. */
|
|
6
|
+
export declare const COORDINATOR_JSON_SCAN_CAP = 10000;
|
|
7
|
+
export interface ProjectionScanStat {
|
|
8
|
+
size: number | bigint;
|
|
9
|
+
dev?: number | bigint;
|
|
10
|
+
ino?: number | bigint;
|
|
11
|
+
nlink?: number | bigint;
|
|
12
|
+
mtimeNs?: number | bigint;
|
|
13
|
+
ctimeNs?: number | bigint;
|
|
14
|
+
isDirectory?(): boolean;
|
|
15
|
+
isFile(): boolean;
|
|
16
|
+
isSymbolicLink(): boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ProjectionScanFs {
|
|
19
|
+
readdir(dir: string): Promise<string[]>;
|
|
20
|
+
lstat(file: string): Promise<ProjectionScanStat>;
|
|
21
|
+
readFile(file: string, encoding: "utf8", expected?: ProjectionScanStat): Promise<string>;
|
|
22
|
+
/** Optional descriptor-bound reader used by the production filesystem. */
|
|
23
|
+
readFileSafe?: (file: string, encoding: "utf8", expected?: ProjectionScanStat) => Promise<string>;
|
|
24
|
+
/** Optional pinned directory authority used for enumeration and every child operation. */
|
|
25
|
+
openDirectory?: (dir: string) => Promise<ProjectionScanDirectory>;
|
|
26
|
+
}
|
|
27
|
+
export interface ProjectionScanDirectory {
|
|
28
|
+
readonly stat: ProjectionScanStat;
|
|
29
|
+
readdir(): Promise<string[]>;
|
|
30
|
+
lstat(entry: string): Promise<ProjectionScanStat>;
|
|
31
|
+
readFile(entry: string, encoding: "utf8", expected?: ProjectionScanStat): Promise<string>;
|
|
32
|
+
close(): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export interface ProjectionScanResult {
|
|
35
|
+
values: unknown[];
|
|
36
|
+
parsed: number;
|
|
37
|
+
capped: boolean;
|
|
38
|
+
skippedDebris: number;
|
|
39
|
+
skippedEmpty: number;
|
|
40
|
+
/** Candidates that changed or disappeared after enumeration. */
|
|
41
|
+
raced: number;
|
|
42
|
+
/** True when the scan cannot be authoritative for its caller. */
|
|
43
|
+
incomplete: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare function isCoordinatorScanDebrisName(name: string): boolean;
|
|
46
|
+
export declare function listCoordinatorJsonFiles(dir: string, io?: ProjectionScanFs, cap?: number): Promise<ProjectionScanResult>;
|
|
@@ -344,7 +344,7 @@ export interface ExtensionContext {
|
|
|
344
344
|
cleanedArgs?: string;
|
|
345
345
|
}) => void;
|
|
346
346
|
preflightSignal?: AbortSignal;
|
|
347
|
-
|
|
347
|
+
sdkRunCapability?: unknown;
|
|
348
348
|
}): Promise<unknown>;
|
|
349
349
|
setPlanMode?(on: boolean): unknown;
|
|
350
350
|
operateGoal?(op: "create" | "get" | "resume" | "pause" | "complete" | "drop", objective?: string): Promise<unknown>;
|
|
@@ -844,8 +844,6 @@ export interface ExtensionAPI {
|
|
|
844
844
|
startsOwnRun: boolean;
|
|
845
845
|
}) => void;
|
|
846
846
|
preflightSignal?: AbortSignal;
|
|
847
|
-
/** Internal SDK correlation owner for an exact queued follow-up. */
|
|
848
|
-
sdkRunToken?: string;
|
|
849
847
|
}): Promise<void>;
|
|
850
848
|
/** Append a custom entry to the session for state persistence (not sent to LLM). */
|
|
851
849
|
appendEntry<T = unknown>(customType: string, data?: T): void;
|
|
@@ -1031,8 +1029,6 @@ export type SendUserMessageHandler = (content: string | (TextContent | ImageCont
|
|
|
1031
1029
|
removed?: boolean;
|
|
1032
1030
|
}) => void;
|
|
1033
1031
|
preflightSignal?: AbortSignal;
|
|
1034
|
-
/** Internal SDK correlation owner for an exact queued follow-up. */
|
|
1035
|
-
sdkRunToken?: string;
|
|
1036
1032
|
}) => void | Promise<void>;
|
|
1037
1033
|
export type AppendEntryHandler = <T = unknown>(customType: string, data?: T) => void;
|
|
1038
1034
|
export type GetActiveToolsHandler = () => string[];
|
|
@@ -1169,6 +1165,7 @@ export interface ExtensionContextActions {
|
|
|
1169
1165
|
cleanedArgs?: string;
|
|
1170
1166
|
}) => void;
|
|
1171
1167
|
preflightSignal?: AbortSignal;
|
|
1168
|
+
sdkRunCapability?: unknown;
|
|
1172
1169
|
}) => Promise<unknown>;
|
|
1173
1170
|
setPlanMode?: (on: boolean) => unknown;
|
|
1174
1171
|
operateGoal?: (op: "create" | "get" | "resume" | "pause" | "complete" | "drop", objective?: string) => Promise<unknown>;
|