@codeworksh/plugin 0.0.1-dev.20260925150557 → 0.1.0-canary.15.1.g86693cf5

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.
@@ -0,0 +1,581 @@
1
+ import { Model } from "@codeworksh/aikit";
2
+ import { Schema } from "effect";
3
+ //#region src/settings.d.ts
4
+ declare const ThinkingLevel: Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>;
5
+ declare const ToolExecution: Schema.Literals<readonly ["sequential", "parallel"]>;
6
+ type ToolExecution = typeof ToolExecution.Type;
7
+ /** Aikit does not export its request schema; keep this routing surface checked against its public types. */
8
+ declare const requestFields: {
9
+ temperature: Schema.optional<Schema.Finite>;
10
+ maxTokens: Schema.optional<Schema.Finite>;
11
+ cacheRetention: Schema.optional<Schema.Literals<readonly ["none", "short", "long"]>>;
12
+ headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
13
+ timeoutMs: Schema.optional<Schema.Finite>;
14
+ maxRetries: Schema.optional<Schema.Finite>;
15
+ metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
16
+ thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
17
+ baseURL: Schema.optional<Schema.String>;
18
+ method: Schema.optional<Schema.Literals<("chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses")[]>>;
19
+ };
20
+ declare const KeyReference: Schema.String;
21
+ /** The variable a `"${NAME}"` reference names. */
22
+ declare const keyName: (reference: string) => string;
23
+ /** The wire protocol a model speaks, which a catalog entry may have wrong for a local endpoint. */
24
+ declare const ModelProtocol: Schema.Literals<("anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai")[]>;
25
+ declare const Block: Schema.StructWithRest<Schema.Struct<{
26
+ readonly temperature: Schema.optional<Schema.Finite>;
27
+ readonly maxTokens: Schema.optional<Schema.Finite>;
28
+ readonly cacheRetention: Schema.optional<Schema.Literals<readonly ["none", "short", "long"]>>;
29
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
30
+ readonly timeoutMs: Schema.optional<Schema.Finite>;
31
+ readonly maxRetries: Schema.optional<Schema.Finite>;
32
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
33
+ readonly thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
34
+ readonly baseURL: Schema.optional<Schema.String>;
35
+ readonly method: Schema.optional<Schema.Literals<("chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses")[]>>;
36
+ readonly protocol: Schema.optional<Schema.Literals<("anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai")[]>>;
37
+ readonly thinkingLevel: Schema.optional<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>>;
38
+ readonly toolExecution: Schema.optional<Schema.Literals<readonly ["sequential", "parallel"]>>;
39
+ readonly contextWindow: Schema.optional<Schema.Finite>;
40
+ /** Which environment variable holds the key for this model: `"${NAME}"`. */
41
+ readonly apiKey: Schema.optional<Schema.String>;
42
+ readonly extras: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
43
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
44
+ type Block = typeof Block.Type;
45
+ declare const Model$1: Schema.Struct<{
46
+ readonly provider: Schema.optional<Schema.String>;
47
+ readonly id: Schema.optional<Schema.String>;
48
+ readonly thinkingLevel: Schema.optional<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>>;
49
+ readonly toolExecution: Schema.optional<Schema.Literals<readonly ["sequential", "parallel"]>>;
50
+ readonly thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
51
+ readonly options: Schema.optional<Schema.StructWithRest<Schema.Struct<{
52
+ readonly temperature: Schema.optional<Schema.Finite>;
53
+ readonly maxTokens: Schema.optional<Schema.Finite>;
54
+ readonly cacheRetention: Schema.optional<Schema.Literals<readonly ["none", "short", "long"]>>;
55
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
56
+ readonly timeoutMs: Schema.optional<Schema.Finite>;
57
+ readonly maxRetries: Schema.optional<Schema.Finite>;
58
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
59
+ readonly thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
60
+ readonly baseURL: Schema.optional<Schema.String>;
61
+ readonly method: Schema.optional<Schema.Literals<("chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses")[]>>;
62
+ readonly protocol: Schema.optional<Schema.Literals<("anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai")[]>>;
63
+ readonly thinkingLevel: Schema.optional<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>>;
64
+ readonly toolExecution: Schema.optional<Schema.Literals<readonly ["sequential", "parallel"]>>;
65
+ readonly contextWindow: Schema.optional<Schema.Finite>;
66
+ /** Which environment variable holds the key for this model: `"${NAME}"`. */
67
+ readonly apiKey: Schema.optional<Schema.String>;
68
+ readonly extras: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
69
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
70
+ readonly providerOptions: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.StructWithRest<Schema.Struct<{
71
+ readonly temperature: Schema.optional<Schema.Finite>;
72
+ readonly maxTokens: Schema.optional<Schema.Finite>;
73
+ readonly cacheRetention: Schema.optional<Schema.Literals<readonly ["none", "short", "long"]>>;
74
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
75
+ readonly timeoutMs: Schema.optional<Schema.Finite>;
76
+ readonly maxRetries: Schema.optional<Schema.Finite>;
77
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
78
+ readonly thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
79
+ readonly baseURL: Schema.optional<Schema.String>;
80
+ readonly method: Schema.optional<Schema.Literals<("chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses")[]>>;
81
+ readonly protocol: Schema.optional<Schema.Literals<("anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai")[]>>;
82
+ readonly thinkingLevel: Schema.optional<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>>;
83
+ readonly toolExecution: Schema.optional<Schema.Literals<readonly ["sequential", "parallel"]>>;
84
+ readonly contextWindow: Schema.optional<Schema.Finite>;
85
+ /** Which environment variable holds the key for this model: `"${NAME}"`. */
86
+ readonly apiKey: Schema.optional<Schema.String>;
87
+ readonly extras: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
88
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>;
89
+ }>;
90
+ /**
91
+ * A catalog entry in settings: an aikit `Model.Info`, read exactly like an entry of the generated
92
+ * catalog. The one difference is `provider.key`, which must be a `"${NAME}"` reference.
93
+ */
94
+ declare const ModelEntry: Schema.decodeTo<Schema.declare<{
95
+ api?: {
96
+ id?: string;
97
+ url?: string;
98
+ method?: "chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses";
99
+ };
100
+ baseUrl: string;
101
+ compat?: {
102
+ supportsThinkingLevel?: boolean;
103
+ supportsToolSearch?: boolean;
104
+ supportsAdditionalTools?: boolean;
105
+ supportsStrictMode?: boolean;
106
+ supportsOpenAIGrammarTools?: boolean;
107
+ supportsThinkingTokenBudget?: boolean;
108
+ forceAdaptiveThinking?: boolean;
109
+ thinkingTokenBudgetField?: string;
110
+ };
111
+ contextWindow: number;
112
+ cost: {
113
+ input: number;
114
+ output: number;
115
+ cacheRead: number;
116
+ cacheWrite: number;
117
+ tiers?: {
118
+ input: number;
119
+ output: number;
120
+ cacheRead: number;
121
+ cacheWrite: number;
122
+ inputTokensAbove: number;
123
+ }[];
124
+ serviceTierMultipliers?: Record<string, number>;
125
+ };
126
+ headers?: Record<string, string>;
127
+ id: string;
128
+ input: ("image" | "text")[];
129
+ maxTokens: number;
130
+ name: string;
131
+ npm?: string;
132
+ options?: Record<string, unknown>;
133
+ protocol: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
134
+ provider: {
135
+ id: string;
136
+ name: string;
137
+ source: "api" | "config" | "custom" | "env" | "unknown";
138
+ env: string[];
139
+ key?: string;
140
+ options?: Record<string, any>;
141
+ };
142
+ providerOptions?: Record<string, unknown>;
143
+ providerOptionsKey?: string;
144
+ reasoning: boolean;
145
+ supportedProtocols?: {
146
+ anthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
147
+ google?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
148
+ googleVertex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
149
+ googleVertexAnthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
150
+ githubCopilot?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
151
+ openai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
152
+ openaiCompatible?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
153
+ openaiCodex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
154
+ openrouter?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
155
+ xai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
156
+ };
157
+ thinkingBudgets?: {
158
+ high?: number;
159
+ low?: number;
160
+ max?: number;
161
+ medium?: number;
162
+ minimal?: number;
163
+ xhigh?: number;
164
+ };
165
+ thinkingLevelMap?: {
166
+ high?: string | null;
167
+ low?: string | null;
168
+ max?: string | null;
169
+ medium?: string | null;
170
+ minimal?: string | null;
171
+ off?: string | null;
172
+ xhigh?: string | null;
173
+ };
174
+ }, {
175
+ api?: {
176
+ id?: string;
177
+ url?: string;
178
+ method?: "chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses";
179
+ };
180
+ baseUrl: string;
181
+ compat?: {
182
+ supportsThinkingLevel?: boolean;
183
+ supportsToolSearch?: boolean;
184
+ supportsAdditionalTools?: boolean;
185
+ supportsStrictMode?: boolean;
186
+ supportsOpenAIGrammarTools?: boolean;
187
+ supportsThinkingTokenBudget?: boolean;
188
+ forceAdaptiveThinking?: boolean;
189
+ thinkingTokenBudgetField?: string;
190
+ };
191
+ contextWindow: number;
192
+ cost: {
193
+ input: number;
194
+ output: number;
195
+ cacheRead: number;
196
+ cacheWrite: number;
197
+ tiers?: {
198
+ input: number;
199
+ output: number;
200
+ cacheRead: number;
201
+ cacheWrite: number;
202
+ inputTokensAbove: number;
203
+ }[];
204
+ serviceTierMultipliers?: Record<string, number>;
205
+ };
206
+ headers?: Record<string, string>;
207
+ id: string;
208
+ input: ("image" | "text")[];
209
+ maxTokens: number;
210
+ name: string;
211
+ npm?: string;
212
+ options?: Record<string, unknown>;
213
+ protocol: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
214
+ provider: {
215
+ id: string;
216
+ name: string;
217
+ source: "api" | "config" | "custom" | "env" | "unknown";
218
+ env: string[];
219
+ key?: string;
220
+ options?: Record<string, any>;
221
+ };
222
+ providerOptions?: Record<string, unknown>;
223
+ providerOptionsKey?: string;
224
+ reasoning: boolean;
225
+ supportedProtocols?: {
226
+ anthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
227
+ google?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
228
+ googleVertex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
229
+ googleVertexAnthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
230
+ githubCopilot?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
231
+ openai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
232
+ openaiCompatible?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
233
+ openaiCodex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
234
+ openrouter?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
235
+ xai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
236
+ };
237
+ thinkingBudgets?: {
238
+ high?: number;
239
+ low?: number;
240
+ max?: number;
241
+ medium?: number;
242
+ minimal?: number;
243
+ xhigh?: number;
244
+ };
245
+ thinkingLevelMap?: {
246
+ high?: string | null;
247
+ low?: string | null;
248
+ max?: string | null;
249
+ medium?: string | null;
250
+ minimal?: string | null;
251
+ off?: string | null;
252
+ xhigh?: string | null;
253
+ };
254
+ }>, Schema.Unknown, never, never>;
255
+ type ModelEntry = typeof ModelEntry.Type;
256
+ declare const PluginPatch: Schema.Union<readonly [Schema.Struct<{
257
+ readonly enabled: Schema.optional<Schema.Boolean>;
258
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
259
+ readonly plugin: Schema.String;
260
+ }>, Schema.Struct<{
261
+ readonly enabled: Schema.optional<Schema.Boolean>;
262
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
263
+ readonly package: Schema.String;
264
+ }>]>;
265
+ declare const PluginEntry: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Struct<{
266
+ readonly enabled: Schema.optional<Schema.Boolean>;
267
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
268
+ readonly plugin: Schema.String;
269
+ }>, Schema.Struct<{
270
+ readonly enabled: Schema.optional<Schema.Boolean>;
271
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
272
+ readonly package: Schema.String;
273
+ }>]>]>;
274
+ type PluginEntry = typeof PluginEntry.Type;
275
+ /**
276
+ * Agent-level retry of a turn whose provider request failed transiently (rate limit, overload,
277
+ * 5xx, dropped connection). Delays double from `baseDelayMs` and stop growing at `maxDelayMs`;
278
+ * a server that asks for a longer wait than `maxDelayMs` is not retried. `maxRetries: 0` is off.
279
+ *
280
+ * Separate from `model.options.maxRetries`, which retries inside the provider SDK and defaults to
281
+ * 0 so that the two do not multiply, and so a quota error reaches the loop instead of being retried.
282
+ */
283
+ declare const Retry: Schema.Struct<{
284
+ readonly maxRetries: Schema.optional<Schema.Int>;
285
+ readonly baseDelayMs: Schema.optional<Schema.Int>;
286
+ readonly maxDelayMs: Schema.optional<Schema.Int>;
287
+ }>;
288
+ interface RetryPolicy {
289
+ readonly maxRetries: number;
290
+ readonly baseDelayMs: number;
291
+ readonly maxDelayMs: number;
292
+ }
293
+ declare const Patch: Schema.Struct<{
294
+ readonly $schema: Schema.optional<Schema.String>;
295
+ readonly plugins: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Struct<{
296
+ readonly enabled: Schema.optional<Schema.Boolean>;
297
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
298
+ readonly plugin: Schema.String;
299
+ }>, Schema.Struct<{
300
+ readonly enabled: Schema.optional<Schema.Boolean>;
301
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
302
+ readonly package: Schema.String;
303
+ }>]>]>>>;
304
+ readonly model: Schema.optional<Schema.Struct<{
305
+ readonly provider: Schema.optional<Schema.String>;
306
+ readonly id: Schema.optional<Schema.String>;
307
+ readonly thinkingLevel: Schema.optional<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>>;
308
+ readonly toolExecution: Schema.optional<Schema.Literals<readonly ["sequential", "parallel"]>>;
309
+ readonly thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
310
+ readonly options: Schema.optional<Schema.StructWithRest<Schema.Struct<{
311
+ readonly temperature: Schema.optional<Schema.Finite>;
312
+ readonly maxTokens: Schema.optional<Schema.Finite>;
313
+ readonly cacheRetention: Schema.optional<Schema.Literals<readonly ["none", "short", "long"]>>;
314
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
315
+ readonly timeoutMs: Schema.optional<Schema.Finite>;
316
+ readonly maxRetries: Schema.optional<Schema.Finite>;
317
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
318
+ readonly thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
319
+ readonly baseURL: Schema.optional<Schema.String>;
320
+ readonly method: Schema.optional<Schema.Literals<("chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses")[]>>;
321
+ readonly protocol: Schema.optional<Schema.Literals<("anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai")[]>>;
322
+ readonly thinkingLevel: Schema.optional<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>>;
323
+ readonly toolExecution: Schema.optional<Schema.Literals<readonly ["sequential", "parallel"]>>;
324
+ readonly contextWindow: Schema.optional<Schema.Finite>;
325
+ /** Which environment variable holds the key for this model: `"${NAME}"`. */
326
+ readonly apiKey: Schema.optional<Schema.String>;
327
+ readonly extras: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
328
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
329
+ readonly providerOptions: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.StructWithRest<Schema.Struct<{
330
+ readonly temperature: Schema.optional<Schema.Finite>;
331
+ readonly maxTokens: Schema.optional<Schema.Finite>;
332
+ readonly cacheRetention: Schema.optional<Schema.Literals<readonly ["none", "short", "long"]>>;
333
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
334
+ readonly timeoutMs: Schema.optional<Schema.Finite>;
335
+ readonly maxRetries: Schema.optional<Schema.Finite>;
336
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
337
+ readonly thinkingBudgets: Schema.optional<Schema.$Record<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[]>, Schema.optional<Schema.Finite>>>;
338
+ readonly baseURL: Schema.optional<Schema.String>;
339
+ readonly method: Schema.optional<Schema.Literals<("chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses")[]>>;
340
+ readonly protocol: Schema.optional<Schema.Literals<("anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai")[]>>;
341
+ readonly thinkingLevel: Schema.optional<Schema.Literals<("high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh")[]>>;
342
+ readonly toolExecution: Schema.optional<Schema.Literals<readonly ["sequential", "parallel"]>>;
343
+ readonly contextWindow: Schema.optional<Schema.Finite>;
344
+ /** Which environment variable holds the key for this model: `"${NAME}"`. */
345
+ readonly apiKey: Schema.optional<Schema.String>;
346
+ readonly extras: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
347
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>;
348
+ }>>;
349
+ readonly models: Schema.optional<Schema.$Array<Schema.decodeTo<Schema.declare<{
350
+ api?: {
351
+ id?: string;
352
+ url?: string;
353
+ method?: "chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses";
354
+ };
355
+ baseUrl: string;
356
+ compat?: {
357
+ supportsThinkingLevel?: boolean;
358
+ supportsToolSearch?: boolean;
359
+ supportsAdditionalTools?: boolean;
360
+ supportsStrictMode?: boolean;
361
+ supportsOpenAIGrammarTools?: boolean;
362
+ supportsThinkingTokenBudget?: boolean;
363
+ forceAdaptiveThinking?: boolean;
364
+ thinkingTokenBudgetField?: string;
365
+ };
366
+ contextWindow: number;
367
+ cost: {
368
+ input: number;
369
+ output: number;
370
+ cacheRead: number;
371
+ cacheWrite: number;
372
+ tiers?: {
373
+ input: number;
374
+ output: number;
375
+ cacheRead: number;
376
+ cacheWrite: number;
377
+ inputTokensAbove: number;
378
+ }[];
379
+ serviceTierMultipliers?: Record<string, number>;
380
+ };
381
+ headers?: Record<string, string>;
382
+ id: string;
383
+ input: ("image" | "text")[];
384
+ maxTokens: number;
385
+ name: string;
386
+ npm?: string;
387
+ options?: Record<string, unknown>;
388
+ protocol: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
389
+ provider: {
390
+ id: string;
391
+ name: string;
392
+ source: "api" | "config" | "custom" | "env" | "unknown";
393
+ env: string[];
394
+ key?: string;
395
+ options?: Record<string, any>;
396
+ };
397
+ providerOptions?: Record<string, unknown>;
398
+ providerOptionsKey?: string;
399
+ reasoning: boolean;
400
+ supportedProtocols?: {
401
+ anthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
402
+ google?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
403
+ googleVertex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
404
+ googleVertexAnthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
405
+ githubCopilot?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
406
+ openai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
407
+ openaiCompatible?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
408
+ openaiCodex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
409
+ openrouter?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
410
+ xai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
411
+ };
412
+ thinkingBudgets?: {
413
+ high?: number;
414
+ low?: number;
415
+ max?: number;
416
+ medium?: number;
417
+ minimal?: number;
418
+ xhigh?: number;
419
+ };
420
+ thinkingLevelMap?: {
421
+ high?: string | null;
422
+ low?: string | null;
423
+ max?: string | null;
424
+ medium?: string | null;
425
+ minimal?: string | null;
426
+ off?: string | null;
427
+ xhigh?: string | null;
428
+ };
429
+ }, {
430
+ api?: {
431
+ id?: string;
432
+ url?: string;
433
+ method?: "chat" | "completion" | "completionModel" | "languageModel" | "messages" | "responses";
434
+ };
435
+ baseUrl: string;
436
+ compat?: {
437
+ supportsThinkingLevel?: boolean;
438
+ supportsToolSearch?: boolean;
439
+ supportsAdditionalTools?: boolean;
440
+ supportsStrictMode?: boolean;
441
+ supportsOpenAIGrammarTools?: boolean;
442
+ supportsThinkingTokenBudget?: boolean;
443
+ forceAdaptiveThinking?: boolean;
444
+ thinkingTokenBudgetField?: string;
445
+ };
446
+ contextWindow: number;
447
+ cost: {
448
+ input: number;
449
+ output: number;
450
+ cacheRead: number;
451
+ cacheWrite: number;
452
+ tiers?: {
453
+ input: number;
454
+ output: number;
455
+ cacheRead: number;
456
+ cacheWrite: number;
457
+ inputTokensAbove: number;
458
+ }[];
459
+ serviceTierMultipliers?: Record<string, number>;
460
+ };
461
+ headers?: Record<string, string>;
462
+ id: string;
463
+ input: ("image" | "text")[];
464
+ maxTokens: number;
465
+ name: string;
466
+ npm?: string;
467
+ options?: Record<string, unknown>;
468
+ protocol: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
469
+ provider: {
470
+ id: string;
471
+ name: string;
472
+ source: "api" | "config" | "custom" | "env" | "unknown";
473
+ env: string[];
474
+ key?: string;
475
+ options?: Record<string, any>;
476
+ };
477
+ providerOptions?: Record<string, unknown>;
478
+ providerOptionsKey?: string;
479
+ reasoning: boolean;
480
+ supportedProtocols?: {
481
+ anthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
482
+ google?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
483
+ googleVertex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
484
+ googleVertexAnthropic?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
485
+ githubCopilot?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
486
+ openai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
487
+ openaiCompatible?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
488
+ openaiCodex?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
489
+ openrouter?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
490
+ xai?: "anthropic" | "github-copilot" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
491
+ };
492
+ thinkingBudgets?: {
493
+ high?: number;
494
+ low?: number;
495
+ max?: number;
496
+ medium?: number;
497
+ minimal?: number;
498
+ xhigh?: number;
499
+ };
500
+ thinkingLevelMap?: {
501
+ high?: string | null;
502
+ low?: string | null;
503
+ max?: string | null;
504
+ medium?: string | null;
505
+ minimal?: string | null;
506
+ off?: string | null;
507
+ xhigh?: string | null;
508
+ };
509
+ }>, Schema.Unknown, never, never>>>;
510
+ readonly retry: Schema.optional<Schema.Struct<{
511
+ readonly maxRetries: Schema.optional<Schema.Int>;
512
+ readonly baseDelayMs: Schema.optional<Schema.Int>;
513
+ readonly maxDelayMs: Schema.optional<Schema.Int>;
514
+ }>>;
515
+ }>;
516
+ type Patch = typeof Patch.Type;
517
+ /**
518
+ * One plugin entry, and where it came from.
519
+ *
520
+ * Flattening every layer's `plugins` into one array loses the file that declared each entry, and
521
+ * that cannot be recovered afterwards: two layers may declare the same string, so attribution is
522
+ * genuinely gone rather than merely inconvenient. Three things need it -- anchoring a relative
523
+ * path, naming the declaring layer in `plugin list`, and the missing-plugin diagnostic -- so the
524
+ * loaded shape carries it from the start.
525
+ *
526
+ * In simple terms:
527
+ * `written` - is what module the developer is declaring - what
528
+ * `file` - where the module is being declared - where
529
+ * `entry` - the resolved path of the module, relative to the `file`; especially needed for local.
530
+ *
531
+ * Example:
532
+ * written: "@acme/x@^1"
533
+ * entry: "@acme/x@^1"
534
+ * file: "/Users/me/.codework/settings.jsonc"
535
+ *
536
+ * written: "./plugins/mine.mjs"
537
+ * entry: "/Users/me/.codework/plugins/mine.mjs"
538
+ * file: "/Users/me/.codework/settings.jsonc"
539
+ */
540
+ interface Declared {
541
+ /** The entry exactly as the file spells it, which is the string a person will search for. */
542
+ readonly written: PluginEntry;
543
+ /** The same entry with any relative path anchored to the directory of its declaring file. */
544
+ readonly entry: PluginEntry;
545
+ /** The settings file that declared it. */
546
+ readonly file: string;
547
+ }
548
+ /** A `models` entry, and the settings file that declared it. */
549
+ interface DeclaredModel {
550
+ readonly entry: Model.Info;
551
+ readonly file: string;
552
+ }
553
+ interface Info {
554
+ /**
555
+ * Plugin entries added to the harness selection, in order: every layer's entries, lowest
556
+ * priority first, so a project's list extends the user's rather than replacing it.
557
+ *
558
+ * Anchored, and stripped of provenance: this is the list the loader consumes. {@link Info.declared}
559
+ * is the same list with the file each entry came from.
560
+ */
561
+ readonly plugins: ReadonlyArray<PluginEntry>;
562
+ /** {@link Info.plugins}, with the origin of each entry. Same order, same length. */
563
+ readonly declared: ReadonlyArray<Declared>;
564
+ /**
565
+ * Catalog entries from every layer, lowest priority first. Applied over the generated catalog
566
+ * in this order, so for one `provider.id` + `id` the last entry wins.
567
+ */
568
+ readonly models: ReadonlyArray<DeclaredModel>;
569
+ readonly model: typeof Model$1.Type & {
570
+ readonly provider: string;
571
+ readonly id: string;
572
+ readonly thinkingLevel: Model.ThinkingLevel;
573
+ readonly toolExecution: ToolExecution;
574
+ };
575
+ readonly retry: RetryPolicy;
576
+ }
577
+ /** Let aikit supply model-aware generation defaults. */
578
+ declare const defaults: Info;
579
+ //#endregion
580
+ export { keyName as _, KeyReference as a, ModelProtocol as c, PluginPatch as d, Retry as f, defaults as g, ToolExecution as h, Info as i, Patch as l, ThinkingLevel as m, Declared as n, Model$1 as o, RetryPolicy as p, DeclaredModel as r, ModelEntry as s, Block as t, PluginEntry as u, requestFields as v };
581
+ //# sourceMappingURL=settings-B6-grSTA.d.mts.map
package/settings.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ModelProtocol, c as PluginPatch, d as defaults, f as requestFields, i as Model, l as ThinkingLevel, n as Declared, o as Patch, r as Info, s as PluginEntry, t as Block, u as ToolExecution } from "./settings-bbJi7FiQ.mjs";
2
- export { Block, Declared, Info, Model, ModelProtocol, Patch, PluginEntry, PluginPatch, ThinkingLevel, ToolExecution, defaults, requestFields };
1
+ import { _ as keyName, a as KeyReference, c as ModelProtocol, d as PluginPatch, f as Retry, g as defaults, h as ToolExecution, i as Info, l as Patch, m as ThinkingLevel, n as Declared, o as Model, p as RetryPolicy, r as DeclaredModel, s as ModelEntry, t as Block, u as PluginEntry, v as requestFields } from "./settings-B6-grSTA.mjs";
2
+ export { Block, Declared, DeclaredModel, Info, KeyReference, Model, ModelEntry, ModelProtocol, Patch, PluginEntry, PluginPatch, Retry, RetryPolicy, ThinkingLevel, ToolExecution, defaults, keyName, requestFields };