@aviaratech/ai-delivery 0.3.4 → 0.3.6

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 (55) hide show
  1. package/README.md +135 -20
  2. package/dist/agent.d.ts +2 -0
  3. package/dist/agent.js +1 -0
  4. package/dist/agent.js.map +1 -1
  5. package/dist/cli.js +77 -2
  6. package/dist/cli.js.map +1 -1
  7. package/dist/dispatch.js +39 -1
  8. package/dist/dispatch.js.map +1 -1
  9. package/dist/github/client.d.ts +1 -0
  10. package/dist/github/client.js +4 -1
  11. package/dist/github/client.js.map +1 -1
  12. package/dist/github/commandIdentityPolicy.js +3 -0
  13. package/dist/github/commandIdentityPolicy.js.map +1 -1
  14. package/dist/issue.d.ts +1 -0
  15. package/dist/issue.js +24 -10
  16. package/dist/issue.js.map +1 -1
  17. package/dist/lifecycle.test.js +496 -30
  18. package/dist/lifecycle.test.js.map +1 -1
  19. package/dist/mcp/index.js +1 -1
  20. package/dist/mcp/tools.d.ts +63 -0
  21. package/dist/mcp/tools.js +66 -0
  22. package/dist/mcp/tools.js.map +1 -1
  23. package/dist/pr.d.ts +4 -4
  24. package/dist/pr.js +10 -6
  25. package/dist/pr.js.map +1 -1
  26. package/dist/review.test.js +163 -0
  27. package/dist/review.test.js.map +1 -1
  28. package/dist/services/deliveryAdmission.d.ts +13 -2
  29. package/dist/services/deliveryAdmission.js +41 -2
  30. package/dist/services/deliveryAdmission.js.map +1 -1
  31. package/dist/services/worktreeRegistry.d.ts +12 -0
  32. package/dist/services/worktreeRegistry.js +146 -4
  33. package/dist/services/worktreeRegistry.js.map +1 -1
  34. package/dist/setup.d.ts +58 -0
  35. package/dist/setup.js +415 -0
  36. package/dist/setup.js.map +1 -0
  37. package/dist/setup.test.d.ts +1 -0
  38. package/dist/setup.test.js +744 -0
  39. package/dist/setup.test.js.map +1 -0
  40. package/dist/verification.d.ts +37 -0
  41. package/dist/verification.js +214 -15
  42. package/dist/verification.js.map +1 -1
  43. package/dist/worktree.d.ts +3 -0
  44. package/dist/worktree.js +38 -8
  45. package/dist/worktree.js.map +1 -1
  46. package/dist/worktreeTransition.d.ts +173 -0
  47. package/dist/worktreeTransition.js +1012 -0
  48. package/dist/worktreeTransition.js.map +1 -0
  49. package/dist/worktreeTransition.test.d.ts +1 -0
  50. package/dist/worktreeTransition.test.js +1179 -0
  51. package/dist/worktreeTransition.test.js.map +1 -0
  52. package/package.json +1 -1
  53. package/plugins/ai-delivery/.claude-plugin/plugin.json +1 -1
  54. package/plugins/ai-delivery/README.md +1 -1
  55. package/plugins/ai-delivery/skills/worktree-lifecycle/SKILL.md +9 -0
package/README.md CHANGED
@@ -132,9 +132,9 @@ Set `DELIVERY_AUTHOR_TOKEN` outside source control to a token for the intended
132
132
  user. The runtime reads only that named variable for this route, uses the same
133
133
  token for Git HTTP push and GitHub API calls, and verifies the user login. It
134
134
  does not use an ambient `gh` session or another environment token. The legacy
135
- `--identity personal --personal-auth` override remains explicit; configure the
136
- personal author role above for complete PR delivery with matching review
137
- artifacts and policy evidence.
135
+ `--identity personal --personal-auth` override remains explicit for development
136
+ and `config:resolve`; configure the personal author role above for complete PR
137
+ delivery with matching review artifacts and policy evidence.
138
138
 
139
139
  | Route | Package behavior | Native required approval |
140
140
  | --- | --- | --- |
@@ -150,19 +150,31 @@ author. The independent artifact records its reviewer identity and effective
150
150
  model, while the submitted review receipt records the GitHub actor. Keep these
151
151
  identities separate when diagnosing a blocked PR.
152
152
 
153
- Inspect the result before issuing a new runtime admission:
153
+ Inspect the delivery access route before development and before issuing a new
154
+ runtime admission:
154
155
 
155
156
  ```sh
156
157
  npx ai-delivery --repo-root /absolute/path/to/consumer --identity host-author config:resolve
157
- npx ai-delivery --repo-root /absolute/path/to/consumer --identity host-author pr:create --issue 17 --dry-run
158
+ # For the explicit development override under an App author policy:
159
+ npx ai-delivery --repo-root /absolute/path/to/consumer --identity personal --personal-auth config:resolve
158
160
  ```
159
161
 
160
- These reads return `routing` (repository, Project/field/option identities and
162
+ This read returns `routing` (repository, Project/field/option identities and
161
163
  selection source), `configDigest`, effective author and reviewer actors,
162
164
  credential sources, reviewer repository read access, and available branch-rule
163
165
  evidence. A partial or unknown rule view stays labeled unknown; it does not
164
- require broader administrator access. Before publication, resolve a same-actor
165
- error or missing configured credential. After `issue_pr_review`, inspect its
166
+ require broader administrator access. Resolve a same-actor error, missing
167
+ configured credential or reviewer repository-access mismatch before development.
168
+ `develop`/`issue_develop`, starts that prepare worktrees, and
169
+ `worktree:create`/`issue_worktree_create` also run this existing access preflight
170
+ before preparing work. A new start with
171
+ `develop: true` checks it before creating the issue. Plain issue creation and
172
+ readiness checks retain their existing behavior. Access preflight does not issue
173
+ or refresh runtime admission, and does not prove that an approval will count.
174
+ The development override still checks the independent reviewer route; publication
175
+ requires the configured author credential.
176
+ Before publication, use `pr:create --issue 17 --dry-run` to inspect the current
177
+ route again. After `issue_pr_review`, inspect its
166
178
  `reviewState` and `pr:checks`. If GitHub still reports `REVIEW_REQUIRED`, inspect
167
179
  the active rule and obtain a qualifying independent approval; repeating the
168
180
  same App review cannot resolve that state. CLI and MCP use the same asynchronous
@@ -170,15 +182,71 @@ same App review cannot resolve that state. CLI and MCP use the same asynchronous
170
182
  resolved routing. An MCP server stays bound to its startup checkout; use separate
171
183
  bindings or explicit CLI checkout selection for multiple repositories.
172
184
 
173
- The consumer installer must issue a private `ai-delivery.runtime-admission@2`
174
- record at `<git-common-dir>/ai-delivery/runtime-admission.json`. It binds the
175
- verified archive, package version, capability 2, actual CLI/MCP/plugin bytes and
176
- paths, repository and the resolver's `configDigest`. That digest includes the
177
- policy/settings source, validated effective roles and checks, optional overrides
178
- and effective discovered routing;
179
- **do not substitute a JSON-file hash**. Drift in the Project, fields, options,
180
- policy, overrides or installed bytes invalidates admission and verification
181
- receipts. Resolution never refreshes its own admission during a mutation.
185
+ Public runtime setup has two explicit operations: `runtime:stage` and
186
+ `runtime:admit` (MCP: `runtime_stage` and `runtime_admit`; API:
187
+ `stageRuntime` and `admitRuntime` from `@aviaratech/ai-delivery/agent`). Both
188
+ require the clean primary consumer checkout, its expected Git HEAD, the actual
189
+ `loadDeliveryConfig` digest, an explicit configured author identity and separate
190
+ operation authority. The authenticated author and distinct reviewer App must
191
+ pass the existing repository-access preflight. Unknown rule visibility or
192
+ approval eligibility remains unknown; setup does not establish counted approval.
193
+
194
+ First read `config:resolve` with the configured author, then stage a reviewed
195
+ local archive using its independently accepted SHA-256 and package version:
196
+
197
+ ```sh
198
+ ai-delivery --repo-root /absolute/consumer --identity configured-author config:resolve
199
+ ai-delivery --repo-root /absolute/consumer --identity configured-author runtime:stage \
200
+ --authorize-stage --archive /absolute/reviewed-package.tgz \
201
+ --archive-sha256 sha256:<reviewed-archive-digest> --package-version 0.3.5 \
202
+ --source-commit <clean-primary-consumer-head> --config-digest sha256:<resolver-digest> \
203
+ --runtime-directory /absolute/private-runtimes/ai-delivery-0.3.5
204
+ ```
205
+
206
+ Stage captures and hashes the exact reviewed archive bytes, durably retains a
207
+ private copy in its owned directory, and gives that copy to npm. The snapshot
208
+ counts toward the stage output allowance and is revalidated on completion,
209
+ reuse and admission. Stage installs production dependencies with scripts, audit
210
+ and funding disabled.
211
+ It validates actual CLI, full distribution, package manifest, bundled MCP launcher
212
+ and plugin bytes and capability 2. Its private completion record binds these
213
+ bytes to the reviewed archive and primary controller; `sourceCommit` means the
214
+ consumer/controller HEAD, not the public package's release commit. Matching
215
+ completed stages are read back and reused without npm. Incomplete recovery uses
216
+ the existing durable verification writer and identity-checked command cleanup.
217
+ A live or stopped owner remains busy; ambiguous command ownership fails closed.
218
+ Failure or cancellation removes only owned incomplete output after confirmed
219
+ quiescence. Stage returns actual CLI/MCP launch descriptors and leaves host
220
+ references and current links for the consuming installer to manage.
221
+
222
+ Admission is the separate explicitly authorized final binding. Use the returned
223
+ stage ID and either explicit absence or the SHA-256 of the exact prior admission
224
+ file bytes:
225
+
226
+ ```sh
227
+ ai-delivery --repo-root /absolute/consumer --identity configured-author runtime:admit \
228
+ --authorize-admit --stage-id sha256:<returned-stage-id> --expected-absent \
229
+ --source-commit <clean-primary-consumer-head> --config-digest sha256:<resolver-digest> \
230
+ --runtime-directory /absolute/private-runtimes/ai-delivery-0.3.5
231
+ # For replacement, use --expected-prior sha256:<current-admission-byte-digest>
232
+ ```
233
+
234
+ The operation rechecks archive, installed bytes, primary source, resolver routing
235
+ and configured actors before atomically publishing the existing private
236
+ `ai-delivery.runtime-admission@2` record at
237
+ `<git-common-dir>/ai-delivery/runtime-admission.json`, mode 0600. Precommit
238
+ failures preserve the prior record. A lost response or post-rename failure is
239
+ reconciled against exact desired bytes and confirmed file/directory durability.
240
+ A `commit-status-unknown` error identifies the admission and stage; retry the
241
+ same stage to reconcile. Conflicting third-party bytes are preserved. The
242
+ consuming installer's reviewed host activation and rollback determine when this
243
+ final write occurs.
244
+
245
+ The resolver's `configDigest` includes policy/settings source, validated
246
+ effective roles and checks, optional overrides and discovered routing;
247
+ **do not substitute a JSON-file hash**. Drift invalidates admission and
248
+ verification receipts. Ordinary lifecycle operations never refresh admission
249
+ implicitly, and candidate issue configuration is never activated by setup.
182
250
 
183
251
  To migrate from 0.1: move `roles` and `commandPolicy` into the existing policy's
184
252
  `deliverySettings` export; replace the old JSON with only necessary overrides
@@ -189,6 +257,53 @@ rows in `.issue-cli/worktrees.json` remain with their original runtime unless
189
257
  they already have an exact `ai-delivery.worktree-owner@1` witness. Installing this
190
258
  package never adopts or switches an active legacy writer.
191
259
 
260
+ Legacy worktree transitions are explicit and separate from installation. Use
261
+ `worktree:transition:inspect` (`issue_worktree_transition_inspect`) with the issue
262
+ and purpose `active-resume` or `merged-cleanup`. Inspection reads the canonical
263
+ row, clean source, native PR lineage, original evidence and writer inventory. It
264
+ returns an exact plan or specific closure gaps without writing ownership or
265
+ running the retained producer.
266
+
267
+ The supported operational closure family is the retained official public
268
+ `@aviaratech/ai-delivery@0.3.5` archive and installed bytes, its private
269
+ `ai-delivery.runtime-admission@2`, producer-bound `ai-delivery.run@3`, and
270
+ `ai-delivery.verification-writer@1` on supported POSIX hosts. Supply
271
+ `--retained-admission` and `--retained-archive`. Operative `issue-cli`
272
+ verification-stages v1/v2, unknown process ownership, external resource families
273
+ or incomplete inventory refuse apply. Historical producer identity may remain
274
+ `UNKNOWN`; its original schemas, bytes, failed diagnostics and accounting are
275
+ preserved without becoming current verification, review or retirement authority.
276
+
277
+ The configured authenticated personal operator must publish the returned whole
278
+ relinquishment body as a native comment on the terminal PR, or on the issue for
279
+ active resume. The distinct configured reviewer App must independently accept
280
+ the same complete plan and relinquishment comment ID through a native exact-body
281
+ acceptance comment. A caller-authored local receipt does not supply this
282
+ authority. Changed/deleted comments, wrong actors or subjects, and an authenticated
283
+ exact relinquishment revocation invalidate acceptance. These comments have their
284
+ own acceptance semantics; they do not count as a GitHub PR review.
285
+ The bodies bind the complete saved plan and inventory by their recomputed IDs;
286
+ the operator and reviewer must inspect that complete plan before accepting it.
287
+
288
+ Save the returned `plan` object, then call `worktree:transition:apply`
289
+ (`issue_worktree_transition_apply`) with `--plan`, `--plan-id`,
290
+ `--relinquishment-comment`, `--acceptance-comment`, and
291
+ `--authorize-transition`. Apply preserves immutable original copies and records
292
+ intent before ownership changes. Repeat the same plan and authority IDs after
293
+ interruption; pending intent blocks ordinary resume, verification, publication,
294
+ review, merge and re-registration. Active resume requires fresh current
295
+ verification and review. Terminal transition witnesses permanently restrict
296
+ ordinary source operations.
297
+
298
+ Terminal disposition defaults to `retain`, preserving source and all holds.
299
+ Supply native retained-hold comment IDs with `--retained-holds`. `remove` requires
300
+ an independently accepted personal assertion that no holds remain, exact native
301
+ merged-result lineage and the existing non-force clean-source cleanup proof.
302
+ Source delivery never releases a hold, retires a legacy protocol, changes a host
303
+ launcher or admits a shared runtime. Transition artifacts remain under the
304
+ existing private Git `ai-delivery/worktree-owners` evidence directory; no second
305
+ worktree registry is introduced.
306
+
192
307
  `verify` classifies a clean Git base/head range, runs only the stages selected by the repository policy, and persists content-addressed private checkpoints under the Git common directory. It reuses compatible complete stages and rejects corrupt or stale inputs. Selected stage commands run asynchronously without a total-duration deadline. Bounded JSON status lines on stderr show the current stage and command, completed/reused/remaining stage and command counts, elapsed time, captured output bytes, executed-command throughput, command age and time since completed work. They appear when a command starts and every five seconds while it runs; bounded resource observations are reported at each sample. A quiet command remains cancellable and diagnosable from its age and unchanged completion counts. Process activity and output do not establish useful progress; only complete receipts and the exact-source aggregate are checkpoints.
193
308
 
194
309
  For independent component reuse, export `schemaVersion: "RepositoryDeliveryPolicy@2"` from the existing policy. Each selected stage supplies both its ordered `semanticInputKeys` and matching explicit `semanticInputs`, for example:
@@ -210,9 +325,9 @@ Verification holds one file lease per worktree and durably records its writer an
210
325
 
211
326
  The `--admit` flag explicitly admits additional resource classes. Publication creates a draft PR only after exact-head verification; a high-risk policy also requires a prepublication review artifact. Ready promotion and merge require a submitted formal review. Merge checks live blockers, checks, base/head coordinates, and the policy boundary. Repositories may require an exact base/head lease for merge.
212
327
 
213
- For a bounded run, pass `--max-aggregate-rss-bytes`, `--min-free-disk-bytes`, and optionally `--max-new-output-bytes` with one or more `--output-root` paths to `verify`. `issue_verify` accepts the same values in `resourceBounds`. RSS is sampled across the observed child process tree, including observed detached descendants; free disk is checked before commands and during execution on the worktree and declared output filesystems. Positive file-size growth is sampled under the declared roots, with previously measured completed stages carried across a resume. The caller must declare every output root relevant to its allowance; symbolic links inside those roots fail closed. The roots are relative to the issue worktree unless absolute. Output growth is separate from the 8 MiB captured stdout/stderr limit. Resource limits are opt in and do not impose a total runtime deadline.
328
+ For a bounded run, pass `--max-aggregate-rss-bytes`, `--min-free-disk-bytes`, and optionally `--max-new-output-bytes` with one or more `--output-root` paths to `verify`. `issue_verify` accepts the same values in `resourceBounds`. RSS is sampled across the observed child process tree, including observed detached descendants; free disk is checked before commands and during execution on the worktree and declared output filesystems. Positive file-size growth is sampled under the declared roots, with previously measured completed stages carried across a resume. The caller must declare every output root relevant to its allowance; aliases must resolve within those roots. The roots are relative to the issue worktree unless absolute. Output growth is separate from the 8 MiB captured stdout/stderr limit. Resource limits are opt in and do not impose a total runtime deadline.
214
329
 
215
- Bounded stage checkpoints bind the limits and sampled observations. Older unmeasured stages and stages with different limits rerun. Current manifests use `ai-delivery.run@3`, bind the worktree and producer, and live under `runs@2/<worktree-digest>/<head>.json`. Bounded manifests also record limits, sample count, and sampled RSS, output, and disk extrema. Historical run versions 1 and 2 remain historical and are available for merged-issue recovery; current publication requires current-producer verification. `processCoverage: "observed-processes-only"` means a passing aggregate is not proof that every detached descendant was drained. A descendant that detaches and closes inherited pipes between samples can evade observation; a pipe holder that prevents command closure fails with unverified cleanup and no checkpoint. Output baselines are retained across retries, including failed stages. They are range scoped: a changed baseline regenerates the measured stage proof. Consumers must confirm their command graph remains observable and declare all relevant output roots; this contract does not assert ownership of undeclared output locations or other concurrent writers.
330
+ Bounded stage checkpoints bind the limits and sampled observations. Older unmeasured stages and stages with different limits rerun. Current manifests use `ai-delivery.run@3`, bind the worktree and producer, and live under `runs@2/<worktree-digest>/<head>.json`. Bounded manifests also record limits, sample count, and sampled RSS, output, and disk extrema. Historical run versions 1 and 2 remain historical and are available for merged-issue recovery; current publication requires current-producer verification. `processCoverage: "observed-processes-only"` means a passing aggregate is not proof that every detached descendant was drained. A descendant that detaches and closes inherited pipes between samples can evade observation; a pipe holder that prevents command closure fails with unverified cleanup and no checkpoint. Output roots must be canonical and nonoverlapping. Resolvable aliases such as npm `.bin` links may point only within the declared roots; aliases are not traversed or counted twice, and growth of their physical targets remains measured. Escaping, broken and cyclic links fail closed. Output baselines are retained across retries, including failed stages. They are range scoped: a changed baseline regenerates the measured stage proof. Consumers must confirm their command graph remains observable and declare all relevant output roots; this contract does not assert ownership of undeclared output locations or other concurrent writers.
216
331
 
217
332
  A reviewed policy transition can be verified and published before activating
218
333
  its new configuration. For `verify`, issue-bound PR operations, and `finish`,
@@ -253,7 +368,7 @@ routing belong to a separate orchestrator, not this CLI.
253
368
 
254
369
  The MCP input and result contract is `ai-delivery.mcp@1`, exported as `AI_DELIVERY_MCP_CONTRACT_VERSION`. It retains the 13 `issue_*` tool names. Each tool rejects unknown fields at the request boundary. `issue_create` accepts a title with optional body, Issue Type, Points, Priority, taxonomy labels, milestone, parent and blockers; it returns `{body, created: {number, title, url}, routing}`. A linked parent is read back and cleared of Points. `issue_start({issueNumber})` always checks readiness and prepares that existing issue; `develop` gates only preparation of a newly created issue. New starts default to 2 Points. `resumeCreated` requires both `issueNumber` and `develop: true` and never creates a second issue. Immediate creation and development preflights readiness before creation and returns `ai-delivery.issue-start-registration@1` with `status: "started"` or a `created-not-started` failure and exact `safeResume` arguments. The CLI prints that recovery JSON and exits nonzero for `created-not-started`. Scratch starts derive safe names from the request or title and return the branch and worktree path. `repo` on create, start and ready check, or global CLI `--repo`, must match the repository selected by the checkout's validated Git remote; a mismatch fails before a GitHub call.
255
370
 
256
- `issue_update` returns authoritative issue readback; `issue_info` returns current native metadata, parent, blockers, Project state and registered worktree; `issue_ready_check` returns deterministic admission and reasons; `issue_develop` and `issue_worktree_create` return registered worktree rows. `issue_verify` returns classification, aggregate, manifest and publication evidence IDs, plus the sampled resource summary when limits were supplied. `issue_pr_create` returns the PR number, URL and bound publication evidence ID, plus route evidence or the live review state on ready promotion; `issue_pr_info` returns number, state, exact head/base, draft flag, author login and URL. `issue_pr_review` returns an exact-head submitted review receipt and live required-review state, `issue_pr_merge` a durable merge receipt, and `issue_finish` returns the merge SHA and successful issue/cleanup readback. CLI and MCP call the same owners for these tools.
371
+ `issue_update` returns authoritative issue readback and synchronizes configured Project status from live native blockers. Closed issues and Done items remain Done; removing the last unresolved blocker returns to Todo. To park execution while retaining a worktree, use `ai-delivery update --issue 17 --park` or `issue_update({issueNumber: 17, park: true})`; status becomes Todo, or Blocked while native blockers remain. Unrelated metadata edits preserve parked presentation. Resume explicitly with `develop`/`issue_develop` or an existing-issue start, which still requires readiness; worktree presence never establishes active execution. `issue_info` returns current native metadata, parent, blockers, Project state and registered worktree; `issue_ready_check` returns deterministic admission and reasons; `issue_develop` and `issue_worktree_create` return registered worktree rows. `issue_verify` returns classification, aggregate, manifest and publication evidence IDs, plus the sampled resource summary when limits were supplied. `issue_pr_create` returns the PR number, URL and bound publication evidence ID, plus route evidence or the live review state on ready promotion; `issue_pr_info` returns number, state, exact head/base, draft flag, author login and URL. `issue_pr_review` returns an exact-head submitted review receipt and live required-review state, `issue_pr_merge` a durable merge receipt, and `issue_finish` returns the merge SHA and successful issue/cleanup readback. CLI and MCP call the same owners for these tools.
257
372
 
258
373
  The CLI also exposes native relationship reads (`parent`, `subissues`, `blockers`), registry reads and clean registered PR/standalone cleanup (`worktrees:list`, `worktrees:status`, `worktrees:cleanup`), and PR reads and exact-head selected-author checkout (`pr:list`, `pr:checks`, `pr:checkout`). `pr:checks` includes GitHub's current review decision. A cleaned PR worktree can be reopened when its retained branch still matches the remote head. `migrate:legacy-issues --input-file` produces an offline `ai-delivery.legacy-issue-migration@1` plan without live writes. `metrics velocity --json` reads completed local delivery records and returns `ai-delivery.velocity-report@1` with buckets for configured Points; unknown blocker and review measurements remain null. `finish` can confirm completion after a lost response by matching the exact merge receipts, delivery record and live issue/Project state. Installing the package never migrates active runtime state automatically.
259
374
 
package/dist/agent.d.ts CHANGED
@@ -18,3 +18,5 @@ export { verifyIssue, createIssuePhaseEvidence } from './verification.js';
18
18
  export { discoverDeliveryRouting } from './github/discovery.js';
19
19
  export type { DeliveryRouting, DiscoveryClients } from './github/discovery.js';
20
20
  export type { DeliveryOverrides, DeliveryPolicySettings, LoadedDeliverySettings } from './config/deliveryConfig.js';
21
+ export { stageRuntime, admitRuntime, RuntimeAdmissionCommitUnknownError } from './setup.js';
22
+ export type { StageRuntimeInput, AdmitRuntimeInput, RuntimeStageResult } from './setup.js';
package/dist/agent.js CHANGED
@@ -14,4 +14,5 @@ export { getIssueWorktreeStrict, listWorktreesStrict } from './services/worktree
14
14
  export { prepareIssueWorktree, prepareStandaloneWorktree } from './worktree.js';
15
15
  export { verifyIssue, createIssuePhaseEvidence } from './verification.js';
16
16
  export { discoverDeliveryRouting } from './github/discovery.js';
17
+ export { stageRuntime, admitRuntime, RuntimeAdmissionCommitUnknownError } from './setup.js';
17
18
  //# sourceMappingURL=agent.js.map
package/dist/agent.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/G,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACrH,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AAC3G,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAEp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BAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAEpH,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAIhE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC"}
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ const program = new Command();
17
17
  program
18
18
  .name('ai-delivery')
19
19
  .description('Generic GitHub issue and pull request delivery')
20
- .version('0.3.4')
20
+ .version('0.3.6')
21
21
  .option('--identity <name>', 'Configured author or reviewer identity')
22
22
  .option('--personal-auth', 'Explicit legacy personal-token author override')
23
23
  .option('--repo <owner/name>', 'Repository selector; must match the configured checkout')
@@ -57,6 +57,47 @@ function run(name, input) {
57
57
  function print(value) {
58
58
  process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
59
59
  }
60
+ program
61
+ .command('runtime:stage')
62
+ .description('Stage a reviewed archive in a private directory; does not activate or admit it')
63
+ .requiredOption('--archive <path>')
64
+ .requiredOption('--archive-sha256 <digest>')
65
+ .requiredOption('--package-version <version>')
66
+ .requiredOption('--source-commit <sha>')
67
+ .requiredOption('--config-digest <digest>')
68
+ .requiredOption('--runtime-directory <path>')
69
+ .option('--authorize-stage', 'Explicit authority to stage this reviewed archive')
70
+ .action(async (o) => run('runtime_stage', {
71
+ authority: o.authorizeStage === true ? 'runtime:stage' : '',
72
+ archivePath: o.archive,
73
+ expectedArchiveSha256: o.archiveSha256,
74
+ packageVersion: o.packageVersion,
75
+ expectedSourceCommit: o.sourceCommit,
76
+ expectedConfigDigest: o.configDigest,
77
+ runtimeDirectory: o.runtimeDirectory,
78
+ }));
79
+ program
80
+ .command('runtime:admit')
81
+ .description('Explicitly publish the existing admission for an exact completed stage')
82
+ .requiredOption('--stage-id <digest>')
83
+ .requiredOption('--source-commit <sha>')
84
+ .requiredOption('--config-digest <digest>')
85
+ .requiredOption('--runtime-directory <path>')
86
+ .option('--expected-prior <digest>', 'SHA-256 of the exact current private admission bytes')
87
+ .option('--expected-absent', 'Explicitly require no current admission')
88
+ .option('--authorize-admit', 'Explicit authority for the final admission write')
89
+ .action(async (o) => {
90
+ if ((o.expectedPrior === undefined) === (o.expectedAbsent !== true))
91
+ throw new Error('Choose exactly one of --expected-prior or --expected-absent.');
92
+ return run('runtime_admit', {
93
+ authority: o.authorizeAdmit === true ? 'runtime:admit' : '',
94
+ stageId: o.stageId,
95
+ expectedSourceCommit: o.sourceCommit,
96
+ expectedConfigDigest: o.configDigest,
97
+ runtimeDirectory: o.runtimeDirectory,
98
+ expectedPriorAdmissionSha256: o.expectedAbsent === true ? null : o.expectedPrior,
99
+ });
100
+ });
60
101
  program
61
102
  .command('create')
62
103
  .requiredOption('--title <title>')
@@ -129,6 +170,7 @@ program
129
170
  .option('--milestone <number>')
130
171
  .option('--parent <number>')
131
172
  .option('--state <state>')
173
+ .option('--park', 'Park execution while retaining the issue worktree')
132
174
  .action(async (o) => run('issue_update', {
133
175
  issueNumber: int(o.issue),
134
176
  title: o.title,
@@ -141,6 +183,7 @@ program
141
183
  milestone: int(o.milestone),
142
184
  parentIssueNumber: int(o.parent),
143
185
  state: o.state,
186
+ park: o.park === true ? true : undefined,
144
187
  }));
145
188
  program
146
189
  .command('info')
@@ -281,6 +324,38 @@ program
281
324
  .requiredOption('--name <name>')
282
325
  .requiredOption('--branch <branch>')
283
326
  .action(async (o) => run('issue_worktree_create', o));
327
+ program
328
+ .command('worktree:transition:inspect')
329
+ .requiredOption('--issue <number>')
330
+ .requiredOption('--purpose <purpose>', 'active-resume or merged-cleanup')
331
+ .option('--disposition <disposition>', 'retain (default) or explicitly unheld remove')
332
+ .option('--terminal-pr <number>')
333
+ .option('--retained-holds <comment-ids>', 'Comma-separated native retained-hold comment IDs')
334
+ .option('--retained-admission <path>')
335
+ .option('--retained-archive <path>')
336
+ .action(async (o) => run('issue_worktree_transition_inspect', {
337
+ issueNumber: int(o.issue),
338
+ purpose: o.purpose,
339
+ ...(o.disposition === undefined ? {} : { disposition: o.disposition }),
340
+ ...(o.terminalPr === undefined ? {} : { terminalPrNumber: int(o.terminalPr) }),
341
+ ...(o.retainedHolds === undefined ? {} : { retainedHoldCommentIds: ints(o.retainedHolds) }),
342
+ ...(o.retainedAdmission === undefined ? {} : { retainedAdmissionPath: o.retainedAdmission }),
343
+ ...(o.retainedArchive === undefined ? {} : { retainedArchivePath: o.retainedArchive }),
344
+ }));
345
+ program
346
+ .command('worktree:transition:apply')
347
+ .requiredOption('--plan <path>')
348
+ .requiredOption('--plan-id <digest>')
349
+ .requiredOption('--relinquishment-comment <id>')
350
+ .requiredOption('--acceptance-comment <id>')
351
+ .option('--authorize-transition', 'Explicit authority for this exact independently accepted plan')
352
+ .action(async (o) => run('issue_worktree_transition_apply', {
353
+ authority: o.authorizeTransition === true ? 'worktree:transition' : '',
354
+ planPath: o.plan,
355
+ expectedPlanId: o.planId,
356
+ relinquishmentCommentId: Number(o.relinquishmentComment),
357
+ acceptanceCommentId: Number(o.acceptanceComment),
358
+ }));
284
359
  program.command('worktrees:list').action(() => print(listWorktreesStrict(primaryGitRoot(execution().repoRoot))));
285
360
  program.command('worktrees:status').action(() => {
286
361
  const root = primaryGitRoot(execution().repoRoot);
@@ -338,7 +413,7 @@ program
338
413
  print({
339
414
  configDigest: context.configuration?.configDigest,
340
415
  routing: context.configuration?.routing,
341
- reviewRoute: await preflightReviewRoute(context),
416
+ reviewRoute: await preflightReviewRoute(context, undefined, undefined, 'development'),
342
417
  });
343
418
  });
344
419
  program.command('mcp:serve').action(async () => serveAiDeliveryMcp(execution()));
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,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;KACtF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AACL,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,kBAAkB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AAEjF,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
package/dist/dispatch.js CHANGED
@@ -12,8 +12,10 @@ import { finishIssue, mergePr, preflightReviewRoute, prInfo, publishPr, submitFo
12
12
  import { parseReviewArtifact, reviewArtifactApproval, savePrepublicationArtifact } from './review.js';
13
13
  import { evaluateAgentReadiness } from './services/agentReadinessService.js';
14
14
  import { assertDeliveryRuntimeAdmitted } from './services/deliveryAdmission.js';
15
- import { getIssueWorktreeStrict, listWorktreesStrict } from './services/worktreeRegistry.js';
15
+ import { assertIssueWorktreeTransitionAdmission, getIssueWorktreeStrict, listWorktreesStrict, } from './services/worktreeRegistry.js';
16
+ import { applyWorktreeTransition, inspectWorktreeTransition, } from './worktreeTransition.js';
16
17
  import { createIssuePhaseEvidence, loadVerifiedRun, verifyIssue, } from './verification.js';
18
+ import { stageRuntime, admitRuntime } from './setup.js';
17
19
  import { prepareStandaloneWorktree } from './worktree.js';
18
20
  import { getAiDeliveryMcpTool } from './mcp/tools.js';
19
21
  const MUTATING_TOOLS = new Set([
@@ -27,6 +29,7 @@ const MUTATING_TOOLS = new Set([
27
29
  'issue_pr_merge',
28
30
  'issue_finish',
29
31
  'issue_worktree_create',
32
+ 'issue_worktree_transition_apply',
30
33
  ]);
31
34
  function requiredNumber(input, key) {
32
35
  const value = input[key];
@@ -242,6 +245,7 @@ async function preflightStartDevelopment(context, tracking) {
242
245
  0) {
243
246
  throw new DeliveryError('Default base ref is missing before tracked issue creation.');
244
247
  }
248
+ await preflightReviewRoute(context, undefined, undefined, 'development');
245
249
  }
246
250
  function scratchStart(input, execution, identity, remote) {
247
251
  const title = (optionalString(input, 'title') ?? requireString(input, 'request'))
@@ -279,9 +283,23 @@ export async function executeTool(name, raw, execution) {
279
283
  throw new DeliveryError(`Unknown ai-delivery tool ${name}.`);
280
284
  const input = definition.inputSchema.parse(raw);
281
285
  assertRepositorySelector(input, execution);
286
+ if (name === 'runtime_stage' || name === 'runtime_admit') {
287
+ const setup = {
288
+ ...input,
289
+ repoRoot: execution.repoRoot,
290
+ identity: optionalString(input, 'identity') ?? execution.identity ?? '',
291
+ ...(execution.personalAuth === undefined ? {} : { personalAuth: execution.personalAuth }),
292
+ ...(execution.signal === undefined ? {} : { signal: execution.signal }),
293
+ };
294
+ return name === 'runtime_stage'
295
+ ? stageRuntime(setup)
296
+ : admitRuntime(setup);
297
+ }
282
298
  if (name === 'issue_info' && input.cached === true)
283
299
  return cachedIssueInfo(execution.repoRoot, requiredNumber(input, 'issueNumber'));
284
300
  const commands = {
301
+ runtime_stage: 'runtime:stage',
302
+ runtime_admit: 'runtime:admit',
285
303
  issue_create: 'create',
286
304
  issue_start: 'start',
287
305
  issue_update: 'update',
@@ -295,6 +313,8 @@ export async function executeTool(name, raw, execution) {
295
313
  issue_pr_merge: 'pr:merge',
296
314
  issue_finish: 'finish',
297
315
  issue_worktree_create: 'worktree:create',
316
+ issue_worktree_transition_inspect: 'worktree:transition:inspect',
317
+ issue_worktree_transition_apply: 'worktree:transition:apply',
298
318
  };
299
319
  const requestedIdentity = name === 'issue_pr_review' ? optionalString(input, 'identity') : undefined;
300
320
  const selectedExecution = requestedIdentity === undefined ? execution : { ...execution, identity: requestedIdentity };
@@ -320,6 +340,8 @@ export async function executeTool(name, raw, execution) {
320
340
  controllerConfiguration = await loadDeliveryConfig(primary, { clients: authorClients });
321
341
  }
322
342
  if (MUTATING_TOOLS.has(name) && input.dryRun !== true) {
343
+ if (name !== 'issue_worktree_transition_apply' && typeof input.issueNumber === 'number')
344
+ assertIssueWorktreeTransitionAdmission(input.issueNumber, primaryGitRoot(execution.repoRoot));
323
345
  await assertDeliveryRuntimeAdmitted({
324
346
  ...execution,
325
347
  repoRoot: sourceRoot === undefined ? execution.repoRoot : primaryGitRoot(execution.repoRoot),
@@ -338,6 +360,20 @@ export async function executeTool(name, raw, execution) {
338
360
  });
339
361
  }
340
362
  switch (name) {
363
+ case 'issue_worktree_transition_inspect':
364
+ return inspectWorktreeTransition(context, {
365
+ ...input,
366
+ ...(execution.runtimeEntryPath === undefined ? {} : { runtimeEntryPath: execution.runtimeEntryPath }),
367
+ });
368
+ case 'issue_worktree_transition_apply':
369
+ return applyWorktreeTransition(context, {
370
+ authority: 'worktree:transition',
371
+ planPath: requireString(input, 'planPath'),
372
+ expectedPlanId: requireString(input, 'expectedPlanId'),
373
+ relinquishmentCommentId: requiredNumber(input, 'relinquishmentCommentId'),
374
+ acceptanceCommentId: requiredNumber(input, 'acceptanceCommentId'),
375
+ ...(execution.runtimeEntryPath === undefined ? {} : { runtimeEntryPath: execution.runtimeEntryPath }),
376
+ });
341
377
  case 'issue_create': {
342
378
  return createIssue(context, input);
343
379
  }
@@ -350,6 +386,7 @@ export async function executeTool(name, raw, execution) {
350
386
  if (input.issueNumber !== undefined || input.develop === true || input.resumeCreated === true) {
351
387
  throw new DeliveryError('Scratch worktree cannot claim a tracked issue.');
352
388
  }
389
+ await preflightReviewRoute(context, undefined, undefined, 'development');
353
390
  return scratchStart(input, execution, identity, context.configuration?.remote);
354
391
  }
355
392
  return startTrackedIssue(context, input);
@@ -482,6 +519,7 @@ export async function executeTool(name, raw, execution) {
482
519
  }
483
520
  case 'issue_worktree_create': {
484
521
  const identity = await identityFor(execution, 'worktree:create');
522
+ await preflightReviewRoute(context, undefined, undefined, 'development');
485
523
  return prepareStandaloneWorktree({
486
524
  ...(context.configuration?.remote ? { remote: context.configuration.remote } : {}),
487
525
  branch: requireString(input, 'branch'),