@quantiya/codevibe-claude-plugin 2.0.7 → 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 (304) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/server.js +11 -11
  3. package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +170 -30
  4. package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +2 -0
  5. package/node_modules/@quantiya/codevibe-core/dist/auth/__tests__/keychain-cli.test.d.ts +1 -0
  6. package/node_modules/@quantiya/codevibe-core/dist/auth/keychain-cli.d.ts +6 -0
  7. package/node_modules/@quantiya/codevibe-core/dist/companion-mode/index.d.ts +14 -0
  8. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/oauth-account-lock.d.ts +47 -1
  9. package/node_modules/@quantiya/codevibe-core/dist/crypto/__tests__/open-prompt-id.test.d.ts +1 -0
  10. package/node_modules/@quantiya/codevibe-core/dist/crypto/index.d.ts +1 -0
  11. package/node_modules/@quantiya/codevibe-core/dist/crypto/open-prompt-id.d.ts +36 -0
  12. package/node_modules/@quantiya/codevibe-core/dist/e1/__tests__/prompt-raise.test.d.ts +1 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/e1/index.d.ts +2 -0
  14. package/node_modules/@quantiya/codevibe-core/dist/e1/prompt-raise.d.ts +65 -0
  15. package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +4 -1
  16. package/node_modules/@quantiya/codevibe-core/dist/index.js +4480 -252
  17. package/node_modules/@quantiya/codevibe-core/dist/keychain/__tests__/keychain-manager.test.d.ts +1 -0
  18. package/node_modules/@quantiya/codevibe-core/dist/keychain/__tests__/keychain-migrate.test.d.ts +1 -0
  19. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-backend.d.ts +105 -0
  20. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +17 -3
  21. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-migrate.d.ts +46 -0
  22. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/anchored-fs.test.d.ts +1 -0
  23. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/bounded-directory.test.d.ts +1 -0
  24. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/bounded-output.test.d.ts +1 -0
  25. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/durable-directory.test.d.ts +1 -0
  26. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/hosted-class-a-sink.test.d.ts +1 -0
  27. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/process-identity.test.d.ts +1 -0
  28. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/process-tree.test.d.ts +1 -0
  29. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/publication-authority-capability.test.d.ts +1 -0
  30. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/snapshot-merge.test.d.ts +1 -0
  31. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/workspace-authority-fixture.d.ts +3 -0
  32. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/workspace-authority.test.d.ts +1 -0
  33. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/workspace-materializer.test.d.ts +1 -0
  34. package/node_modules/@quantiya/codevibe-core/dist/local-executor/agentic-disposable-repo.d.ts +23 -6
  35. package/node_modules/@quantiya/codevibe-core/dist/local-executor/agentic-resolve.d.ts +16 -0
  36. package/node_modules/@quantiya/codevibe-core/dist/local-executor/anchored-fs.d.ts +243 -0
  37. package/node_modules/@quantiya/codevibe-core/dist/local-executor/bounded-directory.d.ts +64 -0
  38. package/node_modules/@quantiya/codevibe-core/dist/local-executor/bounded-helper.d.ts +22 -0
  39. package/node_modules/@quantiya/codevibe-core/dist/local-executor/bounded-output.d.ts +11 -0
  40. package/node_modules/@quantiya/codevibe-core/dist/local-executor/class-a-emit.d.ts +13 -1
  41. package/node_modules/@quantiya/codevibe-core/dist/local-executor/durable-directory.d.ts +25 -0
  42. package/node_modules/@quantiya/codevibe-core/dist/local-executor/durable-store.d.ts +217 -25
  43. package/node_modules/@quantiya/codevibe-core/dist/local-executor/hosted-class-a-sink.d.ts +27 -0
  44. package/node_modules/@quantiya/codevibe-core/dist/local-executor/index.d.ts +3 -2
  45. package/node_modules/@quantiya/codevibe-core/dist/local-executor/local-executor-impl.d.ts +159 -69
  46. package/node_modules/@quantiya/codevibe-core/dist/local-executor/process-identity.d.ts +16 -0
  47. package/node_modules/@quantiya/codevibe-core/dist/local-executor/process-tree.d.ts +123 -0
  48. package/node_modules/@quantiya/codevibe-core/dist/local-executor/revert-reconcile.d.ts +4 -0
  49. package/node_modules/@quantiya/codevibe-core/dist/local-executor/revert-runner.d.ts +14 -1
  50. package/node_modules/@quantiya/codevibe-core/dist/local-executor/snapshot-merge.d.ts +124 -0
  51. package/node_modules/@quantiya/codevibe-core/dist/local-executor/task-group-types.d.ts +7 -6
  52. package/node_modules/@quantiya/codevibe-core/dist/local-executor/team-execution-flag.d.ts +2 -2
  53. package/node_modules/@quantiya/codevibe-core/dist/local-executor/track-registry.d.ts +2 -0
  54. package/node_modules/@quantiya/codevibe-core/dist/local-executor/types.d.ts +33 -2
  55. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/build.d.ts +5 -0
  56. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/deploy-preflight.d.ts +2 -0
  57. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/diff-sanity.d.ts +12 -0
  58. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/hostile-grep.d.ts +2 -0
  59. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/lint.d.ts +2 -0
  60. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/shell-runner.d.ts +5 -0
  61. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/source-traceability.d.ts +2 -0
  62. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/tests.d.ts +3 -0
  63. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-gates/typecheck.d.ts +3 -0
  64. package/node_modules/@quantiya/codevibe-core/dist/local-executor/verification-runner.d.ts +6 -0
  65. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-authority.d.ts +45 -0
  66. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-materializer.d.ts +27 -0
  67. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-shadow.d.ts +378 -85
  68. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/advisory-attachment-journal.test.d.ts +1 -0
  69. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/planner-offer-e1.test.d.ts +1 -0
  70. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/workspace-shutdown.test.d.ts +1 -0
  71. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/advisory-attachment-journal.d.ts +165 -0
  72. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/attachments.d.ts +47 -58
  73. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/bounded-shutdown.d.ts +6 -0
  74. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +36938 -27120
  75. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/declared-test-runner.d.ts +21 -2
  76. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/emit-shell-event.d.ts +7 -0
  77. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/explicit-tty-exit.d.ts +1 -2
  78. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-decision-submit.d.ts +11 -0
  79. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-prompts.d.ts +75 -0
  80. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +3 -0
  81. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/planner-offer-e1.d.ts +97 -0
  82. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/quorum-loop.d.ts +270 -60
  83. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/reducer.d.ts +9 -0
  84. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/task-progress.d.ts +15 -4
  85. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/team-decompose.d.ts +10 -10
  86. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +32 -2
  87. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/workspace-shutdown.d.ts +27 -0
  88. package/node_modules/@quantiya/codevibe-core/dist/reviewer/output-parser.d.ts +19 -0
  89. package/node_modules/@quantiya/codevibe-core/dist/reviewer/types.d.ts +3 -0
  90. package/node_modules/@quantiya/codevibe-core/dist/reviewer/verdict-classifier.d.ts +1 -0
  91. package/node_modules/@quantiya/codevibe-core/dist/session/session-rekey.d.ts +4 -3
  92. package/node_modules/@quantiya/codevibe-core/dist/substrate/command-runner.d.ts +2 -0
  93. package/node_modules/@quantiya/codevibe-core/dist/substrate/docker.d.ts +7 -32
  94. package/node_modules/@quantiya/codevibe-core/dist/substrate/index.d.ts +0 -1
  95. package/node_modules/@quantiya/codevibe-core/dist/substrate/sandbox-exec.d.ts +0 -13
  96. package/node_modules/@quantiya/codevibe-core/dist/substrate/types.d.ts +7 -2
  97. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/__tests__/reviewer-credential-preflight.test.d.ts +1 -0
  98. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/engage-substrate.d.ts +3 -0
  99. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/index.d.ts +2 -0
  100. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/reviewer-credential-preflight.d.ts +50 -0
  101. package/node_modules/@quantiya/codevibe-core/dist/test-publication-authority-setup.d.ts +1 -0
  102. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/replay-cursor.d.ts +42 -8
  103. package/node_modules/@quantiya/codevibe-core/dist/types/encryption.d.ts +5 -0
  104. package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +5 -0
  105. package/node_modules/@quantiya/codevibe-core/package.json +3 -3
  106. package/node_modules/es-toolkit/CHANGELOG.md +46 -0
  107. package/node_modules/es-toolkit/dist/array/partition.d.mts +5 -4
  108. package/node_modules/es-toolkit/dist/array/partition.d.ts +5 -4
  109. package/node_modules/es-toolkit/dist/array/unzipWith.js +1 -1
  110. package/node_modules/es-toolkit/dist/array/unzipWith.mjs +1 -1
  111. package/node_modules/es-toolkit/dist/browser.global.js +3 -3
  112. package/node_modules/es-toolkit/dist/compat/_internal/ListIterateeCustom.d.mts +3 -2
  113. package/node_modules/es-toolkit/dist/compat/_internal/ListIterateeCustom.d.ts +3 -2
  114. package/node_modules/es-toolkit/dist/compat/_internal/assignValue.js +2 -3
  115. package/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs +2 -3
  116. package/node_modules/es-toolkit/dist/compat/_internal/createPadding.js +14 -0
  117. package/node_modules/es-toolkit/dist/compat/_internal/createPadding.mjs +13 -0
  118. package/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +14 -1
  119. package/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs +14 -1
  120. package/node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.js +2 -3
  121. package/node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.mjs +2 -3
  122. package/node_modules/es-toolkit/dist/compat/_internal/regexMultiByte.js +11 -0
  123. package/node_modules/es-toolkit/dist/compat/_internal/regexMultiByte.mjs +11 -0
  124. package/node_modules/es-toolkit/dist/compat/array/every.js +5 -24
  125. package/node_modules/es-toolkit/dist/compat/array/every.mjs +5 -24
  126. package/node_modules/es-toolkit/dist/compat/array/filter.d.mts +7 -3
  127. package/node_modules/es-toolkit/dist/compat/array/filter.d.ts +7 -3
  128. package/node_modules/es-toolkit/dist/compat/array/filter.js +11 -11
  129. package/node_modules/es-toolkit/dist/compat/array/filter.mjs +11 -11
  130. package/node_modules/es-toolkit/dist/compat/array/find.d.mts +10 -6
  131. package/node_modules/es-toolkit/dist/compat/array/find.d.ts +10 -6
  132. package/node_modules/es-toolkit/dist/compat/array/find.js +1 -1
  133. package/node_modules/es-toolkit/dist/compat/array/find.mjs +1 -1
  134. package/node_modules/es-toolkit/dist/compat/array/findIndex.d.mts +0 -1
  135. package/node_modules/es-toolkit/dist/compat/array/findIndex.d.ts +0 -1
  136. package/node_modules/es-toolkit/dist/compat/array/findIndex.js +2 -1
  137. package/node_modules/es-toolkit/dist/compat/array/findIndex.mjs +2 -1
  138. package/node_modules/es-toolkit/dist/compat/array/findLast.d.mts +1 -1
  139. package/node_modules/es-toolkit/dist/compat/array/findLast.d.ts +1 -1
  140. package/node_modules/es-toolkit/dist/compat/array/findLast.js +12 -12
  141. package/node_modules/es-toolkit/dist/compat/array/findLast.mjs +12 -12
  142. package/node_modules/es-toolkit/dist/compat/array/findLastIndex.js +1 -0
  143. package/node_modules/es-toolkit/dist/compat/array/findLastIndex.mjs +1 -0
  144. package/node_modules/es-toolkit/dist/compat/array/flatMap.js +3 -2
  145. package/node_modules/es-toolkit/dist/compat/array/flatMap.mjs +3 -2
  146. package/node_modules/es-toolkit/dist/compat/array/flatMapDepth.js +2 -2
  147. package/node_modules/es-toolkit/dist/compat/array/flatMapDepth.mjs +2 -2
  148. package/node_modules/es-toolkit/dist/compat/array/flatten.d.mts +4 -5
  149. package/node_modules/es-toolkit/dist/compat/array/flatten.d.ts +4 -5
  150. package/node_modules/es-toolkit/dist/compat/array/flatten.js +14 -15
  151. package/node_modules/es-toolkit/dist/compat/array/flatten.mjs +14 -15
  152. package/node_modules/es-toolkit/dist/compat/array/flattenDeep.d.mts +1 -1
  153. package/node_modules/es-toolkit/dist/compat/array/flattenDeep.d.ts +1 -1
  154. package/node_modules/es-toolkit/dist/compat/array/flattenDeep.js +2 -2
  155. package/node_modules/es-toolkit/dist/compat/array/flattenDeep.mjs +2 -2
  156. package/node_modules/es-toolkit/dist/compat/array/flattenDepth.js +18 -2
  157. package/node_modules/es-toolkit/dist/compat/array/flattenDepth.mjs +18 -2
  158. package/node_modules/es-toolkit/dist/compat/array/groupBy.js +5 -4
  159. package/node_modules/es-toolkit/dist/compat/array/groupBy.mjs +4 -3
  160. package/node_modules/es-toolkit/dist/compat/array/includes.js +8 -3
  161. package/node_modules/es-toolkit/dist/compat/array/includes.mjs +8 -3
  162. package/node_modules/es-toolkit/dist/compat/array/intersectionBy.js +12 -5
  163. package/node_modules/es-toolkit/dist/compat/array/intersectionBy.mjs +12 -5
  164. package/node_modules/es-toolkit/dist/compat/array/intersectionWith.js +2 -3
  165. package/node_modules/es-toolkit/dist/compat/array/intersectionWith.mjs +2 -3
  166. package/node_modules/es-toolkit/dist/compat/array/invokeMap.js +3 -7
  167. package/node_modules/es-toolkit/dist/compat/array/invokeMap.mjs +3 -4
  168. package/node_modules/es-toolkit/dist/compat/array/lastIndexOf.js +3 -2
  169. package/node_modules/es-toolkit/dist/compat/array/lastIndexOf.mjs +3 -2
  170. package/node_modules/es-toolkit/dist/compat/array/nth.js +2 -2
  171. package/node_modules/es-toolkit/dist/compat/array/nth.mjs +2 -2
  172. package/node_modules/es-toolkit/dist/compat/array/pullAllWith.js +2 -3
  173. package/node_modules/es-toolkit/dist/compat/array/pullAllWith.mjs +2 -3
  174. package/node_modules/es-toolkit/dist/compat/array/size.js +2 -0
  175. package/node_modules/es-toolkit/dist/compat/array/size.mjs +2 -0
  176. package/node_modules/es-toolkit/dist/compat/array/sortedIndexOf.js +2 -3
  177. package/node_modules/es-toolkit/dist/compat/array/sortedIndexOf.mjs +2 -3
  178. package/node_modules/es-toolkit/dist/compat/array/sortedLastIndexOf.js +2 -3
  179. package/node_modules/es-toolkit/dist/compat/array/sortedLastIndexOf.mjs +2 -3
  180. package/node_modules/es-toolkit/dist/compat/compat.d.mts +4 -3
  181. package/node_modules/es-toolkit/dist/compat/compat.d.ts +4 -3
  182. package/node_modules/es-toolkit/dist/compat/compat.js +10 -11
  183. package/node_modules/es-toolkit/dist/compat/compat.mjs +10 -11
  184. package/node_modules/es-toolkit/dist/compat/index.d.mts +4 -3
  185. package/node_modules/es-toolkit/dist/compat/index.d.ts +4 -3
  186. package/node_modules/es-toolkit/dist/compat/index.js +10 -9
  187. package/node_modules/es-toolkit/dist/compat/index.mjs +10 -9
  188. package/node_modules/es-toolkit/dist/compat/math/inRange.d.mts +5 -2
  189. package/node_modules/es-toolkit/dist/compat/math/inRange.d.ts +5 -2
  190. package/node_modules/es-toolkit/dist/compat/math/inRange.js +14 -11
  191. package/node_modules/es-toolkit/dist/compat/math/inRange.mjs +14 -11
  192. package/node_modules/es-toolkit/dist/compat/math/maxBy.d.mts +1 -1
  193. package/node_modules/es-toolkit/dist/compat/math/maxBy.d.ts +1 -1
  194. package/node_modules/es-toolkit/dist/compat/math/maxBy.js +18 -4
  195. package/node_modules/es-toolkit/dist/compat/math/maxBy.mjs +18 -4
  196. package/node_modules/es-toolkit/dist/compat/math/minBy.d.mts +1 -1
  197. package/node_modules/es-toolkit/dist/compat/math/minBy.d.ts +1 -1
  198. package/node_modules/es-toolkit/dist/compat/math/minBy.js +18 -4
  199. package/node_modules/es-toolkit/dist/compat/math/minBy.mjs +18 -4
  200. package/node_modules/es-toolkit/dist/compat/object/assign.js +2 -3
  201. package/node_modules/es-toolkit/dist/compat/object/assign.mjs +2 -3
  202. package/node_modules/es-toolkit/dist/compat/object/assignIn.js +2 -3
  203. package/node_modules/es-toolkit/dist/compat/object/assignIn.mjs +2 -3
  204. package/node_modules/es-toolkit/dist/compat/object/assignInWith.js +2 -3
  205. package/node_modules/es-toolkit/dist/compat/object/assignInWith.mjs +2 -3
  206. package/node_modules/es-toolkit/dist/compat/object/assignWith.js +2 -3
  207. package/node_modules/es-toolkit/dist/compat/object/assignWith.mjs +2 -3
  208. package/node_modules/es-toolkit/dist/compat/object/create.js +1 -1
  209. package/node_modules/es-toolkit/dist/compat/object/create.mjs +1 -1
  210. package/node_modules/es-toolkit/dist/compat/object/defaults.js +2 -3
  211. package/node_modules/es-toolkit/dist/compat/object/defaults.mjs +2 -3
  212. package/node_modules/es-toolkit/dist/compat/object/has.js +1 -1
  213. package/node_modules/es-toolkit/dist/compat/object/has.mjs +1 -1
  214. package/node_modules/es-toolkit/dist/compat/object/hasIn.js +1 -1
  215. package/node_modules/es-toolkit/dist/compat/object/hasIn.mjs +1 -1
  216. package/node_modules/es-toolkit/dist/compat/object/unset.js +1 -1
  217. package/node_modules/es-toolkit/dist/compat/object/unset.mjs +1 -1
  218. package/node_modules/es-toolkit/dist/compat/object/values.js +5 -1
  219. package/node_modules/es-toolkit/dist/compat/object/values.mjs +5 -1
  220. package/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +4 -5
  221. package/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.mjs +4 -5
  222. package/node_modules/es-toolkit/dist/compat/string/camelCase.js +6 -2
  223. package/node_modules/es-toolkit/dist/compat/string/camelCase.mjs +6 -2
  224. package/node_modules/es-toolkit/dist/compat/string/kebabCase.js +2 -2
  225. package/node_modules/es-toolkit/dist/compat/string/kebabCase.mjs +2 -2
  226. package/node_modules/es-toolkit/dist/compat/string/lowerCase.js +2 -2
  227. package/node_modules/es-toolkit/dist/compat/string/lowerCase.mjs +2 -2
  228. package/node_modules/es-toolkit/dist/compat/string/pad.js +10 -3
  229. package/node_modules/es-toolkit/dist/compat/string/pad.mjs +10 -3
  230. package/node_modules/es-toolkit/dist/compat/string/padEnd.js +7 -1
  231. package/node_modules/es-toolkit/dist/compat/string/padEnd.mjs +7 -1
  232. package/node_modules/es-toolkit/dist/compat/string/padStart.js +7 -1
  233. package/node_modules/es-toolkit/dist/compat/string/padStart.mjs +7 -1
  234. package/node_modules/es-toolkit/dist/compat/string/snakeCase.js +2 -2
  235. package/node_modules/es-toolkit/dist/compat/string/snakeCase.mjs +2 -2
  236. package/node_modules/es-toolkit/dist/compat/string/startCase.js +1 -1
  237. package/node_modules/es-toolkit/dist/compat/string/startCase.mjs +1 -1
  238. package/node_modules/es-toolkit/dist/compat/string/template.d.mts +1 -1
  239. package/node_modules/es-toolkit/dist/compat/string/template.d.ts +1 -1
  240. package/node_modules/es-toolkit/dist/compat/string/templateSettings.d.mts +18 -1
  241. package/node_modules/es-toolkit/dist/compat/string/templateSettings.d.ts +18 -1
  242. package/node_modules/es-toolkit/dist/compat/string/templateSettings.js +4 -1
  243. package/node_modules/es-toolkit/dist/compat/string/templateSettings.mjs +5 -1
  244. package/node_modules/es-toolkit/dist/compat/string/truncate.js +2 -9
  245. package/node_modules/es-toolkit/dist/compat/string/truncate.mjs +1 -8
  246. package/node_modules/es-toolkit/dist/compat/string/upperCase.js +2 -2
  247. package/node_modules/es-toolkit/dist/compat/string/upperCase.mjs +2 -2
  248. package/node_modules/es-toolkit/dist/compat/util/eq.d.mts +17 -1
  249. package/node_modules/es-toolkit/dist/compat/util/eq.d.ts +17 -1
  250. package/node_modules/es-toolkit/dist/compat/util/eq.js +19 -1
  251. package/node_modules/es-toolkit/dist/compat/util/eq.mjs +19 -1
  252. package/node_modules/es-toolkit/dist/compat/util/toArray.js +2 -1
  253. package/node_modules/es-toolkit/dist/compat/util/toArray.mjs +2 -1
  254. package/node_modules/es-toolkit/dist/fp/flow.d.mts +213 -0
  255. package/node_modules/es-toolkit/dist/fp/flow.d.ts +213 -0
  256. package/node_modules/es-toolkit/dist/fp/flow.js +50 -0
  257. package/node_modules/es-toolkit/dist/fp/flow.mjs +50 -0
  258. package/node_modules/es-toolkit/dist/fp/index.d.mts +2 -1
  259. package/node_modules/es-toolkit/dist/fp/index.d.ts +2 -1
  260. package/node_modules/es-toolkit/dist/fp/index.js +3 -1
  261. package/node_modules/es-toolkit/dist/fp/index.mjs +3 -2
  262. package/node_modules/es-toolkit/dist/fp/pipe.js +8 -12
  263. package/node_modules/es-toolkit/dist/fp/pipe.mjs +8 -12
  264. package/node_modules/es-toolkit/dist/map/hasValue.js +2 -2
  265. package/node_modules/es-toolkit/dist/map/hasValue.mjs +2 -2
  266. package/node_modules/es-toolkit/dist/predicate/isEqualWith.js +2 -3
  267. package/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs +2 -3
  268. package/node_modules/es-toolkit/dist/string/deburr.js +1 -1
  269. package/node_modules/es-toolkit/dist/string/deburr.mjs +1 -1
  270. package/node_modules/es-toolkit/dist/types/DeepPartial.d.mts +21 -0
  271. package/node_modules/es-toolkit/dist/types/DeepPartial.d.ts +21 -0
  272. package/node_modules/es-toolkit/dist/types/DeepReadonly.d.mts +22 -0
  273. package/node_modules/es-toolkit/dist/types/DeepReadonly.d.ts +22 -0
  274. package/node_modules/es-toolkit/dist/types/NonEmptyArray.d.mts +14 -0
  275. package/node_modules/es-toolkit/dist/types/NonEmptyArray.d.ts +14 -0
  276. package/node_modules/es-toolkit/dist/types/Simplify.d.mts +18 -0
  277. package/node_modules/es-toolkit/dist/types/Simplify.d.ts +18 -0
  278. package/node_modules/es-toolkit/dist/types/ValueOf.d.mts +14 -0
  279. package/node_modules/es-toolkit/dist/types/ValueOf.d.ts +14 -0
  280. package/node_modules/es-toolkit/dist/types/Writable.d.mts +15 -0
  281. package/node_modules/es-toolkit/dist/types/Writable.d.ts +15 -0
  282. package/node_modules/es-toolkit/dist/types/index.d.mts +7 -0
  283. package/node_modules/es-toolkit/dist/types/index.d.ts +7 -0
  284. package/node_modules/es-toolkit/package.json +23 -7
  285. package/node_modules/es-toolkit/types.d.ts +1 -0
  286. package/node_modules/fs-ext/build/Makefile +347 -0
  287. package/node_modules/fs-ext/build/Release/.deps/Release/fs_ext.node.d +1 -0
  288. package/node_modules/fs-ext/build/Release/.deps/Release/obj.target/fs_ext/fs-ext.o.d +165 -0
  289. package/node_modules/fs-ext/build/Release/fs_ext.node +0 -0
  290. package/node_modules/fs-ext/build/Release/obj.target/fs_ext/fs-ext.o +0 -0
  291. package/node_modules/fs-ext/build/binding.Makefile +6 -0
  292. package/node_modules/fs-ext/build/config.gypi +503 -0
  293. package/node_modules/fs-ext/build/fs_ext.target.mk +183 -0
  294. package/node_modules/fs-ext/build/gyp-mac-tool +768 -0
  295. package/node_modules/media-typer/README.md +15 -14
  296. package/node_modules/media-typer/index.js +0 -8
  297. package/node_modules/media-typer/package.json +16 -12
  298. package/package.json +2 -2
  299. package/node_modules/@quantiya/codevibe-core/dist/substrate/git-proxy.d.ts +0 -35
  300. package/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.d.mts +0 -17
  301. package/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.d.ts +0 -17
  302. package/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.js +0 -19
  303. package/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs +0 -19
  304. /package/node_modules/@quantiya/codevibe-core/dist/{substrate/__tests__/git-proxy.test.d.ts → appsync/__tests__/refresh-open-prompt-ttl-chunk.test.d.ts} +0 -0
@@ -18,17 +18,17 @@ export declare const WorkItemInputSchema: z.ZodDiscriminatedUnion<"decompose", [
18
18
  access: z.ZodEnum<["write", "read"]>;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  path: string;
21
- access: "write" | "read";
21
+ access: "read" | "write";
22
22
  }, {
23
23
  path: string;
24
- access: "write" | "read";
24
+ access: "read" | "write";
25
25
  }>, "many">;
26
26
  test_surfaces: z.ZodArray<z.ZodString, "many">;
27
27
  auto_modified_files: z.ZodArray<z.ZodString, "many">;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  shared_contracts: {
30
30
  path: string;
31
- access: "write" | "read";
31
+ access: "read" | "write";
32
32
  }[];
33
33
  write_paths: string[];
34
34
  test_surfaces: string[];
@@ -36,7 +36,7 @@ export declare const WorkItemInputSchema: z.ZodDiscriminatedUnion<"decompose", [
36
36
  }, {
37
37
  shared_contracts: {
38
38
  path: string;
39
- access: "write" | "read";
39
+ access: "read" | "write";
40
40
  }[];
41
41
  write_paths: string[];
42
42
  test_surfaces: string[];
@@ -50,7 +50,7 @@ export declare const WorkItemInputSchema: z.ZodDiscriminatedUnion<"decompose", [
50
50
  ownershipScope: {
51
51
  shared_contracts: {
52
52
  path: string;
53
- access: "write" | "read";
53
+ access: "read" | "write";
54
54
  }[];
55
55
  write_paths: string[];
56
56
  test_surfaces: string[];
@@ -63,7 +63,7 @@ export declare const WorkItemInputSchema: z.ZodDiscriminatedUnion<"decompose", [
63
63
  ownershipScope: {
64
64
  shared_contracts: {
65
65
  path: string;
66
- access: "write" | "read";
66
+ access: "read" | "write";
67
67
  }[];
68
68
  write_paths: string[];
69
69
  test_surfaces: string[];
@@ -73,13 +73,12 @@ export declare const WorkItemInputSchema: z.ZodDiscriminatedUnion<"decompose", [
73
73
  implementorAgent?: unknown;
74
74
  }>, "many">;
75
75
  }, "strip", z.ZodTypeAny, {
76
- decompose: true;
77
76
  workItems: {
78
77
  description: string;
79
78
  ownershipScope: {
80
79
  shared_contracts: {
81
80
  path: string;
82
- access: "write" | "read";
81
+ access: "read" | "write";
83
82
  }[];
84
83
  write_paths: string[];
85
84
  test_surfaces: string[];
@@ -88,14 +87,14 @@ export declare const WorkItemInputSchema: z.ZodDiscriminatedUnion<"decompose", [
88
87
  implementorAgent: "CLAUDE" | "CODEX" | "ANTIGRAVITY";
89
88
  isSharedTestOwner: boolean;
90
89
  }[];
91
- }, {
92
90
  decompose: true;
91
+ }, {
93
92
  workItems: {
94
93
  description: string;
95
94
  ownershipScope: {
96
95
  shared_contracts: {
97
96
  path: string;
98
- access: "write" | "read";
97
+ access: "read" | "write";
99
98
  }[];
100
99
  write_paths: string[];
101
100
  test_surfaces: string[];
@@ -104,6 +103,7 @@ export declare const WorkItemInputSchema: z.ZodDiscriminatedUnion<"decompose", [
104
103
  isSharedTestOwner: boolean;
105
104
  implementorAgent?: unknown;
106
105
  }[];
106
+ decompose: true;
107
107
  }>, z.ZodObject<{
108
108
  decompose: z.ZodLiteral<false>;
109
109
  reason: z.ZodString;
@@ -136,6 +136,29 @@ export interface RunningTaskState {
136
136
  exitCode?: number;
137
137
  bypassReason?: 'deterministic_shortcut' | 'planner_outage' | 'planner_degraded_explicit_override';
138
138
  }
139
+ /**
140
+ * P10 E3 r2 — one row of the bare-`/audit` session listing (the
141
+ * `sessionTasks` value). Deliberately NOT `RunningTaskState`: Agent Teams
142
+ * child tasks arrive via TEAM_TRACK_ASSIGNED (Stage-2 r1 Codex MED-1) which
143
+ * carries no pid, so forcing that shape would fabricate fields. Display-only.
144
+ */
145
+ export interface SessionTaskRecord {
146
+ taskId: string;
147
+ /** Implementor agent when known; a team ASSIGNED event may omit it. */
148
+ agentKind?: string;
149
+ /** 'single' = TASK_LIFECYCLE-tracked; 'team' = Agent Teams track. */
150
+ origin: 'single' | 'team';
151
+ /**
152
+ * Singles: the lifecycle status — 'running' at dispatch, flipped terminal
153
+ * by the task-end CLOSER progress events (promoted → 'completed',
154
+ * discarded → 'cancelled', round_failed → 'failed'; Stage-2 r1 Codex
155
+ * MED-2 — no production TASK_LIFECYCLE dispatch ever carries a terminal
156
+ * status). Team rows: the TeamTrackState label verbatim.
157
+ */
158
+ status: string;
159
+ /** Singles: the dispatch stamp. Team rows: first-observed stamp. */
160
+ startedAt: string;
161
+ }
139
162
  /**
140
163
  * §5.1 LOCK (lines 547-556). Single reviewer subprocess identity +
141
164
  * verdict. `reviewerKind` is hand-listed per CP-1 — CP-3 Stage A
@@ -544,13 +567,15 @@ export interface TeamState {
544
567
  * the user is in control (a gate prompt is shown → `waiting_user` clears it).
545
568
  * Milestones (diff captured, verdicts received, promoted, …) are NOT stored here
546
569
  * — they are appended to `conversation` as persisted scrollback entries. This is
547
- * desktop-LOCAL only: counts/labels/elapsed, never plaintext (see
570
+ * desktop-LOCAL only: counts/labels/elapsed, never plaintext — `halt_notice`,
571
+ * the union's one free-text exception, can never open or refresh this live
572
+ * line (reducer phase-family guard); it is scrollback-only (see
548
573
  * `task-progress.ts`).
549
574
  */
550
575
  export interface LiveProgress {
551
576
  /** The phase of the in-flight spinner line. */
552
577
  phase: TaskProgressEvent['phase'];
553
- /** The BOUNDED live label (counts/labels/paths only — no plaintext, no embedded timer). */
578
+ /** The BOUNDED live label (counts/labels/paths only — no plaintext; `halt_notice` never reaches here; no embedded timer). */
554
579
  text: string;
555
580
  /** When this line was last refreshed. Retained; currently unused (no component reads it). */
556
581
  updatedAt: string;
@@ -582,6 +607,11 @@ export interface OrchestrationState {
582
607
  plannerHealth: PlannerHealthState;
583
608
  conversation: ConversationEntry[];
584
609
  runningTasks: Map<string, RunningTaskState>;
610
+ sessionTasks: Map<string, SessionTaskRecord>;
611
+ lastReviewerProgress: {
612
+ text: string;
613
+ at: string;
614
+ } | null;
585
615
  queuedTasks: QueuedTask[];
586
616
  activeReviewerSeats: Map<string, ReviewerSeatState>;
587
617
  currentGate: GateState | null;
@@ -0,0 +1,27 @@
1
+ export interface WorkspaceShutdownOperations {
2
+ flushPlannerCache?: () => Promise<void>;
3
+ clearPlannerSession?: () => void;
4
+ disposeQuorumWorkspaces?: () => Promise<void>;
5
+ drainLocalWorkspaces?: () => Promise<void>;
6
+ /** Settle already-admitted shell turns after their agent processes drain. */
7
+ drainShellSubmissions?: () => Promise<void>;
8
+ /** Flush the settled turns' local and hosted canonical context publications. */
9
+ finalizeContextItemPublications?: () => Promise<void>;
10
+ /** Audit/retry exact advisory-image authority after every owning turn settles. */
11
+ disposeAdvisoryAttachmentAuthority?: () => Promise<void>;
12
+ disposeLocalDurableSessionResources?: () => Promise<void>;
13
+ /** Final hosted terminal mutation; no local or hosted turn publication follows. */
14
+ retireHostedSession?: () => Promise<void>;
15
+ onPlannerFlushFailure?: (error: Error) => void;
16
+ onWorkspaceFailure?: (error: Error) => void;
17
+ }
18
+ /**
19
+ * Start every independent shutdown fence before awaiting any one owner.
20
+ *
21
+ * The LocalExecutor's shared durable group retirement is deliberately a final
22
+ * phase: Quorum may still have an already-admitted terminal publisher that is
23
+ * allowed to finish while its ingress is closed. Only after both Quorum and
24
+ * LocalExecutor drains settle can the durable store be enumerated exactly once
25
+ * without a late publisher recreating a group behind the cleanup pass.
26
+ */
27
+ export declare function runWorkspaceShutdownOperations(operations: WorkspaceShutdownOperations): Promise<void>;
@@ -19,7 +19,26 @@ export interface ParsedVerdict {
19
19
  * via `revise_missing_changes` / `suggested_changes_require_revise`).
20
20
  */
21
21
  suggested_changes: string[];
22
+ /**
23
+ * Ordered non-blocking observations from the explicit
24
+ * `RESIDUAL OBSERVATIONS:` section. These never count as suggested changes.
25
+ */
26
+ residual_observations: string[];
27
+ }
28
+ export interface ResidualObservationSplit {
29
+ /** Reviewer output with the explicit residual section removed. */
30
+ reviewText: string;
31
+ /** Ordered, non-empty residual observations. */
32
+ residualObservations: string[];
22
33
  }
34
+ /**
35
+ * Split the optional P15 residual-observation section from reviewer prose.
36
+ *
37
+ * The heading must occupy its own line. Bullets are preferred, but plain
38
+ * non-empty lines are retained as observations so harmless reviewer format
39
+ * drift cannot turn a non-blocking note into a revision request.
40
+ */
41
+ export declare function splitResidualObservations(raw: string): ResidualObservationSplit;
23
42
  /**
24
43
  * Why a reviewer's reply failed the locked-format check. Discriminated
25
44
  * union; the subprocess layer maps any of these into `ReviewerError` with
@@ -90,6 +90,9 @@ export interface ReviewerVerdict {
90
90
  /** Ordered list of specific changes. **Required** when `verdict === 'REVISE'`;
91
91
  * empty for other verdicts (enforced by the output parser). */
92
92
  suggested_changes: string[];
93
+ /** Optional non-blocking risks or recommendations. These are displayed in
94
+ * the terminal summary but never affect consensus or trigger revision. */
95
+ residual_observations: string[];
93
96
  /** Model identifier used (for cost attribution). */
94
97
  model_used: string | null;
95
98
  /** Tokens consumed by this reviewer. */
@@ -59,4 +59,5 @@ export declare function resolveClassifiedVerdictFields(classification: VerdictCl
59
59
  verdict: VerdictKind;
60
60
  reasoning: string;
61
61
  suggested_changes: string[];
62
+ residual_observations: string[];
62
63
  };
@@ -27,9 +27,10 @@ export interface RekeyOptions {
27
27
  * bound to its current public key and nothing is forced.
28
28
  *
29
29
  * @param sessionId The session to re-key.
30
- * @param sessionKey The plaintext session key (base64). The caller must
31
- * already hold this typically from
32
- * keychainManager.getCachedSessionKey(sessionId).
30
+ * @param sessionKey The caller's current plaintext session key (base64).
31
+ * This is only an admission hint: after fetching the
32
+ * authoritative row, the function re-derives/loads the key
33
+ * for that row's exact generation before wrapping.
33
34
  * @param appSyncClient Authenticated AppSyncClient.
34
35
  * @param options Optional behavior knobs. See RekeyOptions.
35
36
  * @returns The number of new grants that succeeded.
@@ -1,4 +1,5 @@
1
1
  import type { CommandResult, CommandRunner, RunnerProc } from './types';
2
+ import type { WorkspaceRootAuthority } from '../local-executor/workspace-authority';
2
3
  /**
3
4
  * The production `CommandRunner` — runs `docker` / `sandbox-exec` via
4
5
  * `node:child_process`. No shell is used (argv is passed directly to
@@ -15,5 +16,6 @@ export declare class ChildProcessCommandRunner implements CommandRunner {
15
16
  signal?: AbortSignal;
16
17
  env?: Readonly<Record<string, string>>;
17
18
  cwd?: string;
19
+ cwdAuthority?: WorkspaceRootAuthority;
18
20
  }): RunnerProc;
19
21
  }
@@ -1,5 +1,6 @@
1
1
  import { type ForwarderFactory } from './forwarder';
2
2
  import type { CommandRunner, EgressObservationHook, Substrate, SubstrateHandle, SubstrateSpec } from './types';
3
+ import { type WorkspaceRootAuthority, type WorkspaceRootLease } from '../local-executor/workspace-authority';
3
4
  /** Where, inside the container, the worktree is mounted (the agent's cwd/home). */
4
5
  export declare const CONTAINER_WORKDIR = "/workspace";
5
6
  /** Injectable deps — default-wired to the real runtime; stubbed in unit tests. */
@@ -14,12 +15,13 @@ export interface DockerSubstrateDeps {
14
15
  image?: string;
15
16
  /**
16
17
  * Override the host root for the per-session scratch dir (default:
17
- * os.tmpdir()). The per-session dir holds ONLY the broker socket (in `uds/`),
18
- * the relay script, and the scrubbed git-proxy (in `gitproxy/`) — no secrets.
19
- * The git-proxy now lives UNDER this dir (MED fix), so the one
20
- * teardown/rollback rm removes it.
18
+ * os.tmpdir()). The per-session dir holds ONLY the broker socket (in `uds/`)
19
+ * and the relay script no secrets or repository metadata.
20
+ * The one teardown/rollback removal retires the complete session authority.
21
21
  */
22
22
  sessionRoot?: string;
23
+ /** Original-handle bind source (native Linux by default; injectable for seam tests). */
24
+ acquireWorkdirLease?: (authority: WorkspaceRootAuthority) => Promise<WorkspaceRootLease>;
23
25
  }
24
26
  /** The deterministic per-session container name. */
25
27
  export declare function containerName(id: string): string;
@@ -44,7 +46,6 @@ export declare function buildContainerEntrypoint(sanitizedEnv: Readonly<Record<s
44
46
  * surface the conformance test pins:
45
47
  * - `--network none` → STRUCTURAL default-deny (only `lo`, no egress).
46
48
  * - `-v <workdir>:/workspace` → ONLY the worktree mounted (rw).
47
- * - `-v <gitProxy>:/workspace/.git:ro` → scrubbed `.git`, read-only (if any).
48
49
  * - `-v <relayScript>:/codevibe/relay.js:ro` → the in-container relay (ro).
49
50
  * - `-v <udsDir>:/codevibe/broker:rw` → the bind-mounted broker UDS dir (rw,
50
51
  * so the container's `connect()` works; the dir holds only the socket).
@@ -63,7 +64,6 @@ export declare function buildRunArgv(args: {
63
64
  id: string;
64
65
  image: string;
65
66
  workdir: string;
66
- gitProxyPath: string | null;
67
67
  relayScriptPath: string;
68
68
  udsDir: string;
69
69
  sanitizedEnv: Readonly<Record<string, string>>;
@@ -101,40 +101,15 @@ export declare class DockerSubstrate implements Substrate {
101
101
  private readonly onEgressDenied;
102
102
  private readonly image;
103
103
  private readonly sessionRoot;
104
+ private readonly acquireWorkdirLease;
104
105
  constructor(deps?: DockerSubstrateDeps);
105
106
  launch(spec: SubstrateSpec): Promise<SubstrateHandle>;
106
107
  private rollback;
107
- /**
108
- * r5 HIGH-2 (Codex — NULL-vs-THROW gap). The proxy build produced no usable
109
- * proxy (it returned `null` OR threw). Decide the safe outcome by whether the
110
- * workdir actually HAS a `.git`:
111
- *
112
- * - NO `<workdir>/.git` → return `null` (a non-git workdir; the
113
- * `docker run` mounts only the worktree,
114
- * git reports "not a repository" — no
115
- * credential surface either way).
116
- * - `<workdir>/.git` EXISTS → write an EMPTY SCRUBBED `.git` overlay
117
- * (a dir with ONLY a stripped synthetic
118
- * `config` — NO remotes/creds/hooks) and
119
- * return its path, so the `:ro` bind mount
120
- * SHADOWS the real `.git`. Degraded git
121
- * reads, but the credential surface is
122
- * fail-closed.
123
- * - overlay write ALSO fails → roll back + throw (NEVER mount the
124
- * worktree with a live `.git`).
125
- *
126
- * Used for BOTH the null-return and the throw path so a workdir with a real
127
- * but unresolvable `.git` can never reach the agent un-shadowed. `fsp.stat`
128
- * (NOT `lstat`) follows a `.git` that is a symlink/dir/file alike — any of
129
- * those "exists" cases must be shadowed.
130
- */
131
- private ensureGitOverlayOrFailClosed;
132
108
  private assertDockerAvailable;
133
109
  }
134
110
  export declare const __testing: {
135
111
  DEFAULT_IMAGE: string;
136
112
  CONTAINER_WORKDIR: string;
137
- CONTAINER_GIT: string;
138
113
  CONTAINER_RELAY_PATH: string;
139
114
  CONTAINER_BROKER_DIR: string;
140
115
  RELAY_PORT: number;
@@ -8,5 +8,4 @@ export { SubstrateUnavailableError, SubstrateLaunchError } from "./errors";
8
8
  export { ChildProcessCommandRunner } from "./command-runner";
9
9
  export { HostEgressForwarder, defaultForwarderFactory } from "./forwarder";
10
10
  export type { ForwarderSpec, ForwarderFactory } from "./forwarder";
11
- export { buildScrubbedGitProxy, resolveGitCommonDir } from "./git-proxy";
12
11
  export { IN_CONTAINER_RELAY_SOURCE, CONTAINER_RELAY_PATH, CONTAINER_BROKER_DIR, CONTAINER_BROKER_SOCK, BROKER_SOCK_NAME, RELAY_PORT, } from "./relay-script";
@@ -68,19 +68,6 @@ export declare function buildSeatbeltProfile(workdir: string, execPath?: string,
68
68
  * invariant that host secrets stay unreadable still holds).
69
69
  */
70
70
  extraReadDirs?: readonly string[],
71
- /**
72
- * Stage-2 HIGH (Codex — the `.git` credential leak). The host path of the
73
- * SCRUBBED `.git` proxy (built by `git-proxy.ts`, same as A1's mount). When
74
- * provided, the profile (a) GRANTS read on it (read-only — the agent runs
75
- * `git` against it via `GIT_DIR`) and (b) DENIES read+write of the REAL
76
- * `<workdir>/.git`, so the agent CANNOT read the host repo's credential
77
- * helpers / tokenized remotes / hooks / reflogs directly. Without this the A5
78
- * agent runs on the host fs and the `(allow file-read* (subpath "<wd>"))`
79
- * grant would expose the real `.git`. Null/absent for a non-git workdir (the
80
- * `.git` deny is still emitted — denying a non-existent path is harmless and
81
- * keeps the profile shape uniform).
82
- */
83
- gitProxyDir?: string | null,
84
71
  /**
85
72
  * r5 HIGH-1 (Codex) — the home dir to anchor the file-keychain (`~/.codevibe`)
86
73
  * DENY at. Default `os.homedir()`; injectable for deterministic tests. The
@@ -1,4 +1,5 @@
1
1
  import type { Readable, Writable } from "node:stream";
2
+ import type { WorkspaceRootAuthority } from "../local-executor/workspace-authority";
2
3
  /**
3
4
  * Isolation backend for a substrate. `firecracker` is [DEF →
4
5
  * A3-after-C2] — declared so the union admits the hosted runner without
@@ -24,10 +25,12 @@ export type EgressFidelity = "strict" | "coarse";
24
25
  export interface SubstrateSpec {
25
26
  isolationTech: IsolationTech;
26
27
  /**
27
- * Canonical host path of the session worktree — the ONLY filesystem
28
- * mounted (§6 Q3 git-proxy).
28
+ * Canonical host path of the session workspace — the only mutable filesystem
29
+ * mounted; repository metadata is hidden by the substrate.
29
30
  */
30
31
  workdir: string;
32
+ /** Exact host workdir incarnation for task-scoped mutable launches. */
33
+ workdirAuthority?: WorkspaceRootAuthority;
31
34
  /**
32
35
  * Where the broker actually listens on the HOST (e.g.
33
36
  * `127.0.0.1:<ephemeral>`).
@@ -243,5 +246,7 @@ export interface CommandRunner {
243
246
  env?: Readonly<Record<string, string>>;
244
247
  /** Child working directory. Absent → inherit the parent's cwd. */
245
248
  cwd?: string;
249
+ /** Exact cwd incarnation held through native process creation. */
250
+ cwdAuthority?: WorkspaceRootAuthority;
246
251
  }): RunnerProc;
247
252
  }
@@ -2,6 +2,7 @@ import { type RotationHandle } from "../credential-broker";
2
2
  import type { BrokerDeps } from "../credential-broker/broker";
3
3
  import type { ModelGatewayBroker, UpstreamClient, VendorProvider } from "../credential-broker/types";
4
4
  import type { ProcessRole } from "../local-executor/types";
5
+ import type { WorkspaceRootAuthority } from "../local-executor/workspace-authority";
5
6
  import type { SubstrateHandle } from "../substrate/types";
6
7
  import { type FallbackLadderDeps } from "./fallback-ladder";
7
8
  /** Map the implementor agent to the broker provider (Claude+Codex only, §6 Q4). */
@@ -21,6 +22,8 @@ export interface EngageSubstrateInput {
21
22
  agentKind: "CLAUDE" | "GEMINI" | "CODEX" | "ANTIGRAVITY";
22
23
  /** Canonical host path of the session worktree (the only fs mounted). */
23
24
  workdir: string;
25
+ /** Exact workdir incarnation for task-scoped mutable dispatch. */
26
+ workdirAuthority?: WorkspaceRootAuthority;
24
27
  /** The implementor role marker value (always 'implementor' here). */
25
28
  role: ProcessRole;
26
29
  /**
@@ -6,6 +6,8 @@ export { buildSanitizedBaseEnv, assertNoAmbientCreds, SAFE_ENV_ALLOWLIST, SANDBO
6
6
  export type { SanitizedEnvInput } from "./sanitized-env";
7
7
  export { ApiKeyBootstrap, SANDBOX_BOOTSTRAP_DIR, HELPER_SCRIPT_NAME, TOKEN_FILE_NAME, CODEX_PROVIDER_ID, } from "./apikey-bootstrap";
8
8
  export type { ApiKeyBootstrapInput } from "./apikey-bootstrap";
9
+ export { assertReviewerVendorCredential, reviewerProviderFor, withReviewerCredentialPreflight, ReviewerCredentialMissingError, REVIEWER_CREDENTIAL_MISSING, } from "./reviewer-credential-preflight";
10
+ export type { ReviewerCredentialStore } from "./reviewer-credential-preflight";
9
11
  export { scrubLeEnvOrReexec, buildScrubbedLeEnv, findCredShapedKeys, isCredShapedEnvKey, LE_ENV_SCRUBBED_MARKER, } from "./le-env-scrub";
10
12
  export type { LeEnvScrubDeps } from "./le-env-scrub";
11
13
  export { Cp7AuditWriter, CP7_CANONICAL_FORM_VERSION, GENESIS_PREV_HASH, canonicalJson, canonicalEntryBytes, computeEntryHash, verifyChain, } from "../local-executor/cp7-audit-writer";
@@ -0,0 +1,50 @@
1
+ import type { VendorProvider } from "../credential-broker";
2
+ /**
3
+ * Typed marker for the missing-credential failure so the loop can surface the
4
+ * remediation on the user-facing NOTIFICATION channel (Stage-2 r2 Codex MED-1)
5
+ * without string-matching. Identified by `name` (survives bundling) — callers
6
+ * check `err.name === REVIEWER_CREDENTIAL_MISSING` rather than instanceof.
7
+ */
8
+ export declare const REVIEWER_CREDENTIAL_MISSING = "ReviewerCredentialMissingError";
9
+ export declare class ReviewerCredentialMissingError extends Error {
10
+ name: string;
11
+ }
12
+ /**
13
+ * The minimal store surface the preflight needs (structurally satisfied by
14
+ * `KeychainVendorKeyStore`); narrow so tests can stub it without keychain IO.
15
+ */
16
+ export interface ReviewerCredentialStore {
17
+ getVendorKey(provider: VendorProvider): Promise<string | null>;
18
+ getVendorOAuthBundle(provider: VendorProvider): Promise<unknown | null>;
19
+ }
20
+ /**
21
+ * Map a reviewer agent kind (lowercase, as the loop's engager input carries it)
22
+ * to its broker vendor provider. Non-Trusted agents (gemini/antigravity) have
23
+ * no broker provider — they never sandbox, so the preflight is a no-op for
24
+ * them (the loop pre-routes them to legacy+badge before engaging anyway).
25
+ */
26
+ export declare function reviewerProviderFor(agent: string): VendorProvider | null;
27
+ /**
28
+ * Throw (fail-closed) when a Trusted reviewer is about to substrate-engage but
29
+ * no vendor credential exists for its provider. The message is the user-facing
30
+ * remediation — it propagates verbatim through the loop's engage-failure
31
+ * ESCALATE (`spawnOneSeat`) and the Wave-B fall-through WARN.
32
+ */
33
+ export declare function assertReviewerVendorCredential(agent: string, store: ReviewerCredentialStore): Promise<void>;
34
+ /**
35
+ * Wrap a reviewer substrate engager with the credential preflight, ordered
36
+ * AFTER tier selection (Stage-2 r2 Codex MED-2): the underlying engage runs
37
+ * first, and the credential check applies ONLY when the ladder actually chose
38
+ * the `substrate` (broker) mode — a `reduced_trust` selection never consults
39
+ * credentials, preserving the pre-flip legacy-plus-badge fallback on hosts
40
+ * with no establishable sandbox tier. On substrate + missing credential the
41
+ * engaged substrate is torn down and the actionable
42
+ * `ReviewerCredentialMissingError` propagates (fail-closed, no ambient
43
+ * fallback).
44
+ */
45
+ export declare function withReviewerCredentialPreflight<I extends {
46
+ agent: string;
47
+ }, R extends {
48
+ mode: string;
49
+ teardown: () => Promise<void>;
50
+ }>(engage: (input: I) => Promise<R>, store: ReviewerCredentialStore): (input: I) => Promise<R>;
@@ -1,5 +1,19 @@
1
1
  import { z } from 'zod';
2
2
  import type { Logger } from '../logger';
3
+ /** Keep every ordinary replay read comfortably below Node/Buffer's platform limits. */
4
+ export declare const DEFAULT_REPLAY_READ_BYTES: number;
5
+ /**
6
+ * A JSONL record may be larger than the ordinary batch, so the reader extends in
7
+ * fixed-size chunks until it finds the terminating newline. This cap bounds the
8
+ * one-record memory cost without imposing any limit on the transcript FILE size.
9
+ */
10
+ export declare const DEFAULT_REPLAY_MAX_FRAME_BYTES: number;
11
+ export declare class ReplayFrameTooLargeError extends Error {
12
+ readonly startOffset: number;
13
+ readonly maxFrameBytes: number;
14
+ readonly code = "REPLAY_FRAME_TOO_LARGE";
15
+ constructor(startOffset: number, maxFrameBytes: number);
16
+ }
3
17
  export declare const ReplayCursorStateSchema: z.ZodObject<{
4
18
  version: z.ZodLiteral<1>;
5
19
  /** The transcript path this cursor tracks (a change ⇒ rescan from 0). */
@@ -23,8 +37,8 @@ export declare const ReplayCursorStateSchema: z.ZodObject<{
23
37
  carryover: z.ZodString;
24
38
  }, "strip", z.ZodTypeAny, {
25
39
  version: 1;
26
- byteOffset: number;
27
40
  canonicalPath: string;
41
+ byteOffset: number;
28
42
  fileIdentity: {
29
43
  dev: number;
30
44
  ino: number;
@@ -33,8 +47,8 @@ export declare const ReplayCursorStateSchema: z.ZodObject<{
33
47
  carryover: string;
34
48
  }, {
35
49
  version: 1;
36
- byteOffset: number;
37
50
  canonicalPath: string;
51
+ byteOffset: number;
38
52
  fileIdentity: {
39
53
  dev: number;
40
54
  ino: number;
@@ -57,7 +71,7 @@ export interface ReplayFrame {
57
71
  }
58
72
  /** A pure read snapshot — no persisted state is mutated by {@link ToolReplayCursor.readFrames}. */
59
73
  export interface ReadFramesResult {
60
- /** Complete lines from the checkpoint (or 0 after a rotation) to EOF. */
74
+ /** Complete lines in this bounded batch from the checkpoint (or 0 after a rotation). */
61
75
  frames: ReplayFrame[];
62
76
  /** True when the file rotated/truncated and was rescanned from 0. */
63
77
  rotated: boolean;
@@ -67,6 +81,14 @@ export interface ReadFramesResult {
67
81
  carryover: string;
68
82
  /** Byte offset just past the last COMPLETE line — the max checkpoint candidate. */
69
83
  endOfComplete: number;
84
+ /**
85
+ * True when this stat snapshot contains bytes beyond the bounded read. The
86
+ * caller may immediately run another batch after checkpointing this one.
87
+ * False at the snapshot EOF, including when EOF is an incomplete trailing line.
88
+ */
89
+ hasMore: boolean;
90
+ /** Bytes actually read from disk for this batch (diagnostics/tests). */
91
+ bytesRead: number;
70
92
  /** The identity + size captured AT read time — pass to {@link ToolReplayCursor.checkpoint} for a consistent snapshot. */
71
93
  fileIdentity: {
72
94
  dev: number;
@@ -81,6 +103,10 @@ export interface ToolReplayCursorOptions {
81
103
  canonicalPath: string;
82
104
  logger: Logger;
83
105
  root?: string;
106
+ /** Ordinary bounded batch size. Defaults to 4 MiB. */
107
+ readBytes?: number;
108
+ /** Maximum bytes allowed in one unterminated JSONL record. Defaults to 64 MiB. */
109
+ maxFrameBytes?: number;
84
110
  }
85
111
  /**
86
112
  * The durable tool-replay cursor for ONE session's transcript. Split into a PURE
@@ -94,6 +120,8 @@ export declare class ToolReplayCursor {
94
120
  private readonly canonicalPath;
95
121
  private readonly logger;
96
122
  private readonly rootDir;
123
+ private readonly readBytes;
124
+ private readonly maxFrameBytes;
97
125
  private state;
98
126
  constructor(opts: ToolReplayCursorOptions);
99
127
  private filePath;
@@ -105,11 +133,17 @@ export declare class ToolReplayCursor {
105
133
  /** The current durable checkpoint (0 when fresh). */
106
134
  byteOffset(): number;
107
135
  /**
108
- * Read + byte-frame the transcript from the durable checkpoint (or 0 after a
109
- * rotation) to EOF. PURE — persists nothing. Frames on `\n` (0x0A), an ASCII
110
- * byte that never appears mid-UTF-8-char, so every complete-line boundary is a
111
- * safe UTF-8 (and byte-offset) boundary; the trailing partial is returned as
112
- * `carryover` and re-read next cycle.
136
+ * Read + byte-frame ONE BOUNDED transcript batch from the durable checkpoint
137
+ * (or 0 after a rotation). PURE — persists nothing. File positions are ordinary
138
+ * safe JS integers, so offsets above Node's signed 32-bit Buffer length remain
139
+ * valid; no allocation is based on `(fileSize - checkpoint)`.
140
+ *
141
+ * Frames on `\n` (0x0A), an ASCII byte that never appears mid-UTF-8-char, so
142
+ * every complete-line boundary is a safe UTF-8 (and byte-offset) boundary. If
143
+ * the ordinary batch contains no newline, fixed-size reads extend only until
144
+ * the first record terminator or `maxFrameBytes`. Thus transcript FILE size is
145
+ * unbounded while one malformed/huge JSONL RECORD has a controlled bound.
146
+ * The trailing partial is returned as `carryover` and re-read next cycle.
113
147
  */
114
148
  readFrames(): Promise<ReadFramesResult>;
115
149
  /**
@@ -55,4 +55,9 @@ export interface GrantSessionKeyInput {
55
55
  ephemeralPublicKey: string;
56
56
  /** SHA-256 of the exact registered public-key string used to wrap the key. */
57
57
  recipientPublicKeySha256: string;
58
+ /**
59
+ * Exact session-key generation used to produce `encryptedKey`, or the
60
+ * generation-absent sentinel for a legacy row.
61
+ */
62
+ expectedSessionKeyGen: string;
58
63
  }
@@ -95,6 +95,11 @@ export interface CreateEventInput {
95
95
  promptId?: string;
96
96
  timestamp?: string;
97
97
  isEncrypted?: boolean;
98
+ ownerToken?: string;
99
+ producerKind?: string;
100
+ mobileActionable?: boolean;
101
+ resolvedPromptId?: string;
102
+ resolutionAt?: string;
98
103
  clientEventId?: string;
99
104
  expectedSessionKeyGen?: string;
100
105
  encryptionVersion?: number;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-core",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Core library for CodeVibe plugins - shared keychain, crypto, AppSync, and auth functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,8 +16,8 @@
16
16
  "scripts": {
17
17
  "typecheck": "tsc --noEmit",
18
18
  "emit-types": "tsc --emitDeclarationOnly",
19
- "build": "rm -rf dist && npm run emit-types && esbuild src/index.ts --bundle --platform=node --target=node18 --minify --packages=external --outfile=dist/index.js && esbuild src/orchestration-shell/cli.ts --bundle --platform=node --target=node18 --packages=external --outfile=dist/orchestration-shell/cli.js --banner:js=\"#!/usr/bin/env node\" && npm run verify-no-test-hooks",
20
- "verify-no-test-hooks": "if grep -Elq 'CODEVIBE_TEST_FORCE_QUOTA_FAIL|CODEVIBE_TEST_FORCE_IMPLEMENTOR_AGENT' dist/index.js dist/orchestration-shell/cli.js; then echo 'ERROR: a CODEVIBE_TEST_FORCE_* test hook leaked into a published bundle (prod-unreachability invariant)'; exit 1; fi; echo 'OK — no test-only hooks in published bundles'",
19
+ "build": "rm -rf dist && npm run emit-types && esbuild src/index.ts --bundle --platform=node --target=node18 --minify --packages=external --define:__CODEVIBE_TEST_BUILD__=false --outfile=dist/index.js && esbuild src/orchestration-shell/cli.ts --bundle --platform=node --target=node18 --minify-syntax --packages=external --define:__CODEVIBE_TEST_BUILD__=false --outfile=dist/orchestration-shell/cli.js --banner:js=\"#!/usr/bin/env node\" && npm run verify-no-test-hooks",
20
+ "verify-no-test-hooks": "if grep -ERl 'CODEVIBE_TEST_FORCE_QUOTA_FAIL|CODEVIBE_TEST_FORCE_IMPLEMENTOR_AGENT|CODEVIBE_ANCHORED_PUBLICATION_AUTHORITY_ROOT|codevibe-anchored-publications-|cv-publication-authority-vitest-|codevibe\\.test\\.publication-authority-|setPublicationAuthorityRootForTestBuild|__CODEVIBE_TEST_BUILD__' dist; then echo 'ERROR: a test-only hook leaked into a published artifact (prod-unreachability invariant)'; exit 1; fi; echo 'OK — no test-only hooks in published artifacts'",
21
21
  "clean": "rm -rf dist",
22
22
  "prepublishOnly": "npm run build",
23
23
  "test": "vitest run",