@darkrymit/crunes-cli 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +5 -4
  2. package/dist/chunks/{add-OWYVF3IE.js → add-CBHWFGCA.js} +2 -2
  3. package/dist/chunks/{apply-OMEVXCHC.js → apply-YC6JEPUN.js} +6 -5
  4. package/dist/chunks/args-repl-TX3YWUOO.js +81 -0
  5. package/dist/chunks/banner-repl-DD22Z33A.js +52 -0
  6. package/dist/chunks/benchmark-BJEAAFWG.js +234 -0
  7. package/dist/chunks/{browse-COH6IJEX.js → browse-JZFU52ET.js} +2 -2
  8. package/dist/chunks/{chunk-2Q24YPGL.js → chunk-2PBPDTRD.js} +2 -2
  9. package/dist/chunks/chunk-63H5VXZY.js +101 -0
  10. package/dist/chunks/{chunk-GHQOK4L7.js → chunk-65J65MAP.js} +1 -1
  11. package/dist/chunks/{chunk-HMU2J25D.js → chunk-6MRZXASS.js} +3 -3
  12. package/dist/chunks/{chunk-HOH7WZX4.js → chunk-ASZKAC24.js} +9 -1
  13. package/dist/chunks/{chunk-AIEWOUXT.js → chunk-DZJRYFOP.js} +104 -41
  14. package/dist/chunks/{chunk-QMWGQXEZ.js → chunk-G4ZAUHHA.js} +2 -4
  15. package/dist/chunks/{chunk-67I2J474.js → chunk-J3GZ3DXD.js} +14 -55
  16. package/dist/chunks/{chunk-XIXND2M4.js → chunk-JOAL437H.js} +5 -1
  17. package/dist/chunks/{chunk-6I7RHSAA.js → chunk-JU6FKUBY.js} +30394 -26055
  18. package/dist/chunks/{chunk-BVY5LN7X.js → chunk-NAEVMRNA.js} +22031 -13350
  19. package/dist/chunks/{chunk-NXSDVVTW.js → chunk-NDEYEYSU.js} +22 -69
  20. package/dist/chunks/{chunk-L72BG6DS.js → chunk-NYLRTAAA.js} +1 -1
  21. package/dist/chunks/{chunk-UGN3FFEF.js → chunk-V35LVVNV.js} +5113 -2117
  22. package/dist/chunks/chunk-ZJDKCC2Y.js +105 -0
  23. package/dist/chunks/{clear-Y5POLIMF.js → clear-YBDIPEEH.js} +5 -9
  24. package/dist/chunks/commands-repl-IPLJ4M7X.js +65 -0
  25. package/dist/chunks/complete-input-repl-IDSCMRYL.js +71 -0
  26. package/dist/chunks/{create-I6BNYZ5Q.js → create-ZFFV3Z2P.js} +2 -1
  27. package/dist/chunks/{delete-UB5SXO5I.js → delete-C4UJ7X5K.js} +5 -9
  28. package/dist/chunks/delete-E4TEBRPX.js +27 -0
  29. package/dist/chunks/{delete-7CQFYIXS.js → delete-LNOYM5KG.js} +5 -9
  30. package/dist/chunks/{disable-FCBW7WVG.js → disable-TMG2K3BF.js} +6 -6
  31. package/dist/chunks/{doctor-DS57HDLJ.js → doctor-N43QEMAH.js} +2 -2
  32. package/dist/chunks/{enable-IXRVUXJM.js → enable-327OMBPC.js} +6 -6
  33. package/dist/chunks/{globals-YCJ2DGWC.js → globals-H2WF344Y.js} +2 -2
  34. package/dist/chunks/{init-WGKQVAZE.js → init-HU5OMHEH.js} +1 -1
  35. package/dist/chunks/input-repl-ZBH6FVPV.js +87 -0
  36. package/dist/chunks/{install-BCTBOPBS.js → install-RRLUOYFO.js} +6 -6
  37. package/dist/chunks/intro-4CICBP2J.js +2727 -0
  38. package/dist/chunks/{kill-LWRXZVM5.js → kill-2UG7PHUV.js} +4 -10
  39. package/dist/chunks/list-4X3JFQGS.js +41 -0
  40. package/dist/chunks/{list-ZBYPMUID.js → list-7VHJIUDX.js} +2 -2
  41. package/dist/chunks/list-A5WVDBWF.js +53 -0
  42. package/dist/chunks/{list-NGOCMJXE.js → list-CK5X2YN3.js} +5 -4
  43. package/dist/chunks/{list-TTKLNJKI.js → list-FLAYJQKN.js} +2 -2
  44. package/dist/chunks/list-PTAWQYWG.js +35 -0
  45. package/dist/chunks/list-U7PAYNAH.js +47 -0
  46. package/dist/chunks/{list-OTOMCFLA.js → list-WH7KESMV.js} +12 -11
  47. package/dist/chunks/{query-NY4SCO77.js → query-AW7WYILM.js} +5 -9
  48. package/dist/chunks/{registry-W5XFI5T6.js → registry-3QIL5SVL.js} +2 -2
  49. package/dist/chunks/{remove-WEAZFZCO.js → remove-QUH2D3S5.js} +2 -2
  50. package/dist/chunks/repl-STBZC4P2.js +180 -0
  51. package/dist/chunks/repl-VGC5FUJG.js +378 -0
  52. package/dist/chunks/resolver-QMIY33FM.js +26 -0
  53. package/dist/chunks/run-T33CMCFZ.js +26 -0
  54. package/dist/chunks/{run-J2A5YTTY.js → run-Y4TG3EM3.js} +22 -3
  55. package/dist/chunks/rune-UBRVWG5A.js +139 -0
  56. package/dist/chunks/{search-XENXL3GC.js → search-MSSDGJTF.js} +2 -2
  57. package/dist/chunks/{uninstall-MX5PLGDI.js → uninstall-55YTHZRH.js} +5 -5
  58. package/dist/chunks/unset-YASSMSE5.js +24 -0
  59. package/dist/chunks/{update-7XDTVFZ3.js → update-EWWDROKW.js} +2 -2
  60. package/dist/chunks/{update-IEE54GPY.js → update-G6XO4RIM.js} +6 -6
  61. package/dist/chunks/{utils-PO3ZK53L.js → utils-XOWJQWNR.js} +2 -2
  62. package/dist/chunks/{version-V67W66HQ.js → version-I442SSH7.js} +10 -5
  63. package/dist/cli.js +114 -81
  64. package/package.json +9 -4
  65. package/dist/chunks/benchmark-ATSRQIDC.js +0 -164
  66. package/dist/chunks/check-G72VZKIP.js +0 -144
  67. package/dist/chunks/chunk-3TM6B4E5.js +0 -70
  68. package/dist/chunks/chunk-XXUNHQIB.js +0 -129
  69. package/dist/chunks/intro-RFWW5HIO.js +0 -1510
  70. package/dist/chunks/list-5DVVP7HX.js +0 -50
  71. package/dist/chunks/list-6WL5LGIZ.js +0 -80
  72. package/dist/chunks/list-YPI7YDKK.js +0 -80
  73. package/dist/chunks/run-AUAGELWL.js +0 -23
  74. package/dist/chunks/rune-D2FL547U.js +0 -87
  75. package/dist/chunks/unset-KQOZYVTE.js +0 -28
@@ -0,0 +1,2727 @@
1
+ import {
2
+ utils_api_default
3
+ } from "./chunk-NAEVMRNA.js";
4
+ import {
5
+ globals_api_default
6
+ } from "./chunk-V35LVVNV.js";
7
+ import {
8
+ formatMembers,
9
+ formatNode,
10
+ walk
11
+ } from "./chunk-JOAL437H.js";
12
+ import {
13
+ loadConfig
14
+ } from "./chunk-H3BVJCIL.js";
15
+ import "./chunk-ASZKAC24.js";
16
+ import {
17
+ output
18
+ } from "./chunk-6XLT25GS.js";
19
+ import "./chunk-WCODTMDN.js";
20
+ import {
21
+ init_require_shim
22
+ } from "./chunk-TPK5AGRA.js";
23
+
24
+ // src/docs/commands/intro.js
25
+ init_require_shim();
26
+ import { writeFileSync } from "node:fs";
27
+ import { resolve } from "node:path";
28
+
29
+ // src/docs/intro-compiler.js
30
+ init_require_shim();
31
+
32
+ // src/docs/generated/lifecycle-api.json
33
+ var lifecycle_api_default = {
34
+ schemaVersion: "2.0",
35
+ id: 0,
36
+ name: "@darkrymit/crunes-cli",
37
+ variant: "project",
38
+ kind: 1,
39
+ flags: {},
40
+ children: [
41
+ {
42
+ id: 1,
43
+ name: "lifecycle",
44
+ variant: "declaration",
45
+ kind: 4,
46
+ flags: {},
47
+ comment: {
48
+ summary: [
49
+ {
50
+ kind: "text",
51
+ text: "Rune Lifecycle Entrypoint Methods\n\nThese are the standard ES module exports required or supported by the Crunes execution engine."
52
+ }
53
+ ]
54
+ },
55
+ children: [
56
+ {
57
+ id: 61,
58
+ name: "ArgBuilder",
59
+ variant: "declaration",
60
+ kind: 256,
61
+ flags: {},
62
+ comment: {
63
+ summary: [
64
+ {
65
+ kind: "text",
66
+ text: "Fluent builder for defining rune options, positionals, and examples."
67
+ }
68
+ ]
69
+ },
70
+ children: [
71
+ {
72
+ id: 83,
73
+ name: "build",
74
+ variant: "declaration",
75
+ kind: 2048,
76
+ flags: {},
77
+ signatures: [
78
+ {
79
+ id: 84,
80
+ name: "build",
81
+ variant: "signature",
82
+ kind: 4096,
83
+ flags: {},
84
+ comment: {
85
+ summary: [
86
+ {
87
+ kind: "text",
88
+ text: "Finalizes and builds the argument schema."
89
+ }
90
+ ]
91
+ },
92
+ type: {
93
+ type: "intrinsic",
94
+ name: "any"
95
+ }
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ id: 75,
101
+ name: "command",
102
+ variant: "declaration",
103
+ kind: 2048,
104
+ flags: {},
105
+ signatures: [
106
+ {
107
+ id: 76,
108
+ name: "command",
109
+ variant: "signature",
110
+ kind: 4096,
111
+ flags: {},
112
+ comment: {
113
+ summary: [
114
+ {
115
+ kind: "text",
116
+ text: "Declares a nested command under the current command."
117
+ }
118
+ ]
119
+ },
120
+ parameters: [
121
+ {
122
+ id: 77,
123
+ name: "name",
124
+ variant: "param",
125
+ kind: 32768,
126
+ flags: {},
127
+ comment: {
128
+ summary: [
129
+ {
130
+ kind: "text",
131
+ text: "Command name (e.g. 'create')."
132
+ }
133
+ ]
134
+ },
135
+ type: {
136
+ type: "intrinsic",
137
+ name: "string"
138
+ }
139
+ },
140
+ {
141
+ id: 78,
142
+ name: "description",
143
+ variant: "param",
144
+ kind: 32768,
145
+ flags: {},
146
+ comment: {
147
+ summary: [
148
+ {
149
+ kind: "text",
150
+ text: "Command description."
151
+ }
152
+ ]
153
+ },
154
+ type: {
155
+ type: "intrinsic",
156
+ name: "string"
157
+ }
158
+ },
159
+ {
160
+ id: 79,
161
+ name: "callback",
162
+ variant: "param",
163
+ kind: 32768,
164
+ flags: {
165
+ isOptional: true
166
+ },
167
+ comment: {
168
+ summary: [
169
+ {
170
+ kind: "text",
171
+ text: "Callback configured with a subcommand ArgBuilder."
172
+ }
173
+ ]
174
+ },
175
+ type: {
176
+ type: "reflection",
177
+ declaration: {
178
+ id: 80,
179
+ name: "__type",
180
+ variant: "declaration",
181
+ kind: 65536,
182
+ flags: {},
183
+ signatures: [
184
+ {
185
+ id: 81,
186
+ name: "__type",
187
+ variant: "signature",
188
+ kind: 4096,
189
+ flags: {},
190
+ parameters: [
191
+ {
192
+ id: 82,
193
+ name: "sub",
194
+ variant: "param",
195
+ kind: 32768,
196
+ flags: {},
197
+ type: {
198
+ type: "reference",
199
+ target: 61,
200
+ name: "ArgBuilder",
201
+ package: "@darkrymit/crunes-cli",
202
+ qualifiedName: "lifecycle.ArgBuilder"
203
+ }
204
+ }
205
+ ],
206
+ type: {
207
+ type: "intrinsic",
208
+ name: "void"
209
+ }
210
+ }
211
+ ]
212
+ }
213
+ }
214
+ }
215
+ ],
216
+ type: {
217
+ type: "intrinsic",
218
+ name: "this"
219
+ }
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ id: 71,
225
+ name: "example",
226
+ variant: "declaration",
227
+ kind: 2048,
228
+ flags: {},
229
+ signatures: [
230
+ {
231
+ id: 72,
232
+ name: "example",
233
+ variant: "signature",
234
+ kind: 4096,
235
+ flags: {},
236
+ comment: {
237
+ summary: [
238
+ {
239
+ kind: "text",
240
+ text: "Adds an example command showing how to call the rune."
241
+ }
242
+ ]
243
+ },
244
+ parameters: [
245
+ {
246
+ id: 73,
247
+ name: "usage",
248
+ variant: "param",
249
+ kind: 32768,
250
+ flags: {},
251
+ comment: {
252
+ summary: [
253
+ {
254
+ kind: "text",
255
+ text: "Usage example string (e.g. 'crunes run hello world')."
256
+ }
257
+ ]
258
+ },
259
+ type: {
260
+ type: "intrinsic",
261
+ name: "string"
262
+ }
263
+ },
264
+ {
265
+ id: 74,
266
+ name: "description",
267
+ variant: "param",
268
+ kind: 32768,
269
+ flags: {},
270
+ comment: {
271
+ summary: [
272
+ {
273
+ kind: "text",
274
+ text: "A brief description of the example."
275
+ }
276
+ ]
277
+ },
278
+ type: {
279
+ type: "intrinsic",
280
+ name: "string"
281
+ }
282
+ }
283
+ ],
284
+ type: {
285
+ type: "intrinsic",
286
+ name: "this"
287
+ }
288
+ }
289
+ ]
290
+ },
291
+ {
292
+ id: 62,
293
+ name: "option",
294
+ variant: "declaration",
295
+ kind: 2048,
296
+ flags: {},
297
+ signatures: [
298
+ {
299
+ id: 63,
300
+ name: "option",
301
+ variant: "signature",
302
+ kind: 4096,
303
+ flags: {},
304
+ comment: {
305
+ summary: [
306
+ {
307
+ kind: "text",
308
+ text: "Declares a named option/flag."
309
+ }
310
+ ]
311
+ },
312
+ parameters: [
313
+ {
314
+ id: 64,
315
+ name: "flags",
316
+ variant: "param",
317
+ kind: 32768,
318
+ flags: {},
319
+ comment: {
320
+ summary: [
321
+ {
322
+ kind: "text",
323
+ text: "Flag specification (e.g., '--verbose' or '-n, --name <name>')."
324
+ }
325
+ ]
326
+ },
327
+ type: {
328
+ type: "intrinsic",
329
+ name: "string"
330
+ }
331
+ },
332
+ {
333
+ id: 65,
334
+ name: "description",
335
+ variant: "param",
336
+ kind: 32768,
337
+ flags: {},
338
+ comment: {
339
+ summary: [
340
+ {
341
+ kind: "text",
342
+ text: "A brief description of this option."
343
+ }
344
+ ]
345
+ },
346
+ type: {
347
+ type: "intrinsic",
348
+ name: "string"
349
+ }
350
+ },
351
+ {
352
+ id: 66,
353
+ name: "defaultValue",
354
+ variant: "param",
355
+ kind: 32768,
356
+ flags: {
357
+ isOptional: true
358
+ },
359
+ comment: {
360
+ summary: [
361
+ {
362
+ kind: "text",
363
+ text: "Optional default value for the option."
364
+ }
365
+ ]
366
+ },
367
+ type: {
368
+ type: "intrinsic",
369
+ name: "any"
370
+ }
371
+ }
372
+ ],
373
+ type: {
374
+ type: "intrinsic",
375
+ name: "this"
376
+ }
377
+ }
378
+ ]
379
+ },
380
+ {
381
+ id: 67,
382
+ name: "positional",
383
+ variant: "declaration",
384
+ kind: 2048,
385
+ flags: {},
386
+ signatures: [
387
+ {
388
+ id: 68,
389
+ name: "positional",
390
+ variant: "signature",
391
+ kind: 4096,
392
+ flags: {},
393
+ comment: {
394
+ summary: [
395
+ {
396
+ kind: "text",
397
+ text: "Declares a positional argument."
398
+ }
399
+ ]
400
+ },
401
+ parameters: [
402
+ {
403
+ id: 69,
404
+ name: "spec",
405
+ variant: "param",
406
+ kind: 32768,
407
+ flags: {},
408
+ comment: {
409
+ summary: [
410
+ {
411
+ kind: "text",
412
+ text: "Positional argument specification (e.g., '<name>' for required, '[name]' for optional, '<targets...>' or '[targets...]' for variadic rest arrays)."
413
+ }
414
+ ]
415
+ },
416
+ type: {
417
+ type: "intrinsic",
418
+ name: "string"
419
+ }
420
+ },
421
+ {
422
+ id: 70,
423
+ name: "description",
424
+ variant: "param",
425
+ kind: 32768,
426
+ flags: {},
427
+ comment: {
428
+ summary: [
429
+ {
430
+ kind: "text",
431
+ text: "A brief description of this positional argument."
432
+ }
433
+ ]
434
+ },
435
+ type: {
436
+ type: "intrinsic",
437
+ name: "string"
438
+ }
439
+ }
440
+ ],
441
+ type: {
442
+ type: "intrinsic",
443
+ name: "this"
444
+ }
445
+ }
446
+ ]
447
+ }
448
+ ],
449
+ groups: [
450
+ {
451
+ title: "Methods",
452
+ children: [
453
+ 83,
454
+ 75,
455
+ 71,
456
+ 62,
457
+ 67
458
+ ]
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ id: 50,
464
+ name: "CommandBuilder",
465
+ variant: "declaration",
466
+ kind: 256,
467
+ flags: {},
468
+ comment: {
469
+ summary: [
470
+ {
471
+ kind: "text",
472
+ text: "Fluent builder for declaring REPL slash commands. Only .command() at root is meaningful \u2014 .option(), .positional(), .example() at root are ignored by the runtime."
473
+ }
474
+ ]
475
+ },
476
+ children: [
477
+ {
478
+ id: 59,
479
+ name: "build",
480
+ variant: "declaration",
481
+ kind: 2048,
482
+ flags: {},
483
+ signatures: [
484
+ {
485
+ id: 60,
486
+ name: "build",
487
+ variant: "signature",
488
+ kind: 4096,
489
+ flags: {},
490
+ type: {
491
+ type: "intrinsic",
492
+ name: "any"
493
+ }
494
+ }
495
+ ]
496
+ },
497
+ {
498
+ id: 51,
499
+ name: "command",
500
+ variant: "declaration",
501
+ kind: 2048,
502
+ flags: {},
503
+ signatures: [
504
+ {
505
+ id: 52,
506
+ name: "command",
507
+ variant: "signature",
508
+ kind: 4096,
509
+ flags: {},
510
+ parameters: [
511
+ {
512
+ id: 53,
513
+ name: "name",
514
+ variant: "param",
515
+ kind: 32768,
516
+ flags: {},
517
+ type: {
518
+ type: "intrinsic",
519
+ name: "string"
520
+ }
521
+ },
522
+ {
523
+ id: 54,
524
+ name: "description",
525
+ variant: "param",
526
+ kind: 32768,
527
+ flags: {},
528
+ type: {
529
+ type: "intrinsic",
530
+ name: "string"
531
+ }
532
+ },
533
+ {
534
+ id: 55,
535
+ name: "callback",
536
+ variant: "param",
537
+ kind: 32768,
538
+ flags: {
539
+ isOptional: true
540
+ },
541
+ type: {
542
+ type: "reflection",
543
+ declaration: {
544
+ id: 56,
545
+ name: "__type",
546
+ variant: "declaration",
547
+ kind: 65536,
548
+ flags: {},
549
+ signatures: [
550
+ {
551
+ id: 57,
552
+ name: "__type",
553
+ variant: "signature",
554
+ kind: 4096,
555
+ flags: {},
556
+ parameters: [
557
+ {
558
+ id: 58,
559
+ name: "sub",
560
+ variant: "param",
561
+ kind: 32768,
562
+ flags: {},
563
+ type: {
564
+ type: "reference",
565
+ target: 61,
566
+ name: "ArgBuilder",
567
+ package: "@darkrymit/crunes-cli",
568
+ qualifiedName: "lifecycle.ArgBuilder"
569
+ }
570
+ }
571
+ ],
572
+ type: {
573
+ type: "intrinsic",
574
+ name: "void"
575
+ }
576
+ }
577
+ ]
578
+ }
579
+ }
580
+ }
581
+ ],
582
+ type: {
583
+ type: "intrinsic",
584
+ name: "this"
585
+ }
586
+ }
587
+ ]
588
+ }
589
+ ],
590
+ groups: [
591
+ {
592
+ title: "Methods",
593
+ children: [
594
+ 59,
595
+ 51
596
+ ]
597
+ }
598
+ ]
599
+ },
600
+ {
601
+ id: 85,
602
+ name: "ParsedArgs",
603
+ variant: "declaration",
604
+ kind: 256,
605
+ flags: {},
606
+ comment: {
607
+ summary: [
608
+ {
609
+ kind: "text",
610
+ text: "Parsed yargs-parser arguments passed to the rune's run() function."
611
+ }
612
+ ]
613
+ },
614
+ children: [
615
+ {
616
+ id: 86,
617
+ name: "_",
618
+ variant: "declaration",
619
+ kind: 1024,
620
+ flags: {},
621
+ comment: {
622
+ summary: [
623
+ {
624
+ kind: "text",
625
+ text: "Positional arguments in order."
626
+ }
627
+ ]
628
+ },
629
+ type: {
630
+ type: "array",
631
+ elementType: {
632
+ type: "intrinsic",
633
+ name: "string"
634
+ }
635
+ }
636
+ },
637
+ {
638
+ id: 89,
639
+ name: "$command",
640
+ variant: "declaration",
641
+ kind: 1024,
642
+ flags: {},
643
+ comment: {
644
+ summary: [
645
+ {
646
+ kind: "text",
647
+ text: "Space-separated matched command path. Empty string at root level. Always present."
648
+ }
649
+ ]
650
+ },
651
+ type: {
652
+ type: "intrinsic",
653
+ name: "string"
654
+ }
655
+ },
656
+ {
657
+ id: 90,
658
+ name: "$commands",
659
+ variant: "declaration",
660
+ kind: 1024,
661
+ flags: {},
662
+ comment: {
663
+ summary: [
664
+ {
665
+ kind: "text",
666
+ text: "Array of matched command path levels. Empty array at root level. Always present."
667
+ }
668
+ ]
669
+ },
670
+ type: {
671
+ type: "array",
672
+ elementType: {
673
+ type: "intrinsic",
674
+ name: "string"
675
+ }
676
+ }
677
+ },
678
+ {
679
+ id: 88,
680
+ name: "$raw",
681
+ variant: "declaration",
682
+ kind: 1024,
683
+ flags: {},
684
+ comment: {
685
+ summary: [
686
+ {
687
+ kind: "text",
688
+ text: "Original raw arguments passed to the rune."
689
+ }
690
+ ]
691
+ },
692
+ type: {
693
+ type: "array",
694
+ elementType: {
695
+ type: "intrinsic",
696
+ name: "string"
697
+ }
698
+ }
699
+ },
700
+ {
701
+ id: 87,
702
+ name: "$rest",
703
+ variant: "declaration",
704
+ kind: 1024,
705
+ flags: {},
706
+ comment: {
707
+ summary: [
708
+ {
709
+ kind: "text",
710
+ text: "Positional arguments not mapped to any named parameters."
711
+ }
712
+ ]
713
+ },
714
+ type: {
715
+ type: "array",
716
+ elementType: {
717
+ type: "intrinsic",
718
+ name: "string"
719
+ }
720
+ }
721
+ }
722
+ ],
723
+ groups: [
724
+ {
725
+ title: "Properties",
726
+ children: [
727
+ 86,
728
+ 89,
729
+ 90,
730
+ 88,
731
+ 87
732
+ ]
733
+ }
734
+ ],
735
+ indexSignatures: [
736
+ {
737
+ id: 91,
738
+ name: "__index",
739
+ variant: "signature",
740
+ kind: 8192,
741
+ flags: {},
742
+ parameters: [
743
+ {
744
+ id: 92,
745
+ name: "key",
746
+ variant: "param",
747
+ kind: 32768,
748
+ flags: {},
749
+ type: {
750
+ type: "intrinsic",
751
+ name: "string"
752
+ }
753
+ }
754
+ ],
755
+ type: {
756
+ type: "intrinsic",
757
+ name: "any"
758
+ }
759
+ }
760
+ ],
761
+ extendedTypes: [
762
+ {
763
+ type: "reference",
764
+ target: {
765
+ packageName: "typescript",
766
+ packagePath: "lib/lib.es5.d.ts",
767
+ qualifiedName: "Record"
768
+ },
769
+ typeArguments: [
770
+ {
771
+ type: "intrinsic",
772
+ name: "string"
773
+ },
774
+ {
775
+ type: "intrinsic",
776
+ name: "any"
777
+ }
778
+ ],
779
+ name: "Record",
780
+ package: "typescript"
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ id: 30,
786
+ name: "InputEvent",
787
+ variant: "declaration",
788
+ kind: 2097152,
789
+ flags: {},
790
+ comment: {
791
+ summary: [
792
+ {
793
+ kind: "text",
794
+ text: "Input event passed to inputRepl() each turn."
795
+ }
796
+ ]
797
+ },
798
+ type: {
799
+ type: "union",
800
+ types: [
801
+ {
802
+ type: "reflection",
803
+ declaration: {
804
+ id: 31,
805
+ name: "__type",
806
+ variant: "declaration",
807
+ kind: 65536,
808
+ flags: {},
809
+ children: [
810
+ {
811
+ id: 33,
812
+ name: "text",
813
+ variant: "declaration",
814
+ kind: 1024,
815
+ flags: {},
816
+ type: {
817
+ type: "intrinsic",
818
+ name: "string"
819
+ }
820
+ },
821
+ {
822
+ id: 32,
823
+ name: "type",
824
+ variant: "declaration",
825
+ kind: 1024,
826
+ flags: {},
827
+ type: {
828
+ type: "literal",
829
+ value: "line"
830
+ }
831
+ }
832
+ ],
833
+ groups: [
834
+ {
835
+ title: "Properties",
836
+ children: [
837
+ 33,
838
+ 32
839
+ ]
840
+ }
841
+ ]
842
+ }
843
+ },
844
+ {
845
+ type: "reflection",
846
+ declaration: {
847
+ id: 34,
848
+ name: "__type",
849
+ variant: "declaration",
850
+ kind: 65536,
851
+ flags: {},
852
+ children: [
853
+ {
854
+ id: 36,
855
+ name: "text",
856
+ variant: "declaration",
857
+ kind: 1024,
858
+ flags: {},
859
+ type: {
860
+ type: "literal",
861
+ value: ""
862
+ }
863
+ },
864
+ {
865
+ id: 35,
866
+ name: "type",
867
+ variant: "declaration",
868
+ kind: 1024,
869
+ flags: {},
870
+ type: {
871
+ type: "literal",
872
+ value: "interrupt"
873
+ }
874
+ }
875
+ ],
876
+ groups: [
877
+ {
878
+ title: "Properties",
879
+ children: [
880
+ 36,
881
+ 35
882
+ ]
883
+ }
884
+ ]
885
+ }
886
+ },
887
+ {
888
+ type: "reflection",
889
+ declaration: {
890
+ id: 37,
891
+ name: "__type",
892
+ variant: "declaration",
893
+ kind: 65536,
894
+ flags: {},
895
+ children: [
896
+ {
897
+ id: 39,
898
+ name: "text",
899
+ variant: "declaration",
900
+ kind: 1024,
901
+ flags: {},
902
+ type: {
903
+ type: "literal",
904
+ value: ""
905
+ }
906
+ },
907
+ {
908
+ id: 38,
909
+ name: "type",
910
+ variant: "declaration",
911
+ kind: 1024,
912
+ flags: {},
913
+ type: {
914
+ type: "literal",
915
+ value: "eof"
916
+ }
917
+ }
918
+ ],
919
+ groups: [
920
+ {
921
+ title: "Properties",
922
+ children: [
923
+ 39,
924
+ 38
925
+ ]
926
+ }
927
+ ]
928
+ }
929
+ },
930
+ {
931
+ type: "reflection",
932
+ declaration: {
933
+ id: 40,
934
+ name: "__type",
935
+ variant: "declaration",
936
+ kind: 65536,
937
+ flags: {},
938
+ children: [
939
+ {
940
+ id: 42,
941
+ name: "args",
942
+ variant: "declaration",
943
+ kind: 1024,
944
+ flags: {},
945
+ type: {
946
+ type: "reference",
947
+ target: 85,
948
+ name: "ParsedArgs",
949
+ package: "@darkrymit/crunes-cli",
950
+ qualifiedName: "lifecycle.ParsedArgs"
951
+ }
952
+ },
953
+ {
954
+ id: 41,
955
+ name: "type",
956
+ variant: "declaration",
957
+ kind: 1024,
958
+ flags: {},
959
+ type: {
960
+ type: "literal",
961
+ value: "command"
962
+ }
963
+ }
964
+ ],
965
+ groups: [
966
+ {
967
+ title: "Properties",
968
+ children: [
969
+ 42,
970
+ 41
971
+ ]
972
+ }
973
+ ]
974
+ }
975
+ }
976
+ ]
977
+ }
978
+ },
979
+ {
980
+ id: 43,
981
+ name: "ReplSignal",
982
+ variant: "declaration",
983
+ kind: 2097152,
984
+ flags: {},
985
+ comment: {
986
+ summary: [
987
+ {
988
+ kind: "text",
989
+ text: "Controls the REPL session from inside inputRepl()."
990
+ }
991
+ ]
992
+ },
993
+ type: {
994
+ type: "union",
995
+ types: [
996
+ {
997
+ type: "reflection",
998
+ declaration: {
999
+ id: 44,
1000
+ name: "__type",
1001
+ variant: "declaration",
1002
+ kind: 65536,
1003
+ flags: {},
1004
+ children: [
1005
+ {
1006
+ id: 45,
1007
+ name: "type",
1008
+ variant: "declaration",
1009
+ kind: 1024,
1010
+ flags: {},
1011
+ type: {
1012
+ type: "literal",
1013
+ value: "prompt"
1014
+ }
1015
+ },
1016
+ {
1017
+ id: 46,
1018
+ name: "value",
1019
+ variant: "declaration",
1020
+ kind: 1024,
1021
+ flags: {
1022
+ isOptional: true
1023
+ },
1024
+ type: {
1025
+ type: "intrinsic",
1026
+ name: "string"
1027
+ }
1028
+ }
1029
+ ],
1030
+ groups: [
1031
+ {
1032
+ title: "Properties",
1033
+ children: [
1034
+ 45,
1035
+ 46
1036
+ ]
1037
+ }
1038
+ ]
1039
+ }
1040
+ },
1041
+ {
1042
+ type: "reflection",
1043
+ declaration: {
1044
+ id: 47,
1045
+ name: "__type",
1046
+ variant: "declaration",
1047
+ kind: 65536,
1048
+ flags: {},
1049
+ children: [
1050
+ {
1051
+ id: 49,
1052
+ name: "message",
1053
+ variant: "declaration",
1054
+ kind: 1024,
1055
+ flags: {
1056
+ isOptional: true
1057
+ },
1058
+ type: {
1059
+ type: "intrinsic",
1060
+ name: "string"
1061
+ }
1062
+ },
1063
+ {
1064
+ id: 48,
1065
+ name: "type",
1066
+ variant: "declaration",
1067
+ kind: 1024,
1068
+ flags: {},
1069
+ type: {
1070
+ type: "literal",
1071
+ value: "done"
1072
+ }
1073
+ }
1074
+ ],
1075
+ groups: [
1076
+ {
1077
+ title: "Properties",
1078
+ children: [
1079
+ 49,
1080
+ 48
1081
+ ]
1082
+ }
1083
+ ]
1084
+ }
1085
+ }
1086
+ ]
1087
+ }
1088
+ },
1089
+ {
1090
+ id: 2,
1091
+ name: "args",
1092
+ variant: "declaration",
1093
+ kind: 64,
1094
+ flags: {},
1095
+ signatures: [
1096
+ {
1097
+ id: 3,
1098
+ name: "args",
1099
+ variant: "signature",
1100
+ kind: 4096,
1101
+ flags: {},
1102
+ comment: {
1103
+ summary: [
1104
+ {
1105
+ kind: "text",
1106
+ text: "Defines the argument and option schema for the rune.\nCalled by the runner in a minimal bootstrap isolate to compile usage specifications."
1107
+ }
1108
+ ]
1109
+ },
1110
+ parameters: [
1111
+ {
1112
+ id: 4,
1113
+ name: "builder",
1114
+ variant: "param",
1115
+ kind: 32768,
1116
+ flags: {},
1117
+ comment: {
1118
+ summary: [
1119
+ {
1120
+ kind: "text",
1121
+ text: "The schema builder to declare options, positionals, and examples."
1122
+ }
1123
+ ]
1124
+ },
1125
+ type: {
1126
+ type: "reference",
1127
+ target: 61,
1128
+ name: "ArgBuilder",
1129
+ package: "@darkrymit/crunes-cli",
1130
+ qualifiedName: "lifecycle.ArgBuilder"
1131
+ }
1132
+ }
1133
+ ],
1134
+ type: {
1135
+ type: "intrinsic",
1136
+ name: "any"
1137
+ }
1138
+ }
1139
+ ]
1140
+ },
1141
+ {
1142
+ id: 10,
1143
+ name: "argsRepl",
1144
+ variant: "declaration",
1145
+ kind: 64,
1146
+ flags: {},
1147
+ signatures: [
1148
+ {
1149
+ id: 11,
1150
+ name: "argsRepl",
1151
+ variant: "signature",
1152
+ kind: 4096,
1153
+ flags: {},
1154
+ comment: {
1155
+ summary: [
1156
+ {
1157
+ kind: "text",
1158
+ text: "Defines the argument and option schema for the REPL session.\nIf absent, repl(args) receives an empty args object \u2014 it does NOT fall back to args()."
1159
+ }
1160
+ ]
1161
+ },
1162
+ parameters: [
1163
+ {
1164
+ id: 12,
1165
+ name: "builder",
1166
+ variant: "param",
1167
+ kind: 32768,
1168
+ flags: {},
1169
+ comment: {
1170
+ summary: [
1171
+ {
1172
+ kind: "text",
1173
+ text: "The schema builder to declare options, positionals, and examples."
1174
+ }
1175
+ ]
1176
+ },
1177
+ type: {
1178
+ type: "reference",
1179
+ target: 61,
1180
+ name: "ArgBuilder",
1181
+ package: "@darkrymit/crunes-cli",
1182
+ qualifiedName: "lifecycle.ArgBuilder"
1183
+ }
1184
+ }
1185
+ ],
1186
+ type: {
1187
+ type: "intrinsic",
1188
+ name: "any"
1189
+ }
1190
+ }
1191
+ ]
1192
+ },
1193
+ {
1194
+ id: 16,
1195
+ name: "bannerRepl",
1196
+ variant: "declaration",
1197
+ kind: 64,
1198
+ flags: {},
1199
+ signatures: [
1200
+ {
1201
+ id: 17,
1202
+ name: "bannerRepl",
1203
+ variant: "signature",
1204
+ kind: 4096,
1205
+ flags: {},
1206
+ comment: {
1207
+ summary: [
1208
+ {
1209
+ kind: "text",
1210
+ text: 'Welcome banner. Called once after repl() resolves, before the first prompt.\nPrinted to stderr in text mode; emitted as { type: "banner" } in JSONL mode.'
1211
+ }
1212
+ ],
1213
+ blockTags: [
1214
+ {
1215
+ tag: "@returns",
1216
+ content: [
1217
+ {
1218
+ kind: "text",
1219
+ text: "Banner string, or void for no banner."
1220
+ }
1221
+ ]
1222
+ }
1223
+ ]
1224
+ },
1225
+ parameters: [
1226
+ {
1227
+ id: 18,
1228
+ name: "args",
1229
+ variant: "param",
1230
+ kind: 32768,
1231
+ flags: {},
1232
+ comment: {
1233
+ summary: [
1234
+ {
1235
+ kind: "text",
1236
+ text: "Parsed args from argsRepl() schema."
1237
+ }
1238
+ ]
1239
+ },
1240
+ type: {
1241
+ type: "reference",
1242
+ target: 85,
1243
+ name: "ParsedArgs",
1244
+ package: "@darkrymit/crunes-cli",
1245
+ qualifiedName: "lifecycle.ParsedArgs"
1246
+ }
1247
+ }
1248
+ ],
1249
+ type: {
1250
+ type: "union",
1251
+ types: [
1252
+ {
1253
+ type: "intrinsic",
1254
+ name: "string"
1255
+ },
1256
+ {
1257
+ type: "intrinsic",
1258
+ name: "void"
1259
+ },
1260
+ {
1261
+ type: "reference",
1262
+ target: {
1263
+ packageName: "typescript",
1264
+ packagePath: "lib/lib.es5.d.ts",
1265
+ qualifiedName: "Promise"
1266
+ },
1267
+ typeArguments: [
1268
+ {
1269
+ type: "union",
1270
+ types: [
1271
+ {
1272
+ type: "intrinsic",
1273
+ name: "string"
1274
+ },
1275
+ {
1276
+ type: "intrinsic",
1277
+ name: "void"
1278
+ }
1279
+ ]
1280
+ }
1281
+ ],
1282
+ name: "Promise",
1283
+ package: "typescript"
1284
+ }
1285
+ ]
1286
+ }
1287
+ }
1288
+ ]
1289
+ },
1290
+ {
1291
+ id: 19,
1292
+ name: "commandsRepl",
1293
+ variant: "declaration",
1294
+ kind: 64,
1295
+ flags: {},
1296
+ signatures: [
1297
+ {
1298
+ id: 20,
1299
+ name: "commandsRepl",
1300
+ variant: "signature",
1301
+ kind: 4096,
1302
+ flags: {},
1303
+ comment: {
1304
+ summary: [
1305
+ {
1306
+ kind: "text",
1307
+ text: 'Declares slash commands available in the REPL session.\nOnly .command() declarations at the root level are used \u2014 .option() and .positional() at root are ignored.\nMatched commands are dispatched to inputRepl() as { type: "command", args: ParsedArgs }.'
1308
+ }
1309
+ ]
1310
+ },
1311
+ parameters: [
1312
+ {
1313
+ id: 21,
1314
+ name: "builder",
1315
+ variant: "param",
1316
+ kind: 32768,
1317
+ flags: {},
1318
+ comment: {
1319
+ summary: [
1320
+ {
1321
+ kind: "text",
1322
+ text: "The command builder \u2014 use only .command() at root level."
1323
+ }
1324
+ ]
1325
+ },
1326
+ type: {
1327
+ type: "reference",
1328
+ target: 50,
1329
+ name: "CommandBuilder",
1330
+ package: "@darkrymit/crunes-cli",
1331
+ qualifiedName: "lifecycle.CommandBuilder"
1332
+ }
1333
+ }
1334
+ ],
1335
+ type: {
1336
+ type: "intrinsic",
1337
+ name: "any"
1338
+ }
1339
+ }
1340
+ ]
1341
+ },
1342
+ {
1343
+ id: 25,
1344
+ name: "completeInputRepl",
1345
+ variant: "declaration",
1346
+ kind: 64,
1347
+ flags: {},
1348
+ signatures: [
1349
+ {
1350
+ id: 26,
1351
+ name: "completeInputRepl",
1352
+ variant: "signature",
1353
+ kind: 4096,
1354
+ flags: {},
1355
+ comment: {
1356
+ summary: [
1357
+ {
1358
+ kind: "text",
1359
+ text: "Tab completion. Called on Tab key with the current input tokenized.\nLast element of tokens is the partial word being typed \u2014 same convention as resolveCompletions().\nReturns candidate strings; host filters by prefix and passes to readline."
1360
+ }
1361
+ ],
1362
+ blockTags: [
1363
+ {
1364
+ tag: "@returns",
1365
+ content: [
1366
+ {
1367
+ kind: "text",
1368
+ text: "Array of completion candidates."
1369
+ }
1370
+ ]
1371
+ }
1372
+ ]
1373
+ },
1374
+ parameters: [
1375
+ {
1376
+ id: 27,
1377
+ name: "tokens",
1378
+ variant: "param",
1379
+ kind: 32768,
1380
+ flags: {},
1381
+ comment: {
1382
+ summary: [
1383
+ {
1384
+ kind: "text",
1385
+ text: "Current input split on whitespace; last element is the partial word."
1386
+ }
1387
+ ]
1388
+ },
1389
+ type: {
1390
+ type: "array",
1391
+ elementType: {
1392
+ type: "intrinsic",
1393
+ name: "string"
1394
+ }
1395
+ }
1396
+ }
1397
+ ],
1398
+ type: {
1399
+ type: "union",
1400
+ types: [
1401
+ {
1402
+ type: "array",
1403
+ elementType: {
1404
+ type: "intrinsic",
1405
+ name: "string"
1406
+ }
1407
+ },
1408
+ {
1409
+ type: "reference",
1410
+ target: {
1411
+ packageName: "typescript",
1412
+ packagePath: "lib/lib.es5.d.ts",
1413
+ qualifiedName: "Promise"
1414
+ },
1415
+ typeArguments: [
1416
+ {
1417
+ type: "array",
1418
+ elementType: {
1419
+ type: "intrinsic",
1420
+ name: "string"
1421
+ }
1422
+ }
1423
+ ],
1424
+ name: "Promise",
1425
+ package: "typescript"
1426
+ }
1427
+ ]
1428
+ }
1429
+ }
1430
+ ]
1431
+ },
1432
+ {
1433
+ id: 8,
1434
+ name: "dispose",
1435
+ variant: "declaration",
1436
+ kind: 64,
1437
+ flags: {},
1438
+ signatures: [
1439
+ {
1440
+ id: 9,
1441
+ name: "dispose",
1442
+ variant: "signature",
1443
+ kind: 4096,
1444
+ flags: {},
1445
+ comment: {
1446
+ summary: [
1447
+ {
1448
+ kind: "text",
1449
+ text: "Optional cleanup hook for the regular run lifecycle.\nCalled after run() resolves or throws, before the isolate tears down.\nErrors thrown here are swallowed. No arguments are passed.\nUse this to close connections or release resources opened during run()."
1450
+ }
1451
+ ]
1452
+ },
1453
+ type: {
1454
+ type: "union",
1455
+ types: [
1456
+ {
1457
+ type: "intrinsic",
1458
+ name: "void"
1459
+ },
1460
+ {
1461
+ type: "reference",
1462
+ target: {
1463
+ packageName: "typescript",
1464
+ packagePath: "lib/lib.es5.d.ts",
1465
+ qualifiedName: "Promise"
1466
+ },
1467
+ typeArguments: [
1468
+ {
1469
+ type: "intrinsic",
1470
+ name: "void"
1471
+ }
1472
+ ],
1473
+ name: "Promise",
1474
+ package: "typescript"
1475
+ }
1476
+ ]
1477
+ }
1478
+ }
1479
+ ]
1480
+ },
1481
+ {
1482
+ id: 28,
1483
+ name: "disposeRepl",
1484
+ variant: "declaration",
1485
+ kind: 64,
1486
+ flags: {},
1487
+ signatures: [
1488
+ {
1489
+ id: 29,
1490
+ name: "disposeRepl",
1491
+ variant: "signature",
1492
+ kind: 4096,
1493
+ flags: {},
1494
+ comment: {
1495
+ summary: [
1496
+ {
1497
+ kind: "text",
1498
+ text: "Optional cleanup hook for REPL sessions.\nCalled when the session's dispose() method is invoked (on normal exit, Ctrl+D, or signal).\nGuaranteed to run even if inputRepl() never receives an eof event.\nErrors thrown here are swallowed. No arguments are passed."
1499
+ }
1500
+ ]
1501
+ },
1502
+ type: {
1503
+ type: "union",
1504
+ types: [
1505
+ {
1506
+ type: "intrinsic",
1507
+ name: "void"
1508
+ },
1509
+ {
1510
+ type: "reference",
1511
+ target: {
1512
+ packageName: "typescript",
1513
+ packagePath: "lib/lib.es5.d.ts",
1514
+ qualifiedName: "Promise"
1515
+ },
1516
+ typeArguments: [
1517
+ {
1518
+ type: "intrinsic",
1519
+ name: "void"
1520
+ }
1521
+ ],
1522
+ name: "Promise",
1523
+ package: "typescript"
1524
+ }
1525
+ ]
1526
+ }
1527
+ }
1528
+ ]
1529
+ },
1530
+ {
1531
+ id: 22,
1532
+ name: "inputRepl",
1533
+ variant: "declaration",
1534
+ kind: 64,
1535
+ flags: {},
1536
+ signatures: [
1537
+ {
1538
+ id: 23,
1539
+ name: "inputRepl",
1540
+ variant: "signature",
1541
+ kind: 4096,
1542
+ flags: {},
1543
+ comment: {
1544
+ summary: [
1545
+ {
1546
+ kind: "text",
1547
+ text: "Per-input handler. Called once per InputEvent for the lifetime of the REPL session.\nThe isolate stays alive across calls \u2014 JS module-level variables are session state.\nOutput via console.log() and utils.section.emit()."
1548
+ }
1549
+ ],
1550
+ blockTags: [
1551
+ {
1552
+ tag: "@returns",
1553
+ content: [
1554
+ {
1555
+ kind: "text",
1556
+ text: "A ReplSignal to control the prompt or end the session, or void to continue."
1557
+ }
1558
+ ]
1559
+ }
1560
+ ]
1561
+ },
1562
+ parameters: [
1563
+ {
1564
+ id: 24,
1565
+ name: "input",
1566
+ variant: "param",
1567
+ kind: 32768,
1568
+ flags: {},
1569
+ comment: {
1570
+ summary: [
1571
+ {
1572
+ kind: "text",
1573
+ text: "The input event for this turn."
1574
+ }
1575
+ ]
1576
+ },
1577
+ type: {
1578
+ type: "reference",
1579
+ target: 30,
1580
+ name: "InputEvent",
1581
+ package: "@darkrymit/crunes-cli",
1582
+ qualifiedName: "lifecycle.InputEvent"
1583
+ }
1584
+ }
1585
+ ],
1586
+ type: {
1587
+ type: "union",
1588
+ types: [
1589
+ {
1590
+ type: "intrinsic",
1591
+ name: "string"
1592
+ },
1593
+ {
1594
+ type: "intrinsic",
1595
+ name: "void"
1596
+ },
1597
+ {
1598
+ type: "reference",
1599
+ target: 43,
1600
+ name: "ReplSignal",
1601
+ package: "@darkrymit/crunes-cli",
1602
+ qualifiedName: "lifecycle.ReplSignal"
1603
+ },
1604
+ {
1605
+ type: "reference",
1606
+ target: {
1607
+ packageName: "typescript",
1608
+ packagePath: "lib/lib.es5.d.ts",
1609
+ qualifiedName: "Promise"
1610
+ },
1611
+ typeArguments: [
1612
+ {
1613
+ type: "unknown",
1614
+ name: "string | void | ReplSignal"
1615
+ }
1616
+ ],
1617
+ name: "Promise",
1618
+ package: "typescript"
1619
+ }
1620
+ ]
1621
+ }
1622
+ }
1623
+ ]
1624
+ },
1625
+ {
1626
+ id: 13,
1627
+ name: "repl",
1628
+ variant: "declaration",
1629
+ kind: 64,
1630
+ flags: {},
1631
+ signatures: [
1632
+ {
1633
+ id: 14,
1634
+ name: "repl",
1635
+ variant: "signature",
1636
+ kind: 4096,
1637
+ flags: {},
1638
+ comment: {
1639
+ summary: [
1640
+ {
1641
+ kind: "text",
1642
+ text: 'REPL session initializer. Called once at session start before the first prompt.\nThe right place to open connections and set up module-level state.\nReturns the initial prompt string, or void for the default "> ".\nRequires a separate "repl" permission block in config.json \u2014 does not inherit from "run".'
1643
+ }
1644
+ ],
1645
+ blockTags: [
1646
+ {
1647
+ tag: "@returns",
1648
+ content: [
1649
+ {
1650
+ kind: "text",
1651
+ text: 'Initial prompt string, or void to use "> ".'
1652
+ }
1653
+ ]
1654
+ }
1655
+ ]
1656
+ },
1657
+ parameters: [
1658
+ {
1659
+ id: 15,
1660
+ name: "args",
1661
+ variant: "param",
1662
+ kind: 32768,
1663
+ flags: {},
1664
+ comment: {
1665
+ summary: [
1666
+ {
1667
+ kind: "text",
1668
+ text: "Parsed args from argsRepl() schema."
1669
+ }
1670
+ ]
1671
+ },
1672
+ type: {
1673
+ type: "reference",
1674
+ target: 85,
1675
+ name: "ParsedArgs",
1676
+ package: "@darkrymit/crunes-cli",
1677
+ qualifiedName: "lifecycle.ParsedArgs"
1678
+ }
1679
+ }
1680
+ ],
1681
+ type: {
1682
+ type: "union",
1683
+ types: [
1684
+ {
1685
+ type: "intrinsic",
1686
+ name: "string"
1687
+ },
1688
+ {
1689
+ type: "intrinsic",
1690
+ name: "void"
1691
+ },
1692
+ {
1693
+ type: "reference",
1694
+ target: {
1695
+ packageName: "typescript",
1696
+ packagePath: "lib/lib.es5.d.ts",
1697
+ qualifiedName: "Promise"
1698
+ },
1699
+ typeArguments: [
1700
+ {
1701
+ type: "union",
1702
+ types: [
1703
+ {
1704
+ type: "intrinsic",
1705
+ name: "string"
1706
+ },
1707
+ {
1708
+ type: "intrinsic",
1709
+ name: "void"
1710
+ }
1711
+ ]
1712
+ }
1713
+ ],
1714
+ name: "Promise",
1715
+ package: "typescript"
1716
+ }
1717
+ ]
1718
+ }
1719
+ }
1720
+ ]
1721
+ },
1722
+ {
1723
+ id: 5,
1724
+ name: "run",
1725
+ variant: "declaration",
1726
+ kind: 64,
1727
+ flags: {},
1728
+ signatures: [
1729
+ {
1730
+ id: 6,
1731
+ name: "run",
1732
+ variant: "signature",
1733
+ kind: 4096,
1734
+ flags: {},
1735
+ comment: {
1736
+ summary: [
1737
+ {
1738
+ kind: "text",
1739
+ text: "The main execution lifecycle function of the rune."
1740
+ }
1741
+ ],
1742
+ blockTags: [
1743
+ {
1744
+ tag: "@returns",
1745
+ content: [
1746
+ {
1747
+ kind: "text",
1748
+ text: "A single section, an array of sections, a plain string, or void."
1749
+ }
1750
+ ]
1751
+ }
1752
+ ]
1753
+ },
1754
+ parameters: [
1755
+ {
1756
+ id: 7,
1757
+ name: "args",
1758
+ variant: "param",
1759
+ kind: 32768,
1760
+ flags: {},
1761
+ comment: {
1762
+ summary: [
1763
+ {
1764
+ kind: "text",
1765
+ text: "Parsed yargs-parser arguments."
1766
+ }
1767
+ ]
1768
+ },
1769
+ type: {
1770
+ type: "reference",
1771
+ target: 85,
1772
+ name: "ParsedArgs",
1773
+ package: "@darkrymit/crunes-cli",
1774
+ qualifiedName: "lifecycle.ParsedArgs"
1775
+ }
1776
+ }
1777
+ ],
1778
+ type: {
1779
+ type: "union",
1780
+ types: [
1781
+ {
1782
+ type: "intrinsic",
1783
+ name: "string"
1784
+ },
1785
+ {
1786
+ type: "intrinsic",
1787
+ name: "void"
1788
+ },
1789
+ {
1790
+ type: "reference",
1791
+ target: {
1792
+ packageName: "@darkrymit/crunes-cli",
1793
+ packagePath: "src/rune/api/types-globals/globals.d.ts",
1794
+ qualifiedName: "globals.RuneSection"
1795
+ },
1796
+ name: "RuneSection",
1797
+ package: "@darkrymit/crunes-cli",
1798
+ qualifiedName: "globals.RuneSection"
1799
+ },
1800
+ {
1801
+ type: "array",
1802
+ elementType: {
1803
+ type: "reference",
1804
+ target: {
1805
+ packageName: "@darkrymit/crunes-cli",
1806
+ packagePath: "src/rune/api/types-globals/globals.d.ts",
1807
+ qualifiedName: "globals.RuneSection"
1808
+ },
1809
+ name: "RuneSection",
1810
+ package: "@darkrymit/crunes-cli",
1811
+ qualifiedName: "globals.RuneSection"
1812
+ }
1813
+ },
1814
+ {
1815
+ type: "reference",
1816
+ target: {
1817
+ packageName: "typescript",
1818
+ packagePath: "lib/lib.es5.d.ts",
1819
+ qualifiedName: "Promise"
1820
+ },
1821
+ typeArguments: [
1822
+ {
1823
+ type: "union",
1824
+ types: [
1825
+ {
1826
+ type: "intrinsic",
1827
+ name: "string"
1828
+ },
1829
+ {
1830
+ type: "intrinsic",
1831
+ name: "void"
1832
+ },
1833
+ {
1834
+ type: "reference",
1835
+ target: {
1836
+ packageName: "@darkrymit/crunes-cli",
1837
+ packagePath: "src/rune/api/types-globals/globals.d.ts",
1838
+ qualifiedName: "globals.RuneSection"
1839
+ },
1840
+ name: "RuneSection",
1841
+ package: "@darkrymit/crunes-cli",
1842
+ qualifiedName: "globals.RuneSection"
1843
+ },
1844
+ {
1845
+ type: "array",
1846
+ elementType: {
1847
+ type: "reference",
1848
+ target: {
1849
+ packageName: "@darkrymit/crunes-cli",
1850
+ packagePath: "src/rune/api/types-globals/globals.d.ts",
1851
+ qualifiedName: "globals.RuneSection"
1852
+ },
1853
+ name: "RuneSection",
1854
+ package: "@darkrymit/crunes-cli",
1855
+ qualifiedName: "globals.RuneSection"
1856
+ }
1857
+ }
1858
+ ]
1859
+ }
1860
+ ],
1861
+ name: "Promise",
1862
+ package: "typescript"
1863
+ }
1864
+ ]
1865
+ }
1866
+ }
1867
+ ]
1868
+ }
1869
+ ],
1870
+ groups: [
1871
+ {
1872
+ title: "Interfaces",
1873
+ children: [
1874
+ 61,
1875
+ 50,
1876
+ 85
1877
+ ]
1878
+ },
1879
+ {
1880
+ title: "Type Aliases",
1881
+ children: [
1882
+ 30,
1883
+ 43
1884
+ ]
1885
+ },
1886
+ {
1887
+ title: "Functions",
1888
+ children: [
1889
+ 2,
1890
+ 10,
1891
+ 16,
1892
+ 19,
1893
+ 25,
1894
+ 8,
1895
+ 28,
1896
+ 22,
1897
+ 13,
1898
+ 5
1899
+ ]
1900
+ }
1901
+ ]
1902
+ }
1903
+ ],
1904
+ groups: [
1905
+ {
1906
+ title: "Namespaces",
1907
+ children: [
1908
+ 1
1909
+ ]
1910
+ }
1911
+ ],
1912
+ packageName: "@darkrymit/crunes-cli",
1913
+ symbolIdMap: {
1914
+ "1": {
1915
+ packageName: "@darkrymit/crunes-cli",
1916
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1917
+ qualifiedName: "lifecycle"
1918
+ },
1919
+ "2": {
1920
+ packageName: "@darkrymit/crunes-cli",
1921
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1922
+ qualifiedName: "lifecycle.args"
1923
+ },
1924
+ "3": {
1925
+ packageName: "@darkrymit/crunes-cli",
1926
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1927
+ qualifiedName: "lifecycle.args"
1928
+ },
1929
+ "4": {
1930
+ packageName: "@darkrymit/crunes-cli",
1931
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1932
+ qualifiedName: "builder"
1933
+ },
1934
+ "5": {
1935
+ packageName: "@darkrymit/crunes-cli",
1936
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1937
+ qualifiedName: "lifecycle.run"
1938
+ },
1939
+ "6": {
1940
+ packageName: "@darkrymit/crunes-cli",
1941
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1942
+ qualifiedName: "lifecycle.run"
1943
+ },
1944
+ "7": {
1945
+ packageName: "@darkrymit/crunes-cli",
1946
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1947
+ qualifiedName: "args"
1948
+ },
1949
+ "8": {
1950
+ packageName: "@darkrymit/crunes-cli",
1951
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1952
+ qualifiedName: "lifecycle.dispose"
1953
+ },
1954
+ "9": {
1955
+ packageName: "@darkrymit/crunes-cli",
1956
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1957
+ qualifiedName: "lifecycle.dispose"
1958
+ },
1959
+ "10": {
1960
+ packageName: "@darkrymit/crunes-cli",
1961
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1962
+ qualifiedName: "lifecycle.argsRepl"
1963
+ },
1964
+ "11": {
1965
+ packageName: "@darkrymit/crunes-cli",
1966
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1967
+ qualifiedName: "lifecycle.argsRepl"
1968
+ },
1969
+ "12": {
1970
+ packageName: "@darkrymit/crunes-cli",
1971
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1972
+ qualifiedName: "builder"
1973
+ },
1974
+ "13": {
1975
+ packageName: "@darkrymit/crunes-cli",
1976
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1977
+ qualifiedName: "lifecycle.repl"
1978
+ },
1979
+ "14": {
1980
+ packageName: "@darkrymit/crunes-cli",
1981
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1982
+ qualifiedName: "lifecycle.repl"
1983
+ },
1984
+ "15": {
1985
+ packageName: "@darkrymit/crunes-cli",
1986
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1987
+ qualifiedName: "args"
1988
+ },
1989
+ "16": {
1990
+ packageName: "@darkrymit/crunes-cli",
1991
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1992
+ qualifiedName: "lifecycle.bannerRepl"
1993
+ },
1994
+ "17": {
1995
+ packageName: "@darkrymit/crunes-cli",
1996
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
1997
+ qualifiedName: "lifecycle.bannerRepl"
1998
+ },
1999
+ "18": {
2000
+ packageName: "@darkrymit/crunes-cli",
2001
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2002
+ qualifiedName: "args"
2003
+ },
2004
+ "19": {
2005
+ packageName: "@darkrymit/crunes-cli",
2006
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2007
+ qualifiedName: "lifecycle.commandsRepl"
2008
+ },
2009
+ "20": {
2010
+ packageName: "@darkrymit/crunes-cli",
2011
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2012
+ qualifiedName: "lifecycle.commandsRepl"
2013
+ },
2014
+ "21": {
2015
+ packageName: "@darkrymit/crunes-cli",
2016
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2017
+ qualifiedName: "builder"
2018
+ },
2019
+ "22": {
2020
+ packageName: "@darkrymit/crunes-cli",
2021
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2022
+ qualifiedName: "lifecycle.inputRepl"
2023
+ },
2024
+ "23": {
2025
+ packageName: "@darkrymit/crunes-cli",
2026
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2027
+ qualifiedName: "lifecycle.inputRepl"
2028
+ },
2029
+ "24": {
2030
+ packageName: "@darkrymit/crunes-cli",
2031
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2032
+ qualifiedName: "input"
2033
+ },
2034
+ "25": {
2035
+ packageName: "@darkrymit/crunes-cli",
2036
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2037
+ qualifiedName: "lifecycle.completeInputRepl"
2038
+ },
2039
+ "26": {
2040
+ packageName: "@darkrymit/crunes-cli",
2041
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2042
+ qualifiedName: "lifecycle.completeInputRepl"
2043
+ },
2044
+ "27": {
2045
+ packageName: "@darkrymit/crunes-cli",
2046
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2047
+ qualifiedName: "tokens"
2048
+ },
2049
+ "28": {
2050
+ packageName: "@darkrymit/crunes-cli",
2051
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2052
+ qualifiedName: "lifecycle.disposeRepl"
2053
+ },
2054
+ "29": {
2055
+ packageName: "@darkrymit/crunes-cli",
2056
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2057
+ qualifiedName: "lifecycle.disposeRepl"
2058
+ },
2059
+ "30": {
2060
+ packageName: "@darkrymit/crunes-cli",
2061
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2062
+ qualifiedName: "lifecycle.InputEvent"
2063
+ },
2064
+ "31": {
2065
+ packageName: "@darkrymit/crunes-cli",
2066
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2067
+ qualifiedName: "__type"
2068
+ },
2069
+ "32": {
2070
+ packageName: "@darkrymit/crunes-cli",
2071
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2072
+ qualifiedName: "__type.type"
2073
+ },
2074
+ "33": {
2075
+ packageName: "@darkrymit/crunes-cli",
2076
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2077
+ qualifiedName: "__type.text"
2078
+ },
2079
+ "34": {
2080
+ packageName: "@darkrymit/crunes-cli",
2081
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2082
+ qualifiedName: "__type"
2083
+ },
2084
+ "35": {
2085
+ packageName: "@darkrymit/crunes-cli",
2086
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2087
+ qualifiedName: "__type.type"
2088
+ },
2089
+ "36": {
2090
+ packageName: "@darkrymit/crunes-cli",
2091
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2092
+ qualifiedName: "__type.text"
2093
+ },
2094
+ "37": {
2095
+ packageName: "@darkrymit/crunes-cli",
2096
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2097
+ qualifiedName: "__type"
2098
+ },
2099
+ "38": {
2100
+ packageName: "@darkrymit/crunes-cli",
2101
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2102
+ qualifiedName: "__type.type"
2103
+ },
2104
+ "39": {
2105
+ packageName: "@darkrymit/crunes-cli",
2106
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2107
+ qualifiedName: "__type.text"
2108
+ },
2109
+ "40": {
2110
+ packageName: "@darkrymit/crunes-cli",
2111
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2112
+ qualifiedName: "__type"
2113
+ },
2114
+ "41": {
2115
+ packageName: "@darkrymit/crunes-cli",
2116
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2117
+ qualifiedName: "__type.type"
2118
+ },
2119
+ "42": {
2120
+ packageName: "@darkrymit/crunes-cli",
2121
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2122
+ qualifiedName: "__type.args"
2123
+ },
2124
+ "43": {
2125
+ packageName: "@darkrymit/crunes-cli",
2126
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2127
+ qualifiedName: "lifecycle.ReplSignal"
2128
+ },
2129
+ "44": {
2130
+ packageName: "@darkrymit/crunes-cli",
2131
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2132
+ qualifiedName: "__type"
2133
+ },
2134
+ "45": {
2135
+ packageName: "@darkrymit/crunes-cli",
2136
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2137
+ qualifiedName: "__type.type"
2138
+ },
2139
+ "46": {
2140
+ packageName: "@darkrymit/crunes-cli",
2141
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2142
+ qualifiedName: "__type.value"
2143
+ },
2144
+ "47": {
2145
+ packageName: "@darkrymit/crunes-cli",
2146
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2147
+ qualifiedName: "__type"
2148
+ },
2149
+ "48": {
2150
+ packageName: "@darkrymit/crunes-cli",
2151
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2152
+ qualifiedName: "__type.type"
2153
+ },
2154
+ "49": {
2155
+ packageName: "@darkrymit/crunes-cli",
2156
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2157
+ qualifiedName: "__type.message"
2158
+ },
2159
+ "50": {
2160
+ packageName: "@darkrymit/crunes-cli",
2161
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2162
+ qualifiedName: "lifecycle.CommandBuilder"
2163
+ },
2164
+ "51": {
2165
+ packageName: "@darkrymit/crunes-cli",
2166
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2167
+ qualifiedName: "lifecycle.CommandBuilder.command"
2168
+ },
2169
+ "52": {
2170
+ packageName: "@darkrymit/crunes-cli",
2171
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2172
+ qualifiedName: "lifecycle.CommandBuilder.command"
2173
+ },
2174
+ "53": {
2175
+ packageName: "@darkrymit/crunes-cli",
2176
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2177
+ qualifiedName: "name"
2178
+ },
2179
+ "54": {
2180
+ packageName: "@darkrymit/crunes-cli",
2181
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2182
+ qualifiedName: "description"
2183
+ },
2184
+ "55": {
2185
+ packageName: "@darkrymit/crunes-cli",
2186
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2187
+ qualifiedName: "callback"
2188
+ },
2189
+ "56": {
2190
+ packageName: "@darkrymit/crunes-cli",
2191
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2192
+ qualifiedName: "__type"
2193
+ },
2194
+ "57": {
2195
+ packageName: "@darkrymit/crunes-cli",
2196
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2197
+ qualifiedName: "__type"
2198
+ },
2199
+ "58": {
2200
+ packageName: "@darkrymit/crunes-cli",
2201
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2202
+ qualifiedName: "sub"
2203
+ },
2204
+ "59": {
2205
+ packageName: "@darkrymit/crunes-cli",
2206
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2207
+ qualifiedName: "lifecycle.CommandBuilder.build"
2208
+ },
2209
+ "60": {
2210
+ packageName: "@darkrymit/crunes-cli",
2211
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2212
+ qualifiedName: "lifecycle.CommandBuilder.build"
2213
+ },
2214
+ "61": {
2215
+ packageName: "@darkrymit/crunes-cli",
2216
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2217
+ qualifiedName: "lifecycle.ArgBuilder"
2218
+ },
2219
+ "62": {
2220
+ packageName: "@darkrymit/crunes-cli",
2221
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2222
+ qualifiedName: "lifecycle.ArgBuilder.option"
2223
+ },
2224
+ "63": {
2225
+ packageName: "@darkrymit/crunes-cli",
2226
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2227
+ qualifiedName: "lifecycle.ArgBuilder.option"
2228
+ },
2229
+ "64": {
2230
+ packageName: "@darkrymit/crunes-cli",
2231
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2232
+ qualifiedName: "flags"
2233
+ },
2234
+ "65": {
2235
+ packageName: "@darkrymit/crunes-cli",
2236
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2237
+ qualifiedName: "description"
2238
+ },
2239
+ "66": {
2240
+ packageName: "@darkrymit/crunes-cli",
2241
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2242
+ qualifiedName: "defaultValue"
2243
+ },
2244
+ "67": {
2245
+ packageName: "@darkrymit/crunes-cli",
2246
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2247
+ qualifiedName: "lifecycle.ArgBuilder.positional"
2248
+ },
2249
+ "68": {
2250
+ packageName: "@darkrymit/crunes-cli",
2251
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2252
+ qualifiedName: "lifecycle.ArgBuilder.positional"
2253
+ },
2254
+ "69": {
2255
+ packageName: "@darkrymit/crunes-cli",
2256
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2257
+ qualifiedName: "spec"
2258
+ },
2259
+ "70": {
2260
+ packageName: "@darkrymit/crunes-cli",
2261
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2262
+ qualifiedName: "description"
2263
+ },
2264
+ "71": {
2265
+ packageName: "@darkrymit/crunes-cli",
2266
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2267
+ qualifiedName: "lifecycle.ArgBuilder.example"
2268
+ },
2269
+ "72": {
2270
+ packageName: "@darkrymit/crunes-cli",
2271
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2272
+ qualifiedName: "lifecycle.ArgBuilder.example"
2273
+ },
2274
+ "73": {
2275
+ packageName: "@darkrymit/crunes-cli",
2276
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2277
+ qualifiedName: "usage"
2278
+ },
2279
+ "74": {
2280
+ packageName: "@darkrymit/crunes-cli",
2281
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2282
+ qualifiedName: "description"
2283
+ },
2284
+ "75": {
2285
+ packageName: "@darkrymit/crunes-cli",
2286
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2287
+ qualifiedName: "lifecycle.ArgBuilder.command"
2288
+ },
2289
+ "76": {
2290
+ packageName: "@darkrymit/crunes-cli",
2291
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2292
+ qualifiedName: "lifecycle.ArgBuilder.command"
2293
+ },
2294
+ "77": {
2295
+ packageName: "@darkrymit/crunes-cli",
2296
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2297
+ qualifiedName: "name"
2298
+ },
2299
+ "78": {
2300
+ packageName: "@darkrymit/crunes-cli",
2301
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2302
+ qualifiedName: "description"
2303
+ },
2304
+ "79": {
2305
+ packageName: "@darkrymit/crunes-cli",
2306
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2307
+ qualifiedName: "callback"
2308
+ },
2309
+ "80": {
2310
+ packageName: "@darkrymit/crunes-cli",
2311
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2312
+ qualifiedName: "__type"
2313
+ },
2314
+ "81": {
2315
+ packageName: "@darkrymit/crunes-cli",
2316
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2317
+ qualifiedName: "__type"
2318
+ },
2319
+ "82": {
2320
+ packageName: "@darkrymit/crunes-cli",
2321
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2322
+ qualifiedName: "sub"
2323
+ },
2324
+ "83": {
2325
+ packageName: "@darkrymit/crunes-cli",
2326
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2327
+ qualifiedName: "lifecycle.ArgBuilder.build"
2328
+ },
2329
+ "84": {
2330
+ packageName: "@darkrymit/crunes-cli",
2331
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2332
+ qualifiedName: "lifecycle.ArgBuilder.build"
2333
+ },
2334
+ "85": {
2335
+ packageName: "@darkrymit/crunes-cli",
2336
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2337
+ qualifiedName: "lifecycle.ParsedArgs"
2338
+ },
2339
+ "86": {
2340
+ packageName: "@darkrymit/crunes-cli",
2341
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2342
+ qualifiedName: "lifecycle.ParsedArgs._"
2343
+ },
2344
+ "87": {
2345
+ packageName: "@darkrymit/crunes-cli",
2346
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2347
+ qualifiedName: "lifecycle.ParsedArgs.$rest"
2348
+ },
2349
+ "88": {
2350
+ packageName: "@darkrymit/crunes-cli",
2351
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2352
+ qualifiedName: "lifecycle.ParsedArgs.$raw"
2353
+ },
2354
+ "89": {
2355
+ packageName: "@darkrymit/crunes-cli",
2356
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2357
+ qualifiedName: "lifecycle.ParsedArgs.$command"
2358
+ },
2359
+ "90": {
2360
+ packageName: "@darkrymit/crunes-cli",
2361
+ packagePath: "src/rune/api/types-lifecycle/lifecycle.d.ts",
2362
+ qualifiedName: "lifecycle.ParsedArgs.$commands"
2363
+ }
2364
+ },
2365
+ files: {
2366
+ entries: {
2367
+ "1": "src/rune/api/types-lifecycle/lifecycle.d.ts"
2368
+ },
2369
+ reflections: {
2370
+ "1": 0
2371
+ }
2372
+ }
2373
+ };
2374
+
2375
+ // src/docs/intro-compiler.js
2376
+ var NAMESPACE_RECIPES = {
2377
+ fs: `\`\`\`javascript
2378
+ import { fs, section } from '@utils'
2379
+
2380
+ export async function run() {
2381
+ // Read and write files relative to the project root
2382
+ const content = await fs.read('src/components/Button.jsx');
2383
+ await fs.write('dist/output.txt', 'Hello Sandbox!');
2384
+ return [
2385
+ section.create('fs-result', {
2386
+ type: 'markdown',
2387
+ content: 'File written successfully!'
2388
+ })
2389
+ ];
2390
+ }
2391
+ \`\`\``,
2392
+ ws: `\`\`\`javascript
2393
+ import { http, ws, time, section } from '@utils'
2394
+
2395
+ export async function run() {
2396
+ // --- Client usage ---
2397
+ const socket = ws.client('ws://localhost:8080')
2398
+ const messages = []
2399
+ socket.on('message', (msg) => { messages.push(msg) })
2400
+ await socket.open()
2401
+ await socket.sendText(JSON.stringify({ type: 'PING' }))
2402
+ await time.after(500)
2403
+ await socket.close()
2404
+
2405
+ // --- Server usage (piggyback on http.server) ---
2406
+ const srv = http.server(0) // OS-assigned port, loopback only
2407
+ srv.on('request', (req) => new Response('ok'))
2408
+
2409
+ const jobs = ws.server(srv, { path: '/jobs' }) // path routing
2410
+ const logs = ws.server(srv, { path: '/logs/:jobId' }) // named path param
2411
+
2412
+ jobs.on('connection', (conn) => {
2413
+ conn.on('message', (msg) => conn.sendText(\`echo: \${msg}\`))
2414
+ })
2415
+
2416
+ logs.on('connection', (conn) => {
2417
+ const jobId = conn.pathParams.get('jobId') // named param extraction
2418
+ conn.sendText(\`streaming logs for job \${jobId}\`)
2419
+ conn.on('close', () => {})
2420
+ })
2421
+
2422
+ await srv.open()
2423
+ await jobs.open()
2424
+ await logs.open()
2425
+ await time.after(5_000)
2426
+ await logs.close()
2427
+ await jobs.close()
2428
+ await srv.close()
2429
+
2430
+ return [section.create('ws-result', { type: 'markdown', content: messages.join('\\n') })]
2431
+ }
2432
+ \`\`\``,
2433
+ sqlite: `\`\`\`javascript
2434
+ import { sqlite, crypto, section } from '@utils'
2435
+
2436
+ export async function run() {
2437
+ // Scoped SQLite operations
2438
+ const db = await sqlite.open('@local-sqlite', 'my-database');
2439
+ await db.exec('CREATE TABLE IF NOT EXISTS logs (id TEXT PRIMARY KEY, msg TEXT)');
2440
+ await db.exec('INSERT INTO logs VALUES (?, ?)', [crypto.uuid(), 'Rune executed!']);
2441
+ const rows = await db.query('SELECT * FROM logs');
2442
+ await db.close();
2443
+
2444
+ return [
2445
+ section.create('db-logs', {
2446
+ type: 'markdown',
2447
+ content: rows.map(r => \`- [\${r.id}]: \${r.msg}\`).join('\\n')
2448
+ })
2449
+ ];
2450
+ }
2451
+ \`\`\``,
2452
+ http: `\`\`\`javascript
2453
+ import { http, section } from '@utils'
2454
+
2455
+ export async function run() {
2456
+ // --- Client: fetch ---
2457
+ const res = await http.fetch('https://api.github.com/repos/darkrymit/crunes')
2458
+ const repo = await res.json()
2459
+
2460
+ // --- Server: loopback HTTP + WebSocket piggyback ---
2461
+ const srv = http.server(0) // loopback, OS-assigned port \u2014 no permission needed
2462
+ srv.on('request', (req) => {
2463
+ if (req.method === 'GET' && req.pathname === '/health')
2464
+ return new Response(JSON.stringify({ ok: true }), { headers: { 'content-type': 'application/json' } })
2465
+ return new Response('Not Found', { status: 404 })
2466
+ })
2467
+ await srv.open()
2468
+ // use srv.port here ...
2469
+ await srv.close()
2470
+
2471
+ return [
2472
+ section.create('result', {
2473
+ type: 'markdown',
2474
+ content: \`**Repo**: \${repo.description}\\n**Server port was**: \${srv.port}\`
2475
+ })
2476
+ ]
2477
+ }
2478
+ \`\`\``,
2479
+ cache: `\`\`\`javascript
2480
+ import { cache, section } from '@utils'
2481
+
2482
+ export async function run() {
2483
+ const projectCache = await cache.open('@local-cache');
2484
+ await projectCache.set('last-run', Date.now(), 60); // 60s TTL
2485
+ const lastRun = await projectCache.get('last-run');
2486
+ return [
2487
+ section.create('cache-result', {
2488
+ type: 'markdown',
2489
+ content: \`Last run timestamp: \${lastRun}\`
2490
+ })
2491
+ ];
2492
+ }
2493
+ \`\`\``,
2494
+ shell: `\`\`\`javascript
2495
+ import { shell, section } from '@utils'
2496
+
2497
+ export async function run() {
2498
+ // Run command relative to the project directory
2499
+ const stdout = await shell.exec('git status --short');
2500
+ return [
2501
+ section.create('git-status', {
2502
+ type: 'markdown',
2503
+ content: \`\\\`\\\`\\\`\\n\${stdout}\\n\\\`\\\`\\\`\`
2504
+ })
2505
+ ];
2506
+ }
2507
+ \`\`\``
2508
+ };
2509
+ async function compileIntro() {
2510
+ const namespaces = walk(utils_api_default);
2511
+ const lines = [];
2512
+ lines.push("# Crunes: Fast Sandboxed Scripting & Context Framework");
2513
+ lines.push("");
2514
+ lines.push("Crunes is designed as a way to rapidly draft useful scripts inside a project workspace, primarily utilized by AI coding agents to perform repeatable complex tasks such as context ingestion, application interaction, orchestration, and sandboxed file/command execution.");
2515
+ lines.push("");
2516
+ lines.push("## 1. Anatomy of a Rune");
2517
+ lines.push("");
2518
+ lines.push("Crunes execute inside an isolated sandbox (`isolated-vm`). Runes are ESM modules with two primary execution modes: **run** (one-shot) and **repl** (interactive session).");
2519
+ lines.push("");
2520
+ lines.push("**Run mode** \u2014 export `args` to declare a schema and `run` to execute:");
2521
+ lines.push("");
2522
+ lines.push("```javascript");
2523
+ lines.push("export function args(builder) {");
2524
+ lines.push(" return builder");
2525
+ lines.push(" .option('--verbose', 'Verbose output', false)");
2526
+ lines.push(" .command('remote', 'Manage git remotes', remote => {");
2527
+ lines.push(" remote.command('add', 'Add a remote', add => {");
2528
+ lines.push(" add.positional('<name>', 'Remote name')");
2529
+ lines.push(" .positional('<url>', 'Remote URL')");
2530
+ lines.push(" })");
2531
+ lines.push(" })");
2532
+ lines.push("}");
2533
+ lines.push("");
2534
+ lines.push("export async function run(args) {");
2535
+ lines.push(" if (args.$command === 'remote add') {");
2536
+ lines.push(" return `Adding remote ${args.name} at ${args.url}`");
2537
+ lines.push(" }");
2538
+ lines.push("}");
2539
+ lines.push("```");
2540
+ lines.push("");
2541
+ lines.push("**repl mode** \u2014 export `repl` + `inputRepl` for an interactive session. The isolate stays alive across inputs; use module-level variables as session state:");
2542
+ lines.push("");
2543
+ lines.push("```javascript");
2544
+ lines.push("import { section, md } from '@utils'");
2545
+ lines.push("");
2546
+ lines.push("let count = 0");
2547
+ lines.push("");
2548
+ lines.push("export async function repl() { return 'counter> ' }");
2549
+ lines.push("");
2550
+ lines.push("export async function inputRepl(input) {");
2551
+ lines.push(" if (input.type === 'eof') return { type: 'done' }");
2552
+ lines.push(" if (input.type === 'line' && input.text === 'inc')");
2553
+ lines.push(" section.emit(section.create('result', { type: 'markdown', content: md.p(`count: ${++count}`) }))");
2554
+ lines.push("}");
2555
+ lines.push("```");
2556
+ lines.push("");
2557
+ lines.push("### Import System");
2558
+ lines.push("");
2559
+ lines.push("- **`from '@utils'`** \u2014 The standard utility namespace. Always available.");
2560
+ lines.push("- **`from './relative'`** \u2014 Relative imports. Always available. Resolves relative to the current rune file.");
2561
+ lines.push("- **`from '@project/path'`** \u2014 Import from the project root. Requires `fs.read:<path>` permission.");
2562
+ lines.push("- **`from '@plugin/path'`** \u2014 Plugin runes only. Resolves from the plugin's own root directory.");
2563
+ lines.push("- **`from 'node:fs'` / `node:path` / etc.** \u2014 Always blocked. Use the `@utils` equivalents instead.");
2564
+ lines.push("");
2565
+ lines.push("## 2. CLI Calling & Argument Conventions");
2566
+ lines.push("");
2567
+ lines.push("Crunes enforces a strict 3-tier boundary when executing runes via the CLI. Misplacing flags will cause the parser to fail or misinterpret the arguments.");
2568
+ lines.push("");
2569
+ lines.push("### The Strict 3-Tier Parsing Boundary");
2570
+ lines.push("All command invocations must follow this structural order exactly:");
2571
+ lines.push("1. **Global Flags**: Options parsed by the core process (e.g. `--cwd <path>`, `-p` for plain output, `--verbose`).");
2572
+ lines.push("2. **Command Flags**: Options parsed by the `run` command (e.g. `-b` / `--batch`, `--fail-fast`, `--format json`).");
2573
+ lines.push("3. **Rune Arguments**: Config and positional values passed directly to the execution sandbox.");
2574
+ lines.push("");
2575
+ lines.push("```bash");
2576
+ lines.push("# Correct Flag Placement");
2577
+ lines.push('crunes --cwd ./project -p run --format json greeting "Alice"');
2578
+ lines.push("```");
2579
+ lines.push("");
2580
+ lines.push("> [!WARNING]");
2581
+ lines.push("> Placing a global flag after `run` (e.g. `crunes run --cwd ./project`) causes an instant error.");
2582
+ lines.push("");
2583
+ lines.push("### Bracket Syntax (Segment-Level Flags)");
2584
+ lines.push("Section filters are embedded directly in the rune key using bracket syntax: `key[-s section]`. This is the only supported way to filter sections \u2014 placing `-s` before or after the key does not work.");
2585
+ lines.push("");
2586
+ lines.push("```bash");
2587
+ lines.push("# CORRECT: section filter in brackets, rune args follow after the key token");
2588
+ lines.push("crunes run api[-s endpoints] v2");
2589
+ lines.push("");
2590
+ lines.push("# INCORRECT: -s before the key is rejected as a misplaced flag");
2591
+ lines.push("crunes run -s endpoints api v2");
2592
+ lines.push("");
2593
+ lines.push("# INCORRECT: -s after the key is passed as a raw rune arg, not a section filter");
2594
+ lines.push("crunes run api v2 --section endpoints");
2595
+ lines.push("```");
2596
+ lines.push("");
2597
+ lines.push("Bracket content is whitespace-tokenized and parsed for segment flags only. Rune arguments still go after the full `key[...]` token as usual.");
2598
+ lines.push("");
2599
+ lines.push("### Custom Commands & Nested Parameters Mapping");
2600
+ lines.push("Runes can recursively nest commands using `.command()` on the builder. Inside `run(args)`, Crunes automatically exposes:");
2601
+ lines.push('- **`args.$command`**: The space-separated matched command path string (e.g. `"remote add"`).');
2602
+ lines.push('- **`args.$commands`**: The matched command path levels array (e.g. `["remote", "add"]`).');
2603
+ lines.push("- **`args._`**: Data positionals only \u2014 command tokens are stripped, so `args._[0]` is always the first user-supplied value after the matched command.");
2604
+ lines.push("- **Named Positionals**: Parameters like `<name>` or `[scope]` are automatically mapped to `args.name` or `args.scope`.");
2605
+ lines.push("");
2606
+ lines.push("### Batched Executions");
2607
+ lines.push("Multiple runes can be run sequentially in one invocation using the `+` operator (requires the `-b` / `--batch` command flag). Bracket syntax is especially useful in batch mode \u2014 each segment carries its own filters:");
2608
+ lines.push("```bash");
2609
+ lines.push("# Each segment has its own section filter via brackets");
2610
+ lines.push('crunes run -b api[-s endpoints] + greeting[-s summary] "World"');
2611
+ lines.push("```");
2612
+ lines.push("");
2613
+ lines.push("## 3. Configuration Reference");
2614
+ lines.push("");
2615
+ lines.push("Configuration properties in `.crunes/config.json` control permissions, default variables, mappings, and plugin registration.");
2616
+ lines.push("");
2617
+ lines.push("### Sandbox Security & Permissions");
2618
+ lines.push("Runes do not have direct access to Node.js APIs. They declare specific lifecycle-scoped permission scopes in `.crunes/config.json`:");
2619
+ lines.push("```json");
2620
+ lines.push("{");
2621
+ lines.push(' "runes": {');
2622
+ lines.push(' "my-rune": {');
2623
+ lines.push(' "name": "My Rune",');
2624
+ lines.push(' "description": "Does something useful",');
2625
+ lines.push(' "path": ".crunes/runes/my-rune.js",');
2626
+ lines.push(' "vars": { "api_url": "https://example.com" }');
2627
+ lines.push(" }");
2628
+ lines.push(" },");
2629
+ lines.push(' "permissions": {');
2630
+ lines.push(' "my-rune": {');
2631
+ lines.push(' "run": { "allow": ["fs.read:src/**", "fs.write:dist/**", "shell.run:git *"] }');
2632
+ lines.push(" }");
2633
+ lines.push(" }");
2634
+ lines.push("}");
2635
+ lines.push("```");
2636
+ lines.push("");
2637
+ lines.push("For runes that use both `run` and `repl`, declare both permission namespaces separately \u2014 `repl` does not inherit from `run`:");
2638
+ lines.push("```json");
2639
+ lines.push("{");
2640
+ lines.push(' "runes": {');
2641
+ lines.push(' "my-shell": {');
2642
+ lines.push(' "permissions": {');
2643
+ lines.push(' "run": { "allow": ["sqlite.read:./state::db"] },');
2644
+ lines.push(' "repl": { "allow": ["sqlite.read:./state::db", "sqlite.write:./state::db"] }');
2645
+ lines.push(" }");
2646
+ lines.push(" }");
2647
+ lines.push(" }");
2648
+ lines.push("}");
2649
+ lines.push("```");
2650
+ lines.push("");
2651
+ lines.push("### Config File Fields Reference");
2652
+ lines.push("- **`permissions`**: Mappings of permission templates scoped to specific runes.");
2653
+ lines.push("- **`runes`**: Definition of project-registered runes, containing local filesystem paths, pre-declared vars, and metadata.");
2654
+ lines.push("- **`vars`**: Key-value settings scoped to specific runes (accessible inside the isolate via `utils.vars.read(key)`).");
2655
+ lines.push("- **`plugins`**: Mappings of enabled third-party marketplaces or plugins.");
2656
+ lines.push("");
2657
+ lines.push("## 4. Rune Exports API Reference");
2658
+ lines.push("");
2659
+ lines.push("The sandboxed execution environment parses entrypoint exports to build schemas and run modules safely. Their dynamic type specification is detailed below:");
2660
+ lines.push("");
2661
+ const [lifecycleNs] = walk(lifecycle_api_default);
2662
+ lines.push(formatMembers(lifecycleNs?.members ?? [], { indent: "" }));
2663
+ lines.push('> **REPL Lifecycle:** Six exports form the interactive lifecycle \u2014 `argsRepl`, `repl`, `bannerRepl`, `commandsRepl`, `inputRepl`, `completeInputRepl`. The isolate stays alive across inputs \u2014 use JS module-level variables as session state. `repl` requires its own `"repl"` permission block in `config.json`; it does not inherit from `"run"`. See `crunes docs repl`, `crunes docs input-repl`, and related commands for the full reference.');
2664
+ lines.push("");
2665
+ lines.push("## 5. Global Sandbox APIs");
2666
+ lines.push("");
2667
+ const [globalsNs] = walk(globals_api_default);
2668
+ lines.push(formatMembers(globalsNs?.members ?? [], { indent: "" }));
2669
+ lines.push("");
2670
+ lines.push("## 6. Dynamic `@utils` Reference");
2671
+ lines.push("");
2672
+ lines.push("The following utility namespaces are available to runes in the execution isolate:");
2673
+ lines.push("");
2674
+ for (const ns of namespaces) {
2675
+ lines.push(`### \`${ns.name}\``);
2676
+ lines.push("");
2677
+ if (ns.description) {
2678
+ lines.push(ns.description);
2679
+ lines.push("");
2680
+ }
2681
+ if (NAMESPACE_RECIPES[ns.name]) {
2682
+ lines.push("**Usage Example:**");
2683
+ lines.push(NAMESPACE_RECIPES[ns.name]);
2684
+ lines.push("");
2685
+ }
2686
+ lines.push(formatNode(ns));
2687
+ lines.push("");
2688
+ lines.push("---");
2689
+ lines.push("");
2690
+ }
2691
+ return lines.join("\n");
2692
+ }
2693
+
2694
+ // src/docs/commands/intro.js
2695
+ async function handler({ global, out, format = "text", projectRoot = process.cwd(), configRoot = projectRoot }) {
2696
+ let config = null;
2697
+ let loadError = null;
2698
+ if (!global) {
2699
+ try {
2700
+ config = loadConfig(configRoot);
2701
+ } catch (err) {
2702
+ loadError = err.message;
2703
+ }
2704
+ }
2705
+ try {
2706
+ const content = await compileIntro({
2707
+ config,
2708
+ format,
2709
+ projectRoot,
2710
+ configRoot,
2711
+ hasProjectError: loadError
2712
+ });
2713
+ if (out) {
2714
+ const targetPath = resolve(process.cwd(), out);
2715
+ writeFileSync(targetPath, content, "utf8");
2716
+ output.info(`Successfully wrote Crunes intro to ${targetPath}`);
2717
+ } else {
2718
+ process.stdout.write(content + "\n");
2719
+ }
2720
+ } catch (err) {
2721
+ output.error(`Failed to compile Crunes intro: ${err.message}`);
2722
+ process.exit(1);
2723
+ }
2724
+ }
2725
+ export {
2726
+ handler
2727
+ };