@cleocode/contracts 2026.6.13 → 2026.6.15
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/dist/__tests__/operation-def.test.js +4 -1
- package/dist/__tests__/operation-def.test.js.map +1 -1
- package/dist/__tests__/provider-def.test.d.ts +12 -0
- package/dist/__tests__/provider-def.test.d.ts.map +1 -0
- package/dist/__tests__/provider-def.test.js +84 -0
- package/dist/__tests__/provider-def.test.js.map +1 -0
- package/dist/__tests__/service-provider.test.d.ts +17 -0
- package/dist/__tests__/service-provider.test.d.ts.map +1 -0
- package/dist/__tests__/service-provider.test.js +108 -0
- package/dist/__tests__/service-provider.test.js.map +1 -0
- package/dist/boundary.d.ts +52 -0
- package/dist/boundary.d.ts.map +1 -1
- package/dist/boundary.js +23 -0
- package/dist/boundary.js.map +1 -1
- package/dist/branch-lock.d.ts +4 -0
- package/dist/branch-lock.d.ts.map +1 -1
- package/dist/branch-lock.js.map +1 -1
- package/dist/conduit.d.ts +171 -0
- package/dist/conduit.d.ts.map +1 -1
- package/dist/config/index.d.ts +23 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +22 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config.d.ts +109 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.d.ts +21 -0
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.d.ts.map +1 -0
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js +84 -0
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js.map +1 -0
- package/dist/dispatch/identity.d.ts +1 -1
- package/dist/dispatch/identity.d.ts.map +1 -1
- package/dist/dispatch/identity.js +20 -0
- package/dist/dispatch/identity.js.map +1 -1
- package/dist/dispatch/operation-def.d.ts +20 -0
- package/dist/dispatch/operation-def.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +1030 -46
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/index.d.ts +17 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/lease-ipc/__tests__/freeze.test.js +92 -0
- package/dist/lease-ipc/__tests__/freeze.test.js.map +1 -1
- package/dist/lease-ipc/index.d.ts +2 -2
- package/dist/lease-ipc/index.d.ts.map +1 -1
- package/dist/lease-ipc/index.js +1 -1
- package/dist/lease-ipc/index.js.map +1 -1
- package/dist/lease-ipc/messages.d.ts +167 -3
- package/dist/lease-ipc/messages.d.ts.map +1 -1
- package/dist/lease-ipc/messages.js +93 -0
- package/dist/lease-ipc/messages.js.map +1 -1
- package/dist/llm/catalog-schema.d.ts +242 -0
- package/dist/llm/catalog-schema.d.ts.map +1 -0
- package/dist/llm/catalog-schema.js +153 -0
- package/dist/llm/catalog-schema.js.map +1 -0
- package/dist/llm/catalog-schema.json +139 -0
- package/dist/llm/index.d.ts +15 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +14 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/oauth.d.ts +16 -2
- package/dist/llm/oauth.d.ts.map +1 -1
- package/dist/llm/onboarding.d.ts +126 -0
- package/dist/llm/onboarding.d.ts.map +1 -0
- package/dist/llm/onboarding.js +34 -0
- package/dist/llm/onboarding.js.map +1 -0
- package/dist/llm/provider-def.d.ts +254 -0
- package/dist/llm/provider-def.d.ts.map +1 -0
- package/dist/llm/provider-def.js +93 -0
- package/dist/llm/provider-def.js.map +1 -0
- package/dist/llm/system-resolver.d.ts +42 -0
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/operations/admin.d.ts +124 -1
- package/dist/operations/admin.d.ts.map +1 -1
- package/dist/operations/entities.d.ts +110 -0
- package/dist/operations/entities.d.ts.map +1 -0
- package/dist/operations/entities.js +695 -0
- package/dist/operations/entities.js.map +1 -0
- package/dist/operations/llm.d.ts +16 -1
- package/dist/operations/llm.d.ts.map +1 -1
- package/dist/operations/output-contracts-data.d.ts.map +1 -1
- package/dist/operations/output-contracts-data.js +230 -0
- package/dist/operations/output-contracts-data.js.map +1 -1
- package/dist/operations/service.d.ts +68 -0
- package/dist/operations/service.d.ts.map +1 -0
- package/dist/operations/service.js +336 -0
- package/dist/operations/service.js.map +1 -0
- package/dist/operations/tasks.d.ts +109 -0
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js.map +1 -1
- package/dist/operations/worktree.d.ts +11 -1
- package/dist/operations/worktree.d.ts.map +1 -1
- package/dist/playbook.d.ts +56 -0
- package/dist/playbook.d.ts.map +1 -1
- package/dist/release/plan.d.ts +5 -5
- package/dist/spawn.d.ts +70 -0
- package/dist/spawn.d.ts.map +1 -1
- package/dist/spawn.js +1 -0
- package/dist/spawn.js.map +1 -1
- package/dist/vault/service-provider.d.ts +343 -0
- package/dist/vault/service-provider.d.ts.map +1 -0
- package/dist/vault/service-provider.js +857 -0
- package/dist/vault/service-provider.js.map +1 -0
- package/dist/workgraph.d.ts +12 -12
- package/package.json +10 -2
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/__tests__/operation-def.test.ts +6 -1
- package/src/__tests__/provider-def.test.ts +93 -0
- package/src/__tests__/service-provider.test.ts +129 -0
- package/src/boundary.ts +69 -0
- package/src/branch-lock.ts +4 -0
- package/src/conduit.ts +200 -0
- package/src/config/index.ts +35 -0
- package/src/config.ts +116 -1
- package/src/dispatch/__tests__/tasks-gateway-crud-ops.test.ts +99 -0
- package/src/dispatch/identity.ts +20 -0
- package/src/dispatch/operation-def.ts +21 -0
- package/src/dispatch/operations-registry.ts +1062 -36
- package/src/index.ts +147 -2
- package/src/lease-ipc/__tests__/freeze.test.ts +96 -0
- package/src/lease-ipc/index.ts +12 -0
- package/src/lease-ipc/messages.ts +117 -0
- package/src/llm/catalog-schema.json +139 -0
- package/src/llm/catalog-schema.ts +184 -0
- package/src/llm/index.ts +29 -0
- package/src/llm/oauth.ts +16 -2
- package/src/llm/onboarding.ts +131 -0
- package/src/llm/provider-def.ts +291 -0
- package/src/llm/system-resolver.ts +45 -0
- package/src/operations/admin.ts +144 -0
- package/src/operations/entities.ts +758 -0
- package/src/operations/llm.ts +16 -0
- package/src/operations/output-contracts-data.ts +264 -0
- package/src/operations/service.ts +360 -0
- package/src/operations/tasks.ts +119 -0
- package/src/operations/worktree.ts +11 -0
- package/src/playbook.ts +56 -0
- package/src/spawn.ts +79 -0
- package/src/vault/service-provider.ts +1137 -0
|
@@ -150,6 +150,56 @@ export declare const ToolGrantRequestSchema: z.ZodObject<{
|
|
|
150
150
|
}, z.core.$strict>;
|
|
151
151
|
/** Tool-grant request payload (inferred from {@link ToolGrantRequestSchema}). */
|
|
152
152
|
export type ToolGrantRequest = z.infer<typeof ToolGrantRequestSchema>;
|
|
153
|
+
/**
|
|
154
|
+
* The priority class of a `queue_admit` request (T11630). Mirrors the Rust
|
|
155
|
+
* `QueuePriorityClass` enum and `cleo_supervisor::llm_queue::PriorityClass`.
|
|
156
|
+
*
|
|
157
|
+
* `lead > worker > background` — a lead/orchestrator agent is never starved by a
|
|
158
|
+
* background consolidation (AC1).
|
|
159
|
+
*/
|
|
160
|
+
export declare const QueuePriorityClassSchema: z.ZodEnum<{
|
|
161
|
+
worker: "worker";
|
|
162
|
+
lead: "lead";
|
|
163
|
+
background: "background";
|
|
164
|
+
}>;
|
|
165
|
+
/** A `queue_admit` priority class (inferred from {@link QueuePriorityClassSchema}). */
|
|
166
|
+
export type QueuePriorityClass = z.infer<typeof QueuePriorityClassSchema>;
|
|
167
|
+
/**
|
|
168
|
+
* Admit (or defer) an outbound LLM call through the supervisor's priority
|
|
169
|
+
* scheduler + per-provider rate governor (T11630 · AC1-AC4). Mirrors
|
|
170
|
+
* `QueueAdmitReq`. `[wired]`
|
|
171
|
+
*/
|
|
172
|
+
export declare const QueueAdmitRequestSchema: z.ZodObject<{
|
|
173
|
+
kind: z.ZodLiteral<"queue_admit">;
|
|
174
|
+
provider: z.ZodString;
|
|
175
|
+
priority_class: z.ZodEnum<{
|
|
176
|
+
worker: "worker";
|
|
177
|
+
lead: "lead";
|
|
178
|
+
background: "background";
|
|
179
|
+
}>;
|
|
180
|
+
est_tokens: z.ZodNumber;
|
|
181
|
+
child_id: z.ZodString;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
/** Queue-admit request payload (inferred from {@link QueueAdmitRequestSchema}). */
|
|
184
|
+
export type QueueAdmitRequest = z.infer<typeof QueueAdmitRequestSchema>;
|
|
185
|
+
/**
|
|
186
|
+
* A liveness heartbeat from a managed worker (T11628). Mirrors
|
|
187
|
+
* `WorkerHeartbeatReq`. `[wired]`
|
|
188
|
+
*
|
|
189
|
+
* The worker sends this periodically (well inside the watchdog's NORMAL
|
|
190
|
+
* deadline) so the supervisor knows it is alive. `in_flight_llm` is the worker's
|
|
191
|
+
* OWN view of whether it is currently waiting on an LLM call: when true the
|
|
192
|
+
* watchdog grants the EXTENDED deadline even if the call never went through the
|
|
193
|
+
* `queue_admit` seam, so a slow-but-healthy long call is never false-killed
|
|
194
|
+
* (AC2 · RISK-7).
|
|
195
|
+
*/
|
|
196
|
+
export declare const WorkerHeartbeatRequestSchema: z.ZodObject<{
|
|
197
|
+
kind: z.ZodLiteral<"worker_heartbeat">;
|
|
198
|
+
child_id: z.ZodString;
|
|
199
|
+
in_flight_llm: z.ZodBoolean;
|
|
200
|
+
}, z.core.$strict>;
|
|
201
|
+
/** Worker-heartbeat request payload (inferred from {@link WorkerHeartbeatRequestSchema}). */
|
|
202
|
+
export type WorkerHeartbeatRequest = z.infer<typeof WorkerHeartbeatRequestSchema>;
|
|
153
203
|
/**
|
|
154
204
|
* The discriminated union of all client → arbiter lease requests. The `kind`
|
|
155
205
|
* field selects the variant, matching the serde `#[serde(tag = "kind")]`
|
|
@@ -212,6 +262,20 @@ export declare const LeaseIpcRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
212
262
|
kind: z.ZodLiteral<"tool_grant">;
|
|
213
263
|
tool: z.ZodString;
|
|
214
264
|
holder_id: z.ZodString;
|
|
265
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
266
|
+
kind: z.ZodLiteral<"queue_admit">;
|
|
267
|
+
provider: z.ZodString;
|
|
268
|
+
priority_class: z.ZodEnum<{
|
|
269
|
+
worker: "worker";
|
|
270
|
+
lead: "lead";
|
|
271
|
+
background: "background";
|
|
272
|
+
}>;
|
|
273
|
+
est_tokens: z.ZodNumber;
|
|
274
|
+
child_id: z.ZodString;
|
|
275
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
276
|
+
kind: z.ZodLiteral<"worker_heartbeat">;
|
|
277
|
+
child_id: z.ZodString;
|
|
278
|
+
in_flight_llm: z.ZodBoolean;
|
|
215
279
|
}, z.core.$strict>], "kind">;
|
|
216
280
|
/** Any lease IPC request (inferred from {@link LeaseIpcRequestSchema}). */
|
|
217
281
|
export type LeaseIpcRequest = z.infer<typeof LeaseIpcRequestSchema>;
|
|
@@ -330,6 +394,45 @@ export declare const ChildKilledUnresponsiveResponseSchema: z.ZodObject<{
|
|
|
330
394
|
}, z.core.$strict>;
|
|
331
395
|
/** Child-killed event payload (inferred from {@link ChildKilledUnresponsiveResponseSchema}). */
|
|
332
396
|
export type ChildKilledUnresponsiveResponse = z.infer<typeof ChildKilledUnresponsiveResponseSchema>;
|
|
397
|
+
/**
|
|
398
|
+
* The disposition of a `queue_admit` request (T11630). Mirrors
|
|
399
|
+
* `QueueAdmitDisposition` in Rust — `admitted` (execute now) or `deferred`
|
|
400
|
+
* (back off `retry_after_ms` and re-request; AC4 — never a silent drop).
|
|
401
|
+
*/
|
|
402
|
+
export declare const QueueAdmitDispositionSchema: z.ZodEnum<{
|
|
403
|
+
admitted: "admitted";
|
|
404
|
+
deferred: "deferred";
|
|
405
|
+
}>;
|
|
406
|
+
/** A `queue_admit` disposition (inferred from {@link QueueAdmitDispositionSchema}). */
|
|
407
|
+
export type QueueAdmitDisposition = z.infer<typeof QueueAdmitDispositionSchema>;
|
|
408
|
+
/**
|
|
409
|
+
* Reply to a `queue_admit`: the LLM call was admitted or deferred (T11630).
|
|
410
|
+
* Mirrors `QueueAdmitResult`.
|
|
411
|
+
*/
|
|
412
|
+
export declare const QueueAdmitResultResponseSchema: z.ZodObject<{
|
|
413
|
+
kind: z.ZodLiteral<"queue_admit_result">;
|
|
414
|
+
disposition: z.ZodEnum<{
|
|
415
|
+
admitted: "admitted";
|
|
416
|
+
deferred: "deferred";
|
|
417
|
+
}>;
|
|
418
|
+
retry_after_ms: z.ZodNumber;
|
|
419
|
+
tokens_remaining: z.ZodNumber;
|
|
420
|
+
queue_position: z.ZodNumber;
|
|
421
|
+
}, z.core.$strict>;
|
|
422
|
+
/** Queue-admit result payload (inferred from {@link QueueAdmitResultResponseSchema}). */
|
|
423
|
+
export type QueueAdmitResultResponse = z.infer<typeof QueueAdmitResultResponseSchema>;
|
|
424
|
+
/**
|
|
425
|
+
* Acknowledge a `worker_heartbeat` (T11628). Mirrors `HeartbeatAck`.
|
|
426
|
+
*
|
|
427
|
+
* Deliberately carries only its `kind` — the ack's presence (correlated by id)
|
|
428
|
+
* is the signal that the watchdog recorded the beat and reset the child's
|
|
429
|
+
* deadline. Matches the Rust unit-struct wire shape `{ "kind": "heartbeat_ack" }`.
|
|
430
|
+
*/
|
|
431
|
+
export declare const HeartbeatAckResponseSchema: z.ZodObject<{
|
|
432
|
+
kind: z.ZodLiteral<"heartbeat_ack">;
|
|
433
|
+
}, z.core.$strict>;
|
|
434
|
+
/** Heartbeat-ack response payload (inferred from {@link HeartbeatAckResponseSchema}). */
|
|
435
|
+
export type HeartbeatAckResponse = z.infer<typeof HeartbeatAckResponseSchema>;
|
|
333
436
|
/**
|
|
334
437
|
* An error response correlated to a request. Mirrors the v1.0
|
|
335
438
|
* `crate::ipc::ErrorResult` shape reused by the Rust `LeaseResponse::Error`
|
|
@@ -418,6 +521,17 @@ export declare const LeaseIpcResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
418
521
|
global: "global";
|
|
419
522
|
}>;
|
|
420
523
|
reason: z.ZodString;
|
|
524
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
525
|
+
kind: z.ZodLiteral<"queue_admit_result">;
|
|
526
|
+
disposition: z.ZodEnum<{
|
|
527
|
+
admitted: "admitted";
|
|
528
|
+
deferred: "deferred";
|
|
529
|
+
}>;
|
|
530
|
+
retry_after_ms: z.ZodNumber;
|
|
531
|
+
tokens_remaining: z.ZodNumber;
|
|
532
|
+
queue_position: z.ZodNumber;
|
|
533
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
534
|
+
kind: z.ZodLiteral<"heartbeat_ack">;
|
|
421
535
|
}, z.core.$strict>, z.ZodObject<{
|
|
422
536
|
kind: z.ZodLiteral<"error">;
|
|
423
537
|
code: z.ZodString;
|
|
@@ -492,6 +606,20 @@ export declare const LeaseIpcRequestEnvelopeSchema: z.ZodObject<{
|
|
|
492
606
|
kind: z.ZodLiteral<"tool_grant">;
|
|
493
607
|
tool: z.ZodString;
|
|
494
608
|
holder_id: z.ZodString;
|
|
609
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
610
|
+
kind: z.ZodLiteral<"queue_admit">;
|
|
611
|
+
provider: z.ZodString;
|
|
612
|
+
priority_class: z.ZodEnum<{
|
|
613
|
+
worker: "worker";
|
|
614
|
+
lead: "lead";
|
|
615
|
+
background: "background";
|
|
616
|
+
}>;
|
|
617
|
+
est_tokens: z.ZodNumber;
|
|
618
|
+
child_id: z.ZodString;
|
|
619
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
620
|
+
kind: z.ZodLiteral<"worker_heartbeat">;
|
|
621
|
+
child_id: z.ZodString;
|
|
622
|
+
in_flight_llm: z.ZodBoolean;
|
|
495
623
|
}, z.core.$strict>], "kind">;
|
|
496
624
|
}, z.core.$strict>;
|
|
497
625
|
/** Lease request envelope (inferred from {@link LeaseIpcRequestEnvelopeSchema}). */
|
|
@@ -577,6 +705,17 @@ export declare const LeaseIpcResponseEnvelopeSchema: z.ZodObject<{
|
|
|
577
705
|
global: "global";
|
|
578
706
|
}>;
|
|
579
707
|
reason: z.ZodString;
|
|
708
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
709
|
+
kind: z.ZodLiteral<"queue_admit_result">;
|
|
710
|
+
disposition: z.ZodEnum<{
|
|
711
|
+
admitted: "admitted";
|
|
712
|
+
deferred: "deferred";
|
|
713
|
+
}>;
|
|
714
|
+
retry_after_ms: z.ZodNumber;
|
|
715
|
+
tokens_remaining: z.ZodNumber;
|
|
716
|
+
queue_position: z.ZodNumber;
|
|
717
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
718
|
+
kind: z.ZodLiteral<"heartbeat_ack">;
|
|
580
719
|
}, z.core.$strict>, z.ZodObject<{
|
|
581
720
|
kind: z.ZodLiteral<"error">;
|
|
582
721
|
code: z.ZodString;
|
|
@@ -651,6 +790,20 @@ export declare const LeaseIpcEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
651
790
|
kind: z.ZodLiteral<"tool_grant">;
|
|
652
791
|
tool: z.ZodString;
|
|
653
792
|
holder_id: z.ZodString;
|
|
793
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
794
|
+
kind: z.ZodLiteral<"queue_admit">;
|
|
795
|
+
provider: z.ZodString;
|
|
796
|
+
priority_class: z.ZodEnum<{
|
|
797
|
+
worker: "worker";
|
|
798
|
+
lead: "lead";
|
|
799
|
+
background: "background";
|
|
800
|
+
}>;
|
|
801
|
+
est_tokens: z.ZodNumber;
|
|
802
|
+
child_id: z.ZodString;
|
|
803
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
804
|
+
kind: z.ZodLiteral<"worker_heartbeat">;
|
|
805
|
+
child_id: z.ZodString;
|
|
806
|
+
in_flight_llm: z.ZodBoolean;
|
|
654
807
|
}, z.core.$strict>], "kind">;
|
|
655
808
|
}, z.core.$strict>, z.ZodObject<{
|
|
656
809
|
protocol_version: z.ZodString;
|
|
@@ -727,6 +880,17 @@ export declare const LeaseIpcEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
727
880
|
global: "global";
|
|
728
881
|
}>;
|
|
729
882
|
reason: z.ZodString;
|
|
883
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
884
|
+
kind: z.ZodLiteral<"queue_admit_result">;
|
|
885
|
+
disposition: z.ZodEnum<{
|
|
886
|
+
admitted: "admitted";
|
|
887
|
+
deferred: "deferred";
|
|
888
|
+
}>;
|
|
889
|
+
retry_after_ms: z.ZodNumber;
|
|
890
|
+
tokens_remaining: z.ZodNumber;
|
|
891
|
+
queue_position: z.ZodNumber;
|
|
892
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
893
|
+
kind: z.ZodLiteral<"heartbeat_ack">;
|
|
730
894
|
}, z.core.$strict>, z.ZodObject<{
|
|
731
895
|
kind: z.ZodLiteral<"error">;
|
|
732
896
|
code: z.ZodString;
|
|
@@ -740,15 +904,15 @@ export type LeaseIpcEnvelope = z.infer<typeof LeaseIpcEnvelopeSchema>;
|
|
|
740
904
|
* test pins this tuple; any addition/removal is a contract-breaking change
|
|
741
905
|
* requiring a coordinated dual (Rust + TS) edit.
|
|
742
906
|
*/
|
|
743
|
-
export declare const LEASE_IPC_REQUEST_KINDS: readonly ["lease_acquire", "lease_release", "lease_renew", "rate_check", "tool_grant"];
|
|
907
|
+
export declare const LEASE_IPC_REQUEST_KINDS: readonly ["lease_acquire", "lease_release", "lease_renew", "rate_check", "tool_grant", "queue_admit", "worker_heartbeat"];
|
|
744
908
|
/**
|
|
745
909
|
* The v1.1 response `kind` values, in declaration order. The schema-drift guard
|
|
746
910
|
* test pins this tuple.
|
|
747
911
|
*/
|
|
748
|
-
export declare const LEASE_IPC_RESPONSE_KINDS: readonly ["lease_granted", "lease_queued", "lease_denied", "rate_result", "tool_granted", "lease_revoked", "child_killed_unresponsive", "error"];
|
|
912
|
+
export declare const LEASE_IPC_RESPONSE_KINDS: readonly ["lease_granted", "lease_queued", "lease_denied", "rate_result", "tool_granted", "lease_revoked", "child_killed_unresponsive", "queue_admit_result", "heartbeat_ack", "error"];
|
|
749
913
|
/**
|
|
750
914
|
* The complete v1.1 message kind set (requests + responses), used by the drift
|
|
751
915
|
* guard on both the TS and Rust sides.
|
|
752
916
|
*/
|
|
753
|
-
export declare const LEASE_IPC_MESSAGE_KINDS: readonly ["lease_acquire", "lease_release", "lease_renew", "rate_check", "tool_grant", "lease_granted", "lease_queued", "lease_denied", "rate_result", "tool_granted", "lease_revoked", "child_killed_unresponsive", "error"];
|
|
917
|
+
export declare const LEASE_IPC_MESSAGE_KINDS: readonly ["lease_acquire", "lease_release", "lease_renew", "rate_check", "tool_grant", "queue_admit", "worker_heartbeat", "lease_granted", "lease_queued", "lease_denied", "rate_result", "tool_granted", "lease_revoked", "child_killed_unresponsive", "queue_admit_result", "heartbeat_ack", "error"];
|
|
754
918
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/lease-ipc/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;EAAgC,CAAC;AAE9D,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;EAAqC,CAAC;AAElE,mEAAmE;AACnE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAIxD;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;kBAiB3B,CAAC;AAEZ,iFAAiF;AACjF,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAW/B,CAAC;AAEZ,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWhC,CAAC;AAEZ,sFAAsF;AACtF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAGjC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAItE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,2HAQ1B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB,yLAW3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,uBAAuB,ySAG1B,CAAC"}
|
|
@@ -137,6 +137,54 @@ export const ToolGrantRequestSchema = z
|
|
|
137
137
|
holder_id: z.string().min(1),
|
|
138
138
|
})
|
|
139
139
|
.strict();
|
|
140
|
+
/**
|
|
141
|
+
* The priority class of a `queue_admit` request (T11630). Mirrors the Rust
|
|
142
|
+
* `QueuePriorityClass` enum and `cleo_supervisor::llm_queue::PriorityClass`.
|
|
143
|
+
*
|
|
144
|
+
* `lead > worker > background` — a lead/orchestrator agent is never starved by a
|
|
145
|
+
* background consolidation (AC1).
|
|
146
|
+
*/
|
|
147
|
+
export const QueuePriorityClassSchema = z.enum(['lead', 'worker', 'background']);
|
|
148
|
+
/**
|
|
149
|
+
* Admit (or defer) an outbound LLM call through the supervisor's priority
|
|
150
|
+
* scheduler + per-provider rate governor (T11630 · AC1-AC4). Mirrors
|
|
151
|
+
* `QueueAdmitReq`. `[wired]`
|
|
152
|
+
*/
|
|
153
|
+
export const QueueAdmitRequestSchema = z
|
|
154
|
+
.object({
|
|
155
|
+
/** Tag discriminating this request variant. */
|
|
156
|
+
kind: z.literal('queue_admit'),
|
|
157
|
+
/** The LLM provider id the call targets (rate budget is per-provider). */
|
|
158
|
+
provider: z.string().min(1),
|
|
159
|
+
/** The caller's priority class (lead > worker > background). */
|
|
160
|
+
priority_class: QueuePriorityClassSchema,
|
|
161
|
+
/** The caller's estimate of the request's token cost (debited on admit). */
|
|
162
|
+
est_tokens: z.number().int().nonnegative(),
|
|
163
|
+
/** The child the call belongs to (in-flight tracking — the watchdog seam). */
|
|
164
|
+
child_id: z.string().min(1),
|
|
165
|
+
})
|
|
166
|
+
.strict();
|
|
167
|
+
/**
|
|
168
|
+
* A liveness heartbeat from a managed worker (T11628). Mirrors
|
|
169
|
+
* `WorkerHeartbeatReq`. `[wired]`
|
|
170
|
+
*
|
|
171
|
+
* The worker sends this periodically (well inside the watchdog's NORMAL
|
|
172
|
+
* deadline) so the supervisor knows it is alive. `in_flight_llm` is the worker's
|
|
173
|
+
* OWN view of whether it is currently waiting on an LLM call: when true the
|
|
174
|
+
* watchdog grants the EXTENDED deadline even if the call never went through the
|
|
175
|
+
* `queue_admit` seam, so a slow-but-healthy long call is never false-killed
|
|
176
|
+
* (AC2 · RISK-7).
|
|
177
|
+
*/
|
|
178
|
+
export const WorkerHeartbeatRequestSchema = z
|
|
179
|
+
.object({
|
|
180
|
+
/** Tag discriminating this request variant. */
|
|
181
|
+
kind: z.literal('worker_heartbeat'),
|
|
182
|
+
/** The logical id of the heartbeating child (matches the registry key). */
|
|
183
|
+
child_id: z.string().min(1),
|
|
184
|
+
/** The worker's own view of whether it is currently inside an LLM call. */
|
|
185
|
+
in_flight_llm: z.boolean(),
|
|
186
|
+
})
|
|
187
|
+
.strict();
|
|
140
188
|
/**
|
|
141
189
|
* The discriminated union of all client → arbiter lease requests. The `kind`
|
|
142
190
|
* field selects the variant, matching the serde `#[serde(tag = "kind")]`
|
|
@@ -148,6 +196,8 @@ export const LeaseIpcRequestSchema = z.discriminatedUnion('kind', [
|
|
|
148
196
|
LeaseRenewRequestSchema,
|
|
149
197
|
RateCheckRequestSchema,
|
|
150
198
|
ToolGrantRequestSchema,
|
|
199
|
+
QueueAdmitRequestSchema,
|
|
200
|
+
WorkerHeartbeatRequestSchema,
|
|
151
201
|
]);
|
|
152
202
|
// ─── Responses (arbiter → client) ─────────────────────────────────────────────
|
|
153
203
|
/**
|
|
@@ -269,6 +319,43 @@ export const ChildKilledUnresponsiveResponseSchema = z
|
|
|
269
319
|
reason: z.string(),
|
|
270
320
|
})
|
|
271
321
|
.strict();
|
|
322
|
+
/**
|
|
323
|
+
* The disposition of a `queue_admit` request (T11630). Mirrors
|
|
324
|
+
* `QueueAdmitDisposition` in Rust — `admitted` (execute now) or `deferred`
|
|
325
|
+
* (back off `retry_after_ms` and re-request; AC4 — never a silent drop).
|
|
326
|
+
*/
|
|
327
|
+
export const QueueAdmitDispositionSchema = z.enum(['admitted', 'deferred']);
|
|
328
|
+
/**
|
|
329
|
+
* Reply to a `queue_admit`: the LLM call was admitted or deferred (T11630).
|
|
330
|
+
* Mirrors `QueueAdmitResult`.
|
|
331
|
+
*/
|
|
332
|
+
export const QueueAdmitResultResponseSchema = z
|
|
333
|
+
.object({
|
|
334
|
+
/** Tag discriminating this response variant. */
|
|
335
|
+
kind: z.literal('queue_admit_result'),
|
|
336
|
+
/** Whether the LLM call was admitted or deferred. */
|
|
337
|
+
disposition: QueueAdmitDispositionSchema,
|
|
338
|
+
/** Back-off in ms before re-requesting (0 when admitted). */
|
|
339
|
+
retry_after_ms: z.number().int().nonnegative(),
|
|
340
|
+
/** Remaining provider token budget after this decision. */
|
|
341
|
+
tokens_remaining: z.number().int().nonnegative(),
|
|
342
|
+
/** Number of higher/equal-priority waiters ahead (0 when admitted). */
|
|
343
|
+
queue_position: z.number().int().nonnegative(),
|
|
344
|
+
})
|
|
345
|
+
.strict();
|
|
346
|
+
/**
|
|
347
|
+
* Acknowledge a `worker_heartbeat` (T11628). Mirrors `HeartbeatAck`.
|
|
348
|
+
*
|
|
349
|
+
* Deliberately carries only its `kind` — the ack's presence (correlated by id)
|
|
350
|
+
* is the signal that the watchdog recorded the beat and reset the child's
|
|
351
|
+
* deadline. Matches the Rust unit-struct wire shape `{ "kind": "heartbeat_ack" }`.
|
|
352
|
+
*/
|
|
353
|
+
export const HeartbeatAckResponseSchema = z
|
|
354
|
+
.object({
|
|
355
|
+
/** Tag discriminating this response variant. */
|
|
356
|
+
kind: z.literal('heartbeat_ack'),
|
|
357
|
+
})
|
|
358
|
+
.strict();
|
|
272
359
|
/**
|
|
273
360
|
* An error response correlated to a request. Mirrors the v1.0
|
|
274
361
|
* `crate::ipc::ErrorResult` shape reused by the Rust `LeaseResponse::Error`
|
|
@@ -297,6 +384,8 @@ export const LeaseIpcResponseSchema = z.discriminatedUnion('kind', [
|
|
|
297
384
|
ToolGrantedResponseSchema,
|
|
298
385
|
LeaseRevokedResponseSchema,
|
|
299
386
|
ChildKilledUnresponsiveResponseSchema,
|
|
387
|
+
QueueAdmitResultResponseSchema,
|
|
388
|
+
HeartbeatAckResponseSchema,
|
|
300
389
|
LeaseErrorResponseSchema,
|
|
301
390
|
]);
|
|
302
391
|
// ─── Envelope ──────────────────────────────────────────────────────────────────
|
|
@@ -357,6 +446,8 @@ export const LEASE_IPC_REQUEST_KINDS = [
|
|
|
357
446
|
'lease_renew',
|
|
358
447
|
'rate_check',
|
|
359
448
|
'tool_grant',
|
|
449
|
+
'queue_admit',
|
|
450
|
+
'worker_heartbeat',
|
|
360
451
|
];
|
|
361
452
|
/**
|
|
362
453
|
* The v1.1 response `kind` values, in declaration order. The schema-drift guard
|
|
@@ -370,6 +461,8 @@ export const LEASE_IPC_RESPONSE_KINDS = [
|
|
|
370
461
|
'tool_granted',
|
|
371
462
|
'lease_revoked',
|
|
372
463
|
'child_killed_unresponsive',
|
|
464
|
+
'queue_admit_result',
|
|
465
|
+
'heartbeat_ack',
|
|
373
466
|
'error',
|
|
374
467
|
];
|
|
375
468
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/lease-ipc/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AAEjF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAK9D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAKlE,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,+CAA+C;IAC/C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IAChC,0CAA0C;IAC1C,KAAK,EAAE,gBAAgB;IACvB,uCAAuC;IACvC,IAAI,EAAE,eAAe;IACrB,oCAAoC;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CA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UAAU,CAAC;IAChC,yBAAyB;IACzB,QAAQ,EAAE,sBAAsB;CACjC,CAAC;KACD,MAAM,EAAE,CAAC;AAKZ;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,kBAAkB,CAAC,WAAW,EAAE;IACtE,6BAA6B;IAC7B,8BAA8B;CAC/B,CAAC,CAAC;AAKH,kFAAkF;AAElF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,eAAe;IACf,eAAe;IACf,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,kBAAkB;CACV,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,eAAe;IACf,cAAc;IACd,cAAc;IACd,aAAa;IACb,cAAc;IACd,eAAe;IACf,2BAA2B;IAC3B,oBAAoB;IACpB,eAAe;IACf,OAAO;CACC,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,GAAG,uBAAuB;IAC1B,GAAG,wBAAwB;CACnB,CAAC"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod mirror + TypeScript types for the curated models catalog (E8 · T11731).
|
|
3
|
+
*
|
|
4
|
+
* This is the type+validation SSoT for the **shipped, offline-first** provider+model
|
|
5
|
+
* catalog seed that populates the global `models_catalog` table (T11733) and backs
|
|
6
|
+
* offline/degraded catalog reads (T11737). It mirrors the JSON Schema in the sibling
|
|
7
|
+
* `catalog-schema.json` (draft 2020-12) one-to-one.
|
|
8
|
+
*
|
|
9
|
+
* ## Offline-first — NO network is implied by these types
|
|
10
|
+
*
|
|
11
|
+
* The {@link CuratedCatalog} shape describes a committed, build-time snapshot of the
|
|
12
|
+
* models.dev wire shape. Nothing here fetches; the network refresh op
|
|
13
|
+
* (`cleo llm refresh-catalog`) is a SEPARATE leaf. The seeder reads the bundled
|
|
14
|
+
* `curated-catalog.json` (validated against {@link curatedCatalogSchema}) and upserts
|
|
15
|
+
* every row offline.
|
|
16
|
+
*
|
|
17
|
+
* ## models_catalog row parity (AC4)
|
|
18
|
+
*
|
|
19
|
+
* {@link modelsCatalogRowSelectSchema} / {@link modelsCatalogRowInsertSchema} describe the
|
|
20
|
+
* FLATTENED per-row shape persisted in the `models_catalog` DB table — the json/cost/
|
|
21
|
+
* modalities sub-objects serialize to TEXT columns, booleans to `integer({mode:'boolean'})`.
|
|
22
|
+
* {@link flattenCatalogToRows} (in core) maps a {@link CuratedCatalog} → these rows.
|
|
23
|
+
*
|
|
24
|
+
* Contracts-purity (Gate 10): this module exports ONLY zod schemas (values) and
|
|
25
|
+
* `z.infer` types — no bodied runtime helpers. The flatten/seed logic lives in core.
|
|
26
|
+
*
|
|
27
|
+
* @module llm/catalog-schema
|
|
28
|
+
* @task T11731
|
|
29
|
+
* @epic T11694 (E8-CATALOG-CURATION)
|
|
30
|
+
*/
|
|
31
|
+
import { z } from 'zod';
|
|
32
|
+
/** Legal `models_catalog.status` availability-lifecycle values. */
|
|
33
|
+
export declare const CATALOG_MODEL_STATUSES: readonly ["stable", "beta", "preview", "deprecated", "retired"];
|
|
34
|
+
/** TypeScript union of {@link CATALOG_MODEL_STATUSES}. */
|
|
35
|
+
export type CatalogModelStatus = (typeof CATALOG_MODEL_STATUSES)[number];
|
|
36
|
+
/** Legal provider auth mechanisms carried in a catalog provider entry. */
|
|
37
|
+
export declare const CATALOG_AUTH_TYPES: readonly ["api_key", "oauth", "bedrock", "vertex"];
|
|
38
|
+
/** TypeScript union of {@link CATALOG_AUTH_TYPES}. */
|
|
39
|
+
export type CatalogAuthType = (typeof CATALOG_AUTH_TYPES)[number];
|
|
40
|
+
/** Input/output modality lists for a model. */
|
|
41
|
+
export declare const catalogModalitiesSchema: z.ZodObject<{
|
|
42
|
+
input: z.ZodArray<z.ZodString>;
|
|
43
|
+
output: z.ZodArray<z.ZodString>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
/** Per-1M-token cost facets for a model (all optional — providers vary). */
|
|
46
|
+
export declare const catalogCostSchema: z.ZodObject<{
|
|
47
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
cache_write: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
context_over_200k: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
/** Context/output token-window limits for a model. */
|
|
54
|
+
export declare const catalogLimitSchema: z.ZodObject<{
|
|
55
|
+
context: z.ZodNumber;
|
|
56
|
+
output: z.ZodNumber;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
/** The provider-of-record (npm package + api protocol) for a model. */
|
|
59
|
+
export declare const catalogModelProviderSchema: z.ZodObject<{
|
|
60
|
+
npm: z.ZodString;
|
|
61
|
+
api: z.ZodString;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
/** Full models.dev wire capability set for a single model entry. */
|
|
64
|
+
export declare const catalogModelEntrySchema: z.ZodObject<{
|
|
65
|
+
id: z.ZodString;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
family: z.ZodString;
|
|
68
|
+
attachment: z.ZodBoolean;
|
|
69
|
+
reasoning: z.ZodBoolean;
|
|
70
|
+
temperature: z.ZodBoolean;
|
|
71
|
+
interleaved: z.ZodBoolean;
|
|
72
|
+
tool_call: z.ZodBoolean;
|
|
73
|
+
modalities: z.ZodObject<{
|
|
74
|
+
input: z.ZodArray<z.ZodString>;
|
|
75
|
+
output: z.ZodArray<z.ZodString>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
cost: z.ZodObject<{
|
|
78
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
cache_write: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
context_over_200k: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
limit: z.ZodObject<{
|
|
85
|
+
context: z.ZodNumber;
|
|
86
|
+
output: z.ZodNumber;
|
|
87
|
+
}, z.core.$strict>;
|
|
88
|
+
status: z.ZodEnum<{
|
|
89
|
+
deprecated: "deprecated";
|
|
90
|
+
stable: "stable";
|
|
91
|
+
beta: "beta";
|
|
92
|
+
preview: "preview";
|
|
93
|
+
retired: "retired";
|
|
94
|
+
}>;
|
|
95
|
+
release_date: z.ZodString;
|
|
96
|
+
provider: z.ZodObject<{
|
|
97
|
+
npm: z.ZodString;
|
|
98
|
+
api: z.ZodString;
|
|
99
|
+
}, z.core.$strict>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
/** A provider record in the catalog envelope. */
|
|
102
|
+
export declare const catalogProviderSchema: z.ZodObject<{
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
endpoint: z.ZodString;
|
|
105
|
+
authTypes: z.ZodArray<z.ZodEnum<{
|
|
106
|
+
bedrock: "bedrock";
|
|
107
|
+
api_key: "api_key";
|
|
108
|
+
oauth: "oauth";
|
|
109
|
+
vertex: "vertex";
|
|
110
|
+
}>>;
|
|
111
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strict>;
|
|
113
|
+
/**
|
|
114
|
+
* Top-level shape of the curated catalog seed (`curated-catalog.json`).
|
|
115
|
+
*
|
|
116
|
+
* `providers` is keyed by provider id; `models` is keyed by provider id → model id →
|
|
117
|
+
* {@link catalogModelEntrySchema}.
|
|
118
|
+
*/
|
|
119
|
+
export declare const curatedCatalogSchema: z.ZodObject<{
|
|
120
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
121
|
+
version: z.ZodString;
|
|
122
|
+
lastUpdated: z.ZodString;
|
|
123
|
+
providers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
endpoint: z.ZodString;
|
|
126
|
+
authTypes: z.ZodArray<z.ZodEnum<{
|
|
127
|
+
bedrock: "bedrock";
|
|
128
|
+
api_key: "api_key";
|
|
129
|
+
oauth: "oauth";
|
|
130
|
+
vertex: "vertex";
|
|
131
|
+
}>>;
|
|
132
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, z.core.$strict>>;
|
|
134
|
+
models: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
name: z.ZodString;
|
|
137
|
+
family: z.ZodString;
|
|
138
|
+
attachment: z.ZodBoolean;
|
|
139
|
+
reasoning: z.ZodBoolean;
|
|
140
|
+
temperature: z.ZodBoolean;
|
|
141
|
+
interleaved: z.ZodBoolean;
|
|
142
|
+
tool_call: z.ZodBoolean;
|
|
143
|
+
modalities: z.ZodObject<{
|
|
144
|
+
input: z.ZodArray<z.ZodString>;
|
|
145
|
+
output: z.ZodArray<z.ZodString>;
|
|
146
|
+
}, z.core.$strict>;
|
|
147
|
+
cost: z.ZodObject<{
|
|
148
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
cache_write: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
context_over_200k: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
}, z.core.$strict>;
|
|
154
|
+
limit: z.ZodObject<{
|
|
155
|
+
context: z.ZodNumber;
|
|
156
|
+
output: z.ZodNumber;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
status: z.ZodEnum<{
|
|
159
|
+
deprecated: "deprecated";
|
|
160
|
+
stable: "stable";
|
|
161
|
+
beta: "beta";
|
|
162
|
+
preview: "preview";
|
|
163
|
+
retired: "retired";
|
|
164
|
+
}>;
|
|
165
|
+
release_date: z.ZodString;
|
|
166
|
+
provider: z.ZodObject<{
|
|
167
|
+
npm: z.ZodString;
|
|
168
|
+
api: z.ZodString;
|
|
169
|
+
}, z.core.$strict>;
|
|
170
|
+
}, z.core.$strict>>>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
/** The validated curated catalog seed shape. */
|
|
173
|
+
export type CuratedCatalog = z.infer<typeof curatedCatalogSchema>;
|
|
174
|
+
/** A single model entry from the curated catalog. */
|
|
175
|
+
export type CatalogModelEntry = z.infer<typeof catalogModelEntrySchema>;
|
|
176
|
+
/** A single provider entry from the curated catalog. */
|
|
177
|
+
export type CatalogProvider = z.infer<typeof catalogProviderSchema>;
|
|
178
|
+
/**
|
|
179
|
+
* INSERT/UPSERT shape for one `models_catalog` row (the flattened persistence form).
|
|
180
|
+
*
|
|
181
|
+
* The catalog's nested `modalities` / `cost` sub-objects are JSON-serialized into the
|
|
182
|
+
* `modalities` / `cost` TEXT columns; booleans persist as `integer({mode:'boolean'})`.
|
|
183
|
+
* `provider_id` is the catalog key; `models_dev_id` mirrors the entry `id`.
|
|
184
|
+
*/
|
|
185
|
+
export declare const modelsCatalogRowInsertSchema: z.ZodObject<{
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
providerId: z.ZodString;
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
family: z.ZodString;
|
|
190
|
+
attachment: z.ZodBoolean;
|
|
191
|
+
reasoning: z.ZodBoolean;
|
|
192
|
+
temperature: z.ZodBoolean;
|
|
193
|
+
interleaved: z.ZodBoolean;
|
|
194
|
+
toolCall: z.ZodBoolean;
|
|
195
|
+
modalities: z.ZodString;
|
|
196
|
+
cost: z.ZodString;
|
|
197
|
+
contextLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
198
|
+
outputLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
199
|
+
status: z.ZodEnum<{
|
|
200
|
+
deprecated: "deprecated";
|
|
201
|
+
stable: "stable";
|
|
202
|
+
beta: "beta";
|
|
203
|
+
preview: "preview";
|
|
204
|
+
retired: "retired";
|
|
205
|
+
}>;
|
|
206
|
+
releaseDate: z.ZodString;
|
|
207
|
+
modelsDevId: z.ZodString;
|
|
208
|
+
source: z.ZodString;
|
|
209
|
+
seededAt: z.ZodOptional<z.ZodString>;
|
|
210
|
+
}, z.core.$strict>;
|
|
211
|
+
/** SELECT shape for one `models_catalog` row (adds the always-present `seededAt`). */
|
|
212
|
+
export declare const modelsCatalogRowSelectSchema: z.ZodObject<{
|
|
213
|
+
id: z.ZodString;
|
|
214
|
+
providerId: z.ZodString;
|
|
215
|
+
name: z.ZodString;
|
|
216
|
+
family: z.ZodString;
|
|
217
|
+
attachment: z.ZodBoolean;
|
|
218
|
+
reasoning: z.ZodBoolean;
|
|
219
|
+
temperature: z.ZodBoolean;
|
|
220
|
+
interleaved: z.ZodBoolean;
|
|
221
|
+
toolCall: z.ZodBoolean;
|
|
222
|
+
modalities: z.ZodString;
|
|
223
|
+
cost: z.ZodString;
|
|
224
|
+
contextLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
225
|
+
outputLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
226
|
+
status: z.ZodEnum<{
|
|
227
|
+
deprecated: "deprecated";
|
|
228
|
+
stable: "stable";
|
|
229
|
+
beta: "beta";
|
|
230
|
+
preview: "preview";
|
|
231
|
+
retired: "retired";
|
|
232
|
+
}>;
|
|
233
|
+
releaseDate: z.ZodString;
|
|
234
|
+
modelsDevId: z.ZodString;
|
|
235
|
+
source: z.ZodString;
|
|
236
|
+
seededAt: z.ZodString;
|
|
237
|
+
}, z.core.$strict>;
|
|
238
|
+
/** INSERT/UPSERT row type for `models_catalog`. */
|
|
239
|
+
export type ModelsCatalogRowInsert = z.infer<typeof modelsCatalogRowInsertSchema>;
|
|
240
|
+
/** SELECT row type for `models_catalog`. */
|
|
241
|
+
export type ModelsCatalogRowSelect = z.infer<typeof modelsCatalogRowSelectSchema>;
|
|
242
|
+
//# sourceMappingURL=catalog-schema.d.ts.map
|