@wirecat/cli-template 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/.github/dependabot.yml +23 -0
  2. package/.github/workflows/changelog-guard.yml +12 -0
  3. package/.github/workflows/ci.yml +88 -0
  4. package/.github/workflows/main.yml +17 -0
  5. package/.github/workflows/monthly.yml +28 -0
  6. package/.github/workflows/pr.yml +19 -0
  7. package/.github/workflows/release.yml +191 -0
  8. package/.github/workflows/standards.yml +51 -0
  9. package/.gitignore +42 -0
  10. package/.gitleaks.toml +5 -0
  11. package/.markdownlint-cli2.jsonc +7 -0
  12. package/.vale.ini +5 -0
  13. package/AGENTS.md +27 -0
  14. package/CHANGELOG.md +19 -0
  15. package/CLAUDE.md +17 -0
  16. package/LICENSE +204 -0
  17. package/README.md +52 -2
  18. package/SECURITY.md +15 -0
  19. package/bin/release +139 -0
  20. package/biome.json +6 -0
  21. package/config/wirecat/LICENSE +204 -0
  22. package/config/wirecat/biome.base.json +140 -0
  23. package/config/wirecat/check.mjs +41 -0
  24. package/config/wirecat/cspell.json +80 -0
  25. package/config/wirecat/lefthook.yml +26 -0
  26. package/config/wirecat/manifest.json +34 -0
  27. package/config/wirecat/markdownlint.json +10 -0
  28. package/config/wirecat/no-deep-wirecat-import.grit +15 -0
  29. package/config/wirecat/no-exec-interpolation.grit +17 -0
  30. package/config/wirecat/no-new-function.grit +8 -0
  31. package/config/wirecat/no-shell-true.grit +8 -0
  32. package/config/wirecat/no-unbounded-spread.grit +10 -0
  33. package/config/wirecat/release-lock-info.mjs +71 -0
  34. package/config/wirecat/release-lock.sh +34 -0
  35. package/config/wirecat/rumdl.toml +9 -0
  36. package/contracts/help.snap +16 -0
  37. package/contracts/mcp-tools.json +922 -0
  38. package/contracts/no-leak.json +3 -0
  39. package/contracts/plan.json +50 -0
  40. package/cspell.json +10 -0
  41. package/dist/bin/app.d.ts +3 -0
  42. package/dist/bin/app.d.ts.map +1 -0
  43. package/dist/bin/app.js +14 -0
  44. package/dist/bin/app.js.map +1 -0
  45. package/dist/commands/doctor.d.ts +23 -0
  46. package/dist/commands/doctor.d.ts.map +1 -0
  47. package/dist/commands/doctor.js +44 -0
  48. package/dist/commands/doctor.js.map +1 -0
  49. package/dist/commands/mcp.d.ts +3 -0
  50. package/dist/commands/mcp.d.ts.map +1 -0
  51. package/dist/commands/mcp.js +36 -0
  52. package/dist/commands/mcp.js.map +1 -0
  53. package/dist/config.d.ts +3 -0
  54. package/dist/config.d.ts.map +1 -0
  55. package/dist/config.js +4 -0
  56. package/dist/config.js.map +1 -0
  57. package/dist/identity.d.ts +5 -0
  58. package/dist/identity.d.ts.map +1 -0
  59. package/dist/identity.js +12 -0
  60. package/dist/identity.js.map +1 -0
  61. package/dist/index.d.ts +3 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +3 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/mcp.d.ts +19 -0
  66. package/dist/mcp.d.ts.map +1 -0
  67. package/dist/mcp.js +62 -0
  68. package/dist/mcp.js.map +1 -0
  69. package/dist/program.d.ts +6 -0
  70. package/dist/program.d.ts.map +1 -0
  71. package/dist/program.js +37 -0
  72. package/dist/program.js.map +1 -0
  73. package/dist/version.d.ts +2 -0
  74. package/dist/version.d.ts.map +1 -0
  75. package/dist/version.js +2 -0
  76. package/dist/version.js.map +1 -0
  77. package/docs/commands.md +227 -0
  78. package/docs/configuration.md +18 -0
  79. package/docs/dev/DESIGN.md +13 -0
  80. package/docs/dev/TESTING.md +16 -0
  81. package/docs/dev/design-questions.md +24 -0
  82. package/docs/dev/reference-clis.md +15 -0
  83. package/docs/dev/skills/design-interview/SKILL.md +34 -0
  84. package/docs/dev/skills/release/SKILL.md +24 -0
  85. package/docs/dev/test-matrix.md +52 -0
  86. package/docs/index.md +7 -0
  87. package/docs/installation.md +17 -0
  88. package/docs/meta.json +18 -0
  89. package/docs/security.md +8 -0
  90. package/docs/troubleshooting.md +14 -0
  91. package/docs/usage.md +31 -0
  92. package/kit/README.md +123 -0
  93. package/kit/dist/interview.js +170 -0
  94. package/kit/dist/main.js +70 -0
  95. package/kit/dist/manifest.js +111 -0
  96. package/kit/dist/new.js +249 -0
  97. package/kit/dist/rename.js +35 -0
  98. package/kit/dist/source.js +74 -0
  99. package/kit/dist/upgrade.js +223 -0
  100. package/kit/tsconfig.json +17 -0
  101. package/kit/tsconfig.test.json +5 -0
  102. package/lefthook.yml +2 -0
  103. package/lint/baseline/.gitkeep +0 -0
  104. package/lint/overrides.json +1 -0
  105. package/package.json +105 -4
  106. package/pnpm-workspace.yaml +6 -0
  107. package/scripts/audit.sh +22 -0
  108. package/scripts/command-program.ts +1 -0
  109. package/scripts/commands.ts +39 -0
  110. package/scripts/smoke.ts +56 -0
  111. package/scripts/test-matrix-untested.ts +12 -0
  112. package/skills/app-cli/SKILL.md +21 -0
  113. package/src/bin/app.ts +13 -0
  114. package/src/commands/doctor.ts +45 -0
  115. package/src/commands/mcp.ts +38 -0
  116. package/src/config.ts +4 -0
  117. package/src/identity.ts +15 -0
  118. package/src/index.ts +2 -0
  119. package/src/mcp.test.ts +84 -0
  120. package/src/mcp.ts +82 -0
  121. package/src/program.test.ts +66 -0
  122. package/src/program.ts +53 -0
  123. package/src/roots.test.ts +80 -0
  124. package/src/testing/argv-log.ts +1 -0
  125. package/src/testing/sandbox.ts +25 -0
  126. package/src/version.ts +1 -0
  127. package/template.json +40 -0
  128. package/tsconfig.json +9 -0
  129. package/tsconfig.scripts.json +1 -0
  130. package/tsconfig.test.json +1 -0
  131. package/vitest.config.ts +19 -0
@@ -0,0 +1,922 @@
1
+ [
2
+ {
3
+ "annotations": {
4
+ "destructiveHint": false,
5
+ "openWorldHint": true,
6
+ "readOnlyHint": true
7
+ },
8
+ "inputSchema": {
9
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "arguments": {
13
+ "additionalProperties": {},
14
+ "description": "that command's arguments",
15
+ "propertyNames": {
16
+ "type": "string"
17
+ },
18
+ "type": "object"
19
+ },
20
+ "command": {
21
+ "description": "a command app_tools_search returned: \"messages list\"",
22
+ "minLength": 1,
23
+ "type": "string"
24
+ }
25
+ },
26
+ "required": ["command"],
27
+ "type": "object"
28
+ },
29
+ "name": "app_read",
30
+ "outputSchema": {
31
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
32
+ "anyOf": [
33
+ {
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "items": {
37
+ "items": {},
38
+ "type": "array"
39
+ },
40
+ "meta": {
41
+ "additionalProperties": false,
42
+ "properties": {
43
+ "accounts": {
44
+ "items": {
45
+ "pattern": "\\S",
46
+ "type": "string"
47
+ },
48
+ "type": "array"
49
+ },
50
+ "complete": {
51
+ "type": "boolean"
52
+ },
53
+ "duration_ms": {
54
+ "minimum": 0,
55
+ "type": "integer"
56
+ },
57
+ "issues": {
58
+ "items": {
59
+ "additionalProperties": false,
60
+ "properties": {
61
+ "code": {
62
+ "enum": [
63
+ "validation_error",
64
+ "configuration_error",
65
+ "authentication_error",
66
+ "permission_error",
67
+ "not_found",
68
+ "confirmation_required",
69
+ "rate_limited",
70
+ "timeout",
71
+ "network_error",
72
+ "provider_error",
73
+ "provider_unavailable",
74
+ "invalid_response",
75
+ "outcome_unknown",
76
+ "cancelled"
77
+ ],
78
+ "type": "string"
79
+ },
80
+ "reason": {
81
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
82
+ "type": "string"
83
+ },
84
+ "source": {
85
+ "pattern": "\\S",
86
+ "type": "string"
87
+ }
88
+ },
89
+ "required": ["code", "source"],
90
+ "type": "object"
91
+ },
92
+ "type": "array"
93
+ },
94
+ "run_id": {
95
+ "pattern": "\\S",
96
+ "type": "string"
97
+ },
98
+ "timezone": {
99
+ "pattern": "\\S",
100
+ "type": "string"
101
+ },
102
+ "truncated": {
103
+ "type": "boolean"
104
+ },
105
+ "window": {
106
+ "additionalProperties": false,
107
+ "properties": {
108
+ "since": {
109
+ "format": "date-time",
110
+ "pattern": "Z$",
111
+ "type": "string"
112
+ },
113
+ "until": {
114
+ "format": "date-time",
115
+ "pattern": "Z$",
116
+ "type": "string"
117
+ }
118
+ },
119
+ "required": [],
120
+ "type": "object"
121
+ }
122
+ },
123
+ "required": ["run_id", "duration_ms", "complete"],
124
+ "type": "object"
125
+ },
126
+ "missing": {
127
+ "items": {
128
+ "additionalProperties": false,
129
+ "properties": {
130
+ "field": {
131
+ "pattern": "\\S",
132
+ "type": "string"
133
+ },
134
+ "step": {
135
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
136
+ "type": "string"
137
+ },
138
+ "why": {
139
+ "pattern": "\\S",
140
+ "type": "string"
141
+ }
142
+ },
143
+ "required": ["field", "why"],
144
+ "type": "object"
145
+ },
146
+ "type": "array"
147
+ },
148
+ "next": {
149
+ "items": {
150
+ "oneOf": [
151
+ {
152
+ "additionalProperties": false,
153
+ "properties": {
154
+ "args": {
155
+ "additionalProperties": {},
156
+ "propertyNames": {
157
+ "type": "string"
158
+ },
159
+ "type": "object"
160
+ },
161
+ "command": {
162
+ "pattern": "\\S",
163
+ "type": "string"
164
+ },
165
+ "kind": {
166
+ "const": "command"
167
+ },
168
+ "line": {
169
+ "pattern": "\\S",
170
+ "type": "string"
171
+ },
172
+ "safe_to_auto_execute": {
173
+ "type": "boolean"
174
+ },
175
+ "step": {
176
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
177
+ "type": "string"
178
+ },
179
+ "why": {
180
+ "pattern": "\\S",
181
+ "type": "string"
182
+ }
183
+ },
184
+ "required": ["kind", "step", "command", "args", "why", "safe_to_auto_execute"],
185
+ "type": "object"
186
+ },
187
+ {
188
+ "additionalProperties": false,
189
+ "properties": {
190
+ "kind": {
191
+ "const": "user_action"
192
+ },
193
+ "safe_to_auto_execute": {
194
+ "const": false
195
+ },
196
+ "step": {
197
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
198
+ "type": "string"
199
+ },
200
+ "why": {
201
+ "pattern": "\\S",
202
+ "type": "string"
203
+ }
204
+ },
205
+ "required": ["kind", "step", "why", "safe_to_auto_execute"],
206
+ "type": "object"
207
+ }
208
+ ]
209
+ },
210
+ "maxItems": 2,
211
+ "type": "array"
212
+ },
213
+ "page": {
214
+ "oneOf": [
215
+ {
216
+ "additionalProperties": false,
217
+ "properties": {
218
+ "has_more": {
219
+ "type": "boolean"
220
+ },
221
+ "limit": {
222
+ "minimum": 1,
223
+ "type": "integer"
224
+ },
225
+ "mode": {
226
+ "const": "page"
227
+ },
228
+ "next_page": {
229
+ "minimum": 2,
230
+ "type": "integer"
231
+ }
232
+ },
233
+ "required": ["mode", "limit", "has_more"],
234
+ "type": "object"
235
+ },
236
+ {
237
+ "additionalProperties": false,
238
+ "properties": {
239
+ "has_more": {
240
+ "type": "boolean"
241
+ },
242
+ "limit": {
243
+ "minimum": 1,
244
+ "type": "integer"
245
+ },
246
+ "mode": {
247
+ "const": "cursor"
248
+ },
249
+ "next_cursor": {
250
+ "pattern": "\\S",
251
+ "type": "string"
252
+ }
253
+ },
254
+ "required": ["mode", "limit", "has_more"],
255
+ "type": "object"
256
+ }
257
+ ]
258
+ }
259
+ },
260
+ "required": ["items", "page", "meta"],
261
+ "type": "object"
262
+ },
263
+ {
264
+ "additionalProperties": false,
265
+ "properties": {
266
+ "item": {},
267
+ "meta": {
268
+ "additionalProperties": false,
269
+ "properties": {
270
+ "accounts": {
271
+ "items": {
272
+ "pattern": "\\S",
273
+ "type": "string"
274
+ },
275
+ "type": "array"
276
+ },
277
+ "complete": {
278
+ "type": "boolean"
279
+ },
280
+ "duration_ms": {
281
+ "minimum": 0,
282
+ "type": "integer"
283
+ },
284
+ "issues": {
285
+ "items": {
286
+ "additionalProperties": false,
287
+ "properties": {
288
+ "code": {
289
+ "enum": [
290
+ "validation_error",
291
+ "configuration_error",
292
+ "authentication_error",
293
+ "permission_error",
294
+ "not_found",
295
+ "confirmation_required",
296
+ "rate_limited",
297
+ "timeout",
298
+ "network_error",
299
+ "provider_error",
300
+ "provider_unavailable",
301
+ "invalid_response",
302
+ "outcome_unknown",
303
+ "cancelled"
304
+ ],
305
+ "type": "string"
306
+ },
307
+ "reason": {
308
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
309
+ "type": "string"
310
+ },
311
+ "source": {
312
+ "pattern": "\\S",
313
+ "type": "string"
314
+ }
315
+ },
316
+ "required": ["code", "source"],
317
+ "type": "object"
318
+ },
319
+ "type": "array"
320
+ },
321
+ "run_id": {
322
+ "pattern": "\\S",
323
+ "type": "string"
324
+ },
325
+ "timezone": {
326
+ "pattern": "\\S",
327
+ "type": "string"
328
+ },
329
+ "truncated": {
330
+ "type": "boolean"
331
+ },
332
+ "window": {
333
+ "additionalProperties": false,
334
+ "properties": {
335
+ "since": {
336
+ "format": "date-time",
337
+ "pattern": "Z$",
338
+ "type": "string"
339
+ },
340
+ "until": {
341
+ "format": "date-time",
342
+ "pattern": "Z$",
343
+ "type": "string"
344
+ }
345
+ },
346
+ "required": [],
347
+ "type": "object"
348
+ }
349
+ },
350
+ "required": ["run_id", "duration_ms", "complete"],
351
+ "type": "object"
352
+ },
353
+ "missing": {
354
+ "items": {
355
+ "additionalProperties": false,
356
+ "properties": {
357
+ "field": {
358
+ "pattern": "\\S",
359
+ "type": "string"
360
+ },
361
+ "step": {
362
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
363
+ "type": "string"
364
+ },
365
+ "why": {
366
+ "pattern": "\\S",
367
+ "type": "string"
368
+ }
369
+ },
370
+ "required": ["field", "why"],
371
+ "type": "object"
372
+ },
373
+ "type": "array"
374
+ },
375
+ "next": {
376
+ "items": {
377
+ "oneOf": [
378
+ {
379
+ "additionalProperties": false,
380
+ "properties": {
381
+ "args": {
382
+ "additionalProperties": {},
383
+ "propertyNames": {
384
+ "type": "string"
385
+ },
386
+ "type": "object"
387
+ },
388
+ "command": {
389
+ "pattern": "\\S",
390
+ "type": "string"
391
+ },
392
+ "kind": {
393
+ "const": "command"
394
+ },
395
+ "line": {
396
+ "pattern": "\\S",
397
+ "type": "string"
398
+ },
399
+ "safe_to_auto_execute": {
400
+ "type": "boolean"
401
+ },
402
+ "step": {
403
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
404
+ "type": "string"
405
+ },
406
+ "why": {
407
+ "pattern": "\\S",
408
+ "type": "string"
409
+ }
410
+ },
411
+ "required": ["kind", "step", "command", "args", "why", "safe_to_auto_execute"],
412
+ "type": "object"
413
+ },
414
+ {
415
+ "additionalProperties": false,
416
+ "properties": {
417
+ "kind": {
418
+ "const": "user_action"
419
+ },
420
+ "safe_to_auto_execute": {
421
+ "const": false
422
+ },
423
+ "step": {
424
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
425
+ "type": "string"
426
+ },
427
+ "why": {
428
+ "pattern": "\\S",
429
+ "type": "string"
430
+ }
431
+ },
432
+ "required": ["kind", "step", "why", "safe_to_auto_execute"],
433
+ "type": "object"
434
+ }
435
+ ]
436
+ },
437
+ "maxItems": 2,
438
+ "type": "array"
439
+ }
440
+ },
441
+ "required": ["item", "meta"],
442
+ "type": "object"
443
+ }
444
+ ],
445
+ "type": "object"
446
+ }
447
+ },
448
+ {
449
+ "annotations": {
450
+ "destructiveHint": false,
451
+ "idempotentHint": true,
452
+ "openWorldHint": false,
453
+ "readOnlyHint": true
454
+ },
455
+ "inputSchema": {
456
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
457
+ "additionalProperties": false,
458
+ "properties": {
459
+ "query": {
460
+ "description": "words that describe the task",
461
+ "type": "string"
462
+ }
463
+ },
464
+ "required": [],
465
+ "type": "object"
466
+ },
467
+ "name": "app_tools_search",
468
+ "outputSchema": {
469
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
470
+ "properties": {},
471
+ "required": [],
472
+ "type": "object"
473
+ }
474
+ },
475
+ {
476
+ "annotations": {
477
+ "destructiveHint": true,
478
+ "idempotentHint": false,
479
+ "openWorldHint": true,
480
+ "readOnlyHint": false
481
+ },
482
+ "inputSchema": {
483
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
484
+ "additionalProperties": false,
485
+ "properties": {
486
+ "arguments": {
487
+ "additionalProperties": {},
488
+ "description": "that command's arguments",
489
+ "propertyNames": {
490
+ "type": "string"
491
+ },
492
+ "type": "object"
493
+ },
494
+ "command": {
495
+ "description": "a command app_tools_search returned: \"messages list\"",
496
+ "minLength": 1,
497
+ "type": "string"
498
+ }
499
+ },
500
+ "required": ["command"],
501
+ "type": "object"
502
+ },
503
+ "name": "app_write",
504
+ "outputSchema": {
505
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
506
+ "anyOf": [
507
+ {
508
+ "additionalProperties": false,
509
+ "properties": {
510
+ "items": {
511
+ "items": {},
512
+ "type": "array"
513
+ },
514
+ "meta": {
515
+ "additionalProperties": false,
516
+ "properties": {
517
+ "accounts": {
518
+ "items": {
519
+ "pattern": "\\S",
520
+ "type": "string"
521
+ },
522
+ "type": "array"
523
+ },
524
+ "complete": {
525
+ "type": "boolean"
526
+ },
527
+ "duration_ms": {
528
+ "minimum": 0,
529
+ "type": "integer"
530
+ },
531
+ "issues": {
532
+ "items": {
533
+ "additionalProperties": false,
534
+ "properties": {
535
+ "code": {
536
+ "enum": [
537
+ "validation_error",
538
+ "configuration_error",
539
+ "authentication_error",
540
+ "permission_error",
541
+ "not_found",
542
+ "confirmation_required",
543
+ "rate_limited",
544
+ "timeout",
545
+ "network_error",
546
+ "provider_error",
547
+ "provider_unavailable",
548
+ "invalid_response",
549
+ "outcome_unknown",
550
+ "cancelled"
551
+ ],
552
+ "type": "string"
553
+ },
554
+ "reason": {
555
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
556
+ "type": "string"
557
+ },
558
+ "source": {
559
+ "pattern": "\\S",
560
+ "type": "string"
561
+ }
562
+ },
563
+ "required": ["code", "source"],
564
+ "type": "object"
565
+ },
566
+ "type": "array"
567
+ },
568
+ "run_id": {
569
+ "pattern": "\\S",
570
+ "type": "string"
571
+ },
572
+ "timezone": {
573
+ "pattern": "\\S",
574
+ "type": "string"
575
+ },
576
+ "truncated": {
577
+ "type": "boolean"
578
+ },
579
+ "window": {
580
+ "additionalProperties": false,
581
+ "properties": {
582
+ "since": {
583
+ "format": "date-time",
584
+ "pattern": "Z$",
585
+ "type": "string"
586
+ },
587
+ "until": {
588
+ "format": "date-time",
589
+ "pattern": "Z$",
590
+ "type": "string"
591
+ }
592
+ },
593
+ "required": [],
594
+ "type": "object"
595
+ }
596
+ },
597
+ "required": ["run_id", "duration_ms", "complete"],
598
+ "type": "object"
599
+ },
600
+ "missing": {
601
+ "items": {
602
+ "additionalProperties": false,
603
+ "properties": {
604
+ "field": {
605
+ "pattern": "\\S",
606
+ "type": "string"
607
+ },
608
+ "step": {
609
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
610
+ "type": "string"
611
+ },
612
+ "why": {
613
+ "pattern": "\\S",
614
+ "type": "string"
615
+ }
616
+ },
617
+ "required": ["field", "why"],
618
+ "type": "object"
619
+ },
620
+ "type": "array"
621
+ },
622
+ "next": {
623
+ "items": {
624
+ "oneOf": [
625
+ {
626
+ "additionalProperties": false,
627
+ "properties": {
628
+ "args": {
629
+ "additionalProperties": {},
630
+ "propertyNames": {
631
+ "type": "string"
632
+ },
633
+ "type": "object"
634
+ },
635
+ "command": {
636
+ "pattern": "\\S",
637
+ "type": "string"
638
+ },
639
+ "kind": {
640
+ "const": "command"
641
+ },
642
+ "line": {
643
+ "pattern": "\\S",
644
+ "type": "string"
645
+ },
646
+ "safe_to_auto_execute": {
647
+ "type": "boolean"
648
+ },
649
+ "step": {
650
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
651
+ "type": "string"
652
+ },
653
+ "why": {
654
+ "pattern": "\\S",
655
+ "type": "string"
656
+ }
657
+ },
658
+ "required": ["kind", "step", "command", "args", "why", "safe_to_auto_execute"],
659
+ "type": "object"
660
+ },
661
+ {
662
+ "additionalProperties": false,
663
+ "properties": {
664
+ "kind": {
665
+ "const": "user_action"
666
+ },
667
+ "safe_to_auto_execute": {
668
+ "const": false
669
+ },
670
+ "step": {
671
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
672
+ "type": "string"
673
+ },
674
+ "why": {
675
+ "pattern": "\\S",
676
+ "type": "string"
677
+ }
678
+ },
679
+ "required": ["kind", "step", "why", "safe_to_auto_execute"],
680
+ "type": "object"
681
+ }
682
+ ]
683
+ },
684
+ "maxItems": 2,
685
+ "type": "array"
686
+ },
687
+ "page": {
688
+ "oneOf": [
689
+ {
690
+ "additionalProperties": false,
691
+ "properties": {
692
+ "has_more": {
693
+ "type": "boolean"
694
+ },
695
+ "limit": {
696
+ "minimum": 1,
697
+ "type": "integer"
698
+ },
699
+ "mode": {
700
+ "const": "page"
701
+ },
702
+ "next_page": {
703
+ "minimum": 2,
704
+ "type": "integer"
705
+ }
706
+ },
707
+ "required": ["mode", "limit", "has_more"],
708
+ "type": "object"
709
+ },
710
+ {
711
+ "additionalProperties": false,
712
+ "properties": {
713
+ "has_more": {
714
+ "type": "boolean"
715
+ },
716
+ "limit": {
717
+ "minimum": 1,
718
+ "type": "integer"
719
+ },
720
+ "mode": {
721
+ "const": "cursor"
722
+ },
723
+ "next_cursor": {
724
+ "pattern": "\\S",
725
+ "type": "string"
726
+ }
727
+ },
728
+ "required": ["mode", "limit", "has_more"],
729
+ "type": "object"
730
+ }
731
+ ]
732
+ }
733
+ },
734
+ "required": ["items", "page", "meta"],
735
+ "type": "object"
736
+ },
737
+ {
738
+ "additionalProperties": false,
739
+ "properties": {
740
+ "item": {},
741
+ "meta": {
742
+ "additionalProperties": false,
743
+ "properties": {
744
+ "accounts": {
745
+ "items": {
746
+ "pattern": "\\S",
747
+ "type": "string"
748
+ },
749
+ "type": "array"
750
+ },
751
+ "complete": {
752
+ "type": "boolean"
753
+ },
754
+ "duration_ms": {
755
+ "minimum": 0,
756
+ "type": "integer"
757
+ },
758
+ "issues": {
759
+ "items": {
760
+ "additionalProperties": false,
761
+ "properties": {
762
+ "code": {
763
+ "enum": [
764
+ "validation_error",
765
+ "configuration_error",
766
+ "authentication_error",
767
+ "permission_error",
768
+ "not_found",
769
+ "confirmation_required",
770
+ "rate_limited",
771
+ "timeout",
772
+ "network_error",
773
+ "provider_error",
774
+ "provider_unavailable",
775
+ "invalid_response",
776
+ "outcome_unknown",
777
+ "cancelled"
778
+ ],
779
+ "type": "string"
780
+ },
781
+ "reason": {
782
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
783
+ "type": "string"
784
+ },
785
+ "source": {
786
+ "pattern": "\\S",
787
+ "type": "string"
788
+ }
789
+ },
790
+ "required": ["code", "source"],
791
+ "type": "object"
792
+ },
793
+ "type": "array"
794
+ },
795
+ "run_id": {
796
+ "pattern": "\\S",
797
+ "type": "string"
798
+ },
799
+ "timezone": {
800
+ "pattern": "\\S",
801
+ "type": "string"
802
+ },
803
+ "truncated": {
804
+ "type": "boolean"
805
+ },
806
+ "window": {
807
+ "additionalProperties": false,
808
+ "properties": {
809
+ "since": {
810
+ "format": "date-time",
811
+ "pattern": "Z$",
812
+ "type": "string"
813
+ },
814
+ "until": {
815
+ "format": "date-time",
816
+ "pattern": "Z$",
817
+ "type": "string"
818
+ }
819
+ },
820
+ "required": [],
821
+ "type": "object"
822
+ }
823
+ },
824
+ "required": ["run_id", "duration_ms", "complete"],
825
+ "type": "object"
826
+ },
827
+ "missing": {
828
+ "items": {
829
+ "additionalProperties": false,
830
+ "properties": {
831
+ "field": {
832
+ "pattern": "\\S",
833
+ "type": "string"
834
+ },
835
+ "step": {
836
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
837
+ "type": "string"
838
+ },
839
+ "why": {
840
+ "pattern": "\\S",
841
+ "type": "string"
842
+ }
843
+ },
844
+ "required": ["field", "why"],
845
+ "type": "object"
846
+ },
847
+ "type": "array"
848
+ },
849
+ "next": {
850
+ "items": {
851
+ "oneOf": [
852
+ {
853
+ "additionalProperties": false,
854
+ "properties": {
855
+ "args": {
856
+ "additionalProperties": {},
857
+ "propertyNames": {
858
+ "type": "string"
859
+ },
860
+ "type": "object"
861
+ },
862
+ "command": {
863
+ "pattern": "\\S",
864
+ "type": "string"
865
+ },
866
+ "kind": {
867
+ "const": "command"
868
+ },
869
+ "line": {
870
+ "pattern": "\\S",
871
+ "type": "string"
872
+ },
873
+ "safe_to_auto_execute": {
874
+ "type": "boolean"
875
+ },
876
+ "step": {
877
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
878
+ "type": "string"
879
+ },
880
+ "why": {
881
+ "pattern": "\\S",
882
+ "type": "string"
883
+ }
884
+ },
885
+ "required": ["kind", "step", "command", "args", "why", "safe_to_auto_execute"],
886
+ "type": "object"
887
+ },
888
+ {
889
+ "additionalProperties": false,
890
+ "properties": {
891
+ "kind": {
892
+ "const": "user_action"
893
+ },
894
+ "safe_to_auto_execute": {
895
+ "const": false
896
+ },
897
+ "step": {
898
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
899
+ "type": "string"
900
+ },
901
+ "why": {
902
+ "pattern": "\\S",
903
+ "type": "string"
904
+ }
905
+ },
906
+ "required": ["kind", "step", "why", "safe_to_auto_execute"],
907
+ "type": "object"
908
+ }
909
+ ]
910
+ },
911
+ "maxItems": 2,
912
+ "type": "array"
913
+ }
914
+ },
915
+ "required": ["item", "meta"],
916
+ "type": "object"
917
+ }
918
+ ],
919
+ "type": "object"
920
+ }
921
+ }
922
+ ]