@the-open-engine/zeroshot 6.8.3 → 6.9.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/lib/agent-cli-provider/adapters/gateway.d.ts.map +1 -1
- package/lib/agent-cli-provider/adapters/gateway.js +9 -2
- package/lib/agent-cli-provider/adapters/gateway.js.map +1 -1
- package/lib/agent-cli-provider/gateway-client.d.ts +9 -2
- package/lib/agent-cli-provider/gateway-client.d.ts.map +1 -1
- package/lib/agent-cli-provider/gateway-client.js +117 -3
- package/lib/agent-cli-provider/gateway-client.js.map +1 -1
- package/lib/agent-cli-provider/gateway-runner.js +5 -0
- package/lib/agent-cli-provider/gateway-runner.js.map +1 -1
- package/lib/agent-cli-provider/gateway-tools.d.ts.map +1 -1
- package/lib/agent-cli-provider/gateway-tools.js +30 -0
- package/lib/agent-cli-provider/gateway-tools.js.map +1 -1
- package/lib/agent-cli-provider/index.d.ts +1 -1
- package/lib/agent-cli-provider/index.d.ts.map +1 -1
- package/lib/agent-cli-provider/index.js.map +1 -1
- package/lib/agent-cli-provider/provider-registry.d.ts +2 -2
- package/lib/agent-cli-provider/provider-registry.d.ts.map +1 -1
- package/lib/agent-cli-provider/provider-registry.js +10 -2
- package/lib/agent-cli-provider/provider-registry.js.map +1 -1
- package/lib/agent-cli-provider/single-agent-runtime.js +6 -0
- package/lib/agent-cli-provider/single-agent-runtime.js.map +1 -1
- package/lib/agent-cli-provider/types.d.ts +5 -0
- package/lib/agent-cli-provider/types.d.ts.map +1 -1
- package/lib/agent-cli-provider/types.js.map +1 -1
- package/package.json +1 -1
- package/src/agent-cli-provider/adapters/gateway.ts +9 -2
- package/src/agent-cli-provider/gateway-client.ts +135 -4
- package/src/agent-cli-provider/gateway-runner.ts +5 -0
- package/src/agent-cli-provider/gateway-tools.ts +40 -0
- package/src/agent-cli-provider/index.ts +1 -0
- package/src/agent-cli-provider/provider-registry.ts +10 -2
- package/src/agent-cli-provider/single-agent-runtime.ts +6 -0
- package/src/agent-cli-provider/types.ts +5 -0
- package/src/preflight.js +3 -2
|
@@ -228,6 +228,9 @@ function resolveRuntimeGatewayOptions(
|
|
|
228
228
|
? settingsGateway.headers
|
|
229
229
|
: { ...(settingsGateway.headers ?? {}), ...requestGateway.headers };
|
|
230
230
|
const mergedGateway: GatewayBuildOptions = {
|
|
231
|
+
...(requestGateway.protocol ?? settingsGateway.protocol
|
|
232
|
+
? { protocol: requestGateway.protocol ?? settingsGateway.protocol }
|
|
233
|
+
: {}),
|
|
231
234
|
...((requestGateway.baseUrl ?? settingsGateway.baseUrl)
|
|
232
235
|
? { baseUrl: requestGateway.baseUrl ?? settingsGateway.baseUrl }
|
|
233
236
|
: {}),
|
|
@@ -236,6 +239,9 @@ function resolveRuntimeGatewayOptions(
|
|
|
236
239
|
: {}),
|
|
237
240
|
...(mergedHeaders === undefined ? {} : { headers: mergedHeaders }),
|
|
238
241
|
model: requestGateway.model ?? modelSpec.model ?? settingsGateway.model ?? null,
|
|
242
|
+
...(requestGateway.maxTokens ?? settingsGateway.maxTokens
|
|
243
|
+
? { maxTokens: requestGateway.maxTokens ?? settingsGateway.maxTokens }
|
|
244
|
+
: {}),
|
|
239
245
|
...((requestGateway.toolPolicy ?? settingsGateway.toolPolicy)
|
|
240
246
|
? { toolPolicy: requestGateway.toolPolicy ?? settingsGateway.toolPolicy }
|
|
241
247
|
: {}),
|
|
@@ -17,6 +17,7 @@ export type KnownProviderName = ProviderId | ProviderAlias;
|
|
|
17
17
|
export type ModelLevel = 'level1' | 'level2' | 'level3';
|
|
18
18
|
export type ReasoningEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
19
19
|
export type OutputFormat = 'text' | 'json' | 'stream-json';
|
|
20
|
+
export type GatewayProtocol = 'openai' | 'anthropic';
|
|
20
21
|
export type {
|
|
21
22
|
ProviderCapabilities,
|
|
22
23
|
ProviderCapabilityState,
|
|
@@ -66,18 +67,22 @@ export interface GatewayToolPolicy {
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
export interface GatewayBuildOptions {
|
|
70
|
+
readonly protocol?: GatewayProtocol;
|
|
69
71
|
readonly baseUrl?: string;
|
|
70
72
|
readonly apiKey?: string;
|
|
71
73
|
readonly headers?: Readonly<Record<string, string>>;
|
|
72
74
|
readonly model?: string | null;
|
|
75
|
+
readonly maxTokens?: number;
|
|
73
76
|
readonly toolPolicy?: GatewayToolPolicy;
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
export interface ResolvedGatewayBuildOptions {
|
|
80
|
+
readonly protocol: GatewayProtocol;
|
|
77
81
|
readonly baseUrl: string;
|
|
78
82
|
readonly apiKey: string;
|
|
79
83
|
readonly headers: Readonly<Record<string, string>>;
|
|
80
84
|
readonly model: string;
|
|
85
|
+
readonly maxTokens?: number;
|
|
81
86
|
readonly toolPolicy: GatewayToolPolicy;
|
|
82
87
|
}
|
|
83
88
|
|
package/src/preflight.js
CHANGED
|
@@ -426,11 +426,12 @@ function validateGatewayProvider() {
|
|
|
426
426
|
errors: [
|
|
427
427
|
formatError(
|
|
428
428
|
'Gateway provider not configured',
|
|
429
|
-
'providerSettings.gateway must define baseUrl, apiKey, model, and toolPolicy before gateway can run.',
|
|
429
|
+
'providerSettings.gateway must define protocol, baseUrl, apiKey, model, and toolPolicy before gateway can run.',
|
|
430
430
|
[
|
|
431
431
|
'Run: zeroshot settings',
|
|
432
|
-
'Set providerSettings.gateway.baseUrl
|
|
432
|
+
'Set providerSettings.gateway.protocol and baseUrl for your compatible endpoint',
|
|
433
433
|
'Set providerSettings.gateway.apiKey and providerSettings.gateway.model',
|
|
434
|
+
'Set providerSettings.gateway.maxTokens when protocol is anthropic',
|
|
434
435
|
'Set providerSettings.gateway.toolPolicy.roots and toolPolicy.commands explicitly',
|
|
435
436
|
]
|
|
436
437
|
),
|