nawabari 0.6.1 → 0.7.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.
package/README.md CHANGED
@@ -89,6 +89,18 @@ The `resource-claims` capability additionally exposes a machine-readable
89
89
  surface documented above, so a caller can discover this contract instead of
90
90
  assuming it from the CLI help text.
91
91
 
92
+ Resource-claim semantics are generation `nawabari.resource-claims.v2` with
93
+ claim-record schema `2`. The standalone envelope deliberately remains
94
+ `nawabari.standalone-execution.v1`: this is a meaning-compatible top-level
95
+ identity, while callers select the child resource-claim generation before
96
+ operating. A future meaning-changing claim authorization, conflict, transition,
97
+ release, or required-mode change must publish a new resource-claim generation
98
+ and identity; the package version alone is never a compatibility decision.
99
+ The capability binds every lifecycle command and alias to its result schema,
100
+ implementation-owned stable failure vocabulary, transition-matrix identity,
101
+ CAS/force and rejected-non-mutation guarantees, and deterministic recovery
102
+ action schema.
103
+
92
104
  The supported standalone sequence is:
93
105
 
94
106
  ```text
@@ -111,7 +123,7 @@ The result schemas expose the following identities:
111
123
  | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
112
124
  | session lifecycle | `session_id`, `repository`, `worktree`, `branch`, `state` |
113
125
  | explicit discard | `previous_head`, `worktree_removed`, `branch_removed`, `released_claims`, `final_state`, final `session.state`/`terminal_operation` |
114
- | claims | `claim_id`, `session_id`, `resource`, `mode` |
126
+ | claims | `claim_id`, `session_id`, `resource`, `mode`, `claim_set_generation`, `previous_claim_set_generation` |
115
127
  | authorization | `operation`, `allowed`, `code`, `claim_ids` |
116
128
  | checkpoint evidence | `head`, `changed`, `staged`, `unstaged`, `untracked`, `in_claim`, `out_of_claim` |
117
129
  | repository evidence | `session_id`, `base_revision`, `head`, `clean`, `paths.stats`, `evidence_hash` |
@@ -254,8 +266,8 @@ git nawabari session claim --session "$NAWABARI_SESSION_ID" \
254
266
  --resource 'src/**/*.ts' --mode read --json
255
267
  git nawabari session claims --session "$NAWABARI_SESSION_ID" --json
256
268
  git nawabari session update --session "$NAWABARI_SESSION_ID" \
257
- --resource 'src/**/*.ts' --mode write --json
258
- git nawabari session release --session "$NAWABARI_SESSION_ID" --json
269
+ --resource 'src/**/*.ts' --mode write --force --json
270
+ git nawabari session release --session "$NAWABARI_SESSION_ID" --all --force --json
259
271
  ```
260
272
 
261
273
  `session update` (and its `resource update` alias) atomically replaces a
@@ -280,6 +292,24 @@ complete desired set again is idempotent. A successful replacement's JSON
280
292
  exposes the resulting `claims` together with machine-readable `added` and
281
293
  `released` claims.
282
294
 
295
+ The complete public claim lifecycle is:
296
+
297
+ ```text
298
+ session claim/resource claim (additive acquire)
299
+ -> session transition/resource transition (one exact-resource mode change)
300
+ -> session mutate/resource mutate (atomic exact-resource deltas)
301
+ -> session release/resource release (--resource, --claim-id, or explicit --all)
302
+ -> session update/resource update (atomic complete-set replacement)
303
+ ```
304
+
305
+ All destructive mutations require exactly one `--if-generation` CAS or
306
+ explicit `--force`. A stale CAS returns `STALE_CLAIM_SET` without changing
307
+ claims or generation. Additive claim is not replacement; selected release
308
+ preserves unrelated claims; `--all` is the unambiguous all-claims selector.
309
+ An exact contradictory additive claim remains rejected with
310
+ `CONTRADICTORY_CLAIM` and may carry the typed `transition-exact-resource`
311
+ recovery action, whose generation is directly usable as the transition CAS.
312
+
283
313
  The modes have these normative meanings:
284
314
 
285
315
  - `read`: a non-mutating access declaration. It is not a consistency lease,