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.
- package/CHANGELOG.md +193 -1
- package/README.md +194 -16
- package/adapters/claude-code/wowbagger-adapter.json +1 -1
- package/adapters/codex/wowbagger-adapter.json +1 -1
- package/adapters/opencode/wowbagger-adapter.json +1 -1
- package/docs/adapter-contract.md +66 -6
- package/docs/host-contract.md +287 -0
- package/docs/mutation-contract.md +558 -17
- package/docs/work-claim-contract.md +56 -24
- package/package.json +14 -1
- package/schemas/bare-ready-result.json +27 -0
- package/schemas/bare-validation-result.json +23 -0
- package/schemas/common.json +470 -0
- package/schemas/core-capabilities-response.json +346 -0
- package/schemas/core-envelope.json +141 -0
- package/schemas/core-inspect-response.json +37 -0
- package/schemas/core-inspect-workbench-response.json +340 -0
- package/schemas/core-list-error-response.json +242 -0
- package/schemas/core-list-query.json +98 -0
- package/schemas/core-list-response.json +140 -0
- package/schemas/core-report-response.json +379 -0
- package/schemas/core-transition-error-response.json +852 -0
- package/schemas/core-transition-request.json +47 -0
- package/schemas/core-transition-response.json +49 -0
- package/schemas/index.json +108 -0
- package/schemas/ledger-mutation-refusal.json +288 -0
- package/schemas/report-config-v1.json +140 -0
- package/schemas/report-config-v2.json +242 -0
- package/skills/wowbagger/SKILL.md +151 -38
- package/src/adapter/core-probe.js +87 -7
- package/src/claim-capabilities.js +4 -5
- package/src/claim-coordinator.js +15 -2
- package/src/claim-prospective.js +151 -0
- package/src/claim-publication.js +49 -9
- package/src/claim-sync.js +66 -0
- package/src/cli.js +671 -49
- package/src/extension-provision.js +33 -0
- package/src/git-autocommit.js +36 -6
- package/src/git-reconciliation.js +53 -9
- package/src/launch.js +52 -0
- package/src/lifecycle.js +153 -0
- package/src/limits.js +39 -0
- package/src/list.js +365 -0
- package/src/mutation.js +145 -118
- package/src/projection.js +39 -0
- package/src/report-graph.js +122 -21
- package/src/report-html.js +219 -51
- package/src/report-view.js +189 -0
- package/src/report.js +145 -15
- package/src/validate.js +4 -1
- package/src/workbench.js +117 -0
|
@@ -211,12 +211,14 @@ the coordination state lives; `write_serialization` says who pays for it.
|
|
|
211
211
|
| `none` | nobody; writers do not serialize |
|
|
212
212
|
| `shared-coordinator-writers` | every writer bound to the coordinator |
|
|
213
213
|
| `all-worktrees-of-one-repository` | every worktree that shares one Git common directory |
|
|
214
|
+
| `target-item-reconciliation` | mutations targeting the item with the unresolved publication |
|
|
214
215
|
|
|
215
216
|
| `blocks_until` | The block ends when |
|
|
216
217
|
|---|---|
|
|
217
218
|
| `not-applicable` | there is no block |
|
|
218
219
|
| `coordinator-transaction-complete` | the coordinator transaction finishes |
|
|
219
220
|
| `peer-commit-visible-in-this-checkout` | the writing commit is visible in the blocked checkout |
|
|
221
|
+
| `target-item-publication-reconciled` | the target item's publication is committed, synchronized, or explicitly recovered |
|
|
220
222
|
|
|
221
223
|
A caller MUST NOT infer write serialization from `coordination_scope` alone,
|
|
222
224
|
and MUST NOT read the core envelope's
|
|
@@ -259,8 +261,8 @@ A provisioned Git-journal backend MAY instead report:
|
|
|
259
261
|
"namespaces": ["wbns_11111111111111111111111111111111"]
|
|
260
262
|
},
|
|
261
263
|
"write_serialization": {
|
|
262
|
-
"scope": "
|
|
263
|
-
"blocks_until": "
|
|
264
|
+
"scope": "target-item-reconciliation",
|
|
265
|
+
"blocks_until": "target-item-publication-reconciled"
|
|
264
266
|
}
|
|
265
267
|
},
|
|
266
268
|
"operations": {
|
|
@@ -297,12 +299,12 @@ Git-backed ledger without a provisioned namespace remains advisory:
|
|
|
297
299
|
An advisory endpoint MUST reject `publish-claimed`; a caller must never upgrade
|
|
298
300
|
an advisory capability locally.
|
|
299
301
|
|
|
300
|
-
### 3.1 One journal
|
|
302
|
+
### 3.1 One journal coordinates every worktree of one repository
|
|
301
303
|
|
|
302
304
|
The journal lives in the Git common directory. Every worktree of one
|
|
303
305
|
repository shares that directory, so every worktree shares one journal, and
|
|
304
|
-
|
|
305
|
-
independent.
|
|
306
|
+
the journal preserves durable publication evidence. Clones do not share it, so
|
|
307
|
+
clones stay independent.
|
|
306
308
|
|
|
307
309
|
A worktree keeps its own checkout. The journal therefore knows item revisions
|
|
308
310
|
that a sibling checkout cannot see. Reconciliation runs before every mutation
|
|
@@ -310,13 +312,14 @@ on a provisioned ledger and compares the journal's expected revisions against
|
|
|
310
312
|
the local working tree and the local Git HEAD. A revision written in another
|
|
311
313
|
worktree is absent in both, so reconciliation reports
|
|
312
314
|
`stale-write-detected` and the mutation refuses with exit 6
|
|
313
|
-
`claim-store-unavailable`, reason `publication-reconciliation-required
|
|
315
|
+
`claim-store-unavailable`, reason `publication-reconciliation-required` only
|
|
316
|
+
when the mutation targets that item. `claim-verify` remains repository-wide and
|
|
317
|
+
reports every unresolved finding.
|
|
314
318
|
|
|
315
|
-
The plain statement: **
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
`create` is the operation most often refused by one.
|
|
319
|
+
The plain statement: **a recorded private write in one worktree blocks
|
|
320
|
+
mutations targeting that item, not unrelated item mutations in sibling
|
|
321
|
+
worktrees.** Own uncommitted work and out-of-protocol revisions remain global
|
|
322
|
+
safety barriers. This is item-scoped availability, not exclusive dispatch.
|
|
320
323
|
|
|
321
324
|
**Decided: create stays journal-silent.** The asymmetry is intended. Three
|
|
322
325
|
reasons hold it:
|
|
@@ -351,29 +354,34 @@ authorized revision instead (section 3.3). Every `unauthorized-revision`
|
|
|
351
354
|
the edit. A refusal that names only the restore path reads as an instruction to
|
|
352
355
|
throw the edit away; a field report did exactly that with reviewed, merged work.
|
|
353
356
|
|
|
354
|
-
Each refusal carries a `reason` that separates the
|
|
357
|
+
Each refusal carries a `reason` that separates the cases:
|
|
355
358
|
|
|
356
359
|
| `reason` | Cause | Remedy |
|
|
357
360
|
|---|---|---|
|
|
358
361
|
| `git-finalization-required` | this worktree wrote the item and has not committed it | commit here, then `claim-verify` |
|
|
359
|
-
| `worktree-synchronization-required` | another worktree wrote the item | synchronize this checkout
|
|
362
|
+
| `worktree-synchronization-required` | another worktree wrote the item | wait for the owner named by `owner_ref`/`owner_commit`, then synchronize this checkout and run `claim-verify`; if `owner_unavailable` is true, inspect reachable or dangling commits and use explicit restore/adopt authority |
|
|
360
363
|
| `unauthorized-revision` | the item was changed outside the protocol | restore the authorized revision and discard the edit, then `claim-verify`; or adopt the committed revision and keep the edit, then `claim-verify` (section 3.3) |
|
|
361
364
|
|
|
362
365
|
### 3.2 Recovering from a foreign-writer block
|
|
363
366
|
|
|
364
|
-
1. Stop writing in the blocked worktree.
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
1. Stop writing the affected item in the blocked worktree. Unrelated item
|
|
368
|
+
mutations may proceed when the finding is only
|
|
369
|
+
`worktree-synchronization-required`.
|
|
370
|
+
2. Read the finding. It names the item path and expected revision. When Git can
|
|
371
|
+
prove ownership, it also names `owner_ref` and `owner_commit`; otherwise it
|
|
372
|
+
carries `owner_unavailable: true`.
|
|
373
|
+
3. If an owner is named, WAIT for that owner to publish the commit, then
|
|
374
|
+
synchronize this checkout to it. Do not merge unrelated live work.
|
|
375
|
+
4. If ownership is unavailable, inspect reachable or dangling commits. Restore
|
|
376
|
+
the exact authorized bytes or use explicit `claim-adopt` authority after
|
|
377
|
+
review. Do not copy peer working-tree bytes.
|
|
370
378
|
5. Run `claim-verify --ledger <dir> --json` in the blocked worktree and require
|
|
371
379
|
exit 0.
|
|
372
|
-
6. Resume.
|
|
380
|
+
6. Resume the affected item.
|
|
373
381
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
382
|
+
`claim-verify` in the writing worktree finalizes that worktree's own state; it
|
|
383
|
+
does not make a sibling checkout able to see the item. Synchronization or
|
|
384
|
+
explicit recovery is still required for the affected item.
|
|
377
385
|
|
|
378
386
|
A refused mutation still writes the per-namespace reconcile log into the
|
|
379
387
|
blocked ledger. Git refuses to merge over that untracked file, so remove or
|
|
@@ -988,7 +996,31 @@ mutation paths. Their presence prevents a strict fenced capability. A
|
|
|
988
996
|
merge-coordinated backend may still operate for cooperating writers, but it
|
|
989
997
|
MUST report `safe_exclusive_dispatch: false`.
|
|
990
998
|
|
|
991
|
-
|
|
999
|
+
|
|
1000
|
+
## 8. Prospective merge verification
|
|
1001
|
+
|
|
1002
|
+
Before publishing a conflict-free merge of two cooperative branches, run:
|
|
1003
|
+
|
|
1004
|
+
```sh
|
|
1005
|
+
wowbagger claim-merge-verify --ledger <dir> --base <ref> --head <ref> --json
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
The command evaluates the exact `git merge-tree --write-tree` candidate,
|
|
1009
|
+
including candidate ledger item bytes and the merged tracked reconciliation
|
|
1010
|
+
log. It does not append journal entries, write files, update refs, acquire
|
|
1011
|
+
locks, adopt revisions, or change either parent.
|
|
1012
|
+
|
|
1013
|
+
Parent `claim-verify` results are insufficient: textual log merge can preserve a
|
|
1014
|
+
later adoption of revision R0 while candidate item bytes remain reviewed
|
|
1015
|
+
revision R1. The prospective command refuses that candidate with bounded JSON
|
|
1016
|
+
identifying item ID, actual and expected revisions, decisive sequence numbers,
|
|
1017
|
+
both parent commits, and candidate tree.
|
|
1018
|
+
|
|
1019
|
+
Recovery is explicit. Restore the authorized bytes or publish a reviewed
|
|
1020
|
+
`claim-adopt` decision, then rerun both `claim-verify` and this prospective
|
|
1021
|
+
check. The command never reorders evidence or chooses an adoption.
|
|
1022
|
+
|
|
1023
|
+
## 9. Errors, exits, and recovery
|
|
992
1024
|
|
|
993
1025
|
Error envelopes contain exactly `ok: false`, namespace, command,
|
|
994
1026
|
`contract_version: 1`, state, and `error` with `code`, `message`, and `details`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wowbagger",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"description": "Plain-Markdown, Git-native work ledger for coordinating agents — validate, ready-select, and mutate a task ledger from the CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,13 +31,23 @@
|
|
|
31
31
|
"bin": {
|
|
32
32
|
"wowbagger": "bin/wowbagger.js"
|
|
33
33
|
},
|
|
34
|
+
"exports": {
|
|
35
|
+
".": "./src/launch.js",
|
|
36
|
+
"./launch": "./src/launch.js",
|
|
37
|
+
"./wowbagger.js": "./bin/wowbagger.js",
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
"./schemas/*.json": "./schemas/*.json",
|
|
40
|
+
"./*": "./*"
|
|
41
|
+
},
|
|
34
42
|
"files": [
|
|
35
43
|
"bin",
|
|
36
44
|
"src",
|
|
37
45
|
"skills",
|
|
38
46
|
"adapters",
|
|
39
47
|
"vendor",
|
|
48
|
+
"schemas",
|
|
40
49
|
"docs/adapter-contract.md",
|
|
50
|
+
"docs/host-contract.md",
|
|
41
51
|
"docs/mutation-contract.md",
|
|
42
52
|
"docs/work-claim-contract.md",
|
|
43
53
|
"scripts/migrate-schema-2.js",
|
|
@@ -55,5 +65,8 @@
|
|
|
55
65
|
},
|
|
56
66
|
"dependencies": {
|
|
57
67
|
"yaml": "^2.9.0"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"ajv": "^8.20.0"
|
|
58
71
|
}
|
|
59
72
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/lstutzman/wowbagger/schemas/bare-ready-result.json",
|
|
4
|
+
"title": "ready --json success result",
|
|
5
|
+
"description": "A bare result: no envelope, no command member, and no version field. An invalid ledger does not produce this shape; it produces the validation result, exit 1.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"as_of",
|
|
10
|
+
"valid",
|
|
11
|
+
"ready"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"as_of": {
|
|
15
|
+
"$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/isoDate"
|
|
16
|
+
},
|
|
17
|
+
"valid": {
|
|
18
|
+
"const": true
|
|
19
|
+
},
|
|
20
|
+
"ready": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/itemId"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/lstutzman/wowbagger/schemas/bare-validation-result.json",
|
|
4
|
+
"title": "validate --json result, and the ready refusal that reuses it",
|
|
5
|
+
"description": "A bare result: no envelope, no command member, and no version field. `validate --json` always emits this shape, and `ready --json` emits it, exit 1, when the ledger is invalid. It is deliberately outside the envelope rule for compatibility and will not be wrapped.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"valid",
|
|
10
|
+
"errors"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"valid": {
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
},
|
|
16
|
+
"errors": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"$ref": "https://github.com/lstutzman/wowbagger/schemas/common.json#/$defs/validationError"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|