nawabari 0.13.0 → 0.15.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.
- package/README.md +69 -329
- package/dist/cli-command-registry.d.ts +70 -3
- package/dist/cli-command-registry.js +73 -9
- package/dist/cli-command-registry.js.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +95 -4
- package/dist/cli.js.map +1 -1
- package/dist/contract.js +43 -2
- package/dist/contract.js.map +1 -1
- package/dist/control-repositories.js +48 -12
- package/dist/control-repositories.js.map +1 -1
- package/dist/control-server-lease.d.ts +34 -0
- package/dist/control-server-lease.js +303 -0
- package/dist/control-server-lease.js.map +1 -0
- package/dist/control-server-request-pool.d.ts +70 -0
- package/dist/control-server-request-pool.js +473 -0
- package/dist/control-server-request-pool.js.map +1 -0
- package/dist/control-server.d.ts +12 -15
- package/dist/control-server.js +174 -197
- package/dist/control-server.js.map +1 -1
- package/dist/control-web.d.ts +0 -2
- package/dist/control-web.js +51 -9
- package/dist/control-web.js.map +1 -1
- package/dist/domain/cgroups-v2.d.ts +5 -0
- package/dist/domain/cgroups-v2.js +1 -0
- package/dist/domain/cgroups-v2.js.map +1 -1
- package/dist/domain/filesystem-policy-decision.d.ts +42 -2
- package/dist/domain/filesystem-policy-decision.js +61 -22
- package/dist/domain/filesystem-policy-decision.js.map +1 -1
- package/dist/domain/filesystem-policy-evidence.d.ts +12 -1
- package/dist/domain/filesystem-policy-evidence.js +89 -1
- package/dist/domain/filesystem-policy-evidence.js.map +1 -1
- package/dist/domain/filesystem-policy.js +29 -51
- package/dist/domain/filesystem-policy.js.map +1 -1
- package/dist/domain/implementation-execution-scope-resolver.d.ts +31 -0
- package/dist/domain/implementation-execution-scope-resolver.js +135 -0
- package/dist/domain/implementation-execution-scope-resolver.js.map +1 -0
- package/dist/domain/landlock.d.ts +2 -0
- package/dist/domain/landlock.js +27 -4
- package/dist/domain/landlock.js.map +1 -1
- package/dist/domain/repository-observation-service.d.ts +9 -0
- package/dist/domain/repository-observation-service.js +164 -0
- package/dist/domain/repository-observation-service.js.map +1 -0
- package/dist/domain/repository-runtime-coordination-collector.d.ts +12 -0
- package/dist/domain/repository-runtime-coordination-collector.js +23 -0
- package/dist/domain/repository-runtime-coordination-collector.js.map +1 -0
- package/dist/domain/repository-runtime-filesystem-collector.d.ts +37 -0
- package/dist/domain/repository-runtime-filesystem-collector.js +438 -0
- package/dist/domain/repository-runtime-filesystem-collector.js.map +1 -0
- package/dist/domain/repository-runtime-lifecycle-collector.d.ts +9 -0
- package/dist/domain/repository-runtime-lifecycle-collector.js +180 -0
- package/dist/domain/repository-runtime-lifecycle-collector.js.map +1 -0
- package/dist/domain/repository-runtime-process-collector.d.ts +15 -0
- package/dist/domain/repository-runtime-process-collector.js +198 -0
- package/dist/domain/repository-runtime-process-collector.js.map +1 -0
- package/dist/domain/repository-runtime-profile-collector.d.ts +19 -0
- package/dist/domain/repository-runtime-profile-collector.js +310 -0
- package/dist/domain/repository-runtime-profile-collector.js.map +1 -0
- package/dist/domain/sandbox-candidate-staging.d.ts +6 -0
- package/dist/domain/sandbox-candidate-staging.js +78 -0
- package/dist/domain/sandbox-candidate-staging.js.map +1 -0
- package/dist/domain/sandbox-execution-evidence.d.ts +89 -0
- package/dist/domain/sandbox-execution-evidence.js +279 -0
- package/dist/domain/sandbox-execution-evidence.js.map +1 -0
- package/dist/domain/sandbox-launcher.d.ts +11 -0
- package/dist/domain/sandbox-launcher.js +207 -190
- package/dist/domain/sandbox-launcher.js.map +1 -1
- package/dist/domain/sandbox-physical-execution.d.ts +37 -0
- package/dist/domain/sandbox-physical-execution.js +313 -0
- package/dist/domain/sandbox-physical-execution.js.map +1 -0
- package/dist/domain/sandbox-procfs.d.ts +13 -0
- package/dist/domain/sandbox-procfs.js +45 -0
- package/dist/domain/sandbox-procfs.js.map +1 -0
- package/dist/domain/sandbox-seccomp.d.ts +1 -0
- package/dist/domain/sandbox-seccomp.js +31 -1
- package/dist/domain/sandbox-seccomp.js.map +1 -1
- package/dist/domain/sandbox.d.ts +20 -0
- package/dist/domain/sandbox.js +2 -0
- package/dist/domain/sandbox.js.map +1 -1
- package/dist/domain/session-actions.d.ts +85 -0
- package/dist/domain/session-actions.js +762 -0
- package/dist/domain/session-actions.js.map +1 -0
- package/dist/domain/session-backend.d.ts +15 -6
- package/dist/domain/session-backend.js +216 -26
- package/dist/domain/session-backend.js.map +1 -1
- package/dist/domain/session-cgroup-tree-observation.d.ts +25 -0
- package/dist/domain/session-cgroup-tree-observation.js +180 -0
- package/dist/domain/session-cgroup-tree-observation.js.map +1 -0
- package/dist/domain/session-console.d.ts +29 -1
- package/dist/domain/session-console.js +182 -10
- package/dist/domain/session-console.js.map +1 -1
- package/dist/domain/session-execution-record.d.ts +1 -1
- package/dist/domain/session-execution-record.js +37 -2
- package/dist/domain/session-execution-record.js.map +1 -1
- package/dist/domain/session-launch-supervisor-worker.d.ts +3 -0
- package/dist/domain/session-launch-supervisor-worker.js +41 -106
- package/dist/domain/session-launch-supervisor-worker.js.map +1 -1
- package/dist/domain/session-launch-supervisor.d.ts +7 -0
- package/dist/domain/session-launch-supervisor.js +80 -6
- package/dist/domain/session-launch-supervisor.js.map +1 -1
- package/dist/domain/session-protected-launch.d.ts +10 -1
- package/dist/domain/session-protected-launch.js +23 -5
- package/dist/domain/session-protected-launch.js.map +1 -1
- package/dist/domain/session.d.ts +73 -4
- package/dist/domain/session.js +3 -0
- package/dist/domain/session.js.map +1 -1
- package/dist/domain/worktree-file-operation.d.ts +7 -2
- package/dist/domain/worktree-file-operation.js +12 -12
- package/dist/domain/worktree-file-operation.js.map +1 -1
- package/dist/git.d.ts +37 -0
- package/dist/git.js +386 -0
- package/dist/git.js.map +1 -1
- package/dist/public-contract.d.ts +10 -2
- package/dist/public-contract.js +46 -3
- package/dist/public-contract.js.map +1 -1
- package/dist/registry/atomic.d.ts +8 -2
- package/dist/registry/atomic.js +8 -23
- package/dist/registry/atomic.js.map +1 -1
- package/dist/registry/errors.d.ts +1 -1
- package/dist/registry/errors.js +0 -8
- package/dist/registry/errors.js.map +1 -1
- package/dist/registry/repository-state-boundary.d.ts +50 -0
- package/dist/registry/repository-state-boundary.js +129 -0
- package/dist/registry/repository-state-boundary.js.map +1 -0
- package/dist/registry/runtime-records.d.ts +23 -10
- package/dist/registry/runtime-records.js +236 -8
- package/dist/registry/runtime-records.js.map +1 -1
- package/dist/registry/types.d.ts +0 -9
- package/dist/registry/types.js +0 -1
- package/dist/registry/types.js.map +1 -1
- package/dist/registry.d.ts +0 -1
- package/dist/registry.js +0 -1
- package/dist/registry.js.map +1 -1
- package/dist/resource-coordination-compatibility.d.ts +7 -0
- package/dist/resource-coordination-compatibility.js +250 -0
- package/dist/resource-coordination-compatibility.js.map +1 -0
- package/dist/resource-handoff.js +11 -4
- package/dist/resource-handoff.js.map +1 -1
- package/dist/session-bound-verification.d.ts +82 -0
- package/dist/session-bound-verification.js +407 -0
- package/dist/session-bound-verification.js.map +1 -0
- package/dist/session-candidate-bundle-storage.d.ts +29 -0
- package/dist/session-candidate-bundle-storage.js +284 -0
- package/dist/session-candidate-bundle-storage.js.map +1 -0
- package/dist/session-candidate-bundle.d.ts +122 -0
- package/dist/session-candidate-bundle.js +602 -0
- package/dist/session-candidate-bundle.js.map +1 -0
- package/dist/session-lifecycle-actions.d.ts +29 -0
- package/dist/session-lifecycle-actions.js +37 -0
- package/dist/session-lifecycle-actions.js.map +1 -1
- package/dist/session-lifecycle-classification.d.ts +3 -3
- package/dist/session-lifecycle-classification.js.map +1 -1
- package/dist/session-parking.d.ts +12 -39
- package/dist/session-parking.js +34 -268
- package/dist/session-parking.js.map +1 -1
- package/dist/session-registry.d.ts +75 -22
- package/dist/session-registry.js +1485 -278
- package/dist/session-registry.js.map +1 -1
- package/dist/session-verification-cli-input.d.ts +3 -0
- package/dist/session-verification-cli-input.js +37 -0
- package/dist/session-verification-cli-input.js.map +1 -0
- package/dist/state/session/guards.d.ts +8 -0
- package/dist/state/session/guards.js +21 -1
- package/dist/state/session/guards.js.map +1 -1
- package/dist/state/session/machine.d.ts +81 -3
- package/dist/state/session/machine.js +176 -5
- package/dist/state/session/machine.js.map +1 -1
- package/dist/state/session/types.d.ts +48 -3
- package/dist/state/session/types.js +3 -0
- package/dist/state/session/types.js.map +1 -1
- package/dist/ui/repository-terminal.d.ts +1 -1
- package/dist/ui/repository-terminal.js +6 -4
- package/dist/ui/repository-terminal.js.map +1 -1
- package/dist/ui/session-actions.d.ts +2 -77
- package/dist/ui/session-actions.js +2 -710
- package/dist/ui/session-actions.js.map +1 -1
- package/dist/verification-executor.d.ts +47 -0
- package/dist/verification-executor.js +290 -4
- package/dist/verification-executor.js.map +1 -1
- package/dist/working-set.d.ts +11 -1
- package/dist/working-set.js +14 -0
- package/dist/working-set.js.map +1 -1
- package/package.json +16 -12
- package/dist/registry/store.d.ts +0 -38
- package/dist/registry/store.js +0 -156
- package/dist/registry/store.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,386 +2,126 @@
|
|
|
2
2
|
<img src="./docs/assets/readme/nawabari-hero.webp" alt="Nawabari — Git Worktree Isolation." width="100%">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<p align="center">
|
|
6
|
-
<a href="https://github.com/yohn-jp/nawabari/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/yohn-jp/nawabari/actions/workflows/ci.yml/badge.svg"></a>
|
|
7
|
-
<a href="https://www.npmjs.com/package/nawabari"><img alt="npm" src="https://img.shields.io/npm/v/nawabari"></a>
|
|
8
|
-
<a href="https://www.npmjs.com/package/nawabari"><img alt="Node" src="https://img.shields.io/node/v/nawabari"></a>
|
|
9
|
-
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/nawabari"></a>
|
|
10
|
-
</p>
|
|
11
|
-
|
|
12
5
|
# Nawabari
|
|
13
6
|
|
|
14
|
-
Nawabari is a local
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
This README describes the current 0.10.x product model. It is an overview and navigation surface, not a copy of generated contracts or implementation history.
|
|
19
|
-
|
|
20
|
-
The canonical routine-use workflow is one machine-authority path for both people
|
|
21
|
-
and agents:
|
|
7
|
+
Nawabari is a machine-local runtime for coding-agent sessions. It binds each session to an owned Git worktree and
|
|
8
|
+
mutable branch, checks declared access and coordination boundaries, and supports protected execution on Linux.
|
|
9
|
+
Repository ownership remains independent for each local Git repository; a shared remote does not merge local authority.
|
|
22
10
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
4. Run governed work and mutations through the claim and evidence surfaces.
|
|
27
|
-
5. Handle claim conflicts from machine-readable evidence and typed lifecycle actions.
|
|
28
|
-
6. Reconcile stale or inconsistent physical state through the canonical operation.
|
|
29
|
-
7. Close or discard according to the lifecycle authority.
|
|
30
|
-
8. Confirm convergence with `doctor` and garbage-collection observation.
|
|
11
|
+
Nawabari owns local execution and recovery, not task selection, semantic orchestration, or GitHub Issue/PR governance.
|
|
12
|
+
Local ownership operations do not require GitHub, `gh`, or a particular agent runtime. Explicit Git push/fetch operations
|
|
13
|
+
and caller programs may use the network.
|
|
31
14
|
|
|
32
|
-
|
|
15
|
+
The [accepted Target Architecture](docs/architecture/index.md) defines the design to which the product must converge.
|
|
16
|
+
The [implementation status](docs/architecture/implementation-status.md) distinguishes that target from the current code.
|
|
17
|
+
This documentation adoption does not implement parking, change claim enforcement, repair Control Server authentication,
|
|
18
|
+
add a singleton lease, or strengthen filesystem durability by itself.
|
|
33
19
|
|
|
34
|
-
## Install
|
|
20
|
+
## Install and discover
|
|
35
21
|
|
|
36
|
-
Node.js 24 or newer
|
|
22
|
+
Use Node.js 24 or newer.
|
|
37
23
|
|
|
38
24
|
```bash
|
|
39
25
|
npm install -g nawabari
|
|
40
26
|
nawabari --version
|
|
41
|
-
git nawabari --help
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The package installs both `nawabari` and `git-nawabari`; `git nawabari ...` works as Git's external subcommand.
|
|
45
|
-
|
|
46
|
-
## Canonical routine-use workflow
|
|
47
|
-
|
|
48
|
-
Run from the repository's integration worktree. The following bootstrap uses the
|
|
49
|
-
same public option shape as the packed routine-use certification. Omit the
|
|
50
|
-
auxiliary declaration when the session needs no declared repository-local state;
|
|
51
|
-
do not replace it with an arbitrary host path.
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
27
|
nawabari capabilities --json
|
|
55
|
-
nawabari
|
|
56
|
-
|
|
57
|
-
auxiliary_state='{"source":{"kind":"repository-local","path":".codegraph/ignored"},"target":{"kind":"managed-worktree","path":".codegraph/ignored"},"mode":"copy","durability":"durable"}'
|
|
58
|
-
created=$(git nawabari session create \
|
|
59
|
-
--branch feature/example \
|
|
60
|
-
--resource README.md --mode write \
|
|
61
|
-
--auxiliary-state "$auxiliary_state" \
|
|
62
|
-
--json)
|
|
63
|
-
session_id=$(printf '%s' "$created" | jq -r .session_id)
|
|
64
|
-
worktree=$(printf '%s' "$created" | jq -r .worktree)
|
|
65
|
-
|
|
66
|
-
(cd "$worktree" && git nawabari session show --session "$session_id" --json)
|
|
67
|
-
(cd "$worktree" && git nawabari session claims --session "$session_id" --json)
|
|
68
|
-
(cd "$worktree" && git nawabari session inspect --session "$session_id" --schema-version 2 --json)
|
|
69
|
-
|
|
70
|
-
(cd "$worktree" && git nawabari session claim --session "$session_id" --resource contract-lifecycle.txt --mode exclusive-write --json)
|
|
71
|
-
(cd "$worktree" && git nawabari authorize --session "$session_id" --operation source-write --resource contract-lifecycle.txt --json)
|
|
72
|
-
(cd "$worktree" && "$EDITOR" contract-lifecycle.txt)
|
|
73
|
-
(cd "$worktree" && git nawabari evidence snapshot --session "$session_id" --json)
|
|
74
|
-
(cd "$worktree" && git nawabari checkpoint --session "$session_id" --json)
|
|
75
|
-
(cd "$worktree" && git nawabari commit --session "$session_id" --message "Exercise governed lifecycle" --resource contract-lifecycle.txt --json)
|
|
76
|
-
(cd "$worktree" && git nawabari push --session "$session_id" --remote origin --branch feature/example --resource contract-lifecycle.txt --create-upstream --json)
|
|
28
|
+
git nawabari session create --help --json
|
|
77
29
|
```
|
|
78
30
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Resource-claim enforcement is disabled by default for a new session: `commit`/`push` authorization does not require the session to hold a resource claim for its own session-owned operations. Pass `--enforce-claims` to `session create` to opt that session into the previous claim-authorization behavior, including `MISSING_RESOURCE_CLAIM`/`INSUFFICIENT_CLAIM_MODE` denials and existing claim-mode compatibility rules. Worktree ownership, branch ownership, and `RESOURCE_CLAIM_CONFLICT` protection against another session's active claim remain enforced either way.
|
|
84
|
-
|
|
85
|
-
### Working-set artifacts
|
|
86
|
-
|
|
87
|
-
For a bounded session, supply **both** `--execution-scope-file` and `--candidate-working-set-file` to `session create`. The JSON below illustrates the versioned fields accepted by the [canonical parsers](./src/working-set.ts). Replace the identity, revision, digest, and paths with values from the implementation authorization and the repository being bootstrapped. `repositoryHost` and `repositoryId` must agree between the two artifacts and the authorization; `repository` is optional in the execution scope and required in the candidate. The candidate `revision` and execution-scope `base.revision` must equal the session's resolved Git base revision (40 or 64 hexadecimal characters). `base.branch` names that base; `base.freshness` and the top-level execution-scope `branch` are optional bounded strings.
|
|
88
|
-
|
|
89
|
-
`execution-scope.json`:
|
|
90
|
-
|
|
91
|
-
```json
|
|
92
|
-
{
|
|
93
|
-
"version": 1,
|
|
94
|
-
"kind": "implementation-execution-scope",
|
|
95
|
-
"authorization": {
|
|
96
|
-
"version": 1,
|
|
97
|
-
"kind": "implementation-authorization",
|
|
98
|
-
"contractVersion": 1,
|
|
99
|
-
"implementation": {
|
|
100
|
-
"repositoryHost": "github.com",
|
|
101
|
-
"repositoryId": "1329799765",
|
|
102
|
-
"repository": "yohn-jp/nawabari",
|
|
103
|
-
"number": 659
|
|
104
|
-
},
|
|
105
|
-
"governedBodyDigest": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
106
|
-
},
|
|
107
|
-
"repository": { "repositoryHost": "github.com", "repositoryId": "1329799765", "repository": "yohn-jp/nawabari" },
|
|
108
|
-
"base": { "branch": "main", "revision": "e0e3c4376c9d70c87f24c7211b5ded1f3d58a983" },
|
|
109
|
-
"scope": {
|
|
110
|
-
"readOnly": ["README.md", "src/**"],
|
|
111
|
-
"write": [],
|
|
112
|
-
"create": [],
|
|
113
|
-
"delete": [],
|
|
114
|
-
"deny": []
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
31
|
+
The package installs `nawabari` and `git-nawabari`; Git discovers the latter as `git nawabari`.
|
|
32
|
+
Use installed help and capabilities for exact supported commands, schemas, options, and failure codes.
|
|
33
|
+
Package version, persisted schema version, claim schema version, and public contract identity are distinct.
|
|
118
34
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"kind": "candidate-working-set",
|
|
124
|
-
"schemaVersion": 1,
|
|
125
|
-
"workingSetId": "implementation-659-candidate-v1",
|
|
126
|
-
"repository": { "repositoryHost": "github.com", "repositoryId": "1329799765", "repository": "yohn-jp/nawabari" },
|
|
127
|
-
"revision": "e0e3c4376c9d70c87f24c7211b5ded1f3d58a983",
|
|
128
|
-
"entries": [
|
|
129
|
-
{
|
|
130
|
-
"state": "required",
|
|
131
|
-
"target": { "kind": "file", "locator": "README.md" },
|
|
132
|
-
"reason": { "id": "implementation-659", "summary": "Read the public contract" },
|
|
133
|
-
"evidence": [{ "artifact": "implementation-659", "reference": "working-set-bootstrap" }]
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
```
|
|
35
|
+
## Local session workflow
|
|
138
36
|
|
|
139
|
-
|
|
37
|
+
From the repository's integration worktree, create a session and retain the returned identity and worktree path.
|
|
38
|
+
The default session does not require resource claims for otherwise-valid session-owned operations.
|
|
39
|
+
Worktree/branch ownership, applicable scope restrictions, and conflicts with another session's claims remain enforced.
|
|
140
40
|
|
|
141
41
|
```bash
|
|
142
|
-
nawabari session create --
|
|
143
|
-
--candidate-working-set-file candidate-working-set.json --json
|
|
42
|
+
nawabari session create --branch feature/example --json
|
|
144
43
|
nawabari session show --session "$session_id" --json
|
|
145
|
-
nawabari session
|
|
146
|
-
nawabari session scope expand --session "$session_id" --repository 1329799765 \
|
|
147
|
-
--repository-host github.com --revision "$revision" \
|
|
148
|
-
--execution-scope-file execution-scope.json --path src/new-context.ts \
|
|
149
|
-
--operation READONLY --reason 'Needed for current task' --json
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Read `working_set.revision` from `session show --json` before expansion. A granted expansion advances that revision and appends `working_set.history`; a stale revision or different execution-scope provenance is rejected without changing the working set. The requested path must be within the original execution-scope maximum and outside its `deny` selectors. READONLY expansion grants no WRITE, CREATE, or DELETE authority. Mutation still follows the existing claim and scope checks. If a resource handoff reports `Destination maximum scope is unavailable`, inspect the destination and explicitly expand its scope first; retry `session handoff` with fresh claim-set generation through the normal handoff command. Handoff never expands destination scope itself.
|
|
153
|
-
|
|
154
|
-
The packed auxiliary-state declaration above is the bounded `copy` form: a `repository-local` source is copied to a `managed-worktree` target with `durability: durable`. It is an explicit, repeatable, allowlisted capability. It does not discover ignored state, project process-local sockets/PID files/logs, shadow Git-tracked paths, or expose arbitrary host filesystem paths. Auxiliary-state projection is separate from `SessionRuntimeProjection`: the former copies declared repository-local durable state for a managed worktree; the latter describes explicit runtime material and filesystem visibility for protected execution. Auxiliary state does not change the runtime projection.
|
|
155
|
-
|
|
156
|
-
The create operation is atomic, but a caller must treat an uncertain result carefully. If JSON reports `REGISTRY_DURABILITY_UNCERTAIN`, re-read the reported session and claims before retrying. If the exact original declaration is already present, follow `bootstrap_retry.next_action: inspect-established-session` and inspect that `session_id`; if another declaration owns the worktree or branch, follow `bootstrap_retry.next_action: inspect-blocking-session`. Nawabari never silently adopts an existing owner. A retry is appropriate only after the authoritative state proves that the requested bootstrap was not established.
|
|
157
|
-
|
|
158
|
-
`--all-claimed` is an explicit resource selector. It resolves safely observed Git-changed paths covered by qualifying claims; it does not bypass claim authorization. Use repeated `--resource <path>` when an explicit path list is preferable.
|
|
159
|
-
|
|
160
|
-
After reviewing and integrating the session branch through the caller's normal local Git/provider process:
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
git nawabari session inspect --session "$session_id" --json
|
|
164
|
-
git nawabari session close --session "$session_id" --json
|
|
44
|
+
nawabari session inspect --session "$session_id" --schema-version 2 --json
|
|
165
45
|
```
|
|
166
46
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
If the lifecycle result exposes a recoverable blocker, follow its typed `next_action`/`next_actions` entry. `reconcile-physical-state` is the non-mutating observation action (its command is `doctor`). Its explicit apply action is `reconcile-physical-state-apply`, and its exact command is:
|
|
47
|
+
Set `session_id` and the working directory from the create result; do not use another session's worktree.
|
|
48
|
+
For explicit claim enforcement, declare it at creation:
|
|
170
49
|
|
|
171
50
|
```bash
|
|
172
|
-
|
|
51
|
+
nawabari session create --branch feature/claimed --enforce-claims \
|
|
52
|
+
--resource README.md --mode write --json
|
|
173
53
|
```
|
|
174
54
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
After
|
|
178
|
-
the repository integration worktree:
|
|
55
|
+
Commit and push are explicit governed operations with concrete resources. On claim-enforced sessions, their required
|
|
56
|
+
claim strength is discovered from the operation contract. Integration/review decisions remain caller-owned.
|
|
57
|
+
After integration, inspect and close. A blocked close does not authorize discard.
|
|
179
58
|
|
|
180
59
|
```bash
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
## Authority model
|
|
186
|
-
|
|
187
|
-
Each boundary has one job and one local authority. README summarizes the product contract; executable code and machine-readable projections remain authoritative for exact schemas, transitions, and failure vocabularies.
|
|
188
|
-
|
|
189
|
-
| Boundary | What it answers | Typical commands |
|
|
190
|
-
| ---------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
191
|
-
| Session lifecycle | Which session owns a worktree/branch and whether it can safely progress or terminate | `session create`, `session inspect`, `session close` |
|
|
192
|
-
| Resource Claims | Which session may access a canonical repository resource and at what mode | `session claim`, `session claims`, `session update`, `session release` |
|
|
193
|
-
| Mutation authorization | Whether a concrete operation has sufficient claims and no conflicting owner | `guard`, `authorize`, `commit`, `push` |
|
|
194
|
-
| Repository evidence | What Git can observe about revisions, paths, changes, ancestry, and bounded diffs | `checkpoint`, `evidence snapshot`, `diff` |
|
|
195
|
-
| Auxiliary state | Whether explicitly declared durable repository-local state may be copied into the managed worktree | `session create --auxiliary-state`, `capabilities` |
|
|
196
|
-
| Reconciliation/cleanup | Whether observed physical state permits a lifecycle recovery or cleanup action | `session inspect`, `session reconcile`, `doctor`, `gc` |
|
|
197
|
-
| Protected execution | Whether a command runs inside the opt-in Linux process/filesystem boundary | `session run`, `session exec`, `session shell`, `doctor` |
|
|
198
|
-
|
|
199
|
-
Claims are not task labels and do not encode GitHub or agent semantics. `write` permits ordinary path changes; `exclusive-write` is required for finalizing operations such as commit and push. Conflicting or ambiguous claims fail closed.
|
|
200
|
-
|
|
201
|
-
The default governance path does not install hooks and does not prevent direct filesystem writes outside Nawabari. Its guarantee is that Nawabari-routed operations consult authoritative session, Git, and claim state before mutation.
|
|
202
|
-
|
|
203
|
-
Nawabari's authority ends at local session ownership, claims, Git evidence, and the lifecycle of the managed worktree and branch. Task meaning, Issue/PR state, review decisions, and provider/GitHub state remain outside that authority.
|
|
204
|
-
|
|
205
|
-
### Claim conflict and physical recovery
|
|
206
|
-
|
|
207
|
-
`RESOURCE_CLAIM_CONFLICT` does not always mean stale state. A healthy owner is reported with `ownerState: "active"`; the certified contention path exposes `inspect-blocking-session` and `wait-for-conflicting-claim-release` safe actions without a reconciliation `nextAction`. Inspect the owner and wait for the legitimate claim release; do not remove another session's claim.
|
|
208
|
-
|
|
209
|
-
For a stale or inconsistent owner, the machine result instead carries physical and lifecycle evidence such as `ownerPhysicalState: "prunable-missing"`, `ownerLifecycleState: "stale-inconsistent"`, and the typed `nextAction.actionId: "reconcile-physical-state"`. Inspect it first:
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
git nawabari session inspect --session "$owner_session_id" --schema-version 2 --json
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
Then use the explicit apply operation shown above and retry the original claim after it completes. Age or a missing path alone is not destructive authority. The packed test removes a worktree only as external fault injection; supported recovery does not involve editing the session registry manually or deleting a raw Git worktree.
|
|
216
|
-
|
|
217
|
-
## Session and resource lifecycle
|
|
218
|
-
|
|
219
|
-
The normal path is:
|
|
220
|
-
|
|
221
|
-
```text
|
|
222
|
-
session create (explicit initial claims)
|
|
223
|
-
↓
|
|
224
|
-
inspect session/claims → claim/authorize → checkpoint → commit or push
|
|
225
|
-
↓ ↓
|
|
226
|
-
inspect readiness integrate the branch
|
|
227
|
-
↓ ↓
|
|
228
|
-
session close or discard ←─────────────────────────┘
|
|
229
|
-
↓
|
|
230
|
-
doctor + gc --dry-run convergence check
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
If work is not integrated, `session inspect` reports bounded blockers and safe next actions. Discard is never an implicit fallback for close or garbage collection.
|
|
234
|
-
|
|
235
|
-
The Session lifecycle is backed by the executable XState authority in 0.10.x and exposed through public state, contract, and manifest projections. Consumers use those projections rather than internal machine nodes or actor objects.
|
|
236
|
-
|
|
237
|
-
### Claims
|
|
238
|
-
|
|
239
|
-
Claims are canonical repository-relative resource records attached to a session. Supported modes are `read`, `write`, and `exclusive-write`. The canonical routine path establishes its first claim during `session create`; later additions, transitions, and releases use the existing claim surfaces.
|
|
240
|
-
|
|
241
|
-
```bash
|
|
242
|
-
git nawabari session claim --session "$session_id" --resource src/example.ts --mode exclusive-write --json
|
|
243
|
-
git nawabari session claims --session "$session_id" --json
|
|
244
|
-
git nawabari session update --session "$session_id" --resource src/example.ts --mode exclusive-write --resource test/example.test.ts --mode write --if-generation 1 --json
|
|
245
|
-
git nawabari session release --session "$session_id" --all --force --json
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
Resource aliases are discoverable through help. Use `--help --json` rather than copying option metadata into an integration.
|
|
249
|
-
|
|
250
|
-
Claim modes are cumulative. The canonical operation requirements are derived from the operation authorization policy and are shown by `session claim --help`:
|
|
251
|
-
|
|
252
|
-
- `read`: no governed operation
|
|
253
|
-
- `write`: `source-write`, `stage`
|
|
254
|
-
- `exclusive-write`: `source-write`, `stage`, `commit`, `branch-mutation`, `push`, `cleanup`
|
|
255
|
-
|
|
256
|
-
The policy requires `exclusive-write` for operations that finalize or remove shared state. This mapping is documentation of the executable authority, not a second claim policy; integrations should discover the current values from help or the machine contract.
|
|
257
|
-
|
|
258
|
-
### Inspect, close, discard, and garbage collection
|
|
259
|
-
|
|
260
|
-
`session inspect` is read-only and uses the same close/cleanup evidence as `session close`. Use `--schema-version 2` when consuming the single-authority lifecycle and action projection.
|
|
261
|
-
|
|
262
|
-
```bash
|
|
263
|
-
git nawabari session inspect --session "$session_id" --json
|
|
264
|
-
git nawabari session discard --session "$session_id" --preview --json
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
`session discard` requires an explicit session ID and may destroy unintegrated commits and uncommitted work in that session's worktree. Preview reports bounded destructive scope without mutation. Actual discard revalidates repository, worktree, branch, `HEAD`, and registry ownership before destructive steps.
|
|
268
|
-
|
|
269
|
-
When the caller intentionally abandons the session, apply that explicit
|
|
270
|
-
decision with `git nawabari session discard --session "$session_id" --json`.
|
|
271
|
-
Discard is not an automatic fallback for a blocked close.
|
|
272
|
-
|
|
273
|
-
`gc --dry-run` reports stale candidates and blockers. `gc --apply` only cleans candidates passing the same safety checks; elapsed age alone is diagnostic suspicion, not destructive authority. `doctor` reports prerequisite and reconciliation state without silently repairing ownership. Use the typed lifecycle action and explicit `session reconcile` operation for supported stale/inconsistent-owner recovery; `doctor` does not silently repair it.
|
|
274
|
-
|
|
275
|
-
## Governed Git work
|
|
276
|
-
|
|
277
|
-
`guard` and `authorize` are separate read-only boundaries:
|
|
278
|
-
|
|
279
|
-
- `guard` without an operation verifies the current physical worktree, branch, and session ownership/context. It does not evaluate resource claims.
|
|
280
|
-
- `authorize` evaluates a named operation against concrete resources, using the canonical operation policy and active claims. It does not grant or persist claims.
|
|
281
|
-
- `guard --operation <name> --resource <path>` remains a compatibility convenience for the combined claim-aware check. Use `authorize` when the operation decision itself is the intended boundary.
|
|
282
|
-
|
|
283
|
-
The operation vocabulary is discoverable from the CLI and includes `source-write`, `stage`, `commit`, `branch-mutation`, `push`, and `cleanup`.
|
|
284
|
-
|
|
285
|
-
`checkpoint` and `evidence snapshot` describe Git-observable facts only. They do not infer task meaning, Issue ownership, or review status. `diff` requires explicit concrete paths and bounds optional patch output.
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
git nawabari commit --session "$session_id" --message "Update example" --resource src/example.ts --json
|
|
289
|
-
git nawabari commit --session "$session_id" --message "Update example" --all-claimed --json
|
|
290
|
-
git nawabari push --session "$session_id" --remote origin --branch feature/example --all-claimed --json
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
## Optional protected execution
|
|
294
|
-
|
|
295
|
-
Protected execution is an opt-in Linux-only mode beneath the existing Nawabari session and claim authority. It does not create a second session identity and does not turn ordinary `session create` work into a sandbox.
|
|
296
|
-
|
|
297
|
-
```bash
|
|
298
|
-
git nawabari session run --session "$session_id" --runtime-policy strict -- node worker.js
|
|
299
|
-
git nawabari session exec --session "$session_id" -- npm test
|
|
300
|
-
git nawabari session shell --session "$session_id" --runtime-policy compatibility
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
The `--` terminator is mandatory. The command is passed as argv and is not interpreted by a shell. The canonical profile gives the child a private root, `/tmp`, `/proc`, HOME, and cache state, mounts only the owned worktree read-write, and does not expose sibling worktrees or Nawabari control paths. Network mode is explicitly `inherited`, not isolated. Required Linux capabilities fail closed when unavailable; optional Landlock and cgroups v2 provide defense in depth when available.
|
|
304
|
-
|
|
305
|
-
Protected execution defaults to the strict `development` runtime profile. Only declared Node, Git, and the deterministic `ls` baseline utility are projected through `/nawabari/bin`; `/usr`, `/bin`, `/nix/store`, the host home, and local user-tool directories are not implicitly visible. pnpm is an explicit opt-in development requirement. Compatibility is available only through the explicit `--runtime-policy compatibility` option.
|
|
306
|
-
|
|
307
|
-
```bash
|
|
308
|
-
git nawabari doctor --json
|
|
60
|
+
nawabari session close --session "$session_id" --json
|
|
61
|
+
nawabari gc --dry-run --json
|
|
62
|
+
nawabari doctor --json
|
|
309
63
|
```
|
|
310
64
|
|
|
311
|
-
See [
|
|
65
|
+
See [current CLI workflows](docs/reference/cli-workflows.md) for bounded working sets, auxiliary state, claims,
|
|
66
|
+
Git mutation, explicit discard, reconciliation, and bootstrap retry. Target park/resume semantics are documented in
|
|
67
|
+
[session lifecycle](docs/architecture/session-lifecycle.md), not advertised here as implemented commands.
|
|
312
68
|
|
|
313
|
-
##
|
|
69
|
+
## Execution guarantees
|
|
314
70
|
|
|
315
|
-
|
|
71
|
+
An ordinary session is an ownership boundary, not automatic OS isolation. Direct edits by a host process with ambient
|
|
72
|
+
permissions remain outside the mediated-operation guarantee.
|
|
73
|
+
Protected execution requires the selected Linux sandbox and explicit runtime material. Managed execution additionally
|
|
74
|
+
uses durable execution ownership, launch admission, and owned process/cgroup evidence. These are separate capabilities;
|
|
75
|
+
a generic sandbox-ready result does not prove managed-runtime readiness.
|
|
316
76
|
|
|
317
77
|
```bash
|
|
318
|
-
nawabari
|
|
319
|
-
nawabari --version --json
|
|
320
|
-
nawabari session create --help --json
|
|
321
|
-
nawabari session inspect --help --json
|
|
322
|
-
nawabari session reconcile --help --json
|
|
323
|
-
nawabari commit --help --json
|
|
78
|
+
nawabari session run --session "$session_id" --runtime-policy strict -- node worker.js
|
|
324
79
|
```
|
|
325
80
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
81
|
+
Strict execution does not silently fall back to host PATH, HOME, broad mounts, or compatibility mode.
|
|
82
|
+
Network mode remains `inherited`; filesystem isolation does not imply isolation from host loopback services.
|
|
83
|
+
See [runtime/process](docs/architecture/runtime-process.md), [runtime reference](docs/reference/runtime-projection.md),
|
|
84
|
+
and [security policy](SECURITY.md) before interpreting a capability or isolation claim.
|
|
329
85
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
`src/cli-command-registry.ts` is the single canonical authority for that surface: every command/option name is a `CommandId`/`OptionId` literal type derived directly from the registry data (not hand-typed), and `--help`, `capabilities`, and the executable dispatcher's own accepted-flag parsing all read that same data. There is no second command or option table to keep in sync.
|
|
333
|
-
|
|
334
|
-
### Optional machine-local Control Server
|
|
86
|
+
## Optional local Control Server
|
|
335
87
|
|
|
336
88
|
```bash
|
|
337
|
-
nawabari server
|
|
89
|
+
nawabari server
|
|
90
|
+
nawabari server --port 47472
|
|
338
91
|
```
|
|
339
92
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
One listener serves every locally known Nawabari repository. Repository discovery uses a machine-local locator catalog (`$XDG_STATE_HOME/nawabari/control-repositories.json`, default `~/.local/state/nawabari/`) that holds only repository identity (common Git directory) and worktree path; `session create` and `server` record the current repository when it already has a Nawabari registry. The catalog is discovery metadata, not authority: each request reopens that repository's own backend, and each repository's registry, lifecycle, claims, runtime and filesystem authority stay independent.
|
|
93
|
+
The current foreground server binds only `127.0.0.1`, defaults to port `47471`, and serves known repositories through one
|
|
94
|
+
browser endpoint. CLI and TUI work without it. Stop it with Ctrl-C or SIGTERM.
|
|
343
95
|
|
|
344
|
-
|
|
96
|
+
**Current limitation:** the implementation audited for this adoption bootstraps its control token into the unauthenticated
|
|
97
|
+
root document. With inherited host networking, this is not an isolation boundary against untrusted local/protected
|
|
98
|
+
processes. Do not treat concurrent untrusted workloads and this server as a securely separated operator interface.
|
|
99
|
+
The accepted target requires trusted-host-only credential delivery; that repair remains implementation work.
|
|
100
|
+
Different ports also do not currently enforce the accepted machine/user singleton requirement.
|
|
345
101
|
|
|
346
|
-
|
|
102
|
+
The [control-surfaces contract](docs/architecture/control-surfaces.md) defines authentication, lifecycle, discovery,
|
|
103
|
+
concurrency, and projection boundaries without turning this optional server into a remote control plane.
|
|
347
104
|
|
|
348
|
-
##
|
|
349
|
-
|
|
350
|
-
Node consumers can use public projections without spawning the CLI:
|
|
105
|
+
## Public Node projections
|
|
351
106
|
|
|
352
107
|
```js
|
|
353
|
-
import {
|
|
354
|
-
availableNawabariCommands,
|
|
355
|
-
classifyNawabariState,
|
|
356
|
-
getNawabariSessionStateSnapshot,
|
|
357
|
-
nawabariTransitionDecision,
|
|
358
|
-
} from "nawabari/state";
|
|
359
|
-
|
|
108
|
+
import { getNawabariSessionStateSnapshot } from "nawabari/state";
|
|
360
109
|
import { nawabariMachineContract } from "nawabari/contract";
|
|
361
|
-
|
|
362
|
-
import { generateNawabariProductStateManifest, serializeNawabariProductStateManifest } from "nawabari/manifest";
|
|
110
|
+
import { generateNawabariProductStateManifest } from "nawabari/manifest";
|
|
363
111
|
```
|
|
364
112
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
These exports do not grant mutation authority and do not expose raw XState machines, actor references, internal state-node IDs, private context, or `dist/` deep imports. Mutations still go through authoritative runtime paths. See [XState state architecture](docs/architecture/xstate-state-architecture.md).
|
|
368
|
-
|
|
369
|
-
## Further reading
|
|
113
|
+
These exports expose read/classification/contract projections, not mutation permission or raw XState actors.
|
|
114
|
+
Do not deep-import private `dist` modules as a supported API.
|
|
370
115
|
|
|
371
|
-
|
|
372
|
-
- [Standalone Linux compatibility](docs/standalone-linux-compatibility.md): protected-execution compatibility and conformance details.
|
|
373
|
-
- [Release notes](docs/releases/): version-specific changes and migration context.
|
|
374
|
-
- [Contributing](CONTRIBUTING.md): development workflow and repository conventions.
|
|
375
|
-
- [Security policy](SECURITY.md): vulnerability reporting.
|
|
116
|
+
## Documentation and development
|
|
376
117
|
|
|
377
|
-
|
|
118
|
+
Start with the [documentation map](docs/index.md), [contribution workflow](CONTRIBUTING.md), and
|
|
119
|
+
[release history](docs/releases/). Development uses the exact `packageManager` declaration in `package.json`.
|
|
378
120
|
|
|
379
121
|
```bash
|
|
380
122
|
pnpm install --frozen-lockfile
|
|
381
|
-
pnpm run
|
|
382
|
-
pnpm run lint
|
|
383
|
-
pnpm run typecheck
|
|
384
|
-
pnpm test
|
|
123
|
+
pnpm run verify
|
|
385
124
|
```
|
|
386
125
|
|
|
387
|
-
|
|
126
|
+
Verification includes package and environment-dependent proofs. A missing sandbox, runtime material, or delegated cgroup
|
|
127
|
+
is not a successful security test. See the [proof matrix](docs/architecture/verification-provenance.md).
|
|
@@ -51,6 +51,66 @@ export declare const GLOBAL_HELP_OPTIONS: readonly [{
|
|
|
51
51
|
* second copy.
|
|
52
52
|
*/
|
|
53
53
|
declare const REGISTRY_DATA: readonly [{
|
|
54
|
+
readonly name: "verification snapshot";
|
|
55
|
+
readonly summary: "Read the current owned session verification policy fence";
|
|
56
|
+
readonly usage: "nawabari verification snapshot --session <id>";
|
|
57
|
+
readonly options: readonly [{
|
|
58
|
+
name: "--session";
|
|
59
|
+
description: string;
|
|
60
|
+
} & {
|
|
61
|
+
readonly value: "<id>";
|
|
62
|
+
readonly required: true;
|
|
63
|
+
}];
|
|
64
|
+
readonly notes: readonly ["Read-only; the returned snapshot grants no execution authority and is revalidated by the execution owner."];
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "verification execute";
|
|
67
|
+
readonly summary: "Execute a source-bound verifier through the owned protected session";
|
|
68
|
+
readonly usage: "nawabari verification execute --request-file <path>";
|
|
69
|
+
readonly options: readonly [{
|
|
70
|
+
name: "--request-file";
|
|
71
|
+
description: string;
|
|
72
|
+
} & {
|
|
73
|
+
readonly value: "<path>";
|
|
74
|
+
readonly required: true;
|
|
75
|
+
}];
|
|
76
|
+
readonly notes: readonly ["Uses strict managed admission and a read-only invocation-local profile. Unknown currentness or cleanup cannot pass; there is no unmanaged fallback."];
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "verification candidate-paths";
|
|
79
|
+
readonly summary: "Resolve deterministic owner-bound candidate bundle transfer paths";
|
|
80
|
+
readonly usage: "nawabari verification candidate-paths --request-file <path>";
|
|
81
|
+
readonly options: readonly [{
|
|
82
|
+
name: "--request-file";
|
|
83
|
+
description: string;
|
|
84
|
+
} & {
|
|
85
|
+
readonly value: "<path>";
|
|
86
|
+
readonly required: true;
|
|
87
|
+
}];
|
|
88
|
+
readonly notes: readonly ["Read-only; requires the exact current session snapshot and returns only paths derived from the owned worktree and candidate identities."];
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "verification stage-candidate";
|
|
91
|
+
readonly summary: "Stage an exact Git candidate into the owned session verifier working set";
|
|
92
|
+
readonly usage: "nawabari verification stage-candidate --request-file <path>";
|
|
93
|
+
readonly options: readonly [{
|
|
94
|
+
name: "--request-file";
|
|
95
|
+
description: string;
|
|
96
|
+
} & {
|
|
97
|
+
readonly value: "<path>";
|
|
98
|
+
readonly required: true;
|
|
99
|
+
}];
|
|
100
|
+
readonly notes: readonly ["Imports only the declared current bundle through strict managed execution after an exact session snapshot CAS.", "The request contains no filesystem path; the bundle location is derived from the owned session worktree and SHA-256 identity."];
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "verification release-candidate";
|
|
103
|
+
readonly summary: "Drain the owned session and release one verified candidate scratch tree";
|
|
104
|
+
readonly usage: "nawabari verification release-candidate --request-file <path>";
|
|
105
|
+
readonly options: readonly [{
|
|
106
|
+
name: "--request-file";
|
|
107
|
+
description: string;
|
|
108
|
+
} & {
|
|
109
|
+
readonly value: "<path>";
|
|
110
|
+
readonly required: true;
|
|
111
|
+
}];
|
|
112
|
+
readonly notes: readonly ["Requires the exact current owner snapshot, waits for closed-admission owned-scope emptiness, and removes only the clean deterministic candidate source subtree.", "Dirty, nested, symlinked, wrong-owner, or unexpected recoverable candidate data blocks release and remains available for recovery."];
|
|
113
|
+
}, {
|
|
54
114
|
readonly name: "session create";
|
|
55
115
|
readonly summary: "Request a new Nawabari session";
|
|
56
116
|
readonly usage: string;
|
|
@@ -317,7 +377,7 @@ declare const REGISTRY_DATA: readonly [{
|
|
|
317
377
|
} & {
|
|
318
378
|
readonly value: "<action-id>";
|
|
319
379
|
readonly required: true;
|
|
320
|
-
readonly values: readonly
|
|
380
|
+
readonly values: readonly import("./domain/session-actions.js").SessionActionId[];
|
|
321
381
|
}, {
|
|
322
382
|
name: "--token";
|
|
323
383
|
description: string;
|
|
@@ -708,7 +768,7 @@ declare const REGISTRY_DATA: readonly [{
|
|
|
708
768
|
}, {
|
|
709
769
|
readonly name: "session close";
|
|
710
770
|
readonly summary: "Close the current or selected session";
|
|
711
|
-
readonly usage: "nawabari session close [<session-id>|--session <id>] [--integrated-revision <rev>] [--fetch-remote <name> --fetch-branch <branch>]";
|
|
771
|
+
readonly usage: "nawabari session close [<session-id>|--session <id>] [--drain-policy <wait|terminate>] [--integrated-revision <rev>] [--fetch-remote <name> --fetch-branch <branch>]";
|
|
712
772
|
readonly options: readonly [{
|
|
713
773
|
name: "--session";
|
|
714
774
|
description: string;
|
|
@@ -729,8 +789,15 @@ declare const REGISTRY_DATA: readonly [{
|
|
|
729
789
|
description: string;
|
|
730
790
|
} & {
|
|
731
791
|
readonly value: "<branch>";
|
|
792
|
+
}, {
|
|
793
|
+
name: "--drain-policy";
|
|
794
|
+
description: string;
|
|
795
|
+
} & {
|
|
796
|
+
readonly value: "<wait|terminate>";
|
|
797
|
+
readonly default: "wait";
|
|
798
|
+
readonly values: readonly ["wait", "terminate"];
|
|
732
799
|
}];
|
|
733
|
-
readonly notes: readonly ["Ordinary ancestry-based close remains the cheap/default path and requires no flags.", "Network access is never implicit; --fetch-remote and --fetch-branch are accepted only with a full lowercase --integrated-revision SHA.", "Fetch updates only a disposable internal proof ref with no tags, FETCH_HEAD, tracking-ref, or local integration-branch changes; remote tip races fail closed.", "Nawabari never calls provider APIs such as GitHub; only explicit --fetch-remote/--fetch-branch options connect to the configured Git remote.", "Target grammar: optional first positional <session-id> is an alias for --session <id>; do not supply both."];
|
|
800
|
+
readonly notes: readonly ["Ordinary ancestry-based close remains the cheap/default path and requires no flags.", "The default drain policy waits; terminate is explicit and targets only exact owned execution scopes after session admission is closed and ownership is revalidated.", "Network access is never implicit; --fetch-remote and --fetch-branch are accepted only with a full lowercase --integrated-revision SHA.", "Fetch updates only a disposable internal proof ref with no tags, FETCH_HEAD, tracking-ref, or local integration-branch changes; remote tip races fail closed.", "Nawabari never calls provider APIs such as GitHub; only explicit --fetch-remote/--fetch-branch options connect to the configured Git remote.", "Target grammar: optional first positional <session-id> is an alias for --session <id>; do not supply both."];
|
|
734
801
|
}, {
|
|
735
802
|
readonly name: "session discard";
|
|
736
803
|
readonly summary: "Explicitly discard one selected session and its owned resources";
|