@aviaratech/ai-delivery 0.3.32 → 0.3.34

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 (99) hide show
  1. package/README.md +138 -6
  2. package/dist/cli.js +30 -3
  3. package/dist/cli.js.map +1 -1
  4. package/dist/cliResult.js +10 -0
  5. package/dist/cliResult.js.map +1 -1
  6. package/dist/cliResult.test.js +61 -0
  7. package/dist/cliResult.test.js.map +1 -1
  8. package/dist/config/deliveryConfig.d.ts +36 -0
  9. package/dist/config/deliveryConfig.js +27 -2
  10. package/dist/config/deliveryConfig.js.map +1 -1
  11. package/dist/config/deliveryConfig.test.js +39 -2
  12. package/dist/config/deliveryConfig.test.js.map +1 -1
  13. package/dist/currentTrackingScenario.test.js +5 -1
  14. package/dist/currentTrackingScenario.test.js.map +1 -1
  15. package/dist/dispatch.d.ts +2 -0
  16. package/dist/dispatch.js +15 -4
  17. package/dist/dispatch.js.map +1 -1
  18. package/dist/errors.d.ts +11 -0
  19. package/dist/errors.js +35 -0
  20. package/dist/errors.js.map +1 -1
  21. package/dist/fixtures/discovery.d.ts +11 -0
  22. package/dist/fixtures/inertEntrypoints.js +7 -0
  23. package/dist/fixtures/inertEntrypoints.js.map +1 -1
  24. package/dist/fixtures/inertTarget.d.ts +5 -0
  25. package/dist/fixtures/issue63.d.ts +11 -0
  26. package/dist/fixtures/issue63.js +16 -9
  27. package/dist/fixtures/issue63.js.map +1 -1
  28. package/dist/github/client.d.ts +3 -0
  29. package/dist/github/client.js +21 -10
  30. package/dist/github/client.js.map +1 -1
  31. package/dist/github/commandIdentityPolicy.js +1 -0
  32. package/dist/github/commandIdentityPolicy.js.map +1 -1
  33. package/dist/github/machineAuth.test.js +20 -0
  34. package/dist/github/machineAuth.test.js.map +1 -1
  35. package/dist/github/nativeIssueMetadata.d.ts +27 -0
  36. package/dist/github/nativeIssueMetadata.js +58 -0
  37. package/dist/github/nativeIssueMetadata.js.map +1 -1
  38. package/dist/github/projectDelivery.d.ts +3 -0
  39. package/dist/github/projectDelivery.js +44 -12
  40. package/dist/github/projectDelivery.js.map +1 -1
  41. package/dist/issue.d.ts +58 -7
  42. package/dist/issue.js +786 -108
  43. package/dist/issue.js.map +1 -1
  44. package/dist/issueBatchUpdate.test.d.ts +1 -0
  45. package/dist/issueBatchUpdate.test.js +730 -0
  46. package/dist/issueBatchUpdate.test.js.map +1 -0
  47. package/dist/issueBlockerGuard.test.js +78 -0
  48. package/dist/issueBlockerGuard.test.js.map +1 -1
  49. package/dist/issueContract.d.ts +68 -2
  50. package/dist/issueContract.js +101 -9
  51. package/dist/issueContract.js.map +1 -1
  52. package/dist/issueContract.test.d.ts +5 -0
  53. package/dist/issueContract.test.js +28 -1
  54. package/dist/issueContract.test.js.map +1 -1
  55. package/dist/issueDates.test.d.ts +1 -0
  56. package/dist/issueDates.test.js +253 -0
  57. package/dist/issueDates.test.js.map +1 -0
  58. package/dist/issueIntake.test.js +972 -19
  59. package/dist/issueIntake.test.js.map +1 -1
  60. package/dist/issueJournal.js +12 -8
  61. package/dist/issueJournal.js.map +1 -1
  62. package/dist/issueJournal.test.js +138 -0
  63. package/dist/issueJournal.test.js.map +1 -1
  64. package/dist/mcp/index.js +20 -2
  65. package/dist/mcp/index.js.map +1 -1
  66. package/dist/mcp/tools.d.ts +110 -12
  67. package/dist/mcp/tools.js +53 -34
  68. package/dist/mcp/tools.js.map +1 -1
  69. package/dist/pr.d.ts +7 -0
  70. package/dist/pr.js +104 -99
  71. package/dist/pr.js.map +1 -1
  72. package/dist/pr.test.js +202 -223
  73. package/dist/pr.test.js.map +1 -1
  74. package/dist/prAssociation.test.js +11 -10
  75. package/dist/prAssociation.test.js.map +1 -1
  76. package/dist/review.d.ts +1 -0
  77. package/dist/review.js +7 -6
  78. package/dist/review.js.map +1 -1
  79. package/dist/review.test.js +8 -4
  80. package/dist/review.test.js.map +1 -1
  81. package/dist/services/agentReadinessService.js +2 -0
  82. package/dist/services/agentReadinessService.js.map +1 -1
  83. package/dist/setup.test.js +175 -4
  84. package/dist/setup.test.js.map +1 -1
  85. package/dist/stdoutRegression.test.js +22 -0
  86. package/dist/stdoutRegression.test.js.map +1 -1
  87. package/dist/targetPolicyRoutes.test.js +2 -2
  88. package/dist/targetPolicyRoutes.test.js.map +1 -1
  89. package/dist/verification.js +26 -0
  90. package/dist/verification.js.map +1 -1
  91. package/dist/verificationGate.test.js +25 -2
  92. package/dist/verificationGate.test.js.map +1 -1
  93. package/package.json +1 -1
  94. package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
  95. package/plugins/ai-delivery/plugin.json +1 -1
  96. package/plugins/ai-delivery/runtime/dist/cli.js +68 -56
  97. package/plugins/ai-delivery/runtime/package.json +1 -1
  98. package/plugins/ai-delivery/skills/intake-create/SKILL.md +22 -2
  99. package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +4 -4
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aviaratech/ai-delivery",
3
- "version": "0.3.32",
3
+ "version": "0.3.34",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ai-delivery": "./dist/cli.js"
@@ -31,9 +31,9 @@ Choose native Points from the configured values within 1–8. Split a 13-point i
31
31
 
32
32
  1. Call `issue_create` or `issue_update` with typed problem/outcome/acceptanceCriteria/outOfScope/openQuestions/context/bug fields, title, configured Issue Type and Points. Ready is the default. Each blocking diagnostic includes `code`, `field`, and `fixHint`: fix every reported field and retry only the rejected write. Do not retry an uncertain native mutation without authoritative readback.
33
33
  2. Use `draft: true` only for explicitly parked, incomplete work. It produces a Draft status; resolve fields and set `draft: false` to resume Ready intake. Drafts still reject secrets. Existing `park` also retains execution as a draft.
34
- 3. Inspect the native readback and warnings. More than seven criteria, absent edge/regression/context, only machine-local evidence or a body over about 3,000 characters warn without blocking. Consider a smaller scope or better proof.
34
+ 3. Inspect the native readback and warnings. More than seven criteria, absent edge/regression/context, only machine-local evidence or readable text strictly over 4,000 characters warn without blocking. Embedded issue-data is excluded. Consider a smaller scope or better proof.
35
35
  4. Read `issue_info` and `issue_ready_check` before `issue_start`. Readiness validates the typed contract and live Points/blockers/tracking/draft state, without local path checks or a runnable-command requirement. Mentioning the Project Todo column is ordinary prose; unresolved decisions belong in `openQuestions`.
36
- 5. Bodies use `<!-- ai-delivery:issue@1 -->` with a generated Status block and canonical field data. Update typed fields rather than editing only one generated copy. Legacy handwritten bodies convert leniently on update, preserving the complete original in history and the body, and returning the prior/canonical body diff. Missing proof is reported, never invented. Review that diff and exact native readback.
36
+ 5. Bodies use `<!-- ai-delivery:issue@1 -->` with canonical field data and five status fields: Ready/Draft, last updated in UTC, next milestone (default `Not started`), native blockers (or `None`), and latest journal (`None yet`). Create accepts `status.nextMilestone`; update also accepts display-only `status.blockers` and `status.latestJournal`. These single-line fields work in CLI field files. A status-only patch preserves every byte outside Status, including issue-data/start markers, and an unchanged patch keeps its timestamp. Display blockers do not mutate native dependencies; use `blockedBy` separately. Update typed fields rather than editing one generated copy. Legacy conversion preserves exact prior native history before default render omission, returning the prior/canonical diff. Incoming legacy bytes absent from history remain visible. `preserveHistory` controls history snapshots; `retainLegacyBody` independently controls readable legacy text and does not erase its embedded record or comments. Explicit `retainLegacyBody: false` is a deliberate render drop; with `preserveHistory: false`, the default retains unpreserved legacy text. Retention true keeps text visible even with history preservation. Repeated unchanged updates do not grow the body or duplicate history. Failed history readback or content drift refuses rewriting. Missing proof is reported, never invented. Review the diff and exact native readback.
37
37
 
38
38
  The Draft/Ready structural JSON Schemas ship on the existing exported `AI_DELIVERY_MCP_TOOLS` issue-create definition as `issueContract`. Zod runtime validation also enforces semantic refinements (specific wording, bug evidence and secrets); portable structural JSON Schema alone does not prove readiness.
39
39
 
@@ -65,6 +65,26 @@ Save this UTF-8 typed field object as `/owned/issue.json` in your task-owned dir
65
65
  }
66
66
  ```
67
67
 
68
+ ## Batch tracking updates
69
+
70
+ For an authorized list of 1–50 current-repository updates, use
71
+ `issue_batch_update({repo, items, dryRun})`, or the CLI
72
+ `batch:update --items-file <UTF-8-JSON-array> [--dry-run]`. Each item supports the
73
+ complete `issue_update` contract, including close, defer/undefer, parent,
74
+ blockers, status, typed contract and history/render-retention fields. A per-item
75
+ repository must match the selected repository. Existing author and native guards
76
+ still apply; this tool adds no authority or live fixture permission.
77
+
78
+ Use dry run for read-only intent: it performs no writes, including journals,
79
+ history, metadata, Project or related-issue changes. Inspect each ordered plan
80
+ and current readback. Execution returns applied/unchanged/failed results for all
81
+ items and a summary; CLI retains complete JSON and exits nonzero for any failure.
82
+ Partial writes remain failed with observed state or an explicit unavailable
83
+ readback. Reconcile that existing state before retrying; a rerun skips satisfied
84
+ outcomes and reuses authored comments. Rate exhaustion stops remaining writes,
85
+ reports every remaining item and exposes only numeric rate-limit observations.
86
+ No cross-repository transaction, rollback or automatic mutation replay is implied.
87
+
68
88
  ## CLI fallback
69
89
 
70
90
  Use the installed CLI when MCP is unavailable only if the user's requested tool/provider restrictions permit that fallback. An MCP-only request, “no other GitHub tool,” or unavailable/incompatible requested-provider stop above does not authorize CLI substitution. Substitute your configured author identity, intended repository, owned JSON path and actual issue number. Explicit CLI values override the corresponding field-file values; omitted flags preserve them. `--fields-file` accepts the same typed field patch used by MCP. These commands perform real native operations only under your already authorized lifecycle:
@@ -22,16 +22,16 @@ Fictional `example/widget` PR23 at reviewed head H and base B illustrates these
22
22
  - A lead quotes approval with a source ID: retain it as relayed evidence and resolve original scope when needed; the quote is neither local authentication nor an execution receipt.
23
23
  - Checks, App access and review dry-run pass with no verified operator grant: submission remains pending and no approval has counted.
24
24
  - Delegation and its admitted retry are refused: preserve both undelivered attempts, stop dependent writes and make the single precise native-user request without changing actor or route.
25
- - The original operator grant covers App submission and promotion: resume only pending admitted operations, read back the exact review and counted approval before promotion, and reconcile an uncertain acknowledgement before retrying. Merge needs its own coverage within the grant and the existing exact-head, current-base, protection, checks, association, serial-lane and CLEAN guards. Changed source requires fresh verification/review and reconciliation of authority scope.
25
+ - The original operator grant covers App submission and promotion: resume only pending admitted operations, read back the exact review and counted approval before promotion, and reconcile an uncertain acknowledgement before retrying. Merge needs its own coverage within the grant and the existing exact-head, current-base, protection, checks, association, serial-lane and native GitHub eligibility guards. Changed source requires fresh verification/review and reconciliation of authority scope.
26
26
 
27
27
 
28
28
  Run contributor checks through the repository's normal workflow. Keep the resulting commit unchanged through publication and independent review; a changed head requires fresh checks and review.
29
29
 
30
30
  Call `issue_pr_create` with explicit `repo`, issue number, a non-empty body and `dryRun: true`. Inspect configured actor and rule evidence, then create a draft from the GitHub-linked branch. Hosts own commits and pushes. Resolve missing credentials or same-actor routes; unknown approval eligibility is not approval.
31
31
 
32
- Obtain a read-only independent review of the exact remote commit, tree and complete diff. Submit its artifact with `issue_pr_review` using the configured reviewer App. A matching review is reused. Inspect GitHub's live required-review decision and checks; submission alone does not prove the approval counted. Resolve stale/dismissed reviews, blockers, failed checks and moved heads or bases without relaxing protection.
32
+ Obtain a read-only independent review of the exact remote commit, tree and complete diff. Submit its artifact with `issue_pr_review` using the configured reviewer App. A matching review is reused. Inspect GitHub's live required-review decision and checks; submission alone does not prove the approval counted. Resolve stale/dismissed reviews, blockers, failed required checks and moved heads or bases without relaxing protection.
33
33
 
34
- Promote the unchanged PR using `issue_pr_create` with `draft: false`. Finish only with satisfied GitHub requirements and fresh CLEAN eligibility. The merge mutation uses the independently reviewed SHA; finish confirms the intended PR merged before closing its issue. Hosts retain responsibility for local worktree cleanup.
34
+ Promote the unchanged PR using `issue_pr_create` with `draft: false`. Finish only with fresh native GitHub eligibility at the exact head and current base. GitHub owns required checks, review counts, stale-review dismissal and configured up-to-date rules. `pr:checks` reports native required check names/statuses; resolve BLOCKED, BEHIND, conflicts, unknown or incomplete evidence before mutation. A zero-review rule does not require an extra App approval; an optional failed check does not become required. The merge mutation uses the independently reviewed SHA; finish confirms the intended PR merged before closing its issue. Hosts retain responsibility for local worktree cleanup.
35
35
 
36
36
  ```sh
37
37
  ai-delivery --repo <owner/name> pr:create --issue <number> --body-file ./pr-body.md --dry-run
@@ -43,4 +43,4 @@ ai-delivery --repo <owner/name> pr:checks --pr <number>
43
43
  ai-delivery --repo <owner/name> finish --issue <number> --pr <number> --reviewed-head <reviewed-sha>
44
44
  ```
45
45
 
46
- CLI `--artifact` is a UTF-8 JSON file path. MCP takes the JSON content. Never fabricate effective model metadata or historical policy/evidence receipts. The artifact and counted independent App approval must bind the exact delivered head.
46
+ CLI `--artifact` is a UTF-8 JSON file path. MCP takes the JSON content. Never fabricate effective model metadata or historical policy/evidence receipts. Validate the supplied artifact against the exact remote commit/tree/diff before App submission and verify its review readback. Merge then follows GitHub’s current eligibility without rechecking historical embedded artifact identities or publication lineage. Repository-specific independent review requirements still apply.