@hasna/switcher 0.1.1 → 0.1.2

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,7 @@
1
+ import type { HarnessLaunchInput, PreparedLaunch } from "./harness-types";
2
+ /**
3
+ * Prepare Cline's native provider and model registries in an isolated data
4
+ * directory. Cline resolves OPENAI_API_KEY/ANTHROPIC_API_KEY from the child
5
+ * environment; no apiKey or auth token is written to either registry.
6
+ */
7
+ export declare function prepareClineLaunch(input: HarnessLaunchInput): Promise<PreparedLaunch>;
@@ -52,8 +52,8 @@ export declare const credentialBindingSchema: z.ZodObject<{
52
52
  }>]>;
53
53
  }, "strict", z.ZodTypeAny, {
54
54
  url: string;
55
- executable: string;
56
55
  key: string;
56
+ executable: string;
57
57
  kind: "vault";
58
58
  operator: {
59
59
  kind: "env";
@@ -63,8 +63,8 @@ export declare const credentialBindingSchema: z.ZodObject<{
63
63
  };
64
64
  }, {
65
65
  url: string;
66
- executable: string;
67
66
  key: string;
67
+ executable: string;
68
68
  kind: "vault";
69
69
  operator: {
70
70
  kind: "env";
@@ -81,8 +81,8 @@ export declare const credentialBindingSchema: z.ZodObject<{
81
81
  account: string;
82
82
  } | {
83
83
  url: string;
84
- executable: string;
85
84
  key: string;
85
+ executable: string;
86
86
  kind: "vault";
87
87
  operator: {
88
88
  kind: "env";
@@ -101,8 +101,8 @@ export declare const credentialBindingSchema: z.ZodObject<{
101
101
  account: string;
102
102
  } | {
103
103
  url: string;
104
- executable: string;
105
104
  key: string;
105
+ executable: string;
106
106
  kind: "vault";
107
107
  operator: {
108
108
  kind: "env";
@@ -131,8 +131,8 @@ export declare class CredentialBindings {
131
131
  account: string;
132
132
  } | {
133
133
  url: string;
134
- executable: string;
135
134
  key: string;
135
+ executable: string;
136
136
  kind: "vault";
137
137
  operator: {
138
138
  kind: "env";
@@ -2,5 +2,5 @@ import { SwitcherClient, type Provider, type Profile } from "./sdk";
2
2
  import { type Model } from "./domain";
3
3
  import { type PresetOptions } from "./presets";
4
4
  export declare function resolveLaunchProvider(client: SwitcherClient, selector: string, options?: PresetOptions): Promise<Provider>;
5
- export declare function selectModel(models: Model[], query?: string): Promise<string>;
5
+ export declare function selectModel(models: Model[], query?: string, harness?: Profile["harness"]): Promise<string>;
6
6
  export declare function ensureLaunchProfile(client: SwitcherClient, provider: Provider, harness: Profile["harness"], model: string): Promise<Profile>;
package/dist/domain.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const VERSION = "0.1.1";
3
- export declare const harnessSchema: z.ZodEnum<["claude", "codex", "grok", "opencode2", "pi"]>;
4
- export declare const protocolSchema: z.ZodEnum<["anthropic-messages", "openai-responses", "openai-chat"]>;
2
+ export type { AuthStyle } from "./auth";
3
+ export declare const VERSION = "0.1.2";
4
+ export declare const harnessSchema: z.ZodEnum<["claude", "codex", "grok", "opencode", "opencode2", "pi", "omp", "dsh", "cline", "hermes", "prime-agent", "gemini", "aider", "kilo"]>;
5
+ export declare const protocolSchema: z.ZodEnum<["anthropic-messages", "openai-responses", "openai-chat", "gemini-generate-content"]>;
5
6
  export declare const idSchema: z.ZodString;
6
7
  export declare function endpoint(value: string): string;
7
8
  export declare const modelSchema: z.ZodObject<{
@@ -14,6 +15,7 @@ export declare const modelSchema: z.ZodObject<{
14
15
  inputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15
16
  outputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
17
  supportedParameters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ supportedGenerationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17
19
  }, "strict", z.ZodTypeAny, {
18
20
  id: string;
19
21
  name: string;
@@ -24,6 +26,7 @@ export declare const modelSchema: z.ZodObject<{
24
26
  inputModalities?: string[] | undefined;
25
27
  outputModalities?: string[] | undefined;
26
28
  supportedParameters?: string[] | undefined;
29
+ supportedGenerationMethods?: string[] | undefined;
27
30
  }, {
28
31
  id: string;
29
32
  name: string;
@@ -34,17 +37,18 @@ export declare const modelSchema: z.ZodObject<{
34
37
  inputModalities?: string[] | undefined;
35
38
  outputModalities?: string[] | undefined;
36
39
  supportedParameters?: string[] | undefined;
40
+ supportedGenerationMethods?: string[] | undefined;
37
41
  }>;
38
42
  export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
39
43
  id: z.ZodString;
40
44
  name: z.ZodString;
41
45
  baseUrl: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
42
- protocol: z.ZodEnum<["anthropic-messages", "openai-responses", "openai-chat"]>;
46
+ protocol: z.ZodEnum<["anthropic-messages", "openai-responses", "openai-chat", "gemini-generate-content"]>;
43
47
  credentialEnv: z.ZodOptional<z.ZodString>;
44
- authStyle: z.ZodDefault<z.ZodEnum<["bearer", "x-api-key"]>>;
48
+ authStyle: z.ZodDefault<z.ZodEnum<["bearer", "x-api-key", "api-key"]>>;
45
49
  catalogBaseUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
46
- catalogFormat: z.ZodOptional<z.ZodEnum<["openai", "ollama", "mistral", "together", "fireworks", "dashscope", "none"]>>;
47
- catalogAuthStyle: z.ZodOptional<z.ZodEnum<["bearer", "x-api-key", "none"]>>;
50
+ catalogFormat: z.ZodOptional<z.ZodEnum<["openai", "ollama", "mistral", "together", "fireworks", "dashscope", "gemini", "none"]>>;
51
+ catalogAuthStyle: z.ZodOptional<z.ZodEnum<["bearer", "x-api-key", "api-key", "none"]>>;
48
52
  catalogCredentialEnv: z.ZodOptional<z.ZodString>;
49
53
  catalogAccountId: z.ZodOptional<z.ZodString>;
50
54
  modelsPath: z.ZodDefault<z.ZodString>;
@@ -58,6 +62,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
58
62
  inputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
63
  outputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
60
64
  supportedParameters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
+ supportedGenerationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
61
66
  }, "strict", z.ZodTypeAny, {
62
67
  id: string;
63
68
  name: string;
@@ -68,6 +73,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
68
73
  inputModalities?: string[] | undefined;
69
74
  outputModalities?: string[] | undefined;
70
75
  supportedParameters?: string[] | undefined;
76
+ supportedGenerationMethods?: string[] | undefined;
71
77
  }, {
72
78
  id: string;
73
79
  name: string;
@@ -78,13 +84,14 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
78
84
  inputModalities?: string[] | undefined;
79
85
  outputModalities?: string[] | undefined;
80
86
  supportedParameters?: string[] | undefined;
87
+ supportedGenerationMethods?: string[] | undefined;
81
88
  }>, "many">>;
82
89
  }, "strict", z.ZodTypeAny, {
83
90
  id: string;
84
91
  name: string;
85
92
  baseUrl: string;
86
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
87
- authStyle: "bearer" | "x-api-key";
93
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
94
+ authStyle: "bearer" | "x-api-key" | "api-key";
88
95
  modelsPath: string;
89
96
  manualModels: {
90
97
  id: string;
@@ -96,23 +103,24 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
96
103
  inputModalities?: string[] | undefined;
97
104
  outputModalities?: string[] | undefined;
98
105
  supportedParameters?: string[] | undefined;
106
+ supportedGenerationMethods?: string[] | undefined;
99
107
  }[];
100
108
  credentialEnv?: string | undefined;
101
109
  catalogBaseUrl?: string | undefined;
102
- catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none" | undefined;
103
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
110
+ catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none" | undefined;
111
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
104
112
  catalogCredentialEnv?: string | undefined;
105
113
  catalogAccountId?: string | undefined;
106
114
  }, {
107
115
  id: string;
108
116
  name: string;
109
117
  baseUrl: string;
110
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
118
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
111
119
  credentialEnv?: string | undefined;
112
- authStyle?: "bearer" | "x-api-key" | undefined;
120
+ authStyle?: "bearer" | "x-api-key" | "api-key" | undefined;
113
121
  catalogBaseUrl?: string | undefined;
114
- catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none" | undefined;
115
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
122
+ catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none" | undefined;
123
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
116
124
  catalogCredentialEnv?: string | undefined;
117
125
  catalogAccountId?: string | undefined;
118
126
  modelsPath?: string | undefined;
@@ -126,13 +134,14 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
126
134
  inputModalities?: string[] | undefined;
127
135
  outputModalities?: string[] | undefined;
128
136
  supportedParameters?: string[] | undefined;
137
+ supportedGenerationMethods?: string[] | undefined;
129
138
  }[] | undefined;
130
139
  }>, {
131
140
  id: string;
132
141
  name: string;
133
142
  baseUrl: string;
134
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
135
- authStyle: "bearer" | "x-api-key";
143
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
144
+ authStyle: "bearer" | "x-api-key" | "api-key";
136
145
  modelsPath: string;
137
146
  manualModels: {
138
147
  id: string;
@@ -144,23 +153,24 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
144
153
  inputModalities?: string[] | undefined;
145
154
  outputModalities?: string[] | undefined;
146
155
  supportedParameters?: string[] | undefined;
156
+ supportedGenerationMethods?: string[] | undefined;
147
157
  }[];
148
158
  credentialEnv?: string | undefined;
149
159
  catalogBaseUrl?: string | undefined;
150
- catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none" | undefined;
151
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
160
+ catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none" | undefined;
161
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
152
162
  catalogCredentialEnv?: string | undefined;
153
163
  catalogAccountId?: string | undefined;
154
164
  }, {
155
165
  id: string;
156
166
  name: string;
157
167
  baseUrl: string;
158
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
168
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
159
169
  credentialEnv?: string | undefined;
160
- authStyle?: "bearer" | "x-api-key" | undefined;
170
+ authStyle?: "bearer" | "x-api-key" | "api-key" | undefined;
161
171
  catalogBaseUrl?: string | undefined;
162
- catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none" | undefined;
163
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
172
+ catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none" | undefined;
173
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
164
174
  catalogCredentialEnv?: string | undefined;
165
175
  catalogAccountId?: string | undefined;
166
176
  modelsPath?: string | undefined;
@@ -174,6 +184,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
174
184
  inputModalities?: string[] | undefined;
175
185
  outputModalities?: string[] | undefined;
176
186
  supportedParameters?: string[] | undefined;
187
+ supportedGenerationMethods?: string[] | undefined;
177
188
  }[] | undefined;
178
189
  }>;
179
190
  export declare const providerPresetSchema: z.ZodObject<{
@@ -182,32 +193,32 @@ export declare const providerPresetSchema: z.ZodObject<{
182
193
  credentialEnv: z.ZodOptional<z.ZodString>;
183
194
  credentialAliases: z.ZodArray<z.ZodString, "many">;
184
195
  protocols: z.ZodArray<z.ZodObject<{
185
- protocol: z.ZodEnum<["anthropic-messages", "openai-responses", "openai-chat"]>;
196
+ protocol: z.ZodEnum<["anthropic-messages", "openai-responses", "openai-chat", "gemini-generate-content"]>;
186
197
  baseUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
187
- authStyle: z.ZodEnum<["bearer", "x-api-key"]>;
198
+ authStyle: z.ZodEnum<["bearer", "x-api-key", "api-key"]>;
188
199
  catalogBaseUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
189
- catalogFormat: z.ZodEnum<["openai", "ollama", "mistral", "together", "fireworks", "dashscope", "none"]>;
190
- catalogAuthStyle: z.ZodOptional<z.ZodEnum<["bearer", "x-api-key", "none"]>>;
200
+ catalogFormat: z.ZodEnum<["openai", "ollama", "mistral", "together", "fireworks", "dashscope", "gemini", "none"]>;
201
+ catalogAuthStyle: z.ZodOptional<z.ZodEnum<["bearer", "x-api-key", "api-key", "none"]>>;
191
202
  modelsPath: z.ZodString;
192
203
  notes: z.ZodArray<z.ZodString, "many">;
193
204
  }, "strict", z.ZodTypeAny, {
194
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
195
- authStyle: "bearer" | "x-api-key";
196
- catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
205
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
206
+ authStyle: "bearer" | "x-api-key" | "api-key";
207
+ catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
197
208
  modelsPath: string;
198
209
  notes: string[];
199
210
  baseUrl?: string | undefined;
200
211
  catalogBaseUrl?: string | undefined;
201
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
212
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
202
213
  }, {
203
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
204
- authStyle: "bearer" | "x-api-key";
205
- catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
214
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
215
+ authStyle: "bearer" | "x-api-key" | "api-key";
216
+ catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
206
217
  modelsPath: string;
207
218
  notes: string[];
208
219
  baseUrl?: string | undefined;
209
220
  catalogBaseUrl?: string | undefined;
210
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
221
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
211
222
  }>, "many">;
212
223
  sources: z.ZodArray<z.ZodString, "many">;
213
224
  verification: z.ZodLiteral<"documented">;
@@ -216,14 +227,14 @@ export declare const providerPresetSchema: z.ZodObject<{
216
227
  name: string;
217
228
  credentialAliases: string[];
218
229
  protocols: {
219
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
220
- authStyle: "bearer" | "x-api-key";
221
- catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
230
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
231
+ authStyle: "bearer" | "x-api-key" | "api-key";
232
+ catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
222
233
  modelsPath: string;
223
234
  notes: string[];
224
235
  baseUrl?: string | undefined;
225
236
  catalogBaseUrl?: string | undefined;
226
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
237
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
227
238
  }[];
228
239
  sources: string[];
229
240
  verification: "documented";
@@ -233,14 +244,14 @@ export declare const providerPresetSchema: z.ZodObject<{
233
244
  name: string;
234
245
  credentialAliases: string[];
235
246
  protocols: {
236
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
237
- authStyle: "bearer" | "x-api-key";
238
- catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
247
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
248
+ authStyle: "bearer" | "x-api-key" | "api-key";
249
+ catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
239
250
  modelsPath: string;
240
251
  notes: string[];
241
252
  baseUrl?: string | undefined;
242
253
  catalogBaseUrl?: string | undefined;
243
- catalogAuthStyle?: "bearer" | "x-api-key" | "none" | undefined;
254
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none" | undefined;
244
255
  }[];
245
256
  sources: string[];
246
257
  verification: "documented";
@@ -251,33 +262,33 @@ export declare const profileInputSchema: z.ZodObject<{
251
262
  id: z.ZodString;
252
263
  name: z.ZodString;
253
264
  providerId: z.ZodString;
254
- harness: z.ZodEnum<["claude", "codex", "grok", "opencode2", "pi"]>;
265
+ harness: z.ZodEnum<["claude", "codex", "grok", "opencode", "opencode2", "pi", "omp", "dsh", "cline", "hermes", "prime-agent", "gemini", "aider", "kilo"]>;
255
266
  model: z.ZodString;
256
267
  }, "strict", z.ZodTypeAny, {
257
268
  id: string;
258
269
  name: string;
259
270
  providerId: string;
260
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
271
+ harness: "gemini" | "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "aider" | "kilo";
261
272
  model: string;
262
273
  }, {
263
274
  id: string;
264
275
  name: string;
265
276
  providerId: string;
266
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
277
+ harness: "gemini" | "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "aider" | "kilo";
267
278
  model: string;
268
279
  }>;
269
280
  export declare const runInputSchema: z.ZodObject<{
270
281
  profileId: z.ZodString;
271
- harness: z.ZodEnum<["claude", "codex", "grok", "opencode2", "pi"]>;
282
+ harness: z.ZodEnum<["claude", "codex", "grok", "opencode", "opencode2", "pi", "omp", "dsh", "cline", "hermes", "prime-agent", "gemini", "aider", "kilo"]>;
272
283
  model: z.ZodString;
273
284
  planToken: z.ZodString;
274
285
  }, "strict", z.ZodTypeAny, {
275
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
286
+ harness: "gemini" | "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "aider" | "kilo";
276
287
  model: string;
277
288
  profileId: string;
278
289
  planToken: string;
279
290
  }, {
280
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
291
+ harness: "gemini" | "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "aider" | "kilo";
281
292
  model: string;
282
293
  profileId: string;
283
294
  planToken: string;
@@ -338,4 +349,6 @@ export declare class CommandInterrupted extends Fault {
338
349
  }
339
350
  export declare function parse<T>(schema: z.ZodType<T, any, any>, value: unknown): T;
340
351
  export declare function compatible(harness: Profile["harness"], protocol: Provider["protocol"]): boolean;
352
+ export declare function validateHarnessProvider(harness: Profile["harness"], provider: Pick<Provider, "protocol" | "authStyle">): void;
341
353
  export declare function codingEligible(model: Model): boolean;
354
+ export declare function harnessEligible(model: Model, harness: Profile["harness"]): boolean;
@@ -0,0 +1,5 @@
1
+ /** Only shipped DSH profiles with a composition-owned model route are supported. */
2
+ export declare function dshArguments(input: string[]): {
3
+ profile: string;
4
+ args: string[];
5
+ };
@@ -0,0 +1,6 @@
1
+ import type { HarnessLaunchInput } from "./harness-types";
2
+ export declare function geminiBridge(input: HarnessLaunchInput): {
3
+ baseUrl: string;
4
+ token: string;
5
+ cleanup: () => Promise<void>;
6
+ };
@@ -0,0 +1,12 @@
1
+ import type { HarnessLaunchInput, PreparedLaunch } from "./harness-types";
2
+ type Settings = Record<string, any>;
3
+ export declare function validateGeminiConfiguration(cwd: string, env?: NodeJS.ProcessEnv): Promise<{
4
+ home: string;
5
+ defaults: Settings;
6
+ user: Settings;
7
+ system: Settings;
8
+ contextNames: string[];
9
+ trustPath: string;
10
+ }>;
11
+ export declare function prepareGemini(input: HarnessLaunchInput): Promise<PreparedLaunch>;
12
+ export {};
@@ -250,15 +250,15 @@ export interface components {
250
250
  credentialAliases: string[];
251
251
  protocols: {
252
252
  /** @enum {string} */
253
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
253
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
254
254
  baseUrl?: string;
255
255
  /** @enum {string} */
256
- authStyle: "bearer" | "x-api-key";
256
+ authStyle: "bearer" | "x-api-key" | "api-key";
257
257
  catalogBaseUrl?: string;
258
258
  /** @enum {string} */
259
- catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
259
+ catalogFormat: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
260
260
  /** @enum {string} */
261
- catalogAuthStyle?: "bearer" | "x-api-key" | "none";
261
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none";
262
262
  modelsPath: string;
263
263
  notes: string[];
264
264
  }[];
@@ -271,18 +271,18 @@ export interface components {
271
271
  name: string;
272
272
  baseUrl: string;
273
273
  /** @enum {string} */
274
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
274
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
275
275
  credentialEnv?: string;
276
276
  /**
277
277
  * @default bearer
278
278
  * @enum {string}
279
279
  */
280
- authStyle: "bearer" | "x-api-key";
280
+ authStyle: "bearer" | "x-api-key" | "api-key";
281
281
  catalogBaseUrl?: string;
282
282
  /** @enum {string} */
283
- catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
283
+ catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
284
284
  /** @enum {string} */
285
- catalogAuthStyle?: "bearer" | "x-api-key" | "none";
285
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none";
286
286
  catalogCredentialEnv?: string;
287
287
  catalogAccountId?: string;
288
288
  /** @default models */
@@ -298,6 +298,7 @@ export interface components {
298
298
  inputModalities?: string[];
299
299
  outputModalities?: string[];
300
300
  supportedParameters?: string[];
301
+ supportedGenerationMethods?: string[];
301
302
  }[];
302
303
  };
303
304
  Provider: {
@@ -305,18 +306,18 @@ export interface components {
305
306
  name: string;
306
307
  baseUrl: string;
307
308
  /** @enum {string} */
308
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
309
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
309
310
  credentialEnv?: string;
310
311
  /**
311
312
  * @default bearer
312
313
  * @enum {string}
313
314
  */
314
- authStyle: "bearer" | "x-api-key";
315
+ authStyle: "bearer" | "x-api-key" | "api-key";
315
316
  catalogBaseUrl?: string;
316
317
  /** @enum {string} */
317
- catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
318
+ catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
318
319
  /** @enum {string} */
319
- catalogAuthStyle?: "bearer" | "x-api-key" | "none";
320
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none";
320
321
  catalogCredentialEnv?: string;
321
322
  catalogAccountId?: string;
322
323
  /** @default models */
@@ -332,6 +333,7 @@ export interface components {
332
333
  inputModalities?: string[];
333
334
  outputModalities?: string[];
334
335
  supportedParameters?: string[];
336
+ supportedGenerationMethods?: string[];
335
337
  }[];
336
338
  version: number;
337
339
  updatedAt: string;
@@ -341,7 +343,7 @@ export interface components {
341
343
  name: string;
342
344
  providerId: string;
343
345
  /** @enum {string} */
344
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
346
+ harness: "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "gemini" | "aider" | "kilo";
345
347
  model: string;
346
348
  };
347
349
  Profile: {
@@ -349,7 +351,7 @@ export interface components {
349
351
  name: string;
350
352
  providerId: string;
351
353
  /** @enum {string} */
352
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
354
+ harness: "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "gemini" | "aider" | "kilo";
353
355
  model: string;
354
356
  version: number;
355
357
  updatedAt: string;
@@ -364,6 +366,7 @@ export interface components {
364
366
  inputModalities?: string[];
365
367
  outputModalities?: string[];
366
368
  supportedParameters?: string[];
369
+ supportedGenerationMethods?: string[];
367
370
  };
368
371
  ModelPage: {
369
372
  data: {
@@ -376,6 +379,7 @@ export interface components {
376
379
  inputModalities?: string[];
377
380
  outputModalities?: string[];
378
381
  supportedParameters?: string[];
382
+ supportedGenerationMethods?: string[];
379
383
  codingEligible: boolean;
380
384
  }[];
381
385
  total: number;
@@ -396,6 +400,7 @@ export interface components {
396
400
  inputModalities?: string[];
397
401
  outputModalities?: string[];
398
402
  supportedParameters?: string[];
403
+ supportedGenerationMethods?: string[];
399
404
  }[];
400
405
  refreshedAt: string;
401
406
  /** @enum {string} */
@@ -407,18 +412,18 @@ export interface components {
407
412
  name: string;
408
413
  baseUrl: string;
409
414
  /** @enum {string} */
410
- protocol: "anthropic-messages" | "openai-responses" | "openai-chat";
415
+ protocol: "anthropic-messages" | "openai-responses" | "openai-chat" | "gemini-generate-content";
411
416
  credentialEnv?: string;
412
417
  /**
413
418
  * @default bearer
414
419
  * @enum {string}
415
420
  */
416
- authStyle: "bearer" | "x-api-key";
421
+ authStyle: "bearer" | "x-api-key" | "api-key";
417
422
  catalogBaseUrl?: string;
418
423
  /** @enum {string} */
419
- catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "none";
424
+ catalogFormat?: "openai" | "ollama" | "mistral" | "together" | "fireworks" | "dashscope" | "gemini" | "none";
420
425
  /** @enum {string} */
421
- catalogAuthStyle?: "bearer" | "x-api-key" | "none";
426
+ catalogAuthStyle?: "bearer" | "x-api-key" | "api-key" | "none";
422
427
  catalogCredentialEnv?: string;
423
428
  catalogAccountId?: string;
424
429
  /** @default models */
@@ -434,6 +439,7 @@ export interface components {
434
439
  inputModalities?: string[];
435
440
  outputModalities?: string[];
436
441
  supportedParameters?: string[];
442
+ supportedGenerationMethods?: string[];
437
443
  }[];
438
444
  version: number;
439
445
  updatedAt: string;
@@ -443,7 +449,7 @@ export interface components {
443
449
  name: string;
444
450
  providerId: string;
445
451
  /** @enum {string} */
446
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
452
+ harness: "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "gemini" | "aider" | "kilo";
447
453
  model: string;
448
454
  version: number;
449
455
  updatedAt: string;
@@ -459,6 +465,7 @@ export interface components {
459
465
  inputModalities?: string[];
460
466
  outputModalities?: string[];
461
467
  supportedParameters?: string[];
468
+ supportedGenerationMethods?: string[];
462
469
  }[];
463
470
  refreshedAt: string;
464
471
  /** @enum {string} */
@@ -470,7 +477,7 @@ export interface components {
470
477
  RunInput: {
471
478
  profileId: string;
472
479
  /** @enum {string} */
473
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
480
+ harness: "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "gemini" | "aider" | "kilo";
474
481
  model: string;
475
482
  planToken: string;
476
483
  };
@@ -482,7 +489,7 @@ export interface components {
482
489
  Run: {
483
490
  profileId: string;
484
491
  /** @enum {string} */
485
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
492
+ harness: "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "gemini" | "aider" | "kilo";
486
493
  model: string;
487
494
  planToken: string;
488
495
  version: number;
@@ -1,4 +1,5 @@
1
1
  import type { HarnessId } from "./harness-types";
2
+ export declare function geminiPolicyArguments(input: readonly string[], originalHome: string): string[];
2
3
  export declare function assertHarnessArguments(harness: HarnessId, args: readonly string[], options?: {
3
4
  additionalReserved?: readonly string[];
4
5
  reserveCodexConfig?: boolean;
@@ -0,0 +1,19 @@
1
+ import type { HarnessId } from "./harness-types";
2
+ /**
3
+ * Native installation facts used by doctor and missing-executable errors.
4
+ *
5
+ * These records deliberately distinguish a verified package from a project
6
+ * distribution. A project entry has no guessed npm command: the operator is
7
+ * sent to the upstream installation instructions and can pass the resulting
8
+ * executable with --executable.
9
+ */
10
+ export type HarnessInstallation = {
11
+ displayName: string;
12
+ executable: string;
13
+ versionRequirement: string;
14
+ packageOrProject: string;
15
+ documentationUrl: string;
16
+ installationGuidance: string;
17
+ };
18
+ export declare function harnessInstallation(harness: HarnessId): HarnessInstallation;
19
+ export declare function harnessInstallationMessage(harness: HarnessId, executable: string, explicitOverride: boolean): string;
@@ -21,5 +21,6 @@ export type PreparedLaunch = {
21
21
  env: Record<string, string>;
22
22
  configPaths: string[];
23
23
  warnings: string[];
24
+ beforeLaunch?: () => Promise<void>;
24
25
  cleanup?: () => Promise<void>;
25
26
  };
@@ -1,15 +1,18 @@
1
1
  import type { HarnessId, HarnessLaunchInput, PreparedLaunch } from "./harness-types";
2
2
  export declare function detectHarness(harness: HarnessId, override?: string): Promise<{
3
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
3
+ harness: "gemini" | "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "aider" | "kilo";
4
4
  executable: string;
5
5
  available: boolean;
6
6
  version: string;
7
+ installation: import("./harness-installation").HarnessInstallation;
7
8
  } | {
8
- harness: "claude" | "codex" | "grok" | "opencode2" | "pi";
9
+ harness: "gemini" | "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "aider" | "kilo";
9
10
  executable: string;
10
11
  available: boolean;
11
12
  version: undefined;
13
+ installation: import("./harness-installation").HarnessInstallation;
12
14
  }>;
15
+ export declare function validateHarnessConfiguration(harness: HarnessId, cwd: string, args?: readonly string[]): Promise<void>;
13
16
  export declare function validateHarnessVersion(harness: HarnessId, version: string | undefined): void;
14
17
  export declare function codexModel(model: HarnessLaunchInput["models"][number], priority: number): {
15
18
  slug: string;