@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,28 @@
1
+ /** Exposed for the single log line in createEvent. */
2
+ export declare const CLIENT_THROTTLE_EVENTS_PER_WINDOW: number;
3
+ interface RateWindow {
4
+ windowStartMs: number;
5
+ count: number;
6
+ toolUseAboveThreshold: number;
7
+ suppressed: number;
8
+ logged: boolean;
9
+ }
10
+ /**
11
+ * Decide whether this outbound event should be suppressed (not sent).
12
+ * Deterministic given (sessionId, type, now) and prior counter state.
13
+ * Exported for unit tests; resetThrottleState() clears the module map.
14
+ */
15
+ export declare function shouldSuppressEvent(sessionId: string, type: string, now: number): boolean;
16
+ /**
17
+ * Returns the session's rate window exactly once per window — the first time the
18
+ * throttle engages — for a single log line; later calls in the same window
19
+ * return undefined. Keeps logging out of the hot path.
20
+ */
21
+ export declare function consumeThrottleLogOnce(sessionId: string): RateWindow | undefined;
22
+ /** Test-only: clears the per-process rate map. */
23
+ export declare function resetThrottleState(): void;
24
+ /** Test-only: current size of the per-process rate map (eviction-bound check). */
25
+ export declare function throttleMapSize(): number;
26
+ /** Test-only: whether a session is currently tracked (eviction assertions). */
27
+ export declare function throttleMapHas(sessionId: string): boolean;
28
+ export {};
@@ -1,2 +1,5 @@
1
- export { AppSyncClient, DownloadUrlResponse } from './appsync-client';
1
+ export { AppSyncClient, AppSyncGraphQLError, DownloadUrlResponse } from './appsync-client';
2
+ export { coerceAwsJsonObject } from './appsync-client';
3
+ export type { ClassBPacketEnvelopeMeta } from './appsync-client';
4
+ export type { TaskReviewSummary, TaskReviewSummaryRound, TaskReviewSummaryReviewer, TaskGroupStatusResult, } from './appsync-client';
2
5
  export { queries, mutations, subscriptions } from './queries';
@@ -2,6 +2,25 @@ export declare const queries: {
2
2
  getSession: string;
3
3
  listEvents: string;
4
4
  listUserDeviceKeys: string;
5
+ listServiceDeviceKeys: string;
6
+ /**
7
+ * Minimal session listing used by the orphan-sweep path. Only the
8
+ * fields needed to decide whether a session row is stale — sessionId
9
+ * for the INACTIVE mutation, agentType for the per-plugin filter,
10
+ * status to skip non-ACTIVE rows, and lastHeartbeatAt for the age
11
+ * check.
12
+ */
13
+ listSessions: string;
14
+ getSubscriptionStatus: string;
15
+ queryAudit: string;
16
+ verifyContinuationPacketWritten: string;
17
+ getReviewerPrompt: string;
18
+ getClassBSigningPublicKey: string;
19
+ getInReviewAssignments: string;
20
+ getTaskGroupTracks: string;
21
+ getInFlightTeamTracks: string;
22
+ getTaskGroupStatus: string;
23
+ getTaskReviewSummary: string;
5
24
  };
6
25
  export declare const mutations: {
7
26
  createSession: string;
@@ -12,9 +31,24 @@ export declare const mutations: {
12
31
  grantSessionKey: string;
13
32
  getAttachmentDownloadUrl: string;
14
33
  updateAvailableAgents: string;
34
+ updateAdapterCapabilities: string;
15
35
  updateReviewerPolicy: string;
36
+ classifyPlannerPrompt: string;
37
+ pingPlanner: string;
38
+ applyUserDecision: string;
39
+ recordContinuationPacketWritten: string;
40
+ createTaskGroup: string;
41
+ submitMergeGateVerdict: string;
42
+ submitTrackVerificationOutcome: string;
43
+ claimGroupDecision: string;
44
+ startTask: string;
45
+ submitImplementorOutput: string;
46
+ submitReviewerVerdict: string;
16
47
  };
17
48
  export declare const subscriptions: {
18
49
  onEventCreated: string;
19
50
  onDeviceKeyRegistered: string;
51
+ onSessionUpdated: string;
52
+ onClassBPacket: string;
53
+ onApplyUserDecision: string;
20
54
  };
@@ -39,3 +39,35 @@ export declare function dedupKeyForDestructiveActionEscalated(gateId: Uuid, acti
39
39
  * passed alongside).
40
40
  */
41
41
  export declare function dedupKeyForFlagBadApproval(flaggedEntryId: Uuid): string;
42
+ /**
43
+ * `ModelCall` (CP-7 §3.5) — pre-forward strict audit row.
44
+ * Identity: `(task_id, "model_call", model_call_id)`.
45
+ */
46
+ export declare function dedupKeyForModelCall(taskId: Uuid, modelCallId: string): string;
47
+ /**
48
+ * `ModelCallResult` (CP-7 §3.5) — post-response enrichment row.
49
+ * Identity: `(task_id, "model_call_result", model_call_id)`. Shares the
50
+ * `model_call_id` FK with its pre-forward {@link dedupKeyForModelCall}
51
+ * row; framing keeps the two rows on DISTINCT keys despite the prefix
52
+ * overlap.
53
+ */
54
+ export declare function dedupKeyForModelCallResult(taskId: Uuid, modelCallId: string): string;
55
+ /**
56
+ * `EgressDenied` (CP-7 §3.5) — egress-proxy deny row.
57
+ * Identity: `(task_id, "egress_denied", caller_event_id)`.
58
+ */
59
+ export declare function dedupKeyForEgressDenied(taskId: Uuid, callerEventId: string): string;
60
+ /**
61
+ * `ModelContextScrubbed` (CP-7 §3.5) — I2 scrub row.
62
+ * Identity: `(task_id, "model_context_scrubbed", model_call_id, field,
63
+ * pattern_class)`. `field` is a canonical JSONPath; `patternClass` lets
64
+ * one field tripping two heuristics record both. This multi-string
65
+ * identity is exactly what the legacy unframed concatenation could not
66
+ * encode injectively.
67
+ */
68
+ export declare function dedupKeyForModelContextScrubbed(taskId: Uuid, modelCallId: string, field: string, patternClass: string): string;
69
+ /**
70
+ * `BrokerCredentialLoaded` (CP-7 §3.5) — keychain vendor-key load row.
71
+ * Identity: `(task_id, "broker_credential_loaded", credential_issuance_id)`.
72
+ */
73
+ export declare function dedupKeyForBrokerCredentialLoaded(taskId: Uuid, credentialIssuanceId: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,28 @@
1
+ import * as http from 'http';
1
2
  import { TokenData } from '../types';
3
+ export declare const PRIMARY_PORT = 8080;
4
+ export declare const PORT_RANGE_SIZE = 20;
5
+ /**
6
+ * Bind an HTTP server to the first available port in
7
+ * PRIMARY_PORT..PRIMARY_PORT+PORT_RANGE_SIZE-1.
8
+ *
9
+ * Retries at the `.listen()` level (no separate probe) to avoid TOCTOU races.
10
+ * Installs a persistent post-bind error listener to prevent process crash on
11
+ * later server errors (e.g., EMFILE during connection accept).
12
+ *
13
+ * @param handler - the request handler
14
+ * @returns { server, port } once the server is successfully listening
15
+ * @throws Error with code='EADDRINUSE_ALL' if ALL ports in range are in use
16
+ * @throws Original error if a non-EADDRINUSE error fires (EACCES, etc.)
17
+ *
18
+ * Callers MUST wrap this in try/catch to fire the appropriate auth-failure
19
+ * beacon BEFORE rejecting — otherwise the outer auth-cli fallback downgrades
20
+ * the failure to `unknown` and we lose port_range_exhausted telemetry.
21
+ */
22
+ export declare function bindOAuthServer(handler: http.RequestListener): Promise<{
23
+ server: http.Server;
24
+ port: number;
25
+ }>;
2
26
  /**
3
27
  * Authentication service for OAuth flows
4
28
  */
@@ -51,11 +75,17 @@ export declare class AuthService {
51
75
  */
52
76
  private generateState;
53
77
  /**
54
- * Build authorization URL
78
+ * Build authorization URL with dynamic redirect_uri (port-range fix).
55
79
  */
56
80
  private buildAuthUrl;
57
81
  /**
58
- * Exchange authorization code for tokens
82
+ * Exchange authorization code for tokens.
83
+ *
84
+ * `redirectUri` MUST match the one passed to buildAuthUrl earlier — Cognito
85
+ * compares them at the token endpoint and rejects mismatches. This is the
86
+ * load-bearing change for the port-range fix to work end-to-end: if the
87
+ * authorize URL used port 8081 and the token POST uses 8080, Cognito
88
+ * returns redirect_uri_mismatch.
59
89
  */
60
90
  private exchangeCodeForTokens;
61
91
  /**
@@ -1,16 +1,20 @@
1
1
  /**
2
2
  * Typed taxonomy of auth-flow failure reasons.
3
3
  *
4
- * Every value is a sanitized enum literal — never a raw error message,
5
- * never a truncated user input, never any byte from Cognito's response.
6
- * Adding a new failure mode means extending this union; the compiler
7
- * then forces every emit site to either use a known value or produce
8
- * a type error.
4
+ * Every value in THIS union is a sanitized enum literal — never a raw
5
+ * error message, never a truncated user input, never any byte from
6
+ * Cognito's response. Adding a new failure mode means extending this
7
+ * union; the compiler then forces every emit site to either use a known
8
+ * value or produce a type error.
9
+ *
10
+ * (Note: the `error_fragment` parameter on the auth_failed beacon DOES
11
+ * carry redacted error material — see `sanitizeAuthErrorFragment`. The
12
+ * `reason` taxonomy below remains the analytics-safe primary key.)
9
13
  *
10
14
  * Keep values snake_case to match GA4 custom-dimension conventions
11
15
  * used elsewhere in the codebase (`step`, `source`, `reason`).
12
16
  */
13
- export type AuthFailureReason = 'port_in_use' | 'server_listen_failed' | 'browser_open_failed' | 'login_timeout' | 'cognito_rejected' | 'state_mismatch' | 'no_authorization_code' | 'token_exchange_failed' | 'token_exchange_network_error' | 'keychain_write_failed' | 'user_aborted' | 'unknown';
17
+ export type AuthFailureReason = 'port_in_use' | 'port_range_exhausted' | 'server_listen_failed' | 'browser_open_failed' | 'login_timeout' | 'cognito_rejected' | 'state_mismatch' | 'no_authorization_code' | 'token_exchange_failed' | 'token_exchange_network_error' | 'keychain_write_failed' | 'user_aborted' | 'unknown';
14
18
  /**
15
19
  * Auth flow stage the failure occurred in. Useful for GA4 faceting;
16
20
  * each reason has an implicit stage but keeping it as a distinct
@@ -29,6 +33,20 @@ export type AuthStage = 'server_start' | 'browser_open' | 'awaiting_callback' |
29
33
  * address.
30
34
  */
31
35
  export declare function fireAuthCompletedBeacon(userId: string): Promise<void>;
36
+ /**
37
+ * Bytes 0-99 of the sanitized fragment (GA4 dim: error_fragment).
38
+ * See `sanitizeAuthErrorFragmentFull` for the redaction contract.
39
+ */
40
+ export declare function sanitizeAuthErrorFragment(msg: string): string;
41
+ /**
42
+ * Bytes 100-199 of the sanitized fragment (GA4 dim: error_fragment_2).
43
+ * Returns empty string when the redacted message is ≤100 chars (the
44
+ * typical short-error case), which is what we want — no
45
+ * `error_fragment_2` param fires unless there's something past byte
46
+ * 100 worth carrying. Works around GA4 Measurement Protocol's 100-char
47
+ * per-param limit.
48
+ */
49
+ export declare function sanitizeAuthErrorFragmentTail(msg: string): string;
32
50
  /**
33
51
  * Fire the `auth_failed` failure beacon with a sanitized `reason`
34
52
  * literal. Optional `httpStatus` captures the numeric HTTP status
@@ -40,11 +58,48 @@ export declare function fireAuthCompletedBeacon(userId: string): Promise<void>;
40
58
  * `reason` is constrained to the `AuthFailureReason` union — this
41
59
  * is the ONLY input path; passing a raw error message is a compile
42
60
  * error.
61
+ *
62
+ * Optional `errorFragment` is a diagnostic dimension reserved for
63
+ * `reason: 'unknown'`. The outer `auth-cli` catch passes the first
64
+ * portion of `error.message` here so the next analytics pass can
65
+ * see what's hiding in `unknown` and we can ship a typed reason in
66
+ * a follow-up. Sanitized inside via `sanitizeAuthErrorFragment` (head)
67
+ * + `sanitizeAuthErrorFragmentTail` (tail) — ANSI stripped, $HOME /
68
+ * USERPROFILE / `/Users/<name>/` / `/home/<name>/` / email substrings
69
+ * redacted (Windows backslashes normalized first so `C:\Users\Alice\…`
70
+ * matches the same path regex as POSIX form), control + non-ASCII
71
+ * bytes dropped, then split into two GA4 dimensions to work around the
72
+ * Measurement Protocol 100-char per-param limit:
73
+ * - `error_fragment` = bytes 0-99
74
+ * - `error_fragment_2` = bytes 100-199 (only set when input >100 chars)
75
+ * Reports concatenate both dims for display. Mirrors the install.sh
76
+ * `sanitize_fragment` / `sanitize_fragment_tail` shell helpers so
77
+ * fragments fired from either path follow the same redaction +
78
+ * slicing contract.
43
79
  */
44
80
  export declare function fireAuthFailedBeacon(reason: AuthFailureReason, extra?: {
45
81
  httpStatus?: number;
46
82
  stage?: AuthStage;
83
+ errorFragment?: string;
47
84
  }): Promise<void>;
85
+ /**
86
+ * Coarse reason a machine fell back to file-based credential storage.
87
+ * - `no_keyring_service`: keytar's native addon LOADED but there's no OS
88
+ * keyring service to talk to (structurally-headless Linux — no D-Bus session).
89
+ * - `keytar_load_failed`: keytar's native addon failed to load AND the machine
90
+ * is structurally headless (libsecret absent on a no-keyring box).
91
+ */
92
+ export type KeychainFallbackReason = 'no_keyring_service' | 'keytar_load_failed';
93
+ /**
94
+ * Fire the `keychain_file_fallback` beacon when keychain-backend auto-selects
95
+ * the file backend on a structurally-headless machine. Deliberately a DISTINCT
96
+ * event from `auth_failed` — this is a successful, working fallback, not a
97
+ * failure. Lets analytics see the headless cohort and confirm the headless fix
98
+ * is reaching the field (the old `keychain_write_failed` signal goes quiet for
99
+ * these users, so we need a positive beacon, not just an absence). No PII: only
100
+ * platform / source / the coarse reason literal.
101
+ */
102
+ export declare function fireKeychainFileFallbackBeacon(reason: KeychainFallbackReason): Promise<void>;
48
103
  /**
49
104
  * Attach the reason + beaconed marker to an Error. Non-enumerable so
50
105
  * the symbols don't serialize if the error object is ever JSON'd.
@@ -54,3 +109,59 @@ export declare function markErrorBeaconed(err: Error, reason: AuthFailureReason)
54
109
  export declare function errorWasBeaconed(err: unknown): boolean;
55
110
  /** Retrieve the tagged reason from a previously-marked error, if any. */
56
111
  export declare function getErrorReason(err: unknown): AuthFailureReason | undefined;
112
+ export type DeviceCountBucket = '0' | '1' | '2-5' | '6+';
113
+ /**
114
+ * Bucket a raw device count into a coarse range to prevent device-count
115
+ * fingerprinting via GA4 client_id stickiness. The `'0'` bucket exists as
116
+ * a safe default for callers that may pass 0; no current emitter actually
117
+ * fires with count 0 in production paths.
118
+ */
119
+ export declare function bucketDeviceCount(count: number): DeviceCountBucket;
120
+ /**
121
+ * SHA-256-truncate a sessionId for cross-beacon correlation without leaking
122
+ * the raw UUID. 8 hex chars = 32 bits ⇒ no practical reverse lookup absent
123
+ * a GA4 + DDB join.
124
+ */
125
+ export declare function hashSessionId(sessionId: string): string;
126
+ /**
127
+ * Bug B per-device: fired inside `createSessionKey`'s per-device catch.
128
+ * `session_hash` is optional because keychain-manager intentionally does
129
+ * not know which session is being keyed — the per-session aggregate in
130
+ * `fireSessionEncryptionPartialSuccessBeacon` provides the correlation.
131
+ */
132
+ export declare function fireSessionEncryptionDeviceSkippedBeacon(params: {
133
+ skipped_count_bucket: DeviceCountBucket;
134
+ session_hash?: string;
135
+ }): Promise<void>;
136
+ /**
137
+ * Bug B per-session: fired once per session creation when at least one
138
+ * device was skipped. Caller MUST gate on `skippedDeviceIds.length > 0`.
139
+ */
140
+ export declare function fireSessionEncryptionPartialSuccessBeacon(params: {
141
+ session_hash: string;
142
+ encrypted_count_bucket: DeviceCountBucket;
143
+ skipped_count_bucket: DeviceCountBucket;
144
+ }): Promise<void>;
145
+ /**
146
+ * Bug A2: fired when `rekeySessionForNewDevices` grants ≥1 device on resume.
147
+ * Caller MUST gate on `grantedCount > 0`.
148
+ */
149
+ export declare function fireSessionEncryptionCatchUpGrantBeacon(params: {
150
+ session_hash: string;
151
+ granted_count_bucket: DeviceCountBucket;
152
+ }): Promise<void>;
153
+ /** Bug A1: fired when we enter the self-rekey path (our deviceId missing). */
154
+ export declare function fireSessionEncryptionSelfRekeyRequestBeacon(params: {
155
+ session_hash: string;
156
+ other_device_count_bucket: DeviceCountBucket;
157
+ }): Promise<void>;
158
+ /** Bug A1: fired when polling resolves with our entry + decrypt succeeds. */
159
+ export declare function fireSessionEncryptionSelfRekeySuccessBeacon(params: {
160
+ session_hash: string;
161
+ attempt_count: number;
162
+ }): Promise<void>;
163
+ /** Bug A1: fired when polling exhausts maxAttempts without our entry. */
164
+ export declare function fireSessionEncryptionSelfRekeyTimeoutBeacon(params: {
165
+ session_hash: string;
166
+ attempt_count: number;
167
+ }): Promise<void>;
@@ -1,3 +1,4 @@
1
1
  export { AuthService, authService } from './auth-service';
2
+ export { bindOAuthServer, PRIMARY_PORT, PORT_RANGE_SIZE } from './auth-service';
2
3
  export { runAuthCli } from './auth-cli';
3
4
  export { fireAuthCompletedBeacon, fireAuthFailedBeacon, markErrorBeaconed, errorWasBeaconed, getErrorReason, type AuthFailureReason, type AuthStage, } from './auth-telemetry';
@@ -0,0 +1,9 @@
1
+ import { DetectedAgent } from './resolve-agent';
2
+ export interface PickAgentArgs {
3
+ healthy: DetectedAgent[];
4
+ defaultIndex: number;
5
+ /** Test seam — override stdin/stdout. */
6
+ input?: NodeJS.ReadableStream;
7
+ output?: NodeJS.WritableStream;
8
+ }
9
+ export declare function pickAgent(args: PickAgentArgs): Promise<DetectedAgent>;
@@ -0,0 +1,55 @@
1
+ import { DetectableAgent } from '../orchestration/detect-agents';
2
+ import type { ShellEventEmit } from '../orchestration-shell/emit-shell-event';
3
+ import type { Session } from '../types';
4
+ export declare class NoAgentInstalledError extends Error {
5
+ constructor(message: string);
6
+ }
7
+ export interface CompanionArgs {
8
+ /** Optional `--agent <kind>` CLI override. */
9
+ agent?: DetectableAgent;
10
+ /** Args to pass through to the agent wrapper. */
11
+ passthrough: string[];
12
+ /** When set, clears the persisted preference before resolving. */
13
+ forgetAgent?: boolean;
14
+ /**
15
+ * Session context for §3 emitShellEvent fan-out. When provided
16
+ * together with `emitter`, MODE_SELECTED is emitted before the exec
17
+ * handoff. When either is omitted, the emit is skipped — Companion
18
+ * Mode is functional without it because the cohort flag gates every
19
+ * emit anyway (CP-1.a default OFF). Per Stage 1 r1 HIGH-3.
20
+ */
21
+ session?: Session;
22
+ /**
23
+ * Bound emitter (typically `createShellEventEmitter(appsyncClient)`).
24
+ * Required for the MODE_SELECTED emit when `session` is also set.
25
+ */
26
+ emitter?: (args: ShellEventEmit) => Promise<void>;
27
+ /** Test seam — override the `execFileSync` handoff. */
28
+ execFile?: (binPath: string, args: string[], options: {
29
+ stdio: 'inherit';
30
+ }) => void;
31
+ /** Test seam — override `detectInstalledAgents`. */
32
+ detect?: () => DetectableAgent[];
33
+ /** Test seam — override bin-path resolver (real impl uses `command -v`). */
34
+ resolveBinPath?: (kind: DetectableAgent) => string | null;
35
+ /**
36
+ * Test seam — override the `<wrapper> --version` 2s health-probe
37
+ * (§4 line 280). Real impl spawns the wrapper with a SIGKILL on
38
+ * timeout. Per Stage 2 r1 Codex MEDIUM-2.
39
+ */
40
+ versionProbe?: (binPath: string) => Promise<boolean>;
41
+ }
42
+ /**
43
+ * §4 LOCK lines 232-273. Detect → resolve → persist → exec.
44
+ *
45
+ * On a TTY with multiple agents, this calls `pickAgent` for the
46
+ * interactive readline picker. The function does NOT mount the Ink
47
+ * TUI — Companion Mode does not need it (the picker hands terminal
48
+ * control directly to the wrapper).
49
+ *
50
+ * NOTE: the function returns when the test seam `execFile` is
51
+ * provided; in production the `execFileSync` call replaces the process
52
+ * (`stdio: 'inherit'`) so `process.exit(0)` is unreachable but kept
53
+ * as a defensive fallback (§4 line 273).
54
+ */
55
+ export declare function runCompanionMode(args: CompanionArgs): Promise<void>;
@@ -0,0 +1,24 @@
1
+ export declare function companionPreferenceFilePath(): string;
2
+ export interface CompanionPreference {
3
+ lastAgent: 'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY';
4
+ lastUsedAt: string;
5
+ }
6
+ /**
7
+ * §4 lines 304-316 LOCK. Reads + validates the preference file.
8
+ * Returns `null` on every failure mode named in the design:
9
+ * - file missing
10
+ * - loose permissions (any group/world bits set)
11
+ * - malformed JSON
12
+ * - schema mismatch
13
+ */
14
+ export declare function readCompanionPreference(): Promise<CompanionPreference | null>;
15
+ /**
16
+ * Writes the preference file with mode 0600. Creates parent dir if
17
+ * missing. Self-heals loose perms (writes 0o600 explicitly on every
18
+ * write).
19
+ */
20
+ export declare function persistCompanionPreference(pref: CompanionPreference): Promise<void>;
21
+ /**
22
+ * Clears the preference file (used by `--forget-agent` flag per §4).
23
+ */
24
+ export declare function clearCompanionPreference(): Promise<void>;
@@ -0,0 +1,41 @@
1
+ import { DetectableAgent } from '../orchestration/detect-agents';
2
+ export interface DetectedAgent {
3
+ kind: DetectableAgent;
4
+ binPath: string;
5
+ healthy: boolean;
6
+ }
7
+ export interface ResolveAgentArgs {
8
+ /** Healthy agents detected on PATH. */
9
+ healthy: DetectedAgent[];
10
+ /** `--agent` CLI flag override (if any). */
11
+ flag?: DetectableAgent;
12
+ /** Persisted preference from `readCompanionPreference()` (if any). */
13
+ preferred?: DetectableAgent;
14
+ }
15
+ export interface ResolveAgentResult {
16
+ /** When a single resolved agent exists. */
17
+ agent?: DetectedAgent;
18
+ /** When multiple healthy agents exist and the picker should run. */
19
+ needsPicker?: {
20
+ healthy: DetectedAgent[];
21
+ defaultIndex: number;
22
+ };
23
+ /** When the flag asked for an agent that's not healthy. */
24
+ flagMissing?: {
25
+ requested: DetectableAgent;
26
+ };
27
+ }
28
+ /**
29
+ * §4 resolution order LOCK:
30
+ * 1. flag > preference > picker > single-agent fast-path
31
+ *
32
+ * - If `flag` is set and a matching healthy agent exists → return it.
33
+ * - If `flag` is set and no matching healthy agent → `flagMissing`.
34
+ * - Single-agent fast-path: exactly 1 healthy agent → return it
35
+ * (regardless of preference).
36
+ * - Multiple healthy + `preferred` set + matches → picker with that
37
+ * row pre-selected (caller may decide to auto-accept).
38
+ * - Multiple healthy + no preference → picker with first row
39
+ * pre-selected.
40
+ */
41
+ export declare function resolveAgent(args: ResolveAgentArgs): ResolveAgentResult;
@@ -1,7 +1,14 @@
1
1
  /**
2
2
  * Environment type
3
+ *
4
+ * 'experiment' is a separate AWS environment for CodeVibe 2.0 testing —
5
+ * isolated DDB/Cognito/AppSync/Lambda stacks in us-east-1, manual-deploy
6
+ * only (NOT in the codevibe-backend pipeline). Plugins/mobile clients
7
+ * opt in by setting `ENVIRONMENT=experiment`. See
8
+ * `codevibe-backend/docs/2.0/PHASE-INFRA-EXPERIMENT-ENV-DESIGN.md`
9
+ * LOCK #IE-5.
3
10
  */
4
- export type Environment = 'development' | 'production';
11
+ export type Environment = 'development' | 'production' | 'experiment';
5
12
  /**
6
13
  * Configuration interface
7
14
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,46 @@
1
+ import type { AuthorityScope } from '../local-executor/authority';
2
+ import type { RepoState } from './types';
3
+ export interface KnownRepo {
4
+ /** repo basename (e.g., `codevibe-backend`). */
5
+ repo: string;
6
+ /** absolute filesystem path of repo root. */
7
+ path: string;
8
+ }
9
+ export interface GitExecOptions {
10
+ /** `cwd` for the git invocation. */
11
+ cwd: string;
12
+ /** Wall-clock timeout in milliseconds. */
13
+ timeoutMs?: number;
14
+ }
15
+ export type GitExecFn = (args: string[], options: GitExecOptions) => Promise<string>;
16
+ /**
17
+ * Default `git` executor. Honors `cwd` + timeout, scrubs the env.
18
+ * Returns stdout as utf8. Throws on non-zero exit / timeout / spawn
19
+ * failure — caller catches and emits the `"unknown"` sentinel row.
20
+ */
21
+ export declare const defaultGitExec: GitExecFn;
22
+ export interface DirtyStateCollector {
23
+ collect(): Promise<RepoState[]>;
24
+ }
25
+ export interface DirtyStateCollectorOptions {
26
+ gitExec?: GitExecFn;
27
+ timeoutMs?: number;
28
+ }
29
+ /**
30
+ * §4.7 LOCK #C6-A-7 — enumerate `knownRepos`, clamp to authority,
31
+ * collect git metadata for each in-scope repo. Sentinel-friendly:
32
+ * missing git, non-git dirs, and timeouts each produce a row with
33
+ * `"unknown"` strings instead of throwing.
34
+ */
35
+ export declare function collectRepoStates(authority: AuthorityScope, knownRepos: KnownRepo[], options?: DirtyStateCollectorOptions): Promise<RepoState[]>;
36
+ /**
37
+ * Factory that produces a `DirtyStateCollector` bound to a known-repo
38
+ * snapshot + authority scope. Used by `createContinuationPacketWriter`
39
+ * to inject the collector as a dependency (test seam).
40
+ */
41
+ export declare function createDirtyStateCollector(deps: {
42
+ authority: AuthorityScope;
43
+ knownRepos: KnownRepo[];
44
+ gitExec?: GitExecFn;
45
+ timeoutMs?: number;
46
+ }): DirtyStateCollector;
@@ -0,0 +1,8 @@
1
+ export type { AgentKind, HandoffReason, GateState, RepoState, ContinuationPacket, PacketWriteInput, PacketWriteResult, PacketListEntry, ContinuationPacketReadResult, } from './types';
2
+ export { PacketFidelityError, PacketIoError, PacketHashMismatch, PacketAuditEmitError, PacketNotFound, PacketUnverified, FrontmatterMalformed, SchemaInvalid, PacketPermissionsLoose, } from './types';
3
+ export { createContinuationPacketWriter, buildContinuationPacket, computePacketHash, renderPacketMarkdown, getPacketFilePath, getTaskDirectoryPath, } from './packet-writer';
4
+ export type { ContinuationPacketWriter, ContinuationPacketWriterDeps, } from './packet-writer';
5
+ export { createContinuationPacketReader, splitFrontmatter, validatePacketSchema, } from './packet-reader';
6
+ export type { ContinuationPacketReader, ContinuationPacketReaderDeps, } from './packet-reader';
7
+ export { collectRepoStates, createDirtyStateCollector, defaultGitExec, } from './dirty-state-collector';
8
+ export type { DirtyStateCollector, DirtyStateCollectorOptions, GitExecFn, GitExecOptions, KnownRepo, } from './dirty-state-collector';
@@ -0,0 +1,33 @@
1
+ import type { AppSyncClient } from '../appsync/appsync-client';
2
+ import type { ContinuationPacket, PacketListEntry, RepoState } from './types';
3
+ export interface ContinuationPacketReaderDeps {
4
+ appsync: AppSyncClient;
5
+ /** Test seam — override the home directory. Defaults to `os.homedir()`. */
6
+ homeDir?: string;
7
+ }
8
+ export interface ContinuationPacketReader {
9
+ read(taskId: string, expectedHash?: string): Promise<ContinuationPacket>;
10
+ list(): Promise<PacketListEntry[]>;
11
+ }
12
+ /**
13
+ * Split a markdown body into YAML frontmatter + prose body. Returns
14
+ * `null` for the frontmatter when the body is missing the leading
15
+ * `---` fence.
16
+ */
17
+ export declare function splitFrontmatter(body: string): {
18
+ yaml: string | null;
19
+ prose: string;
20
+ };
21
+ /**
22
+ * Validate that a parsed YAML object matches the 17-field
23
+ * `ContinuationPacket` schema per LOCK #C6-A-1. Returns the typed
24
+ * packet on success; throws `SchemaInvalid` with a list of issues
25
+ * otherwise.
26
+ */
27
+ export declare function validatePacketSchema(parsed: unknown): ContinuationPacket;
28
+ /**
29
+ * Factory for the CP-6 packet reader.
30
+ */
31
+ export declare function createContinuationPacketReader(deps: ContinuationPacketReaderDeps): ContinuationPacketReader;
32
+ export { getPacketFilePath, getTaskDirectoryPath } from './packet-writer';
33
+ export type { RepoState };