@quantiya/codevibe-core 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/dist/__tests__/cp-5-baseline-invariants.test.d.ts +1 -0
  2. package/dist/__tests__/prompt-parser.test.d.ts +1 -0
  3. package/dist/adapter/__tests__/capabilities.test.d.ts +1 -0
  4. package/dist/adapter/__tests__/contract-conformance.test.d.ts +1 -0
  5. package/dist/adapter/__tests__/packets.test.d.ts +1 -0
  6. package/dist/adapter/__tests__/progress.test.d.ts +1 -0
  7. package/dist/adapter/__tests__/registry.test.d.ts +1 -0
  8. package/dist/adapter/__tests__/smoke/claude.smoke.test.d.ts +1 -0
  9. package/dist/adapter/__tests__/smoke/codex.smoke.test.d.ts +1 -0
  10. package/dist/adapter/__tests__/smoke/gemini.smoke.test.d.ts +1 -0
  11. package/dist/adapter/capabilities.d.ts +68 -0
  12. package/dist/adapter/index.d.ts +7 -0
  13. package/dist/adapter/packets.d.ts +129 -0
  14. package/dist/adapter/progress.d.ts +93 -0
  15. package/dist/adapter/registry.d.ts +91 -0
  16. package/dist/adapter/types.d.ts +22 -0
  17. package/dist/appsync/__tests__/appsync-client-apply-user-decision.test.d.ts +1 -0
  18. package/dist/appsync/__tests__/appsync-client-classb.test.d.ts +1 -0
  19. package/dist/appsync/__tests__/appsync-client-event-source-filter.test.d.ts +1 -0
  20. package/dist/appsync/__tests__/appsync-client-planner.test.d.ts +1 -0
  21. package/dist/appsync/__tests__/appsync-client-task-group.test.d.ts +1 -0
  22. package/dist/appsync/__tests__/appsync-client.test.d.ts +1 -0
  23. package/dist/appsync/__tests__/cleanup-subscription.test.d.ts +1 -0
  24. package/dist/appsync/__tests__/coerce-awsjson-and-review-summary.test.d.ts +1 -0
  25. package/dist/appsync/__tests__/cp1f-quorum-sdk.test.d.ts +1 -0
  26. package/dist/appsync/__tests__/event-throttle.test.d.ts +1 -0
  27. package/dist/appsync/appsync-client.d.ts +1025 -2
  28. package/dist/appsync/event-throttle.d.ts +28 -0
  29. package/dist/appsync/index.d.ts +4 -1
  30. package/dist/appsync/queries.d.ts +34 -0
  31. package/dist/audit-keys/index.d.ts +32 -0
  32. package/dist/auth/__tests__/auth-telemetry.test.d.ts +1 -0
  33. package/dist/auth/auth-service.d.ts +32 -2
  34. package/dist/auth/auth-telemetry.d.ts +117 -6
  35. package/dist/auth/index.d.ts +1 -0
  36. package/dist/companion-mode/__tests__/persist-preference.test.d.ts +1 -0
  37. package/dist/companion-mode/__tests__/resolve-agent.test.d.ts +1 -0
  38. package/dist/companion-mode/agent-picker.d.ts +9 -0
  39. package/dist/companion-mode/index.d.ts +55 -0
  40. package/dist/companion-mode/persist-preference.d.ts +24 -0
  41. package/dist/companion-mode/resolve-agent.d.ts +41 -0
  42. package/dist/config/config.d.ts +8 -1
  43. package/dist/continuation/__tests__/dirty-state-collector.test.d.ts +1 -0
  44. package/dist/continuation/__tests__/integration.test.d.ts +1 -0
  45. package/dist/continuation/__tests__/packet-reader.test.d.ts +1 -0
  46. package/dist/continuation/__tests__/packet-writer.test.d.ts +1 -0
  47. package/dist/continuation/__tests__/parity.test.d.ts +1 -0
  48. package/dist/continuation/__tests__/status-cli.test.d.ts +1 -0
  49. package/dist/continuation/dirty-state-collector.d.ts +46 -0
  50. package/dist/continuation/index.d.ts +8 -0
  51. package/dist/continuation/packet-reader.d.ts +33 -0
  52. package/dist/continuation/packet-writer.d.ts +86 -0
  53. package/dist/continuation/types.d.ts +239 -0
  54. package/dist/credential-broker/__tests__/broker.test.d.ts +1 -0
  55. package/dist/credential-broker/__tests__/canonical.test.d.ts +1 -0
  56. package/dist/credential-broker/__tests__/scrubber.test.d.ts +1 -0
  57. package/dist/credential-broker/__tests__/upstream-client.test.d.ts +1 -0
  58. package/dist/credential-broker/__tests__/vendor-key-store.test.d.ts +1 -0
  59. package/dist/credential-broker/audit-sink.d.ts +69 -0
  60. package/dist/credential-broker/broker-config.d.ts +39 -0
  61. package/dist/credential-broker/broker-token.d.ts +123 -0
  62. package/dist/credential-broker/broker.d.ts +165 -0
  63. package/dist/credential-broker/canonical.d.ts +119 -0
  64. package/dist/credential-broker/index.d.ts +15 -0
  65. package/dist/credential-broker/scrubber.d.ts +45 -0
  66. package/dist/credential-broker/types.d.ts +141 -0
  67. package/dist/credential-broker/upstream-client.d.ts +20 -0
  68. package/dist/credential-broker/vendor-key-store.d.ts +54 -0
  69. package/dist/index.d.ts +17 -4
  70. package/dist/index.js +559 -55
  71. package/dist/keychain/__tests__/keychain-backend.test.d.ts +1 -0
  72. package/dist/keychain/keychain-backend.d.ts +82 -0
  73. package/dist/keychain/keychain-manager.d.ts +16 -2
  74. package/dist/local-executor/__tests__/agentic-disposable-repo.test.d.ts +1 -0
  75. package/dist/local-executor/__tests__/agentic-resolve.test.d.ts +1 -0
  76. package/dist/local-executor/__tests__/agentic-resolver-flag.test.d.ts +1 -0
  77. package/dist/local-executor/__tests__/authority-symlink-fixture.d.ts +15 -0
  78. package/dist/local-executor/__tests__/authority.test.d.ts +1 -0
  79. package/dist/local-executor/__tests__/class-a-emit.test.d.ts +1 -0
  80. package/dist/local-executor/__tests__/class-a-sign.test.d.ts +1 -0
  81. package/dist/local-executor/__tests__/class-b-consumer.integration.test.d.ts +1 -0
  82. package/dist/local-executor/__tests__/class-b-consumer.test.d.ts +1 -0
  83. package/dist/local-executor/__tests__/class1-reconcilers.test.d.ts +1 -0
  84. package/dist/local-executor/__tests__/class2-resolver.test.d.ts +1 -0
  85. package/dist/local-executor/__tests__/confined-model-caller.test.d.ts +1 -0
  86. package/dist/local-executor/__tests__/conflict-classifier.test.d.ts +1 -0
  87. package/dist/local-executor/__tests__/conflict-resolution-durable-store.test.d.ts +1 -0
  88. package/dist/local-executor/__tests__/conflict-resolution-store.test.d.ts +1 -0
  89. package/dist/local-executor/__tests__/cp1f-quorum-consumer.test.d.ts +1 -0
  90. package/dist/local-executor/__tests__/cp7-audit-writer.test.d.ts +1 -0
  91. package/dist/local-executor/__tests__/durable-store.test.d.ts +1 -0
  92. package/dist/local-executor/__tests__/git-lock-retry.test.d.ts +1 -0
  93. package/dist/local-executor/__tests__/hook-bridge.test.d.ts +1 -0
  94. package/dist/local-executor/__tests__/implementor-argv.test.d.ts +1 -0
  95. package/dist/local-executor/__tests__/local-executor-teams.test.d.ts +1 -0
  96. package/dist/local-executor/__tests__/local-executor.integration.test.d.ts +1 -0
  97. package/dist/local-executor/__tests__/merge-conflict-extract.test.d.ts +1 -0
  98. package/dist/local-executor/__tests__/merge-conflict-git.integration.test.d.ts +1 -0
  99. package/dist/local-executor/__tests__/merge-conflict-resolve-agentic.integration.test.d.ts +1 -0
  100. package/dist/local-executor/__tests__/merge-conflict-resolve.integration.test.d.ts +1 -0
  101. package/dist/local-executor/__tests__/merge-journal-store.test.d.ts +1 -0
  102. package/dist/local-executor/__tests__/merge-train-agentic-recovery.integration.test.d.ts +1 -0
  103. package/dist/local-executor/__tests__/merge-train-w3.integration.test.d.ts +1 -0
  104. package/dist/local-executor/__tests__/merge-train-waveb.integration.test.d.ts +1 -0
  105. package/dist/local-executor/__tests__/merge-train.test.d.ts +1 -0
  106. package/dist/local-executor/__tests__/promote-wal-store.test.d.ts +1 -0
  107. package/dist/local-executor/__tests__/revert-reconcile.test.d.ts +1 -0
  108. package/dist/local-executor/__tests__/revert-runner.test.d.ts +1 -0
  109. package/dist/local-executor/__tests__/shared-contract-detector.test.d.ts +1 -0
  110. package/dist/local-executor/__tests__/spawn.test.d.ts +1 -0
  111. package/dist/local-executor/__tests__/substrate-engage.test.d.ts +1 -0
  112. package/dist/local-executor/__tests__/team-execution-flag.test.d.ts +1 -0
  113. package/dist/local-executor/__tests__/track-registry.test.d.ts +1 -0
  114. package/dist/local-executor/__tests__/verification-runner.test.d.ts +1 -0
  115. package/dist/local-executor/__tests__/wb2-review-bundle.test.d.ts +1 -0
  116. package/dist/local-executor/__tests__/wb2-substrate-spawn.live.test.d.ts +1 -0
  117. package/dist/local-executor/__tests__/workspace-shadow.test.d.ts +1 -0
  118. package/dist/local-executor/__tests__/worktree-merge.test.d.ts +1 -0
  119. package/dist/local-executor/agentic-disposable-repo.d.ts +52 -0
  120. package/dist/local-executor/agentic-resolve.d.ts +54 -0
  121. package/dist/local-executor/agentic-resolver-flag.d.ts +9 -0
  122. package/dist/local-executor/authority.d.ts +61 -0
  123. package/dist/local-executor/class-a-emit.d.ts +140 -0
  124. package/dist/local-executor/class-a-sign.d.ts +57 -0
  125. package/dist/local-executor/class-b-consumer.d.ts +276 -0
  126. package/dist/local-executor/class-b-verify.d.ts +30 -0
  127. package/dist/local-executor/class1-reconcilers.d.ts +58 -0
  128. package/dist/local-executor/class2-resolver.d.ts +74 -0
  129. package/dist/local-executor/confined-model-caller.d.ts +39 -0
  130. package/dist/local-executor/conflict-classifier.d.ts +21 -0
  131. package/dist/local-executor/conflict-resolution-durable-store.d.ts +61 -0
  132. package/dist/local-executor/conflict-resolution-store.d.ts +210 -0
  133. package/dist/local-executor/conflict-types.d.ts +86 -0
  134. package/dist/local-executor/cp7-audit-writer.d.ts +152 -0
  135. package/dist/local-executor/durable-store.d.ts +334 -0
  136. package/dist/local-executor/git-lock-retry.d.ts +40 -0
  137. package/dist/local-executor/hook-bridge.d.ts +36 -0
  138. package/dist/local-executor/implementor-argv.d.ts +183 -0
  139. package/dist/local-executor/index.d.ts +49 -0
  140. package/dist/local-executor/local-executor-impl.d.ts +724 -0
  141. package/dist/local-executor/merge-conflict-extract.d.ts +34 -0
  142. package/dist/local-executor/merge-conflict-resolve.d.ts +101 -0
  143. package/dist/local-executor/merge-journal-store.d.ts +311 -0
  144. package/dist/local-executor/merge-train.d.ts +713 -0
  145. package/dist/local-executor/promote-wal-store.d.ts +301 -0
  146. package/dist/local-executor/resolution-set-index.d.ts +51 -0
  147. package/dist/local-executor/revert-reconcile.d.ts +89 -0
  148. package/dist/local-executor/revert-runner.d.ts +17 -0
  149. package/dist/local-executor/shared-contract-detector.d.ts +57 -0
  150. package/dist/local-executor/spawn.d.ts +34 -0
  151. package/dist/local-executor/task-group-types.d.ts +346 -0
  152. package/dist/local-executor/team-execution-flag.d.ts +21 -0
  153. package/dist/local-executor/track-registry.d.ts +50 -0
  154. package/dist/local-executor/types.d.ts +417 -0
  155. package/dist/local-executor/verification-gates/build.d.ts +6 -0
  156. package/dist/local-executor/verification-gates/deploy-preflight.d.ts +6 -0
  157. package/dist/local-executor/verification-gates/diff-sanity.d.ts +6 -0
  158. package/dist/local-executor/verification-gates/hostile-grep.d.ts +6 -0
  159. package/dist/local-executor/verification-gates/lint.d.ts +6 -0
  160. package/dist/local-executor/verification-gates/shell-runner.d.ts +40 -0
  161. package/dist/local-executor/verification-gates/source-traceability.d.ts +6 -0
  162. package/dist/local-executor/verification-gates/tests.d.ts +6 -0
  163. package/dist/local-executor/verification-gates/typecheck.d.ts +6 -0
  164. package/dist/local-executor/verification-runner.d.ts +28 -0
  165. package/dist/local-executor/wb2-review-bundle.d.ts +59 -0
  166. package/dist/local-executor/workspace-shadow.d.ts +290 -0
  167. package/dist/local-executor/worktree-merge.d.ts +601 -0
  168. package/dist/local-model/__tests__/installer.test.d.ts +1 -0
  169. package/dist/local-model/__tests__/manager.test.d.ts +1 -0
  170. package/dist/local-model/__tests__/ollama.test.d.ts +1 -0
  171. package/dist/local-model/__tests__/runtime.test.d.ts +1 -0
  172. package/dist/local-model/__tests__/state.test.d.ts +1 -0
  173. package/dist/local-model/manager.d.ts +119 -0
  174. package/dist/local-model/ollama.d.ts +27 -0
  175. package/dist/local-model/runtime.d.ts +27 -0
  176. package/dist/local-model/state.d.ts +32 -0
  177. package/dist/orchestration/__tests__/setup-bootstrap.test.d.ts +1 -0
  178. package/dist/orchestration/__tests__/setup-failure-recourse.test.d.ts +1 -0
  179. package/dist/orchestration/__tests__/setup-save.test.d.ts +1 -0
  180. package/dist/orchestration/__tests__/setup-seat-picker.test.d.ts +1 -0
  181. package/dist/orchestration/__tests__/setup-telemetry.test.d.ts +1 -0
  182. package/dist/orchestration/__tests__/setup-test-agents.test.d.ts +1 -0
  183. package/dist/orchestration/__tests__/setup-types.test.d.ts +1 -0
  184. package/dist/orchestration/__tests__/setup-wizard.test.d.ts +1 -0
  185. package/dist/orchestration/__tests__/v1-options.test.d.ts +1 -0
  186. package/dist/orchestration/detect-agents.d.ts +16 -2
  187. package/dist/orchestration/index.d.ts +1 -0
  188. package/dist/orchestration/orchestration-cli.d.ts +4 -1
  189. package/dist/orchestration/setup-bootstrap.d.ts +146 -0
  190. package/dist/orchestration/setup-failure-recourse.d.ts +23 -0
  191. package/dist/orchestration/setup-save.d.ts +47 -0
  192. package/dist/orchestration/setup-seat-picker.d.ts +72 -0
  193. package/dist/orchestration/setup-telemetry.d.ts +54 -0
  194. package/dist/orchestration/setup-test-agents.d.ts +108 -0
  195. package/dist/orchestration/setup-types.d.ts +141 -0
  196. package/dist/orchestration/setup-wizard.d.ts +57 -0
  197. package/dist/orchestration/v1-options.d.ts +97 -0
  198. package/dist/orchestration-shell/__tests__/attachments.test.d.ts +1 -0
  199. package/dist/orchestration-shell/__tests__/audit-browser.test.d.ts +1 -0
  200. package/dist/orchestration-shell/__tests__/audited-path-fixes.test.d.ts +1 -0
  201. package/dist/orchestration-shell/__tests__/bracketed-paste.test.d.ts +1 -0
  202. package/dist/orchestration-shell/__tests__/cli-authority-bridge.test.d.ts +1 -0
  203. package/dist/orchestration-shell/__tests__/cli-group-halt-wiring.test.d.ts +1 -0
  204. package/dist/orchestration-shell/__tests__/cli-orchestration-session-bootstrap.test.d.ts +1 -0
  205. package/dist/orchestration-shell/__tests__/cli-planner-stack.test.d.ts +1 -0
  206. package/dist/orchestration-shell/__tests__/cli-probe-group-status.test.d.ts +1 -0
  207. package/dist/orchestration-shell/__tests__/cli-quorum-loop-tier.test.d.ts +1 -0
  208. package/dist/orchestration-shell/__tests__/cli-singleton-enforcement.test.d.ts +1 -0
  209. package/dist/orchestration-shell/__tests__/cli-stub-session-adapter.test.d.ts +1 -0
  210. package/dist/orchestration-shell/__tests__/cli-verdict-classifier-wiring.test.d.ts +1 -0
  211. package/dist/orchestration-shell/__tests__/components.test.d.ts +1 -0
  212. package/dist/orchestration-shell/__tests__/context-store.test.d.ts +1 -0
  213. package/dist/orchestration-shell/__tests__/cp10-585-accept-echo-target.test.d.ts +1 -0
  214. package/dist/orchestration-shell/__tests__/cp10-585-loop.test.d.ts +1 -0
  215. package/dist/orchestration-shell/__tests__/cp10-585-prompts.test.d.ts +1 -0
  216. package/dist/orchestration-shell/__tests__/cp12-w2b-team-loop.test.d.ts +1 -0
  217. package/dist/orchestration-shell/__tests__/cp12-w4-team-recovery.test.d.ts +1 -0
  218. package/dist/orchestration-shell/__tests__/cp1f-quorum-loop.test.d.ts +1 -0
  219. package/dist/orchestration-shell/__tests__/cp606-team-track-user-resolved.test.d.ts +1 -0
  220. package/dist/orchestration-shell/__tests__/cp7-reviewer-substrate.test.d.ts +1 -0
  221. package/dist/orchestration-shell/__tests__/declared-test-runner.test.d.ts +1 -0
  222. package/dist/orchestration-shell/__tests__/emit-shell-event.test.d.ts +1 -0
  223. package/dist/orchestration-shell/__tests__/familiarize-routing.test.d.ts +1 -0
  224. package/dist/orchestration-shell/__tests__/gate-decision-submit.test.d.ts +1 -0
  225. package/dist/orchestration-shell/__tests__/gate-details-panel.test.d.ts +1 -0
  226. package/dist/orchestration-shell/__tests__/gate-prompts.test.d.ts +1 -0
  227. package/dist/orchestration-shell/__tests__/gate-verdict-details-dispatch.test.d.ts +1 -0
  228. package/dist/orchestration-shell/__tests__/group-decision-submit.test.d.ts +1 -0
  229. package/dist/orchestration-shell/__tests__/hostile-grep.test.d.ts +1 -0
  230. package/dist/orchestration-shell/__tests__/image-attach-e2e.test.d.ts +1 -0
  231. package/dist/orchestration-shell/__tests__/input-bar-autocomplete.test.d.ts +1 -0
  232. package/dist/orchestration-shell/__tests__/live-region-cap.test.d.ts +1 -0
  233. package/dist/orchestration-shell/__tests__/live-static-order.test.d.ts +1 -0
  234. package/dist/orchestration-shell/__tests__/mode-selection.test.d.ts +1 -0
  235. package/dist/orchestration-shell/__tests__/model-cli.test.d.ts +1 -0
  236. package/dist/orchestration-shell/__tests__/non-gate-prompt-routing.test.d.ts +1 -0
  237. package/dist/orchestration-shell/__tests__/orchestration-app-group-decision-transport.test.d.ts +1 -0
  238. package/dist/orchestration-shell/__tests__/orchestration-app-layout.test.d.ts +1 -0
  239. package/dist/orchestration-shell/__tests__/process-markers.test.d.ts +1 -0
  240. package/dist/orchestration-shell/__tests__/reducer.test.d.ts +1 -0
  241. package/dist/orchestration-shell/__tests__/reissue-team-retained-spec.test.d.ts +1 -0
  242. package/dist/orchestration-shell/__tests__/review-summary-render.test.d.ts +1 -0
  243. package/dist/orchestration-shell/__tests__/reviewer-wizard.test.d.ts +1 -0
  244. package/dist/orchestration-shell/__tests__/reviewers-format.test.d.ts +1 -0
  245. package/dist/orchestration-shell/__tests__/root-discovery.test.d.ts +1 -0
  246. package/dist/orchestration-shell/__tests__/runOrchestrationShell-classify-dispatch.test.d.ts +1 -0
  247. package/dist/orchestration-shell/__tests__/runOrchestrationShell-planner-wiring.test.d.ts +1 -0
  248. package/dist/orchestration-shell/__tests__/runOrchestrationShell-signal.test.d.ts +1 -0
  249. package/dist/orchestration-shell/__tests__/runOrchestrationShell.test.d.ts +1 -0
  250. package/dist/orchestration-shell/__tests__/serialize-submissions.test.d.ts +1 -0
  251. package/dist/orchestration-shell/__tests__/slash-router.test.d.ts +1 -0
  252. package/dist/orchestration-shell/__tests__/slash-suggest.test.d.ts +1 -0
  253. package/dist/orchestration-shell/__tests__/status-format.test.d.ts +1 -0
  254. package/dist/orchestration-shell/__tests__/sticky-preference.test.d.ts +1 -0
  255. package/dist/orchestration-shell/__tests__/task-progress.test.d.ts +1 -0
  256. package/dist/orchestration-shell/__tests__/team-decompose-routing.test.d.ts +1 -0
  257. package/dist/orchestration-shell/__tests__/team-decompose-types.test.d.ts +1 -0
  258. package/dist/orchestration-shell/__tests__/team-decompose.test.d.ts +1 -0
  259. package/dist/orchestration-shell/__tests__/team-e2e-smoke.test.d.ts +1 -0
  260. package/dist/orchestration-shell/__tests__/tier2-reviewer-selection.test.d.ts +1 -0
  261. package/dist/orchestration-shell/__tests__/web-browsing.test.d.ts +1 -0
  262. package/dist/orchestration-shell/attachments.d.ts +152 -0
  263. package/dist/orchestration-shell/audit-browser.d.ts +115 -0
  264. package/dist/orchestration-shell/audit-runner.d.ts +59 -0
  265. package/dist/orchestration-shell/bracketed-paste.d.ts +26 -0
  266. package/dist/orchestration-shell/cli.d.ts +431 -0
  267. package/dist/orchestration-shell/cli.js +44191 -0
  268. package/dist/orchestration-shell/cohort-flag.d.ts +16 -0
  269. package/dist/orchestration-shell/components/AuditLogPanel.d.ts +11 -0
  270. package/dist/orchestration-shell/components/CodeVibeLogo.d.ts +2 -0
  271. package/dist/orchestration-shell/components/ConversationPane.d.ts +13 -0
  272. package/dist/orchestration-shell/components/GateDetailsPanel.d.ts +57 -0
  273. package/dist/orchestration-shell/components/GatePanelEntry.d.ts +9 -0
  274. package/dist/orchestration-shell/components/GatePromptEntry.d.ts +16 -0
  275. package/dist/orchestration-shell/components/InputBar.d.ts +55 -0
  276. package/dist/orchestration-shell/components/LiveProgressLine.d.ts +8 -0
  277. package/dist/orchestration-shell/components/MultiTrackStatusNode.d.ts +8 -0
  278. package/dist/orchestration-shell/components/OrchestrationApp.d.ts +129 -0
  279. package/dist/orchestration-shell/components/ReviewerSetupWizard.d.ts +24 -0
  280. package/dist/orchestration-shell/components/StatusBar.d.ts +20 -0
  281. package/dist/orchestration-shell/components/nodes/AdvisoryEntry.d.ts +8 -0
  282. package/dist/orchestration-shell/components/nodes/GateStatusNode.d.ts +8 -0
  283. package/dist/orchestration-shell/components/nodes/PlannerDecisionEntry.d.ts +8 -0
  284. package/dist/orchestration-shell/components/nodes/ReviewerQuorumStatusNode.d.ts +8 -0
  285. package/dist/orchestration-shell/components/nodes/SlashOutputEntry.d.ts +8 -0
  286. package/dist/orchestration-shell/components/nodes/SubagentEventEntry.d.ts +8 -0
  287. package/dist/orchestration-shell/components/nodes/UserMessageEntry.d.ts +8 -0
  288. package/dist/orchestration-shell/context-store.d.ts +389 -0
  289. package/dist/orchestration-shell/declared-test-runner.d.ts +84 -0
  290. package/dist/orchestration-shell/emit-shell-event.d.ts +64 -0
  291. package/dist/orchestration-shell/gate-decision-submit.d.ts +245 -0
  292. package/dist/orchestration-shell/gate-prompts.d.ts +481 -0
  293. package/dist/orchestration-shell/index.d.ts +712 -0
  294. package/dist/orchestration-shell/ink-runtime.d.ts +84 -0
  295. package/dist/orchestration-shell/live-region-cap.d.ts +70 -0
  296. package/dist/orchestration-shell/live-static-order.d.ts +22 -0
  297. package/dist/orchestration-shell/mode-selection.d.ts +46 -0
  298. package/dist/orchestration-shell/non-tty-fallback.d.ts +67 -0
  299. package/dist/orchestration-shell/process-markers.d.ts +12 -0
  300. package/dist/orchestration-shell/quorum-loop.d.ts +1900 -0
  301. package/dist/orchestration-shell/reducer.d.ts +8 -0
  302. package/dist/orchestration-shell/root-discovery.d.ts +25 -0
  303. package/dist/orchestration-shell/route-browse.d.ts +20 -0
  304. package/dist/orchestration-shell/slash-router.d.ts +64 -0
  305. package/dist/orchestration-shell/slash-routes/continuation.d.ts +71 -0
  306. package/dist/orchestration-shell/slash-routes/reviewers.d.ts +41 -0
  307. package/dist/orchestration-shell/slash-suggest.d.ts +29 -0
  308. package/dist/orchestration-shell/status-format.d.ts +59 -0
  309. package/dist/orchestration-shell/sticky-preference.d.ts +24 -0
  310. package/dist/orchestration-shell/store.d.ts +17 -0
  311. package/dist/orchestration-shell/task-progress.d.ts +122 -0
  312. package/dist/orchestration-shell/team-decompose.d.ts +196 -0
  313. package/dist/orchestration-shell/types.d.ts +777 -0
  314. package/dist/orchestration-shell/vendor/ink-parse-keypress.d.ts +42 -0
  315. package/dist/orchestration-shell/web/extract.d.ts +11 -0
  316. package/dist/orchestration-shell/web/fetch.d.ts +15 -0
  317. package/dist/orchestration-shell/web/ip.d.ts +26 -0
  318. package/dist/orchestration-shell/web/sanitize.d.ts +14 -0
  319. package/dist/orchestration-shell/web/search.d.ts +16 -0
  320. package/dist/planner/__tests__/cache-clarification-bypass.test.d.ts +1 -0
  321. package/dist/planner/__tests__/cache.test.d.ts +1 -0
  322. package/dist/planner/__tests__/client.test.d.ts +1 -0
  323. package/dist/planner/__tests__/health-machine-transitions.test.d.ts +1 -0
  324. package/dist/planner/__tests__/local-gemma.test.d.ts +1 -0
  325. package/dist/planner/__tests__/types-zod.test.d.ts +1 -0
  326. package/dist/planner/adapter.d.ts +16 -0
  327. package/dist/planner/cache.d.ts +35 -0
  328. package/dist/planner/client.d.ts +103 -0
  329. package/dist/planner/health-state.d.ts +24 -0
  330. package/dist/planner/index.d.ts +7 -0
  331. package/dist/planner/local-advisory.d.ts +84 -0
  332. package/dist/planner/local-gemma.d.ts +23 -0
  333. package/dist/planner/types.d.ts +123 -0
  334. package/dist/reviewer/__tests__/antigravity-provider.test.d.ts +1 -0
  335. package/dist/reviewer/__tests__/claude-provider-json.test.d.ts +1 -0
  336. package/dist/reviewer/__tests__/cp7-reviewer-sandbox.test.d.ts +1 -0
  337. package/dist/reviewer/__tests__/output-parser-classifier-helpers.test.d.ts +1 -0
  338. package/dist/reviewer/__tests__/verdict-classifier.test.d.ts +1 -0
  339. package/dist/reviewer/index.d.ts +2 -0
  340. package/dist/reviewer/output-parser.d.ts +48 -12
  341. package/dist/reviewer/provider.d.ts +107 -3
  342. package/dist/reviewer/providers/__tests__/failure-classifier.test.d.ts +1 -0
  343. package/dist/reviewer/providers/antigravity.d.ts +49 -0
  344. package/dist/reviewer/providers/claude.d.ts +19 -4
  345. package/dist/reviewer/providers/codex.d.ts +47 -5
  346. package/dist/reviewer/providers/failure-classifier.d.ts +26 -0
  347. package/dist/reviewer/providers/gemini.d.ts +5 -4
  348. package/dist/reviewer/registry.d.ts +5 -5
  349. package/dist/reviewer/subprocess.d.ts +37 -0
  350. package/dist/reviewer/token-usage.d.ts +32 -0
  351. package/dist/reviewer/types.d.ts +5 -5
  352. package/dist/reviewer/verdict-classifier.d.ts +62 -0
  353. package/dist/session/__tests__/prepare-event-timestamp.test.d.ts +1 -0
  354. package/dist/session/__tests__/session-resume-service-keys.test.d.ts +1 -0
  355. package/dist/session/index.d.ts +1 -0
  356. package/dist/session/prepare-event-timestamp.d.ts +30 -0
  357. package/dist/session/session-rekey.d.ts +40 -0
  358. package/dist/session/session-resume.d.ts +25 -0
  359. package/dist/structural-summary/__tests__/__fixtures__/fixture-helpers.d.ts +11 -0
  360. package/dist/structural-summary/__tests__/assembler.test.d.ts +1 -0
  361. package/dist/structural-summary/__tests__/generator.test.d.ts +1 -0
  362. package/dist/structural-summary/__tests__/language-detect.test.d.ts +1 -0
  363. package/dist/structural-summary/__tests__/manifest-parsers/cargo.test.d.ts +1 -0
  364. package/dist/structural-summary/__tests__/manifest-parsers/gomod.test.d.ts +1 -0
  365. package/dist/structural-summary/__tests__/manifest-parsers/gradle.test.d.ts +1 -0
  366. package/dist/structural-summary/__tests__/manifest-parsers/index.test.d.ts +1 -0
  367. package/dist/structural-summary/__tests__/manifest-parsers/npm.test.d.ts +1 -0
  368. package/dist/structural-summary/__tests__/manifest-parsers/podfile.test.d.ts +1 -0
  369. package/dist/structural-summary/__tests__/manifest-parsers/pyproject.test.d.ts +1 -0
  370. package/dist/structural-summary/__tests__/opt-in-store.test.d.ts +1 -0
  371. package/dist/structural-summary/__tests__/privacy-filter.test.d.ts +1 -0
  372. package/dist/structural-summary/__tests__/safe-file-read.test.d.ts +1 -0
  373. package/dist/structural-summary/__tests__/user-ignore-matcher.test.d.ts +1 -0
  374. package/dist/structural-summary/__tests__/walker.test.d.ts +1 -0
  375. package/dist/structural-summary/generator.d.ts +8 -0
  376. package/dist/structural-summary/index.d.ts +7 -0
  377. package/dist/structural-summary/manifest-parsers/cargo.d.ts +3 -0
  378. package/dist/structural-summary/manifest-parsers/index.d.ts +7 -0
  379. package/dist/structural-summary/manifest-parsers/npm.d.ts +3 -0
  380. package/dist/structural-summary/manifest-parsers/other.d.ts +17 -0
  381. package/dist/structural-summary/opt-in-store.d.ts +24 -0
  382. package/dist/structural-summary/privacy-filter.d.ts +110 -0
  383. package/dist/structural-summary/safe-file-read.d.ts +11 -0
  384. package/dist/structural-summary/types.d.ts +215 -0
  385. package/dist/structural-summary/user-ignore-matcher.d.ts +9 -0
  386. package/dist/structural-summary/walker.d.ts +20 -0
  387. package/dist/substrate/__tests__/docker.test.d.ts +1 -0
  388. package/dist/substrate/__tests__/forwarder.test.d.ts +1 -0
  389. package/dist/substrate/__tests__/git-proxy.test.d.ts +1 -0
  390. package/dist/substrate/__tests__/sandbox-exec.test.d.ts +1 -0
  391. package/dist/substrate/__tests__/substrate-e2e.integration.test.d.ts +1 -0
  392. package/dist/substrate/command-runner.d.ts +19 -0
  393. package/dist/substrate/docker.d.ts +134 -0
  394. package/dist/substrate/errors.d.ts +33 -0
  395. package/dist/substrate/forwarder.d.ts +67 -0
  396. package/dist/substrate/git-proxy.d.ts +35 -0
  397. package/dist/substrate/index.d.ts +12 -0
  398. package/dist/substrate/relay-script.d.ts +27 -0
  399. package/dist/substrate/sandbox-exec.d.ts +116 -0
  400. package/dist/substrate/types.d.ts +218 -0
  401. package/dist/substrate-launch/__tests__/apikey-bootstrap.test.d.ts +1 -0
  402. package/dist/substrate-launch/__tests__/creditless-loop.integration.test.d.ts +1 -0
  403. package/dist/substrate-launch/__tests__/engage-substrate.test.d.ts +1 -0
  404. package/dist/substrate-launch/__tests__/fallback-ladder.test.d.ts +1 -0
  405. package/dist/substrate-launch/__tests__/le-env-scrub.test.d.ts +1 -0
  406. package/dist/substrate-launch/__tests__/sanitized-env.test.d.ts +1 -0
  407. package/dist/substrate-launch/apikey-bootstrap.d.ts +84 -0
  408. package/dist/substrate-launch/engage-substrate.d.ts +102 -0
  409. package/dist/substrate-launch/fallback-ladder.d.ts +49 -0
  410. package/dist/substrate-launch/index.d.ts +12 -0
  411. package/dist/substrate-launch/le-env-scrub.d.ts +77 -0
  412. package/dist/substrate-launch/sanitized-env.d.ts +73 -0
  413. package/dist/types/auth.d.ts +6 -1
  414. package/dist/types/events.d.ts +19 -2
  415. package/dist/types/reviewer.d.ts +6 -6
  416. package/package.json +21 -3
@@ -0,0 +1,119 @@
1
+ import { spawn } from 'child_process';
2
+ import type { Tier } from '../orchestration-shell/types';
3
+ import { type LocalModelState, type LocalModelStateStore } from './state';
4
+ import type { LocalGemmaPlannerRunner } from '../planner/local-gemma';
5
+ export type LocalModelCommand = 'install' | 'status' | 'remove' | 'enable' | 'warm' | 'health-check';
6
+ export type LocalModelEntitlementSource = 'backend' | 'unauthenticated' | 'unavailable';
7
+ export interface LocalModelEntitlement {
8
+ tier: Tier | 'UNKNOWN';
9
+ source: LocalModelEntitlementSource;
10
+ }
11
+ export interface LocalModelArtifactConfig {
12
+ artifactId: string | null;
13
+ downloadUrl: string | null;
14
+ sha256: string | null;
15
+ expectedBytes?: number | null;
16
+ cacheDir: string;
17
+ ollamaModel?: string | null;
18
+ }
19
+ export interface LocalModelStore {
20
+ artifactExists(config: LocalModelArtifactConfig): Promise<boolean>;
21
+ removeArtifact(config: LocalModelArtifactConfig): Promise<boolean>;
22
+ }
23
+ export interface LocalModelInstaller {
24
+ install(config: LocalModelArtifactConfig): Promise<void>;
25
+ }
26
+ export interface LocalModelDownloadTransport {
27
+ downloadToFile(url: URL, destinationPath: string, expectedBytes: number): Promise<void>;
28
+ }
29
+ export interface LocalModelRuntimeFactory {
30
+ createRunner(config: LocalModelArtifactConfig): Promise<LocalGemmaPlannerRunner | null>;
31
+ }
32
+ export interface RunLocalModelCommandOptions {
33
+ command: LocalModelCommand;
34
+ entitlement: LocalModelEntitlement;
35
+ config?: LocalModelArtifactConfig;
36
+ store?: LocalModelStore;
37
+ stateStore?: LocalModelStateStore;
38
+ installer?: LocalModelInstaller;
39
+ runtimeFactory?: LocalModelRuntimeFactory;
40
+ stdout?: (s: string) => void;
41
+ stderr?: (s: string) => void;
42
+ /** TEST SEAM — the capability-aware default model for a BARE install. Defaults to
43
+ * {@link resolveDefaultOllamaModelForInstall}; tests inject a deterministic thunk. */
44
+ resolveInstallModel?: () => Promise<string>;
45
+ }
46
+ export declare function loadLocalModelArtifactConfigFromEnv(env?: NodeJS.ProcessEnv): LocalModelArtifactConfig;
47
+ /** The curated local-planner Ollama models (benchmarked 2026-07-02, gemma4 family). */
48
+ export declare const CAPABLE_OLLAMA_MODEL = "gemma4:12b-it-qat";
49
+ export declare const BASELINE_OLLAMA_MODEL = "gemma4:latest";
50
+ /** True iff the Ollama version string (e.g. "0.31.1", tolerating a leading "v") is ≥ MIN_OLLAMA_MAJOR.MINOR. */
51
+ export declare function ollamaVersionAtLeast(version: string | undefined, major?: number, minor?: number): boolean;
52
+ /**
53
+ * The DEFAULT Ollama model for `codevibe model install` when the user set neither
54
+ * `CODEVIBE_LOCAL_MODEL_OLLAMA_MODEL` nor a pinned artifact — CAPABILITY-AWARE per the
55
+ * CP-4 plan (2026-07-02 benchmark): the stronger 12B QAT (`gemma4:12b-it-qat`) ONLY when
56
+ * the host has enough RAM (~16 GB) AND Ollama ≥ 0.31 (the 12B tags need it — 0.24 rejects
57
+ * the pull); otherwise the broadly-compatible 8B (`gemma4:latest`). Fails SOFT to the 8B
58
+ * on any uncertainty (Ollama unreachable / unparseable version) so install never breaks.
59
+ */
60
+ export declare function resolveDefaultOllamaModelForInstall(deps?: {
61
+ ollamaHost?: string;
62
+ totalMemBytes?: number;
63
+ fetchImpl?: typeof fetch;
64
+ log?: (s: string) => void;
65
+ }): Promise<string>;
66
+ export declare function isLocalModelEntitled(entitlement: LocalModelEntitlement): entitlement is LocalModelEntitlement & {
67
+ tier: 'PRO' | 'MAX';
68
+ };
69
+ export declare function localModelArtifactPath(config: LocalModelArtifactConfig): string | null;
70
+ export declare const defaultLocalModelStore: LocalModelStore;
71
+ export declare const defaultLocalModelDownloadTransport: LocalModelDownloadTransport;
72
+ export interface LocalModelProcessPuller {
73
+ pull(model: string, localOllamaHost?: string): Promise<void>;
74
+ }
75
+ type SpawnOllamaPull = typeof spawn;
76
+ export declare class OllamaProcessPuller implements LocalModelProcessPuller {
77
+ private readonly command;
78
+ private readonly spawnPull;
79
+ constructor(command?: string, spawnPull?: SpawnOllamaPull);
80
+ pull(model: string, localOllamaHost?: string): Promise<void>;
81
+ }
82
+ /**
83
+ * Build the Ollama runtime config for a pull that HONORS the caller's `model` argument
84
+ * (the config/CLI is authoritative), sourcing host + timeout from env. Without this, the
85
+ * pullers re-read `CODEVIBE_LOCAL_MODEL_OLLAMA_MODEL` from env — which is UNSET on a bare
86
+ * `codevibe model install`, so the capability-resolved default (12B/8B) would never reach
87
+ * the puller and the install would throw. For an explicit install the arg equals the env
88
+ * model → identical result. Host (default 127.0.0.1) + timeout (default) resolve when unset.
89
+ */
90
+ export declare function ollamaEnvForModel(model: string, baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
91
+ /**
92
+ * Fill an env-derived artifact config's `ollamaModel` + `artifactId` from PERSISTED state
93
+ * when env didn't supply them — so a bare `codevibe model install` (which recorded the
94
+ * resolved model in state) is usable by the shell + status/enable/warm without the user
95
+ * setting `CODEVIBE_LOCAL_MODEL_OLLAMA_MODEL`. Env ALWAYS wins (explicit override); state
96
+ * only fills the gaps, and only when a model was actually installed (`choice === 'enabled'`).
97
+ */
98
+ export declare function applyPersistedSelection(config: LocalModelArtifactConfig, state: Pick<LocalModelState, 'choice' | 'artifactId' | 'ollamaModel'>): LocalModelArtifactConfig;
99
+ export declare class DefaultOllamaPuller implements LocalModelProcessPuller {
100
+ private readonly httpPuller;
101
+ private readonly processPuller;
102
+ constructor(httpPuller?: LocalModelProcessPuller, processPuller?: LocalModelProcessPuller);
103
+ pull(model: string): Promise<void>;
104
+ }
105
+ export declare class OllamaLocalModelInstaller implements LocalModelInstaller {
106
+ private readonly puller;
107
+ constructor(puller?: LocalModelProcessPuller);
108
+ install(config: LocalModelArtifactConfig): Promise<void>;
109
+ }
110
+ export declare class HttpsLocalModelInstaller implements LocalModelInstaller {
111
+ private readonly transport;
112
+ constructor(transport?: LocalModelDownloadTransport);
113
+ install(config: LocalModelArtifactConfig): Promise<void>;
114
+ private tryDigestExistingArtifact;
115
+ }
116
+ export declare const defaultLocalModelInstaller: LocalModelInstaller;
117
+ export declare const defaultLocalModelRuntimeFactory: LocalModelRuntimeFactory;
118
+ export declare function runLocalModelCommand(options: RunLocalModelCommandOptions): Promise<number>;
119
+ export {};
@@ -0,0 +1,27 @@
1
+ import type { PlannerProbeResult } from '../planner/adapter';
2
+ import type { LocalGemmaAdvisoryOptions } from '../planner/local-advisory';
3
+ import type { LocalGemmaPlannerRunner } from '../planner/local-gemma';
4
+ export interface OllamaRuntimeConfig {
5
+ model: string;
6
+ host: string;
7
+ timeoutMs: number;
8
+ }
9
+ export type OllamaRuntimeConfigResult = {
10
+ ok: true;
11
+ config: OllamaRuntimeConfig;
12
+ } | {
13
+ ok: false;
14
+ reason: string;
15
+ };
16
+ export declare function isSafeOllamaModelName(model: string | null | undefined): model is string;
17
+ export declare function parseLocalOllamaHost(raw: string | undefined): string | null;
18
+ export declare function loadOllamaRuntimeConfigFromEnv(env?: NodeJS.ProcessEnv): OllamaRuntimeConfigResult;
19
+ export declare function requestOllamaPull(config: OllamaRuntimeConfig): Promise<void>;
20
+ export declare class OllamaGemmaPlannerRunner implements LocalGemmaPlannerRunner {
21
+ private readonly config;
22
+ readonly runtimeLabel: string;
23
+ constructor(config: OllamaRuntimeConfig);
24
+ classify(promptText: string): Promise<string>;
25
+ generateAdvisory(promptText: string, options?: LocalGemmaAdvisoryOptions): Promise<string>;
26
+ probe(): Promise<PlannerProbeResult>;
27
+ }
@@ -0,0 +1,27 @@
1
+ import type { PlannerProbeResult } from '../planner/adapter';
2
+ import type { LocalGemmaAdvisoryOptions } from '../planner/local-advisory';
3
+ import type { LocalGemmaPlannerRunner } from '../planner/local-gemma';
4
+ export interface LocalGemmaRuntimeConfig {
5
+ command: string;
6
+ args: string[];
7
+ modelPath: string;
8
+ timeoutMs: number;
9
+ env: NodeJS.ProcessEnv;
10
+ }
11
+ export type LocalGemmaRuntimeConfigResult = {
12
+ ok: true;
13
+ config: LocalGemmaRuntimeConfig;
14
+ } | {
15
+ ok: false;
16
+ reason: string;
17
+ };
18
+ export declare function loadLocalGemmaRuntimeConfigFromEnv(modelPath: string, env?: NodeJS.ProcessEnv): LocalGemmaRuntimeConfigResult;
19
+ export declare class LocalGemmaProcessRunner implements LocalGemmaPlannerRunner {
20
+ private readonly config;
21
+ readonly runtimeLabel: string;
22
+ constructor(config: LocalGemmaRuntimeConfig);
23
+ classify(promptText: string): Promise<string>;
24
+ generateAdvisory(promptText: string, options?: LocalGemmaAdvisoryOptions): Promise<string>;
25
+ probe(): Promise<PlannerProbeResult>;
26
+ private invoke;
27
+ }
@@ -0,0 +1,32 @@
1
+ export type LocalModelChoice = 'not_configured' | 'skipped' | 'enabled';
2
+ export interface LocalModelState {
3
+ schemaVersion: 1;
4
+ choice: LocalModelChoice;
5
+ artifactId: string | null;
6
+ /**
7
+ * The installed Ollama model tag (e.g. `gemma4:12b-it-qat`), persisted so a BARE
8
+ * `codevibe model install` (which resolves the model dynamically, not from env) is
9
+ * usable afterward — the shell + status/enable/warm resolve it from here when
10
+ * `CODEVIBE_LOCAL_MODEL_OLLAMA_MODEL` is unset. Null for non-Ollama / legacy state.
11
+ */
12
+ ollamaModel: string | null;
13
+ updatedAt: string;
14
+ }
15
+ export interface LocalModelStateStore {
16
+ read(): Promise<LocalModelState>;
17
+ write(state: LocalModelState): Promise<void>;
18
+ clear(): Promise<void>;
19
+ }
20
+ export declare function defaultLocalModelState(): LocalModelState;
21
+ export declare function localModelStateFilePath(env?: NodeJS.ProcessEnv): string;
22
+ export declare class FileSystemLocalModelStateStore implements LocalModelStateStore {
23
+ private readonly filePath;
24
+ constructor(filePath?: string);
25
+ read(): Promise<LocalModelState>;
26
+ write(state: LocalModelState): Promise<void>;
27
+ clear(): Promise<void>;
28
+ }
29
+ export declare const defaultLocalModelStateStore: LocalModelStateStore;
30
+ export declare function readLocalModelState(store?: LocalModelStateStore): Promise<LocalModelState>;
31
+ export declare function markLocalModelEnabled(artifactId: string | null, ollamaModel?: string | null, store?: LocalModelStateStore): Promise<void>;
32
+ export declare function markLocalModelSkipped(store?: LocalModelStateStore): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { Logger } from '../logger';
2
2
  import { AppSyncClient } from '../appsync';
3
- export type DetectableAgent = 'CLAUDE' | 'GEMINI' | 'CODEX';
3
+ import { CapabilityRegistry } from '../adapter/capabilities';
4
+ export type DetectableAgent = 'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY';
4
5
  /**
5
6
  * Returns the subset of agents present on PATH. Uses `command -v`
6
7
  * (POSIX-standard) rather than `which` for portability across macOS
@@ -21,12 +22,25 @@ export declare function detectInstalledAgents(): DetectableAgent[];
21
22
  * and log but not abort startup — Quorum 2.0 auto-enable degrades
22
23
  * to "use last-pushed agent set" when the mutation fails).
23
24
  *
25
+ * CP-1.f LOCK RP-3 — `replace` semantics. `User.availableAgents` is a
26
+ * cross-device UNION by default (`replace=false`), which never removes a
27
+ * stale agent (a `GEMINI` from a prior device/install would linger and
28
+ * get composed into the reviewer panel → `spawn gemini ENOENT`). The
29
+ * orchestration shell passes `replace=true` so the stored set is EXACTLY
30
+ * the current orchestration host's installed agents, AND — also per
31
+ * RP-3 — always writes even on zero detection (no skip-on-empty) so a
32
+ * stale set cannot linger. The 1.x companion-daemon callers keep the
33
+ * default `replace=false` (union) path, preserving their contract.
34
+ *
24
35
  * @param client AppSyncClient that's already been authenticated via
25
36
  * authenticateWithStoredTokens()
26
37
  * @param log Logger — warn-level when no agents detected, info
27
38
  * on success
39
+ * @param replace When true (orchestration shell), REPLACE the stored set
40
+ * with exactly the detected set and write even when empty.
41
+ * Default false (1.x companion union path).
28
42
  */
29
- export declare function pushDetectedAgents(client: AppSyncClient, log: Pick<Logger, 'info' | 'warn'>): Promise<void>;
43
+ export declare function pushDetectedAgents(client: AppSyncClient, log: Pick<Logger, 'info' | 'warn'>, capabilityRegistry?: CapabilityRegistry, detectFn?: () => DetectableAgent[], replace?: boolean): Promise<void>;
30
44
  /**
31
45
  * Quorum 2.0 (2f.0.a.6) per-session orchestration CLI override applier.
32
46
  * All three plugin wrappers (`codevibe-claude`, `codevibe-gemini`,
@@ -1,2 +1,3 @@
1
1
  export { detectInstalledAgents, pushDetectedAgents, applyPerSessionOrchestrationOverride, type DetectableAgent, } from './detect-agents';
2
2
  export { runOrchestrationCli } from './orchestration-cli';
3
+ export { V1_ORCHESTRATION_PROMPT_KIND, V1_ORCHESTRATION_OPTIONS, mapOptionNumberToUserDecisionKind, mapOptionToUserDecisionKind, type V1OrchestrationOption, type V1UserDecisionKind, } from './v1-options';
@@ -1,9 +1,12 @@
1
1
  /**
2
2
  * Dispatch for the `orchestration` subcommand. Called by runAuthCli
3
- * when it sees `argv[2] === 'orchestration'`. Supports four sub-actions:
3
+ * when it sees `argv[2] === 'orchestration'`. Supports five sub-actions:
4
4
  * enable — set orchestrationEnabledDefault = true
5
5
  * disable — set orchestrationEnabledDefault = false
6
6
  * status — print current policy snapshot + installed agents
7
7
  * configure — interactive wizard (toggle + panel customization)
8
+ * setup — Phase 3.a (#190) 3-step locked setup wizard with Test
9
+ * My Agents (locked role taxonomy: architecture /
10
+ * correctness / security)
8
11
  */
9
12
  export declare function runOrchestrationCli(argv: string[]): Promise<void>;
@@ -0,0 +1,146 @@
1
+ import { AppSyncClient } from '../appsync/appsync-client.js';
2
+ import { DetectableAgent } from './detect-agents.js';
3
+ import { CountBucket, WizardEntry, WizardTier } from './setup-types.js';
4
+ import type { AgentKind } from '../reviewer/types.js';
5
+ import type { UserReviewerPolicySnapshot } from '../types/reviewer.js';
6
+ /**
7
+ * Thrown by `defaultClientFactory` when `authenticateWithStoredTokens`
8
+ * returns false AND the most recent failure kind is `'refresh_network'`
9
+ * (transient 5xx / DNS / socket-reset during the Cognito refresh-token
10
+ * POST). The wizard's `runBootstrap` catch routes this to
11
+ * `subscription_status_network` — same recourse as
12
+ * `getSubscriptionStatus` blowing up, but distinct from a genuine
13
+ * `not_signed_in` (which we still surface as `not_signed_in` so the
14
+ * user is told to re-authenticate).
15
+ *
16
+ * Stage 2 round-1 Codex M1. The error message is intentionally
17
+ * network-shaped so the existing `isNetworkLikeError(message)` regex
18
+ * also matches — defense in depth in case a future caller throws this
19
+ * outside the bootstrap path.
20
+ */
21
+ export declare class AuthRefreshNetworkError extends Error {
22
+ constructor(cause: string);
23
+ }
24
+ /**
25
+ * Successful bootstrap output. The wizard's state machine consumes
26
+ * this to seed Step 1 (seat assignment).
27
+ *
28
+ * R1/R2 round-1 finding M1+L3+M6 (resolved 2026-05-08): the
29
+ * authenticated `client` and the user's `email` are exposed here so
30
+ * the wizard can render `✓ Signed in as <email>` per design §1
31
+ * lines 47-50 and avoid double-authenticating before save.
32
+ */
33
+ export interface BootstrapResult {
34
+ tier: WizardTier;
35
+ /** Pro=2, Max=3. Free can't reach success (tier-gated above). */
36
+ seatBudget: number;
37
+ /** Lower-cased agent kinds detected on PATH, in canonical order. */
38
+ installedAgents: AgentKind[];
39
+ /** Pre-bucketed for telemetry; saved here so Step 1's emit doesn't recompute. */
40
+ installedAgentsBucket: CountBucket;
41
+ /**
42
+ * The authenticated AppSyncClient. Wizard reuses this for the save
43
+ * step rather than re-running `authenticateWithStoredTokens()` —
44
+ * eliminates the auth-evicted-between-bootstrap-and-save telemetry
45
+ * gap (R1 round-1 M1) and the wasteful double-auth (R1 round-1 L3).
46
+ */
47
+ client: AppSyncClient;
48
+ /**
49
+ * Email of the signed-in user (Cognito `email` claim), or null if
50
+ * the claim is not present. Used by the wizard's bootstrap-summary
51
+ * UI per design §1 lines 47-50.
52
+ */
53
+ userEmail: string | null;
54
+ /**
55
+ * Stage 2 round-1 Codex M2: the user's saved reviewer policy at
56
+ * bootstrap time, so the wizard can pre-populate seat-picker
57
+ * defaults on a re-run instead of always falling back to the
58
+ * tier-default agent / role priority. `null` when the snapshot
59
+ * fetch failed (the wizard then proceeds without saved-defaults —
60
+ * the canonical priority order is the fallback).
61
+ *
62
+ * Fetched via the existing `updateAvailableAgents` mutation, which
63
+ * is idempotent + already called by every plugin startup
64
+ * (`appsync-client.ts:721-724`). The wizard repeating it is safe
65
+ * and avoids introducing a new wire contract just to read three
66
+ * fields back.
67
+ */
68
+ savedPolicy: UserReviewerPolicySnapshot | null;
69
+ }
70
+ /**
71
+ * Failure shape — discriminated by `kind`. The wizard surfaces a
72
+ * user-facing message and exits with code 1; telemetry is fired by
73
+ * `runBootstrap()` before the result is returned (so callers don't
74
+ * re-fire on their failure path).
75
+ */
76
+ export type BootstrapFailure = {
77
+ kind: 'tier_gate_free';
78
+ tier: 'FREE';
79
+ } | {
80
+ kind: 'not_signed_in';
81
+ } | {
82
+ kind: 'subscription_status_network';
83
+ cause: string;
84
+ } | {
85
+ kind: 'no_clis_installed';
86
+ };
87
+ export type BootstrapOutput = {
88
+ ok: true;
89
+ result: BootstrapResult;
90
+ } | {
91
+ ok: false;
92
+ failure: BootstrapFailure;
93
+ };
94
+ /**
95
+ * Inputs for `runBootstrap`. Threads the wizard run id through so
96
+ * telemetry events stitch by `wizard_run_id`.
97
+ *
98
+ * `clientFactory` is injected so tests can swap in a mock AppSync
99
+ * client; production passes `defaultClientFactory`.
100
+ *
101
+ * `agentDetector` defaults to `detectInstalledAgents` (the production
102
+ * PATH walk) but is swappable for unit tests.
103
+ *
104
+ * `entry` is threaded in so `runBootstrap` can fire `wizard_started`
105
+ * itself — Stage 2 round-1 Codex M3 moved the emit from the wizard
106
+ * (where it skipped Free / no_clis users) into bootstrap (where it
107
+ * fires post-tier-and-agents-known, before any gate).
108
+ */
109
+ export interface BootstrapDeps {
110
+ wizardRunId: string;
111
+ clientFactory: () => Promise<AppSyncClient | null>;
112
+ agentDetector: () => DetectableAgent[];
113
+ entry: WizardEntry;
114
+ }
115
+ /**
116
+ * Production client factory. Builds an AppSyncClient and authenticates
117
+ * with stored tokens. Returns null on `'no_tokens'` /
118
+ * `'refresh_auth_rejected'` (the wizard maps both to `not_signed_in`);
119
+ * THROWS `AuthRefreshNetworkError` on `'refresh_network'` so the
120
+ * wizard's `runBootstrap` catch routes the user to
121
+ * `subscription_status_network` instead of mistakenly telling a
122
+ * signed-in user to re-login when their refresh-token POST hit a
123
+ * transient 5xx.
124
+ *
125
+ * Stage 2 round-1 Codex M1: pre-fix, `authenticateWithStoredTokens`
126
+ * returned false on every error path, including network failures
127
+ * inside `callCognitoRefresh`'s catch block; the bootstrap's
128
+ * `isNetworkLikeError` check only ran on caught throws and so never
129
+ * fired in production for refresh-network failures.
130
+ */
131
+ export declare function defaultClientFactory(): Promise<AppSyncClient | null>;
132
+ /**
133
+ * Run Step 0. Emits `wizard_step_started{step:'bootstrap'}` on entry,
134
+ * then either `wizard_step_completed` on success OR
135
+ * `wizard_step_failed` + `wizard_aborted` on failure. Returns the
136
+ * `BootstrapOutput` in either case so the caller can render UX before
137
+ * exiting.
138
+ *
139
+ * Stage 2 round-1 Codex M3: `wizard_started` is emitted from here,
140
+ * post-tier-and-agents-known, BEFORE the tier-gate / no-CLIs check.
141
+ * Free + no_clis users now fire `wizard_started` (so analytics has
142
+ * the funnel-entry numerator); auth/network bootstrap-aborts skip
143
+ * `wizard_started` (no tier known) and surface as
144
+ * `wizard_aborted{auth_expired | bootstrap_failure}` instead.
145
+ */
146
+ export declare function runBootstrap(deps: BootstrapDeps): Promise<BootstrapOutput>;
@@ -0,0 +1,23 @@
1
+ import type { PickerIO } from './setup-seat-picker.js';
2
+ export type Step2Choice = 'retry' | 'save_anyway' | 'exit';
3
+ export type Step3Choice = 'retry' | 'exit';
4
+ /**
5
+ * Render the Step 2 recourse menu after a Test My Agents failure.
6
+ * Loops on invalid input. Returns the user's choice. The caller is
7
+ * responsible for emitting `wizard_aborted` if `exit` is chosen.
8
+ *
9
+ * `canSaveAnyway` controls whether the `[s]` option is offered. When
10
+ * false (spawn_failure / timeout), only `[r]` and `[x]` are accepted.
11
+ */
12
+ export declare function askStep2Recourse(io: PickerIO, canSaveAnyway: boolean): Promise<Step2Choice>;
13
+ /**
14
+ * Render the Step 3 recourse menu after a save failure. The caller's
15
+ * retry loop preserves the in-memory `seats` state so retry is free.
16
+ *
17
+ * `recoverable` honors the §6 outcome table: when false
18
+ * (auth_token_expired), `[r]` is suppressed because retry can only
19
+ * fail again — the user must re-run `codevibe login` and start a new
20
+ * wizard. The recourse menu collapses to a single `[x] exit` choice
21
+ * with a re-auth instruction line. (R1 round-1 M3 / R2 round-1 M4.)
22
+ */
23
+ export declare function askStep3Recourse(io: PickerIO, recoverable?: boolean): Promise<Step3Choice>;
@@ -0,0 +1,47 @@
1
+ import type { AppSyncClient } from '../appsync/appsync-client.js';
2
+ import { WizardSeatPick, WizardStepFailureReason } from './setup-types.js';
3
+ export type SaveResult = {
4
+ ok: true;
5
+ } | {
6
+ ok: false;
7
+ reason: WizardStepFailureReason;
8
+ /**
9
+ * Whether `[r] retry` makes sense for this failure. Network /
10
+ * 5xx / throttle are retryable (transient). auth_token_expired
11
+ * is NOT retryable in-process — the user must re-run `codevibe
12
+ * login` and start a new wizard run.
13
+ */
14
+ recoverable: boolean;
15
+ };
16
+ export interface SaveDeps {
17
+ wizardRunId: string;
18
+ client: AppSyncClient;
19
+ seats: WizardSeatPick[];
20
+ /**
21
+ * Whether the user reached this step via "save anyway" after a
22
+ * Test My Agents warning. Drives the wizard_completed.outcome
23
+ * value at the wizard's terminal exit (`'ok' | 'saved_after_test_warning'`).
24
+ * Not used here — Step 3 just persists; the top-level wizard
25
+ * threads the outcome value into the final `wizard_completed` event.
26
+ */
27
+ savedAfterTestWarning: boolean;
28
+ }
29
+ /**
30
+ * Run Step 3. Emits `wizard_step_started{step:'save'}` on entry,
31
+ * `wizard_step_completed` on success, or `wizard_step_failed` with
32
+ * the classified reason. Returns a SaveResult the wizard's recourse
33
+ * loop consumes.
34
+ */
35
+ export declare function runSave(deps: SaveDeps): Promise<SaveResult>;
36
+ /**
37
+ * Classify a thrown error from `updateReviewerPolicy` into one of the
38
+ * §7 save-step reason codes. Best-effort matching against the AppSync
39
+ * client's error message conventions:
40
+ * - 401 / "Unauthorized" / "Token expired" → auth_token_expired
41
+ * - 429 / "Throttling" / "Rate exceeded" → update_policy_throttle
42
+ * - 5xx / "Internal" / "InternalServerError" → update_policy_5xx
43
+ * - everything else (fetch threw, ECONNRESET, DNS) → update_policy_network
44
+ *
45
+ * Exposed for tests to assert classification mapping.
46
+ */
47
+ export declare function classifySaveError(err: unknown): WizardStepFailureReason;
@@ -0,0 +1,72 @@
1
+ import * as readline from 'readline';
2
+ import { WizardSeatPick, WizardRole } from './setup-types.js';
3
+ import type { AgentKind } from '../reviewer/types.js';
4
+ /**
5
+ * One entry in the optional `savedSeats` array — the user's previously
6
+ * persisted reviewer policy, threaded in by the wizard on a re-run so
7
+ * the picker pre-fills per-seat agent + role defaults. Stage 2 round-1
8
+ * Codex M2.
9
+ *
10
+ * Stale entries (agent no longer installed, role not in
11
+ * `WIZARD_ROLES`, role already taken by a previous seat) are silently
12
+ * ignored — the picker falls back to the canonical priority defaults
13
+ * for that seat.
14
+ */
15
+ export interface SavedSeatHint {
16
+ seatId: number;
17
+ agent: AgentKind;
18
+ role: WizardRole;
19
+ }
20
+ /**
21
+ * Reader/writer abstraction so tests can drive the picker with
22
+ * scripted answers instead of an interactive readline. Production
23
+ * passes a Node readline.Interface; tests pass a fake.
24
+ */
25
+ export interface PickerIO {
26
+ /** Render a line to the user. No newline appended; pass '\n' if needed. */
27
+ write: (line: string) => void;
28
+ /** Prompt the user and return the trimmed answer (without trailing newline). */
29
+ ask: (prompt: string) => Promise<string>;
30
+ }
31
+ export interface SeatPickerDeps {
32
+ wizardRunId: string;
33
+ installedAgents: AgentKind[];
34
+ seatBudget: number;
35
+ io: PickerIO;
36
+ /**
37
+ * Optional per-seat hints from the user's saved reviewer policy
38
+ * (Stage 2 round-1 Codex M2). When present and valid (agent
39
+ * installed; role still available for that seat), the picker uses
40
+ * the hint as the default instead of the canonical
41
+ * AGENT_PRIORITY / DEFAULT_ROLE_BY_SEAT priority.
42
+ *
43
+ * Indexed by `seatId` (NOT array position) — the implementation
44
+ * looks up `savedSeats.find(s => s.seatId === seatId)` so absent /
45
+ * out-of-order entries are fine.
46
+ */
47
+ savedSeats?: ReadonlyArray<SavedSeatHint>;
48
+ }
49
+ /**
50
+ * Run Step 1. Returns the user's per-seat picks. Caller is
51
+ * responsible for closing the readline interface.
52
+ */
53
+ export declare function runSeatPicker(deps: SeatPickerDeps): Promise<WizardSeatPick[]>;
54
+ /**
55
+ * Default-role-fallback rule (PHASE-3-A-DESIGN.md §1). Seat 0 wants
56
+ * `architecture`, Seat 1 wants `correctness`, Seat 2 wants `security`.
57
+ * If the canonical pick is gone (taken by a previous seat), fall
58
+ * back to the first remaining role in canonical order.
59
+ *
60
+ * Stage 2 round-1 Codex M2: when `savedRole` is provided AND that
61
+ * role is in `WIZARD_ROLES` AND it's still in `availableRoles` (not
62
+ * taken by a previous seat), use it as the default instead of the
63
+ * canonical-default-by-seat priority. Stale saved values (role
64
+ * already taken, or a non-3-role value from a 2.0.x custom-roles
65
+ * future expansion) are silently ignored.
66
+ */
67
+ export declare function pickDefaultRole(seatId: number, availableRoles: ReadonlyArray<WizardRole>, savedRole?: WizardRole): WizardRole;
68
+ /**
69
+ * Build a `PickerIO` from a Node readline interface. Production
70
+ * callers use this; tests construct their own `PickerIO` directly.
71
+ */
72
+ export declare function readlinePickerIO(rl: readline.Interface): PickerIO;
@@ -0,0 +1,54 @@
1
+ import type { WizardStep, WizardStepFailureReason, WizardAbortReason, WizardEntry, WizardTier, CountBucket, LatencyBucket } from './setup-types.js';
2
+ /**
3
+ * Generate a fresh `wizard_run_id` for one wizard invocation. Returned
4
+ * by `runSetupWizard()` entry and threaded into every emit call.
5
+ *
6
+ * v4 UUID — uses Node's crypto.randomUUID when available (Node 14.17+);
7
+ * otherwise falls back to a manual v4 derivation. Either path produces
8
+ * a 36-char hex-with-dashes string suitable for the GA4 custom-dimension
9
+ * `wizard_run_id` registered in `register-custom-dimensions.py`.
10
+ */
11
+ export declare function newWizardRunId(): string;
12
+ export declare function emitWizardStarted(args: {
13
+ wizardRunId: string;
14
+ tier: WizardTier;
15
+ entry: WizardEntry;
16
+ installedAgentsBucket: CountBucket;
17
+ }): Promise<void>;
18
+ export declare function emitWizardStepStarted(args: {
19
+ wizardRunId: string;
20
+ step: WizardStep;
21
+ }): Promise<void>;
22
+ export declare function emitWizardStepCompleted(args: {
23
+ wizardRunId: string;
24
+ step: WizardStep;
25
+ latencyBucket: LatencyBucket;
26
+ }): Promise<void>;
27
+ export declare function emitWizardStepFailed(args: {
28
+ wizardRunId: string;
29
+ step: WizardStep;
30
+ reason: WizardStepFailureReason;
31
+ latencyBucket: LatencyBucket;
32
+ }): Promise<void>;
33
+ export declare function emitWizardCompleted(args: {
34
+ wizardRunId: string;
35
+ outcome: 'ok' | 'saved_after_test_warning';
36
+ tier: WizardTier;
37
+ seatsBucket: CountBucket;
38
+ agentsDistinctBucket: CountBucket;
39
+ rolesDistinctBucket: CountBucket;
40
+ totalLatencyBucket: LatencyBucket;
41
+ }): Promise<void>;
42
+ export declare function emitWizardAborted(args: {
43
+ wizardRunId: string;
44
+ reason: WizardAbortReason;
45
+ lastStep: WizardStep;
46
+ }): Promise<void>;
47
+ type BeaconRecord = {
48
+ name: string;
49
+ params: Record<string, string | number>;
50
+ };
51
+ type BeaconSink = (record: BeaconRecord) => void;
52
+ export declare function __setBeaconSink(sink: BeaconSink): void;
53
+ export declare function __resetBeaconSink(): void;
54
+ export {};