busy-cli 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +129 -0
  2. package/dist/builders/context.d.ts +50 -0
  3. package/dist/builders/context.d.ts.map +1 -0
  4. package/dist/builders/context.js +190 -0
  5. package/dist/cache/index.d.ts +100 -0
  6. package/dist/cache/index.d.ts.map +1 -0
  7. package/dist/cache/index.js +270 -0
  8. package/dist/cli/index.d.ts +3 -0
  9. package/dist/cli/index.d.ts.map +1 -0
  10. package/dist/cli/index.js +463 -0
  11. package/dist/commands/package.d.ts +96 -0
  12. package/dist/commands/package.d.ts.map +1 -0
  13. package/dist/commands/package.js +285 -0
  14. package/dist/index.d.ts +7 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +7 -0
  17. package/dist/loader.d.ts +6 -0
  18. package/dist/loader.d.ts.map +1 -0
  19. package/dist/loader.js +361 -0
  20. package/dist/merge.d.ts +16 -0
  21. package/dist/merge.d.ts.map +1 -0
  22. package/dist/merge.js +102 -0
  23. package/dist/package/manifest.d.ts +59 -0
  24. package/dist/package/manifest.d.ts.map +1 -0
  25. package/dist/package/manifest.js +265 -0
  26. package/dist/parser.d.ts +28 -0
  27. package/dist/parser.d.ts.map +1 -0
  28. package/dist/parser.js +220 -0
  29. package/dist/parsers/frontmatter.d.ts +14 -0
  30. package/dist/parsers/frontmatter.d.ts.map +1 -0
  31. package/dist/parsers/frontmatter.js +110 -0
  32. package/dist/parsers/imports.d.ts +48 -0
  33. package/dist/parsers/imports.d.ts.map +1 -0
  34. package/dist/parsers/imports.js +147 -0
  35. package/dist/parsers/links.d.ts +12 -0
  36. package/dist/parsers/links.d.ts.map +1 -0
  37. package/dist/parsers/links.js +79 -0
  38. package/dist/parsers/localdefs.d.ts +6 -0
  39. package/dist/parsers/localdefs.d.ts.map +1 -0
  40. package/dist/parsers/localdefs.js +132 -0
  41. package/dist/parsers/operations.d.ts +32 -0
  42. package/dist/parsers/operations.d.ts.map +1 -0
  43. package/dist/parsers/operations.js +313 -0
  44. package/dist/parsers/sections.d.ts +15 -0
  45. package/dist/parsers/sections.d.ts.map +1 -0
  46. package/dist/parsers/sections.js +173 -0
  47. package/dist/parsers/tools.d.ts +30 -0
  48. package/dist/parsers/tools.d.ts.map +1 -0
  49. package/dist/parsers/tools.js +178 -0
  50. package/dist/parsers/triggers.d.ts +35 -0
  51. package/dist/parsers/triggers.d.ts.map +1 -0
  52. package/dist/parsers/triggers.js +219 -0
  53. package/dist/providers/base.d.ts +60 -0
  54. package/dist/providers/base.d.ts.map +1 -0
  55. package/dist/providers/base.js +34 -0
  56. package/dist/providers/github.d.ts +18 -0
  57. package/dist/providers/github.d.ts.map +1 -0
  58. package/dist/providers/github.js +109 -0
  59. package/dist/providers/gitlab.d.ts +18 -0
  60. package/dist/providers/gitlab.d.ts.map +1 -0
  61. package/dist/providers/gitlab.js +101 -0
  62. package/dist/providers/index.d.ts +13 -0
  63. package/dist/providers/index.d.ts.map +1 -0
  64. package/dist/providers/index.js +17 -0
  65. package/dist/providers/local.d.ts +31 -0
  66. package/dist/providers/local.d.ts.map +1 -0
  67. package/dist/providers/local.js +116 -0
  68. package/dist/providers/url.d.ts +16 -0
  69. package/dist/providers/url.d.ts.map +1 -0
  70. package/dist/providers/url.js +45 -0
  71. package/dist/registry/index.d.ts +99 -0
  72. package/dist/registry/index.d.ts.map +1 -0
  73. package/dist/registry/index.js +320 -0
  74. package/dist/types/schema.d.ts +3259 -0
  75. package/dist/types/schema.d.ts.map +1 -0
  76. package/dist/types/schema.js +258 -0
  77. package/dist/utils/logger.d.ts +19 -0
  78. package/dist/utils/logger.d.ts.map +1 -0
  79. package/dist/utils/logger.js +23 -0
  80. package/dist/utils/slugify.d.ts +14 -0
  81. package/dist/utils/slugify.d.ts.map +1 -0
  82. package/dist/utils/slugify.js +28 -0
  83. package/package.json +61 -0
  84. package/src/__tests__/cache.test.ts +393 -0
  85. package/src/__tests__/cli-package.test.ts +667 -0
  86. package/src/__tests__/fixtures/automated-workflow.busy.md +84 -0
  87. package/src/__tests__/fixtures/concept.busy.md +30 -0
  88. package/src/__tests__/fixtures/document.busy.md +44 -0
  89. package/src/__tests__/fixtures/simple-operation.busy.md +45 -0
  90. package/src/__tests__/fixtures/tool-document.busy.md +71 -0
  91. package/src/__tests__/fixtures/tool.busy.md +54 -0
  92. package/src/__tests__/imports.test.ts +244 -0
  93. package/src/__tests__/integration.test.ts +432 -0
  94. package/src/__tests__/operations.test.ts +408 -0
  95. package/src/__tests__/package-manifest.test.ts +455 -0
  96. package/src/__tests__/providers.test.ts +672 -0
  97. package/src/__tests__/registry.test.ts +402 -0
  98. package/src/__tests__/schema.test.ts +467 -0
  99. package/src/__tests__/tools.test.ts +376 -0
  100. package/src/__tests__/triggers.test.ts +312 -0
  101. package/src/builders/context.ts +294 -0
  102. package/src/cache/index.ts +312 -0
  103. package/src/cli/index.ts +514 -0
  104. package/src/commands/package.ts +392 -0
  105. package/src/index.ts +46 -0
  106. package/src/loader.ts +474 -0
  107. package/src/merge.ts +126 -0
  108. package/src/package/manifest.ts +349 -0
  109. package/src/parser.ts +278 -0
  110. package/src/parsers/frontmatter.ts +135 -0
  111. package/src/parsers/imports.ts +196 -0
  112. package/src/parsers/links.ts +108 -0
  113. package/src/parsers/localdefs.ts +166 -0
  114. package/src/parsers/operations.ts +404 -0
  115. package/src/parsers/sections.ts +230 -0
  116. package/src/parsers/tools.ts +215 -0
  117. package/src/parsers/triggers.ts +252 -0
  118. package/src/providers/base.ts +77 -0
  119. package/src/providers/github.ts +129 -0
  120. package/src/providers/gitlab.ts +121 -0
  121. package/src/providers/index.ts +25 -0
  122. package/src/providers/local.ts +129 -0
  123. package/src/providers/url.ts +56 -0
  124. package/src/registry/index.ts +408 -0
  125. package/src/types/schema.ts +369 -0
  126. package/src/utils/logger.ts +25 -0
  127. package/src/utils/slugify.ts +31 -0
  128. package/tsconfig.json +21 -0
@@ -0,0 +1,3259 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Metadata schema - matches busy-python Metadata model
4
+ * Required: name, type, description
5
+ * Optional: provider (for tool documents)
6
+ * NOTE: Extends and Tags have been removed (not in busy-python)
7
+ */
8
+ export declare const MetadataSchema: z.ZodObject<{
9
+ name: z.ZodString;
10
+ type: z.ZodString;
11
+ description: z.ZodString;
12
+ provider: z.ZodOptional<z.ZodString>;
13
+ }, "strict", z.ZodTypeAny, {
14
+ name: string;
15
+ type: string;
16
+ description: string;
17
+ provider?: string | undefined;
18
+ }, {
19
+ name: string;
20
+ type: string;
21
+ description: string;
22
+ provider?: string | undefined;
23
+ }>;
24
+ export type Metadata = z.infer<typeof MetadataSchema>;
25
+ /**
26
+ * Import schema - matches busy-python Import model
27
+ * Reference-style links: [ConceptName]: path/to/file.md[#anchor]
28
+ */
29
+ export declare const ImportSchema: z.ZodObject<{
30
+ conceptName: z.ZodString;
31
+ path: z.ZodString;
32
+ anchor: z.ZodOptional<z.ZodString>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ path: string;
35
+ conceptName: string;
36
+ anchor?: string | undefined;
37
+ }, {
38
+ path: string;
39
+ conceptName: string;
40
+ anchor?: string | undefined;
41
+ }>;
42
+ export type Import = z.infer<typeof ImportSchema>;
43
+ /**
44
+ * LocalDefinition schema - matches busy-python LocalDefinition model
45
+ */
46
+ export declare const LocalDefinitionSchema: z.ZodObject<{
47
+ name: z.ZodString;
48
+ content: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ name: string;
51
+ content: string;
52
+ }, {
53
+ name: string;
54
+ content: string;
55
+ }>;
56
+ export type LocalDefinition = z.infer<typeof LocalDefinitionSchema>;
57
+ /**
58
+ * Step schema - matches busy-python Step model
59
+ * Steps have stepNumber, instruction, and optional operationReferences
60
+ */
61
+ export declare const StepSchema: z.ZodObject<{
62
+ stepNumber: z.ZodNumber;
63
+ instruction: z.ZodString;
64
+ operationReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ stepNumber: number;
67
+ instruction: string;
68
+ operationReferences?: string[] | undefined;
69
+ }, {
70
+ stepNumber: number;
71
+ instruction: string;
72
+ operationReferences?: string[] | undefined;
73
+ }>;
74
+ export type Step = z.infer<typeof StepSchema>;
75
+ /**
76
+ * Checklist schema - matches busy-python Checklist model
77
+ */
78
+ export declare const ChecklistSchema: z.ZodObject<{
79
+ items: z.ZodArray<z.ZodString, "many">;
80
+ }, "strip", z.ZodTypeAny, {
81
+ items: string[];
82
+ }, {
83
+ items: string[];
84
+ }>;
85
+ export type Checklist = z.infer<typeof ChecklistSchema>;
86
+ /**
87
+ * Trigger schema - matches busy-python Trigger model
88
+ * Supports both time-based (alarm) and event-based triggers
89
+ */
90
+ export declare const TriggerSchema: z.ZodObject<{
91
+ rawText: z.ZodString;
92
+ triggerType: z.ZodEnum<["alarm", "event"]>;
93
+ schedule: z.ZodOptional<z.ZodString>;
94
+ eventType: z.ZodOptional<z.ZodString>;
95
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
96
+ operation: z.ZodString;
97
+ queueWhenPaused: z.ZodDefault<z.ZodBoolean>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ rawText: string;
100
+ triggerType: "alarm" | "event";
101
+ operation: string;
102
+ queueWhenPaused: boolean;
103
+ filter?: Record<string, string> | undefined;
104
+ schedule?: string | undefined;
105
+ eventType?: string | undefined;
106
+ }, {
107
+ rawText: string;
108
+ triggerType: "alarm" | "event";
109
+ operation: string;
110
+ filter?: Record<string, string> | undefined;
111
+ schedule?: string | undefined;
112
+ eventType?: string | undefined;
113
+ queueWhenPaused?: boolean | undefined;
114
+ }>;
115
+ export type Trigger = z.infer<typeof TriggerSchema>;
116
+ /**
117
+ * Operation schema (NEW) - matches busy-python Operation model
118
+ * Different from the old graph-based OperationSchema
119
+ */
120
+ export declare const NewOperationSchema: z.ZodObject<{
121
+ name: z.ZodString;
122
+ inputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
123
+ outputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
124
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
125
+ stepNumber: z.ZodNumber;
126
+ instruction: z.ZodString;
127
+ operationReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ stepNumber: number;
130
+ instruction: string;
131
+ operationReferences?: string[] | undefined;
132
+ }, {
133
+ stepNumber: number;
134
+ instruction: string;
135
+ operationReferences?: string[] | undefined;
136
+ }>, "many">>;
137
+ checklist: z.ZodOptional<z.ZodObject<{
138
+ items: z.ZodArray<z.ZodString, "many">;
139
+ }, "strip", z.ZodTypeAny, {
140
+ items: string[];
141
+ }, {
142
+ items: string[];
143
+ }>>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ name: string;
146
+ inputs: string[];
147
+ outputs: string[];
148
+ steps: {
149
+ stepNumber: number;
150
+ instruction: string;
151
+ operationReferences?: string[] | undefined;
152
+ }[];
153
+ checklist?: {
154
+ items: string[];
155
+ } | undefined;
156
+ }, {
157
+ name: string;
158
+ inputs?: string[] | undefined;
159
+ outputs?: string[] | undefined;
160
+ steps?: {
161
+ stepNumber: number;
162
+ instruction: string;
163
+ operationReferences?: string[] | undefined;
164
+ }[] | undefined;
165
+ checklist?: {
166
+ items: string[];
167
+ } | undefined;
168
+ }>;
169
+ export type NewOperation = z.infer<typeof NewOperationSchema>;
170
+ /**
171
+ * Tool schema - matches busy-python Tool model
172
+ * Tools have provider mappings for external integrations
173
+ */
174
+ export declare const ToolSchema: z.ZodObject<{
175
+ name: z.ZodString;
176
+ description: z.ZodString;
177
+ inputs: z.ZodArray<z.ZodString, "many">;
178
+ outputs: z.ZodArray<z.ZodString, "many">;
179
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
180
+ providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
181
+ action: z.ZodString;
182
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ action: string;
185
+ parameters?: Record<string, any> | undefined;
186
+ }, {
187
+ action: string;
188
+ parameters?: Record<string, any> | undefined;
189
+ }>>>;
190
+ }, "strip", z.ZodTypeAny, {
191
+ name: string;
192
+ description: string;
193
+ inputs: string[];
194
+ outputs: string[];
195
+ examples?: string[] | undefined;
196
+ providers?: Record<string, {
197
+ action: string;
198
+ parameters?: Record<string, any> | undefined;
199
+ }> | undefined;
200
+ }, {
201
+ name: string;
202
+ description: string;
203
+ inputs: string[];
204
+ outputs: string[];
205
+ examples?: string[] | undefined;
206
+ providers?: Record<string, {
207
+ action: string;
208
+ parameters?: Record<string, any> | undefined;
209
+ }> | undefined;
210
+ }>;
211
+ export type Tool = z.infer<typeof ToolSchema>;
212
+ /**
213
+ * BusyDocument schema (NEW) - matches busy-python BusyDocument model
214
+ * This is the new document-centric schema, different from the graph-based one
215
+ */
216
+ export declare const NewBusyDocumentSchema: z.ZodObject<{
217
+ metadata: z.ZodObject<{
218
+ name: z.ZodString;
219
+ type: z.ZodString;
220
+ description: z.ZodString;
221
+ provider: z.ZodOptional<z.ZodString>;
222
+ }, "strict", z.ZodTypeAny, {
223
+ name: string;
224
+ type: string;
225
+ description: string;
226
+ provider?: string | undefined;
227
+ }, {
228
+ name: string;
229
+ type: string;
230
+ description: string;
231
+ provider?: string | undefined;
232
+ }>;
233
+ imports: z.ZodDefault<z.ZodArray<z.ZodObject<{
234
+ conceptName: z.ZodString;
235
+ path: z.ZodString;
236
+ anchor: z.ZodOptional<z.ZodString>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ path: string;
239
+ conceptName: string;
240
+ anchor?: string | undefined;
241
+ }, {
242
+ path: string;
243
+ conceptName: string;
244
+ anchor?: string | undefined;
245
+ }>, "many">>;
246
+ definitions: z.ZodDefault<z.ZodArray<z.ZodObject<{
247
+ name: z.ZodString;
248
+ content: z.ZodString;
249
+ }, "strip", z.ZodTypeAny, {
250
+ name: string;
251
+ content: string;
252
+ }, {
253
+ name: string;
254
+ content: string;
255
+ }>, "many">>;
256
+ setup: z.ZodOptional<z.ZodString>;
257
+ operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
258
+ name: z.ZodString;
259
+ inputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
260
+ outputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
261
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
262
+ stepNumber: z.ZodNumber;
263
+ instruction: z.ZodString;
264
+ operationReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
265
+ }, "strip", z.ZodTypeAny, {
266
+ stepNumber: number;
267
+ instruction: string;
268
+ operationReferences?: string[] | undefined;
269
+ }, {
270
+ stepNumber: number;
271
+ instruction: string;
272
+ operationReferences?: string[] | undefined;
273
+ }>, "many">>;
274
+ checklist: z.ZodOptional<z.ZodObject<{
275
+ items: z.ZodArray<z.ZodString, "many">;
276
+ }, "strip", z.ZodTypeAny, {
277
+ items: string[];
278
+ }, {
279
+ items: string[];
280
+ }>>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ name: string;
283
+ inputs: string[];
284
+ outputs: string[];
285
+ steps: {
286
+ stepNumber: number;
287
+ instruction: string;
288
+ operationReferences?: string[] | undefined;
289
+ }[];
290
+ checklist?: {
291
+ items: string[];
292
+ } | undefined;
293
+ }, {
294
+ name: string;
295
+ inputs?: string[] | undefined;
296
+ outputs?: string[] | undefined;
297
+ steps?: {
298
+ stepNumber: number;
299
+ instruction: string;
300
+ operationReferences?: string[] | undefined;
301
+ }[] | undefined;
302
+ checklist?: {
303
+ items: string[];
304
+ } | undefined;
305
+ }>, "many">>;
306
+ triggers: z.ZodDefault<z.ZodArray<z.ZodObject<{
307
+ rawText: z.ZodString;
308
+ triggerType: z.ZodEnum<["alarm", "event"]>;
309
+ schedule: z.ZodOptional<z.ZodString>;
310
+ eventType: z.ZodOptional<z.ZodString>;
311
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
312
+ operation: z.ZodString;
313
+ queueWhenPaused: z.ZodDefault<z.ZodBoolean>;
314
+ }, "strip", z.ZodTypeAny, {
315
+ rawText: string;
316
+ triggerType: "alarm" | "event";
317
+ operation: string;
318
+ queueWhenPaused: boolean;
319
+ filter?: Record<string, string> | undefined;
320
+ schedule?: string | undefined;
321
+ eventType?: string | undefined;
322
+ }, {
323
+ rawText: string;
324
+ triggerType: "alarm" | "event";
325
+ operation: string;
326
+ filter?: Record<string, string> | undefined;
327
+ schedule?: string | undefined;
328
+ eventType?: string | undefined;
329
+ queueWhenPaused?: boolean | undefined;
330
+ }>, "many">>;
331
+ }, "strip", z.ZodTypeAny, {
332
+ metadata: {
333
+ name: string;
334
+ type: string;
335
+ description: string;
336
+ provider?: string | undefined;
337
+ };
338
+ imports: {
339
+ path: string;
340
+ conceptName: string;
341
+ anchor?: string | undefined;
342
+ }[];
343
+ definitions: {
344
+ name: string;
345
+ content: string;
346
+ }[];
347
+ operations: {
348
+ name: string;
349
+ inputs: string[];
350
+ outputs: string[];
351
+ steps: {
352
+ stepNumber: number;
353
+ instruction: string;
354
+ operationReferences?: string[] | undefined;
355
+ }[];
356
+ checklist?: {
357
+ items: string[];
358
+ } | undefined;
359
+ }[];
360
+ triggers: {
361
+ rawText: string;
362
+ triggerType: "alarm" | "event";
363
+ operation: string;
364
+ queueWhenPaused: boolean;
365
+ filter?: Record<string, string> | undefined;
366
+ schedule?: string | undefined;
367
+ eventType?: string | undefined;
368
+ }[];
369
+ setup?: string | undefined;
370
+ }, {
371
+ metadata: {
372
+ name: string;
373
+ type: string;
374
+ description: string;
375
+ provider?: string | undefined;
376
+ };
377
+ imports?: {
378
+ path: string;
379
+ conceptName: string;
380
+ anchor?: string | undefined;
381
+ }[] | undefined;
382
+ definitions?: {
383
+ name: string;
384
+ content: string;
385
+ }[] | undefined;
386
+ setup?: string | undefined;
387
+ operations?: {
388
+ name: string;
389
+ inputs?: string[] | undefined;
390
+ outputs?: string[] | undefined;
391
+ steps?: {
392
+ stepNumber: number;
393
+ instruction: string;
394
+ operationReferences?: string[] | undefined;
395
+ }[] | undefined;
396
+ checklist?: {
397
+ items: string[];
398
+ } | undefined;
399
+ }[] | undefined;
400
+ triggers?: {
401
+ rawText: string;
402
+ triggerType: "alarm" | "event";
403
+ operation: string;
404
+ filter?: Record<string, string> | undefined;
405
+ schedule?: string | undefined;
406
+ eventType?: string | undefined;
407
+ queueWhenPaused?: boolean | undefined;
408
+ }[] | undefined;
409
+ }>;
410
+ export type NewBusyDocument = z.infer<typeof NewBusyDocumentSchema>;
411
+ /**
412
+ * ToolDocument schema - extends BusyDocument with tools array
413
+ */
414
+ export declare const ToolDocumentSchema: z.ZodObject<{
415
+ metadata: z.ZodObject<{
416
+ name: z.ZodString;
417
+ type: z.ZodString;
418
+ description: z.ZodString;
419
+ provider: z.ZodOptional<z.ZodString>;
420
+ }, "strict", z.ZodTypeAny, {
421
+ name: string;
422
+ type: string;
423
+ description: string;
424
+ provider?: string | undefined;
425
+ }, {
426
+ name: string;
427
+ type: string;
428
+ description: string;
429
+ provider?: string | undefined;
430
+ }>;
431
+ imports: z.ZodDefault<z.ZodArray<z.ZodObject<{
432
+ conceptName: z.ZodString;
433
+ path: z.ZodString;
434
+ anchor: z.ZodOptional<z.ZodString>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ path: string;
437
+ conceptName: string;
438
+ anchor?: string | undefined;
439
+ }, {
440
+ path: string;
441
+ conceptName: string;
442
+ anchor?: string | undefined;
443
+ }>, "many">>;
444
+ definitions: z.ZodDefault<z.ZodArray<z.ZodObject<{
445
+ name: z.ZodString;
446
+ content: z.ZodString;
447
+ }, "strip", z.ZodTypeAny, {
448
+ name: string;
449
+ content: string;
450
+ }, {
451
+ name: string;
452
+ content: string;
453
+ }>, "many">>;
454
+ setup: z.ZodOptional<z.ZodString>;
455
+ operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
456
+ name: z.ZodString;
457
+ inputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
458
+ outputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
459
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
460
+ stepNumber: z.ZodNumber;
461
+ instruction: z.ZodString;
462
+ operationReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
463
+ }, "strip", z.ZodTypeAny, {
464
+ stepNumber: number;
465
+ instruction: string;
466
+ operationReferences?: string[] | undefined;
467
+ }, {
468
+ stepNumber: number;
469
+ instruction: string;
470
+ operationReferences?: string[] | undefined;
471
+ }>, "many">>;
472
+ checklist: z.ZodOptional<z.ZodObject<{
473
+ items: z.ZodArray<z.ZodString, "many">;
474
+ }, "strip", z.ZodTypeAny, {
475
+ items: string[];
476
+ }, {
477
+ items: string[];
478
+ }>>;
479
+ }, "strip", z.ZodTypeAny, {
480
+ name: string;
481
+ inputs: string[];
482
+ outputs: string[];
483
+ steps: {
484
+ stepNumber: number;
485
+ instruction: string;
486
+ operationReferences?: string[] | undefined;
487
+ }[];
488
+ checklist?: {
489
+ items: string[];
490
+ } | undefined;
491
+ }, {
492
+ name: string;
493
+ inputs?: string[] | undefined;
494
+ outputs?: string[] | undefined;
495
+ steps?: {
496
+ stepNumber: number;
497
+ instruction: string;
498
+ operationReferences?: string[] | undefined;
499
+ }[] | undefined;
500
+ checklist?: {
501
+ items: string[];
502
+ } | undefined;
503
+ }>, "many">>;
504
+ triggers: z.ZodDefault<z.ZodArray<z.ZodObject<{
505
+ rawText: z.ZodString;
506
+ triggerType: z.ZodEnum<["alarm", "event"]>;
507
+ schedule: z.ZodOptional<z.ZodString>;
508
+ eventType: z.ZodOptional<z.ZodString>;
509
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
510
+ operation: z.ZodString;
511
+ queueWhenPaused: z.ZodDefault<z.ZodBoolean>;
512
+ }, "strip", z.ZodTypeAny, {
513
+ rawText: string;
514
+ triggerType: "alarm" | "event";
515
+ operation: string;
516
+ queueWhenPaused: boolean;
517
+ filter?: Record<string, string> | undefined;
518
+ schedule?: string | undefined;
519
+ eventType?: string | undefined;
520
+ }, {
521
+ rawText: string;
522
+ triggerType: "alarm" | "event";
523
+ operation: string;
524
+ filter?: Record<string, string> | undefined;
525
+ schedule?: string | undefined;
526
+ eventType?: string | undefined;
527
+ queueWhenPaused?: boolean | undefined;
528
+ }>, "many">>;
529
+ } & {
530
+ tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
531
+ name: z.ZodString;
532
+ description: z.ZodString;
533
+ inputs: z.ZodArray<z.ZodString, "many">;
534
+ outputs: z.ZodArray<z.ZodString, "many">;
535
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
536
+ providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
537
+ action: z.ZodString;
538
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
539
+ }, "strip", z.ZodTypeAny, {
540
+ action: string;
541
+ parameters?: Record<string, any> | undefined;
542
+ }, {
543
+ action: string;
544
+ parameters?: Record<string, any> | undefined;
545
+ }>>>;
546
+ }, "strip", z.ZodTypeAny, {
547
+ name: string;
548
+ description: string;
549
+ inputs: string[];
550
+ outputs: string[];
551
+ examples?: string[] | undefined;
552
+ providers?: Record<string, {
553
+ action: string;
554
+ parameters?: Record<string, any> | undefined;
555
+ }> | undefined;
556
+ }, {
557
+ name: string;
558
+ description: string;
559
+ inputs: string[];
560
+ outputs: string[];
561
+ examples?: string[] | undefined;
562
+ providers?: Record<string, {
563
+ action: string;
564
+ parameters?: Record<string, any> | undefined;
565
+ }> | undefined;
566
+ }>, "many">>;
567
+ }, "strip", z.ZodTypeAny, {
568
+ metadata: {
569
+ name: string;
570
+ type: string;
571
+ description: string;
572
+ provider?: string | undefined;
573
+ };
574
+ imports: {
575
+ path: string;
576
+ conceptName: string;
577
+ anchor?: string | undefined;
578
+ }[];
579
+ definitions: {
580
+ name: string;
581
+ content: string;
582
+ }[];
583
+ operations: {
584
+ name: string;
585
+ inputs: string[];
586
+ outputs: string[];
587
+ steps: {
588
+ stepNumber: number;
589
+ instruction: string;
590
+ operationReferences?: string[] | undefined;
591
+ }[];
592
+ checklist?: {
593
+ items: string[];
594
+ } | undefined;
595
+ }[];
596
+ triggers: {
597
+ rawText: string;
598
+ triggerType: "alarm" | "event";
599
+ operation: string;
600
+ queueWhenPaused: boolean;
601
+ filter?: Record<string, string> | undefined;
602
+ schedule?: string | undefined;
603
+ eventType?: string | undefined;
604
+ }[];
605
+ tools: {
606
+ name: string;
607
+ description: string;
608
+ inputs: string[];
609
+ outputs: string[];
610
+ examples?: string[] | undefined;
611
+ providers?: Record<string, {
612
+ action: string;
613
+ parameters?: Record<string, any> | undefined;
614
+ }> | undefined;
615
+ }[];
616
+ setup?: string | undefined;
617
+ }, {
618
+ metadata: {
619
+ name: string;
620
+ type: string;
621
+ description: string;
622
+ provider?: string | undefined;
623
+ };
624
+ imports?: {
625
+ path: string;
626
+ conceptName: string;
627
+ anchor?: string | undefined;
628
+ }[] | undefined;
629
+ definitions?: {
630
+ name: string;
631
+ content: string;
632
+ }[] | undefined;
633
+ setup?: string | undefined;
634
+ operations?: {
635
+ name: string;
636
+ inputs?: string[] | undefined;
637
+ outputs?: string[] | undefined;
638
+ steps?: {
639
+ stepNumber: number;
640
+ instruction: string;
641
+ operationReferences?: string[] | undefined;
642
+ }[] | undefined;
643
+ checklist?: {
644
+ items: string[];
645
+ } | undefined;
646
+ }[] | undefined;
647
+ triggers?: {
648
+ rawText: string;
649
+ triggerType: "alarm" | "event";
650
+ operation: string;
651
+ filter?: Record<string, string> | undefined;
652
+ schedule?: string | undefined;
653
+ eventType?: string | undefined;
654
+ queueWhenPaused?: boolean | undefined;
655
+ }[] | undefined;
656
+ tools?: {
657
+ name: string;
658
+ description: string;
659
+ inputs: string[];
660
+ outputs: string[];
661
+ examples?: string[] | undefined;
662
+ providers?: Record<string, {
663
+ action: string;
664
+ parameters?: Record<string, any> | undefined;
665
+ }> | undefined;
666
+ }[] | undefined;
667
+ }>;
668
+ export type ToolDocument = z.infer<typeof ToolDocumentSchema>;
669
+ export declare const DocIdSchema: z.ZodString;
670
+ export declare const SlugSchema: z.ZodString;
671
+ export declare const SectionIdSchema: z.ZodString;
672
+ export declare const ConceptIdSchema: z.ZodString;
673
+ type Section = {
674
+ kind: 'section';
675
+ id: string;
676
+ docId: string;
677
+ slug: string;
678
+ title: string;
679
+ depth: number;
680
+ path: string;
681
+ lineStart: number;
682
+ lineEnd: number;
683
+ content: string;
684
+ children: Section[];
685
+ };
686
+ type ConceptBase = {
687
+ kind: 'concept' | 'document' | 'operation' | 'checklist' | 'tool' | 'playbook' | 'localdef' | 'importdef' | 'setup';
688
+ id: string;
689
+ docId: string;
690
+ slug: string;
691
+ name: string;
692
+ description?: string;
693
+ types: string[];
694
+ extends: string[];
695
+ sectionRef: string;
696
+ children: ConceptBase[];
697
+ };
698
+ export declare const SectionSchema: z.ZodType<Section>;
699
+ export type { Section };
700
+ export declare const ConceptBaseSchema: z.ZodType<ConceptBase>;
701
+ export type { ConceptBase };
702
+ export declare const LocalDefSchema: z.ZodObject<{
703
+ id: z.ZodString;
704
+ docId: z.ZodString;
705
+ slug: z.ZodString;
706
+ name: z.ZodString;
707
+ content: z.ZodString;
708
+ types: z.ZodArray<z.ZodString, "many">;
709
+ extends: z.ZodArray<z.ZodString, "many">;
710
+ sectionRef: z.ZodString;
711
+ } & {
712
+ kind: z.ZodLiteral<"localdef">;
713
+ }, "strip", z.ZodTypeAny, {
714
+ name: string;
715
+ content: string;
716
+ kind: "localdef";
717
+ id: string;
718
+ docId: string;
719
+ slug: string;
720
+ types: string[];
721
+ extends: string[];
722
+ sectionRef: string;
723
+ }, {
724
+ name: string;
725
+ content: string;
726
+ kind: "localdef";
727
+ id: string;
728
+ docId: string;
729
+ slug: string;
730
+ types: string[];
731
+ extends: string[];
732
+ sectionRef: string;
733
+ }>;
734
+ export declare const SetupSchema: z.ZodObject<{
735
+ id: z.ZodString;
736
+ docId: z.ZodString;
737
+ slug: z.ZodString;
738
+ name: z.ZodString;
739
+ content: z.ZodString;
740
+ types: z.ZodArray<z.ZodString, "many">;
741
+ extends: z.ZodArray<z.ZodString, "many">;
742
+ sectionRef: z.ZodString;
743
+ } & {
744
+ kind: z.ZodLiteral<"setup">;
745
+ }, "strip", z.ZodTypeAny, {
746
+ name: string;
747
+ content: string;
748
+ kind: "setup";
749
+ id: string;
750
+ docId: string;
751
+ slug: string;
752
+ types: string[];
753
+ extends: string[];
754
+ sectionRef: string;
755
+ }, {
756
+ name: string;
757
+ content: string;
758
+ kind: "setup";
759
+ id: string;
760
+ docId: string;
761
+ slug: string;
762
+ types: string[];
763
+ extends: string[];
764
+ sectionRef: string;
765
+ }>;
766
+ export declare const LegacyOperationSchema: z.ZodObject<{
767
+ id: z.ZodString;
768
+ docId: z.ZodString;
769
+ slug: z.ZodString;
770
+ name: z.ZodString;
771
+ content: z.ZodString;
772
+ types: z.ZodArray<z.ZodString, "many">;
773
+ extends: z.ZodArray<z.ZodString, "many">;
774
+ sectionRef: z.ZodString;
775
+ } & {
776
+ kind: z.ZodLiteral<"operation">;
777
+ steps: z.ZodArray<z.ZodString, "many">;
778
+ checklist: z.ZodArray<z.ZodString, "many">;
779
+ }, "strip", z.ZodTypeAny, {
780
+ name: string;
781
+ content: string;
782
+ steps: string[];
783
+ checklist: string[];
784
+ kind: "operation";
785
+ id: string;
786
+ docId: string;
787
+ slug: string;
788
+ types: string[];
789
+ extends: string[];
790
+ sectionRef: string;
791
+ }, {
792
+ name: string;
793
+ content: string;
794
+ steps: string[];
795
+ checklist: string[];
796
+ kind: "operation";
797
+ id: string;
798
+ docId: string;
799
+ slug: string;
800
+ types: string[];
801
+ extends: string[];
802
+ sectionRef: string;
803
+ }>;
804
+ export declare const OperationSchema: z.ZodObject<{
805
+ id: z.ZodString;
806
+ docId: z.ZodString;
807
+ slug: z.ZodString;
808
+ name: z.ZodString;
809
+ content: z.ZodString;
810
+ types: z.ZodArray<z.ZodString, "many">;
811
+ extends: z.ZodArray<z.ZodString, "many">;
812
+ sectionRef: z.ZodString;
813
+ } & {
814
+ kind: z.ZodLiteral<"operation">;
815
+ steps: z.ZodArray<z.ZodString, "many">;
816
+ checklist: z.ZodArray<z.ZodString, "many">;
817
+ }, "strip", z.ZodTypeAny, {
818
+ name: string;
819
+ content: string;
820
+ steps: string[];
821
+ checklist: string[];
822
+ kind: "operation";
823
+ id: string;
824
+ docId: string;
825
+ slug: string;
826
+ types: string[];
827
+ extends: string[];
828
+ sectionRef: string;
829
+ }, {
830
+ name: string;
831
+ content: string;
832
+ steps: string[];
833
+ checklist: string[];
834
+ kind: "operation";
835
+ id: string;
836
+ docId: string;
837
+ slug: string;
838
+ types: string[];
839
+ extends: string[];
840
+ sectionRef: string;
841
+ }>;
842
+ export declare const ImportDefSchema: z.ZodObject<{
843
+ id: z.ZodString;
844
+ docId: z.ZodString;
845
+ slug: z.ZodString;
846
+ name: z.ZodString;
847
+ content: z.ZodString;
848
+ types: z.ZodArray<z.ZodString, "many">;
849
+ extends: z.ZodArray<z.ZodString, "many">;
850
+ sectionRef: z.ZodString;
851
+ } & {
852
+ kind: z.ZodLiteral<"importdef">;
853
+ label: z.ZodString;
854
+ target: z.ZodString;
855
+ resolved: z.ZodOptional<z.ZodString>;
856
+ }, "strip", z.ZodTypeAny, {
857
+ name: string;
858
+ content: string;
859
+ kind: "importdef";
860
+ id: string;
861
+ docId: string;
862
+ slug: string;
863
+ types: string[];
864
+ extends: string[];
865
+ sectionRef: string;
866
+ label: string;
867
+ target: string;
868
+ resolved?: string | undefined;
869
+ }, {
870
+ name: string;
871
+ content: string;
872
+ kind: "importdef";
873
+ id: string;
874
+ docId: string;
875
+ slug: string;
876
+ types: string[];
877
+ extends: string[];
878
+ sectionRef: string;
879
+ label: string;
880
+ target: string;
881
+ resolved?: string | undefined;
882
+ }>;
883
+ export declare const LegacyBusyDocumentSchema: z.ZodObject<{
884
+ id: z.ZodString;
885
+ docId: z.ZodString;
886
+ slug: z.ZodString;
887
+ name: z.ZodString;
888
+ content: z.ZodString;
889
+ types: z.ZodArray<z.ZodString, "many">;
890
+ extends: z.ZodArray<z.ZodString, "many">;
891
+ sectionRef: z.ZodString;
892
+ } & {
893
+ kind: z.ZodLiteral<"document">;
894
+ imports: z.ZodArray<z.ZodObject<{
895
+ id: z.ZodString;
896
+ docId: z.ZodString;
897
+ slug: z.ZodString;
898
+ name: z.ZodString;
899
+ content: z.ZodString;
900
+ types: z.ZodArray<z.ZodString, "many">;
901
+ extends: z.ZodArray<z.ZodString, "many">;
902
+ sectionRef: z.ZodString;
903
+ } & {
904
+ kind: z.ZodLiteral<"importdef">;
905
+ label: z.ZodString;
906
+ target: z.ZodString;
907
+ resolved: z.ZodOptional<z.ZodString>;
908
+ }, "strip", z.ZodTypeAny, {
909
+ name: string;
910
+ content: string;
911
+ kind: "importdef";
912
+ id: string;
913
+ docId: string;
914
+ slug: string;
915
+ types: string[];
916
+ extends: string[];
917
+ sectionRef: string;
918
+ label: string;
919
+ target: string;
920
+ resolved?: string | undefined;
921
+ }, {
922
+ name: string;
923
+ content: string;
924
+ kind: "importdef";
925
+ id: string;
926
+ docId: string;
927
+ slug: string;
928
+ types: string[];
929
+ extends: string[];
930
+ sectionRef: string;
931
+ label: string;
932
+ target: string;
933
+ resolved?: string | undefined;
934
+ }>, "many">;
935
+ localdefs: z.ZodArray<z.ZodObject<{
936
+ id: z.ZodString;
937
+ docId: z.ZodString;
938
+ slug: z.ZodString;
939
+ name: z.ZodString;
940
+ content: z.ZodString;
941
+ types: z.ZodArray<z.ZodString, "many">;
942
+ extends: z.ZodArray<z.ZodString, "many">;
943
+ sectionRef: z.ZodString;
944
+ } & {
945
+ kind: z.ZodLiteral<"localdef">;
946
+ }, "strip", z.ZodTypeAny, {
947
+ name: string;
948
+ content: string;
949
+ kind: "localdef";
950
+ id: string;
951
+ docId: string;
952
+ slug: string;
953
+ types: string[];
954
+ extends: string[];
955
+ sectionRef: string;
956
+ }, {
957
+ name: string;
958
+ content: string;
959
+ kind: "localdef";
960
+ id: string;
961
+ docId: string;
962
+ slug: string;
963
+ types: string[];
964
+ extends: string[];
965
+ sectionRef: string;
966
+ }>, "many">;
967
+ setup: z.ZodObject<{
968
+ id: z.ZodString;
969
+ docId: z.ZodString;
970
+ slug: z.ZodString;
971
+ name: z.ZodString;
972
+ content: z.ZodString;
973
+ types: z.ZodArray<z.ZodString, "many">;
974
+ extends: z.ZodArray<z.ZodString, "many">;
975
+ sectionRef: z.ZodString;
976
+ } & {
977
+ kind: z.ZodLiteral<"setup">;
978
+ }, "strip", z.ZodTypeAny, {
979
+ name: string;
980
+ content: string;
981
+ kind: "setup";
982
+ id: string;
983
+ docId: string;
984
+ slug: string;
985
+ types: string[];
986
+ extends: string[];
987
+ sectionRef: string;
988
+ }, {
989
+ name: string;
990
+ content: string;
991
+ kind: "setup";
992
+ id: string;
993
+ docId: string;
994
+ slug: string;
995
+ types: string[];
996
+ extends: string[];
997
+ sectionRef: string;
998
+ }>;
999
+ operations: z.ZodArray<z.ZodObject<{
1000
+ id: z.ZodString;
1001
+ docId: z.ZodString;
1002
+ slug: z.ZodString;
1003
+ name: z.ZodString;
1004
+ content: z.ZodString;
1005
+ types: z.ZodArray<z.ZodString, "many">;
1006
+ extends: z.ZodArray<z.ZodString, "many">;
1007
+ sectionRef: z.ZodString;
1008
+ } & {
1009
+ kind: z.ZodLiteral<"operation">;
1010
+ steps: z.ZodArray<z.ZodString, "many">;
1011
+ checklist: z.ZodArray<z.ZodString, "many">;
1012
+ }, "strip", z.ZodTypeAny, {
1013
+ name: string;
1014
+ content: string;
1015
+ steps: string[];
1016
+ checklist: string[];
1017
+ kind: "operation";
1018
+ id: string;
1019
+ docId: string;
1020
+ slug: string;
1021
+ types: string[];
1022
+ extends: string[];
1023
+ sectionRef: string;
1024
+ }, {
1025
+ name: string;
1026
+ content: string;
1027
+ steps: string[];
1028
+ checklist: string[];
1029
+ kind: "operation";
1030
+ id: string;
1031
+ docId: string;
1032
+ slug: string;
1033
+ types: string[];
1034
+ extends: string[];
1035
+ sectionRef: string;
1036
+ }>, "many">;
1037
+ }, "strip", z.ZodTypeAny, {
1038
+ name: string;
1039
+ content: string;
1040
+ imports: {
1041
+ name: string;
1042
+ content: string;
1043
+ kind: "importdef";
1044
+ id: string;
1045
+ docId: string;
1046
+ slug: string;
1047
+ types: string[];
1048
+ extends: string[];
1049
+ sectionRef: string;
1050
+ label: string;
1051
+ target: string;
1052
+ resolved?: string | undefined;
1053
+ }[];
1054
+ setup: {
1055
+ name: string;
1056
+ content: string;
1057
+ kind: "setup";
1058
+ id: string;
1059
+ docId: string;
1060
+ slug: string;
1061
+ types: string[];
1062
+ extends: string[];
1063
+ sectionRef: string;
1064
+ };
1065
+ operations: {
1066
+ name: string;
1067
+ content: string;
1068
+ steps: string[];
1069
+ checklist: string[];
1070
+ kind: "operation";
1071
+ id: string;
1072
+ docId: string;
1073
+ slug: string;
1074
+ types: string[];
1075
+ extends: string[];
1076
+ sectionRef: string;
1077
+ }[];
1078
+ kind: "document";
1079
+ id: string;
1080
+ docId: string;
1081
+ slug: string;
1082
+ types: string[];
1083
+ extends: string[];
1084
+ sectionRef: string;
1085
+ localdefs: {
1086
+ name: string;
1087
+ content: string;
1088
+ kind: "localdef";
1089
+ id: string;
1090
+ docId: string;
1091
+ slug: string;
1092
+ types: string[];
1093
+ extends: string[];
1094
+ sectionRef: string;
1095
+ }[];
1096
+ }, {
1097
+ name: string;
1098
+ content: string;
1099
+ imports: {
1100
+ name: string;
1101
+ content: string;
1102
+ kind: "importdef";
1103
+ id: string;
1104
+ docId: string;
1105
+ slug: string;
1106
+ types: string[];
1107
+ extends: string[];
1108
+ sectionRef: string;
1109
+ label: string;
1110
+ target: string;
1111
+ resolved?: string | undefined;
1112
+ }[];
1113
+ setup: {
1114
+ name: string;
1115
+ content: string;
1116
+ kind: "setup";
1117
+ id: string;
1118
+ docId: string;
1119
+ slug: string;
1120
+ types: string[];
1121
+ extends: string[];
1122
+ sectionRef: string;
1123
+ };
1124
+ operations: {
1125
+ name: string;
1126
+ content: string;
1127
+ steps: string[];
1128
+ checklist: string[];
1129
+ kind: "operation";
1130
+ id: string;
1131
+ docId: string;
1132
+ slug: string;
1133
+ types: string[];
1134
+ extends: string[];
1135
+ sectionRef: string;
1136
+ }[];
1137
+ kind: "document";
1138
+ id: string;
1139
+ docId: string;
1140
+ slug: string;
1141
+ types: string[];
1142
+ extends: string[];
1143
+ sectionRef: string;
1144
+ localdefs: {
1145
+ name: string;
1146
+ content: string;
1147
+ kind: "localdef";
1148
+ id: string;
1149
+ docId: string;
1150
+ slug: string;
1151
+ types: string[];
1152
+ extends: string[];
1153
+ sectionRef: string;
1154
+ }[];
1155
+ }>;
1156
+ export declare const BusyDocumentSchema: z.ZodObject<{
1157
+ id: z.ZodString;
1158
+ docId: z.ZodString;
1159
+ slug: z.ZodString;
1160
+ name: z.ZodString;
1161
+ content: z.ZodString;
1162
+ types: z.ZodArray<z.ZodString, "many">;
1163
+ extends: z.ZodArray<z.ZodString, "many">;
1164
+ sectionRef: z.ZodString;
1165
+ } & {
1166
+ kind: z.ZodLiteral<"document">;
1167
+ imports: z.ZodArray<z.ZodObject<{
1168
+ id: z.ZodString;
1169
+ docId: z.ZodString;
1170
+ slug: z.ZodString;
1171
+ name: z.ZodString;
1172
+ content: z.ZodString;
1173
+ types: z.ZodArray<z.ZodString, "many">;
1174
+ extends: z.ZodArray<z.ZodString, "many">;
1175
+ sectionRef: z.ZodString;
1176
+ } & {
1177
+ kind: z.ZodLiteral<"importdef">;
1178
+ label: z.ZodString;
1179
+ target: z.ZodString;
1180
+ resolved: z.ZodOptional<z.ZodString>;
1181
+ }, "strip", z.ZodTypeAny, {
1182
+ name: string;
1183
+ content: string;
1184
+ kind: "importdef";
1185
+ id: string;
1186
+ docId: string;
1187
+ slug: string;
1188
+ types: string[];
1189
+ extends: string[];
1190
+ sectionRef: string;
1191
+ label: string;
1192
+ target: string;
1193
+ resolved?: string | undefined;
1194
+ }, {
1195
+ name: string;
1196
+ content: string;
1197
+ kind: "importdef";
1198
+ id: string;
1199
+ docId: string;
1200
+ slug: string;
1201
+ types: string[];
1202
+ extends: string[];
1203
+ sectionRef: string;
1204
+ label: string;
1205
+ target: string;
1206
+ resolved?: string | undefined;
1207
+ }>, "many">;
1208
+ localdefs: z.ZodArray<z.ZodObject<{
1209
+ id: z.ZodString;
1210
+ docId: z.ZodString;
1211
+ slug: z.ZodString;
1212
+ name: z.ZodString;
1213
+ content: z.ZodString;
1214
+ types: z.ZodArray<z.ZodString, "many">;
1215
+ extends: z.ZodArray<z.ZodString, "many">;
1216
+ sectionRef: z.ZodString;
1217
+ } & {
1218
+ kind: z.ZodLiteral<"localdef">;
1219
+ }, "strip", z.ZodTypeAny, {
1220
+ name: string;
1221
+ content: string;
1222
+ kind: "localdef";
1223
+ id: string;
1224
+ docId: string;
1225
+ slug: string;
1226
+ types: string[];
1227
+ extends: string[];
1228
+ sectionRef: string;
1229
+ }, {
1230
+ name: string;
1231
+ content: string;
1232
+ kind: "localdef";
1233
+ id: string;
1234
+ docId: string;
1235
+ slug: string;
1236
+ types: string[];
1237
+ extends: string[];
1238
+ sectionRef: string;
1239
+ }>, "many">;
1240
+ setup: z.ZodObject<{
1241
+ id: z.ZodString;
1242
+ docId: z.ZodString;
1243
+ slug: z.ZodString;
1244
+ name: z.ZodString;
1245
+ content: z.ZodString;
1246
+ types: z.ZodArray<z.ZodString, "many">;
1247
+ extends: z.ZodArray<z.ZodString, "many">;
1248
+ sectionRef: z.ZodString;
1249
+ } & {
1250
+ kind: z.ZodLiteral<"setup">;
1251
+ }, "strip", z.ZodTypeAny, {
1252
+ name: string;
1253
+ content: string;
1254
+ kind: "setup";
1255
+ id: string;
1256
+ docId: string;
1257
+ slug: string;
1258
+ types: string[];
1259
+ extends: string[];
1260
+ sectionRef: string;
1261
+ }, {
1262
+ name: string;
1263
+ content: string;
1264
+ kind: "setup";
1265
+ id: string;
1266
+ docId: string;
1267
+ slug: string;
1268
+ types: string[];
1269
+ extends: string[];
1270
+ sectionRef: string;
1271
+ }>;
1272
+ operations: z.ZodArray<z.ZodObject<{
1273
+ id: z.ZodString;
1274
+ docId: z.ZodString;
1275
+ slug: z.ZodString;
1276
+ name: z.ZodString;
1277
+ content: z.ZodString;
1278
+ types: z.ZodArray<z.ZodString, "many">;
1279
+ extends: z.ZodArray<z.ZodString, "many">;
1280
+ sectionRef: z.ZodString;
1281
+ } & {
1282
+ kind: z.ZodLiteral<"operation">;
1283
+ steps: z.ZodArray<z.ZodString, "many">;
1284
+ checklist: z.ZodArray<z.ZodString, "many">;
1285
+ }, "strip", z.ZodTypeAny, {
1286
+ name: string;
1287
+ content: string;
1288
+ steps: string[];
1289
+ checklist: string[];
1290
+ kind: "operation";
1291
+ id: string;
1292
+ docId: string;
1293
+ slug: string;
1294
+ types: string[];
1295
+ extends: string[];
1296
+ sectionRef: string;
1297
+ }, {
1298
+ name: string;
1299
+ content: string;
1300
+ steps: string[];
1301
+ checklist: string[];
1302
+ kind: "operation";
1303
+ id: string;
1304
+ docId: string;
1305
+ slug: string;
1306
+ types: string[];
1307
+ extends: string[];
1308
+ sectionRef: string;
1309
+ }>, "many">;
1310
+ }, "strip", z.ZodTypeAny, {
1311
+ name: string;
1312
+ content: string;
1313
+ imports: {
1314
+ name: string;
1315
+ content: string;
1316
+ kind: "importdef";
1317
+ id: string;
1318
+ docId: string;
1319
+ slug: string;
1320
+ types: string[];
1321
+ extends: string[];
1322
+ sectionRef: string;
1323
+ label: string;
1324
+ target: string;
1325
+ resolved?: string | undefined;
1326
+ }[];
1327
+ setup: {
1328
+ name: string;
1329
+ content: string;
1330
+ kind: "setup";
1331
+ id: string;
1332
+ docId: string;
1333
+ slug: string;
1334
+ types: string[];
1335
+ extends: string[];
1336
+ sectionRef: string;
1337
+ };
1338
+ operations: {
1339
+ name: string;
1340
+ content: string;
1341
+ steps: string[];
1342
+ checklist: string[];
1343
+ kind: "operation";
1344
+ id: string;
1345
+ docId: string;
1346
+ slug: string;
1347
+ types: string[];
1348
+ extends: string[];
1349
+ sectionRef: string;
1350
+ }[];
1351
+ kind: "document";
1352
+ id: string;
1353
+ docId: string;
1354
+ slug: string;
1355
+ types: string[];
1356
+ extends: string[];
1357
+ sectionRef: string;
1358
+ localdefs: {
1359
+ name: string;
1360
+ content: string;
1361
+ kind: "localdef";
1362
+ id: string;
1363
+ docId: string;
1364
+ slug: string;
1365
+ types: string[];
1366
+ extends: string[];
1367
+ sectionRef: string;
1368
+ }[];
1369
+ }, {
1370
+ name: string;
1371
+ content: string;
1372
+ imports: {
1373
+ name: string;
1374
+ content: string;
1375
+ kind: "importdef";
1376
+ id: string;
1377
+ docId: string;
1378
+ slug: string;
1379
+ types: string[];
1380
+ extends: string[];
1381
+ sectionRef: string;
1382
+ label: string;
1383
+ target: string;
1384
+ resolved?: string | undefined;
1385
+ }[];
1386
+ setup: {
1387
+ name: string;
1388
+ content: string;
1389
+ kind: "setup";
1390
+ id: string;
1391
+ docId: string;
1392
+ slug: string;
1393
+ types: string[];
1394
+ extends: string[];
1395
+ sectionRef: string;
1396
+ };
1397
+ operations: {
1398
+ name: string;
1399
+ content: string;
1400
+ steps: string[];
1401
+ checklist: string[];
1402
+ kind: "operation";
1403
+ id: string;
1404
+ docId: string;
1405
+ slug: string;
1406
+ types: string[];
1407
+ extends: string[];
1408
+ sectionRef: string;
1409
+ }[];
1410
+ kind: "document";
1411
+ id: string;
1412
+ docId: string;
1413
+ slug: string;
1414
+ types: string[];
1415
+ extends: string[];
1416
+ sectionRef: string;
1417
+ localdefs: {
1418
+ name: string;
1419
+ content: string;
1420
+ kind: "localdef";
1421
+ id: string;
1422
+ docId: string;
1423
+ slug: string;
1424
+ types: string[];
1425
+ extends: string[];
1426
+ sectionRef: string;
1427
+ }[];
1428
+ }>;
1429
+ export declare const PlaybookSchema: z.ZodObject<{
1430
+ id: z.ZodString;
1431
+ docId: z.ZodString;
1432
+ slug: z.ZodString;
1433
+ name: z.ZodString;
1434
+ content: z.ZodString;
1435
+ types: z.ZodArray<z.ZodString, "many">;
1436
+ extends: z.ZodArray<z.ZodString, "many">;
1437
+ sectionRef: z.ZodString;
1438
+ imports: z.ZodArray<z.ZodObject<{
1439
+ id: z.ZodString;
1440
+ docId: z.ZodString;
1441
+ slug: z.ZodString;
1442
+ name: z.ZodString;
1443
+ content: z.ZodString;
1444
+ types: z.ZodArray<z.ZodString, "many">;
1445
+ extends: z.ZodArray<z.ZodString, "many">;
1446
+ sectionRef: z.ZodString;
1447
+ } & {
1448
+ kind: z.ZodLiteral<"importdef">;
1449
+ label: z.ZodString;
1450
+ target: z.ZodString;
1451
+ resolved: z.ZodOptional<z.ZodString>;
1452
+ }, "strip", z.ZodTypeAny, {
1453
+ name: string;
1454
+ content: string;
1455
+ kind: "importdef";
1456
+ id: string;
1457
+ docId: string;
1458
+ slug: string;
1459
+ types: string[];
1460
+ extends: string[];
1461
+ sectionRef: string;
1462
+ label: string;
1463
+ target: string;
1464
+ resolved?: string | undefined;
1465
+ }, {
1466
+ name: string;
1467
+ content: string;
1468
+ kind: "importdef";
1469
+ id: string;
1470
+ docId: string;
1471
+ slug: string;
1472
+ types: string[];
1473
+ extends: string[];
1474
+ sectionRef: string;
1475
+ label: string;
1476
+ target: string;
1477
+ resolved?: string | undefined;
1478
+ }>, "many">;
1479
+ localdefs: z.ZodArray<z.ZodObject<{
1480
+ id: z.ZodString;
1481
+ docId: z.ZodString;
1482
+ slug: z.ZodString;
1483
+ name: z.ZodString;
1484
+ content: z.ZodString;
1485
+ types: z.ZodArray<z.ZodString, "many">;
1486
+ extends: z.ZodArray<z.ZodString, "many">;
1487
+ sectionRef: z.ZodString;
1488
+ } & {
1489
+ kind: z.ZodLiteral<"localdef">;
1490
+ }, "strip", z.ZodTypeAny, {
1491
+ name: string;
1492
+ content: string;
1493
+ kind: "localdef";
1494
+ id: string;
1495
+ docId: string;
1496
+ slug: string;
1497
+ types: string[];
1498
+ extends: string[];
1499
+ sectionRef: string;
1500
+ }, {
1501
+ name: string;
1502
+ content: string;
1503
+ kind: "localdef";
1504
+ id: string;
1505
+ docId: string;
1506
+ slug: string;
1507
+ types: string[];
1508
+ extends: string[];
1509
+ sectionRef: string;
1510
+ }>, "many">;
1511
+ setup: z.ZodObject<{
1512
+ id: z.ZodString;
1513
+ docId: z.ZodString;
1514
+ slug: z.ZodString;
1515
+ name: z.ZodString;
1516
+ content: z.ZodString;
1517
+ types: z.ZodArray<z.ZodString, "many">;
1518
+ extends: z.ZodArray<z.ZodString, "many">;
1519
+ sectionRef: z.ZodString;
1520
+ } & {
1521
+ kind: z.ZodLiteral<"setup">;
1522
+ }, "strip", z.ZodTypeAny, {
1523
+ name: string;
1524
+ content: string;
1525
+ kind: "setup";
1526
+ id: string;
1527
+ docId: string;
1528
+ slug: string;
1529
+ types: string[];
1530
+ extends: string[];
1531
+ sectionRef: string;
1532
+ }, {
1533
+ name: string;
1534
+ content: string;
1535
+ kind: "setup";
1536
+ id: string;
1537
+ docId: string;
1538
+ slug: string;
1539
+ types: string[];
1540
+ extends: string[];
1541
+ sectionRef: string;
1542
+ }>;
1543
+ operations: z.ZodArray<z.ZodObject<{
1544
+ id: z.ZodString;
1545
+ docId: z.ZodString;
1546
+ slug: z.ZodString;
1547
+ name: z.ZodString;
1548
+ content: z.ZodString;
1549
+ types: z.ZodArray<z.ZodString, "many">;
1550
+ extends: z.ZodArray<z.ZodString, "many">;
1551
+ sectionRef: z.ZodString;
1552
+ } & {
1553
+ kind: z.ZodLiteral<"operation">;
1554
+ steps: z.ZodArray<z.ZodString, "many">;
1555
+ checklist: z.ZodArray<z.ZodString, "many">;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ name: string;
1558
+ content: string;
1559
+ steps: string[];
1560
+ checklist: string[];
1561
+ kind: "operation";
1562
+ id: string;
1563
+ docId: string;
1564
+ slug: string;
1565
+ types: string[];
1566
+ extends: string[];
1567
+ sectionRef: string;
1568
+ }, {
1569
+ name: string;
1570
+ content: string;
1571
+ steps: string[];
1572
+ checklist: string[];
1573
+ kind: "operation";
1574
+ id: string;
1575
+ docId: string;
1576
+ slug: string;
1577
+ types: string[];
1578
+ extends: string[];
1579
+ sectionRef: string;
1580
+ }>, "many">;
1581
+ } & {
1582
+ kind: z.ZodLiteral<"playbook">;
1583
+ sequence: z.ZodArray<z.ZodString, "many">;
1584
+ }, "strip", z.ZodTypeAny, {
1585
+ name: string;
1586
+ content: string;
1587
+ imports: {
1588
+ name: string;
1589
+ content: string;
1590
+ kind: "importdef";
1591
+ id: string;
1592
+ docId: string;
1593
+ slug: string;
1594
+ types: string[];
1595
+ extends: string[];
1596
+ sectionRef: string;
1597
+ label: string;
1598
+ target: string;
1599
+ resolved?: string | undefined;
1600
+ }[];
1601
+ setup: {
1602
+ name: string;
1603
+ content: string;
1604
+ kind: "setup";
1605
+ id: string;
1606
+ docId: string;
1607
+ slug: string;
1608
+ types: string[];
1609
+ extends: string[];
1610
+ sectionRef: string;
1611
+ };
1612
+ operations: {
1613
+ name: string;
1614
+ content: string;
1615
+ steps: string[];
1616
+ checklist: string[];
1617
+ kind: "operation";
1618
+ id: string;
1619
+ docId: string;
1620
+ slug: string;
1621
+ types: string[];
1622
+ extends: string[];
1623
+ sectionRef: string;
1624
+ }[];
1625
+ kind: "playbook";
1626
+ id: string;
1627
+ docId: string;
1628
+ slug: string;
1629
+ types: string[];
1630
+ extends: string[];
1631
+ sectionRef: string;
1632
+ localdefs: {
1633
+ name: string;
1634
+ content: string;
1635
+ kind: "localdef";
1636
+ id: string;
1637
+ docId: string;
1638
+ slug: string;
1639
+ types: string[];
1640
+ extends: string[];
1641
+ sectionRef: string;
1642
+ }[];
1643
+ sequence: string[];
1644
+ }, {
1645
+ name: string;
1646
+ content: string;
1647
+ imports: {
1648
+ name: string;
1649
+ content: string;
1650
+ kind: "importdef";
1651
+ id: string;
1652
+ docId: string;
1653
+ slug: string;
1654
+ types: string[];
1655
+ extends: string[];
1656
+ sectionRef: string;
1657
+ label: string;
1658
+ target: string;
1659
+ resolved?: string | undefined;
1660
+ }[];
1661
+ setup: {
1662
+ name: string;
1663
+ content: string;
1664
+ kind: "setup";
1665
+ id: string;
1666
+ docId: string;
1667
+ slug: string;
1668
+ types: string[];
1669
+ extends: string[];
1670
+ sectionRef: string;
1671
+ };
1672
+ operations: {
1673
+ name: string;
1674
+ content: string;
1675
+ steps: string[];
1676
+ checklist: string[];
1677
+ kind: "operation";
1678
+ id: string;
1679
+ docId: string;
1680
+ slug: string;
1681
+ types: string[];
1682
+ extends: string[];
1683
+ sectionRef: string;
1684
+ }[];
1685
+ kind: "playbook";
1686
+ id: string;
1687
+ docId: string;
1688
+ slug: string;
1689
+ types: string[];
1690
+ extends: string[];
1691
+ sectionRef: string;
1692
+ localdefs: {
1693
+ name: string;
1694
+ content: string;
1695
+ kind: "localdef";
1696
+ id: string;
1697
+ docId: string;
1698
+ slug: string;
1699
+ types: string[];
1700
+ extends: string[];
1701
+ sectionRef: string;
1702
+ }[];
1703
+ sequence: string[];
1704
+ }>;
1705
+ export declare const EdgeRoleSchema: z.ZodEnum<["ref", "calls", "extends", "imports"]>;
1706
+ export declare const EdgeSchema: z.ZodObject<{
1707
+ from: z.ZodString;
1708
+ to: z.ZodString;
1709
+ role: z.ZodEnum<["ref", "calls", "extends", "imports"]>;
1710
+ }, "strip", z.ZodTypeAny, {
1711
+ from: string;
1712
+ to: string;
1713
+ role: "imports" | "extends" | "ref" | "calls";
1714
+ }, {
1715
+ from: string;
1716
+ to: string;
1717
+ role: "imports" | "extends" | "ref" | "calls";
1718
+ }>;
1719
+ export declare const FileSchema: z.ZodObject<{
1720
+ docId: z.ZodString;
1721
+ path: z.ZodString;
1722
+ name: z.ZodString;
1723
+ sections: z.ZodArray<z.ZodType<Section, z.ZodTypeDef, Section>, "many">;
1724
+ }, "strip", z.ZodTypeAny, {
1725
+ name: string;
1726
+ path: string;
1727
+ docId: string;
1728
+ sections: Section[];
1729
+ }, {
1730
+ name: string;
1731
+ path: string;
1732
+ docId: string;
1733
+ sections: Section[];
1734
+ }>;
1735
+ export declare const RepoSchema: z.ZodObject<{
1736
+ files: z.ZodArray<z.ZodObject<{
1737
+ docId: z.ZodString;
1738
+ path: z.ZodString;
1739
+ name: z.ZodString;
1740
+ sections: z.ZodArray<z.ZodType<Section, z.ZodTypeDef, Section>, "many">;
1741
+ }, "strip", z.ZodTypeAny, {
1742
+ name: string;
1743
+ path: string;
1744
+ docId: string;
1745
+ sections: Section[];
1746
+ }, {
1747
+ name: string;
1748
+ path: string;
1749
+ docId: string;
1750
+ sections: Section[];
1751
+ }>, "many">;
1752
+ concepts: z.ZodArray<z.ZodType<ConceptBase, z.ZodTypeDef, ConceptBase>, "many">;
1753
+ localdefs: z.ZodRecord<z.ZodString, z.ZodObject<{
1754
+ id: z.ZodString;
1755
+ docId: z.ZodString;
1756
+ slug: z.ZodString;
1757
+ name: z.ZodString;
1758
+ content: z.ZodString;
1759
+ types: z.ZodArray<z.ZodString, "many">;
1760
+ extends: z.ZodArray<z.ZodString, "many">;
1761
+ sectionRef: z.ZodString;
1762
+ } & {
1763
+ kind: z.ZodLiteral<"localdef">;
1764
+ }, "strip", z.ZodTypeAny, {
1765
+ name: string;
1766
+ content: string;
1767
+ kind: "localdef";
1768
+ id: string;
1769
+ docId: string;
1770
+ slug: string;
1771
+ types: string[];
1772
+ extends: string[];
1773
+ sectionRef: string;
1774
+ }, {
1775
+ name: string;
1776
+ content: string;
1777
+ kind: "localdef";
1778
+ id: string;
1779
+ docId: string;
1780
+ slug: string;
1781
+ types: string[];
1782
+ extends: string[];
1783
+ sectionRef: string;
1784
+ }>>;
1785
+ operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1786
+ id: z.ZodString;
1787
+ docId: z.ZodString;
1788
+ slug: z.ZodString;
1789
+ name: z.ZodString;
1790
+ content: z.ZodString;
1791
+ types: z.ZodArray<z.ZodString, "many">;
1792
+ extends: z.ZodArray<z.ZodString, "many">;
1793
+ sectionRef: z.ZodString;
1794
+ } & {
1795
+ kind: z.ZodLiteral<"operation">;
1796
+ steps: z.ZodArray<z.ZodString, "many">;
1797
+ checklist: z.ZodArray<z.ZodString, "many">;
1798
+ }, "strip", z.ZodTypeAny, {
1799
+ name: string;
1800
+ content: string;
1801
+ steps: string[];
1802
+ checklist: string[];
1803
+ kind: "operation";
1804
+ id: string;
1805
+ docId: string;
1806
+ slug: string;
1807
+ types: string[];
1808
+ extends: string[];
1809
+ sectionRef: string;
1810
+ }, {
1811
+ name: string;
1812
+ content: string;
1813
+ steps: string[];
1814
+ checklist: string[];
1815
+ kind: "operation";
1816
+ id: string;
1817
+ docId: string;
1818
+ slug: string;
1819
+ types: string[];
1820
+ extends: string[];
1821
+ sectionRef: string;
1822
+ }>>;
1823
+ imports: z.ZodArray<z.ZodObject<{
1824
+ id: z.ZodString;
1825
+ docId: z.ZodString;
1826
+ slug: z.ZodString;
1827
+ name: z.ZodString;
1828
+ content: z.ZodString;
1829
+ types: z.ZodArray<z.ZodString, "many">;
1830
+ extends: z.ZodArray<z.ZodString, "many">;
1831
+ sectionRef: z.ZodString;
1832
+ } & {
1833
+ kind: z.ZodLiteral<"importdef">;
1834
+ label: z.ZodString;
1835
+ target: z.ZodString;
1836
+ resolved: z.ZodOptional<z.ZodString>;
1837
+ }, "strip", z.ZodTypeAny, {
1838
+ name: string;
1839
+ content: string;
1840
+ kind: "importdef";
1841
+ id: string;
1842
+ docId: string;
1843
+ slug: string;
1844
+ types: string[];
1845
+ extends: string[];
1846
+ sectionRef: string;
1847
+ label: string;
1848
+ target: string;
1849
+ resolved?: string | undefined;
1850
+ }, {
1851
+ name: string;
1852
+ content: string;
1853
+ kind: "importdef";
1854
+ id: string;
1855
+ docId: string;
1856
+ slug: string;
1857
+ types: string[];
1858
+ extends: string[];
1859
+ sectionRef: string;
1860
+ label: string;
1861
+ target: string;
1862
+ resolved?: string | undefined;
1863
+ }>, "many">;
1864
+ byId: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<Section, z.ZodTypeDef, Section>, z.ZodObject<{
1865
+ id: z.ZodString;
1866
+ docId: z.ZodString;
1867
+ slug: z.ZodString;
1868
+ name: z.ZodString;
1869
+ content: z.ZodString;
1870
+ types: z.ZodArray<z.ZodString, "many">;
1871
+ extends: z.ZodArray<z.ZodString, "many">;
1872
+ sectionRef: z.ZodString;
1873
+ } & {
1874
+ kind: z.ZodLiteral<"localdef">;
1875
+ }, "strip", z.ZodTypeAny, {
1876
+ name: string;
1877
+ content: string;
1878
+ kind: "localdef";
1879
+ id: string;
1880
+ docId: string;
1881
+ slug: string;
1882
+ types: string[];
1883
+ extends: string[];
1884
+ sectionRef: string;
1885
+ }, {
1886
+ name: string;
1887
+ content: string;
1888
+ kind: "localdef";
1889
+ id: string;
1890
+ docId: string;
1891
+ slug: string;
1892
+ types: string[];
1893
+ extends: string[];
1894
+ sectionRef: string;
1895
+ }>, z.ZodObject<{
1896
+ id: z.ZodString;
1897
+ docId: z.ZodString;
1898
+ slug: z.ZodString;
1899
+ name: z.ZodString;
1900
+ content: z.ZodString;
1901
+ types: z.ZodArray<z.ZodString, "many">;
1902
+ extends: z.ZodArray<z.ZodString, "many">;
1903
+ sectionRef: z.ZodString;
1904
+ } & {
1905
+ kind: z.ZodLiteral<"operation">;
1906
+ steps: z.ZodArray<z.ZodString, "many">;
1907
+ checklist: z.ZodArray<z.ZodString, "many">;
1908
+ }, "strip", z.ZodTypeAny, {
1909
+ name: string;
1910
+ content: string;
1911
+ steps: string[];
1912
+ checklist: string[];
1913
+ kind: "operation";
1914
+ id: string;
1915
+ docId: string;
1916
+ slug: string;
1917
+ types: string[];
1918
+ extends: string[];
1919
+ sectionRef: string;
1920
+ }, {
1921
+ name: string;
1922
+ content: string;
1923
+ steps: string[];
1924
+ checklist: string[];
1925
+ kind: "operation";
1926
+ id: string;
1927
+ docId: string;
1928
+ slug: string;
1929
+ types: string[];
1930
+ extends: string[];
1931
+ sectionRef: string;
1932
+ }>, z.ZodType<ConceptBase, z.ZodTypeDef, ConceptBase>]>>;
1933
+ byFile: z.ZodRecord<z.ZodString, z.ZodObject<{
1934
+ concept: z.ZodUnion<[z.ZodObject<{
1935
+ id: z.ZodString;
1936
+ docId: z.ZodString;
1937
+ slug: z.ZodString;
1938
+ name: z.ZodString;
1939
+ content: z.ZodString;
1940
+ types: z.ZodArray<z.ZodString, "many">;
1941
+ extends: z.ZodArray<z.ZodString, "many">;
1942
+ sectionRef: z.ZodString;
1943
+ } & {
1944
+ kind: z.ZodLiteral<"document">;
1945
+ imports: z.ZodArray<z.ZodObject<{
1946
+ id: z.ZodString;
1947
+ docId: z.ZodString;
1948
+ slug: z.ZodString;
1949
+ name: z.ZodString;
1950
+ content: z.ZodString;
1951
+ types: z.ZodArray<z.ZodString, "many">;
1952
+ extends: z.ZodArray<z.ZodString, "many">;
1953
+ sectionRef: z.ZodString;
1954
+ } & {
1955
+ kind: z.ZodLiteral<"importdef">;
1956
+ label: z.ZodString;
1957
+ target: z.ZodString;
1958
+ resolved: z.ZodOptional<z.ZodString>;
1959
+ }, "strip", z.ZodTypeAny, {
1960
+ name: string;
1961
+ content: string;
1962
+ kind: "importdef";
1963
+ id: string;
1964
+ docId: string;
1965
+ slug: string;
1966
+ types: string[];
1967
+ extends: string[];
1968
+ sectionRef: string;
1969
+ label: string;
1970
+ target: string;
1971
+ resolved?: string | undefined;
1972
+ }, {
1973
+ name: string;
1974
+ content: string;
1975
+ kind: "importdef";
1976
+ id: string;
1977
+ docId: string;
1978
+ slug: string;
1979
+ types: string[];
1980
+ extends: string[];
1981
+ sectionRef: string;
1982
+ label: string;
1983
+ target: string;
1984
+ resolved?: string | undefined;
1985
+ }>, "many">;
1986
+ localdefs: z.ZodArray<z.ZodObject<{
1987
+ id: z.ZodString;
1988
+ docId: z.ZodString;
1989
+ slug: z.ZodString;
1990
+ name: z.ZodString;
1991
+ content: z.ZodString;
1992
+ types: z.ZodArray<z.ZodString, "many">;
1993
+ extends: z.ZodArray<z.ZodString, "many">;
1994
+ sectionRef: z.ZodString;
1995
+ } & {
1996
+ kind: z.ZodLiteral<"localdef">;
1997
+ }, "strip", z.ZodTypeAny, {
1998
+ name: string;
1999
+ content: string;
2000
+ kind: "localdef";
2001
+ id: string;
2002
+ docId: string;
2003
+ slug: string;
2004
+ types: string[];
2005
+ extends: string[];
2006
+ sectionRef: string;
2007
+ }, {
2008
+ name: string;
2009
+ content: string;
2010
+ kind: "localdef";
2011
+ id: string;
2012
+ docId: string;
2013
+ slug: string;
2014
+ types: string[];
2015
+ extends: string[];
2016
+ sectionRef: string;
2017
+ }>, "many">;
2018
+ setup: z.ZodObject<{
2019
+ id: z.ZodString;
2020
+ docId: z.ZodString;
2021
+ slug: z.ZodString;
2022
+ name: z.ZodString;
2023
+ content: z.ZodString;
2024
+ types: z.ZodArray<z.ZodString, "many">;
2025
+ extends: z.ZodArray<z.ZodString, "many">;
2026
+ sectionRef: z.ZodString;
2027
+ } & {
2028
+ kind: z.ZodLiteral<"setup">;
2029
+ }, "strip", z.ZodTypeAny, {
2030
+ name: string;
2031
+ content: string;
2032
+ kind: "setup";
2033
+ id: string;
2034
+ docId: string;
2035
+ slug: string;
2036
+ types: string[];
2037
+ extends: string[];
2038
+ sectionRef: string;
2039
+ }, {
2040
+ name: string;
2041
+ content: string;
2042
+ kind: "setup";
2043
+ id: string;
2044
+ docId: string;
2045
+ slug: string;
2046
+ types: string[];
2047
+ extends: string[];
2048
+ sectionRef: string;
2049
+ }>;
2050
+ operations: z.ZodArray<z.ZodObject<{
2051
+ id: z.ZodString;
2052
+ docId: z.ZodString;
2053
+ slug: z.ZodString;
2054
+ name: z.ZodString;
2055
+ content: z.ZodString;
2056
+ types: z.ZodArray<z.ZodString, "many">;
2057
+ extends: z.ZodArray<z.ZodString, "many">;
2058
+ sectionRef: z.ZodString;
2059
+ } & {
2060
+ kind: z.ZodLiteral<"operation">;
2061
+ steps: z.ZodArray<z.ZodString, "many">;
2062
+ checklist: z.ZodArray<z.ZodString, "many">;
2063
+ }, "strip", z.ZodTypeAny, {
2064
+ name: string;
2065
+ content: string;
2066
+ steps: string[];
2067
+ checklist: string[];
2068
+ kind: "operation";
2069
+ id: string;
2070
+ docId: string;
2071
+ slug: string;
2072
+ types: string[];
2073
+ extends: string[];
2074
+ sectionRef: string;
2075
+ }, {
2076
+ name: string;
2077
+ content: string;
2078
+ steps: string[];
2079
+ checklist: string[];
2080
+ kind: "operation";
2081
+ id: string;
2082
+ docId: string;
2083
+ slug: string;
2084
+ types: string[];
2085
+ extends: string[];
2086
+ sectionRef: string;
2087
+ }>, "many">;
2088
+ }, "strip", z.ZodTypeAny, {
2089
+ name: string;
2090
+ content: string;
2091
+ imports: {
2092
+ name: string;
2093
+ content: string;
2094
+ kind: "importdef";
2095
+ id: string;
2096
+ docId: string;
2097
+ slug: string;
2098
+ types: string[];
2099
+ extends: string[];
2100
+ sectionRef: string;
2101
+ label: string;
2102
+ target: string;
2103
+ resolved?: string | undefined;
2104
+ }[];
2105
+ setup: {
2106
+ name: string;
2107
+ content: string;
2108
+ kind: "setup";
2109
+ id: string;
2110
+ docId: string;
2111
+ slug: string;
2112
+ types: string[];
2113
+ extends: string[];
2114
+ sectionRef: string;
2115
+ };
2116
+ operations: {
2117
+ name: string;
2118
+ content: string;
2119
+ steps: string[];
2120
+ checklist: string[];
2121
+ kind: "operation";
2122
+ id: string;
2123
+ docId: string;
2124
+ slug: string;
2125
+ types: string[];
2126
+ extends: string[];
2127
+ sectionRef: string;
2128
+ }[];
2129
+ kind: "document";
2130
+ id: string;
2131
+ docId: string;
2132
+ slug: string;
2133
+ types: string[];
2134
+ extends: string[];
2135
+ sectionRef: string;
2136
+ localdefs: {
2137
+ name: string;
2138
+ content: string;
2139
+ kind: "localdef";
2140
+ id: string;
2141
+ docId: string;
2142
+ slug: string;
2143
+ types: string[];
2144
+ extends: string[];
2145
+ sectionRef: string;
2146
+ }[];
2147
+ }, {
2148
+ name: string;
2149
+ content: string;
2150
+ imports: {
2151
+ name: string;
2152
+ content: string;
2153
+ kind: "importdef";
2154
+ id: string;
2155
+ docId: string;
2156
+ slug: string;
2157
+ types: string[];
2158
+ extends: string[];
2159
+ sectionRef: string;
2160
+ label: string;
2161
+ target: string;
2162
+ resolved?: string | undefined;
2163
+ }[];
2164
+ setup: {
2165
+ name: string;
2166
+ content: string;
2167
+ kind: "setup";
2168
+ id: string;
2169
+ docId: string;
2170
+ slug: string;
2171
+ types: string[];
2172
+ extends: string[];
2173
+ sectionRef: string;
2174
+ };
2175
+ operations: {
2176
+ name: string;
2177
+ content: string;
2178
+ steps: string[];
2179
+ checklist: string[];
2180
+ kind: "operation";
2181
+ id: string;
2182
+ docId: string;
2183
+ slug: string;
2184
+ types: string[];
2185
+ extends: string[];
2186
+ sectionRef: string;
2187
+ }[];
2188
+ kind: "document";
2189
+ id: string;
2190
+ docId: string;
2191
+ slug: string;
2192
+ types: string[];
2193
+ extends: string[];
2194
+ sectionRef: string;
2195
+ localdefs: {
2196
+ name: string;
2197
+ content: string;
2198
+ kind: "localdef";
2199
+ id: string;
2200
+ docId: string;
2201
+ slug: string;
2202
+ types: string[];
2203
+ extends: string[];
2204
+ sectionRef: string;
2205
+ }[];
2206
+ }>, z.ZodObject<{
2207
+ id: z.ZodString;
2208
+ docId: z.ZodString;
2209
+ slug: z.ZodString;
2210
+ name: z.ZodString;
2211
+ content: z.ZodString;
2212
+ types: z.ZodArray<z.ZodString, "many">;
2213
+ extends: z.ZodArray<z.ZodString, "many">;
2214
+ sectionRef: z.ZodString;
2215
+ imports: z.ZodArray<z.ZodObject<{
2216
+ id: z.ZodString;
2217
+ docId: z.ZodString;
2218
+ slug: z.ZodString;
2219
+ name: z.ZodString;
2220
+ content: z.ZodString;
2221
+ types: z.ZodArray<z.ZodString, "many">;
2222
+ extends: z.ZodArray<z.ZodString, "many">;
2223
+ sectionRef: z.ZodString;
2224
+ } & {
2225
+ kind: z.ZodLiteral<"importdef">;
2226
+ label: z.ZodString;
2227
+ target: z.ZodString;
2228
+ resolved: z.ZodOptional<z.ZodString>;
2229
+ }, "strip", z.ZodTypeAny, {
2230
+ name: string;
2231
+ content: string;
2232
+ kind: "importdef";
2233
+ id: string;
2234
+ docId: string;
2235
+ slug: string;
2236
+ types: string[];
2237
+ extends: string[];
2238
+ sectionRef: string;
2239
+ label: string;
2240
+ target: string;
2241
+ resolved?: string | undefined;
2242
+ }, {
2243
+ name: string;
2244
+ content: string;
2245
+ kind: "importdef";
2246
+ id: string;
2247
+ docId: string;
2248
+ slug: string;
2249
+ types: string[];
2250
+ extends: string[];
2251
+ sectionRef: string;
2252
+ label: string;
2253
+ target: string;
2254
+ resolved?: string | undefined;
2255
+ }>, "many">;
2256
+ localdefs: z.ZodArray<z.ZodObject<{
2257
+ id: z.ZodString;
2258
+ docId: z.ZodString;
2259
+ slug: z.ZodString;
2260
+ name: z.ZodString;
2261
+ content: z.ZodString;
2262
+ types: z.ZodArray<z.ZodString, "many">;
2263
+ extends: z.ZodArray<z.ZodString, "many">;
2264
+ sectionRef: z.ZodString;
2265
+ } & {
2266
+ kind: z.ZodLiteral<"localdef">;
2267
+ }, "strip", z.ZodTypeAny, {
2268
+ name: string;
2269
+ content: string;
2270
+ kind: "localdef";
2271
+ id: string;
2272
+ docId: string;
2273
+ slug: string;
2274
+ types: string[];
2275
+ extends: string[];
2276
+ sectionRef: string;
2277
+ }, {
2278
+ name: string;
2279
+ content: string;
2280
+ kind: "localdef";
2281
+ id: string;
2282
+ docId: string;
2283
+ slug: string;
2284
+ types: string[];
2285
+ extends: string[];
2286
+ sectionRef: string;
2287
+ }>, "many">;
2288
+ setup: z.ZodObject<{
2289
+ id: z.ZodString;
2290
+ docId: z.ZodString;
2291
+ slug: z.ZodString;
2292
+ name: z.ZodString;
2293
+ content: z.ZodString;
2294
+ types: z.ZodArray<z.ZodString, "many">;
2295
+ extends: z.ZodArray<z.ZodString, "many">;
2296
+ sectionRef: z.ZodString;
2297
+ } & {
2298
+ kind: z.ZodLiteral<"setup">;
2299
+ }, "strip", z.ZodTypeAny, {
2300
+ name: string;
2301
+ content: string;
2302
+ kind: "setup";
2303
+ id: string;
2304
+ docId: string;
2305
+ slug: string;
2306
+ types: string[];
2307
+ extends: string[];
2308
+ sectionRef: string;
2309
+ }, {
2310
+ name: string;
2311
+ content: string;
2312
+ kind: "setup";
2313
+ id: string;
2314
+ docId: string;
2315
+ slug: string;
2316
+ types: string[];
2317
+ extends: string[];
2318
+ sectionRef: string;
2319
+ }>;
2320
+ operations: z.ZodArray<z.ZodObject<{
2321
+ id: z.ZodString;
2322
+ docId: z.ZodString;
2323
+ slug: z.ZodString;
2324
+ name: z.ZodString;
2325
+ content: z.ZodString;
2326
+ types: z.ZodArray<z.ZodString, "many">;
2327
+ extends: z.ZodArray<z.ZodString, "many">;
2328
+ sectionRef: z.ZodString;
2329
+ } & {
2330
+ kind: z.ZodLiteral<"operation">;
2331
+ steps: z.ZodArray<z.ZodString, "many">;
2332
+ checklist: z.ZodArray<z.ZodString, "many">;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ name: string;
2335
+ content: string;
2336
+ steps: string[];
2337
+ checklist: string[];
2338
+ kind: "operation";
2339
+ id: string;
2340
+ docId: string;
2341
+ slug: string;
2342
+ types: string[];
2343
+ extends: string[];
2344
+ sectionRef: string;
2345
+ }, {
2346
+ name: string;
2347
+ content: string;
2348
+ steps: string[];
2349
+ checklist: string[];
2350
+ kind: "operation";
2351
+ id: string;
2352
+ docId: string;
2353
+ slug: string;
2354
+ types: string[];
2355
+ extends: string[];
2356
+ sectionRef: string;
2357
+ }>, "many">;
2358
+ } & {
2359
+ kind: z.ZodLiteral<"playbook">;
2360
+ sequence: z.ZodArray<z.ZodString, "many">;
2361
+ }, "strip", z.ZodTypeAny, {
2362
+ name: string;
2363
+ content: string;
2364
+ imports: {
2365
+ name: string;
2366
+ content: string;
2367
+ kind: "importdef";
2368
+ id: string;
2369
+ docId: string;
2370
+ slug: string;
2371
+ types: string[];
2372
+ extends: string[];
2373
+ sectionRef: string;
2374
+ label: string;
2375
+ target: string;
2376
+ resolved?: string | undefined;
2377
+ }[];
2378
+ setup: {
2379
+ name: string;
2380
+ content: string;
2381
+ kind: "setup";
2382
+ id: string;
2383
+ docId: string;
2384
+ slug: string;
2385
+ types: string[];
2386
+ extends: string[];
2387
+ sectionRef: string;
2388
+ };
2389
+ operations: {
2390
+ name: string;
2391
+ content: string;
2392
+ steps: string[];
2393
+ checklist: string[];
2394
+ kind: "operation";
2395
+ id: string;
2396
+ docId: string;
2397
+ slug: string;
2398
+ types: string[];
2399
+ extends: string[];
2400
+ sectionRef: string;
2401
+ }[];
2402
+ kind: "playbook";
2403
+ id: string;
2404
+ docId: string;
2405
+ slug: string;
2406
+ types: string[];
2407
+ extends: string[];
2408
+ sectionRef: string;
2409
+ localdefs: {
2410
+ name: string;
2411
+ content: string;
2412
+ kind: "localdef";
2413
+ id: string;
2414
+ docId: string;
2415
+ slug: string;
2416
+ types: string[];
2417
+ extends: string[];
2418
+ sectionRef: string;
2419
+ }[];
2420
+ sequence: string[];
2421
+ }, {
2422
+ name: string;
2423
+ content: string;
2424
+ imports: {
2425
+ name: string;
2426
+ content: string;
2427
+ kind: "importdef";
2428
+ id: string;
2429
+ docId: string;
2430
+ slug: string;
2431
+ types: string[];
2432
+ extends: string[];
2433
+ sectionRef: string;
2434
+ label: string;
2435
+ target: string;
2436
+ resolved?: string | undefined;
2437
+ }[];
2438
+ setup: {
2439
+ name: string;
2440
+ content: string;
2441
+ kind: "setup";
2442
+ id: string;
2443
+ docId: string;
2444
+ slug: string;
2445
+ types: string[];
2446
+ extends: string[];
2447
+ sectionRef: string;
2448
+ };
2449
+ operations: {
2450
+ name: string;
2451
+ content: string;
2452
+ steps: string[];
2453
+ checklist: string[];
2454
+ kind: "operation";
2455
+ id: string;
2456
+ docId: string;
2457
+ slug: string;
2458
+ types: string[];
2459
+ extends: string[];
2460
+ sectionRef: string;
2461
+ }[];
2462
+ kind: "playbook";
2463
+ id: string;
2464
+ docId: string;
2465
+ slug: string;
2466
+ types: string[];
2467
+ extends: string[];
2468
+ sectionRef: string;
2469
+ localdefs: {
2470
+ name: string;
2471
+ content: string;
2472
+ kind: "localdef";
2473
+ id: string;
2474
+ docId: string;
2475
+ slug: string;
2476
+ types: string[];
2477
+ extends: string[];
2478
+ sectionRef: string;
2479
+ }[];
2480
+ sequence: string[];
2481
+ }>]>;
2482
+ bySlug: z.ZodRecord<z.ZodString, z.ZodType<Section, z.ZodTypeDef, Section>>;
2483
+ }, "strip", z.ZodTypeAny, {
2484
+ concept: {
2485
+ name: string;
2486
+ content: string;
2487
+ imports: {
2488
+ name: string;
2489
+ content: string;
2490
+ kind: "importdef";
2491
+ id: string;
2492
+ docId: string;
2493
+ slug: string;
2494
+ types: string[];
2495
+ extends: string[];
2496
+ sectionRef: string;
2497
+ label: string;
2498
+ target: string;
2499
+ resolved?: string | undefined;
2500
+ }[];
2501
+ setup: {
2502
+ name: string;
2503
+ content: string;
2504
+ kind: "setup";
2505
+ id: string;
2506
+ docId: string;
2507
+ slug: string;
2508
+ types: string[];
2509
+ extends: string[];
2510
+ sectionRef: string;
2511
+ };
2512
+ operations: {
2513
+ name: string;
2514
+ content: string;
2515
+ steps: string[];
2516
+ checklist: string[];
2517
+ kind: "operation";
2518
+ id: string;
2519
+ docId: string;
2520
+ slug: string;
2521
+ types: string[];
2522
+ extends: string[];
2523
+ sectionRef: string;
2524
+ }[];
2525
+ kind: "document";
2526
+ id: string;
2527
+ docId: string;
2528
+ slug: string;
2529
+ types: string[];
2530
+ extends: string[];
2531
+ sectionRef: string;
2532
+ localdefs: {
2533
+ name: string;
2534
+ content: string;
2535
+ kind: "localdef";
2536
+ id: string;
2537
+ docId: string;
2538
+ slug: string;
2539
+ types: string[];
2540
+ extends: string[];
2541
+ sectionRef: string;
2542
+ }[];
2543
+ } | {
2544
+ name: string;
2545
+ content: string;
2546
+ imports: {
2547
+ name: string;
2548
+ content: string;
2549
+ kind: "importdef";
2550
+ id: string;
2551
+ docId: string;
2552
+ slug: string;
2553
+ types: string[];
2554
+ extends: string[];
2555
+ sectionRef: string;
2556
+ label: string;
2557
+ target: string;
2558
+ resolved?: string | undefined;
2559
+ }[];
2560
+ setup: {
2561
+ name: string;
2562
+ content: string;
2563
+ kind: "setup";
2564
+ id: string;
2565
+ docId: string;
2566
+ slug: string;
2567
+ types: string[];
2568
+ extends: string[];
2569
+ sectionRef: string;
2570
+ };
2571
+ operations: {
2572
+ name: string;
2573
+ content: string;
2574
+ steps: string[];
2575
+ checklist: string[];
2576
+ kind: "operation";
2577
+ id: string;
2578
+ docId: string;
2579
+ slug: string;
2580
+ types: string[];
2581
+ extends: string[];
2582
+ sectionRef: string;
2583
+ }[];
2584
+ kind: "playbook";
2585
+ id: string;
2586
+ docId: string;
2587
+ slug: string;
2588
+ types: string[];
2589
+ extends: string[];
2590
+ sectionRef: string;
2591
+ localdefs: {
2592
+ name: string;
2593
+ content: string;
2594
+ kind: "localdef";
2595
+ id: string;
2596
+ docId: string;
2597
+ slug: string;
2598
+ types: string[];
2599
+ extends: string[];
2600
+ sectionRef: string;
2601
+ }[];
2602
+ sequence: string[];
2603
+ };
2604
+ bySlug: Record<string, Section>;
2605
+ }, {
2606
+ concept: {
2607
+ name: string;
2608
+ content: string;
2609
+ imports: {
2610
+ name: string;
2611
+ content: string;
2612
+ kind: "importdef";
2613
+ id: string;
2614
+ docId: string;
2615
+ slug: string;
2616
+ types: string[];
2617
+ extends: string[];
2618
+ sectionRef: string;
2619
+ label: string;
2620
+ target: string;
2621
+ resolved?: string | undefined;
2622
+ }[];
2623
+ setup: {
2624
+ name: string;
2625
+ content: string;
2626
+ kind: "setup";
2627
+ id: string;
2628
+ docId: string;
2629
+ slug: string;
2630
+ types: string[];
2631
+ extends: string[];
2632
+ sectionRef: string;
2633
+ };
2634
+ operations: {
2635
+ name: string;
2636
+ content: string;
2637
+ steps: string[];
2638
+ checklist: string[];
2639
+ kind: "operation";
2640
+ id: string;
2641
+ docId: string;
2642
+ slug: string;
2643
+ types: string[];
2644
+ extends: string[];
2645
+ sectionRef: string;
2646
+ }[];
2647
+ kind: "document";
2648
+ id: string;
2649
+ docId: string;
2650
+ slug: string;
2651
+ types: string[];
2652
+ extends: string[];
2653
+ sectionRef: string;
2654
+ localdefs: {
2655
+ name: string;
2656
+ content: string;
2657
+ kind: "localdef";
2658
+ id: string;
2659
+ docId: string;
2660
+ slug: string;
2661
+ types: string[];
2662
+ extends: string[];
2663
+ sectionRef: string;
2664
+ }[];
2665
+ } | {
2666
+ name: string;
2667
+ content: string;
2668
+ imports: {
2669
+ name: string;
2670
+ content: string;
2671
+ kind: "importdef";
2672
+ id: string;
2673
+ docId: string;
2674
+ slug: string;
2675
+ types: string[];
2676
+ extends: string[];
2677
+ sectionRef: string;
2678
+ label: string;
2679
+ target: string;
2680
+ resolved?: string | undefined;
2681
+ }[];
2682
+ setup: {
2683
+ name: string;
2684
+ content: string;
2685
+ kind: "setup";
2686
+ id: string;
2687
+ docId: string;
2688
+ slug: string;
2689
+ types: string[];
2690
+ extends: string[];
2691
+ sectionRef: string;
2692
+ };
2693
+ operations: {
2694
+ name: string;
2695
+ content: string;
2696
+ steps: string[];
2697
+ checklist: string[];
2698
+ kind: "operation";
2699
+ id: string;
2700
+ docId: string;
2701
+ slug: string;
2702
+ types: string[];
2703
+ extends: string[];
2704
+ sectionRef: string;
2705
+ }[];
2706
+ kind: "playbook";
2707
+ id: string;
2708
+ docId: string;
2709
+ slug: string;
2710
+ types: string[];
2711
+ extends: string[];
2712
+ sectionRef: string;
2713
+ localdefs: {
2714
+ name: string;
2715
+ content: string;
2716
+ kind: "localdef";
2717
+ id: string;
2718
+ docId: string;
2719
+ slug: string;
2720
+ types: string[];
2721
+ extends: string[];
2722
+ sectionRef: string;
2723
+ }[];
2724
+ sequence: string[];
2725
+ };
2726
+ bySlug: Record<string, Section>;
2727
+ }>>;
2728
+ edges: z.ZodArray<z.ZodObject<{
2729
+ from: z.ZodString;
2730
+ to: z.ZodString;
2731
+ role: z.ZodEnum<["ref", "calls", "extends", "imports"]>;
2732
+ }, "strip", z.ZodTypeAny, {
2733
+ from: string;
2734
+ to: string;
2735
+ role: "imports" | "extends" | "ref" | "calls";
2736
+ }, {
2737
+ from: string;
2738
+ to: string;
2739
+ role: "imports" | "extends" | "ref" | "calls";
2740
+ }>, "many">;
2741
+ }, "strip", z.ZodTypeAny, {
2742
+ imports: {
2743
+ name: string;
2744
+ content: string;
2745
+ kind: "importdef";
2746
+ id: string;
2747
+ docId: string;
2748
+ slug: string;
2749
+ types: string[];
2750
+ extends: string[];
2751
+ sectionRef: string;
2752
+ label: string;
2753
+ target: string;
2754
+ resolved?: string | undefined;
2755
+ }[];
2756
+ operations: Record<string, {
2757
+ name: string;
2758
+ content: string;
2759
+ steps: string[];
2760
+ checklist: string[];
2761
+ kind: "operation";
2762
+ id: string;
2763
+ docId: string;
2764
+ slug: string;
2765
+ types: string[];
2766
+ extends: string[];
2767
+ sectionRef: string;
2768
+ }>;
2769
+ localdefs: Record<string, {
2770
+ name: string;
2771
+ content: string;
2772
+ kind: "localdef";
2773
+ id: string;
2774
+ docId: string;
2775
+ slug: string;
2776
+ types: string[];
2777
+ extends: string[];
2778
+ sectionRef: string;
2779
+ }>;
2780
+ files: {
2781
+ name: string;
2782
+ path: string;
2783
+ docId: string;
2784
+ sections: Section[];
2785
+ }[];
2786
+ concepts: ConceptBase[];
2787
+ byId: Record<string, Section | ConceptBase | {
2788
+ name: string;
2789
+ content: string;
2790
+ kind: "localdef";
2791
+ id: string;
2792
+ docId: string;
2793
+ slug: string;
2794
+ types: string[];
2795
+ extends: string[];
2796
+ sectionRef: string;
2797
+ } | {
2798
+ name: string;
2799
+ content: string;
2800
+ steps: string[];
2801
+ checklist: string[];
2802
+ kind: "operation";
2803
+ id: string;
2804
+ docId: string;
2805
+ slug: string;
2806
+ types: string[];
2807
+ extends: string[];
2808
+ sectionRef: string;
2809
+ }>;
2810
+ byFile: Record<string, {
2811
+ concept: {
2812
+ name: string;
2813
+ content: string;
2814
+ imports: {
2815
+ name: string;
2816
+ content: string;
2817
+ kind: "importdef";
2818
+ id: string;
2819
+ docId: string;
2820
+ slug: string;
2821
+ types: string[];
2822
+ extends: string[];
2823
+ sectionRef: string;
2824
+ label: string;
2825
+ target: string;
2826
+ resolved?: string | undefined;
2827
+ }[];
2828
+ setup: {
2829
+ name: string;
2830
+ content: string;
2831
+ kind: "setup";
2832
+ id: string;
2833
+ docId: string;
2834
+ slug: string;
2835
+ types: string[];
2836
+ extends: string[];
2837
+ sectionRef: string;
2838
+ };
2839
+ operations: {
2840
+ name: string;
2841
+ content: string;
2842
+ steps: string[];
2843
+ checklist: string[];
2844
+ kind: "operation";
2845
+ id: string;
2846
+ docId: string;
2847
+ slug: string;
2848
+ types: string[];
2849
+ extends: string[];
2850
+ sectionRef: string;
2851
+ }[];
2852
+ kind: "document";
2853
+ id: string;
2854
+ docId: string;
2855
+ slug: string;
2856
+ types: string[];
2857
+ extends: string[];
2858
+ sectionRef: string;
2859
+ localdefs: {
2860
+ name: string;
2861
+ content: string;
2862
+ kind: "localdef";
2863
+ id: string;
2864
+ docId: string;
2865
+ slug: string;
2866
+ types: string[];
2867
+ extends: string[];
2868
+ sectionRef: string;
2869
+ }[];
2870
+ } | {
2871
+ name: string;
2872
+ content: string;
2873
+ imports: {
2874
+ name: string;
2875
+ content: string;
2876
+ kind: "importdef";
2877
+ id: string;
2878
+ docId: string;
2879
+ slug: string;
2880
+ types: string[];
2881
+ extends: string[];
2882
+ sectionRef: string;
2883
+ label: string;
2884
+ target: string;
2885
+ resolved?: string | undefined;
2886
+ }[];
2887
+ setup: {
2888
+ name: string;
2889
+ content: string;
2890
+ kind: "setup";
2891
+ id: string;
2892
+ docId: string;
2893
+ slug: string;
2894
+ types: string[];
2895
+ extends: string[];
2896
+ sectionRef: string;
2897
+ };
2898
+ operations: {
2899
+ name: string;
2900
+ content: string;
2901
+ steps: string[];
2902
+ checklist: string[];
2903
+ kind: "operation";
2904
+ id: string;
2905
+ docId: string;
2906
+ slug: string;
2907
+ types: string[];
2908
+ extends: string[];
2909
+ sectionRef: string;
2910
+ }[];
2911
+ kind: "playbook";
2912
+ id: string;
2913
+ docId: string;
2914
+ slug: string;
2915
+ types: string[];
2916
+ extends: string[];
2917
+ sectionRef: string;
2918
+ localdefs: {
2919
+ name: string;
2920
+ content: string;
2921
+ kind: "localdef";
2922
+ id: string;
2923
+ docId: string;
2924
+ slug: string;
2925
+ types: string[];
2926
+ extends: string[];
2927
+ sectionRef: string;
2928
+ }[];
2929
+ sequence: string[];
2930
+ };
2931
+ bySlug: Record<string, Section>;
2932
+ }>;
2933
+ edges: {
2934
+ from: string;
2935
+ to: string;
2936
+ role: "imports" | "extends" | "ref" | "calls";
2937
+ }[];
2938
+ }, {
2939
+ imports: {
2940
+ name: string;
2941
+ content: string;
2942
+ kind: "importdef";
2943
+ id: string;
2944
+ docId: string;
2945
+ slug: string;
2946
+ types: string[];
2947
+ extends: string[];
2948
+ sectionRef: string;
2949
+ label: string;
2950
+ target: string;
2951
+ resolved?: string | undefined;
2952
+ }[];
2953
+ operations: Record<string, {
2954
+ name: string;
2955
+ content: string;
2956
+ steps: string[];
2957
+ checklist: string[];
2958
+ kind: "operation";
2959
+ id: string;
2960
+ docId: string;
2961
+ slug: string;
2962
+ types: string[];
2963
+ extends: string[];
2964
+ sectionRef: string;
2965
+ }>;
2966
+ localdefs: Record<string, {
2967
+ name: string;
2968
+ content: string;
2969
+ kind: "localdef";
2970
+ id: string;
2971
+ docId: string;
2972
+ slug: string;
2973
+ types: string[];
2974
+ extends: string[];
2975
+ sectionRef: string;
2976
+ }>;
2977
+ files: {
2978
+ name: string;
2979
+ path: string;
2980
+ docId: string;
2981
+ sections: Section[];
2982
+ }[];
2983
+ concepts: ConceptBase[];
2984
+ byId: Record<string, Section | ConceptBase | {
2985
+ name: string;
2986
+ content: string;
2987
+ kind: "localdef";
2988
+ id: string;
2989
+ docId: string;
2990
+ slug: string;
2991
+ types: string[];
2992
+ extends: string[];
2993
+ sectionRef: string;
2994
+ } | {
2995
+ name: string;
2996
+ content: string;
2997
+ steps: string[];
2998
+ checklist: string[];
2999
+ kind: "operation";
3000
+ id: string;
3001
+ docId: string;
3002
+ slug: string;
3003
+ types: string[];
3004
+ extends: string[];
3005
+ sectionRef: string;
3006
+ }>;
3007
+ byFile: Record<string, {
3008
+ concept: {
3009
+ name: string;
3010
+ content: string;
3011
+ imports: {
3012
+ name: string;
3013
+ content: string;
3014
+ kind: "importdef";
3015
+ id: string;
3016
+ docId: string;
3017
+ slug: string;
3018
+ types: string[];
3019
+ extends: string[];
3020
+ sectionRef: string;
3021
+ label: string;
3022
+ target: string;
3023
+ resolved?: string | undefined;
3024
+ }[];
3025
+ setup: {
3026
+ name: string;
3027
+ content: string;
3028
+ kind: "setup";
3029
+ id: string;
3030
+ docId: string;
3031
+ slug: string;
3032
+ types: string[];
3033
+ extends: string[];
3034
+ sectionRef: string;
3035
+ };
3036
+ operations: {
3037
+ name: string;
3038
+ content: string;
3039
+ steps: string[];
3040
+ checklist: string[];
3041
+ kind: "operation";
3042
+ id: string;
3043
+ docId: string;
3044
+ slug: string;
3045
+ types: string[];
3046
+ extends: string[];
3047
+ sectionRef: string;
3048
+ }[];
3049
+ kind: "document";
3050
+ id: string;
3051
+ docId: string;
3052
+ slug: string;
3053
+ types: string[];
3054
+ extends: string[];
3055
+ sectionRef: string;
3056
+ localdefs: {
3057
+ name: string;
3058
+ content: string;
3059
+ kind: "localdef";
3060
+ id: string;
3061
+ docId: string;
3062
+ slug: string;
3063
+ types: string[];
3064
+ extends: string[];
3065
+ sectionRef: string;
3066
+ }[];
3067
+ } | {
3068
+ name: string;
3069
+ content: string;
3070
+ imports: {
3071
+ name: string;
3072
+ content: string;
3073
+ kind: "importdef";
3074
+ id: string;
3075
+ docId: string;
3076
+ slug: string;
3077
+ types: string[];
3078
+ extends: string[];
3079
+ sectionRef: string;
3080
+ label: string;
3081
+ target: string;
3082
+ resolved?: string | undefined;
3083
+ }[];
3084
+ setup: {
3085
+ name: string;
3086
+ content: string;
3087
+ kind: "setup";
3088
+ id: string;
3089
+ docId: string;
3090
+ slug: string;
3091
+ types: string[];
3092
+ extends: string[];
3093
+ sectionRef: string;
3094
+ };
3095
+ operations: {
3096
+ name: string;
3097
+ content: string;
3098
+ steps: string[];
3099
+ checklist: string[];
3100
+ kind: "operation";
3101
+ id: string;
3102
+ docId: string;
3103
+ slug: string;
3104
+ types: string[];
3105
+ extends: string[];
3106
+ sectionRef: string;
3107
+ }[];
3108
+ kind: "playbook";
3109
+ id: string;
3110
+ docId: string;
3111
+ slug: string;
3112
+ types: string[];
3113
+ extends: string[];
3114
+ sectionRef: string;
3115
+ localdefs: {
3116
+ name: string;
3117
+ content: string;
3118
+ kind: "localdef";
3119
+ id: string;
3120
+ docId: string;
3121
+ slug: string;
3122
+ types: string[];
3123
+ extends: string[];
3124
+ sectionRef: string;
3125
+ }[];
3126
+ sequence: string[];
3127
+ };
3128
+ bySlug: Record<string, Section>;
3129
+ }>;
3130
+ edges: {
3131
+ from: string;
3132
+ to: string;
3133
+ role: "imports" | "extends" | "ref" | "calls";
3134
+ }[];
3135
+ }>;
3136
+ export declare const ContextPayloadSchema: z.ZodObject<{
3137
+ operation: z.ZodObject<{
3138
+ id: z.ZodString;
3139
+ docId: z.ZodString;
3140
+ slug: z.ZodString;
3141
+ name: z.ZodString;
3142
+ content: z.ZodString;
3143
+ types: z.ZodArray<z.ZodString, "many">;
3144
+ extends: z.ZodArray<z.ZodString, "many">;
3145
+ sectionRef: z.ZodString;
3146
+ } & {
3147
+ kind: z.ZodLiteral<"operation">;
3148
+ steps: z.ZodArray<z.ZodString, "many">;
3149
+ checklist: z.ZodArray<z.ZodString, "many">;
3150
+ }, "strip", z.ZodTypeAny, {
3151
+ name: string;
3152
+ content: string;
3153
+ steps: string[];
3154
+ checklist: string[];
3155
+ kind: "operation";
3156
+ id: string;
3157
+ docId: string;
3158
+ slug: string;
3159
+ types: string[];
3160
+ extends: string[];
3161
+ sectionRef: string;
3162
+ }, {
3163
+ name: string;
3164
+ content: string;
3165
+ steps: string[];
3166
+ checklist: string[];
3167
+ kind: "operation";
3168
+ id: string;
3169
+ docId: string;
3170
+ slug: string;
3171
+ types: string[];
3172
+ extends: string[];
3173
+ sectionRef: string;
3174
+ }>;
3175
+ calls: z.ZodArray<z.ZodString, "many">;
3176
+ symbols: z.ZodRecord<z.ZodString, z.ZodObject<{
3177
+ docId: z.ZodOptional<z.ZodString>;
3178
+ slug: z.ZodOptional<z.ZodString>;
3179
+ }, "strip", z.ZodTypeAny, {
3180
+ docId?: string | undefined;
3181
+ slug?: string | undefined;
3182
+ }, {
3183
+ docId?: string | undefined;
3184
+ slug?: string | undefined;
3185
+ }>>;
3186
+ }, "strip", z.ZodTypeAny, {
3187
+ operation: {
3188
+ name: string;
3189
+ content: string;
3190
+ steps: string[];
3191
+ checklist: string[];
3192
+ kind: "operation";
3193
+ id: string;
3194
+ docId: string;
3195
+ slug: string;
3196
+ types: string[];
3197
+ extends: string[];
3198
+ sectionRef: string;
3199
+ };
3200
+ calls: string[];
3201
+ symbols: Record<string, {
3202
+ docId?: string | undefined;
3203
+ slug?: string | undefined;
3204
+ }>;
3205
+ }, {
3206
+ operation: {
3207
+ name: string;
3208
+ content: string;
3209
+ steps: string[];
3210
+ checklist: string[];
3211
+ kind: "operation";
3212
+ id: string;
3213
+ docId: string;
3214
+ slug: string;
3215
+ types: string[];
3216
+ extends: string[];
3217
+ sectionRef: string;
3218
+ };
3219
+ calls: string[];
3220
+ symbols: Record<string, {
3221
+ docId?: string | undefined;
3222
+ slug?: string | undefined;
3223
+ }>;
3224
+ }>;
3225
+ export type DocId = z.infer<typeof DocIdSchema>;
3226
+ export type Slug = z.infer<typeof SlugSchema>;
3227
+ export type LegacyBusyDocument = z.infer<typeof LegacyBusyDocumentSchema>;
3228
+ export type Playbook = z.infer<typeof PlaybookSchema>;
3229
+ export type LocalDef = z.infer<typeof LocalDefSchema>;
3230
+ export type LegacyOperation = z.infer<typeof LegacyOperationSchema>;
3231
+ export type ImportDef = z.infer<typeof ImportDefSchema>;
3232
+ export type EdgeRole = z.infer<typeof EdgeRoleSchema>;
3233
+ export type Edge = z.infer<typeof EdgeSchema>;
3234
+ export type File = z.infer<typeof FileSchema>;
3235
+ export type Repo = z.infer<typeof RepoSchema>;
3236
+ export type ContextPayload = z.infer<typeof ContextPayloadSchema>;
3237
+ export type BusyDocument = LegacyBusyDocument;
3238
+ export type Operation = LegacyOperation;
3239
+ export declare const FrontMatterSchema: z.ZodObject<{
3240
+ Name: z.ZodString;
3241
+ Type: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, string[], string | string[] | undefined>;
3242
+ Extends: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, string[], string | string[] | undefined>;
3243
+ Description: z.ZodOptional<z.ZodString>;
3244
+ Tags: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, string[], string | string[] | undefined>;
3245
+ }, "strip", z.ZodTypeAny, {
3246
+ Name: string;
3247
+ Type: string[];
3248
+ Extends: string[];
3249
+ Tags: string[];
3250
+ Description?: string | undefined;
3251
+ }, {
3252
+ Name: string;
3253
+ Type?: string | string[] | undefined;
3254
+ Extends?: string | string[] | undefined;
3255
+ Description?: string | undefined;
3256
+ Tags?: string | string[] | undefined;
3257
+ }>;
3258
+ export type FrontMatter = z.infer<typeof FrontMatterSchema>;
3259
+ //# sourceMappingURL=schema.d.ts.map