@vectros-ai/blueprints 0.5.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,1772 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Blueprint format + STRUCTURAL validation.
5
+ *
6
+ * A blueprint is a versioned, reviewed bundle: a schema set + a
7
+ * least-privilege AccessProfile + a service principal + optional seed
8
+ * data, all with stable identifiers so a loader re-run converges instead
9
+ * of duplicating.
10
+ *
11
+ * This package owns the FORMAT + structural (zod) validation ONLY. The
12
+ * security boundary — the scope gate that bounds a blueprint's requested
13
+ * `allowedActions` to data-plane-only — lives in the CLI binary
14
+ * (`@vectros-ai/cli`), NOT here: blueprints are untrusted input, and the
15
+ * trust boundary is the binary that mints.
16
+ *
17
+ * The blueprint's stable id is `name` (renamed from the v0.3-internal
18
+ * `pack` field during a later split — no shipped consumers).
19
+ */
20
+
21
+ declare const ValidationRulesSchema: z.ZodObject<{
22
+ required: z.ZodOptional<z.ZodBoolean>;
23
+ minLength: z.ZodOptional<z.ZodNumber>;
24
+ maxLength: z.ZodOptional<z.ZodNumber>;
25
+ min: z.ZodOptional<z.ZodNumber>;
26
+ max: z.ZodOptional<z.ZodNumber>;
27
+ pattern: z.ZodOptional<z.ZodString>;
28
+ email: z.ZodOptional<z.ZodBoolean>;
29
+ url: z.ZodOptional<z.ZodBoolean>;
30
+ phone: z.ZodOptional<z.ZodBoolean>;
31
+ step: z.ZodOptional<z.ZodNumber>;
32
+ multipleOf: z.ZodOptional<z.ZodNumber>;
33
+ minItems: z.ZodOptional<z.ZodNumber>;
34
+ maxItems: z.ZodOptional<z.ZodNumber>;
35
+ }, "strict", z.ZodTypeAny, {
36
+ required?: boolean | undefined;
37
+ multipleOf?: number | undefined;
38
+ minLength?: number | undefined;
39
+ maxLength?: number | undefined;
40
+ min?: number | undefined;
41
+ max?: number | undefined;
42
+ pattern?: string | undefined;
43
+ email?: boolean | undefined;
44
+ url?: boolean | undefined;
45
+ phone?: boolean | undefined;
46
+ step?: number | undefined;
47
+ minItems?: number | undefined;
48
+ maxItems?: number | undefined;
49
+ }, {
50
+ required?: boolean | undefined;
51
+ multipleOf?: number | undefined;
52
+ minLength?: number | undefined;
53
+ maxLength?: number | undefined;
54
+ min?: number | undefined;
55
+ max?: number | undefined;
56
+ pattern?: string | undefined;
57
+ email?: boolean | undefined;
58
+ url?: boolean | undefined;
59
+ phone?: boolean | undefined;
60
+ step?: number | undefined;
61
+ minItems?: number | undefined;
62
+ maxItems?: number | undefined;
63
+ }>;
64
+ declare const RenderHintsSchema: z.ZodObject<{
65
+ label: z.ZodOptional<z.ZodString>;
66
+ widget: z.ZodOptional<z.ZodEnum<["text", "textarea", "select", "date", "checkbox"]>>;
67
+ order: z.ZodOptional<z.ZodNumber>;
68
+ section: z.ZodOptional<z.ZodString>;
69
+ helpText: z.ZodOptional<z.ZodString>;
70
+ displayField: z.ZodOptional<z.ZodBoolean>;
71
+ }, "strict", z.ZodTypeAny, {
72
+ label?: string | undefined;
73
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
74
+ order?: number | undefined;
75
+ section?: string | undefined;
76
+ helpText?: string | undefined;
77
+ displayField?: boolean | undefined;
78
+ }, {
79
+ label?: string | undefined;
80
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
81
+ order?: number | undefined;
82
+ section?: string | undefined;
83
+ helpText?: string | undefined;
84
+ displayField?: boolean | undefined;
85
+ }>;
86
+ declare const BlueprintFieldDefSchema: z.ZodEffects<z.ZodObject<{
87
+ fieldId: z.ZodString;
88
+ fieldType: z.ZodString;
89
+ required: z.ZodOptional<z.ZodBoolean>;
90
+ searchable: z.ZodOptional<z.ZodBoolean>;
91
+ filterable: z.ZodOptional<z.ZodBoolean>;
92
+ enumValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
+ description: z.ZodOptional<z.ZodString>;
94
+ validation: z.ZodOptional<z.ZodObject<{
95
+ required: z.ZodOptional<z.ZodBoolean>;
96
+ minLength: z.ZodOptional<z.ZodNumber>;
97
+ maxLength: z.ZodOptional<z.ZodNumber>;
98
+ min: z.ZodOptional<z.ZodNumber>;
99
+ max: z.ZodOptional<z.ZodNumber>;
100
+ pattern: z.ZodOptional<z.ZodString>;
101
+ email: z.ZodOptional<z.ZodBoolean>;
102
+ url: z.ZodOptional<z.ZodBoolean>;
103
+ phone: z.ZodOptional<z.ZodBoolean>;
104
+ step: z.ZodOptional<z.ZodNumber>;
105
+ multipleOf: z.ZodOptional<z.ZodNumber>;
106
+ minItems: z.ZodOptional<z.ZodNumber>;
107
+ maxItems: z.ZodOptional<z.ZodNumber>;
108
+ }, "strict", z.ZodTypeAny, {
109
+ required?: boolean | undefined;
110
+ multipleOf?: number | undefined;
111
+ minLength?: number | undefined;
112
+ maxLength?: number | undefined;
113
+ min?: number | undefined;
114
+ max?: number | undefined;
115
+ pattern?: string | undefined;
116
+ email?: boolean | undefined;
117
+ url?: boolean | undefined;
118
+ phone?: boolean | undefined;
119
+ step?: number | undefined;
120
+ minItems?: number | undefined;
121
+ maxItems?: number | undefined;
122
+ }, {
123
+ required?: boolean | undefined;
124
+ multipleOf?: number | undefined;
125
+ minLength?: number | undefined;
126
+ maxLength?: number | undefined;
127
+ min?: number | undefined;
128
+ max?: number | undefined;
129
+ pattern?: string | undefined;
130
+ email?: boolean | undefined;
131
+ url?: boolean | undefined;
132
+ phone?: boolean | undefined;
133
+ step?: number | undefined;
134
+ minItems?: number | undefined;
135
+ maxItems?: number | undefined;
136
+ }>>;
137
+ renderHints: z.ZodOptional<z.ZodObject<{
138
+ label: z.ZodOptional<z.ZodString>;
139
+ widget: z.ZodOptional<z.ZodEnum<["text", "textarea", "select", "date", "checkbox"]>>;
140
+ order: z.ZodOptional<z.ZodNumber>;
141
+ section: z.ZodOptional<z.ZodString>;
142
+ helpText: z.ZodOptional<z.ZodString>;
143
+ displayField: z.ZodOptional<z.ZodBoolean>;
144
+ }, "strict", z.ZodTypeAny, {
145
+ label?: string | undefined;
146
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
147
+ order?: number | undefined;
148
+ section?: string | undefined;
149
+ helpText?: string | undefined;
150
+ displayField?: boolean | undefined;
151
+ }, {
152
+ label?: string | undefined;
153
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
154
+ order?: number | undefined;
155
+ section?: string | undefined;
156
+ helpText?: string | undefined;
157
+ displayField?: boolean | undefined;
158
+ }>>;
159
+ sensitive: z.ZodOptional<z.ZodBoolean>;
160
+ targetTypeName: z.ZodOptional<z.ZodString>;
161
+ targetField: z.ZodOptional<z.ZodString>;
162
+ targetSurface: z.ZodOptional<z.ZodEnum<["record", "document", "user", "org", "client"]>>;
163
+ cardinality: z.ZodOptional<z.ZodEnum<["one", "many"]>>;
164
+ }, "strict", z.ZodTypeAny, {
165
+ fieldId: string;
166
+ fieldType: string;
167
+ description?: string | undefined;
168
+ required?: boolean | undefined;
169
+ searchable?: boolean | undefined;
170
+ filterable?: boolean | undefined;
171
+ validation?: {
172
+ required?: boolean | undefined;
173
+ multipleOf?: number | undefined;
174
+ minLength?: number | undefined;
175
+ maxLength?: number | undefined;
176
+ min?: number | undefined;
177
+ max?: number | undefined;
178
+ pattern?: string | undefined;
179
+ email?: boolean | undefined;
180
+ url?: boolean | undefined;
181
+ phone?: boolean | undefined;
182
+ step?: number | undefined;
183
+ minItems?: number | undefined;
184
+ maxItems?: number | undefined;
185
+ } | undefined;
186
+ enumValues?: string[] | undefined;
187
+ renderHints?: {
188
+ label?: string | undefined;
189
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
190
+ order?: number | undefined;
191
+ section?: string | undefined;
192
+ helpText?: string | undefined;
193
+ displayField?: boolean | undefined;
194
+ } | undefined;
195
+ sensitive?: boolean | undefined;
196
+ targetTypeName?: string | undefined;
197
+ targetField?: string | undefined;
198
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
199
+ cardinality?: "many" | "one" | undefined;
200
+ }, {
201
+ fieldId: string;
202
+ fieldType: string;
203
+ description?: string | undefined;
204
+ required?: boolean | undefined;
205
+ searchable?: boolean | undefined;
206
+ filterable?: boolean | undefined;
207
+ validation?: {
208
+ required?: boolean | undefined;
209
+ multipleOf?: number | undefined;
210
+ minLength?: number | undefined;
211
+ maxLength?: number | undefined;
212
+ min?: number | undefined;
213
+ max?: number | undefined;
214
+ pattern?: string | undefined;
215
+ email?: boolean | undefined;
216
+ url?: boolean | undefined;
217
+ phone?: boolean | undefined;
218
+ step?: number | undefined;
219
+ minItems?: number | undefined;
220
+ maxItems?: number | undefined;
221
+ } | undefined;
222
+ enumValues?: string[] | undefined;
223
+ renderHints?: {
224
+ label?: string | undefined;
225
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
226
+ order?: number | undefined;
227
+ section?: string | undefined;
228
+ helpText?: string | undefined;
229
+ displayField?: boolean | undefined;
230
+ } | undefined;
231
+ sensitive?: boolean | undefined;
232
+ targetTypeName?: string | undefined;
233
+ targetField?: string | undefined;
234
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
235
+ cardinality?: "many" | "one" | undefined;
236
+ }>, {
237
+ fieldId: string;
238
+ fieldType: string;
239
+ description?: string | undefined;
240
+ required?: boolean | undefined;
241
+ searchable?: boolean | undefined;
242
+ filterable?: boolean | undefined;
243
+ validation?: {
244
+ required?: boolean | undefined;
245
+ multipleOf?: number | undefined;
246
+ minLength?: number | undefined;
247
+ maxLength?: number | undefined;
248
+ min?: number | undefined;
249
+ max?: number | undefined;
250
+ pattern?: string | undefined;
251
+ email?: boolean | undefined;
252
+ url?: boolean | undefined;
253
+ phone?: boolean | undefined;
254
+ step?: number | undefined;
255
+ minItems?: number | undefined;
256
+ maxItems?: number | undefined;
257
+ } | undefined;
258
+ enumValues?: string[] | undefined;
259
+ renderHints?: {
260
+ label?: string | undefined;
261
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
262
+ order?: number | undefined;
263
+ section?: string | undefined;
264
+ helpText?: string | undefined;
265
+ displayField?: boolean | undefined;
266
+ } | undefined;
267
+ sensitive?: boolean | undefined;
268
+ targetTypeName?: string | undefined;
269
+ targetField?: string | undefined;
270
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
271
+ cardinality?: "many" | "one" | undefined;
272
+ }, {
273
+ fieldId: string;
274
+ fieldType: string;
275
+ description?: string | undefined;
276
+ required?: boolean | undefined;
277
+ searchable?: boolean | undefined;
278
+ filterable?: boolean | undefined;
279
+ validation?: {
280
+ required?: boolean | undefined;
281
+ multipleOf?: number | undefined;
282
+ minLength?: number | undefined;
283
+ maxLength?: number | undefined;
284
+ min?: number | undefined;
285
+ max?: number | undefined;
286
+ pattern?: string | undefined;
287
+ email?: boolean | undefined;
288
+ url?: boolean | undefined;
289
+ phone?: boolean | undefined;
290
+ step?: number | undefined;
291
+ minItems?: number | undefined;
292
+ maxItems?: number | undefined;
293
+ } | undefined;
294
+ enumValues?: string[] | undefined;
295
+ renderHints?: {
296
+ label?: string | undefined;
297
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
298
+ order?: number | undefined;
299
+ section?: string | undefined;
300
+ helpText?: string | undefined;
301
+ displayField?: boolean | undefined;
302
+ } | undefined;
303
+ sensitive?: boolean | undefined;
304
+ targetTypeName?: string | undefined;
305
+ targetField?: string | undefined;
306
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
307
+ cardinality?: "many" | "one" | undefined;
308
+ }>;
309
+ declare const BlueprintLookupFieldSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
310
+ fieldName: z.ZodString;
311
+ unique: z.ZodOptional<z.ZodBoolean>;
312
+ rangeEnabled: z.ZodOptional<z.ZodBoolean>;
313
+ sortBy: z.ZodOptional<z.ZodString>;
314
+ allowOverflow: z.ZodOptional<z.ZodBoolean>;
315
+ }, "strict", z.ZodTypeAny, {
316
+ fieldName: string;
317
+ unique?: boolean | undefined;
318
+ rangeEnabled?: boolean | undefined;
319
+ sortBy?: string | undefined;
320
+ allowOverflow?: boolean | undefined;
321
+ }, {
322
+ fieldName: string;
323
+ unique?: boolean | undefined;
324
+ rangeEnabled?: boolean | undefined;
325
+ sortBy?: string | undefined;
326
+ allowOverflow?: boolean | undefined;
327
+ }>]>;
328
+ declare const BlueprintSchemaSchema: z.ZodObject<{
329
+ typeName: z.ZodString;
330
+ displayName: z.ZodString;
331
+ description: z.ZodOptional<z.ZodString>;
332
+ indexMode: z.ZodOptional<z.ZodEnum<["HYBRID", "SEMANTIC", "TEXT"]>>;
333
+ fields: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
334
+ fieldId: z.ZodString;
335
+ fieldType: z.ZodString;
336
+ required: z.ZodOptional<z.ZodBoolean>;
337
+ searchable: z.ZodOptional<z.ZodBoolean>;
338
+ filterable: z.ZodOptional<z.ZodBoolean>;
339
+ enumValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
340
+ description: z.ZodOptional<z.ZodString>;
341
+ validation: z.ZodOptional<z.ZodObject<{
342
+ required: z.ZodOptional<z.ZodBoolean>;
343
+ minLength: z.ZodOptional<z.ZodNumber>;
344
+ maxLength: z.ZodOptional<z.ZodNumber>;
345
+ min: z.ZodOptional<z.ZodNumber>;
346
+ max: z.ZodOptional<z.ZodNumber>;
347
+ pattern: z.ZodOptional<z.ZodString>;
348
+ email: z.ZodOptional<z.ZodBoolean>;
349
+ url: z.ZodOptional<z.ZodBoolean>;
350
+ phone: z.ZodOptional<z.ZodBoolean>;
351
+ step: z.ZodOptional<z.ZodNumber>;
352
+ multipleOf: z.ZodOptional<z.ZodNumber>;
353
+ minItems: z.ZodOptional<z.ZodNumber>;
354
+ maxItems: z.ZodOptional<z.ZodNumber>;
355
+ }, "strict", z.ZodTypeAny, {
356
+ required?: boolean | undefined;
357
+ multipleOf?: number | undefined;
358
+ minLength?: number | undefined;
359
+ maxLength?: number | undefined;
360
+ min?: number | undefined;
361
+ max?: number | undefined;
362
+ pattern?: string | undefined;
363
+ email?: boolean | undefined;
364
+ url?: boolean | undefined;
365
+ phone?: boolean | undefined;
366
+ step?: number | undefined;
367
+ minItems?: number | undefined;
368
+ maxItems?: number | undefined;
369
+ }, {
370
+ required?: boolean | undefined;
371
+ multipleOf?: number | undefined;
372
+ minLength?: number | undefined;
373
+ maxLength?: number | undefined;
374
+ min?: number | undefined;
375
+ max?: number | undefined;
376
+ pattern?: string | undefined;
377
+ email?: boolean | undefined;
378
+ url?: boolean | undefined;
379
+ phone?: boolean | undefined;
380
+ step?: number | undefined;
381
+ minItems?: number | undefined;
382
+ maxItems?: number | undefined;
383
+ }>>;
384
+ renderHints: z.ZodOptional<z.ZodObject<{
385
+ label: z.ZodOptional<z.ZodString>;
386
+ widget: z.ZodOptional<z.ZodEnum<["text", "textarea", "select", "date", "checkbox"]>>;
387
+ order: z.ZodOptional<z.ZodNumber>;
388
+ section: z.ZodOptional<z.ZodString>;
389
+ helpText: z.ZodOptional<z.ZodString>;
390
+ displayField: z.ZodOptional<z.ZodBoolean>;
391
+ }, "strict", z.ZodTypeAny, {
392
+ label?: string | undefined;
393
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
394
+ order?: number | undefined;
395
+ section?: string | undefined;
396
+ helpText?: string | undefined;
397
+ displayField?: boolean | undefined;
398
+ }, {
399
+ label?: string | undefined;
400
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
401
+ order?: number | undefined;
402
+ section?: string | undefined;
403
+ helpText?: string | undefined;
404
+ displayField?: boolean | undefined;
405
+ }>>;
406
+ sensitive: z.ZodOptional<z.ZodBoolean>;
407
+ targetTypeName: z.ZodOptional<z.ZodString>;
408
+ targetField: z.ZodOptional<z.ZodString>;
409
+ targetSurface: z.ZodOptional<z.ZodEnum<["record", "document", "user", "org", "client"]>>;
410
+ cardinality: z.ZodOptional<z.ZodEnum<["one", "many"]>>;
411
+ }, "strict", z.ZodTypeAny, {
412
+ fieldId: string;
413
+ fieldType: string;
414
+ description?: string | undefined;
415
+ required?: boolean | undefined;
416
+ searchable?: boolean | undefined;
417
+ filterable?: boolean | undefined;
418
+ validation?: {
419
+ required?: boolean | undefined;
420
+ multipleOf?: number | undefined;
421
+ minLength?: number | undefined;
422
+ maxLength?: number | undefined;
423
+ min?: number | undefined;
424
+ max?: number | undefined;
425
+ pattern?: string | undefined;
426
+ email?: boolean | undefined;
427
+ url?: boolean | undefined;
428
+ phone?: boolean | undefined;
429
+ step?: number | undefined;
430
+ minItems?: number | undefined;
431
+ maxItems?: number | undefined;
432
+ } | undefined;
433
+ enumValues?: string[] | undefined;
434
+ renderHints?: {
435
+ label?: string | undefined;
436
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
437
+ order?: number | undefined;
438
+ section?: string | undefined;
439
+ helpText?: string | undefined;
440
+ displayField?: boolean | undefined;
441
+ } | undefined;
442
+ sensitive?: boolean | undefined;
443
+ targetTypeName?: string | undefined;
444
+ targetField?: string | undefined;
445
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
446
+ cardinality?: "many" | "one" | undefined;
447
+ }, {
448
+ fieldId: string;
449
+ fieldType: string;
450
+ description?: string | undefined;
451
+ required?: boolean | undefined;
452
+ searchable?: boolean | undefined;
453
+ filterable?: boolean | undefined;
454
+ validation?: {
455
+ required?: boolean | undefined;
456
+ multipleOf?: number | undefined;
457
+ minLength?: number | undefined;
458
+ maxLength?: number | undefined;
459
+ min?: number | undefined;
460
+ max?: number | undefined;
461
+ pattern?: string | undefined;
462
+ email?: boolean | undefined;
463
+ url?: boolean | undefined;
464
+ phone?: boolean | undefined;
465
+ step?: number | undefined;
466
+ minItems?: number | undefined;
467
+ maxItems?: number | undefined;
468
+ } | undefined;
469
+ enumValues?: string[] | undefined;
470
+ renderHints?: {
471
+ label?: string | undefined;
472
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
473
+ order?: number | undefined;
474
+ section?: string | undefined;
475
+ helpText?: string | undefined;
476
+ displayField?: boolean | undefined;
477
+ } | undefined;
478
+ sensitive?: boolean | undefined;
479
+ targetTypeName?: string | undefined;
480
+ targetField?: string | undefined;
481
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
482
+ cardinality?: "many" | "one" | undefined;
483
+ }>, {
484
+ fieldId: string;
485
+ fieldType: string;
486
+ description?: string | undefined;
487
+ required?: boolean | undefined;
488
+ searchable?: boolean | undefined;
489
+ filterable?: boolean | undefined;
490
+ validation?: {
491
+ required?: boolean | undefined;
492
+ multipleOf?: number | undefined;
493
+ minLength?: number | undefined;
494
+ maxLength?: number | undefined;
495
+ min?: number | undefined;
496
+ max?: number | undefined;
497
+ pattern?: string | undefined;
498
+ email?: boolean | undefined;
499
+ url?: boolean | undefined;
500
+ phone?: boolean | undefined;
501
+ step?: number | undefined;
502
+ minItems?: number | undefined;
503
+ maxItems?: number | undefined;
504
+ } | undefined;
505
+ enumValues?: string[] | undefined;
506
+ renderHints?: {
507
+ label?: string | undefined;
508
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
509
+ order?: number | undefined;
510
+ section?: string | undefined;
511
+ helpText?: string | undefined;
512
+ displayField?: boolean | undefined;
513
+ } | undefined;
514
+ sensitive?: boolean | undefined;
515
+ targetTypeName?: string | undefined;
516
+ targetField?: string | undefined;
517
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
518
+ cardinality?: "many" | "one" | undefined;
519
+ }, {
520
+ fieldId: string;
521
+ fieldType: string;
522
+ description?: string | undefined;
523
+ required?: boolean | undefined;
524
+ searchable?: boolean | undefined;
525
+ filterable?: boolean | undefined;
526
+ validation?: {
527
+ required?: boolean | undefined;
528
+ multipleOf?: number | undefined;
529
+ minLength?: number | undefined;
530
+ maxLength?: number | undefined;
531
+ min?: number | undefined;
532
+ max?: number | undefined;
533
+ pattern?: string | undefined;
534
+ email?: boolean | undefined;
535
+ url?: boolean | undefined;
536
+ phone?: boolean | undefined;
537
+ step?: number | undefined;
538
+ minItems?: number | undefined;
539
+ maxItems?: number | undefined;
540
+ } | undefined;
541
+ enumValues?: string[] | undefined;
542
+ renderHints?: {
543
+ label?: string | undefined;
544
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
545
+ order?: number | undefined;
546
+ section?: string | undefined;
547
+ helpText?: string | undefined;
548
+ displayField?: boolean | undefined;
549
+ } | undefined;
550
+ sensitive?: boolean | undefined;
551
+ targetTypeName?: string | undefined;
552
+ targetField?: string | undefined;
553
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
554
+ cardinality?: "many" | "one" | undefined;
555
+ }>, "many">>;
556
+ lookupFields: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
557
+ fieldName: z.ZodString;
558
+ unique: z.ZodOptional<z.ZodBoolean>;
559
+ rangeEnabled: z.ZodOptional<z.ZodBoolean>;
560
+ sortBy: z.ZodOptional<z.ZodString>;
561
+ allowOverflow: z.ZodOptional<z.ZodBoolean>;
562
+ }, "strict", z.ZodTypeAny, {
563
+ fieldName: string;
564
+ unique?: boolean | undefined;
565
+ rangeEnabled?: boolean | undefined;
566
+ sortBy?: string | undefined;
567
+ allowOverflow?: boolean | undefined;
568
+ }, {
569
+ fieldName: string;
570
+ unique?: boolean | undefined;
571
+ rangeEnabled?: boolean | undefined;
572
+ sortBy?: string | undefined;
573
+ allowOverflow?: boolean | undefined;
574
+ }>]>, "many">>;
575
+ allowedSurfaces: z.ZodOptional<z.ZodArray<z.ZodEnum<["record", "document", "user", "org", "client"]>, "many">>;
576
+ capabilities: z.ZodOptional<z.ZodObject<{
577
+ auditHistory: z.ZodOptional<z.ZodBoolean>;
578
+ }, "strict", z.ZodTypeAny, {
579
+ auditHistory?: boolean | undefined;
580
+ }, {
581
+ auditHistory?: boolean | undefined;
582
+ }>>;
583
+ active: z.ZodOptional<z.ZodBoolean>;
584
+ userId: z.ZodOptional<z.ZodString>;
585
+ orgId: z.ZodOptional<z.ZodString>;
586
+ clientId: z.ZodOptional<z.ZodString>;
587
+ }, "strict", z.ZodTypeAny, {
588
+ typeName: string;
589
+ displayName: string;
590
+ fields: {
591
+ fieldId: string;
592
+ fieldType: string;
593
+ description?: string | undefined;
594
+ required?: boolean | undefined;
595
+ searchable?: boolean | undefined;
596
+ filterable?: boolean | undefined;
597
+ validation?: {
598
+ required?: boolean | undefined;
599
+ multipleOf?: number | undefined;
600
+ minLength?: number | undefined;
601
+ maxLength?: number | undefined;
602
+ min?: number | undefined;
603
+ max?: number | undefined;
604
+ pattern?: string | undefined;
605
+ email?: boolean | undefined;
606
+ url?: boolean | undefined;
607
+ phone?: boolean | undefined;
608
+ step?: number | undefined;
609
+ minItems?: number | undefined;
610
+ maxItems?: number | undefined;
611
+ } | undefined;
612
+ enumValues?: string[] | undefined;
613
+ renderHints?: {
614
+ label?: string | undefined;
615
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
616
+ order?: number | undefined;
617
+ section?: string | undefined;
618
+ helpText?: string | undefined;
619
+ displayField?: boolean | undefined;
620
+ } | undefined;
621
+ sensitive?: boolean | undefined;
622
+ targetTypeName?: string | undefined;
623
+ targetField?: string | undefined;
624
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
625
+ cardinality?: "many" | "one" | undefined;
626
+ }[];
627
+ description?: string | undefined;
628
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
629
+ lookupFields?: (string | {
630
+ fieldName: string;
631
+ unique?: boolean | undefined;
632
+ rangeEnabled?: boolean | undefined;
633
+ sortBy?: string | undefined;
634
+ allowOverflow?: boolean | undefined;
635
+ })[] | undefined;
636
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
637
+ capabilities?: {
638
+ auditHistory?: boolean | undefined;
639
+ } | undefined;
640
+ active?: boolean | undefined;
641
+ userId?: string | undefined;
642
+ orgId?: string | undefined;
643
+ clientId?: string | undefined;
644
+ }, {
645
+ typeName: string;
646
+ displayName: string;
647
+ description?: string | undefined;
648
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
649
+ fields?: {
650
+ fieldId: string;
651
+ fieldType: string;
652
+ description?: string | undefined;
653
+ required?: boolean | undefined;
654
+ searchable?: boolean | undefined;
655
+ filterable?: boolean | undefined;
656
+ validation?: {
657
+ required?: boolean | undefined;
658
+ multipleOf?: number | undefined;
659
+ minLength?: number | undefined;
660
+ maxLength?: number | undefined;
661
+ min?: number | undefined;
662
+ max?: number | undefined;
663
+ pattern?: string | undefined;
664
+ email?: boolean | undefined;
665
+ url?: boolean | undefined;
666
+ phone?: boolean | undefined;
667
+ step?: number | undefined;
668
+ minItems?: number | undefined;
669
+ maxItems?: number | undefined;
670
+ } | undefined;
671
+ enumValues?: string[] | undefined;
672
+ renderHints?: {
673
+ label?: string | undefined;
674
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
675
+ order?: number | undefined;
676
+ section?: string | undefined;
677
+ helpText?: string | undefined;
678
+ displayField?: boolean | undefined;
679
+ } | undefined;
680
+ sensitive?: boolean | undefined;
681
+ targetTypeName?: string | undefined;
682
+ targetField?: string | undefined;
683
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
684
+ cardinality?: "many" | "one" | undefined;
685
+ }[] | undefined;
686
+ lookupFields?: (string | {
687
+ fieldName: string;
688
+ unique?: boolean | undefined;
689
+ rangeEnabled?: boolean | undefined;
690
+ sortBy?: string | undefined;
691
+ allowOverflow?: boolean | undefined;
692
+ })[] | undefined;
693
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
694
+ capabilities?: {
695
+ auditHistory?: boolean | undefined;
696
+ } | undefined;
697
+ active?: boolean | undefined;
698
+ userId?: string | undefined;
699
+ orgId?: string | undefined;
700
+ clientId?: string | undefined;
701
+ }>;
702
+ declare const BlueprintRoleClauseSchema: z.ZodObject<{
703
+ allowedActions: z.ZodArray<z.ZodString, "many">;
704
+ dataScope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNull]>, "many">>>;
705
+ }, "strict", z.ZodTypeAny, {
706
+ allowedActions: string[];
707
+ dataScope?: Record<string, (string | null)[]> | undefined;
708
+ }, {
709
+ allowedActions: string[];
710
+ dataScope?: Record<string, (string | null)[]> | undefined;
711
+ }>;
712
+ declare const BlueprintRolesSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
713
+ allowedActions: z.ZodArray<z.ZodString, "many">;
714
+ dataScope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNull]>, "many">>>;
715
+ }, "strict", z.ZodTypeAny, {
716
+ allowedActions: string[];
717
+ dataScope?: Record<string, (string | null)[]> | undefined;
718
+ }, {
719
+ allowedActions: string[];
720
+ dataScope?: Record<string, (string | null)[]> | undefined;
721
+ }>, "many">>;
722
+ declare const IdentityDeclSchema: z.ZodObject<{
723
+ kind: z.ZodEnum<["user", "org", "client"]>;
724
+ externalId: z.ZodString;
725
+ displayName: z.ZodOptional<z.ZodString>;
726
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
727
+ }, "strict", z.ZodTypeAny, {
728
+ externalId: string;
729
+ kind: "user" | "org" | "client";
730
+ displayName?: string | undefined;
731
+ metadata?: Record<string, unknown> | undefined;
732
+ }, {
733
+ externalId: string;
734
+ kind: "user" | "org" | "client";
735
+ displayName?: string | undefined;
736
+ metadata?: Record<string, unknown> | undefined;
737
+ }>;
738
+ declare const IdentitiesDeclSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
739
+ kind: z.ZodEnum<["user", "org", "client"]>;
740
+ externalId: z.ZodString;
741
+ displayName: z.ZodOptional<z.ZodString>;
742
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
743
+ }, "strict", z.ZodTypeAny, {
744
+ externalId: string;
745
+ kind: "user" | "org" | "client";
746
+ displayName?: string | undefined;
747
+ metadata?: Record<string, unknown> | undefined;
748
+ }, {
749
+ externalId: string;
750
+ kind: "user" | "org" | "client";
751
+ displayName?: string | undefined;
752
+ metadata?: Record<string, unknown> | undefined;
753
+ }>>;
754
+ declare const BlueprintSeedRecordSchema: z.ZodObject<{
755
+ typeName: z.ZodString;
756
+ externalId: z.ZodString;
757
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
758
+ }, "strict", z.ZodTypeAny, {
759
+ typeName: string;
760
+ fields: Record<string, unknown>;
761
+ externalId: string;
762
+ }, {
763
+ typeName: string;
764
+ fields: Record<string, unknown>;
765
+ externalId: string;
766
+ }>;
767
+ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
768
+ /** Stable blueprint id (the `--blueprint <name>` selector + idempotency key). */
769
+ name: z.ZodString;
770
+ version: z.ZodString;
771
+ description: z.ZodString;
772
+ /** The app-context the profile + scoped key bind to (e.g. "mcp"). */
773
+ contextId: z.ZodString;
774
+ /** Human-readable app-context name; defaults to `MCP — <name>` (see {@link contextNameOf}) when absent. */
775
+ contextName: z.ZodOptional<z.ZodString>;
776
+ schemas: z.ZodDefault<z.ZodArray<z.ZodObject<{
777
+ typeName: z.ZodString;
778
+ displayName: z.ZodString;
779
+ description: z.ZodOptional<z.ZodString>;
780
+ indexMode: z.ZodOptional<z.ZodEnum<["HYBRID", "SEMANTIC", "TEXT"]>>;
781
+ fields: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
782
+ fieldId: z.ZodString;
783
+ fieldType: z.ZodString;
784
+ required: z.ZodOptional<z.ZodBoolean>;
785
+ searchable: z.ZodOptional<z.ZodBoolean>;
786
+ filterable: z.ZodOptional<z.ZodBoolean>;
787
+ enumValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
788
+ description: z.ZodOptional<z.ZodString>;
789
+ validation: z.ZodOptional<z.ZodObject<{
790
+ required: z.ZodOptional<z.ZodBoolean>;
791
+ minLength: z.ZodOptional<z.ZodNumber>;
792
+ maxLength: z.ZodOptional<z.ZodNumber>;
793
+ min: z.ZodOptional<z.ZodNumber>;
794
+ max: z.ZodOptional<z.ZodNumber>;
795
+ pattern: z.ZodOptional<z.ZodString>;
796
+ email: z.ZodOptional<z.ZodBoolean>;
797
+ url: z.ZodOptional<z.ZodBoolean>;
798
+ phone: z.ZodOptional<z.ZodBoolean>;
799
+ step: z.ZodOptional<z.ZodNumber>;
800
+ multipleOf: z.ZodOptional<z.ZodNumber>;
801
+ minItems: z.ZodOptional<z.ZodNumber>;
802
+ maxItems: z.ZodOptional<z.ZodNumber>;
803
+ }, "strict", z.ZodTypeAny, {
804
+ required?: boolean | undefined;
805
+ multipleOf?: number | undefined;
806
+ minLength?: number | undefined;
807
+ maxLength?: number | undefined;
808
+ min?: number | undefined;
809
+ max?: number | undefined;
810
+ pattern?: string | undefined;
811
+ email?: boolean | undefined;
812
+ url?: boolean | undefined;
813
+ phone?: boolean | undefined;
814
+ step?: number | undefined;
815
+ minItems?: number | undefined;
816
+ maxItems?: number | undefined;
817
+ }, {
818
+ required?: boolean | undefined;
819
+ multipleOf?: number | undefined;
820
+ minLength?: number | undefined;
821
+ maxLength?: number | undefined;
822
+ min?: number | undefined;
823
+ max?: number | undefined;
824
+ pattern?: string | undefined;
825
+ email?: boolean | undefined;
826
+ url?: boolean | undefined;
827
+ phone?: boolean | undefined;
828
+ step?: number | undefined;
829
+ minItems?: number | undefined;
830
+ maxItems?: number | undefined;
831
+ }>>;
832
+ renderHints: z.ZodOptional<z.ZodObject<{
833
+ label: z.ZodOptional<z.ZodString>;
834
+ widget: z.ZodOptional<z.ZodEnum<["text", "textarea", "select", "date", "checkbox"]>>;
835
+ order: z.ZodOptional<z.ZodNumber>;
836
+ section: z.ZodOptional<z.ZodString>;
837
+ helpText: z.ZodOptional<z.ZodString>;
838
+ displayField: z.ZodOptional<z.ZodBoolean>;
839
+ }, "strict", z.ZodTypeAny, {
840
+ label?: string | undefined;
841
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
842
+ order?: number | undefined;
843
+ section?: string | undefined;
844
+ helpText?: string | undefined;
845
+ displayField?: boolean | undefined;
846
+ }, {
847
+ label?: string | undefined;
848
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
849
+ order?: number | undefined;
850
+ section?: string | undefined;
851
+ helpText?: string | undefined;
852
+ displayField?: boolean | undefined;
853
+ }>>;
854
+ sensitive: z.ZodOptional<z.ZodBoolean>;
855
+ targetTypeName: z.ZodOptional<z.ZodString>;
856
+ targetField: z.ZodOptional<z.ZodString>;
857
+ targetSurface: z.ZodOptional<z.ZodEnum<["record", "document", "user", "org", "client"]>>;
858
+ cardinality: z.ZodOptional<z.ZodEnum<["one", "many"]>>;
859
+ }, "strict", z.ZodTypeAny, {
860
+ fieldId: string;
861
+ fieldType: string;
862
+ description?: string | undefined;
863
+ required?: boolean | undefined;
864
+ searchable?: boolean | undefined;
865
+ filterable?: boolean | undefined;
866
+ validation?: {
867
+ required?: boolean | undefined;
868
+ multipleOf?: number | undefined;
869
+ minLength?: number | undefined;
870
+ maxLength?: number | undefined;
871
+ min?: number | undefined;
872
+ max?: number | undefined;
873
+ pattern?: string | undefined;
874
+ email?: boolean | undefined;
875
+ url?: boolean | undefined;
876
+ phone?: boolean | undefined;
877
+ step?: number | undefined;
878
+ minItems?: number | undefined;
879
+ maxItems?: number | undefined;
880
+ } | undefined;
881
+ enumValues?: string[] | undefined;
882
+ renderHints?: {
883
+ label?: string | undefined;
884
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
885
+ order?: number | undefined;
886
+ section?: string | undefined;
887
+ helpText?: string | undefined;
888
+ displayField?: boolean | undefined;
889
+ } | undefined;
890
+ sensitive?: boolean | undefined;
891
+ targetTypeName?: string | undefined;
892
+ targetField?: string | undefined;
893
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
894
+ cardinality?: "many" | "one" | undefined;
895
+ }, {
896
+ fieldId: string;
897
+ fieldType: string;
898
+ description?: string | undefined;
899
+ required?: boolean | undefined;
900
+ searchable?: boolean | undefined;
901
+ filterable?: boolean | undefined;
902
+ validation?: {
903
+ required?: boolean | undefined;
904
+ multipleOf?: number | undefined;
905
+ minLength?: number | undefined;
906
+ maxLength?: number | undefined;
907
+ min?: number | undefined;
908
+ max?: number | undefined;
909
+ pattern?: string | undefined;
910
+ email?: boolean | undefined;
911
+ url?: boolean | undefined;
912
+ phone?: boolean | undefined;
913
+ step?: number | undefined;
914
+ minItems?: number | undefined;
915
+ maxItems?: number | undefined;
916
+ } | undefined;
917
+ enumValues?: string[] | undefined;
918
+ renderHints?: {
919
+ label?: string | undefined;
920
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
921
+ order?: number | undefined;
922
+ section?: string | undefined;
923
+ helpText?: string | undefined;
924
+ displayField?: boolean | undefined;
925
+ } | undefined;
926
+ sensitive?: boolean | undefined;
927
+ targetTypeName?: string | undefined;
928
+ targetField?: string | undefined;
929
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
930
+ cardinality?: "many" | "one" | undefined;
931
+ }>, {
932
+ fieldId: string;
933
+ fieldType: string;
934
+ description?: string | undefined;
935
+ required?: boolean | undefined;
936
+ searchable?: boolean | undefined;
937
+ filterable?: boolean | undefined;
938
+ validation?: {
939
+ required?: boolean | undefined;
940
+ multipleOf?: number | undefined;
941
+ minLength?: number | undefined;
942
+ maxLength?: number | undefined;
943
+ min?: number | undefined;
944
+ max?: number | undefined;
945
+ pattern?: string | undefined;
946
+ email?: boolean | undefined;
947
+ url?: boolean | undefined;
948
+ phone?: boolean | undefined;
949
+ step?: number | undefined;
950
+ minItems?: number | undefined;
951
+ maxItems?: number | undefined;
952
+ } | undefined;
953
+ enumValues?: string[] | undefined;
954
+ renderHints?: {
955
+ label?: string | undefined;
956
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
957
+ order?: number | undefined;
958
+ section?: string | undefined;
959
+ helpText?: string | undefined;
960
+ displayField?: boolean | undefined;
961
+ } | undefined;
962
+ sensitive?: boolean | undefined;
963
+ targetTypeName?: string | undefined;
964
+ targetField?: string | undefined;
965
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
966
+ cardinality?: "many" | "one" | undefined;
967
+ }, {
968
+ fieldId: string;
969
+ fieldType: string;
970
+ description?: string | undefined;
971
+ required?: boolean | undefined;
972
+ searchable?: boolean | undefined;
973
+ filterable?: boolean | undefined;
974
+ validation?: {
975
+ required?: boolean | undefined;
976
+ multipleOf?: number | undefined;
977
+ minLength?: number | undefined;
978
+ maxLength?: number | undefined;
979
+ min?: number | undefined;
980
+ max?: number | undefined;
981
+ pattern?: string | undefined;
982
+ email?: boolean | undefined;
983
+ url?: boolean | undefined;
984
+ phone?: boolean | undefined;
985
+ step?: number | undefined;
986
+ minItems?: number | undefined;
987
+ maxItems?: number | undefined;
988
+ } | undefined;
989
+ enumValues?: string[] | undefined;
990
+ renderHints?: {
991
+ label?: string | undefined;
992
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
993
+ order?: number | undefined;
994
+ section?: string | undefined;
995
+ helpText?: string | undefined;
996
+ displayField?: boolean | undefined;
997
+ } | undefined;
998
+ sensitive?: boolean | undefined;
999
+ targetTypeName?: string | undefined;
1000
+ targetField?: string | undefined;
1001
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
1002
+ cardinality?: "many" | "one" | undefined;
1003
+ }>, "many">>;
1004
+ lookupFields: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1005
+ fieldName: z.ZodString;
1006
+ unique: z.ZodOptional<z.ZodBoolean>;
1007
+ rangeEnabled: z.ZodOptional<z.ZodBoolean>;
1008
+ sortBy: z.ZodOptional<z.ZodString>;
1009
+ allowOverflow: z.ZodOptional<z.ZodBoolean>;
1010
+ }, "strict", z.ZodTypeAny, {
1011
+ fieldName: string;
1012
+ unique?: boolean | undefined;
1013
+ rangeEnabled?: boolean | undefined;
1014
+ sortBy?: string | undefined;
1015
+ allowOverflow?: boolean | undefined;
1016
+ }, {
1017
+ fieldName: string;
1018
+ unique?: boolean | undefined;
1019
+ rangeEnabled?: boolean | undefined;
1020
+ sortBy?: string | undefined;
1021
+ allowOverflow?: boolean | undefined;
1022
+ }>]>, "many">>;
1023
+ allowedSurfaces: z.ZodOptional<z.ZodArray<z.ZodEnum<["record", "document", "user", "org", "client"]>, "many">>;
1024
+ capabilities: z.ZodOptional<z.ZodObject<{
1025
+ auditHistory: z.ZodOptional<z.ZodBoolean>;
1026
+ }, "strict", z.ZodTypeAny, {
1027
+ auditHistory?: boolean | undefined;
1028
+ }, {
1029
+ auditHistory?: boolean | undefined;
1030
+ }>>;
1031
+ active: z.ZodOptional<z.ZodBoolean>;
1032
+ userId: z.ZodOptional<z.ZodString>;
1033
+ orgId: z.ZodOptional<z.ZodString>;
1034
+ clientId: z.ZodOptional<z.ZodString>;
1035
+ }, "strict", z.ZodTypeAny, {
1036
+ typeName: string;
1037
+ displayName: string;
1038
+ fields: {
1039
+ fieldId: string;
1040
+ fieldType: string;
1041
+ description?: string | undefined;
1042
+ required?: boolean | undefined;
1043
+ searchable?: boolean | undefined;
1044
+ filterable?: boolean | undefined;
1045
+ validation?: {
1046
+ required?: boolean | undefined;
1047
+ multipleOf?: number | undefined;
1048
+ minLength?: number | undefined;
1049
+ maxLength?: number | undefined;
1050
+ min?: number | undefined;
1051
+ max?: number | undefined;
1052
+ pattern?: string | undefined;
1053
+ email?: boolean | undefined;
1054
+ url?: boolean | undefined;
1055
+ phone?: boolean | undefined;
1056
+ step?: number | undefined;
1057
+ minItems?: number | undefined;
1058
+ maxItems?: number | undefined;
1059
+ } | undefined;
1060
+ enumValues?: string[] | undefined;
1061
+ renderHints?: {
1062
+ label?: string | undefined;
1063
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
1064
+ order?: number | undefined;
1065
+ section?: string | undefined;
1066
+ helpText?: string | undefined;
1067
+ displayField?: boolean | undefined;
1068
+ } | undefined;
1069
+ sensitive?: boolean | undefined;
1070
+ targetTypeName?: string | undefined;
1071
+ targetField?: string | undefined;
1072
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
1073
+ cardinality?: "many" | "one" | undefined;
1074
+ }[];
1075
+ description?: string | undefined;
1076
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
1077
+ lookupFields?: (string | {
1078
+ fieldName: string;
1079
+ unique?: boolean | undefined;
1080
+ rangeEnabled?: boolean | undefined;
1081
+ sortBy?: string | undefined;
1082
+ allowOverflow?: boolean | undefined;
1083
+ })[] | undefined;
1084
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
1085
+ capabilities?: {
1086
+ auditHistory?: boolean | undefined;
1087
+ } | undefined;
1088
+ active?: boolean | undefined;
1089
+ userId?: string | undefined;
1090
+ orgId?: string | undefined;
1091
+ clientId?: string | undefined;
1092
+ }, {
1093
+ typeName: string;
1094
+ displayName: string;
1095
+ description?: string | undefined;
1096
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
1097
+ fields?: {
1098
+ fieldId: string;
1099
+ fieldType: string;
1100
+ description?: string | undefined;
1101
+ required?: boolean | undefined;
1102
+ searchable?: boolean | undefined;
1103
+ filterable?: boolean | undefined;
1104
+ validation?: {
1105
+ required?: boolean | undefined;
1106
+ multipleOf?: number | undefined;
1107
+ minLength?: number | undefined;
1108
+ maxLength?: number | undefined;
1109
+ min?: number | undefined;
1110
+ max?: number | undefined;
1111
+ pattern?: string | undefined;
1112
+ email?: boolean | undefined;
1113
+ url?: boolean | undefined;
1114
+ phone?: boolean | undefined;
1115
+ step?: number | undefined;
1116
+ minItems?: number | undefined;
1117
+ maxItems?: number | undefined;
1118
+ } | undefined;
1119
+ enumValues?: string[] | undefined;
1120
+ renderHints?: {
1121
+ label?: string | undefined;
1122
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
1123
+ order?: number | undefined;
1124
+ section?: string | undefined;
1125
+ helpText?: string | undefined;
1126
+ displayField?: boolean | undefined;
1127
+ } | undefined;
1128
+ sensitive?: boolean | undefined;
1129
+ targetTypeName?: string | undefined;
1130
+ targetField?: string | undefined;
1131
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
1132
+ cardinality?: "many" | "one" | undefined;
1133
+ }[] | undefined;
1134
+ lookupFields?: (string | {
1135
+ fieldName: string;
1136
+ unique?: boolean | undefined;
1137
+ rangeEnabled?: boolean | undefined;
1138
+ sortBy?: string | undefined;
1139
+ allowOverflow?: boolean | undefined;
1140
+ })[] | undefined;
1141
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
1142
+ capabilities?: {
1143
+ auditHistory?: boolean | undefined;
1144
+ } | undefined;
1145
+ active?: boolean | undefined;
1146
+ userId?: string | undefined;
1147
+ orgId?: string | undefined;
1148
+ clientId?: string | undefined;
1149
+ }>, "many">>;
1150
+ accessProfile: z.ZodObject<{
1151
+ allowedActions: z.ZodArray<z.ZodString, "many">;
1152
+ dataScope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNull]>, "many">>>;
1153
+ }, "strict", z.ZodTypeAny, {
1154
+ allowedActions: string[];
1155
+ dataScope?: Record<string, (string | null)[]> | undefined;
1156
+ }, {
1157
+ allowedActions: string[];
1158
+ dataScope?: Record<string, (string | null)[]> | undefined;
1159
+ }>;
1160
+ servicePrincipal: z.ZodObject<{
1161
+ externalId: z.ZodString;
1162
+ displayName: z.ZodString;
1163
+ }, "strict", z.ZodTypeAny, {
1164
+ displayName: string;
1165
+ externalId: string;
1166
+ }, {
1167
+ displayName: string;
1168
+ externalId: string;
1169
+ }>;
1170
+ seed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1171
+ typeName: z.ZodString;
1172
+ externalId: z.ZodString;
1173
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1174
+ }, "strict", z.ZodTypeAny, {
1175
+ typeName: string;
1176
+ fields: Record<string, unknown>;
1177
+ externalId: string;
1178
+ }, {
1179
+ typeName: string;
1180
+ fields: Record<string, unknown>;
1181
+ externalId: string;
1182
+ }>, "many">>;
1183
+ /** Optional multi-clause roles, bound to principals via `access grant --role`. */
1184
+ roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1185
+ allowedActions: z.ZodArray<z.ZodString, "many">;
1186
+ dataScope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNull]>, "many">>>;
1187
+ }, "strict", z.ZodTypeAny, {
1188
+ allowedActions: string[];
1189
+ dataScope?: Record<string, (string | null)[]> | undefined;
1190
+ }, {
1191
+ allowedActions: string[];
1192
+ dataScope?: Record<string, (string | null)[]> | undefined;
1193
+ }>, "many">>>;
1194
+ /** Optional principals ensured-exist at apply; referenced via ${{ identities.* }}. */
1195
+ identities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1196
+ kind: z.ZodEnum<["user", "org", "client"]>;
1197
+ externalId: z.ZodString;
1198
+ displayName: z.ZodOptional<z.ZodString>;
1199
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1200
+ }, "strict", z.ZodTypeAny, {
1201
+ externalId: string;
1202
+ kind: "user" | "org" | "client";
1203
+ displayName?: string | undefined;
1204
+ metadata?: Record<string, unknown> | undefined;
1205
+ }, {
1206
+ externalId: string;
1207
+ kind: "user" | "org" | "client";
1208
+ displayName?: string | undefined;
1209
+ metadata?: Record<string, unknown> | undefined;
1210
+ }>>>;
1211
+ }, "strict", z.ZodTypeAny, {
1212
+ name: string;
1213
+ version: string;
1214
+ description: string;
1215
+ contextId: string;
1216
+ schemas: {
1217
+ typeName: string;
1218
+ displayName: string;
1219
+ fields: {
1220
+ fieldId: string;
1221
+ fieldType: string;
1222
+ description?: string | undefined;
1223
+ required?: boolean | undefined;
1224
+ searchable?: boolean | undefined;
1225
+ filterable?: boolean | undefined;
1226
+ validation?: {
1227
+ required?: boolean | undefined;
1228
+ multipleOf?: number | undefined;
1229
+ minLength?: number | undefined;
1230
+ maxLength?: number | undefined;
1231
+ min?: number | undefined;
1232
+ max?: number | undefined;
1233
+ pattern?: string | undefined;
1234
+ email?: boolean | undefined;
1235
+ url?: boolean | undefined;
1236
+ phone?: boolean | undefined;
1237
+ step?: number | undefined;
1238
+ minItems?: number | undefined;
1239
+ maxItems?: number | undefined;
1240
+ } | undefined;
1241
+ enumValues?: string[] | undefined;
1242
+ renderHints?: {
1243
+ label?: string | undefined;
1244
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
1245
+ order?: number | undefined;
1246
+ section?: string | undefined;
1247
+ helpText?: string | undefined;
1248
+ displayField?: boolean | undefined;
1249
+ } | undefined;
1250
+ sensitive?: boolean | undefined;
1251
+ targetTypeName?: string | undefined;
1252
+ targetField?: string | undefined;
1253
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
1254
+ cardinality?: "many" | "one" | undefined;
1255
+ }[];
1256
+ description?: string | undefined;
1257
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
1258
+ lookupFields?: (string | {
1259
+ fieldName: string;
1260
+ unique?: boolean | undefined;
1261
+ rangeEnabled?: boolean | undefined;
1262
+ sortBy?: string | undefined;
1263
+ allowOverflow?: boolean | undefined;
1264
+ })[] | undefined;
1265
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
1266
+ capabilities?: {
1267
+ auditHistory?: boolean | undefined;
1268
+ } | undefined;
1269
+ active?: boolean | undefined;
1270
+ userId?: string | undefined;
1271
+ orgId?: string | undefined;
1272
+ clientId?: string | undefined;
1273
+ }[];
1274
+ accessProfile: {
1275
+ allowedActions: string[];
1276
+ dataScope?: Record<string, (string | null)[]> | undefined;
1277
+ };
1278
+ servicePrincipal: {
1279
+ displayName: string;
1280
+ externalId: string;
1281
+ };
1282
+ contextName?: string | undefined;
1283
+ seed?: {
1284
+ typeName: string;
1285
+ fields: Record<string, unknown>;
1286
+ externalId: string;
1287
+ }[] | undefined;
1288
+ roles?: Record<string, {
1289
+ allowedActions: string[];
1290
+ dataScope?: Record<string, (string | null)[]> | undefined;
1291
+ }[]> | undefined;
1292
+ identities?: Record<string, {
1293
+ externalId: string;
1294
+ kind: "user" | "org" | "client";
1295
+ displayName?: string | undefined;
1296
+ metadata?: Record<string, unknown> | undefined;
1297
+ }> | undefined;
1298
+ }, {
1299
+ name: string;
1300
+ version: string;
1301
+ description: string;
1302
+ contextId: string;
1303
+ accessProfile: {
1304
+ allowedActions: string[];
1305
+ dataScope?: Record<string, (string | null)[]> | undefined;
1306
+ };
1307
+ servicePrincipal: {
1308
+ displayName: string;
1309
+ externalId: string;
1310
+ };
1311
+ contextName?: string | undefined;
1312
+ schemas?: {
1313
+ typeName: string;
1314
+ displayName: string;
1315
+ description?: string | undefined;
1316
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
1317
+ fields?: {
1318
+ fieldId: string;
1319
+ fieldType: string;
1320
+ description?: string | undefined;
1321
+ required?: boolean | undefined;
1322
+ searchable?: boolean | undefined;
1323
+ filterable?: boolean | undefined;
1324
+ validation?: {
1325
+ required?: boolean | undefined;
1326
+ multipleOf?: number | undefined;
1327
+ minLength?: number | undefined;
1328
+ maxLength?: number | undefined;
1329
+ min?: number | undefined;
1330
+ max?: number | undefined;
1331
+ pattern?: string | undefined;
1332
+ email?: boolean | undefined;
1333
+ url?: boolean | undefined;
1334
+ phone?: boolean | undefined;
1335
+ step?: number | undefined;
1336
+ minItems?: number | undefined;
1337
+ maxItems?: number | undefined;
1338
+ } | undefined;
1339
+ enumValues?: string[] | undefined;
1340
+ renderHints?: {
1341
+ label?: string | undefined;
1342
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
1343
+ order?: number | undefined;
1344
+ section?: string | undefined;
1345
+ helpText?: string | undefined;
1346
+ displayField?: boolean | undefined;
1347
+ } | undefined;
1348
+ sensitive?: boolean | undefined;
1349
+ targetTypeName?: string | undefined;
1350
+ targetField?: string | undefined;
1351
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
1352
+ cardinality?: "many" | "one" | undefined;
1353
+ }[] | undefined;
1354
+ lookupFields?: (string | {
1355
+ fieldName: string;
1356
+ unique?: boolean | undefined;
1357
+ rangeEnabled?: boolean | undefined;
1358
+ sortBy?: string | undefined;
1359
+ allowOverflow?: boolean | undefined;
1360
+ })[] | undefined;
1361
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
1362
+ capabilities?: {
1363
+ auditHistory?: boolean | undefined;
1364
+ } | undefined;
1365
+ active?: boolean | undefined;
1366
+ userId?: string | undefined;
1367
+ orgId?: string | undefined;
1368
+ clientId?: string | undefined;
1369
+ }[] | undefined;
1370
+ seed?: {
1371
+ typeName: string;
1372
+ fields: Record<string, unknown>;
1373
+ externalId: string;
1374
+ }[] | undefined;
1375
+ roles?: Record<string, {
1376
+ allowedActions: string[];
1377
+ dataScope?: Record<string, (string | null)[]> | undefined;
1378
+ }[]> | undefined;
1379
+ identities?: Record<string, {
1380
+ externalId: string;
1381
+ kind: "user" | "org" | "client";
1382
+ displayName?: string | undefined;
1383
+ metadata?: Record<string, unknown> | undefined;
1384
+ }> | undefined;
1385
+ }>, {
1386
+ name: string;
1387
+ version: string;
1388
+ description: string;
1389
+ contextId: string;
1390
+ schemas: {
1391
+ typeName: string;
1392
+ displayName: string;
1393
+ fields: {
1394
+ fieldId: string;
1395
+ fieldType: string;
1396
+ description?: string | undefined;
1397
+ required?: boolean | undefined;
1398
+ searchable?: boolean | undefined;
1399
+ filterable?: boolean | undefined;
1400
+ validation?: {
1401
+ required?: boolean | undefined;
1402
+ multipleOf?: number | undefined;
1403
+ minLength?: number | undefined;
1404
+ maxLength?: number | undefined;
1405
+ min?: number | undefined;
1406
+ max?: number | undefined;
1407
+ pattern?: string | undefined;
1408
+ email?: boolean | undefined;
1409
+ url?: boolean | undefined;
1410
+ phone?: boolean | undefined;
1411
+ step?: number | undefined;
1412
+ minItems?: number | undefined;
1413
+ maxItems?: number | undefined;
1414
+ } | undefined;
1415
+ enumValues?: string[] | undefined;
1416
+ renderHints?: {
1417
+ label?: string | undefined;
1418
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
1419
+ order?: number | undefined;
1420
+ section?: string | undefined;
1421
+ helpText?: string | undefined;
1422
+ displayField?: boolean | undefined;
1423
+ } | undefined;
1424
+ sensitive?: boolean | undefined;
1425
+ targetTypeName?: string | undefined;
1426
+ targetField?: string | undefined;
1427
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
1428
+ cardinality?: "many" | "one" | undefined;
1429
+ }[];
1430
+ description?: string | undefined;
1431
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
1432
+ lookupFields?: (string | {
1433
+ fieldName: string;
1434
+ unique?: boolean | undefined;
1435
+ rangeEnabled?: boolean | undefined;
1436
+ sortBy?: string | undefined;
1437
+ allowOverflow?: boolean | undefined;
1438
+ })[] | undefined;
1439
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
1440
+ capabilities?: {
1441
+ auditHistory?: boolean | undefined;
1442
+ } | undefined;
1443
+ active?: boolean | undefined;
1444
+ userId?: string | undefined;
1445
+ orgId?: string | undefined;
1446
+ clientId?: string | undefined;
1447
+ }[];
1448
+ accessProfile: {
1449
+ allowedActions: string[];
1450
+ dataScope?: Record<string, (string | null)[]> | undefined;
1451
+ };
1452
+ servicePrincipal: {
1453
+ displayName: string;
1454
+ externalId: string;
1455
+ };
1456
+ contextName?: string | undefined;
1457
+ seed?: {
1458
+ typeName: string;
1459
+ fields: Record<string, unknown>;
1460
+ externalId: string;
1461
+ }[] | undefined;
1462
+ roles?: Record<string, {
1463
+ allowedActions: string[];
1464
+ dataScope?: Record<string, (string | null)[]> | undefined;
1465
+ }[]> | undefined;
1466
+ identities?: Record<string, {
1467
+ externalId: string;
1468
+ kind: "user" | "org" | "client";
1469
+ displayName?: string | undefined;
1470
+ metadata?: Record<string, unknown> | undefined;
1471
+ }> | undefined;
1472
+ }, {
1473
+ name: string;
1474
+ version: string;
1475
+ description: string;
1476
+ contextId: string;
1477
+ accessProfile: {
1478
+ allowedActions: string[];
1479
+ dataScope?: Record<string, (string | null)[]> | undefined;
1480
+ };
1481
+ servicePrincipal: {
1482
+ displayName: string;
1483
+ externalId: string;
1484
+ };
1485
+ contextName?: string | undefined;
1486
+ schemas?: {
1487
+ typeName: string;
1488
+ displayName: string;
1489
+ description?: string | undefined;
1490
+ indexMode?: "HYBRID" | "SEMANTIC" | "TEXT" | undefined;
1491
+ fields?: {
1492
+ fieldId: string;
1493
+ fieldType: string;
1494
+ description?: string | undefined;
1495
+ required?: boolean | undefined;
1496
+ searchable?: boolean | undefined;
1497
+ filterable?: boolean | undefined;
1498
+ validation?: {
1499
+ required?: boolean | undefined;
1500
+ multipleOf?: number | undefined;
1501
+ minLength?: number | undefined;
1502
+ maxLength?: number | undefined;
1503
+ min?: number | undefined;
1504
+ max?: number | undefined;
1505
+ pattern?: string | undefined;
1506
+ email?: boolean | undefined;
1507
+ url?: boolean | undefined;
1508
+ phone?: boolean | undefined;
1509
+ step?: number | undefined;
1510
+ minItems?: number | undefined;
1511
+ maxItems?: number | undefined;
1512
+ } | undefined;
1513
+ enumValues?: string[] | undefined;
1514
+ renderHints?: {
1515
+ label?: string | undefined;
1516
+ widget?: "text" | "textarea" | "select" | "date" | "checkbox" | undefined;
1517
+ order?: number | undefined;
1518
+ section?: string | undefined;
1519
+ helpText?: string | undefined;
1520
+ displayField?: boolean | undefined;
1521
+ } | undefined;
1522
+ sensitive?: boolean | undefined;
1523
+ targetTypeName?: string | undefined;
1524
+ targetField?: string | undefined;
1525
+ targetSurface?: "record" | "document" | "user" | "org" | "client" | undefined;
1526
+ cardinality?: "many" | "one" | undefined;
1527
+ }[] | undefined;
1528
+ lookupFields?: (string | {
1529
+ fieldName: string;
1530
+ unique?: boolean | undefined;
1531
+ rangeEnabled?: boolean | undefined;
1532
+ sortBy?: string | undefined;
1533
+ allowOverflow?: boolean | undefined;
1534
+ })[] | undefined;
1535
+ allowedSurfaces?: ("record" | "document" | "user" | "org" | "client")[] | undefined;
1536
+ capabilities?: {
1537
+ auditHistory?: boolean | undefined;
1538
+ } | undefined;
1539
+ active?: boolean | undefined;
1540
+ userId?: string | undefined;
1541
+ orgId?: string | undefined;
1542
+ clientId?: string | undefined;
1543
+ }[] | undefined;
1544
+ seed?: {
1545
+ typeName: string;
1546
+ fields: Record<string, unknown>;
1547
+ externalId: string;
1548
+ }[] | undefined;
1549
+ roles?: Record<string, {
1550
+ allowedActions: string[];
1551
+ dataScope?: Record<string, (string | null)[]> | undefined;
1552
+ }[]> | undefined;
1553
+ identities?: Record<string, {
1554
+ externalId: string;
1555
+ kind: "user" | "org" | "client";
1556
+ displayName?: string | undefined;
1557
+ metadata?: Record<string, unknown> | undefined;
1558
+ }> | undefined;
1559
+ }>;
1560
+ type Blueprint = z.infer<typeof BlueprintSchema>;
1561
+ type BlueprintFieldDef = z.infer<typeof BlueprintFieldDefSchema>;
1562
+ type BlueprintSchemaDef = z.infer<typeof BlueprintSchemaSchema>;
1563
+ type BlueprintSeedRecord = z.infer<typeof BlueprintSeedRecordSchema>;
1564
+ type BlueprintValidationRules = z.infer<typeof ValidationRulesSchema>;
1565
+ type BlueprintRenderHints = z.infer<typeof RenderHintsSchema>;
1566
+ type BlueprintLookupField = z.infer<typeof BlueprintLookupFieldSchema>;
1567
+ type BlueprintRoleClause = z.infer<typeof BlueprintRoleClauseSchema>;
1568
+ type BlueprintRoles = z.infer<typeof BlueprintRolesSchema>;
1569
+ type IdentityDecl = z.infer<typeof IdentityDeclSchema>;
1570
+ type IdentitiesDecl = z.infer<typeof IdentitiesDeclSchema>;
1571
+ /**
1572
+ * A single structural validation problem, flattened to a readable field path +
1573
+ * message. Exposed on {@link BlueprintValidationError.issues} so programmatic
1574
+ * callers (a future web authoring UI, CI annotations) get structure without
1575
+ * re-parsing the rendered message.
1576
+ */
1577
+ interface BlueprintIssue {
1578
+ /** Dotted/bracketed path, e.g. `schemas[0].fields[1].fieldType`, or `(root)`. */
1579
+ path: string;
1580
+ message: string;
1581
+ }
1582
+ declare class BlueprintValidationError extends Error {
1583
+ /**
1584
+ * Structured per-field issues. Populated for STRUCTURAL failures (a bad
1585
+ * shape); empty for a JSON/YAML *parse* failure (where there's no field path,
1586
+ * just a syntax error in {@link Error.message}).
1587
+ */
1588
+ readonly issues: BlueprintIssue[];
1589
+ constructor(message: string, issues?: BlueprintIssue[]);
1590
+ }
1591
+ /**
1592
+ * Structurally parse + validate an untrusted blueprint object. Throws
1593
+ * {@link BlueprintValidationError} on a malformed shape — with a readable,
1594
+ * multi-line `path: message` body and the structured issues on `.issues`. Does
1595
+ * NOT run the scope gate — that's the CLI's job (the trust boundary).
1596
+ */
1597
+ declare function parseBlueprint(input: unknown): Blueprint;
1598
+ /**
1599
+ * Parse a blueprint from a JSON string (e.g. a file an agent assembled or
1600
+ * a community blueprint). Throws {@link BlueprintValidationError} on bad
1601
+ * JSON or a bad shape.
1602
+ */
1603
+ declare function parseBlueprintJson(json: string): Blueprint;
1604
+ /** The app-context display name, defaulting to `MCP — <name>` when {@link Blueprint.contextName} is absent. */
1605
+ declare function contextNameOf(blueprint: Blueprint): string;
1606
+
1607
+ /**
1608
+ * Identity resolution — the APPLY-time (creds-bearing) half of the blueprint
1609
+ * identity feature.
1610
+ *
1611
+ * A blueprint may declare a top-level `identities:` block (principals it expects
1612
+ * to exist) and reference them with `${{ identities.<name> }}` tokens anywhere a
1613
+ * principal id is valid (seed-record ownership, schema/profile dataScope, a role
1614
+ * clause). Resolution has TWO tiers — DO NOT conflate (mirrors inputs.ts):
1615
+ * - install-time (creds-free): {@link resolveBlueprintInputs} resolves
1616
+ * `${{ inputs.* }}`/`${{ vectros.* }}` and LEAVES `${{ identities.* }}` literal
1617
+ * (it is a deferred namespace).
1618
+ * - apply-time (creds): THIS module ensures each declared identity exists
1619
+ * (idempotently, by externalId — the injected `resolve` does the API call,
1620
+ * wired by the CLI install orchestrator) and substitutes the tokens with
1621
+ * the resolved principal ids.
1622
+ *
1623
+ * This module is the FORMAT half: the resolver is pure given an injected
1624
+ * `resolve` (so `plan` can dry-run/echo and tests can assert without creds). The
1625
+ * `identities` block shape lives in types.ts so {@link BlueprintSchema} validates
1626
+ * it offline (incl. the "every reference is declared" lint).
1627
+ */
1628
+
1629
+ /** Resolves a declared identity to its concrete principal id (idempotent, by externalId). */
1630
+ type IdentityResolver = (name: string, decl: IdentityDecl) => Promise<string>;
1631
+ /** A creds-bearing identity-resolution failure (undeclared ref, bad block, resolver error). */
1632
+ declare class BlueprintIdentityError extends Error {
1633
+ readonly issues: BlueprintIssue[];
1634
+ constructor(message: string, issues?: BlueprintIssue[]);
1635
+ }
1636
+ /** Every distinct identity name referenced by `${{ identities.<name> }}` in the tree. */
1637
+ declare function collectIdentityReferences(value: unknown): string[];
1638
+ /**
1639
+ * Resolve a blueprint's `identities:` against an injected creds-bearing resolver
1640
+ * and return the substituted tree WITH the `identities:` block stripped — ready
1641
+ * for {@link parseBlueprint}. Operates on the install-time-resolved tree (where
1642
+ * `${{ identities.* }}` tokens are still literal). Throws
1643
+ * {@link BlueprintIdentityError} on a malformed block, an undeclared reference,
1644
+ * or a resolver failure.
1645
+ *
1646
+ * EVERY declared identity is resolved (ensure-exist), not only referenced ones,
1647
+ * so a blueprint can provision a principal it doesn't token-reference. A token
1648
+ * that references an undeclared identity is an error (also caught offline by
1649
+ * {@link BlueprintSchema}).
1650
+ */
1651
+ declare function resolveBlueprintIdentities(raw: unknown, resolve: IdentityResolver): Promise<unknown>;
1652
+
1653
+ /**
1654
+ * Blueprint variable substitution — the install-time resolver
1655
+ * (spec `blueprint-variable-substitution`).
1656
+ *
1657
+ * A blueprint can declare a top-level `inputs:` block and reference its values
1658
+ * (and a tiny reserved `vectros.*` built-in namespace) with GitHub-Actions-style
1659
+ * `${{ inputs.x }}` tokens in any STRING value. This module resolves those
1660
+ * tokens against supplied install-time values, BEFORE structural validation —
1661
+ * so the typed {@link Blueprint}, the loader, and bootstrap never see `inputs`
1662
+ * or an unresolved token. It is the FORMAT half of the feature: pure,
1663
+ * dependency-free (no node, no IO); the CLI owns YAML parsing + `--set`/`--values`.
1664
+ *
1665
+ * Two tiers — DO NOT conflate (spec §1):
1666
+ * - install-time substitution (HERE): `${{ inputs.x }}`, `${{ vectros.* }}`,
1667
+ * resolved by the trusted loader before any API call.
1668
+ * - the runtime sentinel `$self` (agent-memory): a literal value the platform
1669
+ * resolves per-principal at use. This resolver MUST leave `$self` and ANY
1670
+ * `$`-prefixed value untouched — it only ever matches the `${{ … }}` form.
1671
+ *
1672
+ * Security (spec §3): pure string replacement, no eval/template engine → no
1673
+ * template injection. The scope gate (the CLI trust boundary) runs on the
1674
+ * RESOLVED document, so a parameter cannot smuggle a control-plane scope past
1675
+ * it. Built-ins are intentionally tiny (`context`, `suffix`) — see the
1676
+ * auto-binding invariant in the spec §4: data-record externalIds are bound to
1677
+ * `(tenant, context[, identity])` server-side, so they need no namespace; only
1678
+ * tenant-wide service-principal externalIds do, which is what `vectros.suffix`
1679
+ * is for.
1680
+ */
1681
+
1682
+ /** Scalar value types an input may declare / resolve to (V1 — no objects/arrays). */
1683
+ type InputScalar = string | number | boolean;
1684
+ /** A single declared input (one entry under the top-level `inputs:` block). */
1685
+ declare const InputDeclSchema: z.ZodObject<{
1686
+ type: z.ZodEnum<["string", "number", "boolean"]>;
1687
+ required: z.ZodOptional<z.ZodBoolean>;
1688
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1689
+ description: z.ZodOptional<z.ZodString>;
1690
+ }, "strict", z.ZodTypeAny, {
1691
+ type: "string" | "number" | "boolean";
1692
+ description?: string | undefined;
1693
+ required?: boolean | undefined;
1694
+ default?: string | number | boolean | undefined;
1695
+ }, {
1696
+ type: "string" | "number" | "boolean";
1697
+ description?: string | undefined;
1698
+ required?: boolean | undefined;
1699
+ default?: string | number | boolean | undefined;
1700
+ }>;
1701
+ /** The top-level `inputs:` declaration block — a map of name → declaration. */
1702
+ declare const InputsDeclSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
1703
+ type: z.ZodEnum<["string", "number", "boolean"]>;
1704
+ required: z.ZodOptional<z.ZodBoolean>;
1705
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1706
+ description: z.ZodOptional<z.ZodString>;
1707
+ }, "strict", z.ZodTypeAny, {
1708
+ type: "string" | "number" | "boolean";
1709
+ description?: string | undefined;
1710
+ required?: boolean | undefined;
1711
+ default?: string | number | boolean | undefined;
1712
+ }, {
1713
+ type: "string" | "number" | "boolean";
1714
+ description?: string | undefined;
1715
+ required?: boolean | undefined;
1716
+ default?: string | number | boolean | undefined;
1717
+ }>>;
1718
+ type InputDecl = z.infer<typeof InputDeclSchema>;
1719
+ type InputsDecl = z.infer<typeof InputsDeclSchema>;
1720
+ /**
1721
+ * A variable-resolution failure (declaration, missing value, unknown reference,
1722
+ * malformed token). Carries structured {@link BlueprintIssue}s — same teach-by-error
1723
+ * `path: message` shape as {@link BlueprintValidationError}.
1724
+ */
1725
+ declare class BlueprintInputError extends Error {
1726
+ readonly issues: BlueprintIssue[];
1727
+ constructor(message: string, issues?: BlueprintIssue[]);
1728
+ }
1729
+ /**
1730
+ * A short, STABLE, non-cryptographic token derived from the install context id.
1731
+ * FNV-1a (32-bit) → base36. Deterministic: same contextId ⇒ same suffix ⇒
1732
+ * idempotent re-installs (matches the seeding-and-idempotency upsert contract).
1733
+ * Used ONLY to namespace tenant-wide service-principal externalIds so two
1734
+ * installs of one blueprint in the same tenant (different contexts) don't
1735
+ * collide. Not security-sensitive.
1736
+ */
1737
+ declare function deriveSuffix(contextId: string): string;
1738
+ /**
1739
+ * Resolve a blueprint's `inputs:` variables against supplied install-time
1740
+ * values and return the substituted document tree WITH the `inputs:` block
1741
+ * stripped — ready for {@link parseBlueprint}. Throws {@link BlueprintInputError}
1742
+ * (with structured `.issues`) on any declaration / value / reference problem.
1743
+ *
1744
+ * `supplied` is the merged value map (the CLI applies `--set` > `--values` >
1745
+ * declared `default` precedence before calling this; declared defaults are
1746
+ * applied here). A blueprint with no `inputs:` block and no `${{ … }}` tokens
1747
+ * passes through unchanged (back-compat) — but a stray `${{ … }}` or an unknown
1748
+ * reference is still reported (never silently empty).
1749
+ *
1750
+ * Built-ins are derived from the document's LITERAL `contextId` (it cannot
1751
+ * itself use `${{ … }}` — it is the source of `vectros.*`).
1752
+ */
1753
+ declare function resolveBlueprintInputs(raw: unknown, supplied?: Record<string, unknown>): unknown;
1754
+
1755
+ /**
1756
+ * @vectros-ai/blueprints — the Blueprint format + the curated bundled
1757
+ * library. Data + structural validation only; the scope gate (enforcement)
1758
+ * lives in @vectros-ai/cli.
1759
+ */
1760
+
1761
+ /**
1762
+ * The curated blueprints bundled with the library, in menu-display order.
1763
+ * To add one: drop a `blueprints/<name>.ts` exporting a `Blueprint`
1764
+ * default, import it here, and add it to this array.
1765
+ */
1766
+ declare const BUNDLED_BLUEPRINTS: readonly Blueprint[];
1767
+ /** Names available for `--blueprint <name>`. */
1768
+ declare const BLUEPRINT_NAMES: readonly string[];
1769
+ /** Look up a bundled blueprint by name; `undefined` if none matches. */
1770
+ declare function getBlueprint(name: string): Blueprint | undefined;
1771
+
1772
+ export { BLUEPRINT_NAMES, BUNDLED_BLUEPRINTS, type Blueprint, type BlueprintFieldDef, BlueprintIdentityError, BlueprintInputError, type BlueprintIssue, type BlueprintLookupField, type BlueprintRenderHints, type BlueprintRoleClause, type BlueprintRoles, BlueprintSchema, type BlueprintSchemaDef, type BlueprintSeedRecord, BlueprintValidationError, type BlueprintValidationRules, type IdentitiesDecl, type IdentityDecl, type IdentityResolver, type InputDecl, type InputScalar, type InputsDecl, InputsDeclSchema, collectIdentityReferences, contextNameOf, deriveSuffix, getBlueprint, parseBlueprint, parseBlueprintJson, resolveBlueprintIdentities, resolveBlueprintInputs };