dsh-budget 0.1.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 (58) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +201 -0
  3. package/README.es.md +140 -0
  4. package/README.hi.md +140 -0
  5. package/README.md +140 -0
  6. package/README.pt.md +140 -0
  7. package/README.zh.md +140 -0
  8. package/SECURITY.md +37 -0
  9. package/THIRD_PARTY_NOTICES.md +23 -0
  10. package/cordis.patch.yml +73 -0
  11. package/lib/client.js +4893 -0
  12. package/lib/client.js.map +1 -0
  13. package/lib/index.js +1225 -0
  14. package/lib/typert.host.js +26 -0
  15. package/lib/types/aggregate/usage.d.ts +112 -0
  16. package/lib/types/aggregate/usage.d.ts.map +1 -0
  17. package/lib/types/client/BudgetTab.d.ts +18 -0
  18. package/lib/types/client/BudgetTab.d.ts.map +1 -0
  19. package/lib/types/client/index.d.ts +35 -0
  20. package/lib/types/client/index.d.ts.map +1 -0
  21. package/lib/types/client/locales.d.ts +42 -0
  22. package/lib/types/client/locales.d.ts.map +1 -0
  23. package/lib/types/client/present.d.ts +19 -0
  24. package/lib/types/client/present.d.ts.map +1 -0
  25. package/lib/types/client/remote.d.ts +270 -0
  26. package/lib/types/client/remote.d.ts.map +1 -0
  27. package/lib/types/client/styles.d.ts +12 -0
  28. package/lib/types/client/styles.d.ts.map +1 -0
  29. package/lib/types/command.d.ts +51 -0
  30. package/lib/types/command.d.ts.map +1 -0
  31. package/lib/types/config.d.ts +132 -0
  32. package/lib/types/config.d.ts.map +1 -0
  33. package/lib/types/estimate/carbon.d.ts +128 -0
  34. package/lib/types/estimate/carbon.d.ts.map +1 -0
  35. package/lib/types/estimate/cost.d.ts +71 -0
  36. package/lib/types/estimate/cost.d.ts.map +1 -0
  37. package/lib/types/estimate/latency-stats.d.ts +111 -0
  38. package/lib/types/estimate/latency-stats.d.ts.map +1 -0
  39. package/lib/types/estimate/models.d.ts +29 -0
  40. package/lib/types/estimate/models.d.ts.map +1 -0
  41. package/lib/types/estimate/prices.d.ts +85 -0
  42. package/lib/types/estimate/prices.d.ts.map +1 -0
  43. package/lib/types/estimate/sanitize.d.ts +56 -0
  44. package/lib/types/estimate/sanitize.d.ts.map +1 -0
  45. package/lib/types/events.d.ts +57 -0
  46. package/lib/types/events.d.ts.map +1 -0
  47. package/lib/types/governance.d.ts +67 -0
  48. package/lib/types/governance.d.ts.map +1 -0
  49. package/lib/types/index.d.ts +50 -0
  50. package/lib/types/index.d.ts.map +1 -0
  51. package/lib/types/service.d.ts +67 -0
  52. package/lib/types/service.d.ts.map +1 -0
  53. package/lib/types/typert.host.d.ts +258 -0
  54. package/lib/types/typert.host.d.ts.map +1 -0
  55. package/lib/types/wire.d.ts +629 -0
  56. package/lib/types/wire.d.ts.map +1 -0
  57. package/lib/wire-DVO8yw7L.js +4219 -0
  58. package/package.json +164 -0
@@ -0,0 +1,629 @@
1
+ /**
2
+ * The `budget` Remote wire vocabulary: the status/setSettings/unblock
3
+ * payload types, their zod v4 validation schemas (the strict codecs both
4
+ * Typert faces carry), and the invocation descriptors shared verbatim by the
5
+ * host `./typert` manifest (`src/typert.host.ts`) and the client Remote
6
+ * contribution (`src/client/remote.ts`). One canonical source keeps the two
7
+ * codecs from ever drifting apart.
8
+ *
9
+ * @module dsh-budget/wire
10
+ */
11
+ import { z } from 'zod';
12
+ /** The scopes a budget cap applies to. */
13
+ export declare const BUDGET_SCOPES: readonly ["session", "daily", "monthly"];
14
+ export type BudgetScope = (typeof BUDGET_SCOPES)[number];
15
+ /** One scope's usage line in the panel snapshot. */
16
+ export interface ScopeLine {
17
+ scope: BudgetScope;
18
+ /** Cap in USD; null = unlimited. */
19
+ capUsd: number | null;
20
+ usedUsd: number;
21
+ /** usedUsd / capUsd; 0 when unlimited. */
22
+ ratio: number;
23
+ tokens: number;
24
+ carbonKg: number;
25
+ }
26
+ /** One model's usage line (today), cost-sorted. */
27
+ export interface ModelLine {
28
+ provider: string;
29
+ model: string;
30
+ inputTokens: number;
31
+ outputTokens: number;
32
+ costUsd: number;
33
+ carbonKg: number;
34
+ /** Latency percentiles over the kept window (ms). */
35
+ latency: {
36
+ min: number | null;
37
+ p50: number | null;
38
+ p95: number | null;
39
+ max: number | null;
40
+ samples: number;
41
+ };
42
+ }
43
+ /** One recent threshold alert (newest first). */
44
+ export interface AlertLine {
45
+ scope: BudgetScope;
46
+ kind: 'warn' | 'over';
47
+ at: number;
48
+ usedUsd: number;
49
+ capUsd: number;
50
+ }
51
+ /** The full panel snapshot served by `budget/status`. */
52
+ export interface BudgetStatus {
53
+ scopes: ScopeLine[];
54
+ models: ModelLine[];
55
+ alerts: AlertLine[];
56
+ blockedScopes: BudgetScope[];
57
+ currency: {
58
+ code: string;
59
+ rate: number;
60
+ decimals: number;
61
+ };
62
+ alertsEnabled: boolean;
63
+ desktopNotifications: boolean;
64
+ /** Degradation target for the current model, when a cap blocked it. */
65
+ degradedModel: string | null;
66
+ }
67
+ /** Strict wire schema for {@link BudgetStatus} (zod v4, both Typert faces). */
68
+ export declare const BUDGET_STATUS_SCHEMA: z.ZodObject<{
69
+ scopes: z.ZodArray<z.ZodObject<{
70
+ scope: z.ZodEnum<{
71
+ session: "session";
72
+ daily: "daily";
73
+ monthly: "monthly";
74
+ }>;
75
+ capUsd: z.ZodNullable<z.ZodNumber>;
76
+ usedUsd: z.ZodNumber;
77
+ ratio: z.ZodNumber;
78
+ tokens: z.ZodNumber;
79
+ carbonKg: z.ZodNumber;
80
+ }, z.core.$strip>>;
81
+ models: z.ZodArray<z.ZodObject<{
82
+ provider: z.ZodString;
83
+ model: z.ZodString;
84
+ inputTokens: z.ZodNumber;
85
+ outputTokens: z.ZodNumber;
86
+ costUsd: z.ZodNumber;
87
+ carbonKg: z.ZodNumber;
88
+ latency: z.ZodObject<{
89
+ min: z.ZodNullable<z.ZodNumber>;
90
+ p50: z.ZodNullable<z.ZodNumber>;
91
+ p95: z.ZodNullable<z.ZodNumber>;
92
+ max: z.ZodNullable<z.ZodNumber>;
93
+ samples: z.ZodNumber;
94
+ }, z.core.$strip>;
95
+ }, z.core.$strip>>;
96
+ alerts: z.ZodArray<z.ZodObject<{
97
+ scope: z.ZodEnum<{
98
+ session: "session";
99
+ daily: "daily";
100
+ monthly: "monthly";
101
+ }>;
102
+ kind: z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"over">]>;
103
+ at: z.ZodNumber;
104
+ usedUsd: z.ZodNumber;
105
+ capUsd: z.ZodNumber;
106
+ }, z.core.$strip>>;
107
+ blockedScopes: z.ZodArray<z.ZodEnum<{
108
+ session: "session";
109
+ daily: "daily";
110
+ monthly: "monthly";
111
+ }>>;
112
+ currency: z.ZodObject<{
113
+ code: z.ZodString;
114
+ rate: z.ZodNumber;
115
+ decimals: z.ZodNumber;
116
+ }, z.core.$strip>;
117
+ alertsEnabled: z.ZodBoolean;
118
+ desktopNotifications: z.ZodBoolean;
119
+ degradedModel: z.ZodNullable<z.ZodString>;
120
+ }, z.core.$strip>;
121
+ /**
122
+ * The `budget/status` invocation descriptor, shared verbatim by the host
123
+ * `TYPERT` manifest and the client `TypertRemoteContribution`. Hand-written
124
+ * in the exact shape the Typert generator emits; validated by the typert
125
+ * loader and the client registry at mount time.
126
+ */
127
+ export declare const BUDGET_STATUS_DESCRIPTOR: Readonly<{
128
+ readonly id: "dsh-budget#budget/status";
129
+ readonly service: "budget";
130
+ readonly namespace: "budget";
131
+ readonly method: "status";
132
+ readonly invocation: Readonly<{
133
+ kind: "direct";
134
+ }>;
135
+ readonly parameters: readonly never[];
136
+ readonly result: Readonly<{
137
+ mode: "strict";
138
+ typeSymbol: "dsh-budget/types#BudgetStatus";
139
+ schema: z.ZodObject<{
140
+ scopes: z.ZodArray<z.ZodObject<{
141
+ scope: z.ZodEnum<{
142
+ session: "session";
143
+ daily: "daily";
144
+ monthly: "monthly";
145
+ }>;
146
+ capUsd: z.ZodNullable<z.ZodNumber>;
147
+ usedUsd: z.ZodNumber;
148
+ ratio: z.ZodNumber;
149
+ tokens: z.ZodNumber;
150
+ carbonKg: z.ZodNumber;
151
+ }, z.core.$strip>>;
152
+ models: z.ZodArray<z.ZodObject<{
153
+ provider: z.ZodString;
154
+ model: z.ZodString;
155
+ inputTokens: z.ZodNumber;
156
+ outputTokens: z.ZodNumber;
157
+ costUsd: z.ZodNumber;
158
+ carbonKg: z.ZodNumber;
159
+ latency: z.ZodObject<{
160
+ min: z.ZodNullable<z.ZodNumber>;
161
+ p50: z.ZodNullable<z.ZodNumber>;
162
+ p95: z.ZodNullable<z.ZodNumber>;
163
+ max: z.ZodNullable<z.ZodNumber>;
164
+ samples: z.ZodNumber;
165
+ }, z.core.$strip>;
166
+ }, z.core.$strip>>;
167
+ alerts: z.ZodArray<z.ZodObject<{
168
+ scope: z.ZodEnum<{
169
+ session: "session";
170
+ daily: "daily";
171
+ monthly: "monthly";
172
+ }>;
173
+ kind: z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"over">]>;
174
+ at: z.ZodNumber;
175
+ usedUsd: z.ZodNumber;
176
+ capUsd: z.ZodNumber;
177
+ }, z.core.$strip>>;
178
+ blockedScopes: z.ZodArray<z.ZodEnum<{
179
+ session: "session";
180
+ daily: "daily";
181
+ monthly: "monthly";
182
+ }>>;
183
+ currency: z.ZodObject<{
184
+ code: z.ZodString;
185
+ rate: z.ZodNumber;
186
+ decimals: z.ZodNumber;
187
+ }, z.core.$strip>;
188
+ alertsEnabled: z.ZodBoolean;
189
+ desktopNotifications: z.ZodBoolean;
190
+ degradedModel: z.ZodNullable<z.ZodString>;
191
+ }, z.core.$strip>;
192
+ }>;
193
+ readonly sourceLocation: Readonly<{
194
+ file: "src/wire.ts";
195
+ line: 1;
196
+ column: 1;
197
+ }>;
198
+ }>;
199
+ /** Strict wire schema for the runtime settings payload. */
200
+ export declare const BUDGET_SETTINGS_SCHEMA: z.ZodObject<{
201
+ sessionCapUsd: z.ZodNullable<z.ZodNumber>;
202
+ dailyCapUsd: z.ZodNullable<z.ZodNumber>;
203
+ monthlyCapUsd: z.ZodNullable<z.ZodNumber>;
204
+ alertsEnabled: z.ZodBoolean;
205
+ desktopNotifications: z.ZodBoolean;
206
+ }, z.core.$strip>;
207
+ /**
208
+ * The `budget/setSettings` invocation descriptor: the panel edits the
209
+ * runtime budget caps and alert switches (session-scoped runtime state, not
210
+ * a config-file write — a reload restores the cordis.yml values).
211
+ */
212
+ export declare const BUDGET_SET_SETTINGS_DESCRIPTOR: Readonly<{
213
+ readonly id: "dsh-budget#budget/setSettings";
214
+ readonly service: "budget";
215
+ readonly namespace: "budget";
216
+ readonly method: "setSettings";
217
+ readonly invocation: Readonly<{
218
+ kind: "direct";
219
+ }>;
220
+ readonly parameters: readonly Readonly<{
221
+ name: string;
222
+ wire: string;
223
+ source: "json";
224
+ codec: Readonly<{
225
+ mode: "strict";
226
+ typeSymbol: "dsh-budget/types#BudgetSettingsJson";
227
+ schema: z.ZodString;
228
+ }>;
229
+ }>[];
230
+ readonly result: Readonly<{
231
+ mode: "strict";
232
+ typeSymbol: "dsh-budget/types#BudgetStatus";
233
+ schema: z.ZodObject<{
234
+ scopes: z.ZodArray<z.ZodObject<{
235
+ scope: z.ZodEnum<{
236
+ session: "session";
237
+ daily: "daily";
238
+ monthly: "monthly";
239
+ }>;
240
+ capUsd: z.ZodNullable<z.ZodNumber>;
241
+ usedUsd: z.ZodNumber;
242
+ ratio: z.ZodNumber;
243
+ tokens: z.ZodNumber;
244
+ carbonKg: z.ZodNumber;
245
+ }, z.core.$strip>>;
246
+ models: z.ZodArray<z.ZodObject<{
247
+ provider: z.ZodString;
248
+ model: z.ZodString;
249
+ inputTokens: z.ZodNumber;
250
+ outputTokens: z.ZodNumber;
251
+ costUsd: z.ZodNumber;
252
+ carbonKg: z.ZodNumber;
253
+ latency: z.ZodObject<{
254
+ min: z.ZodNullable<z.ZodNumber>;
255
+ p50: z.ZodNullable<z.ZodNumber>;
256
+ p95: z.ZodNullable<z.ZodNumber>;
257
+ max: z.ZodNullable<z.ZodNumber>;
258
+ samples: z.ZodNumber;
259
+ }, z.core.$strip>;
260
+ }, z.core.$strip>>;
261
+ alerts: z.ZodArray<z.ZodObject<{
262
+ scope: z.ZodEnum<{
263
+ session: "session";
264
+ daily: "daily";
265
+ monthly: "monthly";
266
+ }>;
267
+ kind: z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"over">]>;
268
+ at: z.ZodNumber;
269
+ usedUsd: z.ZodNumber;
270
+ capUsd: z.ZodNumber;
271
+ }, z.core.$strip>>;
272
+ blockedScopes: z.ZodArray<z.ZodEnum<{
273
+ session: "session";
274
+ daily: "daily";
275
+ monthly: "monthly";
276
+ }>>;
277
+ currency: z.ZodObject<{
278
+ code: z.ZodString;
279
+ rate: z.ZodNumber;
280
+ decimals: z.ZodNumber;
281
+ }, z.core.$strip>;
282
+ alertsEnabled: z.ZodBoolean;
283
+ desktopNotifications: z.ZodBoolean;
284
+ degradedModel: z.ZodNullable<z.ZodString>;
285
+ }, z.core.$strip>;
286
+ }>;
287
+ readonly sourceLocation: Readonly<{
288
+ file: "src/wire.ts";
289
+ line: 1;
290
+ column: 1;
291
+ }>;
292
+ }>;
293
+ /** Strict wire schema for the unblock request scope. */
294
+ export declare const BUDGET_UNBLOCK_SCOPE_SCHEMA: z.ZodEnum<{
295
+ session: "session";
296
+ daily: "daily";
297
+ monthly: "monthly";
298
+ }>;
299
+ /**
300
+ * The `budget/unblock` invocation descriptor: lift one blocked scope after
301
+ * the user confirms (panel or `/budget unblock <scope>`).
302
+ */
303
+ export declare const BUDGET_UNBLOCK_DESCRIPTOR: Readonly<{
304
+ readonly id: "dsh-budget#budget/unblock";
305
+ readonly service: "budget";
306
+ readonly namespace: "budget";
307
+ readonly method: "unblock";
308
+ readonly invocation: Readonly<{
309
+ kind: "direct";
310
+ }>;
311
+ readonly parameters: readonly Readonly<{
312
+ name: string;
313
+ wire: string;
314
+ source: "json";
315
+ codec: Readonly<{
316
+ mode: "strict";
317
+ typeSymbol: "dsh-budget/types#BudgetUnblockScope";
318
+ schema: z.ZodEnum<{
319
+ session: "session";
320
+ daily: "daily";
321
+ monthly: "monthly";
322
+ }>;
323
+ }>;
324
+ }>[];
325
+ readonly result: Readonly<{
326
+ mode: "strict";
327
+ typeSymbol: "dsh-budget/types#BudgetStatus";
328
+ schema: z.ZodObject<{
329
+ scopes: z.ZodArray<z.ZodObject<{
330
+ scope: z.ZodEnum<{
331
+ session: "session";
332
+ daily: "daily";
333
+ monthly: "monthly";
334
+ }>;
335
+ capUsd: z.ZodNullable<z.ZodNumber>;
336
+ usedUsd: z.ZodNumber;
337
+ ratio: z.ZodNumber;
338
+ tokens: z.ZodNumber;
339
+ carbonKg: z.ZodNumber;
340
+ }, z.core.$strip>>;
341
+ models: z.ZodArray<z.ZodObject<{
342
+ provider: z.ZodString;
343
+ model: z.ZodString;
344
+ inputTokens: z.ZodNumber;
345
+ outputTokens: z.ZodNumber;
346
+ costUsd: z.ZodNumber;
347
+ carbonKg: z.ZodNumber;
348
+ latency: z.ZodObject<{
349
+ min: z.ZodNullable<z.ZodNumber>;
350
+ p50: z.ZodNullable<z.ZodNumber>;
351
+ p95: z.ZodNullable<z.ZodNumber>;
352
+ max: z.ZodNullable<z.ZodNumber>;
353
+ samples: z.ZodNumber;
354
+ }, z.core.$strip>;
355
+ }, z.core.$strip>>;
356
+ alerts: z.ZodArray<z.ZodObject<{
357
+ scope: z.ZodEnum<{
358
+ session: "session";
359
+ daily: "daily";
360
+ monthly: "monthly";
361
+ }>;
362
+ kind: z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"over">]>;
363
+ at: z.ZodNumber;
364
+ usedUsd: z.ZodNumber;
365
+ capUsd: z.ZodNumber;
366
+ }, z.core.$strip>>;
367
+ blockedScopes: z.ZodArray<z.ZodEnum<{
368
+ session: "session";
369
+ daily: "daily";
370
+ monthly: "monthly";
371
+ }>>;
372
+ currency: z.ZodObject<{
373
+ code: z.ZodString;
374
+ rate: z.ZodNumber;
375
+ decimals: z.ZodNumber;
376
+ }, z.core.$strip>;
377
+ alertsEnabled: z.ZodBoolean;
378
+ desktopNotifications: z.ZodBoolean;
379
+ degradedModel: z.ZodNullable<z.ZodString>;
380
+ }, z.core.$strip>;
381
+ }>;
382
+ readonly sourceLocation: Readonly<{
383
+ file: "src/wire.ts";
384
+ line: 1;
385
+ column: 1;
386
+ }>;
387
+ }>;
388
+ /**
389
+ * The canonical invocation list both Typert faces register — the host
390
+ * manifest and the client contribution share these exact descriptor objects,
391
+ * so the two wire codecs can never drift apart.
392
+ */
393
+ export declare const BUDGET_INVOCATIONS: readonly (Readonly<{
394
+ readonly id: "dsh-budget#budget/status";
395
+ readonly service: "budget";
396
+ readonly namespace: "budget";
397
+ readonly method: "status";
398
+ readonly invocation: Readonly<{
399
+ kind: "direct";
400
+ }>;
401
+ readonly parameters: readonly never[];
402
+ readonly result: Readonly<{
403
+ mode: "strict";
404
+ typeSymbol: "dsh-budget/types#BudgetStatus";
405
+ schema: z.ZodObject<{
406
+ scopes: z.ZodArray<z.ZodObject<{
407
+ scope: z.ZodEnum<{
408
+ session: "session";
409
+ daily: "daily";
410
+ monthly: "monthly";
411
+ }>;
412
+ capUsd: z.ZodNullable<z.ZodNumber>;
413
+ usedUsd: z.ZodNumber;
414
+ ratio: z.ZodNumber;
415
+ tokens: z.ZodNumber;
416
+ carbonKg: z.ZodNumber;
417
+ }, z.core.$strip>>;
418
+ models: z.ZodArray<z.ZodObject<{
419
+ provider: z.ZodString;
420
+ model: z.ZodString;
421
+ inputTokens: z.ZodNumber;
422
+ outputTokens: z.ZodNumber;
423
+ costUsd: z.ZodNumber;
424
+ carbonKg: z.ZodNumber;
425
+ latency: z.ZodObject<{
426
+ min: z.ZodNullable<z.ZodNumber>;
427
+ p50: z.ZodNullable<z.ZodNumber>;
428
+ p95: z.ZodNullable<z.ZodNumber>;
429
+ max: z.ZodNullable<z.ZodNumber>;
430
+ samples: z.ZodNumber;
431
+ }, z.core.$strip>;
432
+ }, z.core.$strip>>;
433
+ alerts: z.ZodArray<z.ZodObject<{
434
+ scope: z.ZodEnum<{
435
+ session: "session";
436
+ daily: "daily";
437
+ monthly: "monthly";
438
+ }>;
439
+ kind: z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"over">]>;
440
+ at: z.ZodNumber;
441
+ usedUsd: z.ZodNumber;
442
+ capUsd: z.ZodNumber;
443
+ }, z.core.$strip>>;
444
+ blockedScopes: z.ZodArray<z.ZodEnum<{
445
+ session: "session";
446
+ daily: "daily";
447
+ monthly: "monthly";
448
+ }>>;
449
+ currency: z.ZodObject<{
450
+ code: z.ZodString;
451
+ rate: z.ZodNumber;
452
+ decimals: z.ZodNumber;
453
+ }, z.core.$strip>;
454
+ alertsEnabled: z.ZodBoolean;
455
+ desktopNotifications: z.ZodBoolean;
456
+ degradedModel: z.ZodNullable<z.ZodString>;
457
+ }, z.core.$strip>;
458
+ }>;
459
+ readonly sourceLocation: Readonly<{
460
+ file: "src/wire.ts";
461
+ line: 1;
462
+ column: 1;
463
+ }>;
464
+ }> | Readonly<{
465
+ readonly id: "dsh-budget#budget/setSettings";
466
+ readonly service: "budget";
467
+ readonly namespace: "budget";
468
+ readonly method: "setSettings";
469
+ readonly invocation: Readonly<{
470
+ kind: "direct";
471
+ }>;
472
+ readonly parameters: readonly Readonly<{
473
+ name: string;
474
+ wire: string;
475
+ source: "json";
476
+ codec: Readonly<{
477
+ mode: "strict";
478
+ typeSymbol: "dsh-budget/types#BudgetSettingsJson";
479
+ schema: z.ZodString;
480
+ }>;
481
+ }>[];
482
+ readonly result: Readonly<{
483
+ mode: "strict";
484
+ typeSymbol: "dsh-budget/types#BudgetStatus";
485
+ schema: z.ZodObject<{
486
+ scopes: z.ZodArray<z.ZodObject<{
487
+ scope: z.ZodEnum<{
488
+ session: "session";
489
+ daily: "daily";
490
+ monthly: "monthly";
491
+ }>;
492
+ capUsd: z.ZodNullable<z.ZodNumber>;
493
+ usedUsd: z.ZodNumber;
494
+ ratio: z.ZodNumber;
495
+ tokens: z.ZodNumber;
496
+ carbonKg: z.ZodNumber;
497
+ }, z.core.$strip>>;
498
+ models: z.ZodArray<z.ZodObject<{
499
+ provider: z.ZodString;
500
+ model: z.ZodString;
501
+ inputTokens: z.ZodNumber;
502
+ outputTokens: z.ZodNumber;
503
+ costUsd: z.ZodNumber;
504
+ carbonKg: z.ZodNumber;
505
+ latency: z.ZodObject<{
506
+ min: z.ZodNullable<z.ZodNumber>;
507
+ p50: z.ZodNullable<z.ZodNumber>;
508
+ p95: z.ZodNullable<z.ZodNumber>;
509
+ max: z.ZodNullable<z.ZodNumber>;
510
+ samples: z.ZodNumber;
511
+ }, z.core.$strip>;
512
+ }, z.core.$strip>>;
513
+ alerts: z.ZodArray<z.ZodObject<{
514
+ scope: z.ZodEnum<{
515
+ session: "session";
516
+ daily: "daily";
517
+ monthly: "monthly";
518
+ }>;
519
+ kind: z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"over">]>;
520
+ at: z.ZodNumber;
521
+ usedUsd: z.ZodNumber;
522
+ capUsd: z.ZodNumber;
523
+ }, z.core.$strip>>;
524
+ blockedScopes: z.ZodArray<z.ZodEnum<{
525
+ session: "session";
526
+ daily: "daily";
527
+ monthly: "monthly";
528
+ }>>;
529
+ currency: z.ZodObject<{
530
+ code: z.ZodString;
531
+ rate: z.ZodNumber;
532
+ decimals: z.ZodNumber;
533
+ }, z.core.$strip>;
534
+ alertsEnabled: z.ZodBoolean;
535
+ desktopNotifications: z.ZodBoolean;
536
+ degradedModel: z.ZodNullable<z.ZodString>;
537
+ }, z.core.$strip>;
538
+ }>;
539
+ readonly sourceLocation: Readonly<{
540
+ file: "src/wire.ts";
541
+ line: 1;
542
+ column: 1;
543
+ }>;
544
+ }> | Readonly<{
545
+ readonly id: "dsh-budget#budget/unblock";
546
+ readonly service: "budget";
547
+ readonly namespace: "budget";
548
+ readonly method: "unblock";
549
+ readonly invocation: Readonly<{
550
+ kind: "direct";
551
+ }>;
552
+ readonly parameters: readonly Readonly<{
553
+ name: string;
554
+ wire: string;
555
+ source: "json";
556
+ codec: Readonly<{
557
+ mode: "strict";
558
+ typeSymbol: "dsh-budget/types#BudgetUnblockScope";
559
+ schema: z.ZodEnum<{
560
+ session: "session";
561
+ daily: "daily";
562
+ monthly: "monthly";
563
+ }>;
564
+ }>;
565
+ }>[];
566
+ readonly result: Readonly<{
567
+ mode: "strict";
568
+ typeSymbol: "dsh-budget/types#BudgetStatus";
569
+ schema: z.ZodObject<{
570
+ scopes: z.ZodArray<z.ZodObject<{
571
+ scope: z.ZodEnum<{
572
+ session: "session";
573
+ daily: "daily";
574
+ monthly: "monthly";
575
+ }>;
576
+ capUsd: z.ZodNullable<z.ZodNumber>;
577
+ usedUsd: z.ZodNumber;
578
+ ratio: z.ZodNumber;
579
+ tokens: z.ZodNumber;
580
+ carbonKg: z.ZodNumber;
581
+ }, z.core.$strip>>;
582
+ models: z.ZodArray<z.ZodObject<{
583
+ provider: z.ZodString;
584
+ model: z.ZodString;
585
+ inputTokens: z.ZodNumber;
586
+ outputTokens: z.ZodNumber;
587
+ costUsd: z.ZodNumber;
588
+ carbonKg: z.ZodNumber;
589
+ latency: z.ZodObject<{
590
+ min: z.ZodNullable<z.ZodNumber>;
591
+ p50: z.ZodNullable<z.ZodNumber>;
592
+ p95: z.ZodNullable<z.ZodNumber>;
593
+ max: z.ZodNullable<z.ZodNumber>;
594
+ samples: z.ZodNumber;
595
+ }, z.core.$strip>;
596
+ }, z.core.$strip>>;
597
+ alerts: z.ZodArray<z.ZodObject<{
598
+ scope: z.ZodEnum<{
599
+ session: "session";
600
+ daily: "daily";
601
+ monthly: "monthly";
602
+ }>;
603
+ kind: z.ZodUnion<readonly [z.ZodLiteral<"warn">, z.ZodLiteral<"over">]>;
604
+ at: z.ZodNumber;
605
+ usedUsd: z.ZodNumber;
606
+ capUsd: z.ZodNumber;
607
+ }, z.core.$strip>>;
608
+ blockedScopes: z.ZodArray<z.ZodEnum<{
609
+ session: "session";
610
+ daily: "daily";
611
+ monthly: "monthly";
612
+ }>>;
613
+ currency: z.ZodObject<{
614
+ code: z.ZodString;
615
+ rate: z.ZodNumber;
616
+ decimals: z.ZodNumber;
617
+ }, z.core.$strip>;
618
+ alertsEnabled: z.ZodBoolean;
619
+ desktopNotifications: z.ZodBoolean;
620
+ degradedModel: z.ZodNullable<z.ZodString>;
621
+ }, z.core.$strip>;
622
+ }>;
623
+ readonly sourceLocation: Readonly<{
624
+ file: "src/wire.ts";
625
+ line: 1;
626
+ column: 1;
627
+ }>;
628
+ }>)[];
629
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,0CAA0C;AAC1C,eAAO,MAAM,aAAa,0CAA2C,CAAA;AACrE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAExD,oDAAoD;AACpD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,WAAW,CAAA;IAClB,oCAAoC;IACpC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,mDAAmD;AACnD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,qDAAqD;IACrD,OAAO,EAAE;QAAE,GAAG,EAAE,MA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