wowbagger 0.1.0-alpha.7 → 0.1.0-alpha.8

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 (51) hide show
  1. package/CHANGELOG.md +193 -1
  2. package/README.md +194 -16
  3. package/adapters/claude-code/wowbagger-adapter.json +1 -1
  4. package/adapters/codex/wowbagger-adapter.json +1 -1
  5. package/adapters/opencode/wowbagger-adapter.json +1 -1
  6. package/docs/adapter-contract.md +66 -6
  7. package/docs/host-contract.md +287 -0
  8. package/docs/mutation-contract.md +558 -17
  9. package/docs/work-claim-contract.md +56 -24
  10. package/package.json +14 -1
  11. package/schemas/bare-ready-result.json +27 -0
  12. package/schemas/bare-validation-result.json +23 -0
  13. package/schemas/common.json +470 -0
  14. package/schemas/core-capabilities-response.json +346 -0
  15. package/schemas/core-envelope.json +141 -0
  16. package/schemas/core-inspect-response.json +37 -0
  17. package/schemas/core-inspect-workbench-response.json +340 -0
  18. package/schemas/core-list-error-response.json +242 -0
  19. package/schemas/core-list-query.json +98 -0
  20. package/schemas/core-list-response.json +140 -0
  21. package/schemas/core-report-response.json +379 -0
  22. package/schemas/core-transition-error-response.json +852 -0
  23. package/schemas/core-transition-request.json +47 -0
  24. package/schemas/core-transition-response.json +49 -0
  25. package/schemas/index.json +108 -0
  26. package/schemas/ledger-mutation-refusal.json +288 -0
  27. package/schemas/report-config-v1.json +140 -0
  28. package/schemas/report-config-v2.json +242 -0
  29. package/skills/wowbagger/SKILL.md +151 -38
  30. package/src/adapter/core-probe.js +87 -7
  31. package/src/claim-capabilities.js +4 -5
  32. package/src/claim-coordinator.js +15 -2
  33. package/src/claim-prospective.js +151 -0
  34. package/src/claim-publication.js +49 -9
  35. package/src/claim-sync.js +66 -0
  36. package/src/cli.js +671 -49
  37. package/src/extension-provision.js +33 -0
  38. package/src/git-autocommit.js +36 -6
  39. package/src/git-reconciliation.js +53 -9
  40. package/src/launch.js +52 -0
  41. package/src/lifecycle.js +153 -0
  42. package/src/limits.js +39 -0
  43. package/src/list.js +365 -0
  44. package/src/mutation.js +145 -118
  45. package/src/projection.js +39 -0
  46. package/src/report-graph.js +122 -21
  47. package/src/report-html.js +219 -51
  48. package/src/report-view.js +189 -0
  49. package/src/report.js +145 -15
  50. package/src/validate.js +4 -1
  51. package/src/workbench.js +117 -0
@@ -0,0 +1,852 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/lstutzman/wowbagger/schemas/core-transition-error-response.json",
4
+ "title": "transition --json refusal responses",
5
+ "description": "Every documented `transition` refusal. Read `state` on every nonzero result: `unchanged` is a proven non-write, `unknown` establishes nothing, and `committed` means the item was written and something after publication failed.",
6
+ "type": "object",
7
+ "oneOf": [
8
+ {
9
+ "title": "invalid-request",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": [
13
+ "ok",
14
+ "command",
15
+ "contract_version",
16
+ "state",
17
+ "error"
18
+ ],
19
+ "properties": {
20
+ "ok": {
21
+ "const": false
22
+ },
23
+ "command": {
24
+ "const": "transition"
25
+ },
26
+ "contract_version": {
27
+ "const": 5
28
+ },
29
+ "error": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "code": {
34
+ "const": "invalid-request"
35
+ },
36
+ "message": {
37
+ "type": "string"
38
+ },
39
+ "details": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "properties": {
43
+ "issues": {
44
+ "type": "array",
45
+ "minItems": 1,
46
+ "items": {
47
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/requestIssue"
48
+ }
49
+ }
50
+ },
51
+ "required": [
52
+ "issues"
53
+ ]
54
+ }
55
+ },
56
+ "required": [
57
+ "code",
58
+ "message",
59
+ "details"
60
+ ]
61
+ },
62
+ "state": {
63
+ "const": "unchanged"
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "title": "item-not-found",
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": [
72
+ "ok",
73
+ "command",
74
+ "contract_version",
75
+ "state",
76
+ "error"
77
+ ],
78
+ "properties": {
79
+ "ok": {
80
+ "const": false
81
+ },
82
+ "command": {
83
+ "const": "transition"
84
+ },
85
+ "contract_version": {
86
+ "const": 5
87
+ },
88
+ "error": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "properties": {
92
+ "code": {
93
+ "const": "item-not-found"
94
+ },
95
+ "message": {
96
+ "type": "string"
97
+ },
98
+ "details": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "id": {
103
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
104
+ }
105
+ },
106
+ "required": [
107
+ "id"
108
+ ]
109
+ }
110
+ },
111
+ "required": [
112
+ "code",
113
+ "message",
114
+ "details"
115
+ ]
116
+ },
117
+ "state": {
118
+ "const": "unchanged"
119
+ }
120
+ }
121
+ },
122
+ {
123
+ "title": "ledger-invalid",
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": [
127
+ "ok",
128
+ "command",
129
+ "contract_version",
130
+ "state",
131
+ "error"
132
+ ],
133
+ "properties": {
134
+ "ok": {
135
+ "const": false
136
+ },
137
+ "command": {
138
+ "const": "transition"
139
+ },
140
+ "contract_version": {
141
+ "const": 5
142
+ },
143
+ "error": {
144
+ "type": "object",
145
+ "additionalProperties": false,
146
+ "properties": {
147
+ "code": {
148
+ "const": "ledger-invalid"
149
+ },
150
+ "message": {
151
+ "type": "string"
152
+ },
153
+ "details": {
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "properties": {
157
+ "validation_errors": {
158
+ "type": "array",
159
+ "minItems": 1,
160
+ "items": {
161
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/validationError"
162
+ }
163
+ }
164
+ },
165
+ "required": [
166
+ "validation_errors"
167
+ ]
168
+ }
169
+ },
170
+ "required": [
171
+ "code",
172
+ "message",
173
+ "details"
174
+ ]
175
+ },
176
+ "state": {
177
+ "const": "unchanged"
178
+ }
179
+ }
180
+ },
181
+ {
182
+ "title": "revision-conflict",
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": [
186
+ "ok",
187
+ "command",
188
+ "contract_version",
189
+ "state",
190
+ "error"
191
+ ],
192
+ "properties": {
193
+ "ok": {
194
+ "const": false
195
+ },
196
+ "command": {
197
+ "const": "transition"
198
+ },
199
+ "contract_version": {
200
+ "const": 5
201
+ },
202
+ "error": {
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "properties": {
206
+ "code": {
207
+ "const": "revision-conflict"
208
+ },
209
+ "message": {
210
+ "type": "string"
211
+ },
212
+ "details": {
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "properties": {
216
+ "id": {
217
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
218
+ },
219
+ "expected_revision": {
220
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/revision"
221
+ },
222
+ "actual_revision": {
223
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/revision"
224
+ }
225
+ },
226
+ "required": [
227
+ "id",
228
+ "expected_revision",
229
+ "actual_revision"
230
+ ]
231
+ }
232
+ },
233
+ "required": [
234
+ "code",
235
+ "message",
236
+ "details"
237
+ ]
238
+ },
239
+ "state": {
240
+ "const": "unchanged"
241
+ }
242
+ }
243
+ },
244
+ {
245
+ "title": "lock-held",
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "ok",
250
+ "command",
251
+ "contract_version",
252
+ "state",
253
+ "error"
254
+ ],
255
+ "properties": {
256
+ "ok": {
257
+ "const": false
258
+ },
259
+ "command": {
260
+ "const": "transition"
261
+ },
262
+ "contract_version": {
263
+ "const": 5
264
+ },
265
+ "error": {
266
+ "type": "object",
267
+ "additionalProperties": false,
268
+ "properties": {
269
+ "code": {
270
+ "const": "lock-held"
271
+ },
272
+ "message": {
273
+ "type": "string"
274
+ },
275
+ "details": {
276
+ "type": "object",
277
+ "additionalProperties": false,
278
+ "properties": {
279
+ "id": {
280
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
281
+ },
282
+ "lock_path": {
283
+ "type": "string"
284
+ },
285
+ "owner": {
286
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/lockOwner"
287
+ },
288
+ "owner_diagnostic": {
289
+ "type": [
290
+ "string",
291
+ "null"
292
+ ],
293
+ "enum": [
294
+ "invalid-shape",
295
+ "too-large",
296
+ "invalid-json",
297
+ "duplicate-key",
298
+ null
299
+ ]
300
+ }
301
+ },
302
+ "required": [
303
+ "id",
304
+ "lock_path",
305
+ "owner",
306
+ "owner_diagnostic"
307
+ ]
308
+ }
309
+ },
310
+ "required": [
311
+ "code",
312
+ "message",
313
+ "details"
314
+ ]
315
+ },
316
+ "state": {
317
+ "const": "unchanged"
318
+ }
319
+ }
320
+ },
321
+ {
322
+ "title": "transition-precondition-failed",
323
+ "type": "object",
324
+ "additionalProperties": false,
325
+ "required": [
326
+ "ok",
327
+ "command",
328
+ "contract_version",
329
+ "state",
330
+ "error"
331
+ ],
332
+ "properties": {
333
+ "ok": {
334
+ "const": false
335
+ },
336
+ "command": {
337
+ "const": "transition"
338
+ },
339
+ "contract_version": {
340
+ "const": 5
341
+ },
342
+ "error": {
343
+ "type": "object",
344
+ "additionalProperties": false,
345
+ "properties": {
346
+ "code": {
347
+ "const": "transition-precondition-failed"
348
+ },
349
+ "message": {
350
+ "type": "string"
351
+ },
352
+ "details": {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "properties": {
356
+ "id": {
357
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
358
+ },
359
+ "issues": {
360
+ "type": "array",
361
+ "minItems": 1,
362
+ "items": {
363
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/transitionIssue"
364
+ }
365
+ }
366
+ },
367
+ "required": [
368
+ "id",
369
+ "issues"
370
+ ]
371
+ }
372
+ },
373
+ "required": [
374
+ "code",
375
+ "message",
376
+ "details"
377
+ ]
378
+ },
379
+ "state": {
380
+ "const": "unchanged"
381
+ }
382
+ }
383
+ },
384
+ {
385
+ "title": "candidate-invalid",
386
+ "type": "object",
387
+ "additionalProperties": false,
388
+ "required": [
389
+ "ok",
390
+ "command",
391
+ "contract_version",
392
+ "state",
393
+ "error"
394
+ ],
395
+ "properties": {
396
+ "ok": {
397
+ "const": false
398
+ },
399
+ "command": {
400
+ "const": "transition"
401
+ },
402
+ "contract_version": {
403
+ "const": 5
404
+ },
405
+ "error": {
406
+ "type": "object",
407
+ "additionalProperties": false,
408
+ "properties": {
409
+ "code": {
410
+ "const": "candidate-invalid"
411
+ },
412
+ "message": {
413
+ "type": "string"
414
+ },
415
+ "details": {
416
+ "type": "object",
417
+ "additionalProperties": false,
418
+ "properties": {
419
+ "id": {
420
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
421
+ },
422
+ "validation_errors": {
423
+ "type": "array",
424
+ "minItems": 1,
425
+ "items": {
426
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/validationError"
427
+ }
428
+ }
429
+ },
430
+ "required": [
431
+ "id",
432
+ "validation_errors"
433
+ ]
434
+ }
435
+ },
436
+ "required": [
437
+ "code",
438
+ "message",
439
+ "details"
440
+ ]
441
+ },
442
+ "state": {
443
+ "const": "unchanged"
444
+ }
445
+ }
446
+ },
447
+ {
448
+ "title": "atomic-scope-required",
449
+ "type": "object",
450
+ "additionalProperties": false,
451
+ "required": [
452
+ "ok",
453
+ "command",
454
+ "contract_version",
455
+ "state",
456
+ "error"
457
+ ],
458
+ "properties": {
459
+ "ok": {
460
+ "const": false
461
+ },
462
+ "command": {
463
+ "const": "transition"
464
+ },
465
+ "contract_version": {
466
+ "const": 5
467
+ },
468
+ "error": {
469
+ "type": "object",
470
+ "additionalProperties": false,
471
+ "properties": {
472
+ "code": {
473
+ "const": "atomic-scope-required"
474
+ },
475
+ "message": {
476
+ "type": "string"
477
+ },
478
+ "details": {
479
+ "type": "object",
480
+ "additionalProperties": false,
481
+ "properties": {
482
+ "id": {
483
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
484
+ },
485
+ "precondition_issues": {
486
+ "type": "array",
487
+ "items": {
488
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/transitionIssue"
489
+ }
490
+ },
491
+ "blockers": {
492
+ "type": "array",
493
+ "minItems": 1,
494
+ "items": {
495
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/transitionBlocker"
496
+ }
497
+ }
498
+ },
499
+ "required": [
500
+ "id",
501
+ "precondition_issues",
502
+ "blockers"
503
+ ]
504
+ }
505
+ },
506
+ "required": [
507
+ "code",
508
+ "message",
509
+ "details"
510
+ ]
511
+ },
512
+ "state": {
513
+ "const": "unchanged"
514
+ }
515
+ }
516
+ },
517
+ {
518
+ "title": "item-source-too-large",
519
+ "type": "object",
520
+ "additionalProperties": false,
521
+ "required": [
522
+ "ok",
523
+ "command",
524
+ "contract_version",
525
+ "state",
526
+ "error"
527
+ ],
528
+ "properties": {
529
+ "ok": {
530
+ "const": false
531
+ },
532
+ "command": {
533
+ "const": "transition"
534
+ },
535
+ "contract_version": {
536
+ "const": 5
537
+ },
538
+ "error": {
539
+ "type": "object",
540
+ "additionalProperties": false,
541
+ "properties": {
542
+ "code": {
543
+ "const": "item-source-too-large"
544
+ },
545
+ "message": {
546
+ "type": "string"
547
+ },
548
+ "details": {
549
+ "type": "object",
550
+ "additionalProperties": false,
551
+ "properties": {
552
+ "id": {
553
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
554
+ },
555
+ "max_item_source_bytes": {
556
+ "const": 8388608
557
+ },
558
+ "source_bytes": {
559
+ "type": "integer",
560
+ "minimum": 0
561
+ }
562
+ },
563
+ "required": [
564
+ "id"
565
+ ]
566
+ }
567
+ },
568
+ "required": [
569
+ "code",
570
+ "message",
571
+ "details"
572
+ ]
573
+ },
574
+ "state": {
575
+ "const": "unchanged"
576
+ }
577
+ }
578
+ },
579
+ {
580
+ "title": "capability-unavailable",
581
+ "type": "object",
582
+ "additionalProperties": false,
583
+ "required": [
584
+ "ok",
585
+ "command",
586
+ "contract_version",
587
+ "state",
588
+ "error"
589
+ ],
590
+ "properties": {
591
+ "ok": {
592
+ "const": false
593
+ },
594
+ "command": {
595
+ "const": "transition"
596
+ },
597
+ "contract_version": {
598
+ "const": 5
599
+ },
600
+ "error": {
601
+ "type": "object",
602
+ "additionalProperties": false,
603
+ "properties": {
604
+ "code": {
605
+ "const": "capability-unavailable"
606
+ },
607
+ "message": {
608
+ "type": "string"
609
+ },
610
+ "details": {
611
+ "type": "object",
612
+ "additionalProperties": false,
613
+ "properties": {
614
+ "capability": {
615
+ "type": "string"
616
+ },
617
+ "reason": {
618
+ "type": "string"
619
+ },
620
+ "recovery_artifacts": {
621
+ "type": "array",
622
+ "items": {
623
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/recoveryArtifact"
624
+ }
625
+ },
626
+ "recovery_artifacts_truncated": {
627
+ "type": "boolean"
628
+ }
629
+ },
630
+ "required": [
631
+ "capability",
632
+ "reason"
633
+ ]
634
+ }
635
+ },
636
+ "required": [
637
+ "code",
638
+ "message",
639
+ "details"
640
+ ]
641
+ },
642
+ "state": {
643
+ "const": "unchanged"
644
+ }
645
+ }
646
+ },
647
+ {
648
+ "title": "operation-failed",
649
+ "type": "object",
650
+ "additionalProperties": false,
651
+ "required": [
652
+ "ok",
653
+ "command",
654
+ "contract_version",
655
+ "state",
656
+ "error"
657
+ ],
658
+ "properties": {
659
+ "ok": {
660
+ "const": false
661
+ },
662
+ "command": {
663
+ "const": "transition"
664
+ },
665
+ "contract_version": {
666
+ "const": 5
667
+ },
668
+ "error": {
669
+ "type": "object",
670
+ "additionalProperties": false,
671
+ "properties": {
672
+ "code": {
673
+ "const": "operation-failed"
674
+ },
675
+ "message": {
676
+ "type": "string"
677
+ },
678
+ "details": {
679
+ "type": "object",
680
+ "additionalProperties": false,
681
+ "properties": {
682
+ "id": {
683
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
684
+ },
685
+ "operation": {
686
+ "type": "string"
687
+ },
688
+ "reason": {
689
+ "type": "string"
690
+ },
691
+ "recovery_artifacts": {
692
+ "type": "array",
693
+ "items": {
694
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/recoveryArtifact"
695
+ }
696
+ },
697
+ "recovery_artifacts_truncated": {
698
+ "type": "boolean"
699
+ }
700
+ },
701
+ "required": [
702
+ "id",
703
+ "operation",
704
+ "reason"
705
+ ]
706
+ }
707
+ },
708
+ "required": [
709
+ "code",
710
+ "message",
711
+ "details"
712
+ ]
713
+ },
714
+ "state": {
715
+ "const": "unchanged"
716
+ }
717
+ }
718
+ },
719
+ {
720
+ "title": "write-outcome-unknown",
721
+ "type": "object",
722
+ "additionalProperties": false,
723
+ "required": [
724
+ "ok",
725
+ "command",
726
+ "contract_version",
727
+ "state",
728
+ "error"
729
+ ],
730
+ "properties": {
731
+ "ok": {
732
+ "const": false
733
+ },
734
+ "command": {
735
+ "const": "transition"
736
+ },
737
+ "contract_version": {
738
+ "const": 5
739
+ },
740
+ "error": {
741
+ "type": "object",
742
+ "additionalProperties": false,
743
+ "properties": {
744
+ "code": {
745
+ "const": "write-outcome-unknown"
746
+ },
747
+ "message": {
748
+ "type": "string"
749
+ },
750
+ "details": {
751
+ "type": "object",
752
+ "additionalProperties": false,
753
+ "properties": {
754
+ "id": {
755
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
756
+ },
757
+ "recovery_artifacts": {
758
+ "type": "array",
759
+ "items": {
760
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/recoveryArtifact"
761
+ }
762
+ },
763
+ "recovery_artifacts_truncated": {
764
+ "type": "boolean"
765
+ }
766
+ },
767
+ "required": [
768
+ "id"
769
+ ]
770
+ }
771
+ },
772
+ "required": [
773
+ "code",
774
+ "message",
775
+ "details"
776
+ ]
777
+ },
778
+ "state": {
779
+ "const": "unknown"
780
+ }
781
+ }
782
+ },
783
+ {
784
+ "title": "post-commit-recovery-required",
785
+ "type": "object",
786
+ "additionalProperties": false,
787
+ "required": [
788
+ "ok",
789
+ "command",
790
+ "contract_version",
791
+ "state",
792
+ "error"
793
+ ],
794
+ "properties": {
795
+ "ok": {
796
+ "const": false
797
+ },
798
+ "command": {
799
+ "const": "transition"
800
+ },
801
+ "contract_version": {
802
+ "const": 5
803
+ },
804
+ "error": {
805
+ "type": "object",
806
+ "additionalProperties": false,
807
+ "properties": {
808
+ "code": {
809
+ "const": "post-commit-recovery-required"
810
+ },
811
+ "message": {
812
+ "type": "string"
813
+ },
814
+ "details": {
815
+ "type": "object",
816
+ "additionalProperties": false,
817
+ "properties": {
818
+ "id": {
819
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
820
+ },
821
+ "revision": {
822
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/revision"
823
+ },
824
+ "recovery_artifacts": {
825
+ "type": "array",
826
+ "items": {
827
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/recoveryArtifact"
828
+ }
829
+ },
830
+ "recovery_artifacts_truncated": {
831
+ "type": "boolean"
832
+ }
833
+ },
834
+ "required": [
835
+ "id",
836
+ "revision"
837
+ ]
838
+ }
839
+ },
840
+ "required": [
841
+ "code",
842
+ "message",
843
+ "details"
844
+ ]
845
+ },
846
+ "state": {
847
+ "const": "committed"
848
+ }
849
+ }
850
+ }
851
+ ]
852
+ }