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,346 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/lstutzman/wowbagger/schemas/core-capabilities-response.json",
4
+ "title": "capabilities --json success response",
5
+ "description": "The exact core capability envelope this contract version emits.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "ok",
10
+ "command",
11
+ "contract_version",
12
+ "result"
13
+ ],
14
+ "properties": {
15
+ "ok": {
16
+ "const": true
17
+ },
18
+ "command": {
19
+ "const": "capabilities"
20
+ },
21
+ "contract_version": {
22
+ "const": 5
23
+ },
24
+ "result": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": [
28
+ "backend",
29
+ "operations",
30
+ "durability",
31
+ "limits"
32
+ ],
33
+ "properties": {
34
+ "backend": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": [
38
+ "name",
39
+ "coordination_scope"
40
+ ],
41
+ "properties": {
42
+ "name": {
43
+ "const": "local-filesystem"
44
+ },
45
+ "coordination_scope": {
46
+ "const": "same-working-copy-cooperative-writers"
47
+ }
48
+ }
49
+ },
50
+ "operations": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "inspect",
55
+ "list",
56
+ "create",
57
+ "transition",
58
+ "patch",
59
+ "report",
60
+ "work_claim"
61
+ ],
62
+ "properties": {
63
+ "inspect": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": [
67
+ "supported",
68
+ "write_scope",
69
+ "cas_scope",
70
+ "workbench"
71
+ ],
72
+ "properties": {
73
+ "supported": {
74
+ "const": true
75
+ },
76
+ "write_scope": {
77
+ "const": "none"
78
+ },
79
+ "cas_scope": {
80
+ "const": "none"
81
+ },
82
+ "workbench": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "supported",
87
+ "projection_version"
88
+ ],
89
+ "properties": {
90
+ "supported": {
91
+ "const": true
92
+ },
93
+ "projection_version": {
94
+ "const": 1
95
+ }
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "list": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": [
104
+ "supported",
105
+ "write_scope",
106
+ "cas_scope",
107
+ "query_version"
108
+ ],
109
+ "properties": {
110
+ "supported": {
111
+ "const": true
112
+ },
113
+ "write_scope": {
114
+ "const": "none"
115
+ },
116
+ "cas_scope": {
117
+ "const": "none"
118
+ },
119
+ "query_version": {
120
+ "const": 1
121
+ }
122
+ }
123
+ },
124
+ "create": {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": [
128
+ "supported",
129
+ "write_scope",
130
+ "cas_scope",
131
+ "publication_visibility",
132
+ "publication_probe"
133
+ ],
134
+ "properties": {
135
+ "supported": {
136
+ "const": true
137
+ },
138
+ "write_scope": {
139
+ "const": "single-item"
140
+ },
141
+ "cas_scope": {
142
+ "const": "requested-id-lock"
143
+ },
144
+ "publication_visibility": {
145
+ "const": "atomic-no-clobber-or-fail"
146
+ },
147
+ "publication_probe": {
148
+ "const": "per-ledger-operation"
149
+ }
150
+ }
151
+ },
152
+ "transition": {
153
+ "type": "object",
154
+ "additionalProperties": false,
155
+ "required": [
156
+ "supported",
157
+ "write_scope",
158
+ "cas_scope"
159
+ ],
160
+ "properties": {
161
+ "supported": {
162
+ "const": true
163
+ },
164
+ "write_scope": {
165
+ "const": "single-item"
166
+ },
167
+ "cas_scope": {
168
+ "const": "exact-byte-sha256"
169
+ }
170
+ }
171
+ },
172
+ "patch": {
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": [
176
+ "supported",
177
+ "write_scope",
178
+ "cas_scope"
179
+ ],
180
+ "properties": {
181
+ "supported": {
182
+ "const": true
183
+ },
184
+ "write_scope": {
185
+ "const": "single-item"
186
+ },
187
+ "cas_scope": {
188
+ "const": "exact-byte-sha256"
189
+ }
190
+ }
191
+ },
192
+ "report": {
193
+ "type": "object",
194
+ "additionalProperties": false,
195
+ "required": [
196
+ "supported",
197
+ "write_scope",
198
+ "config_versions",
199
+ "named_views"
200
+ ],
201
+ "properties": {
202
+ "supported": {
203
+ "const": true
204
+ },
205
+ "write_scope": {
206
+ "const": "derived-output"
207
+ },
208
+ "config_versions": {
209
+ "const": [
210
+ 1,
211
+ 2
212
+ ]
213
+ },
214
+ "named_views": {
215
+ "const": true
216
+ }
217
+ }
218
+ },
219
+ "work_claim": {
220
+ "type": "object",
221
+ "additionalProperties": false,
222
+ "required": [
223
+ "supported",
224
+ "api_version",
225
+ "mode",
226
+ "claim_protected_publication",
227
+ "fencing_enforced_at",
228
+ "safe_exclusive_dispatch"
229
+ ],
230
+ "properties": {
231
+ "supported": {
232
+ "type": "boolean"
233
+ },
234
+ "api_version": {
235
+ "const": 2
236
+ },
237
+ "mode": {
238
+ "const": "advisory"
239
+ },
240
+ "claim_protected_publication": {
241
+ "const": false
242
+ },
243
+ "fencing_enforced_at": {
244
+ "const": "none"
245
+ },
246
+ "safe_exclusive_dispatch": {
247
+ "const": false
248
+ }
249
+ },
250
+ "description": "The core capability envelope reports the unbound default claim profile. `supported` states only whether a Git common directory is reachable; the merge-coordinated profile is read from `claim capabilities --ledger <dir>`, which is a work-claim domain response."
251
+ }
252
+ }
253
+ },
254
+ "durability": {
255
+ "type": "object",
256
+ "additionalProperties": false,
257
+ "required": [
258
+ "temporary_file_sync",
259
+ "directory_sync",
260
+ "post_publication_verification",
261
+ "power_loss_guarantee"
262
+ ],
263
+ "properties": {
264
+ "temporary_file_sync": {
265
+ "const": "required-before-publication"
266
+ },
267
+ "directory_sync": {
268
+ "const": "best-effort-when-supported"
269
+ },
270
+ "post_publication_verification": {
271
+ "const": "exact-bytes-required"
272
+ },
273
+ "power_loss_guarantee": {
274
+ "const": "none"
275
+ }
276
+ }
277
+ },
278
+ "limits": {
279
+ "type": "object",
280
+ "additionalProperties": false,
281
+ "required": [
282
+ "max_item_source_bytes",
283
+ "default_list_page_size",
284
+ "max_list_page_size",
285
+ "max_list_title_characters",
286
+ "max_list_response_bytes",
287
+ "max_workbench_title_characters",
288
+ "max_workbench_collection_entries",
289
+ "max_workbench_response_bytes",
290
+ "multi_item_atomicity",
291
+ "cross_clone_coordination",
292
+ "cross_worktree_coordination",
293
+ "cross_machine_coordination",
294
+ "noncooperating_writer_protection",
295
+ "automatic_stale_lock_breaking"
296
+ ],
297
+ "properties": {
298
+ "max_item_source_bytes": {
299
+ "const": 8388608
300
+ },
301
+ "default_list_page_size": {
302
+ "const": 50
303
+ },
304
+ "max_list_page_size": {
305
+ "const": 200
306
+ },
307
+ "max_list_title_characters": {
308
+ "const": 120
309
+ },
310
+ "max_list_response_bytes": {
311
+ "const": 131072
312
+ },
313
+ "max_workbench_title_characters": {
314
+ "const": 120
315
+ },
316
+ "max_workbench_collection_entries": {
317
+ "const": 50
318
+ },
319
+ "max_workbench_response_bytes": {
320
+ "const": 65536
321
+ },
322
+ "multi_item_atomicity": {
323
+ "const": false
324
+ },
325
+ "cross_clone_coordination": {
326
+ "const": false
327
+ },
328
+ "cross_worktree_coordination": {
329
+ "const": false
330
+ },
331
+ "cross_machine_coordination": {
332
+ "const": false
333
+ },
334
+ "noncooperating_writer_protection": {
335
+ "const": false
336
+ },
337
+ "automatic_stale_lock_breaking": {
338
+ "const": false
339
+ }
340
+ },
341
+ "description": "Every advertised semantic limit. A consumer reads these numbers here and never infers them from an adapter implementation."
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/lstutzman/wowbagger/schemas/core-envelope.json",
4
+ "title": "Wowbagger core response envelope, contract version 5",
5
+ "description": "Every --json response of a core-domain command. The core domain is the one domain with no root namespace member: a response carrying `namespace` belongs to another domain and is rejected here. `validate` and `ready` are bare results outside the envelope rule and have their own schemas.",
6
+ "type": "object",
7
+ "oneOf": [
8
+ {
9
+ "title": "read success",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": [
13
+ "ok",
14
+ "command",
15
+ "contract_version",
16
+ "result"
17
+ ],
18
+ "properties": {
19
+ "ok": {
20
+ "const": true
21
+ },
22
+ "command": {
23
+ "enum": [
24
+ "capabilities",
25
+ "inspect",
26
+ "list",
27
+ "mint-id",
28
+ "report"
29
+ ]
30
+ },
31
+ "contract_version": {
32
+ "const": 5
33
+ },
34
+ "result": {
35
+ "type": "object"
36
+ }
37
+ }
38
+ },
39
+ {
40
+ "title": "read refusal",
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": [
44
+ "ok",
45
+ "command",
46
+ "contract_version",
47
+ "error"
48
+ ],
49
+ "properties": {
50
+ "ok": {
51
+ "const": false
52
+ },
53
+ "command": {
54
+ "enum": [
55
+ "capabilities",
56
+ "inspect",
57
+ "list",
58
+ "mint-id",
59
+ "report"
60
+ ]
61
+ },
62
+ "contract_version": {
63
+ "const": 5
64
+ },
65
+ "error": {
66
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/error"
67
+ }
68
+ }
69
+ },
70
+ {
71
+ "title": "mutation success",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "ok",
76
+ "command",
77
+ "contract_version",
78
+ "state",
79
+ "result"
80
+ ],
81
+ "properties": {
82
+ "ok": {
83
+ "const": true
84
+ },
85
+ "command": {
86
+ "enum": [
87
+ "create",
88
+ "transition",
89
+ "patch"
90
+ ]
91
+ },
92
+ "contract_version": {
93
+ "const": 5
94
+ },
95
+ "state": {
96
+ "const": "committed"
97
+ },
98
+ "result": {
99
+ "type": "object"
100
+ }
101
+ }
102
+ },
103
+ {
104
+ "title": "mutation refusal",
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": [
108
+ "ok",
109
+ "command",
110
+ "contract_version",
111
+ "state",
112
+ "error"
113
+ ],
114
+ "properties": {
115
+ "ok": {
116
+ "const": false
117
+ },
118
+ "command": {
119
+ "enum": [
120
+ "create",
121
+ "transition",
122
+ "patch"
123
+ ]
124
+ },
125
+ "contract_version": {
126
+ "const": 5
127
+ },
128
+ "state": {
129
+ "enum": [
130
+ "unchanged",
131
+ "committed",
132
+ "unknown"
133
+ ]
134
+ },
135
+ "error": {
136
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/error"
137
+ }
138
+ }
139
+ }
140
+ ]
141
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/lstutzman/wowbagger/schemas/core-inspect-response.json",
4
+ "title": "inspect --json success response, the lossless read",
5
+ "description": "The default read. `result` carries exactly `item`; an invocation with `--workbench` answers a different result member and has its own schema.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "ok",
10
+ "command",
11
+ "contract_version",
12
+ "result"
13
+ ],
14
+ "properties": {
15
+ "ok": {
16
+ "const": true
17
+ },
18
+ "command": {
19
+ "const": "inspect"
20
+ },
21
+ "contract_version": {
22
+ "const": 5
23
+ },
24
+ "result": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "properties": {
28
+ "item": {
29
+ "$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemSnapshot"
30
+ }
31
+ },
32
+ "required": [
33
+ "item"
34
+ ]
35
+ }
36
+ }
37
+ }