@ikenga/contract 0.3.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,1249 @@
1
+ import { z } from 'zod';
2
+ export declare const RefreshSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
3
+ mode: z.ZodLiteral<"manual">;
4
+ }, "strip", z.ZodTypeAny, {
5
+ mode: "manual";
6
+ }, {
7
+ mode: "manual";
8
+ }>, z.ZodObject<{
9
+ mode: z.ZodLiteral<"interval">;
10
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
11
+ every: z.ZodString;
12
+ /** When true, also refresh whenever the artifact's pane regains focus. */
13
+ onFocus: z.ZodOptional<z.ZodBoolean>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ mode: "interval";
16
+ every: string;
17
+ onFocus?: boolean | undefined;
18
+ }, {
19
+ mode: "interval";
20
+ every: string;
21
+ onFocus?: boolean | undefined;
22
+ }>, z.ZodObject<{
23
+ mode: z.ZodLiteral<"watch">;
24
+ }, "strip", z.ZodTypeAny, {
25
+ mode: "watch";
26
+ }, {
27
+ mode: "watch";
28
+ }>]>;
29
+ export declare const DataSourceSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
30
+ type: z.ZodLiteral<"supabase">;
31
+ table: z.ZodString;
32
+ select: z.ZodOptional<z.ZodString>;
33
+ /** PostgREST-style filters: `[column, operator, value][]`. */
34
+ filter: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodUnknown], null>, "many">>;
35
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
36
+ mode: z.ZodLiteral<"manual">;
37
+ }, "strip", z.ZodTypeAny, {
38
+ mode: "manual";
39
+ }, {
40
+ mode: "manual";
41
+ }>, z.ZodObject<{
42
+ mode: z.ZodLiteral<"interval">;
43
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
44
+ every: z.ZodString;
45
+ /** When true, also refresh whenever the artifact's pane regains focus. */
46
+ onFocus: z.ZodOptional<z.ZodBoolean>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ mode: "interval";
49
+ every: string;
50
+ onFocus?: boolean | undefined;
51
+ }, {
52
+ mode: "interval";
53
+ every: string;
54
+ onFocus?: boolean | undefined;
55
+ }>, z.ZodObject<{
56
+ mode: z.ZodLiteral<"watch">;
57
+ }, "strip", z.ZodTypeAny, {
58
+ mode: "watch";
59
+ }, {
60
+ mode: "watch";
61
+ }>]>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ type: "supabase";
64
+ table: string;
65
+ refresh: {
66
+ mode: "manual";
67
+ } | {
68
+ mode: "interval";
69
+ every: string;
70
+ onFocus?: boolean | undefined;
71
+ } | {
72
+ mode: "watch";
73
+ };
74
+ filter?: [string, string, unknown][] | undefined;
75
+ select?: string | undefined;
76
+ }, {
77
+ type: "supabase";
78
+ table: string;
79
+ refresh: {
80
+ mode: "manual";
81
+ } | {
82
+ mode: "interval";
83
+ every: string;
84
+ onFocus?: boolean | undefined;
85
+ } | {
86
+ mode: "watch";
87
+ };
88
+ filter?: [string, string, unknown][] | undefined;
89
+ select?: string | undefined;
90
+ }>, z.ZodObject<{
91
+ type: z.ZodLiteral<"sql">;
92
+ /** Logical DB name (e.g. `ikenga.local`). Resolved by the host. */
93
+ db: z.ZodString;
94
+ query: z.ZodString;
95
+ params: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
96
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
97
+ mode: z.ZodLiteral<"manual">;
98
+ }, "strip", z.ZodTypeAny, {
99
+ mode: "manual";
100
+ }, {
101
+ mode: "manual";
102
+ }>, z.ZodObject<{
103
+ mode: z.ZodLiteral<"interval">;
104
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
105
+ every: z.ZodString;
106
+ /** When true, also refresh whenever the artifact's pane regains focus. */
107
+ onFocus: z.ZodOptional<z.ZodBoolean>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ mode: "interval";
110
+ every: string;
111
+ onFocus?: boolean | undefined;
112
+ }, {
113
+ mode: "interval";
114
+ every: string;
115
+ onFocus?: boolean | undefined;
116
+ }>, z.ZodObject<{
117
+ mode: z.ZodLiteral<"watch">;
118
+ }, "strip", z.ZodTypeAny, {
119
+ mode: "watch";
120
+ }, {
121
+ mode: "watch";
122
+ }>]>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ type: "sql";
125
+ refresh: {
126
+ mode: "manual";
127
+ } | {
128
+ mode: "interval";
129
+ every: string;
130
+ onFocus?: boolean | undefined;
131
+ } | {
132
+ mode: "watch";
133
+ };
134
+ db: string;
135
+ query: string;
136
+ params?: unknown[] | undefined;
137
+ }, {
138
+ type: "sql";
139
+ refresh: {
140
+ mode: "manual";
141
+ } | {
142
+ mode: "interval";
143
+ every: string;
144
+ onFocus?: boolean | undefined;
145
+ } | {
146
+ mode: "watch";
147
+ };
148
+ db: string;
149
+ query: string;
150
+ params?: unknown[] | undefined;
151
+ }>, z.ZodObject<{
152
+ type: z.ZodLiteral<"fetch">;
153
+ url: z.ZodString;
154
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>>;
155
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
156
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
157
+ mode: z.ZodLiteral<"manual">;
158
+ }, "strip", z.ZodTypeAny, {
159
+ mode: "manual";
160
+ }, {
161
+ mode: "manual";
162
+ }>, z.ZodObject<{
163
+ mode: z.ZodLiteral<"interval">;
164
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
165
+ every: z.ZodString;
166
+ /** When true, also refresh whenever the artifact's pane regains focus. */
167
+ onFocus: z.ZodOptional<z.ZodBoolean>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ mode: "interval";
170
+ every: string;
171
+ onFocus?: boolean | undefined;
172
+ }, {
173
+ mode: "interval";
174
+ every: string;
175
+ onFocus?: boolean | undefined;
176
+ }>, z.ZodObject<{
177
+ mode: z.ZodLiteral<"watch">;
178
+ }, "strip", z.ZodTypeAny, {
179
+ mode: "watch";
180
+ }, {
181
+ mode: "watch";
182
+ }>]>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ type: "fetch";
185
+ refresh: {
186
+ mode: "manual";
187
+ } | {
188
+ mode: "interval";
189
+ every: string;
190
+ onFocus?: boolean | undefined;
191
+ } | {
192
+ mode: "watch";
193
+ };
194
+ url: string;
195
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
196
+ headers?: Record<string, string> | undefined;
197
+ }, {
198
+ type: "fetch";
199
+ refresh: {
200
+ mode: "manual";
201
+ } | {
202
+ mode: "interval";
203
+ every: string;
204
+ onFocus?: boolean | undefined;
205
+ } | {
206
+ mode: "watch";
207
+ };
208
+ url: string;
209
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
210
+ headers?: Record<string, string> | undefined;
211
+ }>, z.ZodObject<{
212
+ type: z.ZodLiteral<"mcp">;
213
+ server: z.ZodString;
214
+ tool: z.ZodString;
215
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
216
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
217
+ mode: z.ZodLiteral<"manual">;
218
+ }, "strip", z.ZodTypeAny, {
219
+ mode: "manual";
220
+ }, {
221
+ mode: "manual";
222
+ }>, z.ZodObject<{
223
+ mode: z.ZodLiteral<"interval">;
224
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
225
+ every: z.ZodString;
226
+ /** When true, also refresh whenever the artifact's pane regains focus. */
227
+ onFocus: z.ZodOptional<z.ZodBoolean>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ mode: "interval";
230
+ every: string;
231
+ onFocus?: boolean | undefined;
232
+ }, {
233
+ mode: "interval";
234
+ every: string;
235
+ onFocus?: boolean | undefined;
236
+ }>, z.ZodObject<{
237
+ mode: z.ZodLiteral<"watch">;
238
+ }, "strip", z.ZodTypeAny, {
239
+ mode: "watch";
240
+ }, {
241
+ mode: "watch";
242
+ }>]>;
243
+ }, "strip", z.ZodTypeAny, {
244
+ type: "mcp";
245
+ refresh: {
246
+ mode: "manual";
247
+ } | {
248
+ mode: "interval";
249
+ every: string;
250
+ onFocus?: boolean | undefined;
251
+ } | {
252
+ mode: "watch";
253
+ };
254
+ server: string;
255
+ tool: string;
256
+ args?: Record<string, unknown> | undefined;
257
+ }, {
258
+ type: "mcp";
259
+ refresh: {
260
+ mode: "manual";
261
+ } | {
262
+ mode: "interval";
263
+ every: string;
264
+ onFocus?: boolean | undefined;
265
+ } | {
266
+ mode: "watch";
267
+ };
268
+ server: string;
269
+ tool: string;
270
+ args?: Record<string, unknown> | undefined;
271
+ }>, z.ZodObject<{
272
+ type: z.ZodLiteral<"file">;
273
+ path: z.ZodString;
274
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
275
+ mode: z.ZodLiteral<"manual">;
276
+ }, "strip", z.ZodTypeAny, {
277
+ mode: "manual";
278
+ }, {
279
+ mode: "manual";
280
+ }>, z.ZodObject<{
281
+ mode: z.ZodLiteral<"interval">;
282
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
283
+ every: z.ZodString;
284
+ /** When true, also refresh whenever the artifact's pane regains focus. */
285
+ onFocus: z.ZodOptional<z.ZodBoolean>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ mode: "interval";
288
+ every: string;
289
+ onFocus?: boolean | undefined;
290
+ }, {
291
+ mode: "interval";
292
+ every: string;
293
+ onFocus?: boolean | undefined;
294
+ }>, z.ZodObject<{
295
+ mode: z.ZodLiteral<"watch">;
296
+ }, "strip", z.ZodTypeAny, {
297
+ mode: "watch";
298
+ }, {
299
+ mode: "watch";
300
+ }>]>;
301
+ }, "strip", z.ZodTypeAny, {
302
+ path: string;
303
+ type: "file";
304
+ refresh: {
305
+ mode: "manual";
306
+ } | {
307
+ mode: "interval";
308
+ every: string;
309
+ onFocus?: boolean | undefined;
310
+ } | {
311
+ mode: "watch";
312
+ };
313
+ }, {
314
+ path: string;
315
+ type: "file";
316
+ refresh: {
317
+ mode: "manual";
318
+ } | {
319
+ mode: "interval";
320
+ every: string;
321
+ onFocus?: boolean | undefined;
322
+ } | {
323
+ mode: "watch";
324
+ };
325
+ }>]>;
326
+ export declare const FallbackSchema: z.ZodEffects<z.ZodObject<{
327
+ mode: z.ZodLiteral<"mock">;
328
+ /** Single-file mode: id of the inline `<script type="application/json">` tag carrying mock data. */
329
+ dataTag: z.ZodOptional<z.ZodString>;
330
+ /** Folder mode: relative path to a JSON file with mock data. */
331
+ data: z.ZodOptional<z.ZodString>;
332
+ banner: z.ZodOptional<z.ZodString>;
333
+ }, "strip", z.ZodTypeAny, {
334
+ mode: "mock";
335
+ dataTag?: string | undefined;
336
+ data?: string | undefined;
337
+ banner?: string | undefined;
338
+ }, {
339
+ mode: "mock";
340
+ dataTag?: string | undefined;
341
+ data?: string | undefined;
342
+ banner?: string | undefined;
343
+ }>, {
344
+ mode: "mock";
345
+ dataTag?: string | undefined;
346
+ data?: string | undefined;
347
+ banner?: string | undefined;
348
+ }, {
349
+ mode: "mock";
350
+ dataTag?: string | undefined;
351
+ data?: string | undefined;
352
+ banner?: string | undefined;
353
+ }>;
354
+ export declare const PinSchema: z.ZodObject<{
355
+ suggested: z.ZodDefault<z.ZodBoolean>;
356
+ /** Free-form section name. Host fuzzy-matches against existing sections at pin time. */
357
+ section: z.ZodOptional<z.ZodString>;
358
+ label: z.ZodOptional<z.ZodString>;
359
+ icon: z.ZodOptional<z.ZodObject<{
360
+ lucide: z.ZodOptional<z.ZodString>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ lucide?: string | undefined;
363
+ }, {
364
+ lucide?: string | undefined;
365
+ }>>;
366
+ }, "strip", z.ZodTypeAny, {
367
+ suggested: boolean;
368
+ section?: string | undefined;
369
+ label?: string | undefined;
370
+ icon?: {
371
+ lucide?: string | undefined;
372
+ } | undefined;
373
+ }, {
374
+ suggested?: boolean | undefined;
375
+ section?: string | undefined;
376
+ label?: string | undefined;
377
+ icon?: {
378
+ lucide?: string | undefined;
379
+ } | undefined;
380
+ }>;
381
+ export declare const NotesSchema: z.ZodObject<{
382
+ enabled: z.ZodDefault<z.ZodBoolean>;
383
+ }, "strip", z.ZodTypeAny, {
384
+ enabled: boolean;
385
+ }, {
386
+ enabled?: boolean | undefined;
387
+ }>;
388
+ export declare const RequiresSchema: z.ZodObject<{
389
+ ikenga: z.ZodOptional<z.ZodString>;
390
+ bridge: z.ZodOptional<z.ZodString>;
391
+ }, "strip", z.ZodTypeAny, {
392
+ ikenga?: string | undefined;
393
+ bridge?: string | undefined;
394
+ }, {
395
+ ikenga?: string | undefined;
396
+ bridge?: string | undefined;
397
+ }>;
398
+ export declare const IconSchema: z.ZodObject<{
399
+ lucide: z.ZodOptional<z.ZodOptional<z.ZodString>>;
400
+ }, "strip", z.ZodTypeAny, {
401
+ lucide?: string | undefined;
402
+ }, {
403
+ lucide?: string | undefined;
404
+ }>;
405
+ /**
406
+ * Escape-hatch capabilities block. Default behaviour is to auto-derive
407
+ * capabilities from `dataSources`, so most artifacts omit this entirely.
408
+ * Use only when narrowing below the derived set, expressing capabilities
409
+ * sources can't (e.g. arbitrary FS reads), or driving raw `bridge.fetch` /
410
+ * `bridge.mcp` calls that aren't bound to a declared source.
411
+ */
412
+ export declare const CapabilitiesSchema: z.ZodObject<{
413
+ network: z.ZodOptional<z.ZodObject<{
414
+ allow: z.ZodArray<z.ZodString, "many">;
415
+ }, "strip", z.ZodTypeAny, {
416
+ allow: string[];
417
+ }, {
418
+ allow: string[];
419
+ }>>;
420
+ supabase: z.ZodOptional<z.ZodObject<{
421
+ project: z.ZodOptional<z.ZodString>;
422
+ tables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
423
+ rls: z.ZodOptional<z.ZodEnum<["user", "service"]>>;
424
+ }, "strip", z.ZodTypeAny, {
425
+ project?: string | undefined;
426
+ tables?: string[] | undefined;
427
+ rls?: "user" | "service" | undefined;
428
+ }, {
429
+ project?: string | undefined;
430
+ tables?: string[] | undefined;
431
+ rls?: "user" | "service" | undefined;
432
+ }>>;
433
+ sqlite: z.ZodOptional<z.ZodObject<{
434
+ db: z.ZodString;
435
+ queries: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
436
+ }, "strip", z.ZodTypeAny, {
437
+ db: string;
438
+ queries?: string[] | undefined;
439
+ }, {
440
+ db: string;
441
+ queries?: string[] | undefined;
442
+ }>>;
443
+ mcp: z.ZodOptional<z.ZodArray<z.ZodObject<{
444
+ server: z.ZodString;
445
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
446
+ }, "strip", z.ZodTypeAny, {
447
+ server: string;
448
+ tools?: string[] | undefined;
449
+ }, {
450
+ server: string;
451
+ tools?: string[] | undefined;
452
+ }>, "many">>;
453
+ fs: z.ZodOptional<z.ZodObject<{
454
+ read: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
455
+ write: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ read?: string[] | undefined;
458
+ write?: string[] | undefined;
459
+ }, {
460
+ read?: string[] | undefined;
461
+ write?: string[] | undefined;
462
+ }>>;
463
+ }, "strip", z.ZodTypeAny, {
464
+ supabase?: {
465
+ project?: string | undefined;
466
+ tables?: string[] | undefined;
467
+ rls?: "user" | "service" | undefined;
468
+ } | undefined;
469
+ mcp?: {
470
+ server: string;
471
+ tools?: string[] | undefined;
472
+ }[] | undefined;
473
+ network?: {
474
+ allow: string[];
475
+ } | undefined;
476
+ sqlite?: {
477
+ db: string;
478
+ queries?: string[] | undefined;
479
+ } | undefined;
480
+ fs?: {
481
+ read?: string[] | undefined;
482
+ write?: string[] | undefined;
483
+ } | undefined;
484
+ }, {
485
+ supabase?: {
486
+ project?: string | undefined;
487
+ tables?: string[] | undefined;
488
+ rls?: "user" | "service" | undefined;
489
+ } | undefined;
490
+ mcp?: {
491
+ server: string;
492
+ tools?: string[] | undefined;
493
+ }[] | undefined;
494
+ network?: {
495
+ allow: string[];
496
+ } | undefined;
497
+ sqlite?: {
498
+ db: string;
499
+ queries?: string[] | undefined;
500
+ } | undefined;
501
+ fs?: {
502
+ read?: string[] | undefined;
503
+ write?: string[] | undefined;
504
+ } | undefined;
505
+ }>;
506
+ export declare const ArtifactManifestSchema: z.ZodObject<{
507
+ $schema: z.ZodOptional<z.ZodString>;
508
+ format: z.ZodLiteral<"ikenga-artifact">;
509
+ /** Major.minor of the artifact format spec, e.g. "0.1". */
510
+ formatVersion: z.ZodString;
511
+ id: z.ZodString;
512
+ name: z.ZodString;
513
+ version: z.ZodString;
514
+ description: z.ZodOptional<z.ZodString>;
515
+ author: z.ZodOptional<z.ZodString>;
516
+ license: z.ZodOptional<z.ZodString>;
517
+ /** Folder mode only — relative path to the entry HTML. Single-file artifacts omit this. */
518
+ entry: z.ZodOptional<z.ZodString>;
519
+ icon: z.ZodOptional<z.ZodObject<{
520
+ lucide: z.ZodOptional<z.ZodOptional<z.ZodString>>;
521
+ }, "strip", z.ZodTypeAny, {
522
+ lucide?: string | undefined;
523
+ }, {
524
+ lucide?: string | undefined;
525
+ }>>;
526
+ dataSources: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
527
+ type: z.ZodLiteral<"supabase">;
528
+ table: z.ZodString;
529
+ select: z.ZodOptional<z.ZodString>;
530
+ /** PostgREST-style filters: `[column, operator, value][]`. */
531
+ filter: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodUnknown], null>, "many">>;
532
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
533
+ mode: z.ZodLiteral<"manual">;
534
+ }, "strip", z.ZodTypeAny, {
535
+ mode: "manual";
536
+ }, {
537
+ mode: "manual";
538
+ }>, z.ZodObject<{
539
+ mode: z.ZodLiteral<"interval">;
540
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
541
+ every: z.ZodString;
542
+ /** When true, also refresh whenever the artifact's pane regains focus. */
543
+ onFocus: z.ZodOptional<z.ZodBoolean>;
544
+ }, "strip", z.ZodTypeAny, {
545
+ mode: "interval";
546
+ every: string;
547
+ onFocus?: boolean | undefined;
548
+ }, {
549
+ mode: "interval";
550
+ every: string;
551
+ onFocus?: boolean | undefined;
552
+ }>, z.ZodObject<{
553
+ mode: z.ZodLiteral<"watch">;
554
+ }, "strip", z.ZodTypeAny, {
555
+ mode: "watch";
556
+ }, {
557
+ mode: "watch";
558
+ }>]>;
559
+ }, "strip", z.ZodTypeAny, {
560
+ type: "supabase";
561
+ table: string;
562
+ refresh: {
563
+ mode: "manual";
564
+ } | {
565
+ mode: "interval";
566
+ every: string;
567
+ onFocus?: boolean | undefined;
568
+ } | {
569
+ mode: "watch";
570
+ };
571
+ filter?: [string, string, unknown][] | undefined;
572
+ select?: string | undefined;
573
+ }, {
574
+ type: "supabase";
575
+ table: string;
576
+ refresh: {
577
+ mode: "manual";
578
+ } | {
579
+ mode: "interval";
580
+ every: string;
581
+ onFocus?: boolean | undefined;
582
+ } | {
583
+ mode: "watch";
584
+ };
585
+ filter?: [string, string, unknown][] | undefined;
586
+ select?: string | undefined;
587
+ }>, z.ZodObject<{
588
+ type: z.ZodLiteral<"sql">;
589
+ /** Logical DB name (e.g. `ikenga.local`). Resolved by the host. */
590
+ db: z.ZodString;
591
+ query: z.ZodString;
592
+ params: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
593
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
594
+ mode: z.ZodLiteral<"manual">;
595
+ }, "strip", z.ZodTypeAny, {
596
+ mode: "manual";
597
+ }, {
598
+ mode: "manual";
599
+ }>, z.ZodObject<{
600
+ mode: z.ZodLiteral<"interval">;
601
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
602
+ every: z.ZodString;
603
+ /** When true, also refresh whenever the artifact's pane regains focus. */
604
+ onFocus: z.ZodOptional<z.ZodBoolean>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ mode: "interval";
607
+ every: string;
608
+ onFocus?: boolean | undefined;
609
+ }, {
610
+ mode: "interval";
611
+ every: string;
612
+ onFocus?: boolean | undefined;
613
+ }>, z.ZodObject<{
614
+ mode: z.ZodLiteral<"watch">;
615
+ }, "strip", z.ZodTypeAny, {
616
+ mode: "watch";
617
+ }, {
618
+ mode: "watch";
619
+ }>]>;
620
+ }, "strip", z.ZodTypeAny, {
621
+ type: "sql";
622
+ refresh: {
623
+ mode: "manual";
624
+ } | {
625
+ mode: "interval";
626
+ every: string;
627
+ onFocus?: boolean | undefined;
628
+ } | {
629
+ mode: "watch";
630
+ };
631
+ db: string;
632
+ query: string;
633
+ params?: unknown[] | undefined;
634
+ }, {
635
+ type: "sql";
636
+ refresh: {
637
+ mode: "manual";
638
+ } | {
639
+ mode: "interval";
640
+ every: string;
641
+ onFocus?: boolean | undefined;
642
+ } | {
643
+ mode: "watch";
644
+ };
645
+ db: string;
646
+ query: string;
647
+ params?: unknown[] | undefined;
648
+ }>, z.ZodObject<{
649
+ type: z.ZodLiteral<"fetch">;
650
+ url: z.ZodString;
651
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>>;
652
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
653
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
654
+ mode: z.ZodLiteral<"manual">;
655
+ }, "strip", z.ZodTypeAny, {
656
+ mode: "manual";
657
+ }, {
658
+ mode: "manual";
659
+ }>, z.ZodObject<{
660
+ mode: z.ZodLiteral<"interval">;
661
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
662
+ every: z.ZodString;
663
+ /** When true, also refresh whenever the artifact's pane regains focus. */
664
+ onFocus: z.ZodOptional<z.ZodBoolean>;
665
+ }, "strip", z.ZodTypeAny, {
666
+ mode: "interval";
667
+ every: string;
668
+ onFocus?: boolean | undefined;
669
+ }, {
670
+ mode: "interval";
671
+ every: string;
672
+ onFocus?: boolean | undefined;
673
+ }>, z.ZodObject<{
674
+ mode: z.ZodLiteral<"watch">;
675
+ }, "strip", z.ZodTypeAny, {
676
+ mode: "watch";
677
+ }, {
678
+ mode: "watch";
679
+ }>]>;
680
+ }, "strip", z.ZodTypeAny, {
681
+ type: "fetch";
682
+ refresh: {
683
+ mode: "manual";
684
+ } | {
685
+ mode: "interval";
686
+ every: string;
687
+ onFocus?: boolean | undefined;
688
+ } | {
689
+ mode: "watch";
690
+ };
691
+ url: string;
692
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
693
+ headers?: Record<string, string> | undefined;
694
+ }, {
695
+ type: "fetch";
696
+ refresh: {
697
+ mode: "manual";
698
+ } | {
699
+ mode: "interval";
700
+ every: string;
701
+ onFocus?: boolean | undefined;
702
+ } | {
703
+ mode: "watch";
704
+ };
705
+ url: string;
706
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
707
+ headers?: Record<string, string> | undefined;
708
+ }>, z.ZodObject<{
709
+ type: z.ZodLiteral<"mcp">;
710
+ server: z.ZodString;
711
+ tool: z.ZodString;
712
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
713
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
714
+ mode: z.ZodLiteral<"manual">;
715
+ }, "strip", z.ZodTypeAny, {
716
+ mode: "manual";
717
+ }, {
718
+ mode: "manual";
719
+ }>, z.ZodObject<{
720
+ mode: z.ZodLiteral<"interval">;
721
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
722
+ every: z.ZodString;
723
+ /** When true, also refresh whenever the artifact's pane regains focus. */
724
+ onFocus: z.ZodOptional<z.ZodBoolean>;
725
+ }, "strip", z.ZodTypeAny, {
726
+ mode: "interval";
727
+ every: string;
728
+ onFocus?: boolean | undefined;
729
+ }, {
730
+ mode: "interval";
731
+ every: string;
732
+ onFocus?: boolean | undefined;
733
+ }>, z.ZodObject<{
734
+ mode: z.ZodLiteral<"watch">;
735
+ }, "strip", z.ZodTypeAny, {
736
+ mode: "watch";
737
+ }, {
738
+ mode: "watch";
739
+ }>]>;
740
+ }, "strip", z.ZodTypeAny, {
741
+ type: "mcp";
742
+ refresh: {
743
+ mode: "manual";
744
+ } | {
745
+ mode: "interval";
746
+ every: string;
747
+ onFocus?: boolean | undefined;
748
+ } | {
749
+ mode: "watch";
750
+ };
751
+ server: string;
752
+ tool: string;
753
+ args?: Record<string, unknown> | undefined;
754
+ }, {
755
+ type: "mcp";
756
+ refresh: {
757
+ mode: "manual";
758
+ } | {
759
+ mode: "interval";
760
+ every: string;
761
+ onFocus?: boolean | undefined;
762
+ } | {
763
+ mode: "watch";
764
+ };
765
+ server: string;
766
+ tool: string;
767
+ args?: Record<string, unknown> | undefined;
768
+ }>, z.ZodObject<{
769
+ type: z.ZodLiteral<"file">;
770
+ path: z.ZodString;
771
+ refresh: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
772
+ mode: z.ZodLiteral<"manual">;
773
+ }, "strip", z.ZodTypeAny, {
774
+ mode: "manual";
775
+ }, {
776
+ mode: "manual";
777
+ }>, z.ZodObject<{
778
+ mode: z.ZodLiteral<"interval">;
779
+ /** Duration string: `<number><unit>` where unit ∈ s|m|h|d. e.g. "30s", "15m", "1h", "1d". */
780
+ every: z.ZodString;
781
+ /** When true, also refresh whenever the artifact's pane regains focus. */
782
+ onFocus: z.ZodOptional<z.ZodBoolean>;
783
+ }, "strip", z.ZodTypeAny, {
784
+ mode: "interval";
785
+ every: string;
786
+ onFocus?: boolean | undefined;
787
+ }, {
788
+ mode: "interval";
789
+ every: string;
790
+ onFocus?: boolean | undefined;
791
+ }>, z.ZodObject<{
792
+ mode: z.ZodLiteral<"watch">;
793
+ }, "strip", z.ZodTypeAny, {
794
+ mode: "watch";
795
+ }, {
796
+ mode: "watch";
797
+ }>]>;
798
+ }, "strip", z.ZodTypeAny, {
799
+ path: string;
800
+ type: "file";
801
+ refresh: {
802
+ mode: "manual";
803
+ } | {
804
+ mode: "interval";
805
+ every: string;
806
+ onFocus?: boolean | undefined;
807
+ } | {
808
+ mode: "watch";
809
+ };
810
+ }, {
811
+ path: string;
812
+ type: "file";
813
+ refresh: {
814
+ mode: "manual";
815
+ } | {
816
+ mode: "interval";
817
+ every: string;
818
+ onFocus?: boolean | undefined;
819
+ } | {
820
+ mode: "watch";
821
+ };
822
+ }>]>>;
823
+ fallback: z.ZodEffects<z.ZodObject<{
824
+ mode: z.ZodLiteral<"mock">;
825
+ /** Single-file mode: id of the inline `<script type="application/json">` tag carrying mock data. */
826
+ dataTag: z.ZodOptional<z.ZodString>;
827
+ /** Folder mode: relative path to a JSON file with mock data. */
828
+ data: z.ZodOptional<z.ZodString>;
829
+ banner: z.ZodOptional<z.ZodString>;
830
+ }, "strip", z.ZodTypeAny, {
831
+ mode: "mock";
832
+ dataTag?: string | undefined;
833
+ data?: string | undefined;
834
+ banner?: string | undefined;
835
+ }, {
836
+ mode: "mock";
837
+ dataTag?: string | undefined;
838
+ data?: string | undefined;
839
+ banner?: string | undefined;
840
+ }>, {
841
+ mode: "mock";
842
+ dataTag?: string | undefined;
843
+ data?: string | undefined;
844
+ banner?: string | undefined;
845
+ }, {
846
+ mode: "mock";
847
+ dataTag?: string | undefined;
848
+ data?: string | undefined;
849
+ banner?: string | undefined;
850
+ }>;
851
+ pin: z.ZodOptional<z.ZodObject<{
852
+ suggested: z.ZodDefault<z.ZodBoolean>;
853
+ /** Free-form section name. Host fuzzy-matches against existing sections at pin time. */
854
+ section: z.ZodOptional<z.ZodString>;
855
+ label: z.ZodOptional<z.ZodString>;
856
+ icon: z.ZodOptional<z.ZodObject<{
857
+ lucide: z.ZodOptional<z.ZodString>;
858
+ }, "strip", z.ZodTypeAny, {
859
+ lucide?: string | undefined;
860
+ }, {
861
+ lucide?: string | undefined;
862
+ }>>;
863
+ }, "strip", z.ZodTypeAny, {
864
+ suggested: boolean;
865
+ section?: string | undefined;
866
+ label?: string | undefined;
867
+ icon?: {
868
+ lucide?: string | undefined;
869
+ } | undefined;
870
+ }, {
871
+ suggested?: boolean | undefined;
872
+ section?: string | undefined;
873
+ label?: string | undefined;
874
+ icon?: {
875
+ lucide?: string | undefined;
876
+ } | undefined;
877
+ }>>;
878
+ notes: z.ZodOptional<z.ZodObject<{
879
+ enabled: z.ZodDefault<z.ZodBoolean>;
880
+ }, "strip", z.ZodTypeAny, {
881
+ enabled: boolean;
882
+ }, {
883
+ enabled?: boolean | undefined;
884
+ }>>;
885
+ requires: z.ZodOptional<z.ZodObject<{
886
+ ikenga: z.ZodOptional<z.ZodString>;
887
+ bridge: z.ZodOptional<z.ZodString>;
888
+ }, "strip", z.ZodTypeAny, {
889
+ ikenga?: string | undefined;
890
+ bridge?: string | undefined;
891
+ }, {
892
+ ikenga?: string | undefined;
893
+ bridge?: string | undefined;
894
+ }>>;
895
+ capabilities: z.ZodOptional<z.ZodObject<{
896
+ network: z.ZodOptional<z.ZodObject<{
897
+ allow: z.ZodArray<z.ZodString, "many">;
898
+ }, "strip", z.ZodTypeAny, {
899
+ allow: string[];
900
+ }, {
901
+ allow: string[];
902
+ }>>;
903
+ supabase: z.ZodOptional<z.ZodObject<{
904
+ project: z.ZodOptional<z.ZodString>;
905
+ tables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
906
+ rls: z.ZodOptional<z.ZodEnum<["user", "service"]>>;
907
+ }, "strip", z.ZodTypeAny, {
908
+ project?: string | undefined;
909
+ tables?: string[] | undefined;
910
+ rls?: "user" | "service" | undefined;
911
+ }, {
912
+ project?: string | undefined;
913
+ tables?: string[] | undefined;
914
+ rls?: "user" | "service" | undefined;
915
+ }>>;
916
+ sqlite: z.ZodOptional<z.ZodObject<{
917
+ db: z.ZodString;
918
+ queries: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
919
+ }, "strip", z.ZodTypeAny, {
920
+ db: string;
921
+ queries?: string[] | undefined;
922
+ }, {
923
+ db: string;
924
+ queries?: string[] | undefined;
925
+ }>>;
926
+ mcp: z.ZodOptional<z.ZodArray<z.ZodObject<{
927
+ server: z.ZodString;
928
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
929
+ }, "strip", z.ZodTypeAny, {
930
+ server: string;
931
+ tools?: string[] | undefined;
932
+ }, {
933
+ server: string;
934
+ tools?: string[] | undefined;
935
+ }>, "many">>;
936
+ fs: z.ZodOptional<z.ZodObject<{
937
+ read: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
938
+ write: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
939
+ }, "strip", z.ZodTypeAny, {
940
+ read?: string[] | undefined;
941
+ write?: string[] | undefined;
942
+ }, {
943
+ read?: string[] | undefined;
944
+ write?: string[] | undefined;
945
+ }>>;
946
+ }, "strip", z.ZodTypeAny, {
947
+ supabase?: {
948
+ project?: string | undefined;
949
+ tables?: string[] | undefined;
950
+ rls?: "user" | "service" | undefined;
951
+ } | undefined;
952
+ mcp?: {
953
+ server: string;
954
+ tools?: string[] | undefined;
955
+ }[] | undefined;
956
+ network?: {
957
+ allow: string[];
958
+ } | undefined;
959
+ sqlite?: {
960
+ db: string;
961
+ queries?: string[] | undefined;
962
+ } | undefined;
963
+ fs?: {
964
+ read?: string[] | undefined;
965
+ write?: string[] | undefined;
966
+ } | undefined;
967
+ }, {
968
+ supabase?: {
969
+ project?: string | undefined;
970
+ tables?: string[] | undefined;
971
+ rls?: "user" | "service" | undefined;
972
+ } | undefined;
973
+ mcp?: {
974
+ server: string;
975
+ tools?: string[] | undefined;
976
+ }[] | undefined;
977
+ network?: {
978
+ allow: string[];
979
+ } | undefined;
980
+ sqlite?: {
981
+ db: string;
982
+ queries?: string[] | undefined;
983
+ } | undefined;
984
+ fs?: {
985
+ read?: string[] | undefined;
986
+ write?: string[] | undefined;
987
+ } | undefined;
988
+ }>>;
989
+ }, "strip", z.ZodTypeAny, {
990
+ format: "ikenga-artifact";
991
+ formatVersion: string;
992
+ id: string;
993
+ name: string;
994
+ version: string;
995
+ dataSources: Record<string, {
996
+ type: "supabase";
997
+ table: string;
998
+ refresh: {
999
+ mode: "manual";
1000
+ } | {
1001
+ mode: "interval";
1002
+ every: string;
1003
+ onFocus?: boolean | undefined;
1004
+ } | {
1005
+ mode: "watch";
1006
+ };
1007
+ filter?: [string, string, unknown][] | undefined;
1008
+ select?: string | undefined;
1009
+ } | {
1010
+ type: "sql";
1011
+ refresh: {
1012
+ mode: "manual";
1013
+ } | {
1014
+ mode: "interval";
1015
+ every: string;
1016
+ onFocus?: boolean | undefined;
1017
+ } | {
1018
+ mode: "watch";
1019
+ };
1020
+ db: string;
1021
+ query: string;
1022
+ params?: unknown[] | undefined;
1023
+ } | {
1024
+ type: "fetch";
1025
+ refresh: {
1026
+ mode: "manual";
1027
+ } | {
1028
+ mode: "interval";
1029
+ every: string;
1030
+ onFocus?: boolean | undefined;
1031
+ } | {
1032
+ mode: "watch";
1033
+ };
1034
+ url: string;
1035
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
1036
+ headers?: Record<string, string> | undefined;
1037
+ } | {
1038
+ type: "mcp";
1039
+ refresh: {
1040
+ mode: "manual";
1041
+ } | {
1042
+ mode: "interval";
1043
+ every: string;
1044
+ onFocus?: boolean | undefined;
1045
+ } | {
1046
+ mode: "watch";
1047
+ };
1048
+ server: string;
1049
+ tool: string;
1050
+ args?: Record<string, unknown> | undefined;
1051
+ } | {
1052
+ path: string;
1053
+ type: "file";
1054
+ refresh: {
1055
+ mode: "manual";
1056
+ } | {
1057
+ mode: "interval";
1058
+ every: string;
1059
+ onFocus?: boolean | undefined;
1060
+ } | {
1061
+ mode: "watch";
1062
+ };
1063
+ }>;
1064
+ fallback: {
1065
+ mode: "mock";
1066
+ dataTag?: string | undefined;
1067
+ data?: string | undefined;
1068
+ banner?: string | undefined;
1069
+ };
1070
+ icon?: {
1071
+ lucide?: string | undefined;
1072
+ } | undefined;
1073
+ $schema?: string | undefined;
1074
+ description?: string | undefined;
1075
+ author?: string | undefined;
1076
+ license?: string | undefined;
1077
+ entry?: string | undefined;
1078
+ pin?: {
1079
+ suggested: boolean;
1080
+ section?: string | undefined;
1081
+ label?: string | undefined;
1082
+ icon?: {
1083
+ lucide?: string | undefined;
1084
+ } | undefined;
1085
+ } | undefined;
1086
+ notes?: {
1087
+ enabled: boolean;
1088
+ } | undefined;
1089
+ requires?: {
1090
+ ikenga?: string | undefined;
1091
+ bridge?: string | undefined;
1092
+ } | undefined;
1093
+ capabilities?: {
1094
+ supabase?: {
1095
+ project?: string | undefined;
1096
+ tables?: string[] | undefined;
1097
+ rls?: "user" | "service" | undefined;
1098
+ } | undefined;
1099
+ mcp?: {
1100
+ server: string;
1101
+ tools?: string[] | undefined;
1102
+ }[] | undefined;
1103
+ network?: {
1104
+ allow: string[];
1105
+ } | undefined;
1106
+ sqlite?: {
1107
+ db: string;
1108
+ queries?: string[] | undefined;
1109
+ } | undefined;
1110
+ fs?: {
1111
+ read?: string[] | undefined;
1112
+ write?: string[] | undefined;
1113
+ } | undefined;
1114
+ } | undefined;
1115
+ }, {
1116
+ format: "ikenga-artifact";
1117
+ formatVersion: string;
1118
+ id: string;
1119
+ name: string;
1120
+ version: string;
1121
+ dataSources: Record<string, {
1122
+ type: "supabase";
1123
+ table: string;
1124
+ refresh: {
1125
+ mode: "manual";
1126
+ } | {
1127
+ mode: "interval";
1128
+ every: string;
1129
+ onFocus?: boolean | undefined;
1130
+ } | {
1131
+ mode: "watch";
1132
+ };
1133
+ filter?: [string, string, unknown][] | undefined;
1134
+ select?: string | undefined;
1135
+ } | {
1136
+ type: "sql";
1137
+ refresh: {
1138
+ mode: "manual";
1139
+ } | {
1140
+ mode: "interval";
1141
+ every: string;
1142
+ onFocus?: boolean | undefined;
1143
+ } | {
1144
+ mode: "watch";
1145
+ };
1146
+ db: string;
1147
+ query: string;
1148
+ params?: unknown[] | undefined;
1149
+ } | {
1150
+ type: "fetch";
1151
+ refresh: {
1152
+ mode: "manual";
1153
+ } | {
1154
+ mode: "interval";
1155
+ every: string;
1156
+ onFocus?: boolean | undefined;
1157
+ } | {
1158
+ mode: "watch";
1159
+ };
1160
+ url: string;
1161
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
1162
+ headers?: Record<string, string> | undefined;
1163
+ } | {
1164
+ type: "mcp";
1165
+ refresh: {
1166
+ mode: "manual";
1167
+ } | {
1168
+ mode: "interval";
1169
+ every: string;
1170
+ onFocus?: boolean | undefined;
1171
+ } | {
1172
+ mode: "watch";
1173
+ };
1174
+ server: string;
1175
+ tool: string;
1176
+ args?: Record<string, unknown> | undefined;
1177
+ } | {
1178
+ path: string;
1179
+ type: "file";
1180
+ refresh: {
1181
+ mode: "manual";
1182
+ } | {
1183
+ mode: "interval";
1184
+ every: string;
1185
+ onFocus?: boolean | undefined;
1186
+ } | {
1187
+ mode: "watch";
1188
+ };
1189
+ }>;
1190
+ fallback: {
1191
+ mode: "mock";
1192
+ dataTag?: string | undefined;
1193
+ data?: string | undefined;
1194
+ banner?: string | undefined;
1195
+ };
1196
+ icon?: {
1197
+ lucide?: string | undefined;
1198
+ } | undefined;
1199
+ $schema?: string | undefined;
1200
+ description?: string | undefined;
1201
+ author?: string | undefined;
1202
+ license?: string | undefined;
1203
+ entry?: string | undefined;
1204
+ pin?: {
1205
+ suggested?: boolean | undefined;
1206
+ section?: string | undefined;
1207
+ label?: string | undefined;
1208
+ icon?: {
1209
+ lucide?: string | undefined;
1210
+ } | undefined;
1211
+ } | undefined;
1212
+ notes?: {
1213
+ enabled?: boolean | undefined;
1214
+ } | undefined;
1215
+ requires?: {
1216
+ ikenga?: string | undefined;
1217
+ bridge?: string | undefined;
1218
+ } | undefined;
1219
+ capabilities?: {
1220
+ supabase?: {
1221
+ project?: string | undefined;
1222
+ tables?: string[] | undefined;
1223
+ rls?: "user" | "service" | undefined;
1224
+ } | undefined;
1225
+ mcp?: {
1226
+ server: string;
1227
+ tools?: string[] | undefined;
1228
+ }[] | undefined;
1229
+ network?: {
1230
+ allow: string[];
1231
+ } | undefined;
1232
+ sqlite?: {
1233
+ db: string;
1234
+ queries?: string[] | undefined;
1235
+ } | undefined;
1236
+ fs?: {
1237
+ read?: string[] | undefined;
1238
+ write?: string[] | undefined;
1239
+ } | undefined;
1240
+ } | undefined;
1241
+ }>;
1242
+ export type ArtifactManifest = z.infer<typeof ArtifactManifestSchema>;
1243
+ export type DataSource = z.infer<typeof DataSourceSchema>;
1244
+ export type Refresh = z.infer<typeof RefreshSchema>;
1245
+ export type Fallback = z.infer<typeof FallbackSchema>;
1246
+ export type Capabilities = z.infer<typeof CapabilitiesSchema>;
1247
+ /** Format-spec version this package's schema targets. Bumped together with the JSON Schema file. */
1248
+ export declare const ARTIFACT_FORMAT_VERSION: "0.1";
1249
+ //# sourceMappingURL=artifact.d.ts.map