@xpert-ai/contracts 3.21.2 → 3.22.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.
@@ -0,0 +1,1826 @@
1
+ import type { TemplateDependencyLock } from './template-installation.model';
2
+ import { z } from 'zod';
3
+ import { ModelFeature } from './ai-model.model';
4
+ /** Portable paths only. Volume remains responsible for canonical containment and symlink checks. */
5
+ export declare const templateFilePathSchema: z.ZodEffects<z.ZodString, string, string>;
6
+ export declare const templateFilesSchema: z.ZodEffects<z.ZodObject<{
7
+ scope: z.ZodEnum<["shared", "user"]>;
8
+ entries: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
9
+ kind: z.ZodLiteral<"directory">;
10
+ path: z.ZodEffects<z.ZodString, string, string>;
11
+ }, "strict", z.ZodTypeAny, {
12
+ path?: string;
13
+ kind?: "directory";
14
+ }, {
15
+ path?: string;
16
+ kind?: "directory";
17
+ }>, z.ZodObject<{
18
+ kind: z.ZodLiteral<"file">;
19
+ path: z.ZodEffects<z.ZodString, string, string>;
20
+ content: z.ZodString;
21
+ contentVersion: z.ZodString;
22
+ policy: z.ZodLiteral<"create-only">;
23
+ }, "strict", z.ZodTypeAny, {
24
+ path?: string;
25
+ policy?: "create-only";
26
+ kind?: "file";
27
+ content?: string;
28
+ contentVersion?: string;
29
+ }, {
30
+ path?: string;
31
+ policy?: "create-only";
32
+ kind?: "file";
33
+ content?: string;
34
+ contentVersion?: string;
35
+ }>, z.ZodObject<{
36
+ kind: z.ZodLiteral<"ledger">;
37
+ path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
38
+ structureVersion: z.ZodString;
39
+ columns: z.ZodArray<z.ZodObject<{
40
+ key: z.ZodString;
41
+ label: z.ZodString;
42
+ type: z.ZodEnum<["string", "number", "boolean", "date"]>;
43
+ }, "strict", z.ZodTypeAny, {
44
+ label?: string;
45
+ type?: "string" | "number" | "boolean" | "date";
46
+ key?: string;
47
+ }, {
48
+ label?: string;
49
+ type?: "string" | "number" | "boolean" | "date";
50
+ key?: string;
51
+ }>, "many">;
52
+ policy: z.ZodLiteral<"create-only">;
53
+ }, "strict", z.ZodTypeAny, {
54
+ path?: string;
55
+ columns?: {
56
+ label?: string;
57
+ type?: "string" | "number" | "boolean" | "date";
58
+ key?: string;
59
+ }[];
60
+ policy?: "create-only";
61
+ kind?: "ledger";
62
+ structureVersion?: string;
63
+ }, {
64
+ path?: string;
65
+ columns?: {
66
+ label?: string;
67
+ type?: "string" | "number" | "boolean" | "date";
68
+ key?: string;
69
+ }[];
70
+ policy?: "create-only";
71
+ kind?: "ledger";
72
+ structureVersion?: string;
73
+ }>]>, "many">;
74
+ }, "strict", z.ZodTypeAny, {
75
+ scope?: "user" | "shared";
76
+ entries?: ({
77
+ path?: string;
78
+ kind?: "directory";
79
+ } | {
80
+ path?: string;
81
+ policy?: "create-only";
82
+ kind?: "file";
83
+ content?: string;
84
+ contentVersion?: string;
85
+ } | {
86
+ path?: string;
87
+ columns?: {
88
+ label?: string;
89
+ type?: "string" | "number" | "boolean" | "date";
90
+ key?: string;
91
+ }[];
92
+ policy?: "create-only";
93
+ kind?: "ledger";
94
+ structureVersion?: string;
95
+ })[];
96
+ }, {
97
+ scope?: "user" | "shared";
98
+ entries?: ({
99
+ path?: string;
100
+ kind?: "directory";
101
+ } | {
102
+ path?: string;
103
+ policy?: "create-only";
104
+ kind?: "file";
105
+ content?: string;
106
+ contentVersion?: string;
107
+ } | {
108
+ path?: string;
109
+ columns?: {
110
+ label?: string;
111
+ type?: "string" | "number" | "boolean" | "date";
112
+ key?: string;
113
+ }[];
114
+ policy?: "create-only";
115
+ kind?: "ledger";
116
+ structureVersion?: string;
117
+ })[];
118
+ }>, {
119
+ scope?: "user" | "shared";
120
+ entries?: ({
121
+ path?: string;
122
+ kind?: "directory";
123
+ } | {
124
+ path?: string;
125
+ policy?: "create-only";
126
+ kind?: "file";
127
+ content?: string;
128
+ contentVersion?: string;
129
+ } | {
130
+ path?: string;
131
+ columns?: {
132
+ label?: string;
133
+ type?: "string" | "number" | "boolean" | "date";
134
+ key?: string;
135
+ }[];
136
+ policy?: "create-only";
137
+ kind?: "ledger";
138
+ structureVersion?: string;
139
+ })[];
140
+ }, {
141
+ scope?: "user" | "shared";
142
+ entries?: ({
143
+ path?: string;
144
+ kind?: "directory";
145
+ } | {
146
+ path?: string;
147
+ policy?: "create-only";
148
+ kind?: "file";
149
+ content?: string;
150
+ contentVersion?: string;
151
+ } | {
152
+ path?: string;
153
+ columns?: {
154
+ label?: string;
155
+ type?: "string" | "number" | "boolean" | "date";
156
+ key?: string;
157
+ }[];
158
+ policy?: "create-only";
159
+ kind?: "ledger";
160
+ structureVersion?: string;
161
+ })[];
162
+ }>;
163
+ /** Versioned, credential-free declarations. Missing manifest preserves the legacy template contract. */
164
+ export declare const templateManifestV1Schema: z.ZodObject<{
165
+ schemaVersion: z.ZodLiteral<1>;
166
+ version: z.ZodString;
167
+ memory: z.ZodOptional<z.ZodObject<{
168
+ seed: z.ZodBoolean;
169
+ preferences: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
170
+ }, "strict", z.ZodTypeAny, {
171
+ preferences?: string[];
172
+ seed?: boolean;
173
+ }, {
174
+ preferences?: string[];
175
+ seed?: boolean;
176
+ }>>;
177
+ skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
178
+ pluginName: z.ZodOptional<z.ZodString>;
179
+ componentKey: z.ZodString;
180
+ }, "strict", z.ZodTypeAny, {
181
+ pluginName?: string;
182
+ componentKey?: string;
183
+ }, {
184
+ pluginName?: string;
185
+ componentKey?: string;
186
+ }>, "many">>;
187
+ files: z.ZodOptional<z.ZodEffects<z.ZodObject<{
188
+ scope: z.ZodEnum<["shared", "user"]>;
189
+ entries: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
190
+ kind: z.ZodLiteral<"directory">;
191
+ path: z.ZodEffects<z.ZodString, string, string>;
192
+ }, "strict", z.ZodTypeAny, {
193
+ path?: string;
194
+ kind?: "directory";
195
+ }, {
196
+ path?: string;
197
+ kind?: "directory";
198
+ }>, z.ZodObject<{
199
+ kind: z.ZodLiteral<"file">;
200
+ path: z.ZodEffects<z.ZodString, string, string>;
201
+ content: z.ZodString;
202
+ contentVersion: z.ZodString;
203
+ policy: z.ZodLiteral<"create-only">;
204
+ }, "strict", z.ZodTypeAny, {
205
+ path?: string;
206
+ policy?: "create-only";
207
+ kind?: "file";
208
+ content?: string;
209
+ contentVersion?: string;
210
+ }, {
211
+ path?: string;
212
+ policy?: "create-only";
213
+ kind?: "file";
214
+ content?: string;
215
+ contentVersion?: string;
216
+ }>, z.ZodObject<{
217
+ kind: z.ZodLiteral<"ledger">;
218
+ path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
219
+ structureVersion: z.ZodString;
220
+ columns: z.ZodArray<z.ZodObject<{
221
+ key: z.ZodString;
222
+ label: z.ZodString;
223
+ type: z.ZodEnum<["string", "number", "boolean", "date"]>;
224
+ }, "strict", z.ZodTypeAny, {
225
+ label?: string;
226
+ type?: "string" | "number" | "boolean" | "date";
227
+ key?: string;
228
+ }, {
229
+ label?: string;
230
+ type?: "string" | "number" | "boolean" | "date";
231
+ key?: string;
232
+ }>, "many">;
233
+ policy: z.ZodLiteral<"create-only">;
234
+ }, "strict", z.ZodTypeAny, {
235
+ path?: string;
236
+ columns?: {
237
+ label?: string;
238
+ type?: "string" | "number" | "boolean" | "date";
239
+ key?: string;
240
+ }[];
241
+ policy?: "create-only";
242
+ kind?: "ledger";
243
+ structureVersion?: string;
244
+ }, {
245
+ path?: string;
246
+ columns?: {
247
+ label?: string;
248
+ type?: "string" | "number" | "boolean" | "date";
249
+ key?: string;
250
+ }[];
251
+ policy?: "create-only";
252
+ kind?: "ledger";
253
+ structureVersion?: string;
254
+ }>]>, "many">;
255
+ }, "strict", z.ZodTypeAny, {
256
+ scope?: "user" | "shared";
257
+ entries?: ({
258
+ path?: string;
259
+ kind?: "directory";
260
+ } | {
261
+ path?: string;
262
+ policy?: "create-only";
263
+ kind?: "file";
264
+ content?: string;
265
+ contentVersion?: string;
266
+ } | {
267
+ path?: string;
268
+ columns?: {
269
+ label?: string;
270
+ type?: "string" | "number" | "boolean" | "date";
271
+ key?: string;
272
+ }[];
273
+ policy?: "create-only";
274
+ kind?: "ledger";
275
+ structureVersion?: string;
276
+ })[];
277
+ }, {
278
+ scope?: "user" | "shared";
279
+ entries?: ({
280
+ path?: string;
281
+ kind?: "directory";
282
+ } | {
283
+ path?: string;
284
+ policy?: "create-only";
285
+ kind?: "file";
286
+ content?: string;
287
+ contentVersion?: string;
288
+ } | {
289
+ path?: string;
290
+ columns?: {
291
+ label?: string;
292
+ type?: "string" | "number" | "boolean" | "date";
293
+ key?: string;
294
+ }[];
295
+ policy?: "create-only";
296
+ kind?: "ledger";
297
+ structureVersion?: string;
298
+ })[];
299
+ }>, {
300
+ scope?: "user" | "shared";
301
+ entries?: ({
302
+ path?: string;
303
+ kind?: "directory";
304
+ } | {
305
+ path?: string;
306
+ policy?: "create-only";
307
+ kind?: "file";
308
+ content?: string;
309
+ contentVersion?: string;
310
+ } | {
311
+ path?: string;
312
+ columns?: {
313
+ label?: string;
314
+ type?: "string" | "number" | "boolean" | "date";
315
+ key?: string;
316
+ }[];
317
+ policy?: "create-only";
318
+ kind?: "ledger";
319
+ structureVersion?: string;
320
+ })[];
321
+ }, {
322
+ scope?: "user" | "shared";
323
+ entries?: ({
324
+ path?: string;
325
+ kind?: "directory";
326
+ } | {
327
+ path?: string;
328
+ policy?: "create-only";
329
+ kind?: "file";
330
+ content?: string;
331
+ contentVersion?: string;
332
+ } | {
333
+ path?: string;
334
+ columns?: {
335
+ label?: string;
336
+ type?: "string" | "number" | "boolean" | "date";
337
+ key?: string;
338
+ }[];
339
+ policy?: "create-only";
340
+ kind?: "ledger";
341
+ structureVersion?: string;
342
+ })[];
343
+ }>>;
344
+ onboarding: z.ZodOptional<z.ZodObject<{
345
+ skill: z.ZodString;
346
+ required: z.ZodDefault<z.ZodBoolean>;
347
+ preferences: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
348
+ completionCriteria: z.ZodString;
349
+ }, "strict", z.ZodTypeAny, {
350
+ skill?: string;
351
+ preferences?: string[];
352
+ required?: boolean;
353
+ completionCriteria?: string;
354
+ }, {
355
+ skill?: string;
356
+ preferences?: string[];
357
+ required?: boolean;
358
+ completionCriteria?: string;
359
+ }>>;
360
+ connectors: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodObject<{
361
+ key: z.ZodString;
362
+ provider: z.ZodString;
363
+ required: z.ZodDefault<z.ZodBoolean>;
364
+ purpose: z.ZodString;
365
+ permissions: z.ZodArray<z.ZodString, "many">;
366
+ }, "strict", z.ZodTypeAny, {
367
+ provider?: string;
368
+ required?: boolean;
369
+ key?: string;
370
+ permissions?: string[];
371
+ purpose?: string;
372
+ }, {
373
+ provider?: string;
374
+ required?: boolean;
375
+ key?: string;
376
+ permissions?: string[];
377
+ purpose?: string;
378
+ }>, "many">, {
379
+ provider?: string;
380
+ required?: boolean;
381
+ key?: string;
382
+ permissions?: string[];
383
+ purpose?: string;
384
+ }[], {
385
+ provider?: string;
386
+ required?: boolean;
387
+ key?: string;
388
+ permissions?: string[];
389
+ purpose?: string;
390
+ }[]>, {
391
+ provider?: string;
392
+ required?: boolean;
393
+ key?: string;
394
+ permissions?: string[];
395
+ purpose?: string;
396
+ }[], {
397
+ provider?: string;
398
+ required?: boolean;
399
+ key?: string;
400
+ permissions?: string[];
401
+ purpose?: string;
402
+ }[]>>;
403
+ routines: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
404
+ key: z.ZodString;
405
+ required: z.ZodDefault<z.ZodBoolean>;
406
+ trigger: z.ZodEnum<["schedule", "event"]>;
407
+ expression: z.ZodString;
408
+ timezone: z.ZodEnum<["user", "organization"]>;
409
+ skill: z.ZodString;
410
+ output: z.ZodString;
411
+ enabled: z.ZodDefault<z.ZodLiteral<false>>;
412
+ }, "strict", z.ZodTypeAny, {
413
+ skill?: string;
414
+ enabled?: false;
415
+ output?: string;
416
+ required?: boolean;
417
+ key?: string;
418
+ trigger?: "schedule" | "event";
419
+ expression?: string;
420
+ timezone?: "organization" | "user";
421
+ }, {
422
+ skill?: string;
423
+ enabled?: false;
424
+ output?: string;
425
+ required?: boolean;
426
+ key?: string;
427
+ trigger?: "schedule" | "event";
428
+ expression?: string;
429
+ timezone?: "organization" | "user";
430
+ }>, "many">, {
431
+ skill?: string;
432
+ enabled?: false;
433
+ output?: string;
434
+ required?: boolean;
435
+ key?: string;
436
+ trigger?: "schedule" | "event";
437
+ expression?: string;
438
+ timezone?: "organization" | "user";
439
+ }[], {
440
+ skill?: string;
441
+ enabled?: false;
442
+ output?: string;
443
+ required?: boolean;
444
+ key?: string;
445
+ trigger?: "schedule" | "event";
446
+ expression?: string;
447
+ timezone?: "organization" | "user";
448
+ }[]>>;
449
+ execution: z.ZodOptional<z.ZodObject<{
450
+ modelFeatures: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ModelFeature>, "many">>;
451
+ sandbox: z.ZodOptional<z.ZodEnum<["server", "cloud-computer"]>>;
452
+ localCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
453
+ offline: z.ZodOptional<z.ZodEnum<["requires-online", "local-only"]>>;
454
+ }, "strict", z.ZodTypeAny, {
455
+ sandbox?: "server" | "cloud-computer";
456
+ modelFeatures?: ModelFeature[];
457
+ localCapabilities?: string[];
458
+ offline?: "requires-online" | "local-only";
459
+ }, {
460
+ sandbox?: "server" | "cloud-computer";
461
+ modelFeatures?: ModelFeature[];
462
+ localCapabilities?: string[];
463
+ offline?: "requires-online" | "local-only";
464
+ }>>;
465
+ }, "strict", z.ZodTypeAny, {
466
+ version?: string;
467
+ skills?: {
468
+ pluginName?: string;
469
+ componentKey?: string;
470
+ }[];
471
+ connectors?: {
472
+ provider?: string;
473
+ required?: boolean;
474
+ key?: string;
475
+ permissions?: string[];
476
+ purpose?: string;
477
+ }[];
478
+ execution?: {
479
+ sandbox?: "server" | "cloud-computer";
480
+ modelFeatures?: ModelFeature[];
481
+ localCapabilities?: string[];
482
+ offline?: "requires-online" | "local-only";
483
+ };
484
+ schemaVersion?: 1;
485
+ files?: {
486
+ scope?: "user" | "shared";
487
+ entries?: ({
488
+ path?: string;
489
+ kind?: "directory";
490
+ } | {
491
+ path?: string;
492
+ policy?: "create-only";
493
+ kind?: "file";
494
+ content?: string;
495
+ contentVersion?: string;
496
+ } | {
497
+ path?: string;
498
+ columns?: {
499
+ label?: string;
500
+ type?: "string" | "number" | "boolean" | "date";
501
+ key?: string;
502
+ }[];
503
+ policy?: "create-only";
504
+ kind?: "ledger";
505
+ structureVersion?: string;
506
+ })[];
507
+ };
508
+ memory?: {
509
+ preferences?: string[];
510
+ seed?: boolean;
511
+ };
512
+ onboarding?: {
513
+ skill?: string;
514
+ preferences?: string[];
515
+ required?: boolean;
516
+ completionCriteria?: string;
517
+ };
518
+ routines?: {
519
+ skill?: string;
520
+ enabled?: false;
521
+ output?: string;
522
+ required?: boolean;
523
+ key?: string;
524
+ trigger?: "schedule" | "event";
525
+ expression?: string;
526
+ timezone?: "organization" | "user";
527
+ }[];
528
+ }, {
529
+ version?: string;
530
+ skills?: {
531
+ pluginName?: string;
532
+ componentKey?: string;
533
+ }[];
534
+ connectors?: {
535
+ provider?: string;
536
+ required?: boolean;
537
+ key?: string;
538
+ permissions?: string[];
539
+ purpose?: string;
540
+ }[];
541
+ execution?: {
542
+ sandbox?: "server" | "cloud-computer";
543
+ modelFeatures?: ModelFeature[];
544
+ localCapabilities?: string[];
545
+ offline?: "requires-online" | "local-only";
546
+ };
547
+ schemaVersion?: 1;
548
+ files?: {
549
+ scope?: "user" | "shared";
550
+ entries?: ({
551
+ path?: string;
552
+ kind?: "directory";
553
+ } | {
554
+ path?: string;
555
+ policy?: "create-only";
556
+ kind?: "file";
557
+ content?: string;
558
+ contentVersion?: string;
559
+ } | {
560
+ path?: string;
561
+ columns?: {
562
+ label?: string;
563
+ type?: "string" | "number" | "boolean" | "date";
564
+ key?: string;
565
+ }[];
566
+ policy?: "create-only";
567
+ kind?: "ledger";
568
+ structureVersion?: string;
569
+ })[];
570
+ };
571
+ memory?: {
572
+ preferences?: string[];
573
+ seed?: boolean;
574
+ };
575
+ onboarding?: {
576
+ skill?: string;
577
+ preferences?: string[];
578
+ required?: boolean;
579
+ completionCriteria?: string;
580
+ };
581
+ routines?: {
582
+ skill?: string;
583
+ enabled?: false;
584
+ output?: string;
585
+ required?: boolean;
586
+ key?: string;
587
+ trigger?: "schedule" | "event";
588
+ expression?: string;
589
+ timezone?: "organization" | "user";
590
+ }[];
591
+ }>;
592
+ /** V2 keeps only initialization and requirements that the DSL cannot express. */
593
+ export declare const assistantTemplateManifestSchema: z.ZodObject<{
594
+ version: z.ZodString;
595
+ connectors: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodObject<{
596
+ key: z.ZodString;
597
+ provider: z.ZodString;
598
+ required: z.ZodDefault<z.ZodBoolean>;
599
+ purpose: z.ZodString;
600
+ permissions: z.ZodArray<z.ZodString, "many">;
601
+ }, "strict", z.ZodTypeAny, {
602
+ provider?: string;
603
+ required?: boolean;
604
+ key?: string;
605
+ permissions?: string[];
606
+ purpose?: string;
607
+ }, {
608
+ provider?: string;
609
+ required?: boolean;
610
+ key?: string;
611
+ permissions?: string[];
612
+ purpose?: string;
613
+ }>, "many">, {
614
+ provider?: string;
615
+ required?: boolean;
616
+ key?: string;
617
+ permissions?: string[];
618
+ purpose?: string;
619
+ }[], {
620
+ provider?: string;
621
+ required?: boolean;
622
+ key?: string;
623
+ permissions?: string[];
624
+ purpose?: string;
625
+ }[]>, {
626
+ provider?: string;
627
+ required?: boolean;
628
+ key?: string;
629
+ permissions?: string[];
630
+ purpose?: string;
631
+ }[], {
632
+ provider?: string;
633
+ required?: boolean;
634
+ key?: string;
635
+ permissions?: string[];
636
+ purpose?: string;
637
+ }[]>>;
638
+ files: z.ZodOptional<z.ZodEffects<z.ZodObject<{
639
+ scope: z.ZodEnum<["shared", "user"]>;
640
+ entries: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
641
+ kind: z.ZodLiteral<"directory">;
642
+ path: z.ZodEffects<z.ZodString, string, string>;
643
+ }, "strict", z.ZodTypeAny, {
644
+ path?: string;
645
+ kind?: "directory";
646
+ }, {
647
+ path?: string;
648
+ kind?: "directory";
649
+ }>, z.ZodObject<{
650
+ kind: z.ZodLiteral<"file">;
651
+ path: z.ZodEffects<z.ZodString, string, string>;
652
+ content: z.ZodString;
653
+ contentVersion: z.ZodString;
654
+ policy: z.ZodLiteral<"create-only">;
655
+ }, "strict", z.ZodTypeAny, {
656
+ path?: string;
657
+ policy?: "create-only";
658
+ kind?: "file";
659
+ content?: string;
660
+ contentVersion?: string;
661
+ }, {
662
+ path?: string;
663
+ policy?: "create-only";
664
+ kind?: "file";
665
+ content?: string;
666
+ contentVersion?: string;
667
+ }>, z.ZodObject<{
668
+ kind: z.ZodLiteral<"ledger">;
669
+ path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
670
+ structureVersion: z.ZodString;
671
+ columns: z.ZodArray<z.ZodObject<{
672
+ key: z.ZodString;
673
+ label: z.ZodString;
674
+ type: z.ZodEnum<["string", "number", "boolean", "date"]>;
675
+ }, "strict", z.ZodTypeAny, {
676
+ label?: string;
677
+ type?: "string" | "number" | "boolean" | "date";
678
+ key?: string;
679
+ }, {
680
+ label?: string;
681
+ type?: "string" | "number" | "boolean" | "date";
682
+ key?: string;
683
+ }>, "many">;
684
+ policy: z.ZodLiteral<"create-only">;
685
+ }, "strict", z.ZodTypeAny, {
686
+ path?: string;
687
+ columns?: {
688
+ label?: string;
689
+ type?: "string" | "number" | "boolean" | "date";
690
+ key?: string;
691
+ }[];
692
+ policy?: "create-only";
693
+ kind?: "ledger";
694
+ structureVersion?: string;
695
+ }, {
696
+ path?: string;
697
+ columns?: {
698
+ label?: string;
699
+ type?: "string" | "number" | "boolean" | "date";
700
+ key?: string;
701
+ }[];
702
+ policy?: "create-only";
703
+ kind?: "ledger";
704
+ structureVersion?: string;
705
+ }>]>, "many">;
706
+ }, "strict", z.ZodTypeAny, {
707
+ scope?: "user" | "shared";
708
+ entries?: ({
709
+ path?: string;
710
+ kind?: "directory";
711
+ } | {
712
+ path?: string;
713
+ policy?: "create-only";
714
+ kind?: "file";
715
+ content?: string;
716
+ contentVersion?: string;
717
+ } | {
718
+ path?: string;
719
+ columns?: {
720
+ label?: string;
721
+ type?: "string" | "number" | "boolean" | "date";
722
+ key?: string;
723
+ }[];
724
+ policy?: "create-only";
725
+ kind?: "ledger";
726
+ structureVersion?: string;
727
+ })[];
728
+ }, {
729
+ scope?: "user" | "shared";
730
+ entries?: ({
731
+ path?: string;
732
+ kind?: "directory";
733
+ } | {
734
+ path?: string;
735
+ policy?: "create-only";
736
+ kind?: "file";
737
+ content?: string;
738
+ contentVersion?: string;
739
+ } | {
740
+ path?: string;
741
+ columns?: {
742
+ label?: string;
743
+ type?: "string" | "number" | "boolean" | "date";
744
+ key?: string;
745
+ }[];
746
+ policy?: "create-only";
747
+ kind?: "ledger";
748
+ structureVersion?: string;
749
+ })[];
750
+ }>, {
751
+ scope?: "user" | "shared";
752
+ entries?: ({
753
+ path?: string;
754
+ kind?: "directory";
755
+ } | {
756
+ path?: string;
757
+ policy?: "create-only";
758
+ kind?: "file";
759
+ content?: string;
760
+ contentVersion?: string;
761
+ } | {
762
+ path?: string;
763
+ columns?: {
764
+ label?: string;
765
+ type?: "string" | "number" | "boolean" | "date";
766
+ key?: string;
767
+ }[];
768
+ policy?: "create-only";
769
+ kind?: "ledger";
770
+ structureVersion?: string;
771
+ })[];
772
+ }, {
773
+ scope?: "user" | "shared";
774
+ entries?: ({
775
+ path?: string;
776
+ kind?: "directory";
777
+ } | {
778
+ path?: string;
779
+ policy?: "create-only";
780
+ kind?: "file";
781
+ content?: string;
782
+ contentVersion?: string;
783
+ } | {
784
+ path?: string;
785
+ columns?: {
786
+ label?: string;
787
+ type?: "string" | "number" | "boolean" | "date";
788
+ key?: string;
789
+ }[];
790
+ policy?: "create-only";
791
+ kind?: "ledger";
792
+ structureVersion?: string;
793
+ })[];
794
+ }>>;
795
+ onboarding: z.ZodOptional<z.ZodObject<{
796
+ skill: z.ZodString;
797
+ required: z.ZodDefault<z.ZodBoolean>;
798
+ preferences: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
799
+ completionCriteria: z.ZodString;
800
+ }, "strict", z.ZodTypeAny, {
801
+ skill?: string;
802
+ preferences?: string[];
803
+ required?: boolean;
804
+ completionCriteria?: string;
805
+ }, {
806
+ skill?: string;
807
+ preferences?: string[];
808
+ required?: boolean;
809
+ completionCriteria?: string;
810
+ }>>;
811
+ routines: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
812
+ key: z.ZodString;
813
+ required: z.ZodDefault<z.ZodBoolean>;
814
+ trigger: z.ZodEnum<["schedule", "event"]>;
815
+ expression: z.ZodString;
816
+ timezone: z.ZodEnum<["user", "organization"]>;
817
+ skill: z.ZodString;
818
+ output: z.ZodString;
819
+ enabled: z.ZodDefault<z.ZodLiteral<false>>;
820
+ }, "strict", z.ZodTypeAny, {
821
+ skill?: string;
822
+ enabled?: false;
823
+ output?: string;
824
+ required?: boolean;
825
+ key?: string;
826
+ trigger?: "schedule" | "event";
827
+ expression?: string;
828
+ timezone?: "organization" | "user";
829
+ }, {
830
+ skill?: string;
831
+ enabled?: false;
832
+ output?: string;
833
+ required?: boolean;
834
+ key?: string;
835
+ trigger?: "schedule" | "event";
836
+ expression?: string;
837
+ timezone?: "organization" | "user";
838
+ }>, "many">, {
839
+ skill?: string;
840
+ enabled?: false;
841
+ output?: string;
842
+ required?: boolean;
843
+ key?: string;
844
+ trigger?: "schedule" | "event";
845
+ expression?: string;
846
+ timezone?: "organization" | "user";
847
+ }[], {
848
+ skill?: string;
849
+ enabled?: false;
850
+ output?: string;
851
+ required?: boolean;
852
+ key?: string;
853
+ trigger?: "schedule" | "event";
854
+ expression?: string;
855
+ timezone?: "organization" | "user";
856
+ }[]>>;
857
+ } & {
858
+ schemaVersion: z.ZodLiteral<2>;
859
+ execution: z.ZodOptional<z.ZodObject<Omit<{
860
+ modelFeatures: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ModelFeature>, "many">>;
861
+ sandbox: z.ZodOptional<z.ZodEnum<["server", "cloud-computer"]>>;
862
+ localCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
863
+ offline: z.ZodOptional<z.ZodEnum<["requires-online", "local-only"]>>;
864
+ }, "sandbox">, "strict", z.ZodTypeAny, {
865
+ modelFeatures?: ModelFeature[];
866
+ localCapabilities?: string[];
867
+ offline?: "requires-online" | "local-only";
868
+ }, {
869
+ modelFeatures?: ModelFeature[];
870
+ localCapabilities?: string[];
871
+ offline?: "requires-online" | "local-only";
872
+ }>>;
873
+ }, "strict", z.ZodTypeAny, {
874
+ version?: string;
875
+ connectors?: {
876
+ provider?: string;
877
+ required?: boolean;
878
+ key?: string;
879
+ permissions?: string[];
880
+ purpose?: string;
881
+ }[];
882
+ execution?: {
883
+ modelFeatures?: ModelFeature[];
884
+ localCapabilities?: string[];
885
+ offline?: "requires-online" | "local-only";
886
+ };
887
+ schemaVersion?: 2;
888
+ files?: {
889
+ scope?: "user" | "shared";
890
+ entries?: ({
891
+ path?: string;
892
+ kind?: "directory";
893
+ } | {
894
+ path?: string;
895
+ policy?: "create-only";
896
+ kind?: "file";
897
+ content?: string;
898
+ contentVersion?: string;
899
+ } | {
900
+ path?: string;
901
+ columns?: {
902
+ label?: string;
903
+ type?: "string" | "number" | "boolean" | "date";
904
+ key?: string;
905
+ }[];
906
+ policy?: "create-only";
907
+ kind?: "ledger";
908
+ structureVersion?: string;
909
+ })[];
910
+ };
911
+ onboarding?: {
912
+ skill?: string;
913
+ preferences?: string[];
914
+ required?: boolean;
915
+ completionCriteria?: string;
916
+ };
917
+ routines?: {
918
+ skill?: string;
919
+ enabled?: false;
920
+ output?: string;
921
+ required?: boolean;
922
+ key?: string;
923
+ trigger?: "schedule" | "event";
924
+ expression?: string;
925
+ timezone?: "organization" | "user";
926
+ }[];
927
+ }, {
928
+ version?: string;
929
+ connectors?: {
930
+ provider?: string;
931
+ required?: boolean;
932
+ key?: string;
933
+ permissions?: string[];
934
+ purpose?: string;
935
+ }[];
936
+ execution?: {
937
+ modelFeatures?: ModelFeature[];
938
+ localCapabilities?: string[];
939
+ offline?: "requires-online" | "local-only";
940
+ };
941
+ schemaVersion?: 2;
942
+ files?: {
943
+ scope?: "user" | "shared";
944
+ entries?: ({
945
+ path?: string;
946
+ kind?: "directory";
947
+ } | {
948
+ path?: string;
949
+ policy?: "create-only";
950
+ kind?: "file";
951
+ content?: string;
952
+ contentVersion?: string;
953
+ } | {
954
+ path?: string;
955
+ columns?: {
956
+ label?: string;
957
+ type?: "string" | "number" | "boolean" | "date";
958
+ key?: string;
959
+ }[];
960
+ policy?: "create-only";
961
+ kind?: "ledger";
962
+ structureVersion?: string;
963
+ })[];
964
+ };
965
+ onboarding?: {
966
+ skill?: string;
967
+ preferences?: string[];
968
+ required?: boolean;
969
+ completionCriteria?: string;
970
+ };
971
+ routines?: {
972
+ skill?: string;
973
+ enabled?: false;
974
+ output?: string;
975
+ required?: boolean;
976
+ key?: string;
977
+ trigger?: "schedule" | "event";
978
+ expression?: string;
979
+ timezone?: "organization" | "user";
980
+ }[];
981
+ }>;
982
+ export declare const templateManifestSchema: z.ZodDiscriminatedUnion<"schemaVersion", [z.ZodObject<{
983
+ schemaVersion: z.ZodLiteral<1>;
984
+ version: z.ZodString;
985
+ memory: z.ZodOptional<z.ZodObject<{
986
+ seed: z.ZodBoolean;
987
+ preferences: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
988
+ }, "strict", z.ZodTypeAny, {
989
+ preferences?: string[];
990
+ seed?: boolean;
991
+ }, {
992
+ preferences?: string[];
993
+ seed?: boolean;
994
+ }>>;
995
+ skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
996
+ pluginName: z.ZodOptional<z.ZodString>;
997
+ componentKey: z.ZodString;
998
+ }, "strict", z.ZodTypeAny, {
999
+ pluginName?: string;
1000
+ componentKey?: string;
1001
+ }, {
1002
+ pluginName?: string;
1003
+ componentKey?: string;
1004
+ }>, "many">>;
1005
+ files: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1006
+ scope: z.ZodEnum<["shared", "user"]>;
1007
+ entries: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1008
+ kind: z.ZodLiteral<"directory">;
1009
+ path: z.ZodEffects<z.ZodString, string, string>;
1010
+ }, "strict", z.ZodTypeAny, {
1011
+ path?: string;
1012
+ kind?: "directory";
1013
+ }, {
1014
+ path?: string;
1015
+ kind?: "directory";
1016
+ }>, z.ZodObject<{
1017
+ kind: z.ZodLiteral<"file">;
1018
+ path: z.ZodEffects<z.ZodString, string, string>;
1019
+ content: z.ZodString;
1020
+ contentVersion: z.ZodString;
1021
+ policy: z.ZodLiteral<"create-only">;
1022
+ }, "strict", z.ZodTypeAny, {
1023
+ path?: string;
1024
+ policy?: "create-only";
1025
+ kind?: "file";
1026
+ content?: string;
1027
+ contentVersion?: string;
1028
+ }, {
1029
+ path?: string;
1030
+ policy?: "create-only";
1031
+ kind?: "file";
1032
+ content?: string;
1033
+ contentVersion?: string;
1034
+ }>, z.ZodObject<{
1035
+ kind: z.ZodLiteral<"ledger">;
1036
+ path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
1037
+ structureVersion: z.ZodString;
1038
+ columns: z.ZodArray<z.ZodObject<{
1039
+ key: z.ZodString;
1040
+ label: z.ZodString;
1041
+ type: z.ZodEnum<["string", "number", "boolean", "date"]>;
1042
+ }, "strict", z.ZodTypeAny, {
1043
+ label?: string;
1044
+ type?: "string" | "number" | "boolean" | "date";
1045
+ key?: string;
1046
+ }, {
1047
+ label?: string;
1048
+ type?: "string" | "number" | "boolean" | "date";
1049
+ key?: string;
1050
+ }>, "many">;
1051
+ policy: z.ZodLiteral<"create-only">;
1052
+ }, "strict", z.ZodTypeAny, {
1053
+ path?: string;
1054
+ columns?: {
1055
+ label?: string;
1056
+ type?: "string" | "number" | "boolean" | "date";
1057
+ key?: string;
1058
+ }[];
1059
+ policy?: "create-only";
1060
+ kind?: "ledger";
1061
+ structureVersion?: string;
1062
+ }, {
1063
+ path?: string;
1064
+ columns?: {
1065
+ label?: string;
1066
+ type?: "string" | "number" | "boolean" | "date";
1067
+ key?: string;
1068
+ }[];
1069
+ policy?: "create-only";
1070
+ kind?: "ledger";
1071
+ structureVersion?: string;
1072
+ }>]>, "many">;
1073
+ }, "strict", z.ZodTypeAny, {
1074
+ scope?: "user" | "shared";
1075
+ entries?: ({
1076
+ path?: string;
1077
+ kind?: "directory";
1078
+ } | {
1079
+ path?: string;
1080
+ policy?: "create-only";
1081
+ kind?: "file";
1082
+ content?: string;
1083
+ contentVersion?: string;
1084
+ } | {
1085
+ path?: string;
1086
+ columns?: {
1087
+ label?: string;
1088
+ type?: "string" | "number" | "boolean" | "date";
1089
+ key?: string;
1090
+ }[];
1091
+ policy?: "create-only";
1092
+ kind?: "ledger";
1093
+ structureVersion?: string;
1094
+ })[];
1095
+ }, {
1096
+ scope?: "user" | "shared";
1097
+ entries?: ({
1098
+ path?: string;
1099
+ kind?: "directory";
1100
+ } | {
1101
+ path?: string;
1102
+ policy?: "create-only";
1103
+ kind?: "file";
1104
+ content?: string;
1105
+ contentVersion?: string;
1106
+ } | {
1107
+ path?: string;
1108
+ columns?: {
1109
+ label?: string;
1110
+ type?: "string" | "number" | "boolean" | "date";
1111
+ key?: string;
1112
+ }[];
1113
+ policy?: "create-only";
1114
+ kind?: "ledger";
1115
+ structureVersion?: string;
1116
+ })[];
1117
+ }>, {
1118
+ scope?: "user" | "shared";
1119
+ entries?: ({
1120
+ path?: string;
1121
+ kind?: "directory";
1122
+ } | {
1123
+ path?: string;
1124
+ policy?: "create-only";
1125
+ kind?: "file";
1126
+ content?: string;
1127
+ contentVersion?: string;
1128
+ } | {
1129
+ path?: string;
1130
+ columns?: {
1131
+ label?: string;
1132
+ type?: "string" | "number" | "boolean" | "date";
1133
+ key?: string;
1134
+ }[];
1135
+ policy?: "create-only";
1136
+ kind?: "ledger";
1137
+ structureVersion?: string;
1138
+ })[];
1139
+ }, {
1140
+ scope?: "user" | "shared";
1141
+ entries?: ({
1142
+ path?: string;
1143
+ kind?: "directory";
1144
+ } | {
1145
+ path?: string;
1146
+ policy?: "create-only";
1147
+ kind?: "file";
1148
+ content?: string;
1149
+ contentVersion?: string;
1150
+ } | {
1151
+ path?: string;
1152
+ columns?: {
1153
+ label?: string;
1154
+ type?: "string" | "number" | "boolean" | "date";
1155
+ key?: string;
1156
+ }[];
1157
+ policy?: "create-only";
1158
+ kind?: "ledger";
1159
+ structureVersion?: string;
1160
+ })[];
1161
+ }>>;
1162
+ onboarding: z.ZodOptional<z.ZodObject<{
1163
+ skill: z.ZodString;
1164
+ required: z.ZodDefault<z.ZodBoolean>;
1165
+ preferences: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
1166
+ completionCriteria: z.ZodString;
1167
+ }, "strict", z.ZodTypeAny, {
1168
+ skill?: string;
1169
+ preferences?: string[];
1170
+ required?: boolean;
1171
+ completionCriteria?: string;
1172
+ }, {
1173
+ skill?: string;
1174
+ preferences?: string[];
1175
+ required?: boolean;
1176
+ completionCriteria?: string;
1177
+ }>>;
1178
+ connectors: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodObject<{
1179
+ key: z.ZodString;
1180
+ provider: z.ZodString;
1181
+ required: z.ZodDefault<z.ZodBoolean>;
1182
+ purpose: z.ZodString;
1183
+ permissions: z.ZodArray<z.ZodString, "many">;
1184
+ }, "strict", z.ZodTypeAny, {
1185
+ provider?: string;
1186
+ required?: boolean;
1187
+ key?: string;
1188
+ permissions?: string[];
1189
+ purpose?: string;
1190
+ }, {
1191
+ provider?: string;
1192
+ required?: boolean;
1193
+ key?: string;
1194
+ permissions?: string[];
1195
+ purpose?: string;
1196
+ }>, "many">, {
1197
+ provider?: string;
1198
+ required?: boolean;
1199
+ key?: string;
1200
+ permissions?: string[];
1201
+ purpose?: string;
1202
+ }[], {
1203
+ provider?: string;
1204
+ required?: boolean;
1205
+ key?: string;
1206
+ permissions?: string[];
1207
+ purpose?: string;
1208
+ }[]>, {
1209
+ provider?: string;
1210
+ required?: boolean;
1211
+ key?: string;
1212
+ permissions?: string[];
1213
+ purpose?: string;
1214
+ }[], {
1215
+ provider?: string;
1216
+ required?: boolean;
1217
+ key?: string;
1218
+ permissions?: string[];
1219
+ purpose?: string;
1220
+ }[]>>;
1221
+ routines: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
1222
+ key: z.ZodString;
1223
+ required: z.ZodDefault<z.ZodBoolean>;
1224
+ trigger: z.ZodEnum<["schedule", "event"]>;
1225
+ expression: z.ZodString;
1226
+ timezone: z.ZodEnum<["user", "organization"]>;
1227
+ skill: z.ZodString;
1228
+ output: z.ZodString;
1229
+ enabled: z.ZodDefault<z.ZodLiteral<false>>;
1230
+ }, "strict", z.ZodTypeAny, {
1231
+ skill?: string;
1232
+ enabled?: false;
1233
+ output?: string;
1234
+ required?: boolean;
1235
+ key?: string;
1236
+ trigger?: "schedule" | "event";
1237
+ expression?: string;
1238
+ timezone?: "organization" | "user";
1239
+ }, {
1240
+ skill?: string;
1241
+ enabled?: false;
1242
+ output?: string;
1243
+ required?: boolean;
1244
+ key?: string;
1245
+ trigger?: "schedule" | "event";
1246
+ expression?: string;
1247
+ timezone?: "organization" | "user";
1248
+ }>, "many">, {
1249
+ skill?: string;
1250
+ enabled?: false;
1251
+ output?: string;
1252
+ required?: boolean;
1253
+ key?: string;
1254
+ trigger?: "schedule" | "event";
1255
+ expression?: string;
1256
+ timezone?: "organization" | "user";
1257
+ }[], {
1258
+ skill?: string;
1259
+ enabled?: false;
1260
+ output?: string;
1261
+ required?: boolean;
1262
+ key?: string;
1263
+ trigger?: "schedule" | "event";
1264
+ expression?: string;
1265
+ timezone?: "organization" | "user";
1266
+ }[]>>;
1267
+ execution: z.ZodOptional<z.ZodObject<{
1268
+ modelFeatures: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ModelFeature>, "many">>;
1269
+ sandbox: z.ZodOptional<z.ZodEnum<["server", "cloud-computer"]>>;
1270
+ localCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1271
+ offline: z.ZodOptional<z.ZodEnum<["requires-online", "local-only"]>>;
1272
+ }, "strict", z.ZodTypeAny, {
1273
+ sandbox?: "server" | "cloud-computer";
1274
+ modelFeatures?: ModelFeature[];
1275
+ localCapabilities?: string[];
1276
+ offline?: "requires-online" | "local-only";
1277
+ }, {
1278
+ sandbox?: "server" | "cloud-computer";
1279
+ modelFeatures?: ModelFeature[];
1280
+ localCapabilities?: string[];
1281
+ offline?: "requires-online" | "local-only";
1282
+ }>>;
1283
+ }, "strict", z.ZodTypeAny, {
1284
+ version?: string;
1285
+ skills?: {
1286
+ pluginName?: string;
1287
+ componentKey?: string;
1288
+ }[];
1289
+ connectors?: {
1290
+ provider?: string;
1291
+ required?: boolean;
1292
+ key?: string;
1293
+ permissions?: string[];
1294
+ purpose?: string;
1295
+ }[];
1296
+ execution?: {
1297
+ sandbox?: "server" | "cloud-computer";
1298
+ modelFeatures?: ModelFeature[];
1299
+ localCapabilities?: string[];
1300
+ offline?: "requires-online" | "local-only";
1301
+ };
1302
+ schemaVersion?: 1;
1303
+ files?: {
1304
+ scope?: "user" | "shared";
1305
+ entries?: ({
1306
+ path?: string;
1307
+ kind?: "directory";
1308
+ } | {
1309
+ path?: string;
1310
+ policy?: "create-only";
1311
+ kind?: "file";
1312
+ content?: string;
1313
+ contentVersion?: string;
1314
+ } | {
1315
+ path?: string;
1316
+ columns?: {
1317
+ label?: string;
1318
+ type?: "string" | "number" | "boolean" | "date";
1319
+ key?: string;
1320
+ }[];
1321
+ policy?: "create-only";
1322
+ kind?: "ledger";
1323
+ structureVersion?: string;
1324
+ })[];
1325
+ };
1326
+ memory?: {
1327
+ preferences?: string[];
1328
+ seed?: boolean;
1329
+ };
1330
+ onboarding?: {
1331
+ skill?: string;
1332
+ preferences?: string[];
1333
+ required?: boolean;
1334
+ completionCriteria?: string;
1335
+ };
1336
+ routines?: {
1337
+ skill?: string;
1338
+ enabled?: false;
1339
+ output?: string;
1340
+ required?: boolean;
1341
+ key?: string;
1342
+ trigger?: "schedule" | "event";
1343
+ expression?: string;
1344
+ timezone?: "organization" | "user";
1345
+ }[];
1346
+ }, {
1347
+ version?: string;
1348
+ skills?: {
1349
+ pluginName?: string;
1350
+ componentKey?: string;
1351
+ }[];
1352
+ connectors?: {
1353
+ provider?: string;
1354
+ required?: boolean;
1355
+ key?: string;
1356
+ permissions?: string[];
1357
+ purpose?: string;
1358
+ }[];
1359
+ execution?: {
1360
+ sandbox?: "server" | "cloud-computer";
1361
+ modelFeatures?: ModelFeature[];
1362
+ localCapabilities?: string[];
1363
+ offline?: "requires-online" | "local-only";
1364
+ };
1365
+ schemaVersion?: 1;
1366
+ files?: {
1367
+ scope?: "user" | "shared";
1368
+ entries?: ({
1369
+ path?: string;
1370
+ kind?: "directory";
1371
+ } | {
1372
+ path?: string;
1373
+ policy?: "create-only";
1374
+ kind?: "file";
1375
+ content?: string;
1376
+ contentVersion?: string;
1377
+ } | {
1378
+ path?: string;
1379
+ columns?: {
1380
+ label?: string;
1381
+ type?: "string" | "number" | "boolean" | "date";
1382
+ key?: string;
1383
+ }[];
1384
+ policy?: "create-only";
1385
+ kind?: "ledger";
1386
+ structureVersion?: string;
1387
+ })[];
1388
+ };
1389
+ memory?: {
1390
+ preferences?: string[];
1391
+ seed?: boolean;
1392
+ };
1393
+ onboarding?: {
1394
+ skill?: string;
1395
+ preferences?: string[];
1396
+ required?: boolean;
1397
+ completionCriteria?: string;
1398
+ };
1399
+ routines?: {
1400
+ skill?: string;
1401
+ enabled?: false;
1402
+ output?: string;
1403
+ required?: boolean;
1404
+ key?: string;
1405
+ trigger?: "schedule" | "event";
1406
+ expression?: string;
1407
+ timezone?: "organization" | "user";
1408
+ }[];
1409
+ }>, z.ZodObject<{
1410
+ version: z.ZodString;
1411
+ connectors: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodObject<{
1412
+ key: z.ZodString;
1413
+ provider: z.ZodString;
1414
+ required: z.ZodDefault<z.ZodBoolean>;
1415
+ purpose: z.ZodString;
1416
+ permissions: z.ZodArray<z.ZodString, "many">;
1417
+ }, "strict", z.ZodTypeAny, {
1418
+ provider?: string;
1419
+ required?: boolean;
1420
+ key?: string;
1421
+ permissions?: string[];
1422
+ purpose?: string;
1423
+ }, {
1424
+ provider?: string;
1425
+ required?: boolean;
1426
+ key?: string;
1427
+ permissions?: string[];
1428
+ purpose?: string;
1429
+ }>, "many">, {
1430
+ provider?: string;
1431
+ required?: boolean;
1432
+ key?: string;
1433
+ permissions?: string[];
1434
+ purpose?: string;
1435
+ }[], {
1436
+ provider?: string;
1437
+ required?: boolean;
1438
+ key?: string;
1439
+ permissions?: string[];
1440
+ purpose?: string;
1441
+ }[]>, {
1442
+ provider?: string;
1443
+ required?: boolean;
1444
+ key?: string;
1445
+ permissions?: string[];
1446
+ purpose?: string;
1447
+ }[], {
1448
+ provider?: string;
1449
+ required?: boolean;
1450
+ key?: string;
1451
+ permissions?: string[];
1452
+ purpose?: string;
1453
+ }[]>>;
1454
+ files: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1455
+ scope: z.ZodEnum<["shared", "user"]>;
1456
+ entries: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1457
+ kind: z.ZodLiteral<"directory">;
1458
+ path: z.ZodEffects<z.ZodString, string, string>;
1459
+ }, "strict", z.ZodTypeAny, {
1460
+ path?: string;
1461
+ kind?: "directory";
1462
+ }, {
1463
+ path?: string;
1464
+ kind?: "directory";
1465
+ }>, z.ZodObject<{
1466
+ kind: z.ZodLiteral<"file">;
1467
+ path: z.ZodEffects<z.ZodString, string, string>;
1468
+ content: z.ZodString;
1469
+ contentVersion: z.ZodString;
1470
+ policy: z.ZodLiteral<"create-only">;
1471
+ }, "strict", z.ZodTypeAny, {
1472
+ path?: string;
1473
+ policy?: "create-only";
1474
+ kind?: "file";
1475
+ content?: string;
1476
+ contentVersion?: string;
1477
+ }, {
1478
+ path?: string;
1479
+ policy?: "create-only";
1480
+ kind?: "file";
1481
+ content?: string;
1482
+ contentVersion?: string;
1483
+ }>, z.ZodObject<{
1484
+ kind: z.ZodLiteral<"ledger">;
1485
+ path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
1486
+ structureVersion: z.ZodString;
1487
+ columns: z.ZodArray<z.ZodObject<{
1488
+ key: z.ZodString;
1489
+ label: z.ZodString;
1490
+ type: z.ZodEnum<["string", "number", "boolean", "date"]>;
1491
+ }, "strict", z.ZodTypeAny, {
1492
+ label?: string;
1493
+ type?: "string" | "number" | "boolean" | "date";
1494
+ key?: string;
1495
+ }, {
1496
+ label?: string;
1497
+ type?: "string" | "number" | "boolean" | "date";
1498
+ key?: string;
1499
+ }>, "many">;
1500
+ policy: z.ZodLiteral<"create-only">;
1501
+ }, "strict", z.ZodTypeAny, {
1502
+ path?: string;
1503
+ columns?: {
1504
+ label?: string;
1505
+ type?: "string" | "number" | "boolean" | "date";
1506
+ key?: string;
1507
+ }[];
1508
+ policy?: "create-only";
1509
+ kind?: "ledger";
1510
+ structureVersion?: string;
1511
+ }, {
1512
+ path?: string;
1513
+ columns?: {
1514
+ label?: string;
1515
+ type?: "string" | "number" | "boolean" | "date";
1516
+ key?: string;
1517
+ }[];
1518
+ policy?: "create-only";
1519
+ kind?: "ledger";
1520
+ structureVersion?: string;
1521
+ }>]>, "many">;
1522
+ }, "strict", z.ZodTypeAny, {
1523
+ scope?: "user" | "shared";
1524
+ entries?: ({
1525
+ path?: string;
1526
+ kind?: "directory";
1527
+ } | {
1528
+ path?: string;
1529
+ policy?: "create-only";
1530
+ kind?: "file";
1531
+ content?: string;
1532
+ contentVersion?: string;
1533
+ } | {
1534
+ path?: string;
1535
+ columns?: {
1536
+ label?: string;
1537
+ type?: "string" | "number" | "boolean" | "date";
1538
+ key?: string;
1539
+ }[];
1540
+ policy?: "create-only";
1541
+ kind?: "ledger";
1542
+ structureVersion?: string;
1543
+ })[];
1544
+ }, {
1545
+ scope?: "user" | "shared";
1546
+ entries?: ({
1547
+ path?: string;
1548
+ kind?: "directory";
1549
+ } | {
1550
+ path?: string;
1551
+ policy?: "create-only";
1552
+ kind?: "file";
1553
+ content?: string;
1554
+ contentVersion?: string;
1555
+ } | {
1556
+ path?: string;
1557
+ columns?: {
1558
+ label?: string;
1559
+ type?: "string" | "number" | "boolean" | "date";
1560
+ key?: string;
1561
+ }[];
1562
+ policy?: "create-only";
1563
+ kind?: "ledger";
1564
+ structureVersion?: string;
1565
+ })[];
1566
+ }>, {
1567
+ scope?: "user" | "shared";
1568
+ entries?: ({
1569
+ path?: string;
1570
+ kind?: "directory";
1571
+ } | {
1572
+ path?: string;
1573
+ policy?: "create-only";
1574
+ kind?: "file";
1575
+ content?: string;
1576
+ contentVersion?: string;
1577
+ } | {
1578
+ path?: string;
1579
+ columns?: {
1580
+ label?: string;
1581
+ type?: "string" | "number" | "boolean" | "date";
1582
+ key?: string;
1583
+ }[];
1584
+ policy?: "create-only";
1585
+ kind?: "ledger";
1586
+ structureVersion?: string;
1587
+ })[];
1588
+ }, {
1589
+ scope?: "user" | "shared";
1590
+ entries?: ({
1591
+ path?: string;
1592
+ kind?: "directory";
1593
+ } | {
1594
+ path?: string;
1595
+ policy?: "create-only";
1596
+ kind?: "file";
1597
+ content?: string;
1598
+ contentVersion?: string;
1599
+ } | {
1600
+ path?: string;
1601
+ columns?: {
1602
+ label?: string;
1603
+ type?: "string" | "number" | "boolean" | "date";
1604
+ key?: string;
1605
+ }[];
1606
+ policy?: "create-only";
1607
+ kind?: "ledger";
1608
+ structureVersion?: string;
1609
+ })[];
1610
+ }>>;
1611
+ onboarding: z.ZodOptional<z.ZodObject<{
1612
+ skill: z.ZodString;
1613
+ required: z.ZodDefault<z.ZodBoolean>;
1614
+ preferences: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
1615
+ completionCriteria: z.ZodString;
1616
+ }, "strict", z.ZodTypeAny, {
1617
+ skill?: string;
1618
+ preferences?: string[];
1619
+ required?: boolean;
1620
+ completionCriteria?: string;
1621
+ }, {
1622
+ skill?: string;
1623
+ preferences?: string[];
1624
+ required?: boolean;
1625
+ completionCriteria?: string;
1626
+ }>>;
1627
+ routines: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
1628
+ key: z.ZodString;
1629
+ required: z.ZodDefault<z.ZodBoolean>;
1630
+ trigger: z.ZodEnum<["schedule", "event"]>;
1631
+ expression: z.ZodString;
1632
+ timezone: z.ZodEnum<["user", "organization"]>;
1633
+ skill: z.ZodString;
1634
+ output: z.ZodString;
1635
+ enabled: z.ZodDefault<z.ZodLiteral<false>>;
1636
+ }, "strict", z.ZodTypeAny, {
1637
+ skill?: string;
1638
+ enabled?: false;
1639
+ output?: string;
1640
+ required?: boolean;
1641
+ key?: string;
1642
+ trigger?: "schedule" | "event";
1643
+ expression?: string;
1644
+ timezone?: "organization" | "user";
1645
+ }, {
1646
+ skill?: string;
1647
+ enabled?: false;
1648
+ output?: string;
1649
+ required?: boolean;
1650
+ key?: string;
1651
+ trigger?: "schedule" | "event";
1652
+ expression?: string;
1653
+ timezone?: "organization" | "user";
1654
+ }>, "many">, {
1655
+ skill?: string;
1656
+ enabled?: false;
1657
+ output?: string;
1658
+ required?: boolean;
1659
+ key?: string;
1660
+ trigger?: "schedule" | "event";
1661
+ expression?: string;
1662
+ timezone?: "organization" | "user";
1663
+ }[], {
1664
+ skill?: string;
1665
+ enabled?: false;
1666
+ output?: string;
1667
+ required?: boolean;
1668
+ key?: string;
1669
+ trigger?: "schedule" | "event";
1670
+ expression?: string;
1671
+ timezone?: "organization" | "user";
1672
+ }[]>>;
1673
+ } & {
1674
+ schemaVersion: z.ZodLiteral<2>;
1675
+ execution: z.ZodOptional<z.ZodObject<Omit<{
1676
+ modelFeatures: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ModelFeature>, "many">>;
1677
+ sandbox: z.ZodOptional<z.ZodEnum<["server", "cloud-computer"]>>;
1678
+ localCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1679
+ offline: z.ZodOptional<z.ZodEnum<["requires-online", "local-only"]>>;
1680
+ }, "sandbox">, "strict", z.ZodTypeAny, {
1681
+ modelFeatures?: ModelFeature[];
1682
+ localCapabilities?: string[];
1683
+ offline?: "requires-online" | "local-only";
1684
+ }, {
1685
+ modelFeatures?: ModelFeature[];
1686
+ localCapabilities?: string[];
1687
+ offline?: "requires-online" | "local-only";
1688
+ }>>;
1689
+ }, "strict", z.ZodTypeAny, {
1690
+ version?: string;
1691
+ connectors?: {
1692
+ provider?: string;
1693
+ required?: boolean;
1694
+ key?: string;
1695
+ permissions?: string[];
1696
+ purpose?: string;
1697
+ }[];
1698
+ execution?: {
1699
+ modelFeatures?: ModelFeature[];
1700
+ localCapabilities?: string[];
1701
+ offline?: "requires-online" | "local-only";
1702
+ };
1703
+ schemaVersion?: 2;
1704
+ files?: {
1705
+ scope?: "user" | "shared";
1706
+ entries?: ({
1707
+ path?: string;
1708
+ kind?: "directory";
1709
+ } | {
1710
+ path?: string;
1711
+ policy?: "create-only";
1712
+ kind?: "file";
1713
+ content?: string;
1714
+ contentVersion?: string;
1715
+ } | {
1716
+ path?: string;
1717
+ columns?: {
1718
+ label?: string;
1719
+ type?: "string" | "number" | "boolean" | "date";
1720
+ key?: string;
1721
+ }[];
1722
+ policy?: "create-only";
1723
+ kind?: "ledger";
1724
+ structureVersion?: string;
1725
+ })[];
1726
+ };
1727
+ onboarding?: {
1728
+ skill?: string;
1729
+ preferences?: string[];
1730
+ required?: boolean;
1731
+ completionCriteria?: string;
1732
+ };
1733
+ routines?: {
1734
+ skill?: string;
1735
+ enabled?: false;
1736
+ output?: string;
1737
+ required?: boolean;
1738
+ key?: string;
1739
+ trigger?: "schedule" | "event";
1740
+ expression?: string;
1741
+ timezone?: "organization" | "user";
1742
+ }[];
1743
+ }, {
1744
+ version?: string;
1745
+ connectors?: {
1746
+ provider?: string;
1747
+ required?: boolean;
1748
+ key?: string;
1749
+ permissions?: string[];
1750
+ purpose?: string;
1751
+ }[];
1752
+ execution?: {
1753
+ modelFeatures?: ModelFeature[];
1754
+ localCapabilities?: string[];
1755
+ offline?: "requires-online" | "local-only";
1756
+ };
1757
+ schemaVersion?: 2;
1758
+ files?: {
1759
+ scope?: "user" | "shared";
1760
+ entries?: ({
1761
+ path?: string;
1762
+ kind?: "directory";
1763
+ } | {
1764
+ path?: string;
1765
+ policy?: "create-only";
1766
+ kind?: "file";
1767
+ content?: string;
1768
+ contentVersion?: string;
1769
+ } | {
1770
+ path?: string;
1771
+ columns?: {
1772
+ label?: string;
1773
+ type?: "string" | "number" | "boolean" | "date";
1774
+ key?: string;
1775
+ }[];
1776
+ policy?: "create-only";
1777
+ kind?: "ledger";
1778
+ structureVersion?: string;
1779
+ })[];
1780
+ };
1781
+ onboarding?: {
1782
+ skill?: string;
1783
+ preferences?: string[];
1784
+ required?: boolean;
1785
+ completionCriteria?: string;
1786
+ };
1787
+ routines?: {
1788
+ skill?: string;
1789
+ enabled?: false;
1790
+ output?: string;
1791
+ required?: boolean;
1792
+ key?: string;
1793
+ trigger?: "schedule" | "event";
1794
+ expression?: string;
1795
+ timezone?: "organization" | "user";
1796
+ }[];
1797
+ }>]>;
1798
+ export type AssistantTemplateManifest = z.output<typeof assistantTemplateManifestSchema>;
1799
+ export type TemplateManifest = z.output<typeof templateManifestSchema>;
1800
+ export type TemplateFiles = z.output<typeof templateFilesSchema>;
1801
+ export interface TemplateRequirementCheck {
1802
+ kind: 'manifest' | 'memory' | 'skills' | 'files' | 'onboarding' | 'connectors' | 'routines' | 'execution' | 'plugin' | 'resource';
1803
+ key: string;
1804
+ required: boolean;
1805
+ status: 'ready' | 'unsupported' | 'missing' | 'incompatible' | 'pending-configuration';
1806
+ message: string;
1807
+ pluginName?: string;
1808
+ version?: string;
1809
+ }
1810
+ /** Public projection deliberately excludes initial file contents, DSL, credentials and filesystem roots. */
1811
+ export interface TemplateReadiness {
1812
+ capabilities?: import('./assistant-capability.model').AssistantCapabilitySummary;
1813
+ manifestVersion?: string;
1814
+ legacy: boolean;
1815
+ canInstall: boolean;
1816
+ checks: TemplateRequirementCheck[];
1817
+ dependencies: TemplateDependencyLock[];
1818
+ files?: {
1819
+ scope: 'shared' | 'user';
1820
+ entries: {
1821
+ kind: 'directory' | 'file' | 'ledger';
1822
+ path: string;
1823
+ version?: string;
1824
+ }[];
1825
+ };
1826
+ }