@kya-os/checkpoint-shared 1.1.0 → 1.2.1

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 (38) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/beacon-types/index.d.mts +427 -0
  3. package/dist/beacon-types/index.d.ts +427 -0
  4. package/dist/beacon-types/index.js +204 -0
  5. package/dist/beacon-types/index.mjs +191 -0
  6. package/dist/deploy/index.d.mts +380 -0
  7. package/dist/deploy/index.d.ts +380 -0
  8. package/dist/deploy/index.js +221 -0
  9. package/dist/deploy/index.mjs +207 -0
  10. package/dist/gateway/index.d.mts +575 -0
  11. package/dist/gateway/index.d.ts +575 -0
  12. package/dist/gateway/index.js +98 -0
  13. package/dist/gateway/index.mjs +88 -0
  14. package/dist/index.d.mts +1471 -106
  15. package/dist/index.d.ts +1471 -106
  16. package/dist/index.js +1869 -1029
  17. package/dist/index.mjs +1826 -1028
  18. package/dist/mcpi/agentshield-api/index.d.mts +47 -0
  19. package/dist/mcpi/agentshield-api/index.d.ts +47 -0
  20. package/dist/mcpi/agentshield-api/index.js +2 -0
  21. package/dist/mcpi/agentshield-api/index.mjs +1 -0
  22. package/dist/mcpi/approval-grant/index.d.mts +79 -0
  23. package/dist/mcpi/approval-grant/index.d.ts +79 -0
  24. package/dist/mcpi/approval-grant/index.js +157 -0
  25. package/dist/mcpi/approval-grant/index.mjs +150 -0
  26. package/dist/mcpi/dashboard-config/index.d.mts +14075 -0
  27. package/dist/mcpi/dashboard-config/index.d.ts +14075 -0
  28. package/dist/mcpi/dashboard-config/index.js +517 -0
  29. package/dist/mcpi/dashboard-config/index.mjs +492 -0
  30. package/dist/test-fixtures/index.d.mts +17 -8
  31. package/dist/test-fixtures/index.d.ts +17 -8
  32. package/dist/test-fixtures/index.js +73 -7
  33. package/dist/test-fixtures/index.mjs +73 -8
  34. package/dist/tool-protection/index.d.mts +1120 -0
  35. package/dist/tool-protection/index.d.ts +1120 -0
  36. package/dist/tool-protection/index.js +370 -0
  37. package/dist/tool-protection/index.mjs +338 -0
  38. package/package.json +40 -3
@@ -0,0 +1,575 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const skillRequirementsSchema: z.ZodObject<{
4
+ bins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5
+ envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6
+ configs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7
+ os: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ bins?: string[] | undefined;
10
+ envs?: string[] | undefined;
11
+ configs?: string[] | undefined;
12
+ os?: string[] | undefined;
13
+ }, {
14
+ bins?: string[] | undefined;
15
+ envs?: string[] | undefined;
16
+ configs?: string[] | undefined;
17
+ os?: string[] | undefined;
18
+ }>;
19
+ type SkillRequirements = z.infer<typeof skillRequirementsSchema>;
20
+ declare const skillConfigCheckSchema: z.ZodObject<{
21
+ path: z.ZodString;
22
+ label: z.ZodOptional<z.ZodString>;
23
+ satisfied: z.ZodBoolean;
24
+ }, "strip", z.ZodTypeAny, {
25
+ path: string;
26
+ satisfied: boolean;
27
+ label?: string | undefined;
28
+ }, {
29
+ path: string;
30
+ satisfied: boolean;
31
+ label?: string | undefined;
32
+ }>;
33
+ type SkillConfigCheck = z.infer<typeof skillConfigCheckSchema>;
34
+ declare const skillInstallOptionSchema: z.ZodObject<{
35
+ id: z.ZodString;
36
+ kind: z.ZodEnum<["brew", "node", "go", "uv", "download"]>;
37
+ label: z.ZodString;
38
+ bins: z.ZodArray<z.ZodString, "many">;
39
+ }, "strip", z.ZodTypeAny, {
40
+ bins: string[];
41
+ label: string;
42
+ id: string;
43
+ kind: "brew" | "node" | "go" | "uv" | "download";
44
+ }, {
45
+ bins: string[];
46
+ label: string;
47
+ id: string;
48
+ kind: "brew" | "node" | "go" | "uv" | "download";
49
+ }>;
50
+ type SkillInstallOption = z.infer<typeof skillInstallOptionSchema>;
51
+ declare const skillStatusEntrySchema: z.ZodObject<{
52
+ name: z.ZodString;
53
+ description: z.ZodString;
54
+ source: z.ZodString;
55
+ bundled: z.ZodBoolean;
56
+ filePath: z.ZodString;
57
+ baseDir: z.ZodString;
58
+ skillKey: z.ZodString;
59
+ primaryEnv: z.ZodOptional<z.ZodString>;
60
+ emoji: z.ZodOptional<z.ZodString>;
61
+ homepage: z.ZodOptional<z.ZodString>;
62
+ always: z.ZodBoolean;
63
+ disabled: z.ZodBoolean;
64
+ blockedByAllowlist: z.ZodBoolean;
65
+ eligible: z.ZodBoolean;
66
+ requirements: z.ZodObject<{
67
+ bins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
68
+ envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
69
+ configs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
70
+ os: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ bins?: string[] | undefined;
73
+ envs?: string[] | undefined;
74
+ configs?: string[] | undefined;
75
+ os?: string[] | undefined;
76
+ }, {
77
+ bins?: string[] | undefined;
78
+ envs?: string[] | undefined;
79
+ configs?: string[] | undefined;
80
+ os?: string[] | undefined;
81
+ }>;
82
+ missing: z.ZodObject<{
83
+ bins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
84
+ envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
85
+ configs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
+ os: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ bins?: string[] | undefined;
89
+ envs?: string[] | undefined;
90
+ configs?: string[] | undefined;
91
+ os?: string[] | undefined;
92
+ }, {
93
+ bins?: string[] | undefined;
94
+ envs?: string[] | undefined;
95
+ configs?: string[] | undefined;
96
+ os?: string[] | undefined;
97
+ }>;
98
+ configChecks: z.ZodArray<z.ZodObject<{
99
+ path: z.ZodString;
100
+ label: z.ZodOptional<z.ZodString>;
101
+ satisfied: z.ZodBoolean;
102
+ }, "strip", z.ZodTypeAny, {
103
+ path: string;
104
+ satisfied: boolean;
105
+ label?: string | undefined;
106
+ }, {
107
+ path: string;
108
+ satisfied: boolean;
109
+ label?: string | undefined;
110
+ }>, "many">;
111
+ install: z.ZodArray<z.ZodObject<{
112
+ id: z.ZodString;
113
+ kind: z.ZodEnum<["brew", "node", "go", "uv", "download"]>;
114
+ label: z.ZodString;
115
+ bins: z.ZodArray<z.ZodString, "many">;
116
+ }, "strip", z.ZodTypeAny, {
117
+ bins: string[];
118
+ label: string;
119
+ id: string;
120
+ kind: "brew" | "node" | "go" | "uv" | "download";
121
+ }, {
122
+ bins: string[];
123
+ label: string;
124
+ id: string;
125
+ kind: "brew" | "node" | "go" | "uv" | "download";
126
+ }>, "many">;
127
+ }, "strip", z.ZodTypeAny, {
128
+ name: string;
129
+ description: string;
130
+ source: string;
131
+ bundled: boolean;
132
+ filePath: string;
133
+ baseDir: string;
134
+ skillKey: string;
135
+ always: boolean;
136
+ disabled: boolean;
137
+ blockedByAllowlist: boolean;
138
+ eligible: boolean;
139
+ requirements: {
140
+ bins?: string[] | undefined;
141
+ envs?: string[] | undefined;
142
+ configs?: string[] | undefined;
143
+ os?: string[] | undefined;
144
+ };
145
+ missing: {
146
+ bins?: string[] | undefined;
147
+ envs?: string[] | undefined;
148
+ configs?: string[] | undefined;
149
+ os?: string[] | undefined;
150
+ };
151
+ configChecks: {
152
+ path: string;
153
+ satisfied: boolean;
154
+ label?: string | undefined;
155
+ }[];
156
+ install: {
157
+ bins: string[];
158
+ label: string;
159
+ id: string;
160
+ kind: "brew" | "node" | "go" | "uv" | "download";
161
+ }[];
162
+ primaryEnv?: string | undefined;
163
+ emoji?: string | undefined;
164
+ homepage?: string | undefined;
165
+ }, {
166
+ name: string;
167
+ description: string;
168
+ source: string;
169
+ bundled: boolean;
170
+ filePath: string;
171
+ baseDir: string;
172
+ skillKey: string;
173
+ always: boolean;
174
+ disabled: boolean;
175
+ blockedByAllowlist: boolean;
176
+ eligible: boolean;
177
+ requirements: {
178
+ bins?: string[] | undefined;
179
+ envs?: string[] | undefined;
180
+ configs?: string[] | undefined;
181
+ os?: string[] | undefined;
182
+ };
183
+ missing: {
184
+ bins?: string[] | undefined;
185
+ envs?: string[] | undefined;
186
+ configs?: string[] | undefined;
187
+ os?: string[] | undefined;
188
+ };
189
+ configChecks: {
190
+ path: string;
191
+ satisfied: boolean;
192
+ label?: string | undefined;
193
+ }[];
194
+ install: {
195
+ bins: string[];
196
+ label: string;
197
+ id: string;
198
+ kind: "brew" | "node" | "go" | "uv" | "download";
199
+ }[];
200
+ primaryEnv?: string | undefined;
201
+ emoji?: string | undefined;
202
+ homepage?: string | undefined;
203
+ }>;
204
+ type SkillStatusEntry = z.infer<typeof skillStatusEntrySchema>;
205
+ declare const skillStatusReportSchema: z.ZodObject<{
206
+ workspaceDir: z.ZodString;
207
+ managedSkillsDir: z.ZodString;
208
+ skills: z.ZodArray<z.ZodObject<{
209
+ name: z.ZodString;
210
+ description: z.ZodString;
211
+ source: z.ZodString;
212
+ bundled: z.ZodBoolean;
213
+ filePath: z.ZodString;
214
+ baseDir: z.ZodString;
215
+ skillKey: z.ZodString;
216
+ primaryEnv: z.ZodOptional<z.ZodString>;
217
+ emoji: z.ZodOptional<z.ZodString>;
218
+ homepage: z.ZodOptional<z.ZodString>;
219
+ always: z.ZodBoolean;
220
+ disabled: z.ZodBoolean;
221
+ blockedByAllowlist: z.ZodBoolean;
222
+ eligible: z.ZodBoolean;
223
+ requirements: z.ZodObject<{
224
+ bins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
225
+ envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
226
+ configs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
227
+ os: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ bins?: string[] | undefined;
230
+ envs?: string[] | undefined;
231
+ configs?: string[] | undefined;
232
+ os?: string[] | undefined;
233
+ }, {
234
+ bins?: string[] | undefined;
235
+ envs?: string[] | undefined;
236
+ configs?: string[] | undefined;
237
+ os?: string[] | undefined;
238
+ }>;
239
+ missing: z.ZodObject<{
240
+ bins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
241
+ envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
242
+ configs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
243
+ os: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
244
+ }, "strip", z.ZodTypeAny, {
245
+ bins?: string[] | undefined;
246
+ envs?: string[] | undefined;
247
+ configs?: string[] | undefined;
248
+ os?: string[] | undefined;
249
+ }, {
250
+ bins?: string[] | undefined;
251
+ envs?: string[] | undefined;
252
+ configs?: string[] | undefined;
253
+ os?: string[] | undefined;
254
+ }>;
255
+ configChecks: z.ZodArray<z.ZodObject<{
256
+ path: z.ZodString;
257
+ label: z.ZodOptional<z.ZodString>;
258
+ satisfied: z.ZodBoolean;
259
+ }, "strip", z.ZodTypeAny, {
260
+ path: string;
261
+ satisfied: boolean;
262
+ label?: string | undefined;
263
+ }, {
264
+ path: string;
265
+ satisfied: boolean;
266
+ label?: string | undefined;
267
+ }>, "many">;
268
+ install: z.ZodArray<z.ZodObject<{
269
+ id: z.ZodString;
270
+ kind: z.ZodEnum<["brew", "node", "go", "uv", "download"]>;
271
+ label: z.ZodString;
272
+ bins: z.ZodArray<z.ZodString, "many">;
273
+ }, "strip", z.ZodTypeAny, {
274
+ bins: string[];
275
+ label: string;
276
+ id: string;
277
+ kind: "brew" | "node" | "go" | "uv" | "download";
278
+ }, {
279
+ bins: string[];
280
+ label: string;
281
+ id: string;
282
+ kind: "brew" | "node" | "go" | "uv" | "download";
283
+ }>, "many">;
284
+ }, "strip", z.ZodTypeAny, {
285
+ name: string;
286
+ description: string;
287
+ source: string;
288
+ bundled: boolean;
289
+ filePath: string;
290
+ baseDir: string;
291
+ skillKey: string;
292
+ always: boolean;
293
+ disabled: boolean;
294
+ blockedByAllowlist: boolean;
295
+ eligible: boolean;
296
+ requirements: {
297
+ bins?: string[] | undefined;
298
+ envs?: string[] | undefined;
299
+ configs?: string[] | undefined;
300
+ os?: string[] | undefined;
301
+ };
302
+ missing: {
303
+ bins?: string[] | undefined;
304
+ envs?: string[] | undefined;
305
+ configs?: string[] | undefined;
306
+ os?: string[] | undefined;
307
+ };
308
+ configChecks: {
309
+ path: string;
310
+ satisfied: boolean;
311
+ label?: string | undefined;
312
+ }[];
313
+ install: {
314
+ bins: string[];
315
+ label: string;
316
+ id: string;
317
+ kind: "brew" | "node" | "go" | "uv" | "download";
318
+ }[];
319
+ primaryEnv?: string | undefined;
320
+ emoji?: string | undefined;
321
+ homepage?: string | undefined;
322
+ }, {
323
+ name: string;
324
+ description: string;
325
+ source: string;
326
+ bundled: boolean;
327
+ filePath: string;
328
+ baseDir: string;
329
+ skillKey: string;
330
+ always: boolean;
331
+ disabled: boolean;
332
+ blockedByAllowlist: boolean;
333
+ eligible: boolean;
334
+ requirements: {
335
+ bins?: string[] | undefined;
336
+ envs?: string[] | undefined;
337
+ configs?: string[] | undefined;
338
+ os?: string[] | undefined;
339
+ };
340
+ missing: {
341
+ bins?: string[] | undefined;
342
+ envs?: string[] | undefined;
343
+ configs?: string[] | undefined;
344
+ os?: string[] | undefined;
345
+ };
346
+ configChecks: {
347
+ path: string;
348
+ satisfied: boolean;
349
+ label?: string | undefined;
350
+ }[];
351
+ install: {
352
+ bins: string[];
353
+ label: string;
354
+ id: string;
355
+ kind: "brew" | "node" | "go" | "uv" | "download";
356
+ }[];
357
+ primaryEnv?: string | undefined;
358
+ emoji?: string | undefined;
359
+ homepage?: string | undefined;
360
+ }>, "many">;
361
+ }, "strip", z.ZodTypeAny, {
362
+ workspaceDir: string;
363
+ managedSkillsDir: string;
364
+ skills: {
365
+ name: string;
366
+ description: string;
367
+ source: string;
368
+ bundled: boolean;
369
+ filePath: string;
370
+ baseDir: string;
371
+ skillKey: string;
372
+ always: boolean;
373
+ disabled: boolean;
374
+ blockedByAllowlist: boolean;
375
+ eligible: boolean;
376
+ requirements: {
377
+ bins?: string[] | undefined;
378
+ envs?: string[] | undefined;
379
+ configs?: string[] | undefined;
380
+ os?: string[] | undefined;
381
+ };
382
+ missing: {
383
+ bins?: string[] | undefined;
384
+ envs?: string[] | undefined;
385
+ configs?: string[] | undefined;
386
+ os?: string[] | undefined;
387
+ };
388
+ configChecks: {
389
+ path: string;
390
+ satisfied: boolean;
391
+ label?: string | undefined;
392
+ }[];
393
+ install: {
394
+ bins: string[];
395
+ label: string;
396
+ id: string;
397
+ kind: "brew" | "node" | "go" | "uv" | "download";
398
+ }[];
399
+ primaryEnv?: string | undefined;
400
+ emoji?: string | undefined;
401
+ homepage?: string | undefined;
402
+ }[];
403
+ }, {
404
+ workspaceDir: string;
405
+ managedSkillsDir: string;
406
+ skills: {
407
+ name: string;
408
+ description: string;
409
+ source: string;
410
+ bundled: boolean;
411
+ filePath: string;
412
+ baseDir: string;
413
+ skillKey: string;
414
+ always: boolean;
415
+ disabled: boolean;
416
+ blockedByAllowlist: boolean;
417
+ eligible: boolean;
418
+ requirements: {
419
+ bins?: string[] | undefined;
420
+ envs?: string[] | undefined;
421
+ configs?: string[] | undefined;
422
+ os?: string[] | undefined;
423
+ };
424
+ missing: {
425
+ bins?: string[] | undefined;
426
+ envs?: string[] | undefined;
427
+ configs?: string[] | undefined;
428
+ os?: string[] | undefined;
429
+ };
430
+ configChecks: {
431
+ path: string;
432
+ satisfied: boolean;
433
+ label?: string | undefined;
434
+ }[];
435
+ install: {
436
+ bins: string[];
437
+ label: string;
438
+ id: string;
439
+ kind: "brew" | "node" | "go" | "uv" | "download";
440
+ }[];
441
+ primaryEnv?: string | undefined;
442
+ emoji?: string | undefined;
443
+ homepage?: string | undefined;
444
+ }[];
445
+ }>;
446
+ type SkillStatusReport = z.infer<typeof skillStatusReportSchema>;
447
+
448
+ declare const sessionEntrySchema: z.ZodObject<{
449
+ key: z.ZodString;
450
+ agentId: z.ZodOptional<z.ZodString>;
451
+ label: z.ZodOptional<z.ZodString>;
452
+ channel: z.ZodOptional<z.ZodString>;
453
+ kind: z.ZodOptional<z.ZodString>;
454
+ createdAt: z.ZodOptional<z.ZodNumber>;
455
+ updatedAt: z.ZodOptional<z.ZodNumber>;
456
+ messageCount: z.ZodOptional<z.ZodNumber>;
457
+ }, "strip", z.ZodTypeAny, {
458
+ key: string;
459
+ label?: string | undefined;
460
+ kind?: string | undefined;
461
+ agentId?: string | undefined;
462
+ channel?: string | undefined;
463
+ createdAt?: number | undefined;
464
+ updatedAt?: number | undefined;
465
+ messageCount?: number | undefined;
466
+ }, {
467
+ key: string;
468
+ label?: string | undefined;
469
+ kind?: string | undefined;
470
+ agentId?: string | undefined;
471
+ channel?: string | undefined;
472
+ createdAt?: number | undefined;
473
+ updatedAt?: number | undefined;
474
+ messageCount?: number | undefined;
475
+ }>;
476
+ type SessionEntry = z.infer<typeof sessionEntrySchema>;
477
+
478
+ declare const cronJobSchema: z.ZodObject<{
479
+ name: z.ZodString;
480
+ schedule: z.ZodOptional<z.ZodString>;
481
+ enabled: z.ZodBoolean;
482
+ lastRunAt: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
483
+ nextRunAt: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
484
+ lastStatus: z.ZodNullable<z.ZodOptional<z.ZodString>>;
485
+ agentId: z.ZodOptional<z.ZodString>;
486
+ model: z.ZodNullable<z.ZodOptional<z.ZodString>>;
487
+ task: z.ZodOptional<z.ZodString>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ name: string;
490
+ enabled: boolean;
491
+ agentId?: string | undefined;
492
+ schedule?: string | undefined;
493
+ lastRunAt?: number | null | undefined;
494
+ nextRunAt?: number | null | undefined;
495
+ lastStatus?: string | null | undefined;
496
+ model?: string | null | undefined;
497
+ task?: string | undefined;
498
+ }, {
499
+ name: string;
500
+ enabled: boolean;
501
+ agentId?: string | undefined;
502
+ schedule?: string | undefined;
503
+ lastRunAt?: number | null | undefined;
504
+ nextRunAt?: number | null | undefined;
505
+ lastStatus?: string | null | undefined;
506
+ model?: string | null | undefined;
507
+ task?: string | undefined;
508
+ }>;
509
+ type CronJob = z.infer<typeof cronJobSchema>;
510
+
511
+ declare const agentEntrySchema: z.ZodObject<{
512
+ id: z.ZodString;
513
+ name: z.ZodOptional<z.ZodString>;
514
+ model: z.ZodOptional<z.ZodString>;
515
+ defaultModel: z.ZodOptional<z.ZodString>;
516
+ persona: z.ZodOptional<z.ZodString>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ id: string;
519
+ name?: string | undefined;
520
+ model?: string | undefined;
521
+ defaultModel?: string | undefined;
522
+ persona?: string | undefined;
523
+ }, {
524
+ id: string;
525
+ name?: string | undefined;
526
+ model?: string | undefined;
527
+ defaultModel?: string | undefined;
528
+ persona?: string | undefined;
529
+ }>;
530
+ type AgentEntry = z.infer<typeof agentEntrySchema>;
531
+
532
+ declare const usageCostSchema: z.ZodObject<{
533
+ totalCostUsd: z.ZodOptional<z.ZodNumber>;
534
+ periodStart: z.ZodOptional<z.ZodString>;
535
+ periodEnd: z.ZodOptional<z.ZodString>;
536
+ byModel: z.ZodOptional<z.ZodArray<z.ZodObject<{
537
+ model: z.ZodString;
538
+ inputTokens: z.ZodNumber;
539
+ outputTokens: z.ZodNumber;
540
+ costUsd: z.ZodNumber;
541
+ }, "strip", z.ZodTypeAny, {
542
+ model: string;
543
+ inputTokens: number;
544
+ outputTokens: number;
545
+ costUsd: number;
546
+ }, {
547
+ model: string;
548
+ inputTokens: number;
549
+ outputTokens: number;
550
+ costUsd: number;
551
+ }>, "many">>;
552
+ }, "strip", z.ZodTypeAny, {
553
+ totalCostUsd?: number | undefined;
554
+ periodStart?: string | undefined;
555
+ periodEnd?: string | undefined;
556
+ byModel?: {
557
+ model: string;
558
+ inputTokens: number;
559
+ outputTokens: number;
560
+ costUsd: number;
561
+ }[] | undefined;
562
+ }, {
563
+ totalCostUsd?: number | undefined;
564
+ periodStart?: string | undefined;
565
+ periodEnd?: string | undefined;
566
+ byModel?: {
567
+ model: string;
568
+ inputTokens: number;
569
+ outputTokens: number;
570
+ costUsd: number;
571
+ }[] | undefined;
572
+ }>;
573
+ type UsageCost = z.infer<typeof usageCostSchema>;
574
+
575
+ export { type AgentEntry, type CronJob, type SessionEntry, type SkillConfigCheck, type SkillInstallOption, type SkillRequirements, type SkillStatusEntry, type SkillStatusReport, type UsageCost, agentEntrySchema, cronJobSchema, sessionEntrySchema, skillConfigCheckSchema, skillInstallOptionSchema, skillRequirementsSchema, skillStatusEntrySchema, skillStatusReportSchema, usageCostSchema };
@@ -0,0 +1,98 @@
1
+ 'use strict';
2
+
3
+ var zod = require('zod');
4
+
5
+ // src/gateway/skills.ts
6
+ var skillRequirementsSchema = zod.z.object({
7
+ bins: zod.z.array(zod.z.string()).optional(),
8
+ envs: zod.z.array(zod.z.string()).optional(),
9
+ configs: zod.z.array(zod.z.string()).optional(),
10
+ os: zod.z.array(zod.z.string()).optional()
11
+ });
12
+ var skillConfigCheckSchema = zod.z.object({
13
+ path: zod.z.string(),
14
+ label: zod.z.string().optional(),
15
+ satisfied: zod.z.boolean()
16
+ });
17
+ var skillInstallOptionSchema = zod.z.object({
18
+ id: zod.z.string(),
19
+ kind: zod.z.enum(["brew", "node", "go", "uv", "download"]),
20
+ label: zod.z.string(),
21
+ bins: zod.z.array(zod.z.string())
22
+ });
23
+ var skillStatusEntrySchema = zod.z.object({
24
+ name: zod.z.string(),
25
+ description: zod.z.string(),
26
+ source: zod.z.string(),
27
+ bundled: zod.z.boolean(),
28
+ filePath: zod.z.string(),
29
+ baseDir: zod.z.string(),
30
+ skillKey: zod.z.string(),
31
+ primaryEnv: zod.z.string().optional(),
32
+ emoji: zod.z.string().optional(),
33
+ homepage: zod.z.string().optional(),
34
+ always: zod.z.boolean(),
35
+ disabled: zod.z.boolean(),
36
+ blockedByAllowlist: zod.z.boolean(),
37
+ eligible: zod.z.boolean(),
38
+ requirements: skillRequirementsSchema,
39
+ missing: skillRequirementsSchema,
40
+ configChecks: zod.z.array(skillConfigCheckSchema),
41
+ install: zod.z.array(skillInstallOptionSchema)
42
+ });
43
+ var skillStatusReportSchema = zod.z.object({
44
+ workspaceDir: zod.z.string(),
45
+ managedSkillsDir: zod.z.string(),
46
+ skills: zod.z.array(skillStatusEntrySchema)
47
+ });
48
+ var sessionEntrySchema = zod.z.object({
49
+ key: zod.z.string(),
50
+ agentId: zod.z.string().optional(),
51
+ label: zod.z.string().optional(),
52
+ channel: zod.z.string().optional(),
53
+ kind: zod.z.string().optional(),
54
+ createdAt: zod.z.number().optional(),
55
+ updatedAt: zod.z.number().optional(),
56
+ messageCount: zod.z.number().optional()
57
+ });
58
+ var cronJobSchema = zod.z.object({
59
+ name: zod.z.string(),
60
+ schedule: zod.z.string().optional(),
61
+ enabled: zod.z.boolean(),
62
+ lastRunAt: zod.z.number().optional().nullable(),
63
+ nextRunAt: zod.z.number().optional().nullable(),
64
+ lastStatus: zod.z.string().optional().nullable(),
65
+ agentId: zod.z.string().optional(),
66
+ model: zod.z.string().optional().nullable(),
67
+ task: zod.z.string().optional()
68
+ });
69
+ var agentEntrySchema = zod.z.object({
70
+ id: zod.z.string(),
71
+ name: zod.z.string().optional(),
72
+ model: zod.z.string().optional(),
73
+ defaultModel: zod.z.string().optional(),
74
+ persona: zod.z.string().optional()
75
+ });
76
+ var usageCostSchema = zod.z.object({
77
+ totalCostUsd: zod.z.number().optional(),
78
+ periodStart: zod.z.string().optional(),
79
+ periodEnd: zod.z.string().optional(),
80
+ byModel: zod.z.array(
81
+ zod.z.object({
82
+ model: zod.z.string(),
83
+ inputTokens: zod.z.number(),
84
+ outputTokens: zod.z.number(),
85
+ costUsd: zod.z.number()
86
+ })
87
+ ).optional()
88
+ });
89
+
90
+ exports.agentEntrySchema = agentEntrySchema;
91
+ exports.cronJobSchema = cronJobSchema;
92
+ exports.sessionEntrySchema = sessionEntrySchema;
93
+ exports.skillConfigCheckSchema = skillConfigCheckSchema;
94
+ exports.skillInstallOptionSchema = skillInstallOptionSchema;
95
+ exports.skillRequirementsSchema = skillRequirementsSchema;
96
+ exports.skillStatusEntrySchema = skillStatusEntrySchema;
97
+ exports.skillStatusReportSchema = skillStatusReportSchema;
98
+ exports.usageCostSchema = usageCostSchema;