nawabari 0.10.3 → 0.12.2

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 (260) hide show
  1. package/README.md +110 -29
  2. package/dist/cli-command-registry.d.ts +1102 -2
  3. package/dist/cli-command-registry.js +262 -4
  4. package/dist/cli-command-registry.js.map +1 -1
  5. package/dist/cli.d.ts +25 -11
  6. package/dist/cli.js +717 -134
  7. package/dist/cli.js.map +1 -1
  8. package/dist/contract.d.ts +6 -0
  9. package/dist/contract.js +294 -7
  10. package/dist/contract.js.map +1 -1
  11. package/dist/coordination-admission.d.ts +1 -0
  12. package/dist/coordination-admission.js +2 -0
  13. package/dist/coordination-admission.js.map +1 -0
  14. package/dist/coordination-preview.d.ts +107 -0
  15. package/dist/coordination-preview.js +401 -0
  16. package/dist/coordination-preview.js.map +1 -0
  17. package/dist/coordination-transactions.d.ts +131 -0
  18. package/dist/coordination-transactions.js +538 -0
  19. package/dist/coordination-transactions.js.map +1 -0
  20. package/dist/domain/auxiliary-state-policy.d.ts +98 -0
  21. package/dist/domain/auxiliary-state-policy.js +545 -0
  22. package/dist/domain/auxiliary-state-policy.js.map +1 -0
  23. package/dist/domain/auxiliary-state-projection.d.ts +83 -0
  24. package/dist/domain/auxiliary-state-projection.js +265 -0
  25. package/dist/domain/auxiliary-state-projection.js.map +1 -0
  26. package/dist/domain/cgroups-v2.d.ts +40 -2
  27. package/dist/domain/cgroups-v2.js +128 -22
  28. package/dist/domain/cgroups-v2.js.map +1 -1
  29. package/dist/domain/errors.d.ts +2 -2
  30. package/dist/domain/errors.js +1 -0
  31. package/dist/domain/errors.js.map +1 -1
  32. package/dist/domain/fhs-development-runtime.d.ts +14 -1
  33. package/dist/domain/fhs-development-runtime.js +206 -8
  34. package/dist/domain/fhs-development-runtime.js.map +1 -1
  35. package/dist/domain/filesystem-enforcement-integration.d.ts +23 -0
  36. package/dist/domain/filesystem-enforcement-integration.js +34 -0
  37. package/dist/domain/filesystem-enforcement-integration.js.map +1 -0
  38. package/dist/domain/filesystem-policy-decision.d.ts +66 -0
  39. package/dist/domain/filesystem-policy-decision.js +203 -0
  40. package/dist/domain/filesystem-policy-decision.js.map +1 -0
  41. package/dist/domain/filesystem-policy-enforcement.d.ts +52 -0
  42. package/dist/domain/filesystem-policy-enforcement.js +340 -0
  43. package/dist/domain/filesystem-policy-enforcement.js.map +1 -0
  44. package/dist/domain/filesystem-policy-evidence.d.ts +128 -0
  45. package/dist/domain/filesystem-policy-evidence.js +791 -0
  46. package/dist/domain/filesystem-policy-evidence.js.map +1 -0
  47. package/dist/domain/filesystem-policy-materialization.d.ts +132 -0
  48. package/dist/domain/filesystem-policy-materialization.js +704 -0
  49. package/dist/domain/filesystem-policy-materialization.js.map +1 -0
  50. package/dist/domain/filesystem-policy-revision.d.ts +58 -0
  51. package/dist/domain/filesystem-policy-revision.js +199 -0
  52. package/dist/domain/filesystem-policy-revision.js.map +1 -0
  53. package/dist/domain/filesystem-policy.d.ts +146 -0
  54. package/dist/domain/filesystem-policy.js +942 -0
  55. package/dist/domain/filesystem-policy.js.map +1 -0
  56. package/dist/domain/landlock.d.ts +1 -0
  57. package/dist/domain/landlock.js +1 -1
  58. package/dist/domain/landlock.js.map +1 -1
  59. package/dist/domain/runtime-projection.d.ts +3 -0
  60. package/dist/domain/runtime-projection.js +10 -1
  61. package/dist/domain/runtime-projection.js.map +1 -1
  62. package/dist/domain/runtime-provider-declared.d.ts +98 -0
  63. package/dist/domain/runtime-provider-declared.js +416 -0
  64. package/dist/domain/runtime-provider-declared.js.map +1 -0
  65. package/dist/domain/runtime-resolution.d.ts +4 -0
  66. package/dist/domain/runtime-resolution.js +91 -1
  67. package/dist/domain/runtime-resolution.js.map +1 -1
  68. package/dist/domain/sandbox-launcher.d.ts +15 -2
  69. package/dist/domain/sandbox-launcher.js +514 -104
  70. package/dist/domain/sandbox-launcher.js.map +1 -1
  71. package/dist/domain/sandbox.d.ts +9 -1
  72. package/dist/domain/sandbox.js +46 -3
  73. package/dist/domain/sandbox.js.map +1 -1
  74. package/dist/domain/session-admission-decision.d.ts +67 -0
  75. package/dist/domain/session-admission-decision.js +200 -0
  76. package/dist/domain/session-admission-decision.js.map +1 -0
  77. package/dist/domain/session-backend.d.ts +40 -4
  78. package/dist/domain/session-backend.js +645 -36
  79. package/dist/domain/session-backend.js.map +1 -1
  80. package/dist/domain/session-bootstrap.d.ts +11 -0
  81. package/dist/domain/session-bootstrap.js +292 -0
  82. package/dist/domain/session-bootstrap.js.map +1 -0
  83. package/dist/domain/session-console.d.ts +119 -0
  84. package/dist/domain/session-console.js +600 -0
  85. package/dist/domain/session-console.js.map +1 -0
  86. package/dist/domain/session-environment.d.ts +114 -0
  87. package/dist/domain/session-environment.js +563 -0
  88. package/dist/domain/session-environment.js.map +1 -0
  89. package/dist/domain/session-execution-control.d.ts +114 -0
  90. package/dist/domain/session-execution-control.js +517 -0
  91. package/dist/domain/session-execution-control.js.map +1 -0
  92. package/dist/domain/session-execution-record.d.ts +163 -0
  93. package/dist/domain/session-execution-record.js +524 -0
  94. package/dist/domain/session-execution-record.js.map +1 -0
  95. package/dist/domain/session-git-hooks.d.ts +145 -0
  96. package/dist/domain/session-git-hooks.js +789 -0
  97. package/dist/domain/session-git-hooks.js.map +1 -0
  98. package/dist/domain/session-launch-supervisor-worker.d.ts +19 -0
  99. package/dist/domain/session-launch-supervisor-worker.js +261 -0
  100. package/dist/domain/session-launch-supervisor-worker.js.map +1 -0
  101. package/dist/domain/session-launch-supervisor.d.ts +142 -0
  102. package/dist/domain/session-launch-supervisor.js +591 -0
  103. package/dist/domain/session-launch-supervisor.js.map +1 -0
  104. package/dist/domain/session-process-observation.d.ts +84 -0
  105. package/dist/domain/session-process-observation.js +196 -0
  106. package/dist/domain/session-process-observation.js.map +1 -0
  107. package/dist/domain/session-protected-launch.d.ts +68 -0
  108. package/dist/domain/session-protected-launch.js +335 -0
  109. package/dist/domain/session-protected-launch.js.map +1 -0
  110. package/dist/domain/session-resource-accounting.d.ts +39 -0
  111. package/dist/domain/session-resource-accounting.js +183 -0
  112. package/dist/domain/session-resource-accounting.js.map +1 -0
  113. package/dist/domain/session.d.ts +151 -0
  114. package/dist/domain/session.js +3 -0
  115. package/dist/domain/session.js.map +1 -1
  116. package/dist/domain/shell-runtime.d.ts +22 -0
  117. package/dist/domain/shell-runtime.js +38 -0
  118. package/dist/domain/shell-runtime.js.map +1 -0
  119. package/dist/domain/working-set-runtime-projection.d.ts +29 -0
  120. package/dist/domain/working-set-runtime-projection.js +254 -0
  121. package/dist/domain/working-set-runtime-projection.js.map +1 -0
  122. package/dist/domain/worktree-file-operation-helper.d.ts +10 -0
  123. package/dist/domain/worktree-file-operation-helper.js +255 -0
  124. package/dist/domain/worktree-file-operation-helper.js.map +1 -0
  125. package/dist/domain/worktree-file-operation.d.ts +116 -0
  126. package/dist/domain/worktree-file-operation.js +529 -0
  127. package/dist/domain/worktree-file-operation.js.map +1 -0
  128. package/dist/domain/worktree-profile-builtins.d.ts +41 -0
  129. package/dist/domain/worktree-profile-builtins.js +239 -0
  130. package/dist/domain/worktree-profile-builtins.js.map +1 -0
  131. package/dist/domain/worktree-profile-catalog.d.ts +21 -0
  132. package/dist/domain/worktree-profile-catalog.js +163 -0
  133. package/dist/domain/worktree-profile-catalog.js.map +1 -0
  134. package/dist/domain/worktree-profile-inspection.d.ts +77 -0
  135. package/dist/domain/worktree-profile-inspection.js +114 -0
  136. package/dist/domain/worktree-profile-inspection.js.map +1 -0
  137. package/dist/domain/worktree-profile-overrides.d.ts +67 -0
  138. package/dist/domain/worktree-profile-overrides.js +685 -0
  139. package/dist/domain/worktree-profile-overrides.js.map +1 -0
  140. package/dist/domain/worktree-profile-pinning.d.ts +47 -0
  141. package/dist/domain/worktree-profile-pinning.js +96 -0
  142. package/dist/domain/worktree-profile-pinning.js.map +1 -0
  143. package/dist/domain/worktree-profile-runtime.d.ts +72 -0
  144. package/dist/domain/worktree-profile-runtime.js +221 -0
  145. package/dist/domain/worktree-profile-runtime.js.map +1 -0
  146. package/dist/domain/worktree-profile-scope.d.ts +54 -0
  147. package/dist/domain/worktree-profile-scope.js +285 -0
  148. package/dist/domain/worktree-profile-scope.js.map +1 -0
  149. package/dist/domain/worktree-runtime-profile.d.ts +99 -0
  150. package/dist/domain/worktree-runtime-profile.js +505 -0
  151. package/dist/domain/worktree-runtime-profile.js.map +1 -0
  152. package/dist/errors.d.ts +1 -1
  153. package/dist/errors.js.map +1 -1
  154. package/dist/failure-code-vocabulary.d.ts +7 -2
  155. package/dist/failure-code-vocabulary.js +85 -1
  156. package/dist/failure-code-vocabulary.js.map +1 -1
  157. package/dist/git.d.ts +2 -0
  158. package/dist/git.js +18 -0
  159. package/dist/git.js.map +1 -1
  160. package/dist/index.d.ts +2 -1
  161. package/dist/index.js +2 -0
  162. package/dist/index.js.map +1 -1
  163. package/dist/public-contract.d.ts +18 -0
  164. package/dist/public-contract.js +42 -0
  165. package/dist/public-contract.js.map +1 -1
  166. package/dist/public-state.d.ts +21 -0
  167. package/dist/public-state.js +25 -0
  168. package/dist/public-state.js.map +1 -1
  169. package/dist/registry/file-operation-record.d.ts +169 -0
  170. package/dist/registry/file-operation-record.js +634 -0
  171. package/dist/registry/file-operation-record.js.map +1 -0
  172. package/dist/registry/runtime-records.d.ts +59 -0
  173. package/dist/registry/runtime-records.js +426 -0
  174. package/dist/registry/runtime-records.js.map +1 -0
  175. package/dist/repository-runtime-observations.d.ts +56 -0
  176. package/dist/repository-runtime-observations.js +388 -0
  177. package/dist/repository-runtime-observations.js.map +1 -0
  178. package/dist/repository-runtime-snapshot.d.ts +52 -0
  179. package/dist/repository-runtime-snapshot.js +170 -0
  180. package/dist/repository-runtime-snapshot.js.map +1 -0
  181. package/dist/resource-claims.d.ts +31 -7
  182. package/dist/resource-claims.js +68 -15
  183. package/dist/resource-claims.js.map +1 -1
  184. package/dist/resource-coordination-cli.d.ts +9 -0
  185. package/dist/resource-coordination-cli.js +199 -0
  186. package/dist/resource-coordination-cli.js.map +1 -0
  187. package/dist/resource-coordination-evidence.d.ts +185 -0
  188. package/dist/resource-coordination-evidence.js +750 -0
  189. package/dist/resource-coordination-evidence.js.map +1 -0
  190. package/dist/resource-coordination-snapshot.d.ts +181 -0
  191. package/dist/resource-coordination-snapshot.js +433 -0
  192. package/dist/resource-coordination-snapshot.js.map +1 -0
  193. package/dist/resource-coordination-view.d.ts +60 -0
  194. package/dist/resource-coordination-view.js +342 -0
  195. package/dist/resource-coordination-view.js.map +1 -0
  196. package/dist/resource-coordination.d.ts +125 -0
  197. package/dist/resource-coordination.js +482 -0
  198. package/dist/resource-coordination.js.map +1 -0
  199. package/dist/resource-handoff-execution.d.ts +14 -0
  200. package/dist/resource-handoff-execution.js +111 -0
  201. package/dist/resource-handoff-execution.js.map +1 -0
  202. package/dist/resource-handoff.d.ts +172 -0
  203. package/dist/resource-handoff.js +576 -0
  204. package/dist/resource-handoff.js.map +1 -0
  205. package/dist/resource-merge-decision.d.ts +54 -0
  206. package/dist/resource-merge-decision.js +287 -0
  207. package/dist/resource-merge-decision.js.map +1 -0
  208. package/dist/resource-text-merge.d.ts +63 -0
  209. package/dist/resource-text-merge.js +254 -0
  210. package/dist/resource-text-merge.js.map +1 -0
  211. package/dist/session-attention.d.ts +41 -0
  212. package/dist/session-attention.js +226 -0
  213. package/dist/session-attention.js.map +1 -0
  214. package/dist/session-console-cli.d.ts +38 -0
  215. package/dist/session-console-cli.js +132 -0
  216. package/dist/session-console-cli.js.map +1 -0
  217. package/dist/session-lifecycle-actions.d.ts +14 -0
  218. package/dist/session-lifecycle-actions.js +15 -0
  219. package/dist/session-lifecycle-actions.js.map +1 -1
  220. package/dist/session-parking.d.ts +54 -0
  221. package/dist/session-parking.js +348 -0
  222. package/dist/session-parking.js.map +1 -0
  223. package/dist/session-registry.d.ts +332 -21
  224. package/dist/session-registry.js +2549 -100
  225. package/dist/session-registry.js.map +1 -1
  226. package/dist/session-retention.d.ts +211 -0
  227. package/dist/session-retention.js +428 -0
  228. package/dist/session-retention.js.map +1 -0
  229. package/dist/session-runtime-history.d.ts +26 -0
  230. package/dist/session-runtime-history.js +48 -0
  231. package/dist/session-runtime-history.js.map +1 -0
  232. package/dist/session-runtime-lifecycle.d.ts +142 -0
  233. package/dist/session-runtime-lifecycle.js +188 -0
  234. package/dist/session-runtime-lifecycle.js.map +1 -0
  235. package/dist/session-runtime-reconciliation.d.ts +22 -0
  236. package/dist/session-runtime-reconciliation.js +159 -0
  237. package/dist/session-runtime-reconciliation.js.map +1 -0
  238. package/dist/state/session/machine.d.ts +2 -2
  239. package/dist/ui/repository-screen.d.ts +59 -0
  240. package/dist/ui/repository-screen.js +323 -0
  241. package/dist/ui/repository-screen.js.map +1 -0
  242. package/dist/ui/repository-terminal.d.ts +42 -0
  243. package/dist/ui/repository-terminal.js +414 -0
  244. package/dist/ui/repository-terminal.js.map +1 -0
  245. package/dist/ui/session-actions.d.ts +77 -0
  246. package/dist/ui/session-actions.js +711 -0
  247. package/dist/ui/session-actions.js.map +1 -0
  248. package/dist/verification-executor.d.ts +78 -0
  249. package/dist/verification-executor.js +299 -0
  250. package/dist/verification-executor.js.map +1 -0
  251. package/dist/working-set.d.ts +160 -0
  252. package/dist/working-set.js +525 -0
  253. package/dist/working-set.js.map +1 -0
  254. package/dist/worktree-file-operation-cli.d.ts +68 -0
  255. package/dist/worktree-file-operation-cli.js +470 -0
  256. package/dist/worktree-file-operation-cli.js.map +1 -0
  257. package/dist/worktree-profile-cli.d.ts +105 -0
  258. package/dist/worktree-profile-cli.js +389 -0
  259. package/dist/worktree-profile-cli.js.map +1 -0
  260. package/package.json +7 -7
@@ -24,14 +24,1113 @@ export type CliCommandDefinition = {
24
24
  readonly options: readonly CliHelpOptionSpec[];
25
25
  readonly notes?: readonly string[];
26
26
  };
27
- export declare const GLOBAL_HELP_OPTIONS: readonly CliHelpOptionSpec[];
27
+ export declare const GLOBAL_HELP_OPTIONS: readonly [{
28
+ readonly name: "--json";
29
+ readonly description: "Emit one stable JSON document on stdout";
30
+ }, {
31
+ readonly name: "--help";
32
+ readonly aliases: readonly ["-h"];
33
+ readonly description: "Show command-specific help";
34
+ }, {
35
+ readonly name: "--version";
36
+ readonly description: "Print the installed version";
37
+ }];
28
38
  /**
29
39
  * Canonical public command/discovery registry.
30
40
  *
31
41
  * Dispatcher implementation deliberately remains below in this module. This
32
42
  * registry only describes the public discovery surface; aliases point at the
33
43
  * canonical command so option metadata cannot drift between projections.
44
+ *
45
+ * `as const satisfies` on the underlying data (rather than a
46
+ * `: readonly CliCommandDefinition[]` annotation) keeps every command/option
47
+ * name as its own literal type so `CommandId`/`OptionId` below can be
48
+ * derived from this data instead of hand-typed as a second identity list.
49
+ * `CLI_COMMAND_REGISTRY` itself keeps the wider `CliCommandDefinition[]`
50
+ * view every existing consumer already expects; it is the same array, not a
51
+ * second copy.
52
+ */
53
+ declare const REGISTRY_DATA: readonly [{
54
+ readonly name: "session create";
55
+ readonly summary: "Request a new Nawabari session";
56
+ readonly usage: string;
57
+ readonly options: readonly [{
58
+ name: "--branch";
59
+ description: string;
60
+ } & {
61
+ readonly value: "<name>";
62
+ readonly default: "nawabari/session/<session_id>";
63
+ }, {
64
+ name: "--worktree";
65
+ description: string;
66
+ } & {
67
+ readonly value: "<path>";
68
+ readonly default: "<managed_worktree_root>/<repository>-<session_id>";
69
+ }, {
70
+ name: "--worktree-root";
71
+ description: string;
72
+ } & {
73
+ readonly value: "<path>";
74
+ readonly default: "<repository-parent>/.nawabari/worktrees";
75
+ }, {
76
+ name: "--base";
77
+ description: string;
78
+ } & {
79
+ readonly value: "<ref>";
80
+ readonly default: "HEAD";
81
+ }, {
82
+ name: "--label";
83
+ description: string;
84
+ } & {
85
+ readonly value: "<text>";
86
+ readonly default: "omitted";
87
+ }, {
88
+ name: "--profile";
89
+ description: string;
90
+ } & {
91
+ readonly value: "<id>";
92
+ }, {
93
+ name: "--profile-parameter";
94
+ description: string;
95
+ } & {
96
+ readonly value: "<json>";
97
+ }, {
98
+ name: "--resource";
99
+ description: string;
100
+ } & {
101
+ readonly value: "<path-or-glob>";
102
+ readonly repeatable: true;
103
+ }, {
104
+ name: "--mode";
105
+ description: string;
106
+ } & {
107
+ readonly value: "<read|write|exclusive-write>";
108
+ readonly repeatable: true;
109
+ }, {
110
+ name: "--auxiliary-state";
111
+ description: string;
112
+ } & {
113
+ readonly value: "<json>";
114
+ readonly repeatable: true;
115
+ }, {
116
+ name: "--execution-scope-file";
117
+ description: string;
118
+ } & {
119
+ readonly value: "<path>";
120
+ }, {
121
+ name: "--candidate-working-set-file";
122
+ description: string;
123
+ } & {
124
+ readonly value: "<path>";
125
+ }, {
126
+ name: "--enforce-claims";
127
+ description: string;
128
+ } & CliHelpOptionSpec];
129
+ readonly notes: readonly ["All create options are optional. Use status --json to discover managed_worktree_root.", "--worktree and --worktree-root cannot be combined.", "--profile-parameter requires --profile; ambiguous unqualified profile ids are rejected.", "Initial claims are provisioned atomically with the session; each --resource must be immediately followed by its own --mode, and zero pairs remains backward compatible.", "Resource-claim enforcement is disabled by default; pass --enforce-claims to require claims for commit/push authorization on this session. Worktree and branch ownership, and claim conflicts against other sessions, remain enforced regardless.", "Providing one bounded working-set artifact requires the other; both are validated before worktree ownership is established.", "A claim conflict returns blocking-owner evidence. A durability-uncertain result is retry-safe only after re-reading the reported registry state; an existing owner is never silently adopted.", "Without an override, Nawabari creates the safe managed root <repository-parent>/.nawabari/worktrees on first use. Existing absolute worktree paths directly under the repository parent remain accepted for compatibility."];
130
+ }, {
131
+ readonly name: "session id";
132
+ readonly summary: "Resolve the current session identity";
133
+ readonly usage: "nawabari session id";
134
+ readonly options: readonly [];
135
+ }, {
136
+ readonly name: "profile list";
137
+ readonly summary: "List built-in worktree runtime profiles";
138
+ readonly usage: "nawabari profile list";
139
+ readonly options: readonly [];
140
+ readonly notes: readonly ["Built-in and repository profile namespaces remain distinct; collisions are reported rather than overwritten."];
141
+ }, {
142
+ readonly name: "profile show";
143
+ readonly summary: "Show one worktree runtime profile";
144
+ readonly usage: "nawabari profile show --profile <id>";
145
+ readonly options: readonly [{
146
+ name: "--profile";
147
+ description: string;
148
+ } & {
149
+ readonly value: "<id>";
150
+ readonly required: true;
151
+ }];
152
+ }, {
153
+ readonly name: "session show";
154
+ readonly summary: "Show the current or selected session";
155
+ readonly usage: "nawabari session show [<session-id>|--session <id>]";
156
+ readonly options: readonly [{
157
+ name: "--session";
158
+ description: string;
159
+ } & {
160
+ readonly value: "<id>";
161
+ }];
162
+ readonly notes: readonly ["Target grammar is consistent: an optional first positional <session-id> is an alias for --session <id>; do not supply both."];
163
+ }, {
164
+ readonly name: "session inspect";
165
+ readonly summary: "Report side-effect-free close/cleanup readiness for a session";
166
+ readonly usage: "nawabari session inspect [<session-id>|--session <id>] [--integrated-revision <rev>] [--schema-version <1|2>]";
167
+ readonly options: readonly [{
168
+ name: "--session";
169
+ description: string;
170
+ } & {
171
+ readonly value: "<id>";
172
+ }, {
173
+ name: "--integrated-revision";
174
+ description: string;
175
+ } & {
176
+ readonly value: "<rev>";
177
+ }, {
178
+ name: "--schema-version";
179
+ description: string;
180
+ } & {
181
+ readonly value: "<1|2>";
182
+ readonly default: "1";
183
+ readonly values: readonly ["1", "2"];
184
+ }];
185
+ readonly notes: readonly ["Read-only: never mutates session, claim, Git, worktree, branch, or registry state. Repeated calls are idempotent.", "Derived from the same authoritative close/cleanup Git evidence as session close; does not duplicate or diverge from that logic.", "The established unqualified result is schema v1. Schema v2 exposes lifecycle and next_actions once at the top level; garbage_collection retains explicit references to those authorities. Use --schema-version 2 to opt into v2.", "Nawabari never queries GitHub or any remote provider; --integrated-revision only names a local revision for Nawabari to independently verify.", "Target grammar: optional first positional <session-id> is an alias for --session <id>; do not supply both."];
186
+ }, {
187
+ readonly name: "session scope expand";
188
+ readonly summary: "Explicitly expand a bounded session working set";
189
+ readonly usage: string;
190
+ readonly options: readonly [{
191
+ name: "--session";
192
+ description: string;
193
+ } & {
194
+ readonly value: "<id>";
195
+ readonly required: true;
196
+ }, {
197
+ name: "--repository";
198
+ description: string;
199
+ } & {
200
+ readonly value: "<id>";
201
+ readonly required: true;
202
+ }, {
203
+ name: "--repository-host";
204
+ description: string;
205
+ } & {
206
+ readonly value: "<host>";
207
+ readonly required: true;
208
+ }, {
209
+ name: "--revision";
210
+ description: string;
211
+ } & {
212
+ readonly value: "<n>";
213
+ readonly required: true;
214
+ }, {
215
+ name: "--execution-scope-file";
216
+ description: string;
217
+ } & {
218
+ readonly value: "<path>";
219
+ readonly required: true;
220
+ }, {
221
+ name: "--path";
222
+ description: string;
223
+ } & {
224
+ readonly value: "<path>";
225
+ readonly required: true;
226
+ readonly repeatable: true;
227
+ }, {
228
+ name: "--operation";
229
+ description: string;
230
+ } & {
231
+ readonly value: "<READONLY|WRITE|CREATE|DELETE>";
232
+ readonly required: true;
233
+ readonly values: readonly ["READONLY", "WRITE", "CREATE", "DELETE"];
234
+ }, {
235
+ name: "--reason";
236
+ description: string;
237
+ } & {
238
+ readonly value: "<text>";
239
+ readonly default: "explicit-working-set-expansion";
240
+ }, {
241
+ name: "--evidence";
242
+ description: string;
243
+ } & {
244
+ readonly value: "<text>";
245
+ }, {
246
+ name: "--unresolved";
247
+ description: string;
248
+ } & CliHelpOptionSpec];
249
+ readonly notes: readonly ["The current working-set revision is a mandatory CAS token; stale requests are rejected without mutation.", "READONLY is evaluated independently. Mutation classes also require the existing session claim authority.", "The execution-scope artifact must match the session's established provenance; it cannot widen Inari maximum authority."];
250
+ }, {
251
+ readonly name: "session reconcile";
252
+ readonly summary: "Apply bounded lifecycle reconciliation for one selected session";
253
+ readonly usage: "nawabari session reconcile --session <id> --apply";
254
+ readonly options: readonly [{
255
+ name: "--session";
256
+ description: string;
257
+ } & {
258
+ readonly value: "<id>";
259
+ readonly required: true;
260
+ }, {
261
+ name: "--apply";
262
+ description: string;
263
+ } & {
264
+ readonly required: true;
265
+ }];
266
+ readonly notes: readonly ["Destructive mutation requires both an explicit session target and --apply.", "Elapsed age, missing paths alone, ambiguous ownership, recoverable work, and unresolved physical evidence never authorize mutation.", "Repeating a converged request returns an explicit already-terminal result."];
267
+ }, {
268
+ readonly name: "session run";
269
+ readonly aliases: readonly ["session exec"];
270
+ readonly summary: "Run one command inside the protected session sandbox";
271
+ readonly usage: "nawabari session run [--session <id>] [--runtime-policy <strict|compatibility>] -- <command> [args...]";
272
+ readonly options: readonly [{
273
+ name: "--session";
274
+ description: string;
275
+ } & {
276
+ readonly value: "<id>";
277
+ }, {
278
+ name: "--runtime-policy";
279
+ description: string;
280
+ } & {
281
+ readonly value: "<strict|compatibility>";
282
+ readonly default: "strict";
283
+ readonly values: readonly ["strict", "compatibility"];
284
+ }];
285
+ readonly notes: readonly ["The -- terminator is mandatory. The command is passed as argv without a shell, and protected execution is fail-closed.", "session exec is an alias."];
286
+ }, {
287
+ readonly name: "session shell";
288
+ readonly summary: "Run an explicitly projected shell inside the protected session sandbox";
289
+ readonly usage: "nawabari session shell [--session <id>] [--runtime-policy <strict|compatibility>] -- <projected-shell> [args...]";
290
+ readonly options: readonly [{
291
+ name: "--session";
292
+ description: string;
293
+ } & {
294
+ readonly value: "<id>";
295
+ }, {
296
+ name: "--runtime-policy";
297
+ description: string;
298
+ } & {
299
+ readonly value: "<strict|compatibility>";
300
+ readonly default: "strict";
301
+ readonly values: readonly ["strict", "compatibility"];
302
+ }];
303
+ readonly notes: readonly ["The -- terminator is mandatory. The projected shell is resolved only through /nawabari/bin and receives inherited stdio.", "Nawabari does not parse shell syntax or select a host/default shell."];
304
+ }, {
305
+ readonly name: "session action";
306
+ readonly summary: "Dispatch one typed, currently authorized lifecycle action";
307
+ readonly usage: "nawabari session action --session <id> --action <action-id> --token <json> [--confirm --preview <json>] [--operation-id <id>]";
308
+ readonly options: readonly [{
309
+ name: "--session";
310
+ description: string;
311
+ } & {
312
+ readonly value: "<id>";
313
+ readonly required: true;
314
+ }, {
315
+ name: "--action";
316
+ description: string;
317
+ } & {
318
+ readonly value: "<action-id>";
319
+ readonly required: true;
320
+ readonly values: readonly ["retain-session", "supply-exact-integrated-revision", "retry-close-with-bounded-integration-fetch", "discard-session", "reconcile-physical-state"];
321
+ }, {
322
+ name: "--token";
323
+ description: string;
324
+ } & {
325
+ readonly value: "<json>";
326
+ readonly required: true;
327
+ }, {
328
+ name: "--confirm";
329
+ description: string;
330
+ } & CliHelpOptionSpec, {
331
+ name: "--preview";
332
+ description: string;
333
+ } & {
334
+ readonly value: "<json>";
335
+ }, {
336
+ name: "--operation-id";
337
+ description: string;
338
+ } & {
339
+ readonly value: "<id>";
340
+ }];
341
+ readonly notes: readonly ["The dispatcher re-reads canonical lifecycle and claim evidence immediately before dispatch; stale tokens fail closed.", "The action command field is descriptive metadata only and is never executed as a shell command.", "Destructive discard requires --confirm and the matching authoritative --preview."];
342
+ }, {
343
+ readonly name: "ui";
344
+ readonly summary: "Open the read-only repository runtime UI";
345
+ readonly usage: "nawabari ui";
346
+ readonly options: readonly [];
347
+ readonly notes: readonly ["The UI reads one canonical repository runtime snapshot at startup and on refresh; it never mutates registry, Git, or filesystem state.", "Non-interactive callers receive one bounded projection and may combine this command with --json."];
348
+ }, {
349
+ readonly name: "session coordination preview";
350
+ readonly summary: "Preview bounded coordination between two sessions";
351
+ readonly usage: string;
352
+ readonly options: readonly [{
353
+ name: "--left";
354
+ description: string;
355
+ } & {
356
+ readonly value: "<session-id>";
357
+ readonly required: true;
358
+ }, {
359
+ name: "--right";
360
+ description: string;
361
+ } & {
362
+ readonly value: "<session-id>";
363
+ readonly required: true;
364
+ }, {
365
+ name: "--path";
366
+ description: string;
367
+ } & {
368
+ readonly value: "<resource>";
369
+ readonly required: true;
370
+ }, {
371
+ name: "--patch";
372
+ description: string;
373
+ } & CliHelpOptionSpec, {
374
+ name: "--allow-read-path";
375
+ description: string;
376
+ } & {
377
+ readonly value: "<resource>";
378
+ readonly repeatable: true;
379
+ }, {
380
+ name: "--max-content-bytes";
381
+ description: string;
382
+ } & {
383
+ readonly value: "<n>";
384
+ }, {
385
+ name: "--max-diff-bytes";
386
+ description: string;
387
+ } & {
388
+ readonly value: "<n>";
389
+ }, {
390
+ name: "--max-diff-hunks";
391
+ description: string;
392
+ } & {
393
+ readonly value: "<n>";
394
+ }, {
395
+ name: "--max-retries";
396
+ description: string;
397
+ } & {
398
+ readonly value: "<n>";
399
+ }];
400
+ readonly notes: readonly ["Preview is read-only and metadata-only by default.", "--patch requires explicit bounded read authority for the requested path.", "Session identities are passed to the producer as session IDs; they are never Git revisions."];
401
+ }, {
402
+ readonly name: "session handoff";
403
+ readonly summary: "Transfer one resource claim between active sessions";
404
+ readonly usage: string;
405
+ readonly options: readonly [{
406
+ name: "--from";
407
+ description: string;
408
+ } & {
409
+ readonly value: "<session-id>";
410
+ readonly required: true;
411
+ }, {
412
+ name: "--to";
413
+ description: string;
414
+ } & {
415
+ readonly value: "<session-id>";
416
+ readonly required: true;
417
+ }, {
418
+ name: "--resource";
419
+ description: string;
420
+ } & {
421
+ readonly value: "<exact-resource>";
422
+ readonly required: true;
423
+ }, {
424
+ name: "--mode";
425
+ description: string;
426
+ } & {
427
+ readonly value: "<read|write|exclusive-write>";
428
+ readonly required: true;
429
+ readonly values: readonly ["read", "write", "exclusive-write"];
430
+ }, {
431
+ name: "--if-generation";
432
+ description: string;
433
+ } & {
434
+ readonly value: "<claim-set-generation>";
435
+ readonly required: true;
436
+ }, {
437
+ name: "--operation-id";
438
+ description: string;
439
+ } & {
440
+ readonly value: "<id>";
441
+ }];
442
+ readonly notes: readonly ["--from and --to are session identities and are never interpreted as Git revisions.", "A configured execution-control fence is required; absence fails closed before claim mutation."];
443
+ }, {
444
+ readonly name: "session list";
445
+ readonly summary: "List bounded repository session records";
446
+ readonly usage: "nawabari session list [--all|--history] [--limit <n>] [--offset <n>]";
447
+ readonly options: readonly [{
448
+ name: "--all";
449
+ description: string;
450
+ } & CliHelpOptionSpec, {
451
+ name: "--history";
452
+ description: string;
453
+ } & {
454
+ readonly alias_of: "--all";
455
+ }, {
456
+ name: "--limit";
457
+ description: string;
458
+ } & {
459
+ readonly value: "<n>";
460
+ readonly default: string;
461
+ readonly minimum: 1;
462
+ readonly maximum: 128;
463
+ }, {
464
+ name: "--offset";
465
+ description: string;
466
+ } & {
467
+ readonly value: "<n>";
468
+ readonly default: "0";
469
+ readonly minimum: 0;
470
+ }];
471
+ readonly notes: readonly ["Default output excludes closed records; --all and --history include closed history. Both views are bounded by --limit (default 32, maximum 128) and --offset (default 0)."];
472
+ }, {
473
+ readonly name: "session enter";
474
+ readonly summary: "Enter an active session through the protected runtime";
475
+ readonly usage: "nawabari session enter --session <id> [--runtime-policy <strict|compatibility>]";
476
+ readonly options: readonly [{
477
+ name: "--session";
478
+ description: string;
479
+ } & {
480
+ readonly value: "<id>";
481
+ }, {
482
+ name: "--runtime-policy";
483
+ description: string;
484
+ } & {
485
+ readonly value: "<strict|compatibility>";
486
+ readonly values: readonly ["strict", "compatibility"];
487
+ readonly default: "strict";
488
+ }];
489
+ }, {
490
+ readonly name: "session processes";
491
+ readonly summary: "List durable executions owned by a session";
492
+ readonly usage: "nawabari session processes --session <id>";
493
+ readonly options: readonly [{
494
+ name: "--session";
495
+ description: string;
496
+ } & {
497
+ readonly value: "<id>";
498
+ }];
499
+ }, {
500
+ readonly name: "session claim";
501
+ readonly aliases: readonly ["resource claim"];
502
+ readonly summary: "Add a canonical resource claim";
503
+ readonly usage: "nawabari session claim [<session-id>|--session <id>] [--repository <id>] --resource <path-or-glob> --mode <read|write|exclusive-write>";
504
+ readonly options: readonly [{
505
+ name: "--resource";
506
+ description: string;
507
+ } & {
508
+ readonly value: "<path-or-glob>";
509
+ readonly required: true;
510
+ }, {
511
+ name: "--mode";
512
+ description: string;
513
+ } & {
514
+ readonly value: "<read|write|exclusive-write>";
515
+ readonly required: true;
516
+ }, {
517
+ name: "--session";
518
+ description: string;
519
+ } & {
520
+ readonly value: "<id>";
521
+ }, {
522
+ name: "--repository";
523
+ description: string;
524
+ } & {
525
+ readonly value: "<id>";
526
+ }];
527
+ readonly notes: readonly ["Exactly one --resource/--mode pair is required; --mode must immediately follow its own --resource.", "Target grammar: optional first positional <session-id> is an alias for --session <id>; do not supply both.", string];
528
+ }, {
529
+ readonly name: "session update";
530
+ readonly aliases: readonly ["resource update"];
531
+ readonly summary: "Atomically replace a session's complete resource claim set";
532
+ readonly usage: "nawabari session update [<session-id>|--session <id>] [--repository <id>] --resource <path-or-glob> --mode <read|write|exclusive-write> [--resource <path-or-glob> --mode <read|write|exclusive-write> ...]";
533
+ readonly options: readonly [{
534
+ name: "--resource";
535
+ description: string;
536
+ } & {
537
+ readonly value: "<path-or-glob>";
538
+ readonly required: true;
539
+ readonly repeatable: true;
540
+ }, {
541
+ name: "--mode";
542
+ description: string;
543
+ } & {
544
+ readonly value: "<read|write|exclusive-write>";
545
+ readonly required: true;
546
+ readonly repeatable: true;
547
+ }, {
548
+ name: "--if-generation";
549
+ description: string;
550
+ } & {
551
+ readonly value: "<non-negative-integer>";
552
+ }, {
553
+ name: "--force";
554
+ description: string;
555
+ } & CliHelpOptionSpec, {
556
+ name: "--session";
557
+ description: string;
558
+ } & {
559
+ readonly value: "<id>";
560
+ }, {
561
+ name: "--repository";
562
+ description: string;
563
+ } & {
564
+ readonly value: "<id>";
565
+ }];
566
+ readonly notes: readonly [string, "Each --resource must be immediately followed by its own --mode; pairing is positional adjacency, not flag order.", "Target grammar: optional first positional <session-id> is an alias for --session <id>; do not supply both."];
567
+ }, {
568
+ readonly name: "session mutate";
569
+ readonly aliases: readonly ["resource mutate"];
570
+ readonly summary: "Atomically apply exact-resource claim additions, changes, and releases";
571
+ readonly usage: string;
572
+ readonly options: readonly [{
573
+ name: "--upsert-resource";
574
+ description: string;
575
+ } & {
576
+ readonly value: "<path-or-glob>";
577
+ readonly repeatable: true;
578
+ }, {
579
+ name: "--mode";
580
+ description: string;
581
+ } & {
582
+ readonly value: "<read|write|exclusive-write>";
583
+ readonly repeatable: true;
584
+ }, {
585
+ name: "--release-resource";
586
+ description: string;
587
+ } & {
588
+ readonly value: "<path-or-glob>";
589
+ readonly repeatable: true;
590
+ }, {
591
+ name: "--if-generation";
592
+ description: string;
593
+ } & {
594
+ readonly value: "<non-negative-safe-int>";
595
+ }, {
596
+ name: "--force";
597
+ description: string;
598
+ } & CliHelpOptionSpec, {
599
+ name: "--session";
600
+ description: string;
601
+ } & {
602
+ readonly value: "<id>";
603
+ }, {
604
+ name: "--repository";
605
+ description: string;
606
+ } & {
607
+ readonly value: "<id>";
608
+ }];
609
+ readonly notes: readonly ["Apply one or more ordered upsert/release deltas in one backend transaction; exactly one concurrency intent is required.", "Every --upsert-resource must be immediately followed by its own --mode; --release-resource takes exactly one value.", "Target grammar: optional first positional <session> is an alias for --session <id>; do not supply both."];
610
+ }, {
611
+ readonly name: "session transition";
612
+ readonly aliases: readonly ["resource transition"];
613
+ readonly summary: "Atomically transition one exact resource claim mode";
614
+ readonly usage: string;
615
+ readonly options: readonly [{
616
+ name: "--resource";
617
+ description: string;
618
+ } & {
619
+ readonly value: "<path-or-glob>";
620
+ readonly required: true;
621
+ }, {
622
+ name: "--mode";
623
+ description: string;
624
+ } & {
625
+ readonly value: "<read|write|exclusive-write>";
626
+ readonly required: true;
627
+ }, {
628
+ name: "--if-generation";
629
+ description: string;
630
+ } & {
631
+ readonly value: "<non-negative-safe-int>";
632
+ }, {
633
+ name: "--force";
634
+ description: string;
635
+ } & CliHelpOptionSpec, {
636
+ name: "--session";
637
+ description: string;
638
+ } & {
639
+ readonly value: "<id>";
640
+ }, {
641
+ name: "--repository";
642
+ description: string;
643
+ } & {
644
+ readonly value: "<id>";
645
+ }];
646
+ readonly notes: readonly ["Exactly one resource/mode pair is projected as one atomic upsert delta; same mode is an idempotent no-op.", "Use exactly one concurrency intent: --if-generation <non-negative-safe-int> or explicit --force.", "The target grammar accepts an optional first positional <session> or --session <id>, but not both."];
647
+ }, {
648
+ readonly name: "session claims";
649
+ readonly aliases: readonly ["resource list", "resource claims"];
650
+ readonly summary: "List canonical resource claims";
651
+ readonly usage: "nawabari session claims [<session-id>|--session <id>]";
652
+ readonly options: readonly [{
653
+ name: "--session";
654
+ description: string;
655
+ } & {
656
+ readonly value: "<id>";
657
+ }];
658
+ readonly notes: readonly ["Target grammar: optional first positional <session-id> is an alias for --session <id>; do not supply both."];
659
+ }, {
660
+ readonly name: "session release";
661
+ readonly aliases: readonly ["resource release"];
662
+ readonly summary: "Release resource claims";
663
+ readonly usage: "nawabari session release [<session-id>|--session <id>] (--resource <path-or-glob> ... | --claim-id <id> ... | --all) (--if-generation <n> | --force)";
664
+ readonly options: readonly [{
665
+ name: "--session";
666
+ description: string;
667
+ } & {
668
+ readonly value: "<id>";
669
+ }, {
670
+ name: "--resource";
671
+ description: string;
672
+ } & {
673
+ readonly value: "<path-or-glob>";
674
+ readonly repeatable: true;
675
+ }, {
676
+ name: "--claim-id";
677
+ description: string;
678
+ } & {
679
+ readonly value: "<id>";
680
+ readonly repeatable: true;
681
+ }, {
682
+ name: "--all";
683
+ description: string;
684
+ } & CliHelpOptionSpec, {
685
+ name: "--if-generation";
686
+ description: string;
687
+ } & {
688
+ readonly value: "<non-negative-safe-int>";
689
+ }, {
690
+ name: "--force";
691
+ description: string;
692
+ } & CliHelpOptionSpec];
693
+ readonly notes: readonly ["Target grammar: optional first positional <session-id> is an alias for --session <id>; do not supply both.", "Exactly one selector family is required: repeated --resource, repeated --claim-id, or explicit --all.", "Exactly one destructive concurrency intent is required: --if-generation <non-negative-safe-int> or --force."];
694
+ }, {
695
+ readonly name: "session close";
696
+ readonly summary: "Close the current or selected session";
697
+ readonly usage: "nawabari session close [<session-id>|--session <id>] [--integrated-revision <rev>] [--fetch-remote <name> --fetch-branch <branch>]";
698
+ readonly options: readonly [{
699
+ name: "--session";
700
+ description: string;
701
+ } & {
702
+ readonly value: "<id>";
703
+ }, {
704
+ name: "--integrated-revision";
705
+ description: string;
706
+ } & {
707
+ readonly value: "<rev>";
708
+ }, {
709
+ name: "--fetch-remote";
710
+ description: string;
711
+ } & {
712
+ readonly value: "<name>";
713
+ }, {
714
+ name: "--fetch-branch";
715
+ description: string;
716
+ } & {
717
+ readonly value: "<branch>";
718
+ }];
719
+ 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."];
720
+ }, {
721
+ readonly name: "session discard";
722
+ readonly summary: "Explicitly discard one selected session and its owned resources";
723
+ readonly usage: "nawabari session discard <session-id>|--session <id> [--preview]";
724
+ readonly options: readonly [{
725
+ name: "--session";
726
+ description: string;
727
+ } & {
728
+ readonly value: "<id>";
729
+ readonly required: true;
730
+ }, {
731
+ name: "--preview";
732
+ description: string;
733
+ } & CliHelpOptionSpec];
734
+ readonly notes: readonly ["Destructive and explicit: unintegrated commits and uncommitted work in the selected owned worktree may be destroyed.", "Discard never changes close, gc, doctor, reconciliation, or integration-lineage proof behavior.", "Use exactly one target form: positional <session-id> or --session <id>; do not supply both.", "Machine JSON mode is non-interactive and deterministic."];
735
+ }, {
736
+ readonly name: "session file create";
737
+ readonly summary: "Create one claim-authorized worktree file";
738
+ readonly usage: "nawabari session file create --session <id> --operation-id <id> --path <path> --if-generation <n> --expect-absent --payload-file <path>|--payload-stdin";
739
+ readonly options: readonly [{
740
+ name: "--session";
741
+ description: string;
742
+ } & {
743
+ readonly value: "<id>";
744
+ readonly required: true;
745
+ }, {
746
+ name: "--operation-id";
747
+ description: string;
748
+ } & {
749
+ readonly value: "<id>";
750
+ readonly required: true;
751
+ }, {
752
+ name: "--path";
753
+ description: string;
754
+ } & {
755
+ readonly value: "<path>";
756
+ readonly required: true;
757
+ }, {
758
+ name: "--if-generation";
759
+ description: string;
760
+ } & {
761
+ readonly value: "<n>";
762
+ readonly required: true;
763
+ }, {
764
+ name: "--expect-absent";
765
+ description: string;
766
+ } & CliHelpOptionSpec, {
767
+ name: "--payload-file";
768
+ description: string;
769
+ } & {
770
+ readonly value: "<path>";
771
+ }, {
772
+ name: "--payload-stdin";
773
+ description: string;
774
+ } & CliHelpOptionSpec];
775
+ }, {
776
+ readonly name: "session file delete";
777
+ readonly summary: "Delete one claim-authorized worktree file";
778
+ readonly usage: "nawabari session file delete --session <id> --operation-id <id> --path <path> --if-generation <n> (--expected-digest <sha256>|--expected-identity <json>)";
779
+ readonly options: readonly [{
780
+ name: "--session";
781
+ description: string;
782
+ } & {
783
+ readonly value: "<id>";
784
+ readonly required: true;
785
+ }, {
786
+ name: "--operation-id";
787
+ description: string;
788
+ } & {
789
+ readonly value: "<id>";
790
+ readonly required: true;
791
+ }, {
792
+ name: "--path";
793
+ description: string;
794
+ } & {
795
+ readonly value: "<path>";
796
+ readonly required: true;
797
+ }, {
798
+ name: "--if-generation";
799
+ description: string;
800
+ } & {
801
+ readonly value: "<n>";
802
+ readonly required: true;
803
+ }, {
804
+ name: "--expected-digest";
805
+ description: string;
806
+ } & {
807
+ readonly value: "<sha256>";
808
+ }, {
809
+ name: "--expected-identity";
810
+ description: string;
811
+ } & {
812
+ readonly value: "<json>";
813
+ }];
814
+ }, {
815
+ readonly name: "session file rename";
816
+ readonly summary: "Rename one claim-authorized worktree file";
817
+ readonly usage: "nawabari session file rename --session <id> --operation-id <id> --path <path> --to-path <path> --if-generation <n> (--expected-digest <sha256>|--expected-identity <json>)";
818
+ readonly options: readonly [{
819
+ name: "--session";
820
+ description: string;
821
+ } & {
822
+ readonly value: "<id>";
823
+ readonly required: true;
824
+ }, {
825
+ name: "--operation-id";
826
+ description: string;
827
+ } & {
828
+ readonly value: "<id>";
829
+ readonly required: true;
830
+ }, {
831
+ name: "--path";
832
+ description: string;
833
+ } & {
834
+ readonly value: "<path>";
835
+ readonly required: true;
836
+ }, {
837
+ name: "--to-path";
838
+ description: string;
839
+ } & {
840
+ readonly value: "<path>";
841
+ readonly required: true;
842
+ }, {
843
+ name: "--if-generation";
844
+ description: string;
845
+ } & {
846
+ readonly value: "<n>";
847
+ readonly required: true;
848
+ }, {
849
+ name: "--expected-digest";
850
+ description: string;
851
+ } & {
852
+ readonly value: "<sha256>";
853
+ }, {
854
+ name: "--expected-identity";
855
+ description: string;
856
+ } & {
857
+ readonly value: "<json>";
858
+ }];
859
+ }, {
860
+ readonly name: "authorize";
861
+ readonly summary: "Authorize an operation against concrete claims";
862
+ readonly usage: "nawabari authorize --operation <name> --resource <path> [--resource <path>] [--session <id>]";
863
+ readonly options: readonly [{
864
+ name: "--session";
865
+ description: string;
866
+ } & {
867
+ readonly value: "<id>";
868
+ }, {
869
+ name: "--operation";
870
+ description: string;
871
+ } & {
872
+ readonly value: "<name>";
873
+ readonly required: true;
874
+ readonly values: readonly ("push" | "source-write" | "stage" | "commit" | "branch-mutation" | "cleanup")[];
875
+ }, {
876
+ name: "--resource";
877
+ description: string;
878
+ } & {
879
+ readonly value: "<path>";
880
+ readonly required: true;
881
+ readonly repeatable: true;
882
+ }];
883
+ readonly notes: readonly ["Read-only claim decision: checks the canonical operation policy and concrete resource claims; it does not grant, persist, or mutate claims.", "Use guard to verify current worktree/session ownership without an operation; use authorize for the canonical claim-aware operation decision. guard --operation is a compatibility convenience for the combined check."];
884
+ }, {
885
+ readonly name: "checkpoint";
886
+ readonly summary: "Capture bounded Git execution evidence";
887
+ readonly usage: "nawabari checkpoint [--session <id>]";
888
+ readonly options: readonly [{
889
+ name: "--session";
890
+ description: string;
891
+ } & {
892
+ readonly value: "<id>";
893
+ }];
894
+ }, {
895
+ readonly name: "evidence snapshot";
896
+ readonly summary: "Capture bounded read-only evidence for one owned session";
897
+ readonly usage: "nawabari evidence snapshot --session <id>";
898
+ readonly options: readonly [{
899
+ name: "--session";
900
+ description: string;
901
+ } & {
902
+ readonly value: "<id>";
903
+ readonly required: true;
904
+ }];
905
+ readonly notes: readonly ["The result is Git-observable physical evidence only; it contains no task or semantic interpretation."];
906
+ }, {
907
+ readonly name: "diff";
908
+ readonly summary: "Inspect bounded Git evidence for explicit paths";
909
+ readonly usage: "nawabari diff --session <id> --path <path> [options]";
910
+ readonly options: readonly [{
911
+ name: "--session";
912
+ description: string;
913
+ } & {
914
+ readonly value: "<id>";
915
+ readonly required: true;
916
+ }, {
917
+ name: "--path";
918
+ description: string;
919
+ } & {
920
+ readonly value: "<path>";
921
+ readonly required: true;
922
+ readonly repeatable: true;
923
+ }, {
924
+ name: "--from";
925
+ description: string;
926
+ } & {
927
+ readonly value: "<ref>";
928
+ readonly default: "HEAD";
929
+ }, {
930
+ name: "--to";
931
+ description: string;
932
+ } & {
933
+ readonly value: "<ref>";
934
+ }, {
935
+ name: "--patch";
936
+ description: string;
937
+ } & CliHelpOptionSpec, {
938
+ name: "--max-bytes";
939
+ description: string;
940
+ } & {
941
+ readonly value: "<n>";
942
+ readonly default: string;
943
+ readonly minimum: 1;
944
+ readonly maximum: number;
945
+ }, {
946
+ name: "--max-hunks";
947
+ description: string;
948
+ } & {
949
+ readonly value: "<n>";
950
+ readonly default: string;
951
+ readonly minimum: 1;
952
+ readonly maximum: 128;
953
+ }];
954
+ }, {
955
+ readonly name: "commit";
956
+ readonly summary: "Commit explicit claim-authorized resources";
957
+ readonly usage: "nawabari commit --message <final-message> (--resource <path> [--resource <path>] | --all-claimed) [--session <id>] [--message-pattern <regex>]";
958
+ readonly options: readonly [{
959
+ name: "--session";
960
+ description: string;
961
+ } & {
962
+ readonly value: "<id>";
963
+ }, {
964
+ name: "--message";
965
+ description: string;
966
+ } & {
967
+ readonly value: "<final-message>";
968
+ readonly required: true;
969
+ }, {
970
+ name: "--resource";
971
+ description: string;
972
+ } & {
973
+ readonly value: "<path>";
974
+ readonly required: true;
975
+ readonly repeatable: true;
976
+ readonly required_unless: readonly ["--all-claimed"];
977
+ }, {
978
+ name: "--all-claimed";
979
+ description: string;
980
+ } & {
981
+ readonly mutually_exclusive_with: readonly ["--resource"];
982
+ }, {
983
+ name: "--message-pattern";
984
+ description: string;
985
+ } & {
986
+ readonly value: "<regex>";
987
+ }];
988
+ readonly notes: readonly ["Use repeated --resource by default, or explicitly use --all-claimed; the selectors cannot be combined.", "--all-claimed resolves only concrete Git-changed resources and retains unexpected changed-path protection."];
989
+ }, {
990
+ readonly name: "push";
991
+ readonly summary: "Push the owned branch to an explicit target";
992
+ readonly usage: "nawabari push --remote <name> --branch <name> (--resource <path> [--resource <path>] | --all-claimed) [options]";
993
+ readonly options: readonly [{
994
+ name: "--session";
995
+ description: string;
996
+ } & {
997
+ readonly value: "<id>";
998
+ }, {
999
+ name: "--resource";
1000
+ description: string;
1001
+ } & {
1002
+ readonly value: "<path>";
1003
+ readonly required: true;
1004
+ readonly repeatable: true;
1005
+ readonly required_unless: readonly ["--all-claimed"];
1006
+ }, {
1007
+ name: "--all-claimed";
1008
+ description: string;
1009
+ } & {
1010
+ readonly mutually_exclusive_with: readonly ["--resource"];
1011
+ }, {
1012
+ name: "--remote";
1013
+ description: string;
1014
+ } & {
1015
+ readonly value: "<name>";
1016
+ readonly required: true;
1017
+ }, {
1018
+ name: "--branch";
1019
+ description: string;
1020
+ } & {
1021
+ readonly value: "<name>";
1022
+ readonly required: true;
1023
+ readonly aliases: readonly ["--remote-branch"];
1024
+ }, {
1025
+ name: "--remote-branch";
1026
+ description: string;
1027
+ } & {
1028
+ readonly value: "<name>";
1029
+ readonly alias_of: "--branch";
1030
+ }, {
1031
+ name: "--force";
1032
+ description: string;
1033
+ } & CliHelpOptionSpec, {
1034
+ name: "--create-upstream";
1035
+ description: string;
1036
+ } & CliHelpOptionSpec];
1037
+ }, {
1038
+ readonly name: "status";
1039
+ readonly summary: "Show repository context and bounded session status";
1040
+ readonly usage: "nawabari status [--all|--history] [--limit <n>] [--offset <n>]";
1041
+ readonly options: readonly [{
1042
+ name: "--all";
1043
+ description: string;
1044
+ } & CliHelpOptionSpec, {
1045
+ name: "--history";
1046
+ description: string;
1047
+ } & {
1048
+ readonly alias_of: "--all";
1049
+ }, {
1050
+ name: "--limit";
1051
+ description: string;
1052
+ } & {
1053
+ readonly value: "<n>";
1054
+ readonly default: string;
1055
+ readonly minimum: 1;
1056
+ readonly maximum: 128;
1057
+ }, {
1058
+ name: "--offset";
1059
+ description: string;
1060
+ } & {
1061
+ readonly value: "<n>";
1062
+ readonly default: "0";
1063
+ readonly minimum: 0;
1064
+ }];
1065
+ readonly notes: readonly ["The default machine result exposes managed_worktree_root for session-create path discovery. Session rows are bounded by --limit (default 32, maximum 128) and --offset (default 0); --all and --history include closed history."];
1066
+ }, {
1067
+ readonly name: "guard";
1068
+ readonly summary: "Verify current worktree/session ownership";
1069
+ readonly usage: "nawabari guard [--session <id>] [--operation <name> --resource <path>]";
1070
+ readonly options: readonly [{
1071
+ name: "--session";
1072
+ description: string;
1073
+ } & {
1074
+ readonly value: "<id>";
1075
+ }, {
1076
+ name: "--operation";
1077
+ description: string;
1078
+ } & {
1079
+ readonly value: "<name>";
1080
+ readonly values: readonly ("push" | "source-write" | "stage" | "commit" | "branch-mutation" | "cleanup")[];
1081
+ }, {
1082
+ name: "--resource";
1083
+ description: string;
1084
+ } & {
1085
+ readonly value: "<path>";
1086
+ }];
1087
+ readonly notes: readonly ["Without --operation, verifies the current worktree, branch, and session ownership/context only; it does not evaluate resource claims.", "With --operation and --resource, performs the combined claim-aware authorization check for compatibility. Use authorize when the operation decision is the intended boundary."];
1088
+ }, {
1089
+ readonly name: "gc";
1090
+ readonly summary: "Detect or clean eligible stale sessions";
1091
+ readonly usage: "nawabari gc [--dry-run|--apply]";
1092
+ readonly options: readonly [{
1093
+ name: "--apply";
1094
+ description: string;
1095
+ } & CliHelpOptionSpec, {
1096
+ name: "--dry-run";
1097
+ description: string;
1098
+ } & CliHelpOptionSpec];
1099
+ readonly notes: readonly ["Default stale threshold is 24 hours (86,400,000 ms). Elapsed age is diagnostic suspicion only; destructive eligibility requires explicit stale/closing state or a safely prunable missing worktree. Closed history is not a candidate."];
1100
+ }, {
1101
+ readonly name: "doctor";
1102
+ readonly summary: "Check local Nawabari prerequisites and reconciliation";
1103
+ readonly usage: "nawabari doctor [--summary]";
1104
+ readonly options: readonly [{
1105
+ name: "--summary";
1106
+ description: string;
1107
+ } & CliHelpOptionSpec];
1108
+ readonly notes: readonly ["The default report retains the complete machine-readable check details. --summary omits healthy and closed history rows while retaining all actionable reconciliation issues."];
1109
+ }, {
1110
+ readonly name: "migrate";
1111
+ readonly summary: "Migrate legacy resource-claim registry state";
1112
+ readonly usage: "nawabari migrate";
1113
+ readonly options: readonly [];
1114
+ readonly notes: readonly ["Explicitly upgrades claim-schema-v1 (and pre-claim registries) to the current schema under the registry lock.", "Migration is atomic, idempotent, and fail-closed; do not edit or delete the registry manually."];
1115
+ }, {
1116
+ readonly name: "capabilities";
1117
+ readonly summary: "Describe the standalone CLI/JSON contract";
1118
+ readonly usage: "nawabari capabilities";
1119
+ readonly options: readonly [];
1120
+ }];
1121
+ /** Stable canonical command identity, derived from the registry itself. */
1122
+ export type CommandId = (typeof REGISTRY_DATA)[number]["name"];
1123
+ type RegistryOption = (typeof REGISTRY_DATA)[number]["options"][number];
1124
+ type GlobalRegistryOption = (typeof GLOBAL_HELP_OPTIONS)[number];
1125
+ /** Extracts an option's declared `aliases` literals, or `never` when absent. */
1126
+ type OptionAliasIds<Option> = Option extends {
1127
+ readonly aliases: infer Aliases;
1128
+ } ? Aliases extends readonly string[] ? Aliases[number] : never : never;
1129
+ /**
1130
+ * Stable canonical option identity across every command, derived from the
1131
+ * registry itself: every option's own flag plus every declared alias.
34
1132
  */
1133
+ export type OptionId = RegistryOption["name"] | OptionAliasIds<RegistryOption> | GlobalRegistryOption["name"] | OptionAliasIds<GlobalRegistryOption>;
35
1134
  export declare const CLI_COMMAND_REGISTRY: readonly CliCommandDefinition[];
36
1135
  export declare const ROOT_HELP_SPEC: CliCommandDefinition;
37
1136
  /** Resolve a public name through the one canonical registry. */
@@ -42,9 +1141,10 @@ export declare function canonicalCommandForName(name: string): CliCommandDefinit
42
1141
  * usage, options, and parser notes.
43
1142
  */
44
1143
  export declare function publicCliCommandDefinitions(): readonly CliCommandDefinition[];
45
- /** Stable alias for consumers such as the future dispatcher parity layer. */
1144
+ /** Stable alias kept for existing external consumers of the registry. */
46
1145
  export declare const COMMAND_REGISTRY: readonly CliCommandDefinition[];
47
1146
  /** Resolve either a canonical command or one of its public aliases. */
48
1147
  export declare function resolveCliCommandDefinition(name: string): CliCommandDefinition | undefined;
49
1148
  /** Return the complete public discovery name list in registry order. */
50
1149
  export declare function publicCliCommandNames(): readonly string[];
1150
+ export {};