@skillsregistry/contracts 2.0.0 → 3.0.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/LICENSE +201 -0
- package/README.md +9 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +1 -1
- package/dist/common.js.map +1 -1
- package/dist/openapi.test.d.ts +2 -0
- package/dist/openapi.test.d.ts.map +1 -0
- package/dist/openapi.test.js +71 -0
- package/dist/openapi.test.js.map +1 -0
- package/dist/responses.d.ts +101 -948
- package/dist/responses.d.ts.map +1 -1
- package/dist/responses.js +53 -8
- package/dist/responses.js.map +1 -1
- package/dist/schemas.test.js +23 -1
- package/dist/schemas.test.js.map +1 -1
- package/dist/upstream.d.ts +134 -576
- package/dist/upstream.d.ts.map +1 -1
- package/dist/upstream.js +3 -3
- package/dist/upstream.js.map +1 -1
- package/package.json +16 -15
package/dist/upstream.d.ts
CHANGED
|
@@ -4,7 +4,12 @@ import { z } from 'zod';
|
|
|
4
4
|
* allowVulnerable flag; when the caller sets `minTrust` / `allowVulnerable`
|
|
5
5
|
* explicitly, those override the appetite-derived values.
|
|
6
6
|
*/
|
|
7
|
-
export declare const AppetiteSchema: z.ZodEnum<
|
|
7
|
+
export declare const AppetiteSchema: z.ZodEnum<{
|
|
8
|
+
strict: "strict";
|
|
9
|
+
cautious: "cautious";
|
|
10
|
+
balanced: "balanced";
|
|
11
|
+
adventurous: "adventurous";
|
|
12
|
+
}>;
|
|
8
13
|
export type Appetite = z.infer<typeof AppetiteSchema>;
|
|
9
14
|
/**
|
|
10
15
|
* Visibility bands per cortex.md §16.6. Four-band tenant-scope model
|
|
@@ -16,7 +21,13 @@ export type Appetite = z.infer<typeof AppetiteSchema>;
|
|
|
16
21
|
* value must match the column value. Only *field names* were flipped to
|
|
17
22
|
* camelCase in v2.0.0.
|
|
18
23
|
*/
|
|
19
|
-
export declare const SkillVisibilitySchema: z.ZodEnum<
|
|
24
|
+
export declare const SkillVisibilitySchema: z.ZodEnum<{
|
|
25
|
+
public: "public";
|
|
26
|
+
private: "private";
|
|
27
|
+
tenant_private: "tenant_private";
|
|
28
|
+
tenant_internal: "tenant_internal";
|
|
29
|
+
unlisted: "unlisted";
|
|
30
|
+
}>;
|
|
20
31
|
export type SkillVisibility = z.infer<typeof SkillVisibilitySchema>;
|
|
21
32
|
/**
|
|
22
33
|
* Search request per cortex.md §6.2:
|
|
@@ -38,153 +49,70 @@ export type SkillVisibility = z.infer<typeof SkillVisibilitySchema>;
|
|
|
38
49
|
* bump.
|
|
39
50
|
*/
|
|
40
51
|
export declare const SearchRequestSchema: z.ZodObject<{
|
|
41
|
-
/** Free-text query. Required, non-empty. */
|
|
42
52
|
query: z.ZodString;
|
|
43
|
-
/** Advisory tenant scope. */
|
|
44
53
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
appetite: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
strict: "strict";
|
|
56
|
+
cautious: "cautious";
|
|
57
|
+
balanced: "balanced";
|
|
58
|
+
adventurous: "adventurous";
|
|
59
|
+
}>>;
|
|
51
60
|
minTrust: z.ZodOptional<z.ZodNumber>;
|
|
52
|
-
/**
|
|
53
|
-
* Allow skills tagged vulnerable / contains-vulnerable through the filter.
|
|
54
|
-
* Overrides the appetite-derived default when set.
|
|
55
|
-
*/
|
|
56
61
|
allowVulnerable: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
-
/** Result cap (1..50). Default 10 at the domain layer. */
|
|
58
62
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
59
|
-
|
|
60
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
63
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
64
|
category: z.ZodOptional<z.ZodString>;
|
|
62
|
-
runtimeEnv: z.ZodOptional<z.ZodArray<z.ZodString
|
|
63
|
-
visibility: z.ZodOptional<z.ZodEnum<
|
|
65
|
+
runtimeEnv: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
public: "public";
|
|
68
|
+
private: "private";
|
|
69
|
+
tenant_private: "tenant_private";
|
|
70
|
+
tenant_internal: "tenant_internal";
|
|
71
|
+
unlisted: "unlisted";
|
|
72
|
+
}>>;
|
|
64
73
|
portable: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
},
|
|
66
|
-
query: string;
|
|
67
|
-
limit?: number | undefined;
|
|
68
|
-
tags?: string[] | undefined;
|
|
69
|
-
category?: string | undefined;
|
|
70
|
-
runtimeEnv?: string[] | undefined;
|
|
71
|
-
visibility?: "public" | "private" | "tenant_private" | "tenant_internal" | "unlisted" | undefined;
|
|
72
|
-
tenantId?: string | undefined;
|
|
73
|
-
portable?: boolean | undefined;
|
|
74
|
-
appetite?: "strict" | "cautious" | "balanced" | "adventurous" | undefined;
|
|
75
|
-
minTrust?: number | undefined;
|
|
76
|
-
allowVulnerable?: boolean | undefined;
|
|
77
|
-
}, {
|
|
78
|
-
query: string;
|
|
79
|
-
limit?: number | undefined;
|
|
80
|
-
tags?: string[] | undefined;
|
|
81
|
-
category?: string | undefined;
|
|
82
|
-
runtimeEnv?: string[] | undefined;
|
|
83
|
-
visibility?: "public" | "private" | "tenant_private" | "tenant_internal" | "unlisted" | undefined;
|
|
84
|
-
tenantId?: string | undefined;
|
|
85
|
-
portable?: boolean | undefined;
|
|
86
|
-
appetite?: "strict" | "cautious" | "balanced" | "adventurous" | undefined;
|
|
87
|
-
minTrust?: number | undefined;
|
|
88
|
-
allowVulnerable?: boolean | undefined;
|
|
89
|
-
}>;
|
|
74
|
+
}, z.core.$strip>;
|
|
90
75
|
export type SearchRequest = z.infer<typeof SearchRequestSchema>;
|
|
91
76
|
export declare const TrustScoreRequestSchema: z.ZodObject<{
|
|
92
|
-
/** Skill identifier — either the mothership UUID or the local node's slug. */
|
|
93
77
|
skill_id: z.ZodString;
|
|
94
|
-
/**
|
|
95
|
-
* Optional pinned skill manifest. When present, the mothership scores
|
|
96
|
-
* against this snapshot instead of the version it may have indexed.
|
|
97
|
-
*/
|
|
98
78
|
manifest: z.ZodOptional<z.ZodObject<{
|
|
99
79
|
name: z.ZodString;
|
|
100
80
|
version: z.ZodString;
|
|
101
81
|
source: z.ZodString;
|
|
102
82
|
description: z.ZodOptional<z.ZodString>;
|
|
103
83
|
skill_md: z.ZodOptional<z.ZodString>;
|
|
104
|
-
},
|
|
105
|
-
name: string;
|
|
106
|
-
version: string;
|
|
107
|
-
source: string;
|
|
108
|
-
description?: string | undefined;
|
|
109
|
-
skill_md?: string | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
name: string;
|
|
112
|
-
version: string;
|
|
113
|
-
source: string;
|
|
114
|
-
description?: string | undefined;
|
|
115
|
-
skill_md?: string | undefined;
|
|
116
|
-
}>>;
|
|
117
|
-
/** Tenant scope hint (advisory in v1; enforced when write tools land). */
|
|
84
|
+
}, z.core.$strip>>;
|
|
118
85
|
tenant_id: z.ZodOptional<z.ZodString>;
|
|
119
|
-
},
|
|
120
|
-
skill_id: string;
|
|
121
|
-
manifest?: {
|
|
122
|
-
name: string;
|
|
123
|
-
version: string;
|
|
124
|
-
source: string;
|
|
125
|
-
description?: string | undefined;
|
|
126
|
-
skill_md?: string | undefined;
|
|
127
|
-
} | undefined;
|
|
128
|
-
tenant_id?: string | undefined;
|
|
129
|
-
}, {
|
|
130
|
-
skill_id: string;
|
|
131
|
-
manifest?: {
|
|
132
|
-
name: string;
|
|
133
|
-
version: string;
|
|
134
|
-
source: string;
|
|
135
|
-
description?: string | undefined;
|
|
136
|
-
skill_md?: string | undefined;
|
|
137
|
-
} | undefined;
|
|
138
|
-
tenant_id?: string | undefined;
|
|
139
|
-
}>;
|
|
86
|
+
}, z.core.$strip>;
|
|
140
87
|
export type TrustScoreRequest = z.infer<typeof TrustScoreRequestSchema>;
|
|
141
88
|
export declare const TrustScoreResponseSchema: z.ZodObject<{
|
|
142
89
|
skill_id: z.ZodString;
|
|
143
90
|
trust_score: z.ZodNumber;
|
|
144
|
-
trust_tier: z.ZodEnum<
|
|
91
|
+
trust_tier: z.ZodEnum<{
|
|
92
|
+
A: "A";
|
|
93
|
+
B: "B";
|
|
94
|
+
C: "C";
|
|
95
|
+
D: "D";
|
|
96
|
+
F: "F";
|
|
97
|
+
}>;
|
|
145
98
|
trust_breakdown: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
146
99
|
scored_at: z.ZodString;
|
|
147
|
-
/** Tokens consumed by this call, deducted from the tenant's budget. */
|
|
148
100
|
tokens_consumed: z.ZodNumber;
|
|
149
|
-
},
|
|
150
|
-
skill_id: string;
|
|
151
|
-
trust_score: number;
|
|
152
|
-
trust_tier: "A" | "B" | "C" | "D" | "F";
|
|
153
|
-
trust_breakdown: Record<string, number>;
|
|
154
|
-
scored_at: string;
|
|
155
|
-
tokens_consumed: number;
|
|
156
|
-
}, {
|
|
157
|
-
skill_id: string;
|
|
158
|
-
trust_score: number;
|
|
159
|
-
trust_tier: "A" | "B" | "C" | "D" | "F";
|
|
160
|
-
trust_breakdown: Record<string, number>;
|
|
161
|
-
scored_at: string;
|
|
162
|
-
tokens_consumed: number;
|
|
163
|
-
}>;
|
|
101
|
+
}, z.core.$strip>;
|
|
164
102
|
export type TrustScoreResponse = z.infer<typeof TrustScoreResponseSchema>;
|
|
165
103
|
export declare const BudgetResponseSchema: z.ZodObject<{
|
|
166
104
|
tenant_id: z.ZodString;
|
|
167
|
-
plan: z.ZodEnum<
|
|
105
|
+
plan: z.ZodEnum<{
|
|
106
|
+
free: "free";
|
|
107
|
+
starter: "starter";
|
|
108
|
+
growth: "growth";
|
|
109
|
+
enterprise: "enterprise";
|
|
110
|
+
}>;
|
|
168
111
|
tokens_total: z.ZodNumber;
|
|
169
112
|
tokens_remaining: z.ZodNumber;
|
|
170
113
|
tokens_reset_at: z.ZodString;
|
|
171
|
-
/** True when `tokens_remaining` is below 10% of `tokens_total`. */
|
|
172
114
|
low_balance: z.ZodBoolean;
|
|
173
|
-
},
|
|
174
|
-
tenant_id: string;
|
|
175
|
-
plan: "free" | "starter" | "growth" | "enterprise";
|
|
176
|
-
tokens_total: number;
|
|
177
|
-
tokens_remaining: number;
|
|
178
|
-
tokens_reset_at: string;
|
|
179
|
-
low_balance: boolean;
|
|
180
|
-
}, {
|
|
181
|
-
tenant_id: string;
|
|
182
|
-
plan: "free" | "starter" | "growth" | "enterprise";
|
|
183
|
-
tokens_total: number;
|
|
184
|
-
tokens_remaining: number;
|
|
185
|
-
tokens_reset_at: string;
|
|
186
|
-
low_balance: boolean;
|
|
187
|
-
}>;
|
|
115
|
+
}, z.core.$strip>;
|
|
188
116
|
export type BudgetResponse = z.infer<typeof BudgetResponseSchema>;
|
|
189
117
|
/**
|
|
190
118
|
* Sandbox contract per `skill-convention.md` v1.3 §9. The runtime (Cortex L3,
|
|
@@ -204,75 +132,24 @@ export type BudgetResponse = z.infer<typeof BudgetResponseSchema>;
|
|
|
204
132
|
*
|
|
205
133
|
* `profile: 'agent'` + `budget_caps` are the agent-runtime extension
|
|
206
134
|
* (§14.2). `budget_caps` are hard caps enforced in-band by the agent skill's
|
|
207
|
-
* wrapper script through
|
|
135
|
+
* wrapper script through session metering — the caller cannot rely
|
|
208
136
|
* on Cortex enforcing them at the outer boundary.
|
|
209
137
|
*/
|
|
210
138
|
export declare const SkillSandboxSchema: z.ZodObject<{
|
|
211
|
-
/** OCI ref, e.g. `ghcr.io/cognium-labs/skill-base:1.0.0`. */
|
|
212
139
|
image: z.ZodString;
|
|
213
|
-
/** Memory allocation in MB. Base default 512 (vm) / 2048 (agent). */
|
|
214
140
|
memory_mb: z.ZodNumber;
|
|
215
|
-
/** vCPU count. Base default 2 (vm) / 4 (agent). */
|
|
216
141
|
cpu: z.ZodNumber;
|
|
217
|
-
/** Wall-clock ceiling in seconds. Base default 300 (vm) / 7200 (agent). */
|
|
218
142
|
timeout_seconds: z.ZodNumber;
|
|
219
|
-
|
|
220
|
-
* Default-deny egress allow-list of hostnames. Empty array = no outbound
|
|
221
|
-
* network from the sandbox. Wildcards are NOT interpreted here — the
|
|
222
|
-
* runtime treats each entry as an exact host match.
|
|
223
|
-
*/
|
|
224
|
-
egress: z.ZodArray<z.ZodString, "many">;
|
|
225
|
-
/** Present when `runtime_env: agent`. Signals the agent-runtime shape. */
|
|
143
|
+
egress: z.ZodArray<z.ZodString>;
|
|
226
144
|
profile: z.ZodOptional<z.ZodLiteral<"agent">>;
|
|
227
|
-
/**
|
|
228
|
-
* Agent-only hard caps. Enforced in-band by the wrapper script via
|
|
229
|
-
* llmproxy metering (Cortex only enforces the outer wall-clock via
|
|
230
|
-
* provider timeout).
|
|
231
|
-
*/
|
|
232
145
|
budget_caps: z.ZodOptional<z.ZodObject<{
|
|
233
|
-
/** Max spend in USD across all LLM calls this run. */
|
|
234
146
|
max_tokens_usd: z.ZodOptional<z.ZodNumber>;
|
|
235
|
-
/** Max sub-tool invocations from inside the agent sandbox. */
|
|
236
147
|
max_internal_tool_calls: z.ZodOptional<z.ZodNumber>;
|
|
237
|
-
/** Wall-clock ceiling; usually mirrors top-level `timeout_seconds`. */
|
|
238
148
|
max_wall_seconds: z.ZodOptional<z.ZodNumber>;
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
max_internal_tool_calls?: number | undefined;
|
|
242
|
-
max_wall_seconds?: number | undefined;
|
|
243
|
-
}, {
|
|
244
|
-
max_tokens_usd?: number | undefined;
|
|
245
|
-
max_internal_tool_calls?: number | undefined;
|
|
246
|
-
max_wall_seconds?: number | undefined;
|
|
247
|
-
}>>;
|
|
248
|
-
}, "strip", z.ZodTypeAny, {
|
|
249
|
-
image: string;
|
|
250
|
-
memory_mb: number;
|
|
251
|
-
cpu: number;
|
|
252
|
-
timeout_seconds: number;
|
|
253
|
-
egress: string[];
|
|
254
|
-
profile?: "agent" | undefined;
|
|
255
|
-
budget_caps?: {
|
|
256
|
-
max_tokens_usd?: number | undefined;
|
|
257
|
-
max_internal_tool_calls?: number | undefined;
|
|
258
|
-
max_wall_seconds?: number | undefined;
|
|
259
|
-
} | undefined;
|
|
260
|
-
}, {
|
|
261
|
-
image: string;
|
|
262
|
-
memory_mb: number;
|
|
263
|
-
cpu: number;
|
|
264
|
-
timeout_seconds: number;
|
|
265
|
-
egress: string[];
|
|
266
|
-
profile?: "agent" | undefined;
|
|
267
|
-
budget_caps?: {
|
|
268
|
-
max_tokens_usd?: number | undefined;
|
|
269
|
-
max_internal_tool_calls?: number | undefined;
|
|
270
|
-
max_wall_seconds?: number | undefined;
|
|
271
|
-
} | undefined;
|
|
272
|
-
}>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
273
151
|
export type SkillSandbox = z.infer<typeof SkillSandboxSchema>;
|
|
274
152
|
export declare const PublishRequestSchema: z.ZodObject<{
|
|
275
|
-
/** Skill manifest to promote from local to global registry. */
|
|
276
153
|
manifest: z.ZodObject<{
|
|
277
154
|
name: z.ZodString;
|
|
278
155
|
slug: z.ZodString;
|
|
@@ -280,7 +157,7 @@ export declare const PublishRequestSchema: z.ZodObject<{
|
|
|
280
157
|
source: z.ZodString;
|
|
281
158
|
description: z.ZodOptional<z.ZodString>;
|
|
282
159
|
agent_summary: z.ZodOptional<z.ZodString>;
|
|
283
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString
|
|
160
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
284
161
|
category: z.ZodOptional<z.ZodString>;
|
|
285
162
|
schema_json: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
286
163
|
install_method: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -289,246 +166,49 @@ export declare const PublishRequestSchema: z.ZodObject<{
|
|
|
289
166
|
source_url: z.ZodOptional<z.ZodString>;
|
|
290
167
|
repository_url: z.ZodOptional<z.ZodString>;
|
|
291
168
|
mcp_url: z.ZodOptional<z.ZodString>;
|
|
292
|
-
/**
|
|
293
|
-
* Sandbox contract per skill-convention v1.3 §9. Required in practice
|
|
294
|
-
* for runtime_env ∈ {vm, agent} (Cortex L3 dispatch reads it directly);
|
|
295
|
-
* kept optional at the schema level so pre-v1.3 rows / api+llm skills
|
|
296
|
-
* don't need to carry it.
|
|
297
|
-
*/
|
|
298
169
|
sandbox: z.ZodOptional<z.ZodObject<{
|
|
299
|
-
/** OCI ref, e.g. `ghcr.io/cognium-labs/skill-base:1.0.0`. */
|
|
300
170
|
image: z.ZodString;
|
|
301
|
-
/** Memory allocation in MB. Base default 512 (vm) / 2048 (agent). */
|
|
302
171
|
memory_mb: z.ZodNumber;
|
|
303
|
-
/** vCPU count. Base default 2 (vm) / 4 (agent). */
|
|
304
172
|
cpu: z.ZodNumber;
|
|
305
|
-
/** Wall-clock ceiling in seconds. Base default 300 (vm) / 7200 (agent). */
|
|
306
173
|
timeout_seconds: z.ZodNumber;
|
|
307
|
-
|
|
308
|
-
* Default-deny egress allow-list of hostnames. Empty array = no outbound
|
|
309
|
-
* network from the sandbox. Wildcards are NOT interpreted here — the
|
|
310
|
-
* runtime treats each entry as an exact host match.
|
|
311
|
-
*/
|
|
312
|
-
egress: z.ZodArray<z.ZodString, "many">;
|
|
313
|
-
/** Present when `runtime_env: agent`. Signals the agent-runtime shape. */
|
|
174
|
+
egress: z.ZodArray<z.ZodString>;
|
|
314
175
|
profile: z.ZodOptional<z.ZodLiteral<"agent">>;
|
|
315
|
-
/**
|
|
316
|
-
* Agent-only hard caps. Enforced in-band by the wrapper script via
|
|
317
|
-
* llmproxy metering (Cortex only enforces the outer wall-clock via
|
|
318
|
-
* provider timeout).
|
|
319
|
-
*/
|
|
320
176
|
budget_caps: z.ZodOptional<z.ZodObject<{
|
|
321
|
-
/** Max spend in USD across all LLM calls this run. */
|
|
322
177
|
max_tokens_usd: z.ZodOptional<z.ZodNumber>;
|
|
323
|
-
/** Max sub-tool invocations from inside the agent sandbox. */
|
|
324
178
|
max_internal_tool_calls: z.ZodOptional<z.ZodNumber>;
|
|
325
|
-
/** Wall-clock ceiling; usually mirrors top-level `timeout_seconds`. */
|
|
326
179
|
max_wall_seconds: z.ZodOptional<z.ZodNumber>;
|
|
327
|
-
},
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
max_wall_seconds?: number | undefined;
|
|
331
|
-
}, {
|
|
332
|
-
max_tokens_usd?: number | undefined;
|
|
333
|
-
max_internal_tool_calls?: number | undefined;
|
|
334
|
-
max_wall_seconds?: number | undefined;
|
|
335
|
-
}>>;
|
|
336
|
-
}, "strip", z.ZodTypeAny, {
|
|
337
|
-
image: string;
|
|
338
|
-
memory_mb: number;
|
|
339
|
-
cpu: number;
|
|
340
|
-
timeout_seconds: number;
|
|
341
|
-
egress: string[];
|
|
342
|
-
profile?: "agent" | undefined;
|
|
343
|
-
budget_caps?: {
|
|
344
|
-
max_tokens_usd?: number | undefined;
|
|
345
|
-
max_internal_tool_calls?: number | undefined;
|
|
346
|
-
max_wall_seconds?: number | undefined;
|
|
347
|
-
} | undefined;
|
|
348
|
-
}, {
|
|
349
|
-
image: string;
|
|
350
|
-
memory_mb: number;
|
|
351
|
-
cpu: number;
|
|
352
|
-
timeout_seconds: number;
|
|
353
|
-
egress: string[];
|
|
354
|
-
profile?: "agent" | undefined;
|
|
355
|
-
budget_caps?: {
|
|
356
|
-
max_tokens_usd?: number | undefined;
|
|
357
|
-
max_internal_tool_calls?: number | undefined;
|
|
358
|
-
max_wall_seconds?: number | undefined;
|
|
359
|
-
} | undefined;
|
|
360
|
-
}>>;
|
|
361
|
-
}, "strip", z.ZodTypeAny, {
|
|
362
|
-
name: string;
|
|
363
|
-
slug: string;
|
|
364
|
-
version: string;
|
|
365
|
-
source: string;
|
|
366
|
-
execution_layer: string;
|
|
367
|
-
description?: string | undefined;
|
|
368
|
-
tags?: string[] | undefined;
|
|
369
|
-
category?: string | undefined;
|
|
370
|
-
skill_md?: string | undefined;
|
|
371
|
-
agent_summary?: string | undefined;
|
|
372
|
-
schema_json?: Record<string, unknown> | undefined;
|
|
373
|
-
install_method?: Record<string, unknown> | undefined;
|
|
374
|
-
source_url?: string | undefined;
|
|
375
|
-
repository_url?: string | undefined;
|
|
376
|
-
mcp_url?: string | undefined;
|
|
377
|
-
sandbox?: {
|
|
378
|
-
image: string;
|
|
379
|
-
memory_mb: number;
|
|
380
|
-
cpu: number;
|
|
381
|
-
timeout_seconds: number;
|
|
382
|
-
egress: string[];
|
|
383
|
-
profile?: "agent" | undefined;
|
|
384
|
-
budget_caps?: {
|
|
385
|
-
max_tokens_usd?: number | undefined;
|
|
386
|
-
max_internal_tool_calls?: number | undefined;
|
|
387
|
-
max_wall_seconds?: number | undefined;
|
|
388
|
-
} | undefined;
|
|
389
|
-
} | undefined;
|
|
390
|
-
}, {
|
|
391
|
-
name: string;
|
|
392
|
-
slug: string;
|
|
393
|
-
version: string;
|
|
394
|
-
source: string;
|
|
395
|
-
execution_layer: string;
|
|
396
|
-
description?: string | undefined;
|
|
397
|
-
tags?: string[] | undefined;
|
|
398
|
-
category?: string | undefined;
|
|
399
|
-
skill_md?: string | undefined;
|
|
400
|
-
agent_summary?: string | undefined;
|
|
401
|
-
schema_json?: Record<string, unknown> | undefined;
|
|
402
|
-
install_method?: Record<string, unknown> | undefined;
|
|
403
|
-
source_url?: string | undefined;
|
|
404
|
-
repository_url?: string | undefined;
|
|
405
|
-
mcp_url?: string | undefined;
|
|
406
|
-
sandbox?: {
|
|
407
|
-
image: string;
|
|
408
|
-
memory_mb: number;
|
|
409
|
-
cpu: number;
|
|
410
|
-
timeout_seconds: number;
|
|
411
|
-
egress: string[];
|
|
412
|
-
profile?: "agent" | undefined;
|
|
413
|
-
budget_caps?: {
|
|
414
|
-
max_tokens_usd?: number | undefined;
|
|
415
|
-
max_internal_tool_calls?: number | undefined;
|
|
416
|
-
max_wall_seconds?: number | undefined;
|
|
417
|
-
} | undefined;
|
|
418
|
-
} | undefined;
|
|
419
|
-
}>;
|
|
420
|
-
/** Publisher key ID that signs the manifest. Required for A/B tier. */
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
}, z.core.$strip>;
|
|
421
183
|
publisher_key_id: z.ZodOptional<z.ZodString>;
|
|
422
|
-
/** Detached signature over the canonical manifest bytes. */
|
|
423
184
|
signature: z.ZodOptional<z.ZodString>;
|
|
424
|
-
},
|
|
425
|
-
manifest: {
|
|
426
|
-
name: string;
|
|
427
|
-
slug: string;
|
|
428
|
-
version: string;
|
|
429
|
-
source: string;
|
|
430
|
-
execution_layer: string;
|
|
431
|
-
description?: string | undefined;
|
|
432
|
-
tags?: string[] | undefined;
|
|
433
|
-
category?: string | undefined;
|
|
434
|
-
skill_md?: string | undefined;
|
|
435
|
-
agent_summary?: string | undefined;
|
|
436
|
-
schema_json?: Record<string, unknown> | undefined;
|
|
437
|
-
install_method?: Record<string, unknown> | undefined;
|
|
438
|
-
source_url?: string | undefined;
|
|
439
|
-
repository_url?: string | undefined;
|
|
440
|
-
mcp_url?: string | undefined;
|
|
441
|
-
sandbox?: {
|
|
442
|
-
image: string;
|
|
443
|
-
memory_mb: number;
|
|
444
|
-
cpu: number;
|
|
445
|
-
timeout_seconds: number;
|
|
446
|
-
egress: string[];
|
|
447
|
-
profile?: "agent" | undefined;
|
|
448
|
-
budget_caps?: {
|
|
449
|
-
max_tokens_usd?: number | undefined;
|
|
450
|
-
max_internal_tool_calls?: number | undefined;
|
|
451
|
-
max_wall_seconds?: number | undefined;
|
|
452
|
-
} | undefined;
|
|
453
|
-
} | undefined;
|
|
454
|
-
};
|
|
455
|
-
publisher_key_id?: string | undefined;
|
|
456
|
-
signature?: string | undefined;
|
|
457
|
-
}, {
|
|
458
|
-
manifest: {
|
|
459
|
-
name: string;
|
|
460
|
-
slug: string;
|
|
461
|
-
version: string;
|
|
462
|
-
source: string;
|
|
463
|
-
execution_layer: string;
|
|
464
|
-
description?: string | undefined;
|
|
465
|
-
tags?: string[] | undefined;
|
|
466
|
-
category?: string | undefined;
|
|
467
|
-
skill_md?: string | undefined;
|
|
468
|
-
agent_summary?: string | undefined;
|
|
469
|
-
schema_json?: Record<string, unknown> | undefined;
|
|
470
|
-
install_method?: Record<string, unknown> | undefined;
|
|
471
|
-
source_url?: string | undefined;
|
|
472
|
-
repository_url?: string | undefined;
|
|
473
|
-
mcp_url?: string | undefined;
|
|
474
|
-
sandbox?: {
|
|
475
|
-
image: string;
|
|
476
|
-
memory_mb: number;
|
|
477
|
-
cpu: number;
|
|
478
|
-
timeout_seconds: number;
|
|
479
|
-
egress: string[];
|
|
480
|
-
profile?: "agent" | undefined;
|
|
481
|
-
budget_caps?: {
|
|
482
|
-
max_tokens_usd?: number | undefined;
|
|
483
|
-
max_internal_tool_calls?: number | undefined;
|
|
484
|
-
max_wall_seconds?: number | undefined;
|
|
485
|
-
} | undefined;
|
|
486
|
-
} | undefined;
|
|
487
|
-
};
|
|
488
|
-
publisher_key_id?: string | undefined;
|
|
489
|
-
signature?: string | undefined;
|
|
490
|
-
}>;
|
|
185
|
+
}, z.core.$strip>;
|
|
491
186
|
export type PublishRequest = z.infer<typeof PublishRequestSchema>;
|
|
492
187
|
export declare const PublishResponseSchema: z.ZodObject<{
|
|
493
188
|
skill_id: z.ZodString;
|
|
494
189
|
slug: z.ZodString;
|
|
495
190
|
version: z.ZodString;
|
|
496
|
-
status: z.ZodEnum<
|
|
191
|
+
status: z.ZodEnum<{
|
|
192
|
+
published: "published";
|
|
193
|
+
pending_review: "pending_review";
|
|
194
|
+
rejected: "rejected";
|
|
195
|
+
}>;
|
|
497
196
|
published_at: z.ZodString;
|
|
498
|
-
/** URL of the skill on the mothership. */
|
|
499
197
|
url: z.ZodString;
|
|
500
|
-
},
|
|
501
|
-
status: "published" | "pending_review" | "rejected";
|
|
502
|
-
slug: string;
|
|
503
|
-
version: string;
|
|
504
|
-
skill_id: string;
|
|
505
|
-
published_at: string;
|
|
506
|
-
url: string;
|
|
507
|
-
}, {
|
|
508
|
-
status: "published" | "pending_review" | "rejected";
|
|
509
|
-
slug: string;
|
|
510
|
-
version: string;
|
|
511
|
-
skill_id: string;
|
|
512
|
-
published_at: string;
|
|
513
|
-
url: string;
|
|
514
|
-
}>;
|
|
198
|
+
}, z.core.$strip>;
|
|
515
199
|
export type PublishResponse = z.infer<typeof PublishResponseSchema>;
|
|
516
200
|
export declare const TrustScoreDeltaSchema: z.ZodObject<{
|
|
517
201
|
skill_id: z.ZodString;
|
|
518
202
|
trust_score: z.ZodNumber;
|
|
519
|
-
trust_tier: z.ZodEnum<
|
|
203
|
+
trust_tier: z.ZodEnum<{
|
|
204
|
+
A: "A";
|
|
205
|
+
B: "B";
|
|
206
|
+
C: "C";
|
|
207
|
+
D: "D";
|
|
208
|
+
F: "F";
|
|
209
|
+
}>;
|
|
520
210
|
scored_at: z.ZodString;
|
|
521
|
-
},
|
|
522
|
-
skill_id: string;
|
|
523
|
-
trust_score: number;
|
|
524
|
-
trust_tier: "A" | "B" | "C" | "D" | "F";
|
|
525
|
-
scored_at: string;
|
|
526
|
-
}, {
|
|
527
|
-
skill_id: string;
|
|
528
|
-
trust_score: number;
|
|
529
|
-
trust_tier: "A" | "B" | "C" | "D" | "F";
|
|
530
|
-
scored_at: string;
|
|
531
|
-
}>;
|
|
211
|
+
}, z.core.$strip>;
|
|
532
212
|
export type TrustScoreDelta = z.infer<typeof TrustScoreDeltaSchema>;
|
|
533
213
|
export declare const TrustScoreSyncResponseSchema: z.ZodObject<{
|
|
534
214
|
since: z.ZodString;
|
|
@@ -537,103 +217,61 @@ export declare const TrustScoreSyncResponseSchema: z.ZodObject<{
|
|
|
537
217
|
deltas: z.ZodArray<z.ZodObject<{
|
|
538
218
|
skill_id: z.ZodString;
|
|
539
219
|
trust_score: z.ZodNumber;
|
|
540
|
-
trust_tier: z.ZodEnum<
|
|
220
|
+
trust_tier: z.ZodEnum<{
|
|
221
|
+
A: "A";
|
|
222
|
+
B: "B";
|
|
223
|
+
C: "C";
|
|
224
|
+
D: "D";
|
|
225
|
+
F: "F";
|
|
226
|
+
}>;
|
|
541
227
|
scored_at: z.ZodString;
|
|
542
|
-
},
|
|
543
|
-
skill_id: string;
|
|
544
|
-
trust_score: number;
|
|
545
|
-
trust_tier: "A" | "B" | "C" | "D" | "F";
|
|
546
|
-
scored_at: string;
|
|
547
|
-
}, {
|
|
548
|
-
skill_id: string;
|
|
549
|
-
trust_score: number;
|
|
550
|
-
trust_tier: "A" | "B" | "C" | "D" | "F";
|
|
551
|
-
scored_at: string;
|
|
552
|
-
}>, "many">;
|
|
553
|
-
/**
|
|
554
|
-
* Cursor for pagination. When present, the client should re-request with
|
|
555
|
-
* `since=<next_cursor>` to continue.
|
|
556
|
-
*/
|
|
228
|
+
}, z.core.$strip>>;
|
|
557
229
|
next_cursor: z.ZodOptional<z.ZodString>;
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}[];
|
|
568
|
-
next_cursor?: string | undefined;
|
|
569
|
-
}, {
|
|
570
|
-
count: number;
|
|
571
|
-
since: string;
|
|
572
|
-
until: string;
|
|
573
|
-
deltas: {
|
|
574
|
-
skill_id: string;
|
|
575
|
-
trust_score: number;
|
|
576
|
-
trust_tier: "A" | "B" | "C" | "D" | "F";
|
|
577
|
-
scored_at: string;
|
|
578
|
-
}[];
|
|
579
|
-
next_cursor?: string | undefined;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
export declare const SkillRevocationReasonSchema: z.ZodEnum<{
|
|
232
|
+
unknown: "unknown";
|
|
233
|
+
security: "security";
|
|
234
|
+
compliance: "compliance";
|
|
235
|
+
policy: "policy";
|
|
236
|
+
quality: "quality";
|
|
237
|
+
author_request: "author_request";
|
|
238
|
+
superseded: "superseded";
|
|
580
239
|
}>;
|
|
581
|
-
export declare const SkillRevocationReasonSchema: z.ZodEnum<["security", "compliance", "policy", "quality", "author_request", "superseded", "unknown"]>;
|
|
582
240
|
export type SkillRevocationReason = z.infer<typeof SkillRevocationReasonSchema>;
|
|
583
|
-
export declare const SkillRevocationEventTypeSchema: z.ZodEnum<
|
|
241
|
+
export declare const SkillRevocationEventTypeSchema: z.ZodEnum<{
|
|
242
|
+
"skill.revoked": "skill.revoked";
|
|
243
|
+
"skill.deprecated": "skill.deprecated";
|
|
244
|
+
}>;
|
|
584
245
|
export type SkillRevocationEventType = z.infer<typeof SkillRevocationEventTypeSchema>;
|
|
585
246
|
/**
|
|
586
247
|
* Single revocation / deprecation event. `event_id` is the idempotency key —
|
|
587
248
|
* consumers store the last-seen id per source to dedupe replays.
|
|
588
249
|
*/
|
|
589
250
|
export declare const SkillRevocationEventSchema: z.ZodObject<{
|
|
590
|
-
/** Idempotency key. Consumer dedupes on (source, event_id). */
|
|
591
251
|
event_id: z.ZodString;
|
|
592
|
-
event_type: z.ZodEnum<
|
|
252
|
+
event_type: z.ZodEnum<{
|
|
253
|
+
"skill.revoked": "skill.revoked";
|
|
254
|
+
"skill.deprecated": "skill.deprecated";
|
|
255
|
+
}>;
|
|
593
256
|
emitted_at: z.ZodString;
|
|
594
|
-
/** Mothership skill UUID. */
|
|
595
257
|
skill_id: z.ZodString;
|
|
596
|
-
/** Human-readable identifier — helpful in webhook logs. */
|
|
597
258
|
slug: z.ZodString;
|
|
598
|
-
/** Pinned version at the time of revocation (if the whole line was pulled). */
|
|
599
259
|
version: z.ZodOptional<z.ZodString>;
|
|
600
|
-
reason: z.ZodEnum<
|
|
601
|
-
|
|
260
|
+
reason: z.ZodEnum<{
|
|
261
|
+
unknown: "unknown";
|
|
262
|
+
security: "security";
|
|
263
|
+
compliance: "compliance";
|
|
264
|
+
policy: "policy";
|
|
265
|
+
quality: "quality";
|
|
266
|
+
author_request: "author_request";
|
|
267
|
+
superseded: "superseded";
|
|
268
|
+
}>;
|
|
602
269
|
reason_detail: z.ZodOptional<z.ZodString>;
|
|
603
|
-
/** Actionable message consumers can show in remediation UI. */
|
|
604
270
|
remediation_message: z.ZodOptional<z.ZodString>;
|
|
605
271
|
remediation_url: z.ZodOptional<z.ZodString>;
|
|
606
|
-
/** Mothership UUID of the replacement skill, if any. */
|
|
607
272
|
replacement_skill_id: z.ZodOptional<z.ZodString>;
|
|
608
|
-
/** Slug of the replacement skill (redundant with id — safer for humans). */
|
|
609
273
|
replacement_slug: z.ZodOptional<z.ZodString>;
|
|
610
|
-
},
|
|
611
|
-
slug: string;
|
|
612
|
-
skill_id: string;
|
|
613
|
-
event_id: string;
|
|
614
|
-
event_type: "skill.revoked" | "skill.deprecated";
|
|
615
|
-
emitted_at: string;
|
|
616
|
-
reason: "unknown" | "security" | "compliance" | "policy" | "quality" | "author_request" | "superseded";
|
|
617
|
-
version?: string | undefined;
|
|
618
|
-
reason_detail?: string | undefined;
|
|
619
|
-
remediation_message?: string | undefined;
|
|
620
|
-
remediation_url?: string | undefined;
|
|
621
|
-
replacement_skill_id?: string | undefined;
|
|
622
|
-
replacement_slug?: string | undefined;
|
|
623
|
-
}, {
|
|
624
|
-
slug: string;
|
|
625
|
-
skill_id: string;
|
|
626
|
-
event_id: string;
|
|
627
|
-
event_type: "skill.revoked" | "skill.deprecated";
|
|
628
|
-
emitted_at: string;
|
|
629
|
-
reason: "unknown" | "security" | "compliance" | "policy" | "quality" | "author_request" | "superseded";
|
|
630
|
-
version?: string | undefined;
|
|
631
|
-
reason_detail?: string | undefined;
|
|
632
|
-
remediation_message?: string | undefined;
|
|
633
|
-
remediation_url?: string | undefined;
|
|
634
|
-
replacement_skill_id?: string | undefined;
|
|
635
|
-
replacement_slug?: string | undefined;
|
|
636
|
-
}>;
|
|
274
|
+
}, z.core.$strip>;
|
|
637
275
|
export type SkillRevocationEvent = z.infer<typeof SkillRevocationEventSchema>;
|
|
638
276
|
/**
|
|
639
277
|
* Response for `GET /v1/sync/revocations?since=<ISO>`. Mirrors the shape of
|
|
@@ -644,94 +282,32 @@ export declare const SkillRevocationSyncResponseSchema: z.ZodObject<{
|
|
|
644
282
|
until: z.ZodString;
|
|
645
283
|
count: z.ZodNumber;
|
|
646
284
|
events: z.ZodArray<z.ZodObject<{
|
|
647
|
-
/** Idempotency key. Consumer dedupes on (source, event_id). */
|
|
648
285
|
event_id: z.ZodString;
|
|
649
|
-
event_type: z.ZodEnum<
|
|
286
|
+
event_type: z.ZodEnum<{
|
|
287
|
+
"skill.revoked": "skill.revoked";
|
|
288
|
+
"skill.deprecated": "skill.deprecated";
|
|
289
|
+
}>;
|
|
650
290
|
emitted_at: z.ZodString;
|
|
651
|
-
/** Mothership skill UUID. */
|
|
652
291
|
skill_id: z.ZodString;
|
|
653
|
-
/** Human-readable identifier — helpful in webhook logs. */
|
|
654
292
|
slug: z.ZodString;
|
|
655
|
-
/** Pinned version at the time of revocation (if the whole line was pulled). */
|
|
656
293
|
version: z.ZodOptional<z.ZodString>;
|
|
657
|
-
reason: z.ZodEnum<
|
|
658
|
-
|
|
294
|
+
reason: z.ZodEnum<{
|
|
295
|
+
unknown: "unknown";
|
|
296
|
+
security: "security";
|
|
297
|
+
compliance: "compliance";
|
|
298
|
+
policy: "policy";
|
|
299
|
+
quality: "quality";
|
|
300
|
+
author_request: "author_request";
|
|
301
|
+
superseded: "superseded";
|
|
302
|
+
}>;
|
|
659
303
|
reason_detail: z.ZodOptional<z.ZodString>;
|
|
660
|
-
/** Actionable message consumers can show in remediation UI. */
|
|
661
304
|
remediation_message: z.ZodOptional<z.ZodString>;
|
|
662
305
|
remediation_url: z.ZodOptional<z.ZodString>;
|
|
663
|
-
/** Mothership UUID of the replacement skill, if any. */
|
|
664
306
|
replacement_skill_id: z.ZodOptional<z.ZodString>;
|
|
665
|
-
/** Slug of the replacement skill (redundant with id — safer for humans). */
|
|
666
307
|
replacement_slug: z.ZodOptional<z.ZodString>;
|
|
667
|
-
},
|
|
668
|
-
slug: string;
|
|
669
|
-
skill_id: string;
|
|
670
|
-
event_id: string;
|
|
671
|
-
event_type: "skill.revoked" | "skill.deprecated";
|
|
672
|
-
emitted_at: string;
|
|
673
|
-
reason: "unknown" | "security" | "compliance" | "policy" | "quality" | "author_request" | "superseded";
|
|
674
|
-
version?: string | undefined;
|
|
675
|
-
reason_detail?: string | undefined;
|
|
676
|
-
remediation_message?: string | undefined;
|
|
677
|
-
remediation_url?: string | undefined;
|
|
678
|
-
replacement_skill_id?: string | undefined;
|
|
679
|
-
replacement_slug?: string | undefined;
|
|
680
|
-
}, {
|
|
681
|
-
slug: string;
|
|
682
|
-
skill_id: string;
|
|
683
|
-
event_id: string;
|
|
684
|
-
event_type: "skill.revoked" | "skill.deprecated";
|
|
685
|
-
emitted_at: string;
|
|
686
|
-
reason: "unknown" | "security" | "compliance" | "policy" | "quality" | "author_request" | "superseded";
|
|
687
|
-
version?: string | undefined;
|
|
688
|
-
reason_detail?: string | undefined;
|
|
689
|
-
remediation_message?: string | undefined;
|
|
690
|
-
remediation_url?: string | undefined;
|
|
691
|
-
replacement_skill_id?: string | undefined;
|
|
692
|
-
replacement_slug?: string | undefined;
|
|
693
|
-
}>, "many">;
|
|
694
|
-
/** Cursor for pagination. When present, re-request with `since=<next_cursor>`. */
|
|
308
|
+
}, z.core.$strip>>;
|
|
695
309
|
next_cursor: z.ZodOptional<z.ZodString>;
|
|
696
|
-
},
|
|
697
|
-
count: number;
|
|
698
|
-
since: string;
|
|
699
|
-
until: string;
|
|
700
|
-
events: {
|
|
701
|
-
slug: string;
|
|
702
|
-
skill_id: string;
|
|
703
|
-
event_id: string;
|
|
704
|
-
event_type: "skill.revoked" | "skill.deprecated";
|
|
705
|
-
emitted_at: string;
|
|
706
|
-
reason: "unknown" | "security" | "compliance" | "policy" | "quality" | "author_request" | "superseded";
|
|
707
|
-
version?: string | undefined;
|
|
708
|
-
reason_detail?: string | undefined;
|
|
709
|
-
remediation_message?: string | undefined;
|
|
710
|
-
remediation_url?: string | undefined;
|
|
711
|
-
replacement_skill_id?: string | undefined;
|
|
712
|
-
replacement_slug?: string | undefined;
|
|
713
|
-
}[];
|
|
714
|
-
next_cursor?: string | undefined;
|
|
715
|
-
}, {
|
|
716
|
-
count: number;
|
|
717
|
-
since: string;
|
|
718
|
-
until: string;
|
|
719
|
-
events: {
|
|
720
|
-
slug: string;
|
|
721
|
-
skill_id: string;
|
|
722
|
-
event_id: string;
|
|
723
|
-
event_type: "skill.revoked" | "skill.deprecated";
|
|
724
|
-
emitted_at: string;
|
|
725
|
-
reason: "unknown" | "security" | "compliance" | "policy" | "quality" | "author_request" | "superseded";
|
|
726
|
-
version?: string | undefined;
|
|
727
|
-
reason_detail?: string | undefined;
|
|
728
|
-
remediation_message?: string | undefined;
|
|
729
|
-
remediation_url?: string | undefined;
|
|
730
|
-
replacement_skill_id?: string | undefined;
|
|
731
|
-
replacement_slug?: string | undefined;
|
|
732
|
-
}[];
|
|
733
|
-
next_cursor?: string | undefined;
|
|
734
|
-
}>;
|
|
310
|
+
}, z.core.$strip>;
|
|
735
311
|
export type SkillRevocationSyncResponse = z.infer<typeof SkillRevocationSyncResponseSchema>;
|
|
736
312
|
export type TrustScoreSyncResponse = z.infer<typeof TrustScoreSyncResponseSchema>;
|
|
737
313
|
/**
|
|
@@ -761,41 +337,23 @@ export type TrustScoreSyncResponse = z.infer<typeof TrustScoreSyncResponseSchema
|
|
|
761
337
|
export type UpstreamErrorCode = 'upstream_not_configured' | 'budget_exhausted' | 'unauthenticated' | 'forbidden' | 'not_found' | 'rate_limited' | 'bad_request' | 'upstream_unavailable' | 'upstream_timeout' | 'sandbox_contract_violated';
|
|
762
338
|
export declare const UpstreamErrorSchema: z.ZodObject<{
|
|
763
339
|
error: z.ZodObject<{
|
|
764
|
-
code: z.ZodEnum<
|
|
340
|
+
code: z.ZodEnum<{
|
|
341
|
+
upstream_not_configured: "upstream_not_configured";
|
|
342
|
+
budget_exhausted: "budget_exhausted";
|
|
343
|
+
unauthenticated: "unauthenticated";
|
|
344
|
+
forbidden: "forbidden";
|
|
345
|
+
not_found: "not_found";
|
|
346
|
+
rate_limited: "rate_limited";
|
|
347
|
+
bad_request: "bad_request";
|
|
348
|
+
upstream_unavailable: "upstream_unavailable";
|
|
349
|
+
upstream_timeout: "upstream_timeout";
|
|
350
|
+
sandbox_contract_violated: "sandbox_contract_violated";
|
|
351
|
+
}>;
|
|
765
352
|
message: z.ZodString;
|
|
766
|
-
/** Seconds until the caller may safely retry. Absent for permanent errors. */
|
|
767
353
|
retry_after: z.ZodOptional<z.ZodNumber>;
|
|
768
|
-
/** Optional structured detail (upstream field errors, etc.). */
|
|
769
354
|
detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
770
|
-
},
|
|
771
|
-
code: "upstream_not_configured" | "budget_exhausted" | "unauthenticated" | "forbidden" | "not_found" | "rate_limited" | "bad_request" | "upstream_unavailable" | "upstream_timeout" | "sandbox_contract_violated";
|
|
772
|
-
message: string;
|
|
773
|
-
retry_after?: number | undefined;
|
|
774
|
-
detail?: Record<string, unknown> | undefined;
|
|
775
|
-
}, {
|
|
776
|
-
code: "upstream_not_configured" | "budget_exhausted" | "unauthenticated" | "forbidden" | "not_found" | "rate_limited" | "bad_request" | "upstream_unavailable" | "upstream_timeout" | "sandbox_contract_violated";
|
|
777
|
-
message: string;
|
|
778
|
-
retry_after?: number | undefined;
|
|
779
|
-
detail?: Record<string, unknown> | undefined;
|
|
780
|
-
}>;
|
|
781
|
-
/** Request ID for cross-referencing with mothership logs. */
|
|
355
|
+
}, z.core.$strip>;
|
|
782
356
|
request_id: z.ZodOptional<z.ZodString>;
|
|
783
|
-
},
|
|
784
|
-
error: {
|
|
785
|
-
code: "upstream_not_configured" | "budget_exhausted" | "unauthenticated" | "forbidden" | "not_found" | "rate_limited" | "bad_request" | "upstream_unavailable" | "upstream_timeout" | "sandbox_contract_violated";
|
|
786
|
-
message: string;
|
|
787
|
-
retry_after?: number | undefined;
|
|
788
|
-
detail?: Record<string, unknown> | undefined;
|
|
789
|
-
};
|
|
790
|
-
request_id?: string | undefined;
|
|
791
|
-
}, {
|
|
792
|
-
error: {
|
|
793
|
-
code: "upstream_not_configured" | "budget_exhausted" | "unauthenticated" | "forbidden" | "not_found" | "rate_limited" | "bad_request" | "upstream_unavailable" | "upstream_timeout" | "sandbox_contract_violated";
|
|
794
|
-
message: string;
|
|
795
|
-
retry_after?: number | undefined;
|
|
796
|
-
detail?: Record<string, unknown> | undefined;
|
|
797
|
-
};
|
|
798
|
-
request_id?: string | undefined;
|
|
799
|
-
}>;
|
|
357
|
+
}, z.core.$strip>;
|
|
800
358
|
export type UpstreamErrorEnvelope = z.infer<typeof UpstreamErrorSchema>;
|
|
801
359
|
//# sourceMappingURL=upstream.d.ts.map
|