@aviaratech/ai-delivery 0.3.35 → 0.3.37

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 (301) hide show
  1. package/CONTRIBUTING.md +12 -206
  2. package/README.md +56 -554
  3. package/dist/agent.d.ts +1 -3
  4. package/dist/agent.js +74 -16
  5. package/dist/agent.js.map +7 -1
  6. package/dist/agentReadiness.test.js +73 -67
  7. package/dist/agentReadiness.test.js.map +7 -1
  8. package/dist/boardReconcile.test.js +1651 -1590
  9. package/dist/boardReconcile.test.js.map +7 -1
  10. package/dist/build.test.js +130 -0
  11. package/dist/build.test.js.map +7 -0
  12. package/dist/callerErrors.test.js +91 -0
  13. package/dist/callerErrors.test.js.map +7 -0
  14. package/dist/cli.js +389 -517
  15. package/dist/cli.js.map +7 -1
  16. package/dist/cliResult.d.ts +2 -2
  17. package/dist/cliResult.js +42 -45
  18. package/dist/cliResult.js.map +7 -1
  19. package/dist/cliResult.test.js +424 -369
  20. package/dist/cliResult.test.js.map +7 -1
  21. package/dist/config/deliveryConfig.d.ts +288 -14
  22. package/dist/config/deliveryConfig.js +472 -390
  23. package/dist/config/deliveryConfig.js.map +7 -1
  24. package/dist/config/deliveryConfig.test.js +773 -649
  25. package/dist/config/deliveryConfig.test.js.map +7 -1
  26. package/dist/contributorChecks.test.js +1694 -916
  27. package/dist/contributorChecks.test.js.map +7 -1
  28. package/dist/currentConsumer.test.js +819 -737
  29. package/dist/currentConsumer.test.js.map +7 -1
  30. package/dist/currentTrackingScenario.test.js +499 -479
  31. package/dist/currentTrackingScenario.test.js.map +7 -1
  32. package/dist/delivery/common.js +160 -172
  33. package/dist/delivery/common.js.map +7 -1
  34. package/dist/delivery/delivery.test.js +509 -431
  35. package/dist/delivery/delivery.test.js.map +7 -1
  36. package/dist/delivery/evidence.d.ts +2 -2
  37. package/dist/delivery/evidence.js +133 -120
  38. package/dist/delivery/evidence.js.map +7 -1
  39. package/dist/delivery/index.js +7 -2
  40. package/dist/delivery/index.js.map +7 -1
  41. package/dist/delivery/legacy.js +65 -5
  42. package/dist/delivery/legacy.js.map +7 -1
  43. package/dist/delivery/policy.d.ts +10 -10
  44. package/dist/delivery/policy.js +211 -238
  45. package/dist/delivery/policy.js.map +7 -1
  46. package/dist/delivery/stage.d.ts +18 -18
  47. package/dist/delivery/stage.js +220 -235
  48. package/dist/delivery/stage.js.map +7 -1
  49. package/dist/deliveryBoard.d.ts +74 -0
  50. package/dist/deliveryBoard.js +644 -0
  51. package/dist/deliveryBoard.js.map +7 -0
  52. package/dist/deliveryBoard.test.js +649 -0
  53. package/dist/deliveryBoard.test.js.map +7 -0
  54. package/dist/deliveryHealth.test.js +179 -155
  55. package/dist/deliveryHealth.test.js.map +7 -1
  56. package/dist/dependencyCompatibility.test.js +154 -140
  57. package/dist/dependencyCompatibility.test.js.map +7 -1
  58. package/dist/directoryIndependent.test.js +417 -383
  59. package/dist/directoryIndependent.test.js.map +7 -1
  60. package/dist/dispatch.d.ts +16 -11
  61. package/dist/dispatch.js +316 -354
  62. package/dist/dispatch.js.map +7 -1
  63. package/dist/errors.d.ts +3 -3
  64. package/dist/errors.js +103 -96
  65. package/dist/errors.js.map +7 -1
  66. package/dist/fixtures/deliveryBoardReplay.d.ts +56 -0
  67. package/dist/fixtures/deliveryBoardReplay.js +617 -0
  68. package/dist/fixtures/deliveryBoardReplay.js.map +7 -0
  69. package/dist/fixtures/discovery.d.ts +63 -23
  70. package/dist/fixtures/discovery.js +96 -90
  71. package/dist/fixtures/discovery.js.map +7 -1
  72. package/dist/fixtures/inertEntrypointChild.js +57 -56
  73. package/dist/fixtures/inertEntrypointChild.js.map +7 -1
  74. package/dist/fixtures/inertEntrypoints.d.ts +1 -1
  75. package/dist/fixtures/inertEntrypoints.js +321 -276
  76. package/dist/fixtures/inertEntrypoints.js.map +7 -1
  77. package/dist/fixtures/inertTarget.d.ts +78 -7
  78. package/dist/fixtures/inertTarget.js +769 -691
  79. package/dist/fixtures/inertTarget.js.map +7 -1
  80. package/dist/fixtures/issue63.d.ts +4 -3
  81. package/dist/fixtures/issue63.js +260 -274
  82. package/dist/fixtures/issue63.js.map +7 -1
  83. package/dist/fixtures/issueProjectItems.d.ts +20 -0
  84. package/dist/fixtures/issueProjectItems.js +15 -0
  85. package/dist/fixtures/issueProjectItems.js.map +7 -0
  86. package/dist/fixtures/readView.d.ts +120 -0
  87. package/dist/fixtures/readView.js +172 -0
  88. package/dist/fixtures/readView.js.map +7 -0
  89. package/dist/fixtures/recordedGitHubFlows.d.ts +120 -0
  90. package/dist/fixtures/recordedGitHubFlows.js +109 -0
  91. package/dist/fixtures/recordedGitHubFlows.js.map +7 -0
  92. package/dist/genericCompatibility.test.js +64 -55
  93. package/dist/genericCompatibility.test.js.map +7 -1
  94. package/dist/git.d.ts +0 -3
  95. package/dist/git.js +59 -76
  96. package/dist/git.js.map +7 -1
  97. package/dist/gitProcess.d.ts +1 -1
  98. package/dist/gitProcess.js +58 -53
  99. package/dist/gitProcess.js.map +7 -1
  100. package/dist/github/client.d.ts +2 -2
  101. package/dist/github/client.js +484 -379
  102. package/dist/github/client.js.map +7 -1
  103. package/dist/github/commandIdentityPolicy.js +42 -52
  104. package/dist/github/commandIdentityPolicy.js.map +7 -1
  105. package/dist/github/discovery.d.ts +1 -0
  106. package/dist/github/discovery.js +197 -215
  107. package/dist/github/discovery.js.map +7 -1
  108. package/dist/github/discovery.test.js +223 -177
  109. package/dist/github/discovery.test.js.map +7 -1
  110. package/dist/github/issueHistory.d.ts +2 -2
  111. package/dist/github/issueHistory.js +117 -125
  112. package/dist/github/issueHistory.js.map +7 -1
  113. package/dist/github/machineAuth.d.ts +1 -1
  114. package/dist/github/machineAuth.js +126 -117
  115. package/dist/github/machineAuth.js.map +7 -1
  116. package/dist/github/machineAuth.test.js +755 -639
  117. package/dist/github/machineAuth.test.js.map +7 -1
  118. package/dist/github/nativeIssueMetadata.js +286 -273
  119. package/dist/github/nativeIssueMetadata.js.map +7 -1
  120. package/dist/github/projectDelivery.d.ts +18 -2
  121. package/dist/github/projectDelivery.js +615 -557
  122. package/dist/github/projectDelivery.js.map +7 -1
  123. package/dist/github/relationships.js +433 -389
  124. package/dist/github/relationships.js.map +7 -1
  125. package/dist/github/repo.d.ts +1 -0
  126. package/dist/github/repo.js +123 -96
  127. package/dist/github/repo.js.map +7 -1
  128. package/dist/index.js +3 -3
  129. package/dist/index.js.map +7 -1
  130. package/dist/issue.d.ts +40 -9
  131. package/dist/issue.js +2102 -1742
  132. package/dist/issue.js.map +7 -1
  133. package/dist/issue63History.test.js +40 -42
  134. package/dist/issue63History.test.js.map +7 -1
  135. package/dist/issue63Routes.test.js +154 -143
  136. package/dist/issue63Routes.test.js.map +7 -1
  137. package/dist/issueBatchUpdate.test.js +989 -885
  138. package/dist/issueBatchUpdate.test.js.map +7 -1
  139. package/dist/issueBlockerGuard.test.js +262 -226
  140. package/dist/issueBlockerGuard.test.js.map +7 -1
  141. package/dist/issueContract.d.ts +23 -4
  142. package/dist/issueContract.js +416 -395
  143. package/dist/issueContract.js.map +7 -1
  144. package/dist/issueContract.test.d.ts +4 -3
  145. package/dist/issueContract.test.js +358 -321
  146. package/dist/issueContract.test.js.map +7 -1
  147. package/dist/issueDates.test.js +235 -233
  148. package/dist/issueDates.test.js.map +7 -1
  149. package/dist/issueInfoReadback.test.js +304 -190
  150. package/dist/issueInfoReadback.test.js.map +7 -1
  151. package/dist/issueIntake.test.js +1938 -1732
  152. package/dist/issueIntake.test.js.map +7 -1
  153. package/dist/issueJournal.d.ts +40 -19
  154. package/dist/issueJournal.js +229 -138
  155. package/dist/issueJournal.js.map +7 -1
  156. package/dist/issueJournal.test.js +605 -422
  157. package/dist/issueJournal.test.js.map +7 -1
  158. package/dist/issueRollup.test.d.ts +1 -0
  159. package/dist/issueRollup.test.js +476 -0
  160. package/dist/issueRollup.test.js.map +7 -0
  161. package/dist/issueTracking.test.js +1059 -989
  162. package/dist/issueTracking.test.js.map +7 -1
  163. package/dist/issueWriteRecovery.test.d.ts +1 -0
  164. package/dist/issueWriteRecovery.test.js +260 -0
  165. package/dist/issueWriteRecovery.test.js.map +7 -0
  166. package/dist/lifecycle.test.js +112 -441
  167. package/dist/lifecycle.test.js.map +7 -1
  168. package/dist/logger.js +80 -74
  169. package/dist/logger.js.map +7 -1
  170. package/dist/mcp/index.js +116 -94
  171. package/dist/mcp/index.js.map +7 -1
  172. package/dist/mcp/tools.d.ts +252 -310
  173. package/dist/mcp/tools.js +235 -342
  174. package/dist/mcp/tools.js.map +7 -1
  175. package/dist/pluginAuthProbe.js +63 -52
  176. package/dist/pluginAuthProbe.js.map +7 -1
  177. package/dist/pluginAuthProbe.test.js +85 -62
  178. package/dist/pluginAuthProbe.test.js.map +7 -1
  179. package/dist/pluginCredentials.test.js +282 -259
  180. package/dist/pluginCredentials.test.js.map +7 -1
  181. package/dist/pluginDoctor.test.js +653 -588
  182. package/dist/pluginDoctor.test.js.map +7 -1
  183. package/dist/pluginInstaller.d.ts +7 -5
  184. package/dist/pluginInstaller.js +1173 -1229
  185. package/dist/pluginInstaller.js.map +7 -1
  186. package/dist/pluginInstaller.test.js +1842 -1423
  187. package/dist/pluginInstaller.test.js.map +7 -1
  188. package/dist/pluginPackaging.test.js +417 -413
  189. package/dist/pluginPackaging.test.js.map +7 -1
  190. package/dist/pr.d.ts +114 -131
  191. package/dist/pr.js +1314 -1327
  192. package/dist/pr.js.map +7 -1
  193. package/dist/pr.test.js +967 -653
  194. package/dist/pr.test.js.map +7 -1
  195. package/dist/prAssociation.test.js +2419 -1788
  196. package/dist/prAssociation.test.js.map +7 -1
  197. package/dist/prDispatch.test.js +123 -89
  198. package/dist/prDispatch.test.js.map +7 -1
  199. package/dist/readView.d.ts +184 -0
  200. package/dist/readView.js +218 -0
  201. package/dist/readView.js.map +7 -0
  202. package/dist/readView.test.d.ts +1 -0
  203. package/dist/readView.test.js +146 -0
  204. package/dist/readView.test.js.map +7 -0
  205. package/dist/releaseReconciliation.test.js +267 -288
  206. package/dist/releaseReconciliation.test.js.map +7 -1
  207. package/dist/releaseWorkflow.test.js +2493 -422
  208. package/dist/releaseWorkflow.test.js.map +7 -1
  209. package/dist/review.d.ts +738 -2
  210. package/dist/review.js +601 -348
  211. package/dist/review.js.map +7 -1
  212. package/dist/review.test.js +1218 -812
  213. package/dist/review.test.js.map +7 -1
  214. package/dist/reviewSubmit.test.d.ts +1 -0
  215. package/dist/reviewSubmit.test.js +747 -0
  216. package/dist/reviewSubmit.test.js.map +7 -0
  217. package/dist/services/agentReadinessService.js +42 -37
  218. package/dist/services/agentReadinessService.js.map +7 -1
  219. package/dist/services/blockerGuardService.js +188 -188
  220. package/dist/services/blockerGuardService.js.map +7 -1
  221. package/dist/services/boardReconcileService.d.ts +125 -125
  222. package/dist/services/boardReconcileService.js +1295 -1421
  223. package/dist/services/boardReconcileService.js.map +7 -1
  224. package/dist/services/deliveryHealthService.js +197 -199
  225. package/dist/services/deliveryHealthService.js.map +7 -1
  226. package/dist/services/legacyIssueMigration.js +263 -277
  227. package/dist/services/legacyIssueMigration.js.map +7 -1
  228. package/dist/stagedChecks.test.js +396 -194
  229. package/dist/stagedChecks.test.js.map +7 -1
  230. package/dist/start.test.js +99 -95
  231. package/dist/start.test.js.map +7 -1
  232. package/dist/stdoutRegression.test.js +321 -358
  233. package/dist/stdoutRegression.test.js.map +7 -1
  234. package/dist/targetPolicyDiscovery.test.js +141 -143
  235. package/dist/targetPolicyDiscovery.test.js.map +7 -1
  236. package/dist/targetPolicyEntrypoints.test.js +308 -269
  237. package/dist/targetPolicyEntrypoints.test.js.map +7 -1
  238. package/dist/targetPolicyLocal.test.js +580 -1051
  239. package/dist/targetPolicyLocal.test.js.map +7 -1
  240. package/dist/targetPolicyRoutes.test.js +274 -281
  241. package/dist/targetPolicyRoutes.test.js.map +7 -1
  242. package/dist/targetRepositoryExecution.test.d.ts +1 -0
  243. package/dist/targetRepositoryExecution.test.js +451 -0
  244. package/dist/targetRepositoryExecution.test.js.map +7 -0
  245. package/dist/terminalMessages.js +41 -35
  246. package/dist/terminalMessages.js.map +7 -1
  247. package/dist/toolOutput.d.ts +2 -0
  248. package/dist/toolOutput.js +36 -0
  249. package/dist/toolOutput.js.map +7 -0
  250. package/dist/toolOutput.test.d.ts +1 -0
  251. package/dist/toolOutput.test.js +240 -0
  252. package/dist/toolOutput.test.js.map +7 -0
  253. package/dist/utils/atomicJson.d.ts +0 -2
  254. package/dist/utils/atomicJson.js +81 -77
  255. package/dist/utils/atomicJson.js.map +7 -1
  256. package/dist/utils/filesystem.d.ts +0 -8
  257. package/dist/utils/filesystem.js +5 -19
  258. package/dist/utils/filesystem.js.map +7 -1
  259. package/dist/utils/lockfile.js +68 -71
  260. package/dist/utils/lockfile.js.map +7 -1
  261. package/dist/verification.d.ts +1 -54
  262. package/dist/verification.js +976 -1941
  263. package/dist/verification.js.map +7 -1
  264. package/dist/verificationGate.test.js +127 -117
  265. package/dist/verificationGate.test.js.map +7 -1
  266. package/dist/version.js +45 -24
  267. package/dist/version.js.map +7 -1
  268. package/package.json +9 -8
  269. package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
  270. package/plugins/ai-delivery/README.md +47 -156
  271. package/plugins/ai-delivery/plugin.json +1 -1
  272. package/plugins/ai-delivery/runtime/dist/THIRD-PARTY-NOTICES.md +238 -44
  273. package/plugins/ai-delivery/runtime/dist/cli.js +351 -115
  274. package/plugins/ai-delivery/runtime/package.json +1 -1
  275. package/plugins/ai-delivery/skills/intake-create/SKILL.md +14 -78
  276. package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +35 -36
  277. package/plugins/ai-delivery/skills/worktree-lifecycle/SKILL.md +14 -15
  278. package/dist/investigationCompletion.test.js +0 -728
  279. package/dist/investigationCompletion.test.js.map +0 -1
  280. package/dist/services/deliveryAdmission.d.ts +0 -49
  281. package/dist/services/deliveryAdmission.js +0 -165
  282. package/dist/services/deliveryAdmission.js.map +0 -1
  283. package/dist/services/worktreeRegistry.d.ts +0 -434
  284. package/dist/services/worktreeRegistry.js +0 -1248
  285. package/dist/services/worktreeRegistry.js.map +0 -1
  286. package/dist/setup.d.ts +0 -60
  287. package/dist/setup.js +0 -585
  288. package/dist/setup.js.map +0 -1
  289. package/dist/setup.test.js +0 -3329
  290. package/dist/setup.test.js.map +0 -1
  291. package/dist/worktree.d.ts +0 -28
  292. package/dist/worktree.js +0 -188
  293. package/dist/worktree.js.map +0 -1
  294. package/dist/worktreeTransition.d.ts +0 -211
  295. package/dist/worktreeTransition.js +0 -1037
  296. package/dist/worktreeTransition.js.map +0 -1
  297. package/dist/worktreeTransition.test.js +0 -1191
  298. package/dist/worktreeTransition.test.js.map +0 -1
  299. /package/dist/{investigationCompletion.test.d.ts → build.test.d.ts} +0 -0
  300. /package/dist/{setup.test.d.ts → callerErrors.test.d.ts} +0 -0
  301. /package/dist/{worktreeTransition.test.d.ts → deliveryBoard.test.d.ts} +0 -0
@@ -1,434 +0,0 @@
1
- import { z } from 'zod';
2
- import type { WorktreeTransitionPlan } from '../worktreeTransition.js';
3
- export interface WorktreeEntry {
4
- branch: string;
5
- createdAt: string;
6
- /** Agent identity that prepared the worktree; hook-context commands (lint-guard) fall back to it. */
7
- identity?: string;
8
- issueNumber?: number;
9
- path: string;
10
- prNumber?: number;
11
- status: WorktreeStatus;
12
- type: 'issue' | 'pr' | 'standalone';
13
- updatedAt: string;
14
- }
15
- export type WorktreeStatus = 'active' | 'error' | 'merged' | 'pr-published' | 'stale';
16
- /** @internal Private exact-plan checkpoint; it is not a public transition purpose. */
17
- export declare const CommittedContinuationPlanSchema: z.ZodObject<{
18
- schemaVersion: z.ZodLiteral<"ai-delivery.committed-continuation-plan@1">;
19
- planId: z.ZodString;
20
- repository: z.ZodString;
21
- repoRoot: z.ZodString;
22
- configDigest: z.ZodString;
23
- currentRuntime: z.ZodObject<{
24
- admissionId: z.ZodString;
25
- capability: z.ZodObject<{
26
- cli: z.ZodNumber;
27
- mcp: z.ZodNumber;
28
- }, z.core.$strict>;
29
- cliPath: z.ZodString;
30
- cliSha256: z.ZodString;
31
- configDigest: z.ZodString;
32
- mcpLauncherPath: z.ZodString;
33
- mcpLauncherSha256: z.ZodString;
34
- packageDistSha256: z.ZodString;
35
- packageManifestSha256: z.ZodString;
36
- packageVersion: z.ZodString;
37
- pluginManifestPath: z.ZodString;
38
- pluginManifestSha256: z.ZodString;
39
- repository: z.ZodString;
40
- schemaVersion: z.ZodLiteral<"ai-delivery.runtime-admission@2">;
41
- sourceArchiveSha256: z.ZodString;
42
- sourceCommit: z.ZodString;
43
- }, z.core.$strict>;
44
- row: z.ZodPipe<z.ZodObject<{
45
- branch: z.ZodString;
46
- createdAt: z.ZodString;
47
- identity: z.ZodString;
48
- issueNumber: z.ZodNumber;
49
- path: z.ZodString;
50
- prNumber: z.ZodOptional<z.ZodNumber>;
51
- status: z.ZodEnum<{
52
- error: "error";
53
- active: "active";
54
- stale: "stale";
55
- merged: "merged";
56
- "pr-published": "pr-published";
57
- }>;
58
- type: z.ZodLiteral<"issue">;
59
- updatedAt: z.ZodString;
60
- }, z.core.$strict>, z.ZodTransform<{
61
- prNumber?: number;
62
- branch: string;
63
- createdAt: string;
64
- identity: string;
65
- issueNumber: number;
66
- path: string;
67
- status: "error" | "active" | "stale" | "merged" | "pr-published";
68
- type: "issue";
69
- updatedAt: string;
70
- }, {
71
- branch: string;
72
- createdAt: string;
73
- identity: string;
74
- issueNumber: number;
75
- path: string;
76
- status: "error" | "active" | "stale" | "merged" | "pr-published";
77
- type: "issue";
78
- updatedAt: string;
79
- prNumber?: number | undefined;
80
- }>>;
81
- replacement: z.ZodPipe<z.ZodObject<{
82
- branch: z.ZodString;
83
- createdAt: z.ZodString;
84
- identity: z.ZodString;
85
- issueNumber: z.ZodNumber;
86
- path: z.ZodString;
87
- prNumber: z.ZodOptional<z.ZodNumber>;
88
- status: z.ZodEnum<{
89
- error: "error";
90
- active: "active";
91
- stale: "stale";
92
- merged: "merged";
93
- "pr-published": "pr-published";
94
- }>;
95
- type: z.ZodLiteral<"issue">;
96
- updatedAt: z.ZodString;
97
- }, z.core.$strict>, z.ZodTransform<{
98
- prNumber?: number;
99
- branch: string;
100
- createdAt: string;
101
- identity: string;
102
- issueNumber: number;
103
- path: string;
104
- status: "error" | "active" | "stale" | "merged" | "pr-published";
105
- type: "issue";
106
- updatedAt: string;
107
- }, {
108
- branch: string;
109
- createdAt: string;
110
- identity: string;
111
- issueNumber: number;
112
- path: string;
113
- status: "error" | "active" | "stale" | "merged" | "pr-published";
114
- type: "issue";
115
- updatedAt: string;
116
- prNumber?: number | undefined;
117
- }>>;
118
- head: z.ZodObject<{
119
- sha: z.ZodString;
120
- tree: z.ZodString;
121
- }, z.core.$strict>;
122
- terminalHead: z.ZodObject<{
123
- sha: z.ZodString;
124
- tree: z.ZodString;
125
- }, z.core.$strict>;
126
- terminalMergeId: z.ZodString;
127
- operator: z.ZodObject<{
128
- actorLogin: z.ZodString;
129
- credentialIdentity: z.ZodString;
130
- }, z.core.$strict>;
131
- reviewerActor: z.ZodString;
132
- preserved: z.ZodArray<z.ZodObject<{
133
- path: z.ZodString;
134
- digest: z.ZodString;
135
- }, z.core.$strict>>;
136
- }, z.core.$strict>;
137
- export type CommittedContinuationPlan = z.infer<typeof CommittedContinuationPlanSchema>;
138
- declare const ContinuationIntentSchema: z.ZodObject<{
139
- schemaVersion: z.ZodLiteral<"ai-delivery.committed-continuation-intent@1">;
140
- intentId: z.ZodString;
141
- plan: z.ZodObject<{
142
- schemaVersion: z.ZodLiteral<"ai-delivery.committed-continuation-plan@1">;
143
- planId: z.ZodString;
144
- repository: z.ZodString;
145
- repoRoot: z.ZodString;
146
- configDigest: z.ZodString;
147
- currentRuntime: z.ZodObject<{
148
- admissionId: z.ZodString;
149
- capability: z.ZodObject<{
150
- cli: z.ZodNumber;
151
- mcp: z.ZodNumber;
152
- }, z.core.$strict>;
153
- cliPath: z.ZodString;
154
- cliSha256: z.ZodString;
155
- configDigest: z.ZodString;
156
- mcpLauncherPath: z.ZodString;
157
- mcpLauncherSha256: z.ZodString;
158
- packageDistSha256: z.ZodString;
159
- packageManifestSha256: z.ZodString;
160
- packageVersion: z.ZodString;
161
- pluginManifestPath: z.ZodString;
162
- pluginManifestSha256: z.ZodString;
163
- repository: z.ZodString;
164
- schemaVersion: z.ZodLiteral<"ai-delivery.runtime-admission@2">;
165
- sourceArchiveSha256: z.ZodString;
166
- sourceCommit: z.ZodString;
167
- }, z.core.$strict>;
168
- row: z.ZodPipe<z.ZodObject<{
169
- branch: z.ZodString;
170
- createdAt: z.ZodString;
171
- identity: z.ZodString;
172
- issueNumber: z.ZodNumber;
173
- path: z.ZodString;
174
- prNumber: z.ZodOptional<z.ZodNumber>;
175
- status: z.ZodEnum<{
176
- error: "error";
177
- active: "active";
178
- stale: "stale";
179
- merged: "merged";
180
- "pr-published": "pr-published";
181
- }>;
182
- type: z.ZodLiteral<"issue">;
183
- updatedAt: z.ZodString;
184
- }, z.core.$strict>, z.ZodTransform<{
185
- prNumber?: number;
186
- branch: string;
187
- createdAt: string;
188
- identity: string;
189
- issueNumber: number;
190
- path: string;
191
- status: "error" | "active" | "stale" | "merged" | "pr-published";
192
- type: "issue";
193
- updatedAt: string;
194
- }, {
195
- branch: string;
196
- createdAt: string;
197
- identity: string;
198
- issueNumber: number;
199
- path: string;
200
- status: "error" | "active" | "stale" | "merged" | "pr-published";
201
- type: "issue";
202
- updatedAt: string;
203
- prNumber?: number | undefined;
204
- }>>;
205
- replacement: z.ZodPipe<z.ZodObject<{
206
- branch: z.ZodString;
207
- createdAt: z.ZodString;
208
- identity: z.ZodString;
209
- issueNumber: z.ZodNumber;
210
- path: z.ZodString;
211
- prNumber: z.ZodOptional<z.ZodNumber>;
212
- status: z.ZodEnum<{
213
- error: "error";
214
- active: "active";
215
- stale: "stale";
216
- merged: "merged";
217
- "pr-published": "pr-published";
218
- }>;
219
- type: z.ZodLiteral<"issue">;
220
- updatedAt: z.ZodString;
221
- }, z.core.$strict>, z.ZodTransform<{
222
- prNumber?: number;
223
- branch: string;
224
- createdAt: string;
225
- identity: string;
226
- issueNumber: number;
227
- path: string;
228
- status: "error" | "active" | "stale" | "merged" | "pr-published";
229
- type: "issue";
230
- updatedAt: string;
231
- }, {
232
- branch: string;
233
- createdAt: string;
234
- identity: string;
235
- issueNumber: number;
236
- path: string;
237
- status: "error" | "active" | "stale" | "merged" | "pr-published";
238
- type: "issue";
239
- updatedAt: string;
240
- prNumber?: number | undefined;
241
- }>>;
242
- head: z.ZodObject<{
243
- sha: z.ZodString;
244
- tree: z.ZodString;
245
- }, z.core.$strict>;
246
- terminalHead: z.ZodObject<{
247
- sha: z.ZodString;
248
- tree: z.ZodString;
249
- }, z.core.$strict>;
250
- terminalMergeId: z.ZodString;
251
- operator: z.ZodObject<{
252
- actorLogin: z.ZodString;
253
- credentialIdentity: z.ZodString;
254
- }, z.core.$strict>;
255
- reviewerActor: z.ZodString;
256
- preserved: z.ZodArray<z.ZodObject<{
257
- path: z.ZodString;
258
- digest: z.ZodString;
259
- }, z.core.$strict>>;
260
- }, z.core.$strict>;
261
- authorityCommentId: z.ZodNumber;
262
- acceptanceCommentId: z.ZodNumber;
263
- }, z.core.$strict>;
264
- type ContinuationIntent = z.infer<typeof ContinuationIntentSchema>;
265
- export declare function committedContinuationPlanPath(root: string, issueNumber: number, head: string): string;
266
- /** @internal Pending intents are recoverable only by the same supported develop boundary. */
267
- export declare function pendingCommittedContinuation(issueNumber: number, root: string): ContinuationIntent | undefined;
268
- /** An immutable witness separates new rows from legacy rows in the same canonical registry. */
269
- export declare function assertAiDeliveryWorktreeOwner(entry: WorktreeEntry, root: string): void;
270
- /** Ordinary source mutations also refuse terminal/pending issue intent after the row was removed. */
271
- export declare function assertIssueWorktreeTransitionAdmission(issueNumber: number, root: string, committedRecovery?: boolean): void;
272
- /** @internal New continuation checkpoints are published only while both owning locks are held. */
273
- export declare function writeCommittedContinuationCheckpoint(path: string, value: unknown): void;
274
- /** @internal One canonical row, its immutable witnesses, and the existing registry lock own this recovery. */
275
- export declare function withCommittedContinuationRegistry<T>(root: string, issueNumber: number, operation: (input: {
276
- current: WorktreeEntry;
277
- pending: ContinuationIntent | undefined;
278
- ownerWitness: {
279
- path: string;
280
- digest: string;
281
- };
282
- prepare(this: void): void;
283
- begin(this: void, plan: CommittedContinuationPlan, ids: {
284
- authorityCommentId: number;
285
- acceptanceCommentId: number;
286
- }): void;
287
- commit(this: void): void;
288
- complete(this: void): void;
289
- }) => Promise<T>): Promise<T>;
290
- /** @internal The explicit transition owner holds the existing registry lock through its exact planned mutation. */
291
- export declare function withWorktreeTransitionRegistry<T>(plan: WorktreeTransitionPlan, operation: (input: {
292
- current: WorktreeEntry | undefined;
293
- writeOwner(this: void): void;
294
- commitRow(this: void): WorktreeEntry;
295
- removeRow(this: void): void;
296
- }) => Promise<T>): Promise<T>;
297
- /** @internal Validate the existing immutable witness without granting ordinary terminal admission. */
298
- export declare function assertTransitionOwnerWitness(plan: WorktreeTransitionPlan): void;
299
- /**
300
- * The only recovery transition for a worktree that remained active after its
301
- * delivery completed elsewhere. Callers must establish the terminal delivery
302
- * from GitHub and immutable receipts before invoking this locked transition.
303
- */
304
- export interface CompletedIssueWorktreeReconciliation {
305
- branch: string;
306
- issueNumber: number;
307
- path: string;
308
- prNumber: number;
309
- projectRoot?: string;
310
- }
311
- type IssueWorktreeDeliveryTransition = {
312
- branch: string;
313
- issueNumber: number;
314
- path: string;
315
- prNumber: number;
316
- projectRoot?: string;
317
- status: 'pr-published';
318
- } | {
319
- branch: string;
320
- issueNumber: number;
321
- path: string;
322
- projectRoot?: string;
323
- status: 'merged';
324
- };
325
- export declare function addWorktreeEntry(entry: WorktreeEntry, projectRoot?: string): Promise<void>;
326
- /** Resolve the sole canonical issue row for a provider-mutating lifecycle transition. */
327
- export declare function getIssueWorktreeStrict(issueNumber: number, projectRoot?: string): WorktreeEntry;
328
- /** Native metadata never adopts source; retain every transition and canonical registry fence. */
329
- export declare function assertNativeIssueTrackingAdmission(issueNumber: number, root: string): void;
330
- export declare function getStaleWorktrees(daysOld: number, projectRoot?: string): WorktreeEntry[];
331
- export declare function getWorktreeByIssue(issueNumber: number, projectRoot?: string): null | WorktreeEntry;
332
- export declare function getWorktreeByPR(prNumber: number, projectRoot?: string): null | WorktreeEntry;
333
- export declare function listWorktrees(projectRoot?: string): WorktreeEntry[];
334
- /**
335
- * Reads the registry for a terminal safety decision. Unlike the operational
336
- * listing helper, this fails closed if an existing registry cannot be read.
337
- */
338
- export declare function listWorktreesStrict(projectRoot?: string): WorktreeEntry[];
339
- export declare function markStaleEntries(thresholdMs: number, projectRoot?: string): Promise<number>;
340
- /** Atomically reconcile one verified terminal PR without changing its original producer identity. */
341
- export declare function reconcileCompletedIssueWorktreeDelivery(options: CompletedIssueWorktreeReconciliation): Promise<'already-reconciled' | 'reconciled'>;
342
- /** Remove one exact active standalone row without weakening registry parsing or identity checks. */
343
- export declare function removeActiveStandaloneWorktreeEntry(input: {
344
- branch: string;
345
- path: string;
346
- projectRoot: string;
347
- }): Promise<void>;
348
- export declare function removeWorktreeEntry(path: string, projectRoot?: string): Promise<boolean>;
349
- export declare function updateIssueWorktreeDelivery(options: IssueWorktreeDeliveryTransition): Promise<void>;
350
- /** Current, prospective custody is separate from legacy producer/policy transitions. */
351
- export declare const InvestigationPreparationSchema: z.ZodObject<{
352
- schemaVersion: z.ZodLiteral<"ai-delivery.investigation-preparation@1">;
353
- preparationId: z.ZodString;
354
- repository: z.ZodString;
355
- repoRoot: z.ZodString;
356
- row: z.ZodPipe<z.ZodObject<{
357
- branch: z.ZodString;
358
- createdAt: z.ZodString;
359
- identity: z.ZodString;
360
- issueNumber: z.ZodNumber;
361
- path: z.ZodString;
362
- prNumber: z.ZodOptional<z.ZodNumber>;
363
- status: z.ZodEnum<{
364
- error: "error";
365
- active: "active";
366
- stale: "stale";
367
- merged: "merged";
368
- "pr-published": "pr-published";
369
- }>;
370
- type: z.ZodLiteral<"issue">;
371
- updatedAt: z.ZodString;
372
- }, z.core.$strict>, z.ZodTransform<{
373
- prNumber?: number;
374
- branch: string;
375
- createdAt: string;
376
- identity: string;
377
- issueNumber: number;
378
- path: string;
379
- status: "error" | "active" | "stale" | "merged" | "pr-published";
380
- type: "issue";
381
- updatedAt: string;
382
- }, {
383
- branch: string;
384
- createdAt: string;
385
- identity: string;
386
- issueNumber: number;
387
- path: string;
388
- status: "error" | "active" | "stale" | "merged" | "pr-published";
389
- type: "issue";
390
- updatedAt: string;
391
- prNumber?: number | undefined;
392
- }>>;
393
- head: z.ZodObject<{
394
- sha: z.ZodString;
395
- tree: z.ZodString;
396
- }, z.core.$strict>;
397
- physical: z.ZodObject<{
398
- device: z.ZodNumber;
399
- inode: z.ZodNumber;
400
- gitDirectory: z.ZodString;
401
- gitDevice: z.ZodNumber;
402
- gitInode: z.ZodNumber;
403
- }, z.core.$strict>;
404
- operator: z.ZodObject<{
405
- actorLogin: z.ZodString;
406
- credentialIdentity: z.ZodString;
407
- }, z.core.$strict>;
408
- reviewerActor: z.ZodString;
409
- }, z.core.$strict>;
410
- export type InvestigationPreparation = z.infer<typeof InvestigationPreparationSchema>;
411
- export declare function readInvestigationPreparation(root: string, issueNumber: number): InvestigationPreparation | undefined;
412
- export declare function readInvestigationAcknowledgement(root: string, issueNumber: number): {
413
- commentId: number;
414
- url: string;
415
- body: string;
416
- };
417
- /** Explicit prospective registration; never adopts a legacy row or replaces its baseline. */
418
- export declare function registerInvestigationCustody(raw: InvestigationPreparation, acknowledge: () => Promise<unknown>): Promise<void>;
419
- /** The same canonical lock owns evidence preservation, non-force removal, and row commit. */
420
- export declare function completeInvestigationCustody(input: {
421
- preparation: InvestigationPreparation;
422
- result: Buffer;
423
- authorityCommentId: number;
424
- acceptanceCommentId: number;
425
- dryRun: boolean;
426
- authorize: () => Promise<unknown>;
427
- assertSource: (allowAbsent: boolean) => void;
428
- removeSource: () => void;
429
- }): Promise<{
430
- completed: boolean;
431
- replayed: boolean;
432
- receiptPath?: string;
433
- }>;
434
- export {};