@hasna/switcher 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +161 -3
- package/dist/chatgpt-launch.d.ts +5 -0
- package/dist/claude-desktop-launch.d.ts +11 -0
- package/dist/cli/index.js +1232 -403
- package/dist/codex-delegation.d.ts +7 -0
- package/dist/credentials.d.ts +7 -7
- package/dist/desktop-apps.d.ts +25 -0
- package/dist/desktop-state.d.ts +3 -0
- package/dist/domain.d.ts +23 -1
- package/dist/gemini-bridge.d.ts +2 -1
- package/dist/generated/api.d.ts +16 -0
- package/dist/harness-process.d.ts +1 -0
- package/dist/harness-types.d.ts +3 -0
- package/dist/harnesses.d.ts +13 -3
- package/dist/hermes-backend.d.ts +2 -1
- package/dist/index.js +164 -64
- package/dist/inference-gateway.d.ts +4 -1
- package/dist/launcher.d.ts +6 -0
- package/dist/lib/local-opt-in.d.ts +30 -0
- package/dist/mcp/index.js +4960 -89
- package/dist/model-policy-schema.d.ts +6 -0
- package/dist/presets.d.ts +2 -0
- package/dist/provider-request.d.ts +15 -0
- package/dist/provider-stream.d.ts +3 -1
- package/dist/reasoning.d.ts +10 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/sdk.d.ts +25 -0
- package/dist/sdk.js +164 -64
- package/dist/serve/index.js +288 -73
- package/openapi.json +210 -1
- package/package.json +5 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* New desktop runtimes deliver inter-task input as a namespaced tool output
|
|
3
|
+
* without a call_id. Standard Responses providers require a paired call_id.
|
|
4
|
+
* Use the same user-message semantics as older desktop runtimes, retaining the
|
|
5
|
+
* complete delegation envelope and content. Never invent a matching tool call.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeCodexDelegation(body: Record<string, any>): Record<string, any>;
|
package/dist/credentials.d.ts
CHANGED
|
@@ -58,8 +58,8 @@ export declare const credentialBindingSchema: z.ZodEffects<z.ZodObject<{
|
|
|
58
58
|
account: string;
|
|
59
59
|
}>]>;
|
|
60
60
|
}, "strict", z.ZodTypeAny, {
|
|
61
|
-
key: string;
|
|
62
61
|
executable: string;
|
|
62
|
+
key: string;
|
|
63
63
|
kind: "vault";
|
|
64
64
|
operator: {
|
|
65
65
|
kind: "contracts";
|
|
@@ -71,8 +71,8 @@ export declare const credentialBindingSchema: z.ZodEffects<z.ZodObject<{
|
|
|
71
71
|
};
|
|
72
72
|
url?: string | undefined;
|
|
73
73
|
}, {
|
|
74
|
-
key: string;
|
|
75
74
|
executable: string;
|
|
75
|
+
key: string;
|
|
76
76
|
kind: "vault";
|
|
77
77
|
operator: {
|
|
78
78
|
kind: "contracts";
|
|
@@ -91,8 +91,8 @@ export declare const credentialBindingSchema: z.ZodEffects<z.ZodObject<{
|
|
|
91
91
|
service: string;
|
|
92
92
|
account: string;
|
|
93
93
|
} | {
|
|
94
|
-
key: string;
|
|
95
94
|
executable: string;
|
|
95
|
+
key: string;
|
|
96
96
|
kind: "vault";
|
|
97
97
|
operator: {
|
|
98
98
|
kind: "contracts";
|
|
@@ -113,8 +113,8 @@ export declare const credentialBindingSchema: z.ZodEffects<z.ZodObject<{
|
|
|
113
113
|
service: string;
|
|
114
114
|
account: string;
|
|
115
115
|
} | {
|
|
116
|
-
key: string;
|
|
117
116
|
executable: string;
|
|
117
|
+
key: string;
|
|
118
118
|
kind: "vault";
|
|
119
119
|
operator: {
|
|
120
120
|
kind: "contracts";
|
|
@@ -135,8 +135,8 @@ export declare const credentialBindingSchema: z.ZodEffects<z.ZodObject<{
|
|
|
135
135
|
service: string;
|
|
136
136
|
account: string;
|
|
137
137
|
} | {
|
|
138
|
-
key: string;
|
|
139
138
|
executable: string;
|
|
139
|
+
key: string;
|
|
140
140
|
kind: "vault";
|
|
141
141
|
operator: {
|
|
142
142
|
kind: "contracts";
|
|
@@ -157,8 +157,8 @@ export declare const credentialBindingSchema: z.ZodEffects<z.ZodObject<{
|
|
|
157
157
|
service: string;
|
|
158
158
|
account: string;
|
|
159
159
|
} | {
|
|
160
|
-
key: string;
|
|
161
160
|
executable: string;
|
|
161
|
+
key: string;
|
|
162
162
|
kind: "vault";
|
|
163
163
|
operator: {
|
|
164
164
|
kind: "contracts";
|
|
@@ -189,8 +189,8 @@ export declare class CredentialBindings {
|
|
|
189
189
|
service: string;
|
|
190
190
|
account: string;
|
|
191
191
|
} | {
|
|
192
|
-
key: string;
|
|
193
192
|
executable: string;
|
|
193
|
+
key: string;
|
|
194
194
|
kind: "vault";
|
|
195
195
|
operator: {
|
|
196
196
|
kind: "contracts";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ChatGPTInstallation = {
|
|
2
|
+
path: string;
|
|
3
|
+
executable: string;
|
|
4
|
+
codexExecutable: string;
|
|
5
|
+
bundleId: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
8
|
+
export type ClaudeDesktopInstallation = {
|
|
9
|
+
path: string;
|
|
10
|
+
executable: string;
|
|
11
|
+
bundleId: string;
|
|
12
|
+
version: string;
|
|
13
|
+
};
|
|
14
|
+
export type DesktopHost = {
|
|
15
|
+
platform: string;
|
|
16
|
+
home: string;
|
|
17
|
+
run(command: string, args: string[]): Promise<string>;
|
|
18
|
+
executable(path: string): Promise<boolean>;
|
|
19
|
+
isDirectory(path: string): Promise<boolean>;
|
|
20
|
+
};
|
|
21
|
+
/** Detect the unified app or its former Codex name, without launching it. */
|
|
22
|
+
export declare function detectChatGPTApp(appPath?: string, system?: DesktopHost): Promise<ChatGPTInstallation>;
|
|
23
|
+
/** Claude Desktop's supported third-party gateway mode uses its own Claude-3p
|
|
24
|
+
* data directory. Do not use restricted Electron development overrides. */
|
|
25
|
+
export declare function detectClaudeDesktopApp(appPath?: string, system?: DesktopHost): Promise<ClaudeDesktopInstallation>;
|
package/dist/domain.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type RoutingEvent } from "./model-policy-schema";
|
|
|
3
3
|
export { modelPolicySchema, routingEventSchema, routingEventsSchema } from "./model-policy-schema";
|
|
4
4
|
export type { ModelPolicy, RoutingEvent } from "./model-policy-schema";
|
|
5
5
|
export type { AuthStyle } from "./auth";
|
|
6
|
-
export declare const VERSION = "0.
|
|
6
|
+
export declare const VERSION = "0.2.0";
|
|
7
7
|
export declare const harnessSchema: z.ZodEnum<["claude", "codex", "grok", "opencode", "opencode2", "pi", "omp", "dsh", "cline", "hermes", "prime-agent", "gemini", "aider", "kilo"]>;
|
|
8
8
|
export declare const protocolSchema: z.ZodEnum<["anthropic-messages", "openai-responses", "openai-chat", "gemini-generate-content"]>;
|
|
9
9
|
export declare const idSchema: z.ZodString;
|
|
@@ -20,6 +20,7 @@ export declare const modelSchema: z.ZodObject<{
|
|
|
20
20
|
inputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
21
21
|
outputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
22
22
|
supportedParameters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
+
reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]>, "many">>;
|
|
23
24
|
supportedGenerationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
24
25
|
}, "strict", z.ZodTypeAny, {
|
|
25
26
|
id: string;
|
|
@@ -32,6 +33,7 @@ export declare const modelSchema: z.ZodObject<{
|
|
|
32
33
|
inputModalities?: string[] | undefined;
|
|
33
34
|
outputModalities?: string[] | undefined;
|
|
34
35
|
supportedParameters?: string[] | undefined;
|
|
36
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
35
37
|
supportedGenerationMethods?: string[] | undefined;
|
|
36
38
|
}, {
|
|
37
39
|
id: string;
|
|
@@ -44,6 +46,7 @@ export declare const modelSchema: z.ZodObject<{
|
|
|
44
46
|
inputModalities?: string[] | undefined;
|
|
45
47
|
outputModalities?: string[] | undefined;
|
|
46
48
|
supportedParameters?: string[] | undefined;
|
|
49
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
47
50
|
supportedGenerationMethods?: string[] | undefined;
|
|
48
51
|
}>;
|
|
49
52
|
export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
@@ -70,6 +73,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
70
73
|
inputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
71
74
|
outputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
72
75
|
supportedParameters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
76
|
+
reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]>, "many">>;
|
|
73
77
|
supportedGenerationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
78
|
}, "strict", z.ZodTypeAny, {
|
|
75
79
|
id: string;
|
|
@@ -82,6 +86,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
82
86
|
inputModalities?: string[] | undefined;
|
|
83
87
|
outputModalities?: string[] | undefined;
|
|
84
88
|
supportedParameters?: string[] | undefined;
|
|
89
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
85
90
|
supportedGenerationMethods?: string[] | undefined;
|
|
86
91
|
}, {
|
|
87
92
|
id: string;
|
|
@@ -94,6 +99,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
94
99
|
inputModalities?: string[] | undefined;
|
|
95
100
|
outputModalities?: string[] | undefined;
|
|
96
101
|
supportedParameters?: string[] | undefined;
|
|
102
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
97
103
|
supportedGenerationMethods?: string[] | undefined;
|
|
98
104
|
}>, "many">>;
|
|
99
105
|
additionalModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -107,6 +113,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
107
113
|
inputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
108
114
|
outputModalities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
109
115
|
supportedParameters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
116
|
+
reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]>, "many">>;
|
|
110
117
|
supportedGenerationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
111
118
|
}, "strict", z.ZodTypeAny, {
|
|
112
119
|
id: string;
|
|
@@ -119,6 +126,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
119
126
|
inputModalities?: string[] | undefined;
|
|
120
127
|
outputModalities?: string[] | undefined;
|
|
121
128
|
supportedParameters?: string[] | undefined;
|
|
129
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
122
130
|
supportedGenerationMethods?: string[] | undefined;
|
|
123
131
|
}, {
|
|
124
132
|
id: string;
|
|
@@ -131,6 +139,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
131
139
|
inputModalities?: string[] | undefined;
|
|
132
140
|
outputModalities?: string[] | undefined;
|
|
133
141
|
supportedParameters?: string[] | undefined;
|
|
142
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
134
143
|
supportedGenerationMethods?: string[] | undefined;
|
|
135
144
|
}>, "many">>;
|
|
136
145
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -151,6 +160,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
151
160
|
inputModalities?: string[] | undefined;
|
|
152
161
|
outputModalities?: string[] | undefined;
|
|
153
162
|
supportedParameters?: string[] | undefined;
|
|
163
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
154
164
|
supportedGenerationMethods?: string[] | undefined;
|
|
155
165
|
}[];
|
|
156
166
|
credentialEnv?: string | undefined;
|
|
@@ -170,6 +180,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
170
180
|
inputModalities?: string[] | undefined;
|
|
171
181
|
outputModalities?: string[] | undefined;
|
|
172
182
|
supportedParameters?: string[] | undefined;
|
|
183
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
173
184
|
supportedGenerationMethods?: string[] | undefined;
|
|
174
185
|
}[] | undefined;
|
|
175
186
|
}, {
|
|
@@ -196,6 +207,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
196
207
|
inputModalities?: string[] | undefined;
|
|
197
208
|
outputModalities?: string[] | undefined;
|
|
198
209
|
supportedParameters?: string[] | undefined;
|
|
210
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
199
211
|
supportedGenerationMethods?: string[] | undefined;
|
|
200
212
|
}[] | undefined;
|
|
201
213
|
additionalModels?: {
|
|
@@ -209,6 +221,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
209
221
|
inputModalities?: string[] | undefined;
|
|
210
222
|
outputModalities?: string[] | undefined;
|
|
211
223
|
supportedParameters?: string[] | undefined;
|
|
224
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
212
225
|
supportedGenerationMethods?: string[] | undefined;
|
|
213
226
|
}[] | undefined;
|
|
214
227
|
}>, {
|
|
@@ -229,6 +242,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
229
242
|
inputModalities?: string[] | undefined;
|
|
230
243
|
outputModalities?: string[] | undefined;
|
|
231
244
|
supportedParameters?: string[] | undefined;
|
|
245
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
232
246
|
supportedGenerationMethods?: string[] | undefined;
|
|
233
247
|
}[];
|
|
234
248
|
credentialEnv?: string | undefined;
|
|
@@ -248,6 +262,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
248
262
|
inputModalities?: string[] | undefined;
|
|
249
263
|
outputModalities?: string[] | undefined;
|
|
250
264
|
supportedParameters?: string[] | undefined;
|
|
265
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
251
266
|
supportedGenerationMethods?: string[] | undefined;
|
|
252
267
|
}[] | undefined;
|
|
253
268
|
}, {
|
|
@@ -274,6 +289,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
274
289
|
inputModalities?: string[] | undefined;
|
|
275
290
|
outputModalities?: string[] | undefined;
|
|
276
291
|
supportedParameters?: string[] | undefined;
|
|
292
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
277
293
|
supportedGenerationMethods?: string[] | undefined;
|
|
278
294
|
}[] | undefined;
|
|
279
295
|
additionalModels?: {
|
|
@@ -287,6 +303,7 @@ export declare const providerInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
287
303
|
inputModalities?: string[] | undefined;
|
|
288
304
|
outputModalities?: string[] | undefined;
|
|
289
305
|
supportedParameters?: string[] | undefined;
|
|
306
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[] | undefined;
|
|
290
307
|
supportedGenerationMethods?: string[] | undefined;
|
|
291
308
|
}[] | undefined;
|
|
292
309
|
}>;
|
|
@@ -600,6 +617,7 @@ export declare const runUpdateSchema: z.ZodObject<{
|
|
|
600
617
|
requestedModel: z.ZodString;
|
|
601
618
|
resolvedModel: z.ZodOptional<z.ZodString>;
|
|
602
619
|
reportedModel: z.ZodOptional<z.ZodString>;
|
|
620
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]>>;
|
|
603
621
|
decision: z.ZodEnum<["allow", "alias", "reject", "fallback"]>;
|
|
604
622
|
role: z.ZodOptional<z.ZodEnum<["main", "subagent", "fast", "planning", "review", "summary", "compaction", "weak", "editor"]>>;
|
|
605
623
|
reason: z.ZodOptional<z.ZodString>;
|
|
@@ -611,6 +629,7 @@ export declare const runUpdateSchema: z.ZodObject<{
|
|
|
611
629
|
decision: "allow" | "alias" | "reject" | "fallback";
|
|
612
630
|
resolvedModel?: string | undefined;
|
|
613
631
|
reportedModel?: string | undefined;
|
|
632
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
|
|
614
633
|
role?: "main" | "subagent" | "fast" | "planning" | "review" | "summary" | "compaction" | "weak" | "editor" | undefined;
|
|
615
634
|
reason?: string | undefined;
|
|
616
635
|
upstreamStatus?: number | undefined;
|
|
@@ -621,6 +640,7 @@ export declare const runUpdateSchema: z.ZodObject<{
|
|
|
621
640
|
decision: "allow" | "alias" | "reject" | "fallback";
|
|
622
641
|
resolvedModel?: string | undefined;
|
|
623
642
|
reportedModel?: string | undefined;
|
|
643
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
|
|
624
644
|
role?: "main" | "subagent" | "fast" | "planning" | "review" | "summary" | "compaction" | "weak" | "editor" | undefined;
|
|
625
645
|
reason?: string | undefined;
|
|
626
646
|
upstreamStatus?: number | undefined;
|
|
@@ -636,6 +656,7 @@ export declare const runUpdateSchema: z.ZodObject<{
|
|
|
636
656
|
decision: "allow" | "alias" | "reject" | "fallback";
|
|
637
657
|
resolvedModel?: string | undefined;
|
|
638
658
|
reportedModel?: string | undefined;
|
|
659
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
|
|
639
660
|
role?: "main" | "subagent" | "fast" | "planning" | "review" | "summary" | "compaction" | "weak" | "editor" | undefined;
|
|
640
661
|
reason?: string | undefined;
|
|
641
662
|
upstreamStatus?: number | undefined;
|
|
@@ -651,6 +672,7 @@ export declare const runUpdateSchema: z.ZodObject<{
|
|
|
651
672
|
decision: "allow" | "alias" | "reject" | "fallback";
|
|
652
673
|
resolvedModel?: string | undefined;
|
|
653
674
|
reportedModel?: string | undefined;
|
|
675
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
|
|
654
676
|
role?: "main" | "subagent" | "fast" | "planning" | "review" | "summary" | "compaction" | "weak" | "editor" | undefined;
|
|
655
677
|
reason?: string | undefined;
|
|
656
678
|
upstreamStatus?: number | undefined;
|
package/dist/gemini-bridge.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type ProviderRequestTiming } from "./provider-request";
|
|
1
2
|
import type { HarnessLaunchInput } from "./harness-types";
|
|
2
|
-
export declare function geminiBridge(input: HarnessLaunchInput): {
|
|
3
|
+
export declare function geminiBridge(input: HarnessLaunchInput, timing?: ProviderRequestTiming): {
|
|
3
4
|
baseUrl: string;
|
|
4
5
|
token: string;
|
|
5
6
|
cleanup: () => Promise<void>;
|
package/dist/generated/api.d.ts
CHANGED
|
@@ -299,6 +299,7 @@ export interface components {
|
|
|
299
299
|
inputModalities?: string[];
|
|
300
300
|
outputModalities?: string[];
|
|
301
301
|
supportedParameters?: string[];
|
|
302
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
302
303
|
supportedGenerationMethods?: string[];
|
|
303
304
|
}[];
|
|
304
305
|
additionalModels?: {
|
|
@@ -312,6 +313,7 @@ export interface components {
|
|
|
312
313
|
inputModalities?: string[];
|
|
313
314
|
outputModalities?: string[];
|
|
314
315
|
supportedParameters?: string[];
|
|
316
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
315
317
|
supportedGenerationMethods?: string[];
|
|
316
318
|
}[];
|
|
317
319
|
};
|
|
@@ -348,6 +350,7 @@ export interface components {
|
|
|
348
350
|
inputModalities?: string[];
|
|
349
351
|
outputModalities?: string[];
|
|
350
352
|
supportedParameters?: string[];
|
|
353
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
351
354
|
supportedGenerationMethods?: string[];
|
|
352
355
|
}[];
|
|
353
356
|
additionalModels?: {
|
|
@@ -361,6 +364,7 @@ export interface components {
|
|
|
361
364
|
inputModalities?: string[];
|
|
362
365
|
outputModalities?: string[];
|
|
363
366
|
supportedParameters?: string[];
|
|
367
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
364
368
|
supportedGenerationMethods?: string[];
|
|
365
369
|
}[];
|
|
366
370
|
version: number;
|
|
@@ -443,6 +447,7 @@ export interface components {
|
|
|
443
447
|
inputModalities?: string[];
|
|
444
448
|
outputModalities?: string[];
|
|
445
449
|
supportedParameters?: string[];
|
|
450
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
446
451
|
supportedGenerationMethods?: string[];
|
|
447
452
|
};
|
|
448
453
|
ModelPolicy: {
|
|
@@ -477,6 +482,8 @@ export interface components {
|
|
|
477
482
|
resolvedModel?: string;
|
|
478
483
|
reportedModel?: string;
|
|
479
484
|
/** @enum {string} */
|
|
485
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
486
|
+
/** @enum {string} */
|
|
480
487
|
decision: "allow" | "alias" | "reject" | "fallback";
|
|
481
488
|
/** @enum {string} */
|
|
482
489
|
role?: "main" | "subagent" | "fast" | "planning" | "review" | "summary" | "compaction" | "weak" | "editor";
|
|
@@ -495,6 +502,7 @@ export interface components {
|
|
|
495
502
|
inputModalities?: string[];
|
|
496
503
|
outputModalities?: string[];
|
|
497
504
|
supportedParameters?: string[];
|
|
505
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
498
506
|
supportedGenerationMethods?: string[];
|
|
499
507
|
codingEligible: boolean;
|
|
500
508
|
expired: boolean;
|
|
@@ -518,6 +526,7 @@ export interface components {
|
|
|
518
526
|
inputModalities?: string[];
|
|
519
527
|
outputModalities?: string[];
|
|
520
528
|
supportedParameters?: string[];
|
|
529
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
521
530
|
supportedGenerationMethods?: string[];
|
|
522
531
|
}[];
|
|
523
532
|
refreshedAt: string;
|
|
@@ -558,6 +567,7 @@ export interface components {
|
|
|
558
567
|
inputModalities?: string[];
|
|
559
568
|
outputModalities?: string[];
|
|
560
569
|
supportedParameters?: string[];
|
|
570
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
561
571
|
supportedGenerationMethods?: string[];
|
|
562
572
|
}[];
|
|
563
573
|
additionalModels?: {
|
|
@@ -571,6 +581,7 @@ export interface components {
|
|
|
571
581
|
inputModalities?: string[];
|
|
572
582
|
outputModalities?: string[];
|
|
573
583
|
supportedParameters?: string[];
|
|
584
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
574
585
|
supportedGenerationMethods?: string[];
|
|
575
586
|
}[];
|
|
576
587
|
version: number;
|
|
@@ -622,6 +633,7 @@ export interface components {
|
|
|
622
633
|
inputModalities?: string[];
|
|
623
634
|
outputModalities?: string[];
|
|
624
635
|
supportedParameters?: string[];
|
|
636
|
+
reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
|
|
625
637
|
supportedGenerationMethods?: string[];
|
|
626
638
|
}[];
|
|
627
639
|
refreshedAt: string;
|
|
@@ -676,6 +688,8 @@ export interface components {
|
|
|
676
688
|
resolvedModel?: string;
|
|
677
689
|
reportedModel?: string;
|
|
678
690
|
/** @enum {string} */
|
|
691
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
692
|
+
/** @enum {string} */
|
|
679
693
|
decision: "allow" | "alias" | "reject" | "fallback";
|
|
680
694
|
/** @enum {string} */
|
|
681
695
|
role?: "main" | "subagent" | "fast" | "planning" | "review" | "summary" | "compaction" | "weak" | "editor";
|
|
@@ -735,6 +749,8 @@ export interface components {
|
|
|
735
749
|
resolvedModel?: string;
|
|
736
750
|
reportedModel?: string;
|
|
737
751
|
/** @enum {string} */
|
|
752
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
753
|
+
/** @enum {string} */
|
|
738
754
|
decision: "allow" | "alias" | "reject" | "fallback";
|
|
739
755
|
/** @enum {string} */
|
|
740
756
|
role?: "main" | "subagent" | "fast" | "planning" | "review" | "summary" | "compaction" | "weak" | "editor";
|
package/dist/harness-types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Model, Provider, Profile } from "./domain";
|
|
|
2
2
|
import type { CompiledModelPolicy, ModelPolicy } from "./model-policy";
|
|
3
3
|
import type { NativeModelPolicy } from "./native-model-policy";
|
|
4
4
|
import type { RoutingEvent } from "./inference-gateway";
|
|
5
|
+
import type { ReasoningEffort } from "./reasoning";
|
|
5
6
|
export type HarnessId = Profile["harness"];
|
|
6
7
|
export type HarnessLaunchInput = {
|
|
7
8
|
harness: HarnessId;
|
|
@@ -23,6 +24,8 @@ export type HarnessLaunchInput = {
|
|
|
23
24
|
compiledPolicy?: CompiledModelPolicy;
|
|
24
25
|
nativePolicy?: NativeModelPolicy;
|
|
25
26
|
onRoutingEvent?: (event: RoutingEvent) => void;
|
|
27
|
+
reasoning?: ReasoningEffort;
|
|
28
|
+
dangerouslyBypassApprovalsAndSandbox?: boolean;
|
|
26
29
|
};
|
|
27
30
|
export type PreparedLaunch = {
|
|
28
31
|
executable: string;
|
package/dist/harnesses.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type ProviderRequestTiming } from "./provider-request";
|
|
2
|
+
import { type ReasoningEffort } from "./reasoning";
|
|
1
3
|
import type { HarnessId, HarnessLaunchInput, PreparedLaunch } from "./harness-types";
|
|
2
4
|
export declare function detectHarness(harness: HarnessId, override?: string): Promise<{
|
|
3
5
|
harness: "gemini" | "claude" | "codex" | "grok" | "opencode" | "opencode2" | "pi" | "omp" | "dsh" | "cline" | "hermes" | "prime-agent" | "aider" | "kilo";
|
|
@@ -14,7 +16,7 @@ export declare function detectHarness(harness: HarnessId, override?: string): Pr
|
|
|
14
16
|
}>;
|
|
15
17
|
export declare function validateHarnessConfiguration(harness: HarnessId, cwd: string, args?: readonly string[]): Promise<void>;
|
|
16
18
|
export declare function validateHarnessVersion(harness: HarnessId, version: string | undefined): void;
|
|
17
|
-
export declare function codexModel(model: HarnessLaunchInput["models"][number], priority: number): {
|
|
19
|
+
export declare function codexModel(model: HarnessLaunchInput["models"][number], priority: number, baseUrl?: string, selectedReasoning?: ReasoningEffort): {
|
|
18
20
|
slug: string;
|
|
19
21
|
display_name: string;
|
|
20
22
|
description: string;
|
|
@@ -22,8 +24,11 @@ export declare function codexModel(model: HarnessLaunchInput["models"][number],
|
|
|
22
24
|
visibility: string;
|
|
23
25
|
supported_in_api: boolean;
|
|
24
26
|
priority: number;
|
|
25
|
-
supported_reasoning_levels:
|
|
26
|
-
|
|
27
|
+
supported_reasoning_levels: {
|
|
28
|
+
effort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
29
|
+
description: string;
|
|
30
|
+
}[];
|
|
31
|
+
default_reasoning_level: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
27
32
|
support_verbosity: boolean;
|
|
28
33
|
supports_reasoning_summary_parameter: boolean;
|
|
29
34
|
default_verbosity: null;
|
|
@@ -44,4 +49,9 @@ export declare function codexModel(model: HarnessLaunchInput["models"][number],
|
|
|
44
49
|
instructions_variables: null;
|
|
45
50
|
};
|
|
46
51
|
};
|
|
52
|
+
export declare function grokBridge(input: HarnessLaunchInput, timing?: ProviderRequestTiming): {
|
|
53
|
+
baseUrl: string;
|
|
54
|
+
token: string;
|
|
55
|
+
cleanup: () => Promise<void>;
|
|
56
|
+
};
|
|
47
57
|
export declare function prepareHarnessLaunch(input: HarnessLaunchInput): Promise<PreparedLaunch>;
|
package/dist/hermes-backend.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ProviderRequestTiming } from "./provider-request";
|
|
1
2
|
import type { HarnessLaunchInput, PreparedLaunch } from "./harness-types";
|
|
2
3
|
/** Hermes' native runtime names for the three Switcher wire contracts. */
|
|
3
4
|
export declare const hermesApiMode: {
|
|
@@ -10,7 +11,7 @@ export declare const hermesApiMode: {
|
|
|
10
11
|
* Hermes' custom provider client uses Bearer locally; this bridge translates
|
|
11
12
|
* that local credential into the provider's declared upstream header style.
|
|
12
13
|
*/
|
|
13
|
-
export declare function createHermesBridge(input: Pick<HarnessLaunchInput, "baseUrl" | "protocol" | "authStyle" | "model" | "models" | "credential"
|
|
14
|
+
export declare function createHermesBridge(input: Pick<HarnessLaunchInput, "baseUrl" | "protocol" | "authStyle" | "model" | "models" | "credential">, timing?: ProviderRequestTiming): {
|
|
14
15
|
baseUrl: string;
|
|
15
16
|
token: string;
|
|
16
17
|
cleanup: () => Promise<void>;
|