@quantiya/codevibe-codex-plugin 2.0.6 → 2.0.8

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 (562) hide show
  1. package/README.md +20 -23
  2. package/dist/server.js +21 -21
  3. package/hooks/common.sh +506 -19
  4. package/{bin/codevibe-codex → libexec/companion-launcher} +37 -76
  5. package/node_modules/@quantiya/codevibe-core/README.md +7 -5
  6. package/node_modules/@quantiya/codevibe-core/dist/agy-cli-contract.d.ts +14 -0
  7. package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +229 -61
  8. package/node_modules/@quantiya/codevibe-core/dist/appsync/event-throttle.d.ts +33 -0
  9. package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +3 -2
  10. package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +6 -2
  11. package/node_modules/@quantiya/codevibe-core/dist/auth/auth-telemetry.d.ts +26 -0
  12. package/node_modules/@quantiya/codevibe-core/dist/auth/keychain-cli.d.ts +6 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/auth/vendor-key-cli.d.ts +49 -0
  14. package/node_modules/@quantiya/codevibe-core/dist/companion-mode/index.d.ts +50 -22
  15. package/node_modules/@quantiya/codevibe-core/dist/companion-mode/persist-preference.d.ts +1 -5
  16. package/node_modules/@quantiya/codevibe-core/dist/companion-mode/resolve-agent.d.ts +5 -4
  17. package/node_modules/@quantiya/codevibe-core/dist/config/config.d.ts +0 -5
  18. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/__tests__/oauth-refresh.test.d.ts +1 -0
  19. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/__tests__/upstream-result-helpers.d.ts +21 -0
  20. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/broker.d.ts +196 -12
  21. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/chatgpt-config.d.ts +40 -0
  22. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/index.d.ts +4 -1
  23. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/oauth-account-lock.d.ts +150 -0
  24. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/oauth-refresh.d.ts +72 -0
  25. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/types.d.ts +165 -17
  26. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/upstream-client.d.ts +3 -2
  27. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/vendor-key-store.d.ts +32 -1
  28. package/node_modules/@quantiya/codevibe-core/dist/crypto/__tests__/encrypt-for-emit.test.d.ts +1 -0
  29. package/node_modules/@quantiya/codevibe-core/dist/crypto/__tests__/open-prompt-id.test.d.ts +1 -0
  30. package/node_modules/@quantiya/codevibe-core/dist/crypto/encrypt-for-emit.d.ts +39 -0
  31. package/node_modules/@quantiya/codevibe-core/dist/crypto/index.d.ts +3 -0
  32. package/node_modules/@quantiya/codevibe-core/dist/crypto/open-prompt-id.d.ts +36 -0
  33. package/node_modules/@quantiya/codevibe-core/dist/daemon/__tests__/process-guards.test.d.ts +1 -0
  34. package/node_modules/@quantiya/codevibe-core/dist/daemon/index.d.ts +2 -0
  35. package/node_modules/@quantiya/codevibe-core/dist/daemon/process-guards.d.ts +38 -0
  36. package/node_modules/@quantiya/codevibe-core/dist/e1/__tests__/prompt-raise.test.d.ts +1 -0
  37. package/node_modules/@quantiya/codevibe-core/dist/e1/index.d.ts +2 -0
  38. package/node_modules/@quantiya/codevibe-core/dist/e1/prompt-raise.d.ts +65 -0
  39. package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +20 -2
  40. package/node_modules/@quantiya/codevibe-core/dist/index.js +4543 -288
  41. package/node_modules/@quantiya/codevibe-core/dist/keychain/__tests__/keychain-manager.test.d.ts +1 -0
  42. package/node_modules/@quantiya/codevibe-core/dist/keychain/__tests__/keychain-migrate.test.d.ts +1 -0
  43. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-backend.d.ts +105 -0
  44. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +40 -5
  45. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-migrate.d.ts +46 -0
  46. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/anchored-fs.test.d.ts +1 -0
  47. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/bounded-directory.test.d.ts +1 -0
  48. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/bounded-output.test.d.ts +1 -0
  49. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/durable-directory.test.d.ts +1 -0
  50. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/hosted-class-a-sink.test.d.ts +1 -0
  51. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/process-identity.test.d.ts +1 -0
  52. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/process-tree.test.d.ts +1 -0
  53. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/publication-authority-capability.test.d.ts +1 -0
  54. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/reviewer-rationale-flag.test.d.ts +1 -0
  55. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/snapshot-merge.test.d.ts +1 -0
  56. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/workspace-authority-fixture.d.ts +3 -0
  57. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/workspace-authority.test.d.ts +1 -0
  58. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/workspace-materializer.test.d.ts +1 -0
  59. package/node_modules/@quantiya/codevibe-core/dist/local-executor/agentic-disposable-repo.d.ts +23 -6
  60. package/node_modules/@quantiya/codevibe-core/dist/local-executor/agentic-resolve.d.ts +16 -0
  61. package/node_modules/@quantiya/codevibe-core/dist/local-executor/anchored-fs.d.ts +243 -0
  62. package/node_modules/@quantiya/codevibe-core/dist/local-executor/bounded-directory.d.ts +64 -0
  63. package/node_modules/@quantiya/codevibe-core/dist/local-executor/bounded-helper.d.ts +22 -0
  64. package/node_modules/@quantiya/codevibe-core/dist/local-executor/bounded-output.d.ts +11 -0
  65. package/node_modules/@quantiya/codevibe-core/dist/local-executor/class-a-emit.d.ts +13 -1
  66. package/node_modules/@quantiya/codevibe-core/dist/local-executor/class-a-sign.d.ts +15 -0
  67. package/node_modules/@quantiya/codevibe-core/dist/local-executor/durable-directory.d.ts +25 -0
  68. package/node_modules/@quantiya/codevibe-core/dist/local-executor/durable-store.d.ts +217 -25
  69. package/node_modules/@quantiya/codevibe-core/dist/local-executor/group-decision-outcome.d.ts +11 -0
  70. package/node_modules/@quantiya/codevibe-core/dist/local-executor/hosted-class-a-sink.d.ts +27 -0
  71. package/node_modules/@quantiya/codevibe-core/dist/local-executor/implementor-argv.d.ts +89 -7
  72. package/node_modules/@quantiya/codevibe-core/dist/local-executor/index.d.ts +3 -2
  73. package/node_modules/@quantiya/codevibe-core/dist/local-executor/local-executor-impl.d.ts +177 -76
  74. package/node_modules/@quantiya/codevibe-core/dist/local-executor/merge-conflict-resolve.d.ts +19 -0
  75. package/node_modules/@quantiya/codevibe-core/dist/local-executor/process-identity.d.ts +16 -0
  76. package/node_modules/@quantiya/codevibe-core/dist/local-executor/process-tree.d.ts +123 -0
  77. package/node_modules/@quantiya/codevibe-core/dist/local-executor/revert-reconcile.d.ts +16 -0
  78. package/node_modules/@quantiya/codevibe-core/dist/local-executor/revert-runner.d.ts +14 -1
  79. package/node_modules/@quantiya/codevibe-core/dist/local-executor/reviewer-rationale-flag.d.ts +10 -0
  80. package/node_modules/@quantiya/codevibe-core/dist/local-executor/snapshot-merge.d.ts +124 -0
  81. package/node_modules/@quantiya/codevibe-core/dist/local-executor/task-group-types.d.ts +7 -6
  82. package/node_modules/@quantiya/codevibe-core/dist/local-executor/team-execution-flag.d.ts +2 -2
  83. package/node_modules/@quantiya/codevibe-core/dist/local-executor/track-registry.d.ts +2 -0
  84. package/node_modules/@quantiya/codevibe-core/dist/local-executor/types.d.ts +34 -2
  85. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/build.d.ts +5 -0
  86. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/deploy-preflight.d.ts +2 -0
  87. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/diff-sanity.d.ts +12 -0
  88. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/hostile-grep.d.ts +2 -0
  89. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/lint.d.ts +2 -0
  90. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/shell-runner.d.ts +5 -0
  91. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/source-traceability.d.ts +2 -0
  92. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/tests.d.ts +3 -0
  93. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/typecheck.d.ts +3 -0
  94. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-runner.d.ts +6 -0
  95. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-authority.d.ts +45 -0
  96. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-materializer.d.ts +27 -0
  97. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-shadow.d.ts +378 -85
  98. package/node_modules/@quantiya/codevibe-core/dist/local-model/manager.d.ts +1 -1
  99. package/node_modules/@quantiya/codevibe-core/dist/local-model/ollama.d.ts +40 -0
  100. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/detect-agents.test.d.ts +1 -0
  101. package/node_modules/@quantiya/codevibe-core/dist/orchestration/detect-agents.d.ts +10 -30
  102. package/node_modules/@quantiya/codevibe-core/dist/orchestration/index.d.ts +1 -2
  103. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/a1a-planner-offers.test.d.ts +1 -0
  104. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/a6-cli-surface.test.d.ts +1 -0
  105. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/advisory-attachment-journal.test.d.ts +1 -0
  106. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/advisory-attachments-dir-race.test.d.ts +1 -0
  107. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/advisory-multi-mention-panel.test.d.ts +1 -0
  108. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/advisory-panel-attachments.test.d.ts +1 -0
  109. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/advisory-quota-stdout-result.test.d.ts +1 -0
  110. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/agent-turn-context-batch.test.d.ts +1 -0
  111. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/bounded-shutdown.test.d.ts +1 -0
  112. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/brainstorm-quorum-wiring.test.d.ts +1 -0
  113. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/brainstorm-quorum.test.d.ts +1 -0
  114. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/cli-team-session-key.test.d.ts +1 -0
  115. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/command-intent.test.d.ts +1 -0
  116. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/context-compaction.test.d.ts +1 -0
  117. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/context-items-hosted-sync.test.d.ts +1 -0
  118. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/context-items-wiring.test.d.ts +1 -0
  119. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/context-items.test.d.ts +1 -0
  120. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/cp8-full-team-events.test.d.ts +1 -0
  121. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/cp8-team-decomposed-zk.test.d.ts +1 -0
  122. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/explicit-tty-exit.test.d.ts +1 -0
  123. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/mention-suggest.test.d.ts +1 -0
  124. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/planner-offer-e1.test.d.ts +1 -0
  125. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/route-browse-summarize-recovery.test.d.ts +1 -0
  126. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/workspace-shutdown.test.d.ts +1 -0
  127. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/advisory-attachment-journal.d.ts +165 -0
  128. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/attachments.d.ts +53 -8
  129. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/bounded-shutdown.d.ts +22 -0
  130. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/brainstorm-quorum.d.ts +118 -0
  131. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +97 -70
  132. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +51847 -33465
  133. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/command-intent.d.ts +56 -0
  134. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/InputBar.d.ts +6 -0
  135. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/OrchestrationApp.d.ts +2 -0
  136. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/context-compaction.d.ts +264 -0
  137. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/context-items-hosted-sync.d.ts +19 -0
  138. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/context-items.d.ts +408 -0
  139. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/context-store.d.ts +162 -0
  140. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/declared-test-runner.d.ts +21 -2
  141. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/emit-shell-event.d.ts +41 -13
  142. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/explicit-tty-exit.d.ts +17 -0
  143. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-decision-submit.d.ts +11 -0
  144. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-prompts.d.ts +78 -3
  145. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +309 -37
  146. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/mention-suggest.d.ts +11 -0
  147. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/mode-selection.d.ts +4 -22
  148. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/planner-offer-e1.d.ts +97 -0
  149. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/quorum-loop.d.ts +603 -77
  150. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/reducer.d.ts +9 -0
  151. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/task-progress.d.ts +17 -4
  152. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/team-decompose.d.ts +47 -29
  153. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +103 -6
  154. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/workspace-shutdown.d.ts +27 -0
  155. package/node_modules/@quantiya/codevibe-core/dist/planner/index.d.ts +1 -1
  156. package/node_modules/@quantiya/codevibe-core/dist/planner/local-advisory.d.ts +12 -0
  157. package/node_modules/@quantiya/codevibe-core/dist/planner/local-gemma.d.ts +27 -0
  158. package/node_modules/@quantiya/codevibe-core/dist/planner/types.d.ts +7 -0
  159. package/node_modules/@quantiya/codevibe-core/dist/reviewer/index.d.ts +0 -2
  160. package/node_modules/@quantiya/codevibe-core/dist/reviewer/output-parser.d.ts +19 -0
  161. package/node_modules/@quantiya/codevibe-core/dist/reviewer/provider.d.ts +9 -6
  162. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/antigravity.d.ts +2 -3
  163. package/node_modules/@quantiya/codevibe-core/dist/reviewer/registry.d.ts +9 -4
  164. package/node_modules/@quantiya/codevibe-core/dist/reviewer/token-usage.d.ts +10 -0
  165. package/node_modules/@quantiya/codevibe-core/dist/reviewer/types.d.ts +3 -0
  166. package/node_modules/@quantiya/codevibe-core/dist/reviewer/verdict-classifier.d.ts +1 -0
  167. package/node_modules/@quantiya/codevibe-core/dist/session/__tests__/device-registration-lease.test.d.ts +1 -0
  168. package/node_modules/@quantiya/codevibe-core/dist/session/__tests__/pending-session-create.test.d.ts +1 -0
  169. package/node_modules/@quantiya/codevibe-core/dist/session/__tests__/session-rekey-fingerprint.test.d.ts +1 -0
  170. package/node_modules/@quantiya/codevibe-core/dist/session/__tests__/session-resume-key-reconciliation.test.d.ts +1 -0
  171. package/node_modules/@quantiya/codevibe-core/dist/session/__tests__/session-resume-pending-first.test.d.ts +1 -0
  172. package/node_modules/@quantiya/codevibe-core/dist/session/device-key-watcher.d.ts +1 -0
  173. package/node_modules/@quantiya/codevibe-core/dist/session/index.d.ts +4 -2
  174. package/node_modules/@quantiya/codevibe-core/dist/session/pending-session-create.d.ts +61 -0
  175. package/node_modules/@quantiya/codevibe-core/dist/session/register-device-key.d.ts +11 -1
  176. package/node_modules/@quantiya/codevibe-core/dist/session/session-rekey.d.ts +8 -8
  177. package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +21 -1
  178. package/node_modules/@quantiya/codevibe-core/dist/substrate/command-runner.d.ts +2 -0
  179. package/node_modules/@quantiya/codevibe-core/dist/substrate/docker.d.ts +14 -32
  180. package/node_modules/@quantiya/codevibe-core/dist/substrate/index.d.ts +0 -1
  181. package/node_modules/@quantiya/codevibe-core/dist/substrate/sandbox-exec.d.ts +17 -16
  182. package/node_modules/@quantiya/codevibe-core/dist/substrate/types.d.ts +39 -5
  183. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/__tests__/reviewer-credential-preflight.test.d.ts +1 -0
  184. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/apikey-bootstrap.d.ts +24 -1
  185. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/engage-substrate.d.ts +20 -0
  186. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/index.d.ts +2 -0
  187. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/reviewer-credential-preflight.d.ts +50 -0
  188. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/sanitized-env.d.ts +5 -5
  189. package/node_modules/@quantiya/codevibe-core/dist/test-publication-authority-setup.d.ts +1 -0
  190. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/consolidator.test.d.ts +1 -0
  191. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/digest.test.d.ts +1 -0
  192. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/flock-rollout-lock.test.d.ts +1 -0
  193. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/ledger.test.d.ts +1 -0
  194. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/outbox.test.d.ts +1 -0
  195. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/replay-cursor.test.d.ts +1 -0
  196. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/session-map.test.d.ts +1 -0
  197. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/__tests__/socket-rollout-lock.test.d.ts +1 -0
  198. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/atomic-file.d.ts +27 -0
  199. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/consolidator.d.ts +253 -0
  200. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/digest.d.ts +4 -0
  201. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/flock-rollout-lock.d.ts +68 -0
  202. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/index.d.ts +9 -0
  203. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/ledger.d.ts +274 -0
  204. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/outbox.d.ts +60 -0
  205. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/replay-cursor.d.ts +190 -0
  206. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/session-map.d.ts +133 -0
  207. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/socket-rollout-lock.d.ts +57 -0
  208. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/types.d.ts +368 -0
  209. package/node_modules/@quantiya/codevibe-core/dist/types/encryption.d.ts +9 -0
  210. package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +29 -4
  211. package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +32 -2
  212. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/README.md +207 -163
  213. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/index.d.ts +15 -0
  214. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/index.js +31 -0
  215. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/max.d.ts +2 -0
  216. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/max.js +3 -0
  217. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
  218. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/md5.js +13 -0
  219. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/native.d.ts +6 -0
  220. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/native.js +4 -0
  221. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
  222. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/nil.js +3 -0
  223. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/package.json +1 -0
  224. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
  225. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/parse.js +11 -0
  226. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
  227. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/regex.js +3 -0
  228. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
  229. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/rng.js +13 -0
  230. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
  231. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/sha1.js +13 -0
  232. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
  233. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/stringify.js +39 -0
  234. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/types.d.ts +21 -0
  235. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/types.js +2 -0
  236. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
  237. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
  238. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
  239. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v1.js +87 -0
  240. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
  241. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
  242. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
  243. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v3.js +14 -0
  244. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
  245. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v35.js +44 -0
  246. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
  247. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v4.js +29 -0
  248. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
  249. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v5.js +14 -0
  250. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
  251. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v6.js +22 -0
  252. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
  253. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
  254. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
  255. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/v7.js +69 -0
  256. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
  257. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/validate.js +7 -0
  258. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/version.d.ts +2 -0
  259. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs/version.js +10 -0
  260. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
  261. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/index.js +31 -0
  262. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
  263. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/max.js +3 -0
  264. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
  265. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
  266. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
  267. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/native.js +4 -0
  268. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
  269. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
  270. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/package.json +1 -0
  271. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
  272. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
  273. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
  274. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
  275. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
  276. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
  277. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
  278. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
  279. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
  280. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
  281. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
  282. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/types.js +2 -0
  283. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
  284. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
  285. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
  286. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
  287. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
  288. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
  289. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
  290. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
  291. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
  292. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v35.js +44 -0
  293. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
  294. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
  295. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
  296. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
  297. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
  298. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v6.js +22 -0
  299. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
  300. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
  301. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
  302. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
  303. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
  304. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
  305. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
  306. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/cjs-browser/version.js +10 -0
  307. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/bin/uuid +2 -0
  308. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/index.d.ts +15 -0
  309. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/{esm-node → esm}/index.js +9 -4
  310. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/max.d.ts +2 -0
  311. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/max.js +1 -0
  312. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/md5.d.ts +4 -0
  313. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/md5.js +11 -0
  314. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/native.d.ts +6 -0
  315. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/native.js +2 -0
  316. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/nil.d.ts +2 -0
  317. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/nil.js +1 -0
  318. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/parse.d.ts +2 -0
  319. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/parse.js +9 -0
  320. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/regex.d.ts +2 -0
  321. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/regex.js +1 -0
  322. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/rng.d.ts +1 -0
  323. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/rng.js +10 -0
  324. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
  325. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/sha1.js +11 -0
  326. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
  327. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/stringify.js +35 -0
  328. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/types.d.ts +21 -0
  329. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/types.js +1 -0
  330. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
  331. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
  332. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v1.d.ts +11 -0
  333. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v1.js +83 -0
  334. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
  335. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
  336. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v3.d.ts +9 -0
  337. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v3.js +9 -0
  338. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v35.d.ts +7 -0
  339. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v35.js +39 -0
  340. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v4.d.ts +4 -0
  341. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v4.js +27 -0
  342. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v5.d.ts +9 -0
  343. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v5.js +9 -0
  344. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v6.d.ts +4 -0
  345. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v6.js +20 -0
  346. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
  347. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
  348. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v7.d.ts +9 -0
  349. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/v7.js +65 -0
  350. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/validate.d.ts +2 -0
  351. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/validate.js +5 -0
  352. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/version.d.ts +2 -0
  353. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm/version.js +8 -0
  354. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
  355. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/index.js +9 -4
  356. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
  357. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/max.js +1 -0
  358. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
  359. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/md5.js +113 -193
  360. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
  361. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/native.js +1 -3
  362. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
  363. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/nil.js +1 -1
  364. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
  365. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/parse.js +6 -32
  366. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
  367. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/regex.js +1 -1
  368. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
  369. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/rng.js +6 -13
  370. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
  371. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/sha1.js +62 -88
  372. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
  373. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/stringify.js +27 -25
  374. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
  375. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/types.js +1 -0
  376. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
  377. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
  378. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
  379. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1.js +78 -90
  380. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
  381. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
  382. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
  383. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v3.js +8 -3
  384. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
  385. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v35.js +30 -57
  386. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
  387. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v4.js +21 -23
  388. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
  389. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v5.js +8 -3
  390. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
  391. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v6.js +20 -0
  392. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
  393. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
  394. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
  395. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v7.js +65 -0
  396. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
  397. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/validate.js +2 -4
  398. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
  399. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/version.js +5 -8
  400. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/package.json +73 -76
  401. package/node_modules/@quantiya/codevibe-core/package.json +7 -6
  402. package/node_modules/fs-ext/.eslintrc +53 -0
  403. package/node_modules/fs-ext/.github/workflows/node.js.yml +31 -0
  404. package/node_modules/fs-ext/.travis.yml +25 -0
  405. package/node_modules/fs-ext/LICENSE.txt +18 -0
  406. package/node_modules/fs-ext/README.md +130 -0
  407. package/node_modules/fs-ext/appveyor.yml +20 -0
  408. package/node_modules/fs-ext/binding.gyp +11 -0
  409. package/node_modules/fs-ext/build/Makefile +347 -0
  410. package/node_modules/fs-ext/build/Release/.deps/Release/fs_ext.node.d +1 -0
  411. package/node_modules/fs-ext/build/Release/.deps/Release/obj.target/fs_ext/fs-ext.o.d +165 -0
  412. package/node_modules/fs-ext/build/Release/fs_ext.node +0 -0
  413. package/node_modules/fs-ext/build/Release/obj.target/fs_ext/fs-ext.o +0 -0
  414. package/node_modules/fs-ext/build/binding.Makefile +6 -0
  415. package/node_modules/fs-ext/build/config.gypi +504 -0
  416. package/node_modules/fs-ext/build/fs_ext.target.mk +183 -0
  417. package/node_modules/fs-ext/build/gyp-mac-tool +768 -0
  418. package/node_modules/fs-ext/example.js +57 -0
  419. package/node_modules/fs-ext/fs-ext.cc +622 -0
  420. package/node_modules/fs-ext/fs-ext.js +131 -0
  421. package/node_modules/fs-ext/package.json +42 -0
  422. package/node_modules/fs-ext/run_tests.js +17 -0
  423. package/node_modules/fs-ext/tests/test-fs-fcntl.js +350 -0
  424. package/node_modules/fs-ext/tests/test-fs-flock.js +452 -0
  425. package/node_modules/fs-ext/tests/test-fs-flock_stress.js +239 -0
  426. package/node_modules/fs-ext/tests/test-fs-seek.js +607 -0
  427. package/node_modules/fs-ext/tests/test-fs-seek_stress.js +313 -0
  428. package/node_modules/fs-ext/tests/test-fs-statvfs.js +15 -0
  429. package/node_modules/fs-ext/tests/worker-test.js +56 -0
  430. package/node_modules/fs-ext/wscript +15 -0
  431. package/node_modules/nan/.github/workflows/ci.yml +46 -0
  432. package/node_modules/nan/.pre-commit-config.yaml +8 -0
  433. package/node_modules/nan/CHANGELOG.md +605 -0
  434. package/node_modules/nan/CMakeLists.txt +138 -0
  435. package/node_modules/nan/LICENSE.md +9 -0
  436. package/node_modules/nan/README.md +457 -0
  437. package/node_modules/nan/doc/asyncworker.md +146 -0
  438. package/node_modules/nan/doc/buffers.md +54 -0
  439. package/node_modules/nan/doc/callback.md +76 -0
  440. package/node_modules/nan/doc/converters.md +41 -0
  441. package/node_modules/nan/doc/errors.md +226 -0
  442. package/node_modules/nan/doc/json.md +62 -0
  443. package/node_modules/nan/doc/maybe_types.md +583 -0
  444. package/node_modules/nan/doc/methods.md +689 -0
  445. package/node_modules/nan/doc/new.md +147 -0
  446. package/node_modules/nan/doc/node_misc.md +123 -0
  447. package/node_modules/nan/doc/object_wrappers.md +263 -0
  448. package/node_modules/nan/doc/persistent.md +296 -0
  449. package/node_modules/nan/doc/scopes.md +73 -0
  450. package/node_modules/nan/doc/script.md +58 -0
  451. package/node_modules/nan/doc/string_bytes.md +81 -0
  452. package/node_modules/nan/doc/v8_internals.md +211 -0
  453. package/node_modules/nan/doc/v8_misc.md +85 -0
  454. package/node_modules/nan/include_dirs.js +1 -0
  455. package/node_modules/nan/nan.h +3202 -0
  456. package/node_modules/nan/nan_callbacks.h +141 -0
  457. package/node_modules/nan/nan_callbacks_12_inl.h +730 -0
  458. package/node_modules/nan/nan_callbacks_pre_12_inl.h +528 -0
  459. package/node_modules/nan/nan_converters.h +72 -0
  460. package/node_modules/nan/nan_converters_43_inl.h +68 -0
  461. package/node_modules/nan/nan_converters_pre_43_inl.h +42 -0
  462. package/node_modules/nan/nan_define_own_property_helper.h +29 -0
  463. package/node_modules/nan/nan_implementation_12_inl.h +446 -0
  464. package/node_modules/nan/nan_implementation_pre_12_inl.h +263 -0
  465. package/node_modules/nan/nan_json.h +166 -0
  466. package/node_modules/nan/nan_maybe_43_inl.h +360 -0
  467. package/node_modules/nan/nan_maybe_pre_43_inl.h +268 -0
  468. package/node_modules/nan/nan_new.h +340 -0
  469. package/node_modules/nan/nan_object_wrap.h +156 -0
  470. package/node_modules/nan/nan_persistent_12_inl.h +132 -0
  471. package/node_modules/nan/nan_persistent_pre_12_inl.h +242 -0
  472. package/node_modules/nan/nan_private.h +73 -0
  473. package/node_modules/nan/nan_scriptorigin.h +97 -0
  474. package/node_modules/nan/nan_string_bytes.h +305 -0
  475. package/node_modules/nan/nan_typedarray_contents.h +96 -0
  476. package/node_modules/nan/nan_weak.h +453 -0
  477. package/node_modules/nan/package.json +38 -0
  478. package/node_modules/nan/tools/1to2.js +412 -0
  479. package/node_modules/nan/tools/README.md +14 -0
  480. package/node_modules/nan/tools/package.json +19 -0
  481. package/package.json +5 -5
  482. package/node_modules/@quantiya/codevibe-core/dist/orchestration/orchestration-cli.d.ts +0 -12
  483. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-bootstrap.d.ts +0 -146
  484. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-failure-recourse.d.ts +0 -23
  485. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-save.d.ts +0 -47
  486. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-seat-picker.d.ts +0 -72
  487. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-telemetry.d.ts +0 -54
  488. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-test-agents.d.ts +0 -108
  489. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-types.d.ts +0 -146
  490. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-wizard.d.ts +0 -57
  491. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cohort-flag.d.ts +0 -16
  492. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/gemini.d.ts +0 -109
  493. package/node_modules/@quantiya/codevibe-core/dist/substrate/git-proxy.d.ts +0 -35
  494. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CHANGELOG.md +0 -274
  495. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CONTRIBUTING.md +0 -18
  496. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/bin/uuid +0 -2
  497. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/index.js +0 -79
  498. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/md5.js +0 -223
  499. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/native.js +0 -11
  500. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/nil.js +0 -8
  501. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/parse.js +0 -45
  502. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/regex.js +0 -8
  503. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/rng.js +0 -25
  504. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -104
  505. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -44
  506. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v1.js +0 -107
  507. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v3.js +0 -16
  508. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v35.js +0 -80
  509. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v4.js +0 -43
  510. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v5.js +0 -16
  511. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/validate.js +0 -17
  512. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/version.js +0 -21
  513. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/md5.js +0 -13
  514. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/native.js +0 -4
  515. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/nil.js +0 -1
  516. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/parse.js +0 -35
  517. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/regex.js +0 -1
  518. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/rng.js +0 -12
  519. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  520. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/stringify.js +0 -33
  521. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v1.js +0 -95
  522. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v3.js +0 -4
  523. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v35.js +0 -66
  524. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v4.js +0 -29
  525. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v5.js +0 -4
  526. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/validate.js +0 -7
  527. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/version.js +0 -11
  528. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/index.js +0 -79
  529. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5-browser.js +0 -223
  530. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5.js +0 -23
  531. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native-browser.js +0 -11
  532. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native.js +0 -15
  533. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/nil.js +0 -8
  534. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/parse.js +0 -45
  535. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/regex.js +0 -8
  536. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng-browser.js +0 -25
  537. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng.js +0 -24
  538. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1-browser.js +0 -104
  539. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1.js +0 -23
  540. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/stringify.js +0 -44
  541. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/uuid-bin.js +0 -85
  542. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v1.js +0 -107
  543. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v3.js +0 -16
  544. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v35.js +0 -80
  545. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v4.js +0 -43
  546. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v5.js +0 -16
  547. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/validate.js +0 -17
  548. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/version.js +0 -21
  549. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/wrapper.mjs +0 -10
  550. /package/node_modules/@quantiya/codevibe-core/dist/{companion-mode/__tests__/detect-parallel.test.d.ts → appsync/__tests__/appsync-client-context-items.test.d.ts} +0 -0
  551. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration-shell/__tests__/cli-stub-session-adapter.test.d.ts → appsync/__tests__/heartbeat-active.test.d.ts} +0 -0
  552. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-bootstrap.test.d.ts → appsync/__tests__/orphan-sweep-null-heartbeat.test.d.ts} +0 -0
  553. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-failure-recourse.test.d.ts → appsync/__tests__/refresh-open-prompt-ttl-chunk.test.d.ts} +0 -0
  554. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-save.test.d.ts → auth/__tests__/keychain-cli.test.d.ts} +0 -0
  555. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-seat-picker.test.d.ts → auth/__tests__/vendor-key-cli.test.d.ts} +0 -0
  556. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-telemetry.test.d.ts → companion-mode/__tests__/mode-selected-emit.test.d.ts} +0 -0
  557. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-test-agents.test.d.ts → companion-mode/__tests__/private-launcher-detection.test.d.ts} +0 -0
  558. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-types.test.d.ts → companion-mode/__tests__/private-launcher-path.test.d.ts} +0 -0
  559. /package/node_modules/@quantiya/codevibe-core/dist/{orchestration/__tests__/setup-wizard.test.d.ts → credential-broker/__tests__/broker-c4.test.d.ts} +0 -0
  560. /package/node_modules/@quantiya/codevibe-core/dist/{reviewer/providers/__tests__/gemini-live-smoke.test.d.ts → credential-broker/__tests__/broker-streaming.test.d.ts} +0 -0
  561. /package/node_modules/@quantiya/codevibe-core/dist/{reviewer/providers/__tests__/gemini.test.d.ts → credential-broker/__tests__/chatgpt-config.test.d.ts} +0 -0
  562. /package/node_modules/@quantiya/codevibe-core/dist/{substrate/__tests__/git-proxy.test.d.ts → credential-broker/__tests__/oauth-account-lock.test.d.ts} +0 -0
@@ -26,33 +26,37 @@ export interface InReviewAssignment {
26
26
  * recovery-row type — NOT an extension of the live `TrackAssignedPayload` (so the
27
27
  * live Class B contract stays unpolluted). Mirrors the engine handler's camelCase
28
28
  * `TeamTrackRecoveryRow` serde:
29
- * - ALWAYS present: `taskGroupId`, `trackIndex`, `relaunch`, and `encryptedBrief?`
29
+ * - ALWAYS present: `taskGroupId`, `trackIndex`, `taskId`,
30
+ * `dispatchGeneration`, `relaunch`, and `encryptedBrief?`
30
31
  * (omitted when the track had no description → recovery treats it as an empty
31
- * brief). `taskGroupId` is on EVERY row (seed-only too) so the desktop keys its
32
- * recovered brief + corrupt-brief tombstone by `(taskGroupId, trackIndex)` —
33
- * B.2 aggregates across groups, so a bare `trackIndex` key could cross-blend
34
- * two groups (#593 Stage-2 r2 Codex MEDIUM).
32
+ * brief). The four identity fields bind recovered brief and tombstone
33
+ * authority to `(taskGroupId, trackIndex, taskId, dispatchGeneration)`;
34
+ * reused group/index slots cannot cross-contaminate generations.
35
35
  * - ONLY when `relaunch === true` (flattened at top level): the full live
36
- * `TrackAssigned` wire-field set (`taskId`, `implementorAgent`,
37
- * `ownershipScope`, `isSharedTestOwner`, `stateDir`, `dispatchId`,
38
- * `dispatchGeneration`, `conflictContext`) PLUS recovery metadata (`gateRunId`,
36
+ * `TrackAssigned` wire-field set (the always-present identity fields plus
37
+ * `implementorAgent`, `ownershipScope`, `isSharedTestOwner`, `stateDir`,
38
+ * `dispatchId`, `conflictContext`) and recovery metadata (`gateRunId`,
39
39
  * `gateType`). These camelCase keys are byte-identical to the live
40
40
  * `TrackAssigned` Class B packet, so `normalizeTrackAssignedWire(row)` accepts
41
41
  * a relaunch row directly (it picks the expected keys and ignores the extras).
42
42
  *
43
43
  * Typed loosely (`unknown` payload past the always-present fields) because the
44
- * relaunch keys are present-or-absent; the recovery loop runs the shared
45
- * `normalizeTrackAssignedWire` + `isValidTrackAssignedPayload` validators on the
46
- * raw row (never a divergent second validator), so the SDK does not re-type them.
44
+ * relaunch keys are present-or-absent. Recovery first validates complete row
45
+ * shape/correlation, then runs the shared `normalizeTrackAssignedWire` +
46
+ * `isValidTrackAssignedPayload` live validators.
47
47
  */
48
48
  export interface TeamTrackRecoveryRow {
49
49
  /**
50
50
  * The owning task group's id — present on EVERY row (seed-only + relaunch) so
51
- * recovered briefs + tombstones key by `(taskGroupId, trackIndex)` and B.2's
52
- * cross-group aggregation can't collide on a shared `trackIndex` (#593 r2).
51
+ * recovered rows carry complete authority, so B.2's cross-group aggregation
52
+ * cannot collide on a shared `trackIndex`.
53
53
  */
54
54
  taskGroupId: string;
55
55
  trackIndex: number;
56
+ /** Child task identity; present on seed-only and relaunch rows. */
57
+ taskId: string;
58
+ /** Current u32 dispatch generation; present on every recovery row. */
59
+ dispatchGeneration: number;
56
60
  /** Bare base64 ciphertext; absent when the track had no description. */
57
61
  encryptedBrief?: string;
58
62
  relaunch: boolean;
@@ -76,6 +80,28 @@ export interface TaskGroupStatusResult {
76
80
  status: string;
77
81
  haltReason?: string;
78
82
  }
83
+ /**
84
+ * A1e hosted blind-hold upload input. These are the ONLY client-supplied
85
+ * plaintext fields permitted by the shared-context ZK boundary. `expiresAt`
86
+ * is intentionally absent: AppSync derives it from the authoritative Session
87
+ * row so a stale/offline desktop cannot extend retention.
88
+ */
89
+ export interface PutContextItemInput {
90
+ sessionId: string;
91
+ seq: string;
92
+ taskId?: string;
93
+ trackId?: string;
94
+ ciphertext: string;
95
+ }
96
+ /** Host-emittable audit surface used by the signed Class A transport. */
97
+ export interface RecordExecutionEventInput {
98
+ taskId: string;
99
+ sessionId: string;
100
+ kind: 'TASK_CREATED' | 'TASK_TERMINATED' | 'PROGRESS_EVENT' | 'TOOL_USE' | 'DESTRUCTIVE_ACTION_ESCALATED' | 'FLAG_BAD_APPROVAL';
101
+ /** Free-form JSON; encrypted before crossing AppSync. */
102
+ payload: unknown;
103
+ dedupKeyHex: string;
104
+ }
79
105
  /**
80
106
  * PHASE-CP-1-F.1 Part A (LOCK L2) — tolerant `AWSJSON!` object read.
81
107
  *
@@ -120,6 +146,42 @@ export interface TaskReviewSummaryReviewer {
120
146
  reasoning: string;
121
147
  /** ReviewerVerdict.suggested_changes (may be empty). */
122
148
  suggestedChanges: string[];
149
+ /** Non-blocking observations that did not request another revision. */
150
+ residualObservations?: string[];
151
+ }
152
+ export interface TaskReviewSummaryRequirements {
153
+ problem: string;
154
+ expectedOutputs: string[];
155
+ }
156
+ export interface TaskReviewSummaryImplementor {
157
+ agent: string;
158
+ trackIndex?: number;
159
+ taskId: string;
160
+ }
161
+ export interface TaskReviewSummaryQuorumSeat {
162
+ seatId: number;
163
+ role: string;
164
+ agent: string;
165
+ }
166
+ export interface TaskReviewSummaryQuorum {
167
+ seats: TaskReviewSummaryQuorumSeat[];
168
+ roundCount: number;
169
+ revisionCount: number;
170
+ }
171
+ export interface TaskReviewSummaryMergeGate {
172
+ applicable: boolean;
173
+ outcome: string;
174
+ resolution?: string;
175
+ }
176
+ export interface TaskReviewSummaryDurations {
177
+ taskElapsedMs?: number;
178
+ reviewerElapsedMs?: number;
179
+ availability: string;
180
+ }
181
+ export interface TaskReviewSummaryTokenUsage {
182
+ knownTotal?: number;
183
+ availability: string;
184
+ unavailableRoles: string[];
123
185
  }
124
186
  /** One round in the per-round summary (decrypted). */
125
187
  export interface TaskReviewSummaryRound {
@@ -140,6 +202,15 @@ export interface TaskReviewSummaryRound {
140
202
  * projection; `truncatedForSize`/`omittedRounds` flag the size-cap degrade.
141
203
  */
142
204
  export interface TaskReviewSummary {
205
+ /** Present on the additive P15 terminal-report shape; absent on legacy v1. */
206
+ schemaVersion?: number;
207
+ requirements?: TaskReviewSummaryRequirements;
208
+ implementors?: TaskReviewSummaryImplementor[];
209
+ reviewQuorum?: TaskReviewSummaryQuorum;
210
+ mergeGate?: TaskReviewSummaryMergeGate;
211
+ durations?: TaskReviewSummaryDurations;
212
+ tokenUsage?: TaskReviewSummaryTokenUsage;
213
+ residualRisks?: string[];
143
214
  rounds: TaskReviewSummaryRound[];
144
215
  /** The resolution that produced the final-approval prompt (normally proceed). */
145
216
  finalOutcome: string;
@@ -186,6 +257,12 @@ export declare class AppSyncGraphQLError extends Error {
186
257
  path?: unknown;
187
258
  });
188
259
  }
260
+ export type AppSyncAuthenticationFailureKind = 'refresh_auth_rejected' | 'refresh_network';
261
+ /** A foreground GraphQL 401 that token refresh could not recover. */
262
+ export declare class AppSyncAuthenticationError extends Error {
263
+ readonly kind: AppSyncAuthenticationFailureKind;
264
+ constructor(kind: AppSyncAuthenticationFailureKind);
265
+ }
189
266
  /**
190
267
  * PHASE-CP-10-MIN (#585) §2.3 — the parsed cross-device applyUserDecision
191
268
  * echo. Mirrors the quorum-core SDK's `UserDecisionAppliedEvent`
@@ -225,19 +302,16 @@ export declare function shouldDeliverSubscribedEvent(event: Pick<Event, 'source'
225
302
  * Discriminator for the most recent `authenticateWithStoredTokens()`
226
303
  * failure. Lets callers distinguish a genuine "no tokens / refresh
227
304
  * rejected" outcome from a transient network failure during the
228
- * Cognito refresh-token POST.
305
+ * Cognito refresh-token POST, or a credential-store failure that prevented
306
+ * the token read from completing.
229
307
  *
230
308
  * Stage 2 round-1 Codex M1: the production refresh path returns
231
309
  * `false` on every error (including network blow-ups inside
232
- * `callCognitoRefresh`'s catch block), so the wizard's auth-vs-network
233
- * heuristic which only ran on caught throws — never fired in
234
- * production. Recording the kind on every false-return path lets
235
- * `setup-bootstrap.ts:defaultClientFactory()` route network-shaped
236
- * refresh failures to `subscription_status_network` (per §6 row
237
- * "transient 5xx during refresh") instead of misleading the user with
238
- * a "not signed in" abort.
310
+ * `callCognitoRefresh`'s catch block). Recording the kind on every
311
+ * false-return path lets CLI callers distinguish a transient network
312
+ * failure from a genuine sign-in rejection.
239
313
  */
240
- export type AuthFailureKind = 'no_tokens' | 'refresh_auth_rejected' | 'refresh_network';
314
+ export type AuthFailureKind = 'no_tokens' | 'refresh_auth_rejected' | 'refresh_network' | 'credential_storage_unavailable';
241
315
  /**
242
316
  * AppSync GraphQL client with WebSocket subscriptions
243
317
  */
@@ -250,8 +324,7 @@ export declare class AppSyncClient {
250
324
  private activeSubscriptions;
251
325
  /**
252
326
  * Set by `authenticateWithStoredTokens()` on every false-return path
253
- * (and reset to `null` on success). Read by callers (e.g., the
254
- * wizard's `defaultClientFactory`) to discriminate auth-rejection
327
+ * (and reset to `null` on success). Read by callers to discriminate auth-rejection
255
328
  * vs network-failure without re-running the auth call. Stage 2
256
329
  * round-1 Codex M1.
257
330
  */
@@ -267,8 +340,31 @@ export declare class AppSyncClient {
267
340
  */
268
341
  private lastRefreshNetworkError;
269
342
  private pendingRefresh;
343
+ private pendingRefreshCredential;
344
+ /**
345
+ * All five WebSocket watcher families reconcile the same process-wide token
346
+ * cache. Collapse concurrent reconnects onto one bounded durable read /
347
+ * refresh operation so a keyring stall cannot multiply native calls.
348
+ */
349
+ private pendingReconnectReconciliation;
350
+ /**
351
+ * A stopped watcher cancels only its wait on the shared reconciliation. The
352
+ * flight remains live for other watcher families and owns its own deadline.
353
+ */
354
+ private reconnectReconciliationWaiters;
355
+ /**
356
+ * Every in-process credential replacement advances this generation. Async
357
+ * refresh/reconciliation work captures it before starting and may mutate the
358
+ * token cache only while that captured generation is still current.
359
+ */
360
+ private tokenStateGeneration;
270
361
  private lastRefreshFailureAt;
362
+ private lastRefreshFailureCredential;
271
363
  private static readonly REFRESH_BACKOFF_MS;
364
+ /** Bounds the shared Cognito flight even when a transport ignores abort. */
365
+ private static readonly COGNITO_REFRESH_TIMEOUT_MS;
366
+ /** Bounds the durable read and any refresh as one reconnect operation. */
367
+ private static readonly RECONNECT_RECONCILIATION_TIMEOUT_MS;
272
368
  private deviceKeyWatcher;
273
369
  private sessionUpdateWatchers;
274
370
  private applyUserDecisionWatchers;
@@ -288,23 +384,16 @@ export declare class AppSyncClient {
288
384
  * `authenticateWithStoredTokens()` failure, or `null` if the call
289
385
  * succeeded (or has never been called).
290
386
  *
291
- * Stage 2 round-1 Codex M1. Callers (today: `setup-bootstrap.ts
292
- * :defaultClientFactory`) use this to distinguish network blow-ups
387
+ * Stage 2 round-1 Codex M1. Callers use this to distinguish network blow-ups
293
388
  * during the Cognito refresh-token POST from genuine auth
294
- * rejections. The wizard maps `'refresh_network'` to
295
- * `subscription_status_network` (don't tell a signed-in user to
296
- * re-login when their tokens are valid and the network is broken)
297
- * and the other two kinds to `not_signed_in` (preserves
298
- * pre-Codex-M1 behavior).
389
+ * Credential-storage failure remains distinct because re-authentication
390
+ * cannot repair a locked or unavailable keyring.
299
391
  */
300
392
  getLastAuthFailureKind(): AuthFailureKind | null;
301
393
  /**
302
394
  * Heuristic — does the error message look like a transient network
303
- * failure rather than an auth-token rejection? Mirrors
304
- * `setup-bootstrap.ts:isNetworkLikeError` byte-for-byte so the same
305
- * classifier runs both inside the client (for refresh-path
306
- * discrimination) and at the bootstrap boundary (for caught-throw
307
- * routing). Stage 2 round-1 Codex M1.
395
+ * failure rather than an auth-token rejection? Used for refresh-path
396
+ * discrimination. Stage 2 round-1 Codex M1.
308
397
  */
309
398
  private static isNetworkLikeMessage;
310
399
  /**
@@ -314,6 +403,23 @@ export declare class AppSyncClient {
314
403
  /**
315
404
  * Refresh expired tokens
316
405
  */
406
+ private static abortReason;
407
+ private static throwIfAborted;
408
+ /**
409
+ * Bound one stage by its owning operation's absolute deadline. Every stage
410
+ * receives the same `deadlineAtMs`; a storage-backed retry therefore consumes
411
+ * the first attempt's elapsed time instead of acquiring another full timeout.
412
+ * `onTimeout` is used by network stages to abort their transport, while the
413
+ * explicit race remains authoritative when it ignores that signal.
414
+ */
415
+ private static awaitWithinAbsoluteDeadline;
416
+ /**
417
+ * Cancel only this caller's wait. The shared operation remains live for
418
+ * concurrent callers and its owner clears the single-flight slot only when
419
+ * the operation itself settles.
420
+ */
421
+ private static awaitSharedFlightForCaller;
422
+ private replaceTokens;
317
423
  private refreshTokens;
318
424
  /**
319
425
  * Do the work of refreshing tokens. Tries the caller-supplied tokens
@@ -337,25 +443,35 @@ export declare class AppSyncClient {
337
443
  */
338
444
  private callCognitoRefresh;
339
445
  /**
340
- * Apply a successful refresh response: update in-memory cache first,
341
- * clear the backoff sentinel, then persist to storage. Success here
342
- * is defined as "the process has usable fresh tokens in memory" —
343
- * storage persistence is degraded-success, not a failure mode.
446
+ * Apply a successful refresh response to this process's in-memory cache.
447
+ * Cognito's refresh response does not rotate the durable refresh token, so
448
+ * the already-stored credentials remain sufficient to refresh again after a
449
+ * restart.
344
450
  *
345
- * Ordering matters. The API call to Cognito already succeeded, which
346
- * means we hold valid access/id tokens right now. If we delayed the
347
- * in-memory update until after persistence and the keychain write
348
- * threw (keychain locked, disk full, file-backend permission error),
349
- * we'd be stuck with stale-and-known-dead tokens in memory while
350
- * holding valid fresh tokens in local scope that vanish at the end
351
- * of this function. That would re-break both guarantees this hotfix
352
- * makes: no-restart recovery becomes "restart required to escape
353
- * the keychain-lock window," and backoff stays unarmed so the
354
- * caller hot-loops against a working Cognito endpoint — R1's MEDIUM
355
- * on round 1 of this review. Persistence-failure is loud-logged
356
- * so operators can see degraded durability without losing availability.
451
+ * Do not rewrite durable login credentials from this background refresh.
452
+ * Native keychain writes are not cancellable: once a deadline wins, a late
453
+ * write could otherwise overwrite a newer out-of-band login or resurrect
454
+ * credentials deleted by a concurrent logout process. Login/logout remain
455
+ * the sole durable credential writers; refresh remains one bounded,
456
+ * memory-only operation.
357
457
  */
358
458
  private applyRefreshedTokens;
459
+ /**
460
+ * Reconcile durable login credentials with this process's token cache before
461
+ * reconnecting a WebSocket watcher.
462
+ *
463
+ * Background refresh deliberately leaves the durable refresh credential
464
+ * unchanged. When storage still contains the older access/id pair for that
465
+ * same refresh token, a newer non-expired in-memory pair must therefore win;
466
+ * otherwise every reconnect would issue a redundant Cognito refresh. A
467
+ * different stored refresh token is an out-of-band login and remains
468
+ * authoritative.
469
+ */
470
+ private reconcileTokensBeforeReconnect;
471
+ private performReconnectTokenReconciliation;
472
+ private beginReconnectReconciliationWait;
473
+ private finishReconnectReconciliationWait;
474
+ private cancelReconnectReconciliationWait;
359
475
  /**
360
476
  * Check if authenticated
361
477
  */
@@ -372,6 +488,21 @@ export declare class AppSyncClient {
372
488
  * Create a session
373
489
  */
374
490
  createSession(input: CreateSessionInput): Promise<Session>;
491
+ /**
492
+ * Blind-hold one canonical ContextItem. The mutation is idempotent only for
493
+ * an exact ciphertext+routing replay; a conflicting rewrite is rejected by
494
+ * the backend and therefore throws here, leaving the local durable outbox
495
+ * available for retry/diagnosis.
496
+ */
497
+ putContextItem(input: PutContextItemInput): Promise<void>;
498
+ /**
499
+ * Persist one host-authenticated execution fact. The payload is encrypted
500
+ * under the task's session key; for team child tasks the backend performs the
501
+ * same conditional write as the audit append to renew that exact track lease.
502
+ */
503
+ recordExecutionEvent(input: RecordExecutionEventInput, sessionKeyBase64: string, options?: {
504
+ signal?: AbortSignal;
505
+ }): Promise<void>;
375
506
  /**
376
507
  * Update a session
377
508
  */
@@ -385,6 +516,16 @@ export declare class AppSyncClient {
385
516
  * Create an event
386
517
  */
387
518
  createEvent(input: CreateEventInput): Promise<Event>;
519
+ /**
520
+ * E1 (§3.1) — liveness TTL co-refresh for the caller's still-open prompt rows
521
+ * (+ their deep-linked Events). Plugins call this heartbeat-driven for their
522
+ * durable open-prompt ledger so a >7-day-open prompt's row is NOT TTL-deleted
523
+ * (under-nag). The backend is scoped to `$ctx.identity.sub` + `attribute_exists`
524
+ * per promptId, so it works post-retirement too. Returns the promptIds whose
525
+ * row/Event had already aged out — the caller re-raises those (§6a-4
526
+ * return-driven re-raise). No-ops on an empty list (no network call).
527
+ */
528
+ refreshOpenPromptTtl(promptIds: string[]): Promise<string[]>;
388
529
  /**
389
530
  * Update event status
390
531
  */
@@ -402,6 +543,8 @@ export declare class AppSyncClient {
402
543
  agentType: string;
403
544
  status: string;
404
545
  lastHeartbeatAt: string | null;
546
+ createdAt: string | null;
547
+ updatedAt: string | null;
405
548
  }>>;
406
549
  /**
407
550
  * Mark stale ACTIVE sessions of a given agentType INACTIVE so they
@@ -409,19 +552,20 @@ export declare class AppSyncClient {
409
552
  * startup to clean up after daemons that died without running their
410
553
  * graceful shutdown (crash, auth-loop death, force-kill, power loss).
411
554
  *
412
- * Staleness rule: lastHeartbeatAt is older than `staleThresholdMs`
413
- * (default 15 min a conservative ~7.5× the 2-min heartbeat
414
- * interval, giving legitimately-active daemons on other machines
415
- * ample margin before we consider their session abandoned).
555
+ * Staleness rule: the newest usable timestamp among lastHeartbeatAt,
556
+ * createdAt, and updatedAt is older than `staleThresholdMs` (default
557
+ * 15 min — a conservative ~7.5× the 2-min heartbeat interval, giving
558
+ * legitimately-active daemons on other machines ample margin before
559
+ * we consider their session abandoned). createdAt/updatedAt cover a
560
+ * creator that dies before its first heartbeat.
416
561
  *
417
562
  * Safety:
418
563
  * - Only sessions with status === 'ACTIVE' are candidates.
419
564
  * - Sessions explicitly listed in `excludeSessionIds` are skipped
420
565
  * (caller can pass the session the daemon is about to attach to
421
566
  * if the ID is known before the sweep).
422
- * - Absent `lastHeartbeatAt` (never-heartbeated sessions should
423
- * only happen for rows created within the last few seconds)
424
- * treats the session as fresh and skips.
567
+ * - A row with no parseable heartbeat/create/update timestamp is
568
+ * skipped fail-safe; the sweeper never guesses its age.
425
569
  * - updateSession failures are logged as warnings and don't abort
426
570
  * the sweep — best-effort cleanup.
427
571
  *
@@ -648,7 +792,9 @@ export declare class AppSyncClient {
648
792
  * real classification; the signing helper is `signMergeClassification` in
649
793
  * `local-executor/class-a-sign.ts`). W2.a ships the SDK surface only.
650
794
  */
651
- submitMergeGateVerdict(input: SubmitMergeGateVerdictInput): Promise<SubmitMergeGateVerdictResult>;
795
+ submitMergeGateVerdict(input: SubmitMergeGateVerdictInput, opts?: {
796
+ signal?: AbortSignal;
797
+ }): Promise<SubmitMergeGateVerdictResult>;
652
798
  /**
653
799
  * PHASE-589/469 W1 (LOCK #589-F) — report that ONE team track HARD-FAILED
654
800
  * its own local gate (a declared-test failure or an out-of-scope write). The
@@ -700,6 +846,7 @@ export declare class AppSyncClient {
700
846
  sessionId: string;
701
847
  decision: PlannerDecision;
702
848
  availableAgents?: string[];
849
+ implementorAgent?: string;
703
850
  }): Promise<{
704
851
  workflowState: string;
705
852
  }>;
@@ -922,6 +1069,8 @@ export declare class AppSyncClient {
922
1069
  */
923
1070
  subscribeToEvents(sessionId: string, onEvent: (event: Event) => void, onError?: (error: Error) => void, options?: {
924
1071
  receiveDesktopEvents?: boolean;
1072
+ onSubscribed?: (isReconnect: boolean) => void;
1073
+ onSessionRetired?: () => Promise<void> | void;
925
1074
  }): () => void;
926
1075
  /**
927
1076
  * Build WebSocket URL
@@ -950,6 +1099,7 @@ export declare class AppSyncClient {
950
1099
  * Create WebSocket subscription
951
1100
  */
952
1101
  private createSubscription;
1102
+ private handleSubscriptionStartAck;
953
1103
  /**
954
1104
  * Send subscription start message
955
1105
  */
@@ -1059,19 +1209,37 @@ export declare class AppSyncClient {
1059
1209
  private handleApplyUserDecisionWatcherError;
1060
1210
  private cleanupApplyUserDecisionWatcherState;
1061
1211
  private heartbeatTimers;
1212
+ /** Identity tokens invalidate in-flight pulses when a session is stopped. */
1213
+ private heartbeatTokens;
1214
+ /** Shared initial confirmation makes duplicate start calls idempotent. */
1215
+ private heartbeatInitialPulses;
1216
+ private heartbeatInitialOutcomes;
1217
+ /** Every pulse that may still persist a timestamp, including periodic pulses. */
1218
+ private heartbeatInFlight;
1062
1219
  /**
1063
1220
  * Start periodic heartbeat for a session.
1064
1221
  * Updates lastHeartbeatAt on the session every intervalMs (default 2 minutes).
1065
1222
  */
1066
- startHeartbeat(sessionId: string, intervalMs?: number): void;
1223
+ startHeartbeat(sessionId: string, intervalMs?: number): Promise<boolean>;
1224
+ private startHeartbeatOutcome;
1067
1225
  /**
1068
1226
  * Stop heartbeat for a session.
1069
1227
  */
1070
1228
  stopHeartbeat(sessionId: string): void;
1229
+ /**
1230
+ * Fence every heartbeat generation, wait for already-issued timestamp writes,
1231
+ * then persist an expired timestamp so mobile immediately renders the desktop
1232
+ * disconnected. The ordering is load-bearing: writing the tombstone before an
1233
+ * in-flight pulse settles would let that older pulse make the row look live
1234
+ * again after this method returned.
1235
+ */
1236
+ invalidateHeartbeat(sessionId: string): Promise<boolean>;
1237
+ private trackHeartbeatPulse;
1071
1238
  /**
1072
1239
  * Send a single heartbeat update.
1073
1240
  */
1074
1241
  private sendHeartbeat;
1242
+ private notifyRetiredSession;
1075
1243
  /**
1076
1244
  * Tear down the mobile-event subscription for a SINGLE session.
1077
1245
  *
@@ -1,3 +1,4 @@
1
+ import type { Event } from '../types/events';
1
2
  /** Exposed for the single log line in createEvent. */
2
3
  export declare const CLIENT_THROTTLE_EVENTS_PER_WINDOW: number;
3
4
  interface RateWindow {
@@ -21,6 +22,38 @@ export declare function shouldSuppressEvent(sessionId: string, type: string, now
21
22
  export declare function consumeThrottleLogOnce(sessionId: string): RateWindow | undefined;
22
23
  /** Test-only: clears the per-process rate map. */
23
24
  export declare function resetThrottleState(): void;
25
+ /**
26
+ * True iff a `createEvent` result is PROVEN durably persisted by the backend (a real
27
+ * stored Events row), as opposed to a NON-persisted synthetic acknowledgement that
28
+ * EITHER throttle layer returns over-cap:
29
+ * - the CLIENT throttle above (`createEvent` short-circuit) → `eventId` prefixed
30
+ * `local-throttled-`, no `writerAuthenticated`;
31
+ * - the BACKEND Lambda's per-SESSION guardrail → fresh `generateId()`, no
32
+ * `writerAuthenticated`;
33
+ * - the BACKEND per-ACCOUNT guardrail → fresh `generateId()`, no
34
+ * `writerAuthenticated` (its `rateLimitNotice` marker is not even in the
35
+ * `createEvent` selection set, so it never reaches the client);
36
+ * none of which stored a row.
37
+ *
38
+ * The single reliable POSITIVE persistence signal is `writerAuthenticated`: the
39
+ * backend stamps it (a boolean — `false` for a non-writer emit, `true` for a writer-
40
+ * attested one) on EVERY persisted Event and returns it in the `createEvent`
41
+ * selection set (queries.ts). No synthetic populates it — the client synthetic omits
42
+ * it (→ `undefined`) and every backend synthetic omits it (→ `null` through GraphQL).
43
+ * `emittedBy` (the other persist-only attribute) is `EventAuthor!` (non-null) in the
44
+ * schema, so it CANNOT be selected on a mutation whose resolver may return a
45
+ * synthetic — a non-null field resolving to null would error the whole response —
46
+ * which is exactly why `writerAuthenticated` (nullable) is the only persist marker
47
+ * safely in the selection set. The `local-throttled-` guard is belt-and-suspenders.
48
+ *
49
+ * Deliberately CONSERVATIVE: returns true ONLY on positive proof, so any
50
+ * unrecognized / partial shape is treated as NOT-persisted. Callers use this to
51
+ * decide whether to record a legacy `TOOL_USE` id as "legacy-owned" (§4.8) — being
52
+ * wrong toward "not persisted" only forgoes a dedup (a cosmetic duplicate render),
53
+ * whereas being wrong toward "persisted" on a synthetic would suppress the
54
+ * consolidator re-derive and permanently SKIP the tool (G2). Never the latter.
55
+ */
56
+ export declare function isPersistedEventResult(event: Pick<Event, 'eventId' | 'writerAuthenticated'> | null | undefined): boolean;
24
57
  /** Test-only: current size of the per-process rate map (eviction-bound check). */
25
58
  export declare function throttleMapSize(): number;
26
59
  /** Test-only: whether a session is currently tracked (eviction assertions). */
@@ -1,5 +1,6 @@
1
- export { AppSyncClient, AppSyncGraphQLError, DownloadUrlResponse } from './appsync-client';
1
+ export { AppSyncClient, AppSyncAuthenticationError, AppSyncGraphQLError, DownloadUrlResponse, } from './appsync-client';
2
2
  export { coerceAwsJsonObject } from './appsync-client';
3
3
  export type { ClassBPacketEnvelopeMeta } from './appsync-client';
4
- export type { TaskReviewSummary, TaskReviewSummaryRound, TaskReviewSummaryReviewer, TaskGroupStatusResult, } from './appsync-client';
4
+ export type { TaskReviewSummary, TaskReviewSummaryRound, TaskReviewSummaryReviewer, TaskGroupStatusResult, PutContextItemInput, } from './appsync-client';
5
5
  export { queries, mutations, subscriptions } from './queries';
6
+ export { isPersistedEventResult } from './event-throttle';
@@ -7,8 +7,9 @@ export declare const queries: {
7
7
  * Minimal session listing used by the orphan-sweep path. Only the
8
8
  * fields needed to decide whether a session row is stale — sessionId
9
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.
10
+ * status to skip non-ACTIVE rows, lastHeartbeatAt for the usual age
11
+ * check, and createdAt/updatedAt as the startup-age fallback for rows
12
+ * whose creator died before its first heartbeat.
12
13
  */
13
14
  listSessions: string;
14
15
  getSubscriptionStatus: string;
@@ -23,9 +24,12 @@ export declare const queries: {
23
24
  getTaskReviewSummary: string;
24
25
  };
25
26
  export declare const mutations: {
27
+ recordExecutionEvent: string;
28
+ putContextItem: string;
26
29
  createSession: string;
27
30
  updateSession: string;
28
31
  createEvent: string;
32
+ refreshOpenPromptTtl: string;
29
33
  updateEventStatus: string;
30
34
  registerDeviceKey: string;
31
35
  grantSessionKey: string;
@@ -23,6 +23,31 @@ export type AuthFailureReason = 'port_in_use' | 'port_range_exhausted' | 'server
23
23
  * not user AFK).
24
24
  */
25
25
  export type AuthStage = 'server_start' | 'browser_open' | 'awaiting_callback' | 'exchanging_code' | 'storing_tokens' | 'unknown';
26
+ /**
27
+ * Preserve the retired shell wrappers' exact activation-funnel identity.
28
+ * POSIX `echo` added a trailing newline before hashing, so omitting `\n` here
29
+ * would split the same machine across two GA4 client IDs after the A6 cutover.
30
+ */
31
+ declare function getLegacyWrapperClientId(): string;
32
+ /**
33
+ * Agent label used by the long-lived `wrapper_launched` activation-funnel
34
+ * event. Keep these values aligned with the historical public-wrapper event so
35
+ * the 2.x unified CLI continues the same GA4 series.
36
+ */
37
+ export type CompanionActivationAgent = 'claude' | 'codex' | 'antigravity';
38
+ declare function legacyWrapperBaseParams(): Record<string, string>;
39
+ /**
40
+ * Preserve the final activation-funnel event after A6 retires the public
41
+ * `codevibe-*` wrappers. The unified Companion route calls this exactly once
42
+ * after resolving the selected agent and before handing off to its private
43
+ * launcher. The caller awaits the bounded best-effort transport before its
44
+ * synchronous child handoff blocks the event loop.
45
+ */
46
+ export declare function fireWrapperLaunchedBeacon(agent: CompanionActivationAgent): Promise<void>;
47
+ export declare const __testing: {
48
+ getLegacyWrapperClientId: typeof getLegacyWrapperClientId;
49
+ legacyWrapperBaseParams: typeof legacyWrapperBaseParams;
50
+ };
26
51
  /**
27
52
  * Fire the `auth_completed` success beacon. Replaces the inline POST
28
53
  * previously duplicated in `auth-cli.ts`. Includes `user_id` so the
@@ -165,3 +190,4 @@ export declare function fireSessionEncryptionSelfRekeyTimeoutBeacon(params: {
165
190
  session_hash: string;
166
191
  attempt_count: number;
167
192
  }): Promise<void>;
193
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Run the `keychain` subcommand group. Returns the process exit code (does NOT
3
+ * call `process.exit` — the caller does, keeping this unit-testable). `argv` is
4
+ * the raw process argv (node, script, "keychain", subcommand, flags…).
5
+ */
6
+ export declare function runKeychainCli(argv: string[]): Promise<number>;
@@ -0,0 +1,49 @@
1
+ import { type OAuthAccountLock } from "../credential-broker/oauth-account-lock";
2
+ import type { VendorKeyStore, VendorOAuthBundle } from "../credential-broker/types";
3
+ /** Injectable IO seam so the subcommands are unit-testable without a TTY. */
4
+ export interface VendorKeyCliIO {
5
+ print(line: string): void;
6
+ printErr(line: string): void;
7
+ /** Read a secret with NO echo (hidden). Never appears in argv/logs. */
8
+ readSecret(prompt: string): Promise<string>;
9
+ /** Read a visible yes/no consent answer. */
10
+ confirm(prompt: string): Promise<boolean>;
11
+ }
12
+ /** Injectable dependencies (production defaults wire the real store/keychain/lock). */
13
+ export interface VendorKeyCliDeps {
14
+ store: VendorKeyStore;
15
+ io: VendorKeyCliIO;
16
+ /** The §5 cross-process OAuth-account lock for C4 mutations. */
17
+ oauthLock: OAuthAccountLock;
18
+ /**
19
+ * Resolve (WITHOUT reading) the Codex auth file path — displayed in the consent
20
+ * prompt BEFORE any read (§4/§7: the prompt must authorize the read it names).
21
+ */
22
+ codexAuthPath: () => string;
23
+ /** Read `~/.codex/auth.json` raw contents (or null if missing) — ONLY AFTER consent. */
24
+ readCodexAuth: (authPath: string) => Promise<string | null>;
25
+ /**
26
+ * Content-BLIND existence check for the Codex auth file — used by the setup
27
+ * wizard for flow control WITHOUT reading token material before consent
28
+ * (§4/§7). Never opens/parses the file; existence only.
29
+ */
30
+ codexAuthExists: (authPath: string) => Promise<boolean>;
31
+ /** True iff the OS-native keychain is the active custody backend. */
32
+ custodyAvailable: () => boolean;
33
+ now: () => Date;
34
+ /**
35
+ * Run `claude setup-token` interactively with INHERITED stdio (the token is
36
+ * displayed by the claude CLI itself and pasted by the user — never captured
37
+ * from the subprocess). Resolves the exit code, or null when the `claude`
38
+ * binary is not on PATH.
39
+ */
40
+ runClaudeSetupToken: () => Promise<number | null>;
41
+ }
42
+ /** Parse a Codex `auth.json` into the C4 bundle. Never logs token material. */
43
+ export declare function parseCodexAuth(raw: string): VendorOAuthBundle | null;
44
+ /**
45
+ * Run the `vendor-key` subcommand group. Returns the process exit code (does NOT
46
+ * call `process.exit` — the caller does, keeping this unit-testable). `argv` is
47
+ * the full process argv (node, script, `vendor-key`, sub, …).
48
+ */
49
+ export declare function runVendorKeyCli(argv: string[], depsOverride?: Partial<VendorKeyCliDeps>): Promise<number>;