dsh-autotier 0.1.0 → 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.
Files changed (62) hide show
  1. package/AGENTS.md +26 -3
  2. package/CHANGELOG.md +59 -0
  3. package/README.es.md +6 -2
  4. package/README.hi.md +7 -2
  5. package/README.md +7 -2
  6. package/README.pt.md +6 -2
  7. package/README.zh.md +6 -2
  8. package/THIRD_PARTY_NOTICES.md +31 -0
  9. package/docs/roadmap-v0.2.md +114 -0
  10. package/lib/client.js +5956 -0
  11. package/lib/client.js.map +1 -0
  12. package/lib/index.js +274 -58
  13. package/lib/typert.host.js +26 -0
  14. package/lib/types/client/TierPill.d.ts +24 -0
  15. package/lib/types/client/TierPill.d.ts.map +1 -0
  16. package/lib/types/client/TierSettingsCard.d.ts +31 -0
  17. package/lib/types/client/TierSettingsCard.d.ts.map +1 -0
  18. package/lib/types/client/index.d.ts +30 -0
  19. package/lib/types/client/index.d.ts.map +1 -0
  20. package/lib/types/client/locales.d.ts +60 -0
  21. package/lib/types/client/locales.d.ts.map +1 -0
  22. package/lib/types/client/present.d.ts +61 -0
  23. package/lib/types/client/present.d.ts.map +1 -0
  24. package/lib/types/client/remote.d.ts +313 -0
  25. package/lib/types/client/remote.d.ts.map +1 -0
  26. package/lib/types/client/styles.d.ts +12 -0
  27. package/lib/types/client/styles.d.ts.map +1 -0
  28. package/lib/types/command.d.ts.map +1 -1
  29. package/lib/types/index.d.ts +4 -0
  30. package/lib/types/index.d.ts.map +1 -1
  31. package/lib/types/policy.d.ts +4 -0
  32. package/lib/types/policy.d.ts.map +1 -1
  33. package/lib/types/preflight.d.ts +48 -0
  34. package/lib/types/preflight.d.ts.map +1 -0
  35. package/lib/types/routing.d.ts +2 -0
  36. package/lib/types/routing.d.ts.map +1 -1
  37. package/lib/types/selection.d.ts +50 -0
  38. package/lib/types/selection.d.ts.map +1 -0
  39. package/lib/types/tier-remote.d.ts +79 -0
  40. package/lib/types/tier-remote.d.ts.map +1 -0
  41. package/lib/types/typert.host.d.ts +300 -0
  42. package/lib/types/typert.host.d.ts.map +1 -0
  43. package/lib/types/wire.d.ts +804 -0
  44. package/lib/types/wire.d.ts.map +1 -0
  45. package/lib/wire-BpKSOHgo.js +5193 -0
  46. package/package.json +63 -11
  47. package/src/client/TierPill.tsx +83 -0
  48. package/src/client/TierSettingsCard.tsx +175 -0
  49. package/src/client/index.ts +146 -0
  50. package/src/client/locales.ts +107 -0
  51. package/src/client/present.ts +124 -0
  52. package/src/client/remote.ts +39 -0
  53. package/src/client/styles.ts +174 -0
  54. package/src/command.ts +1 -0
  55. package/src/index.ts +43 -0
  56. package/src/policy.ts +6 -0
  57. package/src/preflight.ts +105 -0
  58. package/src/routing.ts +28 -1
  59. package/src/selection.ts +124 -0
  60. package/src/tier-remote.ts +139 -0
  61. package/src/typert.host.ts +25 -0
  62. package/src/wire.ts +248 -0
@@ -0,0 +1,804 @@
1
+ /**
2
+ * The `tier` Remote wire vocabulary: the status/catalog/setMode payload types,
3
+ * their zod v4 validation schemas (the strict codecs both Typert faces carry),
4
+ * and the invocation descriptors shared verbatim by the host `./typert`
5
+ * manifest (`src/typert.host.ts`) and the client Remote contribution
6
+ * (`src/client/remote.ts`). One canonical source keeps the two codecs from ever
7
+ * drifting apart.
8
+ *
9
+ * `TierStatus` extends the host's public {@link AutotierStatus} additively with
10
+ * one `session` view: the per-agent override and the last applied tier are
11
+ * runtime state that lives in a `WeakMap` keyed by Agent, so they can only be
12
+ * reported for a concrete agent id. `mode` on the base status stays the
13
+ * composition mode; `session.mode` is the effective mode for that agent.
14
+ *
15
+ * @module dsh-autotier/wire
16
+ */
17
+ import { z } from 'zod';
18
+ import { type AutotierStatus, type RouteSource, type RoutingMode, type TierId } from './types.js';
19
+ /** The Typert Remote namespace and Cordis service key of the browser face. */
20
+ export declare const TIER_NAMESPACE = "tier";
21
+ /**
22
+ * Every {@link RouteSource} member, as a runtime tuple. Kept next to the wire
23
+ * schema because the source crosses the Remote boundary inside the session
24
+ * view; `satisfies` rejects a typo or a member that no longer exists.
25
+ */
26
+ export declare const ROUTE_SOURCES: readonly ["manual", "rule", "judge", "posterior", "plan-mode", "guard", "escalation", "fallback", "default"];
27
+ /** The wire identity of one session id (the client's slot identity). */
28
+ export type TierAgentId = string;
29
+ /** One registered model, as the configuration UI needs it. */
30
+ export interface TierModelInfo {
31
+ readonly id: string;
32
+ readonly name: string;
33
+ readonly inputModalities: readonly string[];
34
+ }
35
+ /** One registered provider with its models. */
36
+ export interface TierCatalogProvider {
37
+ readonly provider: string;
38
+ readonly models: readonly TierModelInfo[];
39
+ }
40
+ /** The live provider/model catalog served by `tier/catalog`. */
41
+ export type TierCatalog = readonly TierCatalogProvider[];
42
+ /** The session-scoped view of the routing state for one agent. */
43
+ export interface TierSessionView {
44
+ /** The resolved agent id; null when no id was supplied or it is unknown. */
45
+ readonly agentId: string | null;
46
+ /** The session override in force; null means "follow the composition mode". */
47
+ readonly override: RoutingMode | null;
48
+ /** Effective mode: the override when set, otherwise the composition mode. */
49
+ readonly mode: RoutingMode;
50
+ /** The tier the last request actually used for this agent, when known. */
51
+ readonly appliedTier: TierId | null;
52
+ /** The layer that produced {@link TierSessionView.appliedTier}. */
53
+ readonly appliedSource: RouteSource | null;
54
+ /** Whether a failure escalation is active right now. */
55
+ readonly escalation: boolean;
56
+ /** Whether plan mode is active for this agent. */
57
+ readonly plan: boolean;
58
+ /** Guard denials counted for this agent. */
59
+ readonly denials: number;
60
+ }
61
+ /**
62
+ * The full `tier/status` payload: the host's public status snapshot plus the
63
+ * session view. Structurally assignable to {@link AutotierStatus}, so a
64
+ * consumer of the old shape keeps working unchanged.
65
+ */
66
+ export interface TierStatus extends AutotierStatus {
67
+ readonly session: TierSessionView;
68
+ }
69
+ /** Strict wire schema for one tier landing. */
70
+ export declare const TIER_ROUTE_SCHEMA: z.ZodObject<{
71
+ provider: z.ZodString;
72
+ model: z.ZodString;
73
+ effort: z.ZodOptional<z.ZodEnum<{
74
+ off: "off";
75
+ low: "low";
76
+ high: "high";
77
+ max: "max";
78
+ }>>;
79
+ }, z.core.$strip>;
80
+ /** Strict wire schema for the session view. */
81
+ export declare const TIER_SESSION_VIEW_SCHEMA: z.ZodObject<{
82
+ agentId: z.ZodNullable<z.ZodString>;
83
+ override: z.ZodNullable<z.ZodEnum<{
84
+ strong: "strong";
85
+ cheap: "cheap";
86
+ off: "off";
87
+ auto: "auto";
88
+ delegated: "delegated";
89
+ }>>;
90
+ mode: z.ZodEnum<{
91
+ strong: "strong";
92
+ cheap: "cheap";
93
+ off: "off";
94
+ auto: "auto";
95
+ delegated: "delegated";
96
+ }>;
97
+ appliedTier: z.ZodNullable<z.ZodEnum<{
98
+ strong: "strong";
99
+ cheap: "cheap";
100
+ }>>;
101
+ appliedSource: z.ZodNullable<z.ZodEnum<{
102
+ manual: "manual";
103
+ rule: "rule";
104
+ judge: "judge";
105
+ posterior: "posterior";
106
+ "plan-mode": "plan-mode";
107
+ guard: "guard";
108
+ escalation: "escalation";
109
+ fallback: "fallback";
110
+ default: "default";
111
+ }>>;
112
+ escalation: z.ZodBoolean;
113
+ plan: z.ZodBoolean;
114
+ denials: z.ZodNumber;
115
+ }, z.core.$strip>;
116
+ /** Strict wire schema for {@link TierStatus} (zod v4, both Typert faces). */
117
+ export declare const TIER_STATUS_SCHEMA: z.ZodObject<{
118
+ mode: z.ZodEnum<{
119
+ strong: "strong";
120
+ cheap: "cheap";
121
+ off: "off";
122
+ auto: "auto";
123
+ delegated: "delegated";
124
+ }>;
125
+ tiers: z.ZodObject<{
126
+ strong: z.ZodObject<{
127
+ provider: z.ZodString;
128
+ model: z.ZodString;
129
+ effort: z.ZodOptional<z.ZodEnum<{
130
+ off: "off";
131
+ low: "low";
132
+ high: "high";
133
+ max: "max";
134
+ }>>;
135
+ }, z.core.$strip>;
136
+ cheap: z.ZodObject<{
137
+ provider: z.ZodString;
138
+ model: z.ZodString;
139
+ effort: z.ZodOptional<z.ZodEnum<{
140
+ off: "off";
141
+ low: "low";
142
+ high: "high";
143
+ max: "max";
144
+ }>>;
145
+ }, z.core.$strip>;
146
+ vision: z.ZodObject<{
147
+ provider: z.ZodString;
148
+ model: z.ZodString;
149
+ effort: z.ZodOptional<z.ZodEnum<{
150
+ off: "off";
151
+ low: "low";
152
+ high: "high";
153
+ max: "max";
154
+ }>>;
155
+ }, z.core.$strip>;
156
+ }, z.core.$strip>;
157
+ guard: z.ZodObject<{
158
+ enabled: z.ZodBoolean;
159
+ tiers: z.ZodArray<z.ZodEnum<{
160
+ strong: "strong";
161
+ cheap: "cheap";
162
+ }>>;
163
+ }, z.core.$strip>;
164
+ escalation: z.ZodObject<{
165
+ threshold: z.ZodNumber;
166
+ windowMs: z.ZodNumber;
167
+ ttlMs: z.ZodNumber;
168
+ fallbackTtlMs: z.ZodNumber;
169
+ signature: z.ZodBoolean;
170
+ }, z.core.$strip>;
171
+ session: z.ZodObject<{
172
+ agentId: z.ZodNullable<z.ZodString>;
173
+ override: z.ZodNullable<z.ZodEnum<{
174
+ strong: "strong";
175
+ cheap: "cheap";
176
+ off: "off";
177
+ auto: "auto";
178
+ delegated: "delegated";
179
+ }>>;
180
+ mode: z.ZodEnum<{
181
+ strong: "strong";
182
+ cheap: "cheap";
183
+ off: "off";
184
+ auto: "auto";
185
+ delegated: "delegated";
186
+ }>;
187
+ appliedTier: z.ZodNullable<z.ZodEnum<{
188
+ strong: "strong";
189
+ cheap: "cheap";
190
+ }>>;
191
+ appliedSource: z.ZodNullable<z.ZodEnum<{
192
+ manual: "manual";
193
+ rule: "rule";
194
+ judge: "judge";
195
+ posterior: "posterior";
196
+ "plan-mode": "plan-mode";
197
+ guard: "guard";
198
+ escalation: "escalation";
199
+ fallback: "fallback";
200
+ default: "default";
201
+ }>>;
202
+ escalation: z.ZodBoolean;
203
+ plan: z.ZodBoolean;
204
+ denials: z.ZodNumber;
205
+ }, z.core.$strip>;
206
+ }, z.core.$strip>;
207
+ /** Strict wire schema for {@link TierCatalog}. */
208
+ export declare const TIER_CATALOG_SCHEMA: z.ZodArray<z.ZodObject<{
209
+ provider: z.ZodString;
210
+ models: z.ZodArray<z.ZodObject<{
211
+ id: z.ZodString;
212
+ name: z.ZodString;
213
+ inputModalities: z.ZodArray<z.ZodString>;
214
+ }, z.core.$strip>>;
215
+ }, z.core.$strip>>;
216
+ /** Strict wire schema for the optional agent id (missing decodes to `undefined`). */
217
+ export declare const TIER_AGENT_ID_SCHEMA: z.ZodOptional<z.ZodString>;
218
+ /** Strict wire schema for the routing mode parameter. */
219
+ export declare const TIER_MODE_SCHEMA: z.ZodEnum<{
220
+ strong: "strong";
221
+ cheap: "cheap";
222
+ off: "off";
223
+ auto: "auto";
224
+ delegated: "delegated";
225
+ }>;
226
+ /**
227
+ * The `tier/status` invocation descriptor, shared verbatim by the host `TYPERT`
228
+ * manifest and the client `TypertRemoteContribution`. The optional `agentId` is
229
+ * the session id the slot props already carry; without it the host answers with
230
+ * the composition mode and an empty session view.
231
+ */
232
+ export declare const TIER_STATUS_DESCRIPTOR: Readonly<{
233
+ readonly id: "dsh-autotier#tier/status";
234
+ readonly service: "tier";
235
+ readonly namespace: "tier";
236
+ readonly method: "status";
237
+ readonly invocation: Readonly<{
238
+ kind: "direct";
239
+ }>;
240
+ readonly parameters: readonly Readonly<{
241
+ name: string;
242
+ wire: string;
243
+ source: "json";
244
+ codec: Readonly<{
245
+ mode: "strict";
246
+ typeSymbol: "dsh-autotier/wire#TierAgentId";
247
+ schema: z.ZodOptional<z.ZodString>;
248
+ }>;
249
+ acceptsUndefined: true;
250
+ }>[];
251
+ readonly result: Readonly<{
252
+ mode: "strict";
253
+ typeSymbol: string;
254
+ schema: z.ZodObject<{
255
+ mode: z.ZodEnum<{
256
+ strong: "strong";
257
+ cheap: "cheap";
258
+ off: "off";
259
+ auto: "auto";
260
+ delegated: "delegated";
261
+ }>;
262
+ tiers: z.ZodObject<{
263
+ strong: z.ZodObject<{
264
+ provider: z.ZodString;
265
+ model: z.ZodString;
266
+ effort: z.ZodOptional<z.ZodEnum<{
267
+ off: "off";
268
+ low: "low";
269
+ high: "high";
270
+ max: "max";
271
+ }>>;
272
+ }, z.core.$strip>;
273
+ cheap: z.ZodObject<{
274
+ provider: z.ZodString;
275
+ model: z.ZodString;
276
+ effort: z.ZodOptional<z.ZodEnum<{
277
+ off: "off";
278
+ low: "low";
279
+ high: "high";
280
+ max: "max";
281
+ }>>;
282
+ }, z.core.$strip>;
283
+ vision: z.ZodObject<{
284
+ provider: z.ZodString;
285
+ model: z.ZodString;
286
+ effort: z.ZodOptional<z.ZodEnum<{
287
+ off: "off";
288
+ low: "low";
289
+ high: "high";
290
+ max: "max";
291
+ }>>;
292
+ }, z.core.$strip>;
293
+ }, z.core.$strip>;
294
+ guard: z.ZodObject<{
295
+ enabled: z.ZodBoolean;
296
+ tiers: z.ZodArray<z.ZodEnum<{
297
+ strong: "strong";
298
+ cheap: "cheap";
299
+ }>>;
300
+ }, z.core.$strip>;
301
+ escalation: z.ZodObject<{
302
+ threshold: z.ZodNumber;
303
+ windowMs: z.ZodNumber;
304
+ ttlMs: z.ZodNumber;
305
+ fallbackTtlMs: z.ZodNumber;
306
+ signature: z.ZodBoolean;
307
+ }, z.core.$strip>;
308
+ session: z.ZodObject<{
309
+ agentId: z.ZodNullable<z.ZodString>;
310
+ override: z.ZodNullable<z.ZodEnum<{
311
+ strong: "strong";
312
+ cheap: "cheap";
313
+ off: "off";
314
+ auto: "auto";
315
+ delegated: "delegated";
316
+ }>>;
317
+ mode: z.ZodEnum<{
318
+ strong: "strong";
319
+ cheap: "cheap";
320
+ off: "off";
321
+ auto: "auto";
322
+ delegated: "delegated";
323
+ }>;
324
+ appliedTier: z.ZodNullable<z.ZodEnum<{
325
+ strong: "strong";
326
+ cheap: "cheap";
327
+ }>>;
328
+ appliedSource: z.ZodNullable<z.ZodEnum<{
329
+ manual: "manual";
330
+ rule: "rule";
331
+ judge: "judge";
332
+ posterior: "posterior";
333
+ "plan-mode": "plan-mode";
334
+ guard: "guard";
335
+ escalation: "escalation";
336
+ fallback: "fallback";
337
+ default: "default";
338
+ }>>;
339
+ escalation: z.ZodBoolean;
340
+ plan: z.ZodBoolean;
341
+ denials: z.ZodNumber;
342
+ }, z.core.$strip>;
343
+ }, z.core.$strip>;
344
+ }>;
345
+ readonly sourceLocation: Readonly<{
346
+ file: "src/wire.ts";
347
+ line: 1;
348
+ column: 1;
349
+ }>;
350
+ }>;
351
+ /**
352
+ * The `tier/catalog` invocation descriptor: the live `ctx.llm` provider/model
353
+ * registry, so the Settings card can list what is actually selectable.
354
+ */
355
+ export declare const TIER_CATALOG_DESCRIPTOR: Readonly<{
356
+ readonly id: "dsh-autotier#tier/catalog";
357
+ readonly service: "tier";
358
+ readonly namespace: "tier";
359
+ readonly method: "catalog";
360
+ readonly invocation: Readonly<{
361
+ kind: "direct";
362
+ }>;
363
+ readonly parameters: readonly never[];
364
+ readonly result: Readonly<{
365
+ mode: "strict";
366
+ typeSymbol: "dsh-autotier/wire#TierCatalog";
367
+ schema: z.ZodArray<z.ZodObject<{
368
+ provider: z.ZodString;
369
+ models: z.ZodArray<z.ZodObject<{
370
+ id: z.ZodString;
371
+ name: z.ZodString;
372
+ inputModalities: z.ZodArray<z.ZodString>;
373
+ }, z.core.$strip>>;
374
+ }, z.core.$strip>>;
375
+ }>;
376
+ readonly sourceLocation: Readonly<{
377
+ file: "src/wire.ts";
378
+ line: 1;
379
+ column: 1;
380
+ }>;
381
+ }>;
382
+ /**
383
+ * The `tier/setMode` invocation descriptor: the composer pill's cycle and the
384
+ * Settings card's selector both write the *session* override for one agent
385
+ * (`auto` clears it). Runtime only — a reload restores the composition mode.
386
+ */
387
+ export declare const TIER_SET_MODE_DESCRIPTOR: Readonly<{
388
+ readonly id: "dsh-autotier#tier/setMode";
389
+ readonly service: "tier";
390
+ readonly namespace: "tier";
391
+ readonly method: "setMode";
392
+ readonly invocation: Readonly<{
393
+ kind: "direct";
394
+ }>;
395
+ readonly parameters: readonly (Readonly<{
396
+ name: string;
397
+ wire: string;
398
+ source: "json";
399
+ codec: Readonly<{
400
+ mode: "strict";
401
+ typeSymbol: "dsh-autotier/wire#TierAgentId";
402
+ schema: z.ZodOptional<z.ZodString>;
403
+ }>;
404
+ acceptsUndefined: true;
405
+ }> | Readonly<{
406
+ name: string;
407
+ wire: string;
408
+ source: "json";
409
+ codec: Readonly<{
410
+ mode: "strict";
411
+ typeSymbol: "dsh-autotier/types#RoutingMode";
412
+ schema: z.ZodEnum<{
413
+ strong: "strong";
414
+ cheap: "cheap";
415
+ off: "off";
416
+ auto: "auto";
417
+ delegated: "delegated";
418
+ }>;
419
+ }>;
420
+ }>)[];
421
+ readonly result: Readonly<{
422
+ mode: "strict";
423
+ typeSymbol: string;
424
+ schema: z.ZodObject<{
425
+ mode: z.ZodEnum<{
426
+ strong: "strong";
427
+ cheap: "cheap";
428
+ off: "off";
429
+ auto: "auto";
430
+ delegated: "delegated";
431
+ }>;
432
+ tiers: z.ZodObject<{
433
+ strong: z.ZodObject<{
434
+ provider: z.ZodString;
435
+ model: z.ZodString;
436
+ effort: z.ZodOptional<z.ZodEnum<{
437
+ off: "off";
438
+ low: "low";
439
+ high: "high";
440
+ max: "max";
441
+ }>>;
442
+ }, z.core.$strip>;
443
+ cheap: z.ZodObject<{
444
+ provider: z.ZodString;
445
+ model: z.ZodString;
446
+ effort: z.ZodOptional<z.ZodEnum<{
447
+ off: "off";
448
+ low: "low";
449
+ high: "high";
450
+ max: "max";
451
+ }>>;
452
+ }, z.core.$strip>;
453
+ vision: z.ZodObject<{
454
+ provider: z.ZodString;
455
+ model: z.ZodString;
456
+ effort: z.ZodOptional<z.ZodEnum<{
457
+ off: "off";
458
+ low: "low";
459
+ high: "high";
460
+ max: "max";
461
+ }>>;
462
+ }, z.core.$strip>;
463
+ }, z.core.$strip>;
464
+ guard: z.ZodObject<{
465
+ enabled: z.ZodBoolean;
466
+ tiers: z.ZodArray<z.ZodEnum<{
467
+ strong: "strong";
468
+ cheap: "cheap";
469
+ }>>;
470
+ }, z.core.$strip>;
471
+ escalation: z.ZodObject<{
472
+ threshold: z.ZodNumber;
473
+ windowMs: z.ZodNumber;
474
+ ttlMs: z.ZodNumber;
475
+ fallbackTtlMs: z.ZodNumber;
476
+ signature: z.ZodBoolean;
477
+ }, z.core.$strip>;
478
+ session: z.ZodObject<{
479
+ agentId: z.ZodNullable<z.ZodString>;
480
+ override: z.ZodNullable<z.ZodEnum<{
481
+ strong: "strong";
482
+ cheap: "cheap";
483
+ off: "off";
484
+ auto: "auto";
485
+ delegated: "delegated";
486
+ }>>;
487
+ mode: z.ZodEnum<{
488
+ strong: "strong";
489
+ cheap: "cheap";
490
+ off: "off";
491
+ auto: "auto";
492
+ delegated: "delegated";
493
+ }>;
494
+ appliedTier: z.ZodNullable<z.ZodEnum<{
495
+ strong: "strong";
496
+ cheap: "cheap";
497
+ }>>;
498
+ appliedSource: z.ZodNullable<z.ZodEnum<{
499
+ manual: "manual";
500
+ rule: "rule";
501
+ judge: "judge";
502
+ posterior: "posterior";
503
+ "plan-mode": "plan-mode";
504
+ guard: "guard";
505
+ escalation: "escalation";
506
+ fallback: "fallback";
507
+ default: "default";
508
+ }>>;
509
+ escalation: z.ZodBoolean;
510
+ plan: z.ZodBoolean;
511
+ denials: z.ZodNumber;
512
+ }, z.core.$strip>;
513
+ }, z.core.$strip>;
514
+ }>;
515
+ readonly sourceLocation: Readonly<{
516
+ file: "src/wire.ts";
517
+ line: 1;
518
+ column: 1;
519
+ }>;
520
+ }>;
521
+ /**
522
+ * The canonical invocation list both Typert faces register — the host manifest
523
+ * and the client contribution share these exact descriptor objects, so the two
524
+ * wire codecs can never drift apart.
525
+ */
526
+ export declare const TIER_INVOCATIONS: readonly (Readonly<{
527
+ readonly id: "dsh-autotier#tier/status";
528
+ readonly service: "tier";
529
+ readonly namespace: "tier";
530
+ readonly method: "status";
531
+ readonly invocation: Readonly<{
532
+ kind: "direct";
533
+ }>;
534
+ readonly parameters: readonly Readonly<{
535
+ name: string;
536
+ wire: string;
537
+ source: "json";
538
+ codec: Readonly<{
539
+ mode: "strict";
540
+ typeSymbol: "dsh-autotier/wire#TierAgentId";
541
+ schema: z.ZodOptional<z.ZodString>;
542
+ }>;
543
+ acceptsUndefined: true;
544
+ }>[];
545
+ readonly result: Readonly<{
546
+ mode: "strict";
547
+ typeSymbol: string;
548
+ schema: z.ZodObject<{
549
+ mode: z.ZodEnum<{
550
+ strong: "strong";
551
+ cheap: "cheap";
552
+ off: "off";
553
+ auto: "auto";
554
+ delegated: "delegated";
555
+ }>;
556
+ tiers: z.ZodObject<{
557
+ strong: z.ZodObject<{
558
+ provider: z.ZodString;
559
+ model: z.ZodString;
560
+ effort: z.ZodOptional<z.ZodEnum<{
561
+ off: "off";
562
+ low: "low";
563
+ high: "high";
564
+ max: "max";
565
+ }>>;
566
+ }, z.core.$strip>;
567
+ cheap: z.ZodObject<{
568
+ provider: z.ZodString;
569
+ model: z.ZodString;
570
+ effort: z.ZodOptional<z.ZodEnum<{
571
+ off: "off";
572
+ low: "low";
573
+ high: "high";
574
+ max: "max";
575
+ }>>;
576
+ }, z.core.$strip>;
577
+ vision: z.ZodObject<{
578
+ provider: z.ZodString;
579
+ model: z.ZodString;
580
+ effort: z.ZodOptional<z.ZodEnum<{
581
+ off: "off";
582
+ low: "low";
583
+ high: "high";
584
+ max: "max";
585
+ }>>;
586
+ }, z.core.$strip>;
587
+ }, z.core.$strip>;
588
+ guard: z.ZodObject<{
589
+ enabled: z.ZodBoolean;
590
+ tiers: z.ZodArray<z.ZodEnum<{
591
+ strong: "strong";
592
+ cheap: "cheap";
593
+ }>>;
594
+ }, z.core.$strip>;
595
+ escalation: z.ZodObject<{
596
+ threshold: z.ZodNumber;
597
+ windowMs: z.ZodNumber;
598
+ ttlMs: z.ZodNumber;
599
+ fallbackTtlMs: z.ZodNumber;
600
+ signature: z.ZodBoolean;
601
+ }, z.core.$strip>;
602
+ session: z.ZodObject<{
603
+ agentId: z.ZodNullable<z.ZodString>;
604
+ override: z.ZodNullable<z.ZodEnum<{
605
+ strong: "strong";
606
+ cheap: "cheap";
607
+ off: "off";
608
+ auto: "auto";
609
+ delegated: "delegated";
610
+ }>>;
611
+ mode: z.ZodEnum<{
612
+ strong: "strong";
613
+ cheap: "cheap";
614
+ off: "off";
615
+ auto: "auto";
616
+ delegated: "delegated";
617
+ }>;
618
+ appliedTier: z.ZodNullable<z.ZodEnum<{
619
+ strong: "strong";
620
+ cheap: "cheap";
621
+ }>>;
622
+ appliedSource: z.ZodNullable<z.ZodEnum<{
623
+ manual: "manual";
624
+ rule: "rule";
625
+ judge: "judge";
626
+ posterior: "posterior";
627
+ "plan-mode": "plan-mode";
628
+ guard: "guard";
629
+ escalation: "escalation";
630
+ fallback: "fallback";
631
+ default: "default";
632
+ }>>;
633
+ escalation: z.ZodBoolean;
634
+ plan: z.ZodBoolean;
635
+ denials: z.ZodNumber;
636
+ }, z.core.$strip>;
637
+ }, z.core.$strip>;
638
+ }>;
639
+ readonly sourceLocation: Readonly<{
640
+ file: "src/wire.ts";
641
+ line: 1;
642
+ column: 1;
643
+ }>;
644
+ }> | Readonly<{
645
+ readonly id: "dsh-autotier#tier/catalog";
646
+ readonly service: "tier";
647
+ readonly namespace: "tier";
648
+ readonly method: "catalog";
649
+ readonly invocation: Readonly<{
650
+ kind: "direct";
651
+ }>;
652
+ readonly parameters: readonly never[];
653
+ readonly result: Readonly<{
654
+ mode: "strict";
655
+ typeSymbol: "dsh-autotier/wire#TierCatalog";
656
+ schema: z.ZodArray<z.ZodObject<{
657
+ provider: z.ZodString;
658
+ models: z.ZodArray<z.ZodObject<{
659
+ id: z.ZodString;
660
+ name: z.ZodString;
661
+ inputModalities: z.ZodArray<z.ZodString>;
662
+ }, z.core.$strip>>;
663
+ }, z.core.$strip>>;
664
+ }>;
665
+ readonly sourceLocation: Readonly<{
666
+ file: "src/wire.ts";
667
+ line: 1;
668
+ column: 1;
669
+ }>;
670
+ }> | Readonly<{
671
+ readonly id: "dsh-autotier#tier/setMode";
672
+ readonly service: "tier";
673
+ readonly namespace: "tier";
674
+ readonly method: "setMode";
675
+ readonly invocation: Readonly<{
676
+ kind: "direct";
677
+ }>;
678
+ readonly parameters: readonly (Readonly<{
679
+ name: string;
680
+ wire: string;
681
+ source: "json";
682
+ codec: Readonly<{
683
+ mode: "strict";
684
+ typeSymbol: "dsh-autotier/wire#TierAgentId";
685
+ schema: z.ZodOptional<z.ZodString>;
686
+ }>;
687
+ acceptsUndefined: true;
688
+ }> | Readonly<{
689
+ name: string;
690
+ wire: string;
691
+ source: "json";
692
+ codec: Readonly<{
693
+ mode: "strict";
694
+ typeSymbol: "dsh-autotier/types#RoutingMode";
695
+ schema: z.ZodEnum<{
696
+ strong: "strong";
697
+ cheap: "cheap";
698
+ off: "off";
699
+ auto: "auto";
700
+ delegated: "delegated";
701
+ }>;
702
+ }>;
703
+ }>)[];
704
+ readonly result: Readonly<{
705
+ mode: "strict";
706
+ typeSymbol: string;
707
+ schema: z.ZodObject<{
708
+ mode: z.ZodEnum<{
709
+ strong: "strong";
710
+ cheap: "cheap";
711
+ off: "off";
712
+ auto: "auto";
713
+ delegated: "delegated";
714
+ }>;
715
+ tiers: z.ZodObject<{
716
+ strong: z.ZodObject<{
717
+ provider: z.ZodString;
718
+ model: z.ZodString;
719
+ effort: z.ZodOptional<z.ZodEnum<{
720
+ off: "off";
721
+ low: "low";
722
+ high: "high";
723
+ max: "max";
724
+ }>>;
725
+ }, z.core.$strip>;
726
+ cheap: z.ZodObject<{
727
+ provider: z.ZodString;
728
+ model: z.ZodString;
729
+ effort: z.ZodOptional<z.ZodEnum<{
730
+ off: "off";
731
+ low: "low";
732
+ high: "high";
733
+ max: "max";
734
+ }>>;
735
+ }, z.core.$strip>;
736
+ vision: z.ZodObject<{
737
+ provider: z.ZodString;
738
+ model: z.ZodString;
739
+ effort: z.ZodOptional<z.ZodEnum<{
740
+ off: "off";
741
+ low: "low";
742
+ high: "high";
743
+ max: "max";
744
+ }>>;
745
+ }, z.core.$strip>;
746
+ }, z.core.$strip>;
747
+ guard: z.ZodObject<{
748
+ enabled: z.ZodBoolean;
749
+ tiers: z.ZodArray<z.ZodEnum<{
750
+ strong: "strong";
751
+ cheap: "cheap";
752
+ }>>;
753
+ }, z.core.$strip>;
754
+ escalation: z.ZodObject<{
755
+ threshold: z.ZodNumber;
756
+ windowMs: z.ZodNumber;
757
+ ttlMs: z.ZodNumber;
758
+ fallbackTtlMs: z.ZodNumber;
759
+ signature: z.ZodBoolean;
760
+ }, z.core.$strip>;
761
+ session: z.ZodObject<{
762
+ agentId: z.ZodNullable<z.ZodString>;
763
+ override: z.ZodNullable<z.ZodEnum<{
764
+ strong: "strong";
765
+ cheap: "cheap";
766
+ off: "off";
767
+ auto: "auto";
768
+ delegated: "delegated";
769
+ }>>;
770
+ mode: z.ZodEnum<{
771
+ strong: "strong";
772
+ cheap: "cheap";
773
+ off: "off";
774
+ auto: "auto";
775
+ delegated: "delegated";
776
+ }>;
777
+ appliedTier: z.ZodNullable<z.ZodEnum<{
778
+ strong: "strong";
779
+ cheap: "cheap";
780
+ }>>;
781
+ appliedSource: z.ZodNullable<z.ZodEnum<{
782
+ manual: "manual";
783
+ rule: "rule";
784
+ judge: "judge";
785
+ posterior: "posterior";
786
+ "plan-mode": "plan-mode";
787
+ guard: "guard";
788
+ escalation: "escalation";
789
+ fallback: "fallback";
790
+ default: "default";
791
+ }>>;
792
+ escalation: z.ZodBoolean;
793
+ plan: z.ZodBoolean;
794
+ denials: z.ZodNumber;
795
+ }, z.core.$strip>;
796
+ }, z.core.$strip>;
797
+ }>;
798
+ readonly sourceLocation: Readonly<{
799
+ file: "src/wire.ts";
800
+ line: 1;
801
+ column: 1;
802
+ }>;
803
+ }>)[];
804
+ //# sourceMappingURL=wire.d.ts.map