@webpresso/agent-kit 3.1.28 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @webpresso/agent-kit might be problematic. Click here for more details.

Files changed (329) hide show
  1. package/README.md +53 -15
  2. package/bin/_run.js +179 -19
  3. package/catalog/AGENTS.md.tpl +6 -6
  4. package/catalog/agent/agents/implementer.md +45 -0
  5. package/catalog/agent/rules/ci-cost-local-first.md +139 -0
  6. package/catalog/agent/rules/ci-test-perf.md +5 -1
  7. package/catalog/agent/rules/cmd-execution.md +9 -0
  8. package/catalog/agent/rules/parallel-orchestration-quota.md +100 -0
  9. package/catalog/agent/rules/pre-implementation.md +30 -2
  10. package/catalog/agent/rules/supported-agent-clis.md +9 -0
  11. package/catalog/agent/rules/test-scan-perf.md +80 -0
  12. package/catalog/agent/rules/typescript-version.md +50 -0
  13. package/catalog/agent/rules/workflow-skills-routing.md +4 -2
  14. package/catalog/agent/skills/codex/SKILL.md +25 -1
  15. package/catalog/agent/skills/fix/SKILL.md +3 -0
  16. package/catalog/agent/skills/verify/SKILL.md +22 -2
  17. package/catalog/docs/templates/blueprint.md +1 -1
  18. package/dist/esm/audit/agents.js +1 -0
  19. package/dist/esm/audit/blueprint-lifecycle-sql.d.ts +12 -0
  20. package/dist/esm/audit/blueprint-lifecycle-sql.js +23 -2
  21. package/dist/esm/audit/blueprint-pr-coverage.js +72 -7
  22. package/dist/esm/audit/ci-guardrails-wiring.d.ts +22 -0
  23. package/dist/esm/audit/ci-guardrails-wiring.js +90 -0
  24. package/dist/esm/audit/ci-test-perf.js +30 -0
  25. package/dist/esm/audit/command-surface.js +4 -2
  26. package/dist/esm/audit/host-substitution-risk.d.ts +2 -0
  27. package/dist/esm/audit/host-substitution-risk.js +256 -0
  28. package/dist/esm/audit/registry.d.ts +4 -4
  29. package/dist/esm/audit/registry.js +11 -1
  30. package/dist/esm/audit/roadmap-links.js +6 -0
  31. package/dist/esm/audit/test-scan-perf.d.ts +18 -0
  32. package/dist/esm/audit/test-scan-perf.js +275 -0
  33. package/dist/esm/audit/toolchain-isolation.js +1 -2
  34. package/dist/esm/audit/typescript-version.d.ts +2 -0
  35. package/dist/esm/audit/typescript-version.js +123 -0
  36. package/dist/esm/blueprint/core/parser.js +43 -1
  37. package/dist/esm/blueprint/core/validation/criteria.d.ts +14 -0
  38. package/dist/esm/blueprint/core/validation/criteria.js +41 -2
  39. package/dist/esm/blueprint/core/validation/state.js +25 -14
  40. package/dist/esm/blueprint/db/migrations/run.js +4 -2
  41. package/dist/esm/blueprint/lifecycle/audit.d.ts +20 -0
  42. package/dist/esm/blueprint/lifecycle/audit.js +65 -10
  43. package/dist/esm/blueprint/lifecycle/canonicalize.d.ts +6 -0
  44. package/dist/esm/blueprint/lifecycle/canonicalize.js +135 -0
  45. package/dist/esm/blueprint/lifecycle/engine.d.ts +9 -0
  46. package/dist/esm/blueprint/lifecycle/engine.js +53 -6
  47. package/dist/esm/blueprint/lifecycle/local.d.ts +2 -1
  48. package/dist/esm/blueprint/lifecycle/local.js +19 -3
  49. package/dist/esm/blueprint/lifecycle/review-provenance.d.ts +6 -0
  50. package/dist/esm/blueprint/lifecycle/review-provenance.js +118 -12
  51. package/dist/esm/blueprint/markdown/helpers.js +6 -2
  52. package/dist/esm/blueprint/service/BlueprintCreationService.d.ts +1 -0
  53. package/dist/esm/blueprint/service/BlueprintCreationService.js +53 -4
  54. package/dist/esm/blueprint/service/blueprint-tech-debt-links.js +16 -2
  55. package/dist/esm/blueprint/trust/command-runner.d.ts +26 -0
  56. package/dist/esm/blueprint/trust/command-runner.js +148 -0
  57. package/dist/esm/blueprint/trust/gates.d.ts +7 -0
  58. package/dist/esm/blueprint/trust/gates.js +20 -0
  59. package/dist/esm/blueprint/trust/promotion.d.ts +8 -0
  60. package/dist/esm/blueprint/trust/promotion.js +62 -112
  61. package/dist/esm/blueprint/trust/scaffold.d.ts +19 -0
  62. package/dist/esm/blueprint/trust/scaffold.js +64 -0
  63. package/dist/esm/blueprint/trust/validator.d.ts +1 -0
  64. package/dist/esm/blueprint/trust/validator.js +7 -1
  65. package/dist/esm/blueprint/utils/archive.js +27 -5
  66. package/dist/esm/blueprint/utils/document-paths.d.ts +18 -0
  67. package/dist/esm/blueprint/utils/document-paths.js +45 -12
  68. package/dist/esm/build/cli-mcp-parity.js +10 -0
  69. package/dist/esm/ci/act-replay.js +110 -7
  70. package/dist/esm/ci/act-runner.d.ts +4 -0
  71. package/dist/esm/ci/act-runner.js +85 -26
  72. package/dist/esm/ci/act-worktree-git.d.ts +11 -0
  73. package/dist/esm/ci/act-worktree-git.js +219 -0
  74. package/dist/esm/cli/bundle/commands/blueprint.d.ts +1 -0
  75. package/dist/esm/cli/bundle/commands/blueprint.js +1 -0
  76. package/dist/esm/cli/cli.d.ts +1 -1
  77. package/dist/esm/cli/cli.js +34 -0
  78. package/dist/esm/cli/commands/agent-launch.d.ts +6 -1
  79. package/dist/esm/cli/commands/agent-launch.js +82 -4
  80. package/dist/esm/cli/commands/audit-core.d.ts +1 -1
  81. package/dist/esm/cli/commands/audit-core.js +8 -1
  82. package/dist/esm/cli/commands/audit.js +20 -5
  83. package/dist/esm/cli/commands/blueprint/execution.js +18 -6
  84. package/dist/esm/cli/commands/blueprint/mutations.js +83 -47
  85. package/dist/esm/cli/commands/blueprint/router-dispatch.d.ts +2 -1
  86. package/dist/esm/cli/commands/blueprint/router-dispatch.js +20 -1
  87. package/dist/esm/cli/commands/blueprint/router-output.d.ts +21 -0
  88. package/dist/esm/cli/commands/blueprint/router-output.js +48 -17
  89. package/dist/esm/cli/commands/blueprint/router.d.ts +7 -0
  90. package/dist/esm/cli/commands/blueprint/router.js +40 -3
  91. package/dist/esm/cli/commands/ci-preflight.d.ts +13 -2
  92. package/dist/esm/cli/commands/ci-preflight.js +6 -3
  93. package/dist/esm/cli/commands/ci.d.ts +8 -1
  94. package/dist/esm/cli/commands/ci.js +80 -21
  95. package/dist/esm/cli/commands/compile.js +5 -31
  96. package/dist/esm/cli/commands/dash/delivery-status.d.ts +1 -0
  97. package/dist/esm/cli/commands/dash/delivery-status.js +11 -4
  98. package/dist/esm/cli/commands/dash/keymap.js +1 -0
  99. package/dist/esm/cli/commands/dash/launch-preferences.d.ts +15 -0
  100. package/dist/esm/cli/commands/dash/launch-preferences.js +46 -17
  101. package/dist/esm/cli/commands/dash/plan-once-label.d.ts +7 -0
  102. package/dist/esm/cli/commands/dash/plan-once-label.js +5 -0
  103. package/dist/esm/cli/commands/dash/plan-once-membership.d.ts +67 -0
  104. package/dist/esm/cli/commands/dash/plan-once-membership.js +151 -0
  105. package/dist/esm/cli/commands/dash/plan-once-merge.d.ts +143 -0
  106. package/dist/esm/cli/commands/dash/plan-once-merge.js +238 -0
  107. package/dist/esm/cli/commands/dash/plan-once.d.ts +22 -2
  108. package/dist/esm/cli/commands/dash/plan-once.js +41 -4
  109. package/dist/esm/cli/commands/dash/tui/attention-hud.d.ts +9 -0
  110. package/dist/esm/cli/commands/dash/tui/attention-hud.js +9 -0
  111. package/dist/esm/cli/commands/dash/tui/chat-bridge.d.ts +41 -0
  112. package/dist/esm/cli/commands/dash/tui/chat-bridge.js +73 -0
  113. package/dist/esm/cli/commands/dash/tui/chat-mode.d.ts +47 -0
  114. package/dist/esm/cli/commands/dash/tui/chat-mode.js +98 -0
  115. package/dist/esm/cli/commands/dash/tui/frame.d.ts +3 -0
  116. package/dist/esm/cli/commands/dash/tui/frame.js +3 -1
  117. package/dist/esm/cli/commands/dash/tui/palette.d.ts +1 -1
  118. package/dist/esm/cli/commands/dash/tui/palette.js +14 -0
  119. package/dist/esm/cli/commands/dash/tui/runtime.js +239 -4
  120. package/dist/esm/cli/commands/dash/tui/state.d.ts +41 -0
  121. package/dist/esm/cli/commands/dash/tui/state.js +257 -4
  122. package/dist/esm/cli/commands/doctor.js +5 -0
  123. package/dist/esm/cli/commands/format.js +0 -2
  124. package/dist/esm/cli/commands/hook.d.ts +5 -0
  125. package/dist/esm/cli/commands/hook.js +15 -9
  126. package/dist/esm/cli/commands/init/config.d.ts +0 -1
  127. package/dist/esm/cli/commands/init/config.js +3 -6
  128. package/dist/esm/cli/commands/init/convergence-apply.d.ts +24 -0
  129. package/dist/esm/cli/commands/init/convergence-apply.js +221 -0
  130. package/dist/esm/cli/commands/init/convergence-state.d.ts +13 -0
  131. package/dist/esm/cli/commands/init/convergence-state.js +54 -0
  132. package/dist/esm/cli/commands/init/convergence.d.ts +23 -0
  133. package/dist/esm/cli/commands/init/convergence.js +57 -0
  134. package/dist/esm/cli/commands/init/git-convergence.d.ts +19 -0
  135. package/dist/esm/cli/commands/init/git-convergence.js +168 -0
  136. package/dist/esm/cli/commands/init/gitignore-patcher.js +2 -0
  137. package/dist/esm/cli/commands/init/grok-privacy-smoke.d.ts +52 -0
  138. package/dist/esm/cli/commands/init/grok-privacy-smoke.js +91 -0
  139. package/dist/esm/cli/commands/init/host-native-proof.d.ts +18 -0
  140. package/dist/esm/cli/commands/init/host-native-proof.js +88 -0
  141. package/dist/esm/cli/commands/init/host-visibility.d.ts +2 -2
  142. package/dist/esm/cli/commands/init/host-visibility.js +94 -5
  143. package/dist/esm/cli/commands/init/index.d.ts +1 -0
  144. package/dist/esm/cli/commands/init/index.js +326 -173
  145. package/dist/esm/cli/commands/init/mcp-spec.d.ts +57 -0
  146. package/dist/esm/cli/commands/init/mcp-spec.js +273 -0
  147. package/dist/esm/cli/commands/init/merge.d.ts +1 -0
  148. package/dist/esm/cli/commands/init/merge.js +30 -1
  149. package/dist/esm/cli/commands/init/plugin-cache-prune.d.ts +0 -3
  150. package/dist/esm/cli/commands/init/plugin-cache-prune.js +0 -1
  151. package/dist/esm/cli/commands/init/scaffold-agents-md.d.ts +1 -1
  152. package/dist/esm/cli/commands/init/scaffold-agents-md.js +9 -3
  153. package/dist/esm/cli/commands/init/scaffold-base-kit.d.ts +11 -0
  154. package/dist/esm/cli/commands/init/scaffold-base-kit.js +56 -1
  155. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/claude.d.ts +5 -6
  156. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/claude.js +6 -13
  157. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/grok.d.ts +14 -8
  158. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/grok.js +41 -24
  159. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/index.d.ts +2 -0
  160. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/index.js +51 -23
  161. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/ir.d.ts +0 -2
  162. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/ir.js +0 -2
  163. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/merge.d.ts +6 -3
  164. package/dist/esm/cli/commands/init/scaffolders/agent-hooks/merge.js +39 -26
  165. package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.d.ts +12 -31
  166. package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.js +297 -173
  167. package/dist/esm/cli/commands/init/scaffolders/file-transaction.d.ts +7 -0
  168. package/dist/esm/cli/commands/init/scaffolders/file-transaction.js +58 -0
  169. package/dist/esm/cli/commands/init/scaffolders/grok-mcp/index.d.ts +38 -0
  170. package/dist/esm/cli/commands/init/scaffolders/grok-mcp/index.js +73 -0
  171. package/dist/esm/cli/commands/init/scaffolders/opencode-plugin/index.d.ts +21 -0
  172. package/dist/esm/cli/commands/init/scaffolders/opencode-plugin/index.js +559 -63
  173. package/dist/esm/cli/commands/init/untracked-collision.d.ts +14 -0
  174. package/dist/esm/cli/commands/init/untracked-collision.js +42 -0
  175. package/dist/esm/cli/commands/logs.d.ts +15 -0
  176. package/dist/esm/cli/commands/logs.js +192 -3
  177. package/dist/esm/cli/commands/opencode-rotate.d.ts +49 -0
  178. package/dist/esm/cli/commands/opencode-rotate.js +135 -0
  179. package/dist/esm/cli/commands/public-readiness.d.ts +11 -0
  180. package/dist/esm/cli/commands/public-readiness.js +42 -0
  181. package/dist/esm/cli/commands/quality-log-store.d.ts +1 -0
  182. package/dist/esm/cli/commands/quality-log-store.js +187 -51
  183. package/dist/esm/cli/commands/review.d.ts +35 -3
  184. package/dist/esm/cli/commands/review.js +734 -217
  185. package/dist/esm/cli/commands/run-wait.d.ts +2 -0
  186. package/dist/esm/cli/commands/run-wait.js +122 -0
  187. package/dist/esm/cli/commands/secrets.d.ts +1 -0
  188. package/dist/esm/cli/commands/secrets.js +4 -1
  189. package/dist/esm/cli/commands/setup-help.js +1 -1
  190. package/dist/esm/cli/commands/setup-repair-help.js +1 -1
  191. package/dist/esm/cli/commands/worktree/router-dispatch.js +13 -8
  192. package/dist/esm/cli/direct-provider-launch.js +31 -3
  193. package/dist/esm/cli/optional-tool-freshness.d.ts +27 -0
  194. package/dist/esm/cli/optional-tool-freshness.js +219 -9
  195. package/dist/esm/daemon/domains/git-actions.d.ts +29 -0
  196. package/dist/esm/daemon/domains/git-actions.js +136 -0
  197. package/dist/esm/daemon/domains/run-registry-interop.d.ts +16 -0
  198. package/dist/esm/daemon/domains/run-registry-interop.js +45 -0
  199. package/dist/esm/daemon/domains/sessions-search.d.ts +11 -0
  200. package/dist/esm/daemon/domains/sessions-search.js +29 -0
  201. package/dist/esm/daemon/handlers/blueprints-handlers.d.ts +5 -0
  202. package/dist/esm/daemon/handlers/blueprints-handlers.js +36 -0
  203. package/dist/esm/daemon/handlers/deploy-handlers.d.ts +6 -0
  204. package/dist/esm/daemon/handlers/deploy-handlers.js +5 -0
  205. package/dist/esm/daemon/handlers/fleet-handlers.d.ts +15 -0
  206. package/dist/esm/daemon/handlers/fleet-handlers.js +91 -0
  207. package/dist/esm/daemon/handlers/git-handlers.d.ts +6 -0
  208. package/dist/esm/daemon/handlers/git-handlers.js +27 -0
  209. package/dist/esm/daemon/handlers/product.d.ts +7 -0
  210. package/dist/esm/daemon/handlers/product.js +10 -119
  211. package/dist/esm/daemon/handlers/sessions-handlers.d.ts +12 -0
  212. package/dist/esm/daemon/handlers/sessions-handlers.js +31 -0
  213. package/dist/esm/daemon/handlers/shared.d.ts +5 -0
  214. package/dist/esm/daemon/handlers/shared.js +16 -0
  215. package/dist/esm/daemon/methods.d.ts +8 -1
  216. package/dist/esm/daemon/methods.js +7 -0
  217. package/dist/esm/daemon/protocol/contract.d.ts +43 -0
  218. package/dist/esm/daemon/protocol/contract.js +26 -0
  219. package/dist/esm/daemon/protocol/index.d.ts +1 -1
  220. package/dist/esm/daemon/protocol/index.js +1 -1
  221. package/dist/esm/hooks/__conformance__/matrix.d.ts +6 -0
  222. package/dist/esm/hooks/__conformance__/matrix.js +137 -0
  223. package/dist/esm/hooks/conformance/batch.js +5 -0
  224. package/dist/esm/hooks/doctor.d.ts +15 -0
  225. package/dist/esm/hooks/doctor.js +79 -8
  226. package/dist/esm/hooks/permission-request/index.js +9 -3
  227. package/dist/esm/hooks/permission-request/policy.d.ts +9 -0
  228. package/dist/esm/hooks/permission-request/policy.js +13 -0
  229. package/dist/esm/hooks/pretool-guard/dev-routing.d.ts +9 -0
  230. package/dist/esm/hooks/pretool-guard/dev-routing.js +41 -5
  231. package/dist/esm/hooks/pretool-guard/logger.d.ts +7 -0
  232. package/dist/esm/hooks/pretool-guard/logger.js +16 -0
  233. package/dist/esm/hooks/pretool-guard/runner.d.ts +6 -0
  234. package/dist/esm/hooks/pretool-guard/runner.js +68 -16
  235. package/dist/esm/hooks/pretool-guard/validators/blueprint.js +30 -10
  236. package/dist/esm/hooks/pretool-guard/validators/forbidden-commands.js +58 -4
  237. package/dist/esm/hooks/pretool-guard/validators/index.d.ts +7 -0
  238. package/dist/esm/hooks/pretool-guard/validators/index.js +21 -0
  239. package/dist/esm/hooks/pretool-guard/validators/mcp-redirect.d.ts +0 -1
  240. package/dist/esm/hooks/pretool-guard/validators/mcp-redirect.js +8 -5
  241. package/dist/esm/hooks/pretool-guard/validators/path-contract.d.ts +19 -0
  242. package/dist/esm/hooks/pretool-guard/validators/path-contract.js +25 -8
  243. package/dist/esm/hooks/pretool-guard/validators/worktree-discipline.d.ts +9 -7
  244. package/dist/esm/hooks/pretool-guard/validators/worktree-discipline.js +126 -14
  245. package/dist/esm/hooks/shared/guard-outcome.d.ts +149 -0
  246. package/dist/esm/hooks/shared/guard-outcome.js +215 -0
  247. package/dist/esm/hooks/shared/hook-bootstrap.d.ts +26 -0
  248. package/dist/esm/hooks/shared/hook-bootstrap.js +64 -1
  249. package/dist/esm/hooks/shared/types.d.ts +8 -5
  250. package/dist/esm/hooks/shared/types.js +23 -8
  251. package/dist/esm/hooks/stop/qa-changed-files.d.ts +11 -0
  252. package/dist/esm/hooks/stop/qa-changed-files.js +74 -0
  253. package/dist/esm/mcp/blueprint/_shared/lifecycle.js +14 -1
  254. package/dist/esm/mcp/blueprint/handlers/document-mutations.js +78 -4
  255. package/dist/esm/mcp/blueprint/handlers/review-log.js +8 -1
  256. package/dist/esm/mcp/blueprint/handlers/task-advance.js +113 -54
  257. package/dist/esm/mcp/blueprint/handlers/task-verify.js +39 -19
  258. package/dist/esm/mcp/blueprint/registration.js +3 -2
  259. package/dist/esm/mcp/server.d.ts +1 -0
  260. package/dist/esm/mcp/server.js +27 -0
  261. package/dist/esm/mcp/tools/_names.d.ts +1 -1
  262. package/dist/esm/mcp/tools/_names.js +5 -0
  263. package/dist/esm/mcp/tools/_registry.js +10 -0
  264. package/dist/esm/mcp/tools/_shared/audit-kinds.d.ts +1 -1
  265. package/dist/esm/mcp/tools/_shared/result.js +44 -1
  266. package/dist/esm/mcp/tools/audit.d.ts +5 -1
  267. package/dist/esm/mcp/tools/audit.js +40 -0
  268. package/dist/esm/mcp/tools/audits.d.ts +4 -0
  269. package/dist/esm/mcp/tools/ci-act.js +9 -11
  270. package/dist/esm/mcp/tools/ci-preflight.d.ts +50 -0
  271. package/dist/esm/mcp/tools/ci-preflight.js +183 -0
  272. package/dist/esm/mcp/tools/pr-upsert.js +39 -1
  273. package/dist/esm/mcp/tools/review-run.d.ts +28 -0
  274. package/dist/esm/mcp/tools/review-run.js +216 -0
  275. package/dist/esm/mcp/tools/run-wait.d.ts +86 -0
  276. package/dist/esm/mcp/tools/run-wait.js +593 -0
  277. package/dist/esm/mcp/tools/session-id.d.ts +3 -0
  278. package/dist/esm/mcp/tools/session-id.js +45 -0
  279. package/dist/esm/mcp/tools/session-info.d.ts +3 -0
  280. package/dist/esm/mcp/tools/session-info.js +49 -0
  281. package/dist/esm/output-transforms/audit.d.ts +23 -0
  282. package/dist/esm/output-transforms/audit.js +47 -0
  283. package/dist/esm/output-transforms/index.js +2 -0
  284. package/dist/esm/paths/state-root.js +3 -0
  285. package/dist/esm/review/authority.js +30 -7
  286. package/dist/esm/review/availability.d.ts +22 -0
  287. package/dist/esm/review/availability.js +123 -23
  288. package/dist/esm/review/delivery-verifier.d.ts +27 -0
  289. package/dist/esm/review/delivery-verifier.js +115 -0
  290. package/dist/esm/review/events.d.ts +3 -2
  291. package/dist/esm/review/events.js +23 -3
  292. package/dist/esm/review/execution/adapters.js +26 -9
  293. package/dist/esm/review/execution/output-policy.d.ts +2 -0
  294. package/dist/esm/review/execution/output-policy.js +12 -0
  295. package/dist/esm/review/execution/review-checkout.js +87 -6
  296. package/dist/esm/review/execution/supervisor.js +5 -0
  297. package/dist/esm/review/execution/types.d.ts +8 -0
  298. package/dist/esm/review/opencode-account.d.ts +24 -0
  299. package/dist/esm/review/opencode-account.js +68 -0
  300. package/dist/esm/review/opencode-auth.d.ts +33 -0
  301. package/dist/esm/review/opencode-auth.js +79 -0
  302. package/dist/esm/review/subject.d.ts +27 -0
  303. package/dist/esm/review/subject.js +179 -32
  304. package/dist/esm/runtime/executor.d.ts +1 -0
  305. package/dist/esm/runtime/executor.js +2 -1
  306. package/dist/esm/runtime/opencode-account-materializer.d.ts +34 -0
  307. package/dist/esm/runtime/opencode-account-materializer.js +33 -0
  308. package/dist/esm/secret-gate/runner.d.ts +1 -0
  309. package/dist/esm/secret-gate/runner.js +4 -1
  310. package/dist/esm/status/snapshot.js +30 -19
  311. package/dist/esm/test/duration-sequencer.d.ts +20 -0
  312. package/dist/esm/test/duration-sequencer.js +54 -0
  313. package/dist/esm/test/shard-durations.json +922 -0
  314. package/dist/esm/test/worker-budget.d.ts +6 -0
  315. package/dist/esm/test/worker-budget.js +59 -1
  316. package/dist/esm/test-helpers/global-setup.d.ts +1 -1
  317. package/dist/esm/test-helpers/global-setup.js +68 -24
  318. package/dist/esm/ultragoal/service.d.ts +7 -0
  319. package/dist/esm/ultragoal/service.js +42 -2
  320. package/dist/esm/utils/write-json-file.js +3 -1
  321. package/dist/esm/worktrees/codex-project-trust.d.ts +15 -0
  322. package/dist/esm/worktrees/codex-project-trust.js +56 -0
  323. package/dist/esm/worktrees/current.d.ts +1 -0
  324. package/dist/esm/worktrees/current.js +1 -0
  325. package/dist/esm/worktrees/project-agent-surfaces.d.ts +1 -0
  326. package/dist/esm/worktrees/project-agent-surfaces.js +2 -1
  327. package/dist/esm/worktrees/registry.d.ts +8 -0
  328. package/dist/esm/worktrees/registry.js +18 -3
  329. package/package.json +18 -15
@@ -0,0 +1,2 @@
1
+ export declare const RUN_WAIT_HELP = "wp run wait \u2014 read-only GitHub workflow-run waiter (push/dispatch runs, e.g. production deploys on main)\n\nUsage:\n wp run wait --run-id <id> [options]\n wp run wait --sha <head-sha> [--workflow <file-or-name>] [options]\n\nSelector (exactly one required):\n --run-id <id> Watch a specific workflow run by database id\n --sha <sha> Watch the newest run for a head commit SHA\n --workflow <file|name> Filter --sha selection to one workflow\n\nOptions:\n --until <target> run-terminal (default) | all-jobs-terminal\n --poll-interval-ms <n> Poll interval (default 15000)\n --timeout-ms <n> Overall watch deadline (max 300000, default 120000)\n --max-output-bytes <n> Per-command output budget\n --cwd <path> Project root or descendant\n --json Emit exactly one JSON document (default output)\n -h, --help Show this help\n\nRead-only: issues only `gh` GET calls; never mutates run state.";
2
+ export declare function runRunWaitCommand(args: readonly string[]): Promise<number>;
@@ -0,0 +1,122 @@
1
+ import { RUN_WAIT_UNTIL_VALUES, runRunWait, } from "#mcp/tools/run-wait.js";
2
+ // `wp run wait` is intercepted in cli.ts before the package-manager `run`
3
+ // facade (which maps `wp run <script>` to `vp run <script>`). This module owns
4
+ // only the `wait` subcommand and keeps arg parsing dependency-free so the
5
+ // interception path stays cheap.
6
+ export const RUN_WAIT_HELP = `wp run wait — read-only GitHub workflow-run waiter (push/dispatch runs, e.g. production deploys on main)
7
+
8
+ Usage:
9
+ wp run wait --run-id <id> [options]
10
+ wp run wait --sha <head-sha> [--workflow <file-or-name>] [options]
11
+
12
+ Selector (exactly one required):
13
+ --run-id <id> Watch a specific workflow run by database id
14
+ --sha <sha> Watch the newest run for a head commit SHA
15
+ --workflow <file|name> Filter --sha selection to one workflow
16
+
17
+ Options:
18
+ --until <target> run-terminal (default) | all-jobs-terminal
19
+ --poll-interval-ms <n> Poll interval (default 15000)
20
+ --timeout-ms <n> Overall watch deadline (max 300000, default 120000)
21
+ --max-output-bytes <n> Per-command output budget
22
+ --cwd <path> Project root or descendant
23
+ --json Emit exactly one JSON document (default output)
24
+ -h, --help Show this help
25
+
26
+ Read-only: issues only \`gh\` GET calls; never mutates run state.`;
27
+ function parsePositiveInteger(value, name) {
28
+ if (value === undefined)
29
+ return undefined;
30
+ const parsed = Number.parseInt(value, 10);
31
+ if (!Number.isFinite(parsed) || parsed <= 0) {
32
+ throw new Error(`${name} must be a positive integer`);
33
+ }
34
+ return parsed;
35
+ }
36
+ function normalizeUntil(value) {
37
+ if (value === undefined)
38
+ return undefined;
39
+ const normalized = value.replaceAll("-", "_");
40
+ if (!RUN_WAIT_UNTIL_VALUES.includes(normalized)) {
41
+ throw new Error(`Unknown run wait target: ${value}`);
42
+ }
43
+ return normalized;
44
+ }
45
+ const VALUE_FLAGS = new Set([
46
+ "--run-id",
47
+ "--sha",
48
+ "--workflow",
49
+ "--until",
50
+ "--poll-interval-ms",
51
+ "--timeout-ms",
52
+ "--max-output-bytes",
53
+ "--cwd",
54
+ ]);
55
+ function parseFlags(args) {
56
+ const values = {};
57
+ let help = false;
58
+ for (let index = 0; index < args.length; index += 1) {
59
+ const arg = args[index];
60
+ if (arg === undefined)
61
+ continue;
62
+ if (arg === "--help" || arg === "-h") {
63
+ help = true;
64
+ continue;
65
+ }
66
+ if (arg === "--json")
67
+ continue; // JSON is the only output shape
68
+ const eq = arg.indexOf("=");
69
+ if (eq !== -1 && arg.startsWith("--")) {
70
+ const key = arg.slice(0, eq);
71
+ if (VALUE_FLAGS.has(key)) {
72
+ values[key] = arg.slice(eq + 1);
73
+ continue;
74
+ }
75
+ }
76
+ if (VALUE_FLAGS.has(arg)) {
77
+ const next = args[index + 1];
78
+ if (next === undefined)
79
+ throw new Error(`${arg} requires a value`);
80
+ values[arg] = next;
81
+ index += 1;
82
+ continue;
83
+ }
84
+ throw new Error(`Unknown run wait option: ${arg}`);
85
+ }
86
+ return { values, help };
87
+ }
88
+ export async function runRunWaitCommand(args) {
89
+ const { values, help } = parseFlags(args);
90
+ if (help) {
91
+ console.log(RUN_WAIT_HELP);
92
+ return 0;
93
+ }
94
+ const runId = values["--run-id"];
95
+ const input = {
96
+ sha: values["--sha"],
97
+ runId: runId === undefined ? undefined : runId,
98
+ workflow: values["--workflow"],
99
+ until: normalizeUntil(values["--until"]),
100
+ pollIntervalMs: parsePositiveInteger(values["--poll-interval-ms"], "--poll-interval-ms"),
101
+ timeoutMs: parsePositiveInteger(values["--timeout-ms"], "--timeout-ms"),
102
+ maxOutputBytes: parsePositiveInteger(values["--max-output-bytes"], "--max-output-bytes"),
103
+ cwd: values["--cwd"],
104
+ };
105
+ let payload;
106
+ try {
107
+ payload = await runRunWait(input);
108
+ }
109
+ catch (error) {
110
+ const issues = error.issues;
111
+ if (Array.isArray(issues)) {
112
+ const message = issues
113
+ .map((issue) => (typeof issue.message === "string" ? issue.message : String(issue.message)))
114
+ .join("; ");
115
+ console.error(`wp run wait: ${message}`);
116
+ return 1;
117
+ }
118
+ throw error;
119
+ }
120
+ console.log(JSON.stringify(payload, null, 2));
121
+ return payload.status === "success" ? 0 : 1;
122
+ }
@@ -2,6 +2,7 @@ import type { CAC } from "cac";
2
2
  import { spawnRuntimeCommandSync } from "#runtime/executor.js";
3
3
  export interface SecretsCommandOptions {
4
4
  readonly cwd?: string;
5
+ readonly commandCwd?: string;
5
6
  readonly profile?: string;
6
7
  readonly sink?: string;
7
8
  readonly json?: boolean;
@@ -14,6 +14,7 @@ export function registerSecretsCommand(cli) {
14
14
  .command("secrets <action> [target]", "Secret orchestration commands (doctor, bootstrap github)")
15
15
  .option("--profile <name>", "Secret profile name", { default: "preview" })
16
16
  .option("--sink <id>", "Secret sink id")
17
+ .option("--command-cwd <dir>", "Run the scoped command from this directory")
17
18
  .option("--json", "Emit machine-readable JSON")
18
19
  .option("--lane <lane>", "Lane to bootstrap (repeatable)", { default: [] })
19
20
  .option("--apply", "Apply GitHub bootstrap changes instead of dry-run planning")
@@ -22,6 +23,7 @@ export function registerSecretsCommand(cli) {
22
23
  cwd: process.cwd(),
23
24
  profile: flags.profile,
24
25
  sink: flags.sink,
26
+ commandCwd: flags.commandCwd,
25
27
  json: Boolean(flags.json),
26
28
  lanes: toArray(flags.lane),
27
29
  apply: Boolean(flags.apply),
@@ -109,7 +111,8 @@ export function runSecretsRun(options = {}, deps = {}) {
109
111
  const result = (deps.runSecretScopedCommand ?? spawnRuntimeCommandSync)({
110
112
  command,
111
113
  args,
112
- cwd: options.cwd,
114
+ cwd: options.commandCwd ?? options.cwd,
115
+ envCwd: options.cwd,
113
116
  profile: plan.runtimeProfile,
114
117
  secretProfile: plan.profile,
115
118
  environment: plan.environment,
@@ -8,7 +8,7 @@ export function getSetupHelpText(version) {
8
8
  "Options:",
9
9
  " --with <skills> Comma-separated opt-in skills and/or presets to install (non-interactive). Presets: example-skill, lore-commits, playwright-mcp, rtk, vision plus the special token `all`. Legacy compatibility presets are intentionally omitted; use wp install oh-my opencode when you want WP-owned refreshes. Opt-in skills are listed by 'wp skill list'. ",
10
10
  " --without <skills> Comma-separated opt-in skills and/or presets to opt out of for this run. ",
11
- " --host <hosts> Comma-separated host targets: codex, claude, opencode, all, none ",
11
+ " --host <hosts> Comma-separated host targets: codex, claude, opencode, grok, all, none ",
12
12
  " --dry-run Show what would change without writing anything ",
13
13
  " --cwd <dir> Working tree to scaffold into (default: process.cwd()) ",
14
14
  " -h, --help Display this message ",
@@ -5,7 +5,7 @@
5
5
  const PRIMARY_SETUP_OPTIONS = [
6
6
  " --with <skills> Comma-separated opt-in skills and/or presets to install (non-interactive). Presets: example-skill, lore-commits, playwright-mcp, rtk, vision plus the special token `all`. Legacy compatibility presets are intentionally omitted; use wp install oh-my opencode when you want WP-owned refreshes. Opt-in skills are listed by 'wp skill list'. ",
7
7
  " --without <skills> Comma-separated opt-in skills and/or presets to opt out of for this run. ",
8
- " --host <hosts> Comma-separated host targets: codex, claude, opencode, all, none ",
8
+ " --host <hosts> Comma-separated host targets: codex, claude, opencode, grok, all, none ",
9
9
  " --prune Widen stale agent-kit plugin-cache pruning from the default host set (claude, codex, opencode) to every supported host while retaining recent versions ",
10
10
  " --dry-run Show what would change without writing anything ",
11
11
  " --cwd <dir> Working tree to scaffold into (default: process.cwd()) ",
@@ -5,6 +5,7 @@ import { execFileSync, spawnSync } from "node:child_process";
5
5
  import { existsSync, mkdirSync } from "node:fs";
6
6
  import { basename, dirname, join, relative, resolve } from "node:path";
7
7
  import { findGitRoot } from "#cli/commands/init/detect-consumer.js";
8
+ import { removeCodexProjectTrust, removeCodexProjectTrusts, } from "#worktrees/codex-project-trust.js";
8
9
  import { shortId } from "#shared-utils/short-id.js";
9
10
  import { readConfig } from "#cli/commands/init/config";
10
11
  import { getProjectRoot } from "#cli/utils";
@@ -15,7 +16,7 @@ import { hydrateWorktreeDependencies, reconcileWorktreeDependencies, } from "#wo
15
16
  import { projectWorktreeAgentSurfaces } from "#worktrees/project-agent-surfaces.js";
16
17
  import { assertNotLocalMainBranch } from "#worktrees/main-ownership.js";
17
18
  import { buildWorktreeInventory, canonicalizeWorktreePath, classifyMembership, isManagedWorktreePath, resolveRepoIdentity, } from "#worktrees/identity.js";
18
- import { findRegistryCandidatesByPath, pruneStaleWorktreeRegistryEntries, readWorktreeRegistry, removeWorktreeRegistryEntries, repoScopedPathPredicate, upsertWorktreeRegistryEntry, } from "#worktrees/registry.js";
19
+ import { findRegistryCandidatesByPath, planStaleWorktreeRegistryPrune, readWorktreeRegistry, removeWorktreeRegistryEntries, repoScopedPathPredicate, upsertWorktreeRegistryEntry, } from "#worktrees/registry.js";
19
20
  function parseDepsOption(value) {
20
21
  if (value === undefined || value === null || value === "")
21
22
  return undefined;
@@ -443,7 +444,7 @@ function handleRefresh(opts) {
443
444
  }
444
445
  console.log(`Refreshed ${updated} managed worktree entr${updated === 1 ? "y" : "ies"} for ${repoRoot}.`);
445
446
  }
446
- function handlePrune(opts) {
447
+ async function handlePrune(opts) {
447
448
  if (!opts.all)
448
449
  throw new Error("Usage: wp worktree prune --all");
449
450
  // Repository-scoped, three-state prune: only THIS repo's entries that are
@@ -451,10 +452,12 @@ function handlePrune(opts) {
451
452
  // other-repo, and live-legacy entries are retained.
452
453
  const repoRoot = resolveWorktreeRepoRoot(opts.repo ?? opts.cwd ?? process.cwd());
453
454
  const inventory = buildWorktreeInventory(repoRoot);
454
- const result = pruneStaleWorktreeRegistryEntries({
455
+ const result = planStaleWorktreeRegistryPrune({
455
456
  inventory,
456
457
  scope: { authoritativeRepoKey: resolveRepoIdentity(repoRoot) },
457
458
  });
459
+ await removeCodexProjectTrusts(result.removed.map((entry) => entry.path));
460
+ result.commit();
458
461
  console.log(`Pruned ${result.removed.length} stale managed registry entr${result.removed.length === 1 ? "y" : "ies"}.`);
459
462
  for (const warning of result.warnings)
460
463
  console.log(`warning: ${warning}`);
@@ -527,7 +530,7 @@ function handleRebind(args, opts) {
527
530
  console.log(` worktree_owner_branch: ${binding.branch}`);
528
531
  console.log(` path: ${binding.path}`);
529
532
  }
530
- function handleRemove(nameOrPath, opts) {
533
+ async function handleRemove(nameOrPath, opts) {
531
534
  const cwd = opts.cwd ?? process.cwd();
532
535
  const callerRoot = resolveWorktreeRepoRoot(cwd);
533
536
  const entries = listEntries(callerRoot);
@@ -548,6 +551,7 @@ function handleRemove(nameOrPath, opts) {
548
551
  if (result.status !== 0) {
549
552
  throw new Error("git worktree remove failed");
550
553
  }
554
+ await removeCodexProjectTrust(resolved);
551
555
  removeWorktreeRegistryEntries(repoScopedPathPredicate(resolved, { authoritativeRepoKey: resolveRepoIdentity(repoRoot) }));
552
556
  }
553
557
  function isDirty(path) {
@@ -563,7 +567,7 @@ function currentBranch(repoRoot) {
563
567
  });
564
568
  return result.status === 0 ? String(result.stdout ?? "").trim() : "";
565
569
  }
566
- function handleMergeCleanup(nameOrPath, opts) {
570
+ async function handleMergeCleanup(nameOrPath, opts) {
567
571
  const cwd = opts.cwd ?? process.cwd();
568
572
  const callerRoot = resolveWorktreeRepoRoot(cwd);
569
573
  const entries = listEntries(callerRoot);
@@ -628,6 +632,7 @@ function handleMergeCleanup(nameOrPath, opts) {
628
632
  if (removeResult.status !== 0) {
629
633
  throw new Error("git worktree remove failed");
630
634
  }
635
+ await removeCodexProjectTrust(resolved);
631
636
  removeWorktreeRegistryEntries(repoScopedPathPredicate(resolved, { authoritativeRepoKey: resolveRepoIdentity(repoRoot) }));
632
637
  const fetchResult = spawnSync("git", [...plan.fetchArgs], { cwd: repoRoot, stdio: "inherit" });
633
638
  if (fetchResult.status !== 0) {
@@ -665,7 +670,7 @@ export async function executeWorktreeSubcommand(subcommand, args, opts) {
665
670
  handleRefresh(opts);
666
671
  return;
667
672
  case "prune":
668
- handlePrune(opts);
673
+ await handlePrune(opts);
669
674
  return;
670
675
  case "migrate":
671
676
  handleMigrate(opts);
@@ -682,7 +687,7 @@ export async function executeWorktreeSubcommand(subcommand, args, opts) {
682
687
  if (!nameOrPath) {
683
688
  throw new Error("Usage: wp worktree remove <branch-or-path> [--force]");
684
689
  }
685
- handleRemove(nameOrPath, opts);
690
+ await handleRemove(nameOrPath, opts);
686
691
  return;
687
692
  }
688
693
  case "merge-cleanup": {
@@ -690,7 +695,7 @@ export async function executeWorktreeSubcommand(subcommand, args, opts) {
690
695
  if (!nameOrPath) {
691
696
  throw new Error("Usage: wp worktree merge-cleanup <branch-or-path> [--base <ref>] [--dry-run]");
692
697
  }
693
- handleMergeCleanup(nameOrPath, opts);
698
+ await handleMergeCleanup(nameOrPath, opts);
694
699
  return;
695
700
  }
696
701
  default: {
@@ -11,6 +11,7 @@ import { canonicalizeWorktreePath } from "#worktrees/identity.js";
11
11
  import { dashProviderOwnershipName, parseDashPermissionMode, } from "#cli/commands/dash/provider-capabilities.js";
12
12
  import { optionalToolCanonicalCommand } from "#cli/optional-tools.js";
13
13
  import { commandExists } from "#runtime/command-exists.js";
14
+ import { ensureCodexProjectMcpServers, ensureCodexWebpressoMcp, } from "#cli/commands/init/scaffolders/codex-mcp/index.js";
14
15
  export class DirectProviderLaunchPreparationError extends Error {
15
16
  action;
16
17
  constructor(message, action) {
@@ -78,8 +79,8 @@ function validateDirectProviderLaunch(provider, cwd) {
78
79
  ? `Run \`${installCommand}\` and retry.`
79
80
  : `Install ${ownershipName} and retry.`);
80
81
  }
81
- // External PATH hosts (Grok) do not run optional-tool freshness — skip vp.
82
- const vpCommand = resolveGlobalCapableVpCommand();
82
+ // External PATH hosts (Grok) do not run optional-tool freshness.
83
+ const vpCommand = adapter ? resolveGlobalCapableVpCommand() : null;
83
84
  if (adapter && !vpCommand) {
84
85
  throw new DirectProviderLaunchPreparationError("No global-capable Vite+ runner found.", "Reinstall @webpresso/agent-kit and retry.");
85
86
  }
@@ -90,6 +91,29 @@ function validateDirectProviderLaunch(provider, cwd) {
90
91
  vpCommand,
91
92
  };
92
93
  }
94
+ function ensureCodexSessionTooling(repoRoot) {
95
+ const options = { dryRun: false, overwrite: false };
96
+ const webpresso = ensureCodexWebpressoMcp({ options });
97
+ if (webpresso.kind === "codex-webpresso-mcp-not-installed") {
98
+ throw new DirectProviderLaunchPreparationError(`Codex webpresso MCP is not configured because no usable agent-kit install root was found. Checked: ${webpresso.checked.join(", ") || "(none)"}`, "Run `wp setup --yes-global` from this repo, then retry `wp codex`.");
99
+ }
100
+ const project = ensureCodexProjectMcpServers({ repoRoot, options });
101
+ if (project.kind === "codex-project-mcp-invalid") {
102
+ throw new DirectProviderLaunchPreparationError(`Codex project MCP config is invalid: ${project.reason}`, "Fix .mcp.json or run `wp setup --yes-global` for detailed setup diagnostics.");
103
+ }
104
+ if (project.kind === "codex-project-mcp-unavailable") {
105
+ throw new DirectProviderLaunchPreparationError(`Codex project MCP server ${project.server} is unavailable: ${project.reason}`, "Run `wp setup --yes-global` from this repo to provision project MCP servers, then retry.");
106
+ }
107
+ }
108
+ const PROVIDER_SESSION_PREFLIGHTS = {
109
+ claude: () => undefined,
110
+ codex: ensureCodexSessionTooling,
111
+ grok: () => undefined,
112
+ opencode: () => undefined,
113
+ };
114
+ function ensureProviderSessionTooling(provider, cwd) {
115
+ PROVIDER_SESSION_PREFLIGHTS[provider](cwd);
116
+ }
93
117
  export function isBareInteractiveProviderLaunch(args) {
94
118
  return parseDashPermissionMode(args).args.length === 0;
95
119
  }
@@ -136,14 +160,17 @@ export async function prepareDirectProviderLaunch(provider, args, cwd) {
136
160
  return { cwd, warnings: [] };
137
161
  }
138
162
  const { managedCwd, warnings } = await prepareLaunchEnvironment(provider, cwd);
139
- if (managedCwd)
163
+ if (managedCwd) {
164
+ ensureProviderSessionTooling(provider, managedCwd);
140
165
  return { cwd: managedCwd, warnings };
166
+ }
141
167
  const created = await createManagedWorktree({
142
168
  cwd,
143
169
  prefix: provider,
144
170
  base: "origin/main",
145
171
  dependencyHydration: dependencyHydrationForProvider(provider),
146
172
  });
173
+ ensureProviderSessionTooling(provider, created.path);
147
174
  return { cwd: created.path, warnings };
148
175
  }
149
176
  /**
@@ -163,5 +190,6 @@ export function dependencyHydrationForProvider(provider) {
163
190
  */
164
191
  export async function prepareDirectProviderLaunchAt(provider, cwd) {
165
192
  const { warnings } = await prepareLaunchEnvironment(provider, cwd);
193
+ ensureProviderSessionTooling(provider, cwd);
166
194
  return { cwd, warnings };
167
195
  }
@@ -15,6 +15,16 @@ export interface OptionalToolFreshnessCache {
15
15
  readonly version: 1;
16
16
  readonly tools: Partial<Record<ManagedToolName, OptionalToolFreshnessRecord>>;
17
17
  }
18
+ export interface OptionalToolRefreshLeaseRecord {
19
+ readonly pid: number | null;
20
+ readonly startedAt: number;
21
+ readonly heartbeatAt: number;
22
+ readonly expiresAt: number;
23
+ }
24
+ export interface OptionalToolRefreshLeaseCache {
25
+ readonly version: 1;
26
+ readonly tools: Partial<Record<ManagedToolName, OptionalToolRefreshLeaseRecord>>;
27
+ }
18
28
  export type OptionalToolFreshnessMode = "force" | "if-needed";
19
29
  export type OptionalToolFreshnessResult = {
20
30
  readonly kind: "missing";
@@ -66,9 +76,22 @@ export interface OptionalToolFreshnessDeps {
66
76
  }) => SpawnSyncReturns<string>;
67
77
  readonly readCache?: () => OptionalToolFreshnessCache;
68
78
  readonly writeCache?: (cache: OptionalToolFreshnessCache) => void;
79
+ readonly readLeaseCache?: () => OptionalToolRefreshLeaseCache;
80
+ readonly writeLeaseCache?: (cache: OptionalToolRefreshLeaseCache) => void;
81
+ readonly clearLease?: (tool: ManagedToolName) => void;
82
+ readonly spawnDetached?: (command: string, args: readonly string[], options: {
83
+ readonly cwd: string;
84
+ }) => {
85
+ readonly pid?: number | undefined;
86
+ readonly unref?: () => void;
87
+ };
69
88
  }
70
89
  export declare function readOptionalToolFreshnessCache(path?: string): OptionalToolFreshnessCache;
71
90
  export declare function writeOptionalToolFreshnessCache(cache: OptionalToolFreshnessCache, path?: string): void;
91
+ export declare function readOptionalToolRefreshLeaseCache(path?: string): OptionalToolRefreshLeaseCache;
92
+ export declare function writeOptionalToolRefreshLeaseCache(cache: OptionalToolRefreshLeaseCache, path?: string): void;
93
+ export declare function clearOptionalToolRefreshLease(tool: ManagedToolName, path?: string): void;
94
+ export declare function optionalToolRefreshLeaseRecord(pid: number | null, now: number): OptionalToolRefreshLeaseRecord;
72
95
  export declare function supportsOptionalToolFreshness(adapter: OptionalToolAdapter): boolean;
73
96
  /**
74
97
  * Resolve a WP-managed optional-tool adapter for a dash provider.
@@ -78,4 +101,8 @@ export declare function tryResolveProviderToolAdapter(provider: DashProvider): O
78
101
  export declare function resolveProviderToolAdapter(provider: DashProvider): OptionalToolAdapter;
79
102
  export declare function refreshOptionalToolSync(input: OptionalToolFreshnessInput, deps?: OptionalToolFreshnessDeps): OptionalToolFreshnessResult;
80
103
  export declare function ensureOptionalToolFreshnessForLaunch(input: Omit<OptionalToolFreshnessInput, "mode">, deps?: OptionalToolFreshnessDeps): Promise<OptionalToolFreshnessResult>;
104
+ export declare function runOptionalToolRefreshWorker(args: readonly string[], deps?: OptionalToolFreshnessDeps & {
105
+ readonly readOwnershipState?: () => ToolingOwnershipState;
106
+ readonly resolveVpCommand?: () => GlobalCapableVpCommandInput | null;
107
+ }): number;
81
108
  export {};