@quantiya/codevibe-codex-plugin 2.0.4 → 2.0.6

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 (1092) hide show
  1. package/node_modules/@quantiya/codevibe-core/dist/index.js +198 -196
  2. package/node_modules/@quantiya/codevibe-core/dist/local-model/manager.d.ts +18 -6
  3. package/node_modules/@quantiya/codevibe-core/dist/local-model/ollama.d.ts +38 -1
  4. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-types.d.ts +9 -4
  5. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/mobile-user-prompt-return.test.d.ts +1 -0
  6. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/runOrchestrationShell-session-retire.test.d.ts +1 -0
  7. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +10 -0
  8. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +1155 -824
  9. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/InputBar.d.ts +67 -0
  10. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/emit-shell-event.d.ts +1 -1
  11. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +119 -2
  12. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/ink-runtime.d.ts +11 -1
  13. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/mode-selection.d.ts +5 -9
  14. package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +2 -1
  15. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/LICENSE +21 -0
  16. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/README.md +278 -0
  17. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.d.ts +7 -0
  18. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js +57 -0
  19. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js.map +1 -0
  20. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/consts.d.ts +17 -0
  21. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/consts.js +28 -0
  22. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/consts.js.map +1 -0
  23. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/diff.js +26 -0
  24. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/diff.js.map +1 -0
  25. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/reduce.js +37 -0
  26. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/reduce.js.map +1 -0
  27. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/tokenize.d.ts +16 -0
  28. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js +194 -0
  29. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js.map +1 -0
  30. package/node_modules/@quantiya/codevibe-core/node_modules/@alcalzone/ansi-tokenize/package.json +55 -0
  31. package/node_modules/@quantiya/codevibe-core/node_modules/cli-boxes/index.d.ts +122 -0
  32. package/node_modules/@quantiya/codevibe-core/node_modules/cli-boxes/index.js +3 -0
  33. package/node_modules/@quantiya/codevibe-core/node_modules/cli-boxes/package.json +49 -0
  34. package/node_modules/@quantiya/codevibe-core/node_modules/cli-boxes/readme.md +103 -0
  35. package/node_modules/@quantiya/codevibe-core/node_modules/cli-truncate/index.d.ts +118 -0
  36. package/node_modules/@quantiya/codevibe-core/node_modules/cli-truncate/index.js +194 -0
  37. package/node_modules/@quantiya/codevibe-core/node_modules/cli-truncate/package.json +52 -0
  38. package/node_modules/@quantiya/codevibe-core/node_modules/cli-truncate/readme.md +153 -0
  39. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/ansi-tokenizer.d.ts +38 -0
  40. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/ansi-tokenizer.js +316 -0
  41. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/ansi-tokenizer.js.map +1 -0
  42. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AccessibilityContext.d.ts +3 -0
  43. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AccessibilityContext.js +5 -0
  44. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AccessibilityContext.js.map +1 -0
  45. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AnimationContext.d.ts +9 -0
  46. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AnimationContext.js +13 -0
  47. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AnimationContext.js.map +1 -0
  48. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/App.d.ts +24 -0
  49. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/App.js +554 -0
  50. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/App.js.map +1 -0
  51. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AppContext.d.ts +80 -0
  52. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AppContext.js +25 -0
  53. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/AppContext.js.map +1 -0
  54. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/BackgroundContext.d.ts +4 -0
  55. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/BackgroundContext.js +3 -0
  56. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/BackgroundContext.js.map +1 -0
  57. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Box.d.ts +130 -0
  58. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Box.js +34 -0
  59. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Box.js.map +1 -0
  60. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/CursorContext.d.ts +11 -0
  61. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/CursorContext.js +8 -0
  62. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/CursorContext.js.map +1 -0
  63. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/ErrorBoundary.d.ts +18 -0
  64. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/ErrorBoundary.js +23 -0
  65. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/ErrorBoundary.js.map +1 -0
  66. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/ErrorOverview.js +90 -0
  67. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/ErrorOverview.js.map +1 -0
  68. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Newline.d.ts +13 -0
  69. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Newline.js +8 -0
  70. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Newline.js.map +1 -0
  71. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Spacer.d.ts +7 -0
  72. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Spacer.js +11 -0
  73. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Spacer.js.map +1 -0
  74. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Static.d.ts +24 -0
  75. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Static.js +28 -0
  76. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Static.js.map +1 -0
  77. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StderrContext.d.ts +15 -0
  78. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StderrContext.js +13 -0
  79. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StderrContext.js.map +1 -0
  80. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StdinContext.d.ts +28 -0
  81. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StdinContext.js +20 -0
  82. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StdinContext.js.map +1 -0
  83. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StdoutContext.d.ts +15 -0
  84. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StdoutContext.js +13 -0
  85. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/StdoutContext.js.map +1 -0
  86. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Text.d.ts +55 -0
  87. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Text.js +50 -0
  88. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Text.js.map +1 -0
  89. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Transform.d.ts +16 -0
  90. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Transform.js +15 -0
  91. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/components/Transform.js.map +1 -0
  92. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/cursor-helpers.d.ts +38 -0
  93. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/cursor-helpers.js +56 -0
  94. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/cursor-helpers.js.map +1 -0
  95. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/devtools-window-polyfill.d.ts +1 -0
  96. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/devtools-window-polyfill.js +68 -0
  97. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/devtools-window-polyfill.js.map +1 -0
  98. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/devtools.js +36 -0
  99. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/devtools.js.map +1 -0
  100. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/dom.d.ts +62 -0
  101. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/dom.js +143 -0
  102. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/dom.js.map +1 -0
  103. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-animation.d.ts +49 -0
  104. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-animation.js +87 -0
  105. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-animation.js.map +1 -0
  106. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-app.d.ts +5 -0
  107. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-app.js +8 -0
  108. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-app.js.map +1 -0
  109. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-box-metrics.d.ts +59 -0
  110. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-box-metrics.js +81 -0
  111. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-box-metrics.js.map +1 -0
  112. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-cursor.d.ts +12 -0
  113. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-cursor.js +29 -0
  114. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-cursor.js.map +1 -0
  115. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-focus-manager.d.ts +43 -0
  116. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-focus-manager.js +18 -0
  117. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-focus-manager.js.map +1 -0
  118. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-focus.d.ts +30 -0
  119. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-focus.js +43 -0
  120. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-focus.js.map +1 -0
  121. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-input.d.ts +132 -0
  122. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-input.js +126 -0
  123. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-input.js.map +1 -0
  124. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +6 -0
  125. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +12 -0
  126. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
  127. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-paste.d.ts +35 -0
  128. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-paste.js +62 -0
  129. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-paste.js.map +1 -0
  130. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stderr.d.ts +5 -0
  131. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stderr.js +8 -0
  132. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stderr.js.map +1 -0
  133. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stdin.d.ts +7 -0
  134. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stdin.js +9 -0
  135. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stdin.js.map +1 -0
  136. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stdout.d.ts +5 -0
  137. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stdout.js +8 -0
  138. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-stdout.js.map +1 -0
  139. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-window-size.d.ts +18 -0
  140. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-window-size.js +22 -0
  141. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/hooks/use-window-size.js.map +1 -0
  142. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/index.d.ts +42 -0
  143. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/index.js +24 -0
  144. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/index.js.map +1 -0
  145. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/ink.d.ts +146 -0
  146. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/ink.js +950 -0
  147. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/ink.js.map +1 -0
  148. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/input-parser.d.ts +10 -0
  149. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/input-parser.js +194 -0
  150. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/input-parser.js.map +1 -0
  151. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/kitty-keyboard.d.ts +23 -0
  152. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/kitty-keyboard.js +32 -0
  153. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/kitty-keyboard.js.map +1 -0
  154. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/log-update.d.ts +20 -0
  155. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/log-update.js +254 -0
  156. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/log-update.js.map +1 -0
  157. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/measure-element.d.ts +20 -0
  158. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/measure-element.js +13 -0
  159. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/measure-element.js.map +1 -0
  160. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/measure-text.js +21 -0
  161. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/measure-text.js.map +1 -0
  162. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/output.d.ts +35 -0
  163. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/output.js +208 -0
  164. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/output.js.map +1 -0
  165. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/parse-keypress.d.ts +20 -0
  166. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/parse-keypress.js +495 -0
  167. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/parse-keypress.js.map +1 -0
  168. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/reconciler.d.ts +4 -0
  169. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/reconciler.js +306 -0
  170. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/reconciler.js.map +1 -0
  171. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-background.d.ts +4 -0
  172. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-background.js +25 -0
  173. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-background.js.map +1 -0
  174. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-border.js +84 -0
  175. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-border.js.map +1 -0
  176. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-node-to-output.d.ts +14 -0
  177. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-node-to-output.js +147 -0
  178. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-node-to-output.js.map +1 -0
  179. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-to-string.d.ts +38 -0
  180. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-to-string.js +116 -0
  181. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render-to-string.js.map +1 -0
  182. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render.d.ts +176 -0
  183. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render.js +62 -0
  184. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/render.js.map +1 -0
  185. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/renderer.d.ts +8 -0
  186. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/renderer.js +55 -0
  187. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/renderer.js.map +1 -0
  188. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/sanitize-ansi.d.ts +2 -0
  189. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/sanitize-ansi.js +27 -0
  190. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/sanitize-ansi.js.map +1 -0
  191. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/squash-text-nodes.js +36 -0
  192. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/squash-text-nodes.js.map +1 -0
  193. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/styles.d.ts +302 -0
  194. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/styles.js +303 -0
  195. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/styles.js.map +1 -0
  196. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/utils.d.ts +9 -0
  197. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/utils.js +19 -0
  198. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/utils.js.map +1 -0
  199. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/wrap-text.js +38 -0
  200. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/wrap-text.js.map +1 -0
  201. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/write-synchronized.d.ts +4 -0
  202. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/write-synchronized.js +9 -0
  203. package/node_modules/@quantiya/codevibe-core/node_modules/ink/build/write-synchronized.js.map +1 -0
  204. package/node_modules/@quantiya/codevibe-core/node_modules/ink/license +10 -0
  205. package/node_modules/@quantiya/codevibe-core/node_modules/ink/package.json +137 -0
  206. package/node_modules/@quantiya/codevibe-core/node_modules/ink/readme.md +3192 -0
  207. package/node_modules/@quantiya/codevibe-core/node_modules/is-in-ci/index.js +7 -0
  208. package/node_modules/@quantiya/codevibe-core/node_modules/is-in-ci/package.json +49 -0
  209. package/node_modules/@quantiya/codevibe-core/node_modules/is-in-ci/readme.md +44 -0
  210. package/node_modules/@quantiya/codevibe-core/node_modules/react/LICENSE +21 -0
  211. package/node_modules/@quantiya/codevibe-core/node_modules/react/README.md +37 -0
  212. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-compiler-runtime.development.js +24 -0
  213. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
  214. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-compiler-runtime.profiling.js +16 -0
  215. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-dev-runtime.development.js +338 -0
  216. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
  217. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-dev-runtime.profiling.js +14 -0
  218. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-dev-runtime.react-server.development.js +370 -0
  219. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js +40 -0
  220. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-runtime.development.js +352 -0
  221. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
  222. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-runtime.profiling.js +34 -0
  223. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-runtime.react-server.development.js +370 -0
  224. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react-jsx-runtime.react-server.production.js +40 -0
  225. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react.development.js +1284 -0
  226. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react.production.js +542 -0
  227. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react.react-server.development.js +848 -0
  228. package/node_modules/@quantiya/codevibe-core/node_modules/react/cjs/react.react-server.production.js +423 -0
  229. package/node_modules/@quantiya/codevibe-core/node_modules/react/compiler-runtime.js +14 -0
  230. package/node_modules/@quantiya/codevibe-core/node_modules/react/index.js +7 -0
  231. package/node_modules/@quantiya/codevibe-core/node_modules/react/jsx-dev-runtime.js +7 -0
  232. package/node_modules/@quantiya/codevibe-core/node_modules/react/jsx-dev-runtime.react-server.js +7 -0
  233. package/node_modules/@quantiya/codevibe-core/node_modules/react/jsx-runtime.js +7 -0
  234. package/node_modules/@quantiya/codevibe-core/node_modules/react/jsx-runtime.react-server.js +7 -0
  235. package/node_modules/@quantiya/codevibe-core/node_modules/react/package.json +51 -0
  236. package/node_modules/@quantiya/codevibe-core/node_modules/react/react.react-server.js +7 -0
  237. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/README.md +152 -0
  238. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/backend.js +1 -0
  239. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/backend.js +18302 -0
  240. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/backend.js.map +1 -0
  241. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/importFile.worker.worker.js +2 -0
  242. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/importFile.worker.worker.js.map +1 -0
  243. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/parseHookNames.chunk.js +2 -0
  244. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/parseHookNames.chunk.js.map +1 -0
  245. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/parseSourceAndMetadata.worker.worker.js +2 -0
  246. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/parseSourceAndMetadata.worker.worker.js.map +1 -0
  247. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/standalone.js +3 -0
  248. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/standalone.js.LICENSE.txt +41 -0
  249. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/dist/standalone.js.map +1 -0
  250. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/LICENSE +21 -0
  251. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/README.md +495 -0
  252. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/browser.js +8 -0
  253. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/index.js +10 -0
  254. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/buffer-util.js +129 -0
  255. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/constants.js +10 -0
  256. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/event-target.js +184 -0
  257. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/extension.js +223 -0
  258. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/limiter.js +55 -0
  259. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/permessage-deflate.js +518 -0
  260. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/receiver.js +664 -0
  261. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/sender.js +409 -0
  262. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/stream.js +180 -0
  263. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/validation.js +104 -0
  264. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/websocket-server.js +461 -0
  265. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/lib/websocket.js +1215 -0
  266. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/node_modules/ws/package.json +56 -0
  267. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/package.json +38 -0
  268. package/node_modules/@quantiya/codevibe-core/node_modules/react-devtools-core/standalone.js +1 -0
  269. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/LICENSE +21 -0
  270. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/README.md +353 -0
  271. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js +19 -0
  272. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js +18 -0
  273. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/cjs/react-reconciler-reflection.development.js +394 -0
  274. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/cjs/react-reconciler-reflection.production.js +382 -0
  275. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/cjs/react-reconciler.development.js +19736 -0
  276. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/cjs/react-reconciler.production.js +11594 -0
  277. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/cjs/react-reconciler.profiling.js +13427 -0
  278. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/constants.js +7 -0
  279. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/index.js +7 -0
  280. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/package.json +34 -0
  281. package/node_modules/@quantiya/codevibe-core/node_modules/react-reconciler/reflection.js +7 -0
  282. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/LICENSE +21 -0
  283. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +414 -0
  284. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler-unstable_mock.production.js +406 -0
  285. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +150 -0
  286. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.js +140 -0
  287. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler.development.js +364 -0
  288. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler.native.development.js +350 -0
  289. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler.native.production.js +330 -0
  290. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/cjs/scheduler.production.js +340 -0
  291. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/index.js +7 -0
  292. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/index.native.js +7 -0
  293. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/package.json +27 -0
  294. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/unstable_mock.js +7 -0
  295. package/node_modules/@quantiya/codevibe-core/node_modules/scheduler/unstable_post_task.js +7 -0
  296. package/node_modules/@quantiya/codevibe-core/node_modules/slice-ansi/index.d.ts +19 -0
  297. package/node_modules/@quantiya/codevibe-core/node_modules/slice-ansi/index.js +317 -0
  298. package/node_modules/@quantiya/codevibe-core/node_modules/slice-ansi/package.json +59 -0
  299. package/node_modules/@quantiya/codevibe-core/node_modules/slice-ansi/readme.md +55 -0
  300. package/node_modules/@quantiya/codevibe-core/node_modules/slice-ansi/tokenize-ansi.js +752 -0
  301. package/node_modules/@quantiya/codevibe-core/node_modules/string-width/index.js +203 -0
  302. package/node_modules/@quantiya/codevibe-core/node_modules/string-width/package.json +65 -0
  303. package/node_modules/@quantiya/codevibe-core/node_modules/string-width/readme.md +66 -0
  304. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/index.d.ts +227 -0
  305. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/package.json +75 -0
  306. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/readme.md +1085 -0
  307. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/absolute.d.ts +52 -0
  308. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/all-extend.d.ts +121 -0
  309. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/all-union-fields.d.ts +91 -0
  310. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/and-all.d.ts +76 -0
  311. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/and.d.ts +82 -0
  312. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-element.d.ts +46 -0
  313. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-indices.d.ts +25 -0
  314. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-length.d.ts +36 -0
  315. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-reverse.d.ts +85 -0
  316. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-slice.d.ts +132 -0
  317. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-splice.d.ts +104 -0
  318. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-tail.d.ts +70 -0
  319. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/array-values.d.ts +24 -0
  320. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/arrayable.d.ts +31 -0
  321. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/async-return-type.d.ts +28 -0
  322. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/asyncify.d.ts +25 -0
  323. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/basic.d.ts +38 -0
  324. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/camel-case.d.ts +125 -0
  325. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +106 -0
  326. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/camel-cased-properties.d.ts +49 -0
  327. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/characters.d.ts +67 -0
  328. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/conditional-except.d.ts +47 -0
  329. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/conditional-keys.d.ts +63 -0
  330. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/conditional-pick-deep.d.ts +122 -0
  331. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/conditional-pick.d.ts +48 -0
  332. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/conditional-simplify-deep.d.ts +73 -0
  333. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/conditional-simplify.d.ts +50 -0
  334. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/delimiter-case.d.ts +79 -0
  335. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +115 -0
  336. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/delimiter-cased-properties.d.ts +52 -0
  337. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/distributed-omit.d.ts +96 -0
  338. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/distributed-pick.d.ts +92 -0
  339. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/empty-object.d.ts +51 -0
  340. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/entries.d.ts +64 -0
  341. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/entry.d.ts +67 -0
  342. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/exact.d.ts +73 -0
  343. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/except.d.ts +112 -0
  344. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/exclude-exactly.d.ts +57 -0
  345. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/exclude-rest-element.d.ts +40 -0
  346. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/exclude-strict.d.ts +51 -0
  347. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/exclusify-union.d.ts +147 -0
  348. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/extends-strict.d.ts +151 -0
  349. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/extract-exactly.d.ts +56 -0
  350. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/extract-rest-element.d.ts +30 -0
  351. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/extract-strict.d.ts +51 -0
  352. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/find-global-type.d.ts +68 -0
  353. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/fixed-length-array.d.ts +97 -0
  354. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/get.d.ts +227 -0
  355. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/global-this.d.ts +24 -0
  356. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/globals/index.d.ts +3 -0
  357. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/globals/observable-like.d.ts +78 -0
  358. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/greater-than-or-equal.d.ts +63 -0
  359. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/greater-than.d.ts +92 -0
  360. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/has-optional-keys.d.ts +23 -0
  361. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/has-readonly-keys.d.ts +23 -0
  362. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/has-required-keys.d.ts +61 -0
  363. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/has-writable-keys.d.ts +23 -0
  364. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/if-any.d.ts +28 -0
  365. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/if-empty-object.d.ts +30 -0
  366. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/if-never.d.ts +28 -0
  367. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/if-null.d.ts +28 -0
  368. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/if-unknown.d.ts +28 -0
  369. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/if.d.ts +102 -0
  370. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/includes.d.ts +24 -0
  371. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/int-closed-range.d.ts +45 -0
  372. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/int-range.d.ts +67 -0
  373. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/array.d.ts +144 -0
  374. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/characters.d.ts +65 -0
  375. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/enforce-optional.d.ts +49 -0
  376. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/index.d.ts +11 -0
  377. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/keys.d.ts +100 -0
  378. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/numeric.d.ts +143 -0
  379. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/object.d.ts +301 -0
  380. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/string.d.ts +127 -0
  381. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/tuple.d.ts +79 -0
  382. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/internal/type.d.ts +171 -0
  383. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/invariant-of.d.ts +85 -0
  384. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-any.d.ts +31 -0
  385. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-equal.d.ts +41 -0
  386. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-float.d.ts +43 -0
  387. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-integer.d.ts +60 -0
  388. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-literal.d.ts +317 -0
  389. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-lowercase.d.ts +38 -0
  390. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-never.d.ts +56 -0
  391. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-null.d.ts +22 -0
  392. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-nullable.d.ts +30 -0
  393. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-optional-key-of.d.ts +51 -0
  394. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-optional.d.ts +28 -0
  395. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-readonly-key-of.d.ts +55 -0
  396. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-required-key-of.d.ts +51 -0
  397. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-tuple.d.ts +92 -0
  398. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-undefined.d.ts +22 -0
  399. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-union.d.ts +40 -0
  400. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-unknown.d.ts +43 -0
  401. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-uppercase.d.ts +38 -0
  402. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/is-writable-key-of.d.ts +51 -0
  403. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/iterable-element.d.ts +66 -0
  404. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/join.d.ts +79 -0
  405. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/json-value.d.ts +33 -0
  406. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
  407. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/jsonify.d.ts +127 -0
  408. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/kebab-case.d.ts +47 -0
  409. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +72 -0
  410. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/kebab-cased-properties.d.ts +46 -0
  411. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/key-as-string.d.ts +27 -0
  412. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/keys-of-union.d.ts +44 -0
  413. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/last-array-element.d.ts +89 -0
  414. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/less-than-or-equal.d.ts +60 -0
  415. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/less-than.d.ts +60 -0
  416. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +71 -0
  417. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/literal-to-primitive.d.ts +38 -0
  418. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/literal-union.d.ts +39 -0
  419. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/merge-deep.d.ts +495 -0
  420. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/merge-exclusive.d.ts +45 -0
  421. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/merge.d.ts +87 -0
  422. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/multidimensional-array.d.ts +38 -0
  423. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +38 -0
  424. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/non-empty-object.d.ts +38 -0
  425. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/non-empty-string.d.ts +32 -0
  426. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/non-empty-tuple.d.ts +24 -0
  427. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/non-nullable-deep.d.ts +102 -0
  428. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/numeric.d.ts +226 -0
  429. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/object-merge.d.ts +199 -0
  430. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/omit-deep.d.ts +153 -0
  431. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/omit-index-signature.d.ts +98 -0
  432. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/opaque.d.ts +3 -0
  433. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/optional-keys-of.d.ts +46 -0
  434. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/optional.d.ts +31 -0
  435. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/or-all.d.ts +73 -0
  436. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/or.d.ts +82 -0
  437. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/override-properties.d.ts +43 -0
  438. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/package-json.d.ts +710 -0
  439. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/partial-deep.d.ts +157 -0
  440. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +81 -0
  441. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/pascal-case.d.ts +52 -0
  442. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +79 -0
  443. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/pascal-cased-properties.d.ts +46 -0
  444. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/paths.d.ts +241 -0
  445. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/pick-deep.d.ts +139 -0
  446. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/pick-index-signature.d.ts +52 -0
  447. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/primitive.d.ts +15 -0
  448. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/promisable.d.ts +27 -0
  449. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/readonly-deep.d.ts +118 -0
  450. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/readonly-keys-of.d.ts +38 -0
  451. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/readonly-tuple.d.ts +34 -0
  452. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/remove-prefix.d.ts +114 -0
  453. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/remove-suffix.d.ts +114 -0
  454. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/replace.d.ts +87 -0
  455. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/require-all-or-none.d.ts +54 -0
  456. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/require-at-least-one.d.ts +48 -0
  457. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/require-exactly-one.d.ts +48 -0
  458. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/require-one-or-none.d.ts +49 -0
  459. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/required-deep.d.ts +78 -0
  460. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/required-keys-of.d.ts +38 -0
  461. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/schema.d.ts +127 -0
  462. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/screaming-snake-case.d.ts +31 -0
  463. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-field-type.d.ts +67 -0
  464. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-non-nullable-deep.d.ts +89 -0
  465. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-non-nullable.d.ts +34 -0
  466. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-optional.d.ts +42 -0
  467. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-parameter-type.d.ts +125 -0
  468. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-readonly.d.ts +40 -0
  469. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-required-deep.d.ts +65 -0
  470. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-required.d.ts +75 -0
  471. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/set-return-type.d.ts +31 -0
  472. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/shared-union-fields-deep.d.ts +180 -0
  473. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/shared-union-fields.d.ts +79 -0
  474. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/simplify-deep.d.ts +117 -0
  475. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/simplify.d.ts +61 -0
  476. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/single-key-object.d.ts +28 -0
  477. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/snake-case.d.ts +48 -0
  478. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +72 -0
  479. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/snake-cased-properties.d.ts +46 -0
  480. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/some-extend.d.ts +115 -0
  481. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/split-on-rest-element.d.ts +108 -0
  482. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/split.d.ts +90 -0
  483. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/spread.d.ts +78 -0
  484. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/string-length.d.ts +38 -0
  485. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/string-repeat.d.ts +76 -0
  486. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/string-slice.d.ts +39 -0
  487. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/string-to-array.d.ts +97 -0
  488. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/string-to-number.d.ts +67 -0
  489. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/stringified.d.ts +25 -0
  490. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/structured-cloneable.d.ts +89 -0
  491. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/subtract.d.ts +87 -0
  492. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/sum.d.ts +82 -0
  493. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/tagged-union.d.ts +53 -0
  494. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/tagged.d.ts +261 -0
  495. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/trim.d.ts +29 -0
  496. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/tsconfig-json.d.ts +1356 -0
  497. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/tuple-of.d.ts +114 -0
  498. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/tuple-to-object.d.ts +47 -0
  499. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/tuple-to-union.d.ts +54 -0
  500. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/typed-array.d.ts +19 -0
  501. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +83 -0
  502. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/union-length.d.ts +27 -0
  503. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/union-member.d.ts +65 -0
  504. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/union-to-intersection.d.ts +35 -0
  505. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/union-to-tuple.d.ts +49 -0
  506. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/unknown-array.d.ts +27 -0
  507. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/unknown-map.d.ts +26 -0
  508. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/unknown-record.d.ts +33 -0
  509. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/unknown-set.d.ts +26 -0
  510. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/unwrap-partial.d.ts +33 -0
  511. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/unwrap-required.d.ts +37 -0
  512. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/value-of.d.ts +24 -0
  513. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/words.d.ts +148 -0
  514. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/writable-deep.d.ts +84 -0
  515. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/writable-keys-of.d.ts +34 -0
  516. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/writable.d.ts +68 -0
  517. package/node_modules/@quantiya/codevibe-core/node_modules/type-fest/source/xor.d.ts +83 -0
  518. package/node_modules/@quantiya/codevibe-core/node_modules/widest-line/package.json +60 -0
  519. package/node_modules/@quantiya/codevibe-core/node_modules/wrap-ansi/index.d.ts +41 -0
  520. package/node_modules/@quantiya/codevibe-core/node_modules/wrap-ansi/index.js +468 -0
  521. package/node_modules/@quantiya/codevibe-core/node_modules/wrap-ansi/package.json +69 -0
  522. package/node_modules/@quantiya/codevibe-core/node_modules/wrap-ansi/readme.md +77 -0
  523. package/node_modules/@quantiya/codevibe-core/node_modules/ws/LICENSE +20 -0
  524. package/node_modules/@quantiya/codevibe-core/node_modules/ws/README.md +548 -0
  525. package/node_modules/@quantiya/codevibe-core/node_modules/ws/browser.js +8 -0
  526. package/node_modules/@quantiya/codevibe-core/node_modules/ws/index.js +22 -0
  527. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/buffer-util.js +131 -0
  528. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/constants.js +19 -0
  529. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/event-target.js +292 -0
  530. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/extension.js +203 -0
  531. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/limiter.js +55 -0
  532. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/permessage-deflate.js +528 -0
  533. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/receiver.js +760 -0
  534. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/sender.js +607 -0
  535. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/stream.js +161 -0
  536. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/subprotocol.js +62 -0
  537. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/validation.js +152 -0
  538. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/websocket-server.js +562 -0
  539. package/node_modules/@quantiya/codevibe-core/node_modules/ws/lib/websocket.js +1407 -0
  540. package/node_modules/@quantiya/codevibe-core/node_modules/ws/package.json +70 -0
  541. package/node_modules/@quantiya/codevibe-core/node_modules/ws/wrapper.mjs +21 -0
  542. package/node_modules/@quantiya/codevibe-core/package.json +6 -5
  543. package/node_modules/shell-quote/.github/FUNDING.yml +12 -0
  544. package/node_modules/shell-quote/.nycrc +14 -0
  545. package/node_modules/shell-quote/LICENSE +24 -0
  546. package/node_modules/shell-quote/README.md +168 -0
  547. package/node_modules/shell-quote/eslint.config.mjs +29 -0
  548. package/node_modules/shell-quote/index.d.ts +28 -0
  549. package/node_modules/shell-quote/index.js +4 -0
  550. package/node_modules/shell-quote/package.json +76 -0
  551. package/node_modules/shell-quote/parse.d.ts +46 -0
  552. package/node_modules/shell-quote/parse.js +261 -0
  553. package/node_modules/shell-quote/quote.d.ts +15 -0
  554. package/node_modules/shell-quote/quote.js +65 -0
  555. package/node_modules/shell-quote/security.md +11 -0
  556. package/node_modules/shell-quote/test/comment.js +16 -0
  557. package/node_modules/shell-quote/test/env.js +52 -0
  558. package/node_modules/shell-quote/test/env_fn.js +21 -0
  559. package/node_modules/shell-quote/test/op.js +102 -0
  560. package/node_modules/shell-quote/test/parse.js +67 -0
  561. package/node_modules/shell-quote/test/quote.js +128 -0
  562. package/node_modules/shell-quote/test/set.js +31 -0
  563. package/node_modules/shell-quote/tsconfig.json +10 -0
  564. package/node_modules/tagged-tag/index.d.ts +3 -0
  565. package/node_modules/tagged-tag/package.json +36 -0
  566. package/node_modules/tagged-tag/readme.md +5 -0
  567. package/node_modules/terminal-size/index.d.ts +17 -0
  568. package/node_modules/terminal-size/index.js +139 -0
  569. package/node_modules/terminal-size/package.json +49 -0
  570. package/node_modules/terminal-size/readme.md +32 -0
  571. package/package.json +14 -4
  572. package/node_modules/@alcalzone/ansi-tokenize/README.md +0 -248
  573. package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.d.ts +0 -11
  574. package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js +0 -41
  575. package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js.map +0 -1
  576. package/node_modules/@alcalzone/ansi-tokenize/build/diff.js +0 -17
  577. package/node_modules/@alcalzone/ansi-tokenize/build/diff.js.map +0 -1
  578. package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js +0 -27
  579. package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js.map +0 -1
  580. package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.d.ts +0 -12
  581. package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js +0 -70
  582. package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js.map +0 -1
  583. package/node_modules/@alcalzone/ansi-tokenize/node_modules/is-fullwidth-code-point/index.js +0 -40
  584. package/node_modules/@alcalzone/ansi-tokenize/node_modules/is-fullwidth-code-point/package.json +0 -45
  585. package/node_modules/@alcalzone/ansi-tokenize/node_modules/is-fullwidth-code-point/readme.md +0 -43
  586. package/node_modules/@alcalzone/ansi-tokenize/package.json +0 -63
  587. package/node_modules/cli-boxes/index.d.ts +0 -127
  588. package/node_modules/cli-boxes/index.js +0 -6
  589. package/node_modules/cli-boxes/package.json +0 -42
  590. package/node_modules/cli-boxes/readme.md +0 -115
  591. package/node_modules/cli-truncate/index.d.ts +0 -116
  592. package/node_modules/cli-truncate/index.js +0 -99
  593. package/node_modules/cli-truncate/node_modules/ansi-styles/index.d.ts +0 -236
  594. package/node_modules/cli-truncate/node_modules/ansi-styles/package.json +0 -54
  595. package/node_modules/cli-truncate/node_modules/ansi-styles/readme.md +0 -173
  596. package/node_modules/cli-truncate/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  597. package/node_modules/cli-truncate/node_modules/emoji-regex/README.md +0 -107
  598. package/node_modules/cli-truncate/node_modules/emoji-regex/index.d.ts +0 -3
  599. package/node_modules/cli-truncate/node_modules/emoji-regex/index.js +0 -4
  600. package/node_modules/cli-truncate/node_modules/emoji-regex/index.mjs +0 -4
  601. package/node_modules/cli-truncate/node_modules/emoji-regex/package.json +0 -45
  602. package/node_modules/cli-truncate/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  603. package/node_modules/cli-truncate/node_modules/is-fullwidth-code-point/index.js +0 -40
  604. package/node_modules/cli-truncate/node_modules/is-fullwidth-code-point/package.json +0 -45
  605. package/node_modules/cli-truncate/node_modules/is-fullwidth-code-point/readme.md +0 -43
  606. package/node_modules/cli-truncate/node_modules/slice-ansi/index.js +0 -105
  607. package/node_modules/cli-truncate/node_modules/slice-ansi/package.json +0 -53
  608. package/node_modules/cli-truncate/node_modules/slice-ansi/readme.md +0 -66
  609. package/node_modules/cli-truncate/node_modules/string-width/index.js +0 -82
  610. package/node_modules/cli-truncate/node_modules/string-width/package.json +0 -64
  611. package/node_modules/cli-truncate/node_modules/string-width/readme.md +0 -66
  612. package/node_modules/cli-truncate/package.json +0 -51
  613. package/node_modules/cli-truncate/readme.md +0 -150
  614. package/node_modules/ink/build/apply-styles.js +0 -175
  615. package/node_modules/ink/build/build-layout.js +0 -77
  616. package/node_modules/ink/build/calculate-wrapped-text.js +0 -53
  617. package/node_modules/ink/build/components/App.d.ts +0 -59
  618. package/node_modules/ink/build/components/App.js +0 -286
  619. package/node_modules/ink/build/components/App.js.map +0 -1
  620. package/node_modules/ink/build/components/AppContext.d.ts +0 -11
  621. package/node_modules/ink/build/components/AppContext.js +0 -11
  622. package/node_modules/ink/build/components/AppContext.js.map +0 -1
  623. package/node_modules/ink/build/components/Box.d.ts +0 -62
  624. package/node_modules/ink/build/components/Box.js +0 -20
  625. package/node_modules/ink/build/components/Box.js.map +0 -1
  626. package/node_modules/ink/build/components/Color.js +0 -62
  627. package/node_modules/ink/build/components/ErrorOverview.js +0 -79
  628. package/node_modules/ink/build/components/ErrorOverview.js.map +0 -1
  629. package/node_modules/ink/build/components/Newline.d.ts +0 -13
  630. package/node_modules/ink/build/components/Newline.js +0 -8
  631. package/node_modules/ink/build/components/Newline.js.map +0 -1
  632. package/node_modules/ink/build/components/Spacer.d.ts +0 -6
  633. package/node_modules/ink/build/components/Spacer.js +0 -10
  634. package/node_modules/ink/build/components/Spacer.js.map +0 -1
  635. package/node_modules/ink/build/components/Static.d.ts +0 -31
  636. package/node_modules/ink/build/components/Static.js +0 -33
  637. package/node_modules/ink/build/components/Static.js.map +0 -1
  638. package/node_modules/ink/build/components/StderrContext.d.ts +0 -17
  639. package/node_modules/ink/build/components/StderrContext.js +0 -13
  640. package/node_modules/ink/build/components/StderrContext.js.map +0 -1
  641. package/node_modules/ink/build/components/StdinContext.d.ts +0 -23
  642. package/node_modules/ink/build/components/StdinContext.js +0 -19
  643. package/node_modules/ink/build/components/StdinContext.js.map +0 -1
  644. package/node_modules/ink/build/components/StdoutContext.d.ts +0 -17
  645. package/node_modules/ink/build/components/StdoutContext.js +0 -13
  646. package/node_modules/ink/build/components/StdoutContext.js.map +0 -1
  647. package/node_modules/ink/build/components/Text.d.ts +0 -49
  648. package/node_modules/ink/build/components/Text.js +0 -40
  649. package/node_modules/ink/build/components/Text.js.map +0 -1
  650. package/node_modules/ink/build/components/Transform.d.ts +0 -15
  651. package/node_modules/ink/build/components/Transform.js +0 -14
  652. package/node_modules/ink/build/components/Transform.js.map +0 -1
  653. package/node_modules/ink/build/devtools-window-polyfill.js +0 -64
  654. package/node_modules/ink/build/devtools-window-polyfill.js.map +0 -1
  655. package/node_modules/ink/build/devtools.js +0 -9
  656. package/node_modules/ink/build/devtools.js.map +0 -1
  657. package/node_modules/ink/build/dom.d.ts +0 -42
  658. package/node_modules/ink/build/dom.js +0 -117
  659. package/node_modules/ink/build/dom.js.map +0 -1
  660. package/node_modules/ink/build/experimental/apply-style.js +0 -140
  661. package/node_modules/ink/build/experimental/dom.js +0 -123
  662. package/node_modules/ink/build/experimental/output.js +0 -91
  663. package/node_modules/ink/build/experimental/reconciler.js +0 -141
  664. package/node_modules/ink/build/experimental/renderer.js +0 -81
  665. package/node_modules/ink/build/hooks/use-app.d.ts +0 -5
  666. package/node_modules/ink/build/hooks/use-app.js +0 -8
  667. package/node_modules/ink/build/hooks/use-app.js.map +0 -1
  668. package/node_modules/ink/build/hooks/use-focus-manager.d.ts +0 -34
  669. package/node_modules/ink/build/hooks/use-focus-manager.js +0 -18
  670. package/node_modules/ink/build/hooks/use-focus-manager.js.map +0 -1
  671. package/node_modules/ink/build/hooks/use-focus.d.ts +0 -34
  672. package/node_modules/ink/build/hooks/use-focus.js +0 -47
  673. package/node_modules/ink/build/hooks/use-focus.js.map +0 -1
  674. package/node_modules/ink/build/hooks/use-input.d.ts +0 -97
  675. package/node_modules/ink/build/hooks/use-input.js +0 -96
  676. package/node_modules/ink/build/hooks/use-input.js.map +0 -1
  677. package/node_modules/ink/build/hooks/use-stderr.d.ts +0 -5
  678. package/node_modules/ink/build/hooks/use-stderr.js +0 -8
  679. package/node_modules/ink/build/hooks/use-stderr.js.map +0 -1
  680. package/node_modules/ink/build/hooks/use-stdin.d.ts +0 -5
  681. package/node_modules/ink/build/hooks/use-stdin.js +0 -8
  682. package/node_modules/ink/build/hooks/use-stdin.js.map +0 -1
  683. package/node_modules/ink/build/hooks/use-stdout.d.ts +0 -5
  684. package/node_modules/ink/build/hooks/use-stdout.js +0 -8
  685. package/node_modules/ink/build/hooks/use-stdout.js.map +0 -1
  686. package/node_modules/ink/build/hooks/useInput.js +0 -38
  687. package/node_modules/ink/build/index.d.ts +0 -27
  688. package/node_modules/ink/build/index.js +0 -16
  689. package/node_modules/ink/build/index.js.map +0 -1
  690. package/node_modules/ink/build/ink.d.ts +0 -37
  691. package/node_modules/ink/build/ink.js +0 -235
  692. package/node_modules/ink/build/ink.js.map +0 -1
  693. package/node_modules/ink/build/instance.js +0 -205
  694. package/node_modules/ink/build/log-update.d.ts +0 -12
  695. package/node_modules/ink/build/log-update.js +0 -37
  696. package/node_modules/ink/build/log-update.js.map +0 -1
  697. package/node_modules/ink/build/measure-element.d.ts +0 -16
  698. package/node_modules/ink/build/measure-element.js +0 -9
  699. package/node_modules/ink/build/measure-element.js.map +0 -1
  700. package/node_modules/ink/build/measure-text.js +0 -20
  701. package/node_modules/ink/build/measure-text.js.map +0 -1
  702. package/node_modules/ink/build/output.d.ts +0 -35
  703. package/node_modules/ink/build/output.js +0 -148
  704. package/node_modules/ink/build/output.js.map +0 -1
  705. package/node_modules/ink/build/parse-keypress.d.ts +0 -14
  706. package/node_modules/ink/build/parse-keypress.js +0 -225
  707. package/node_modules/ink/build/parse-keypress.js.map +0 -1
  708. package/node_modules/ink/build/reconciler.d.ts +0 -4
  709. package/node_modules/ink/build/reconciler.js +0 -219
  710. package/node_modules/ink/build/reconciler.js.map +0 -1
  711. package/node_modules/ink/build/render-border.js +0 -73
  712. package/node_modules/ink/build/render-border.js.map +0 -1
  713. package/node_modules/ink/build/render-node-to-output.d.ts +0 -10
  714. package/node_modules/ink/build/render-node-to-output.js +0 -99
  715. package/node_modules/ink/build/render-node-to-output.js.map +0 -1
  716. package/node_modules/ink/build/render.d.ts +0 -63
  717. package/node_modules/ink/build/render.js +0 -48
  718. package/node_modules/ink/build/render.js.map +0 -1
  719. package/node_modules/ink/build/renderer.d.ts +0 -8
  720. package/node_modules/ink/build/renderer.js +0 -36
  721. package/node_modules/ink/build/renderer.js.map +0 -1
  722. package/node_modules/ink/build/squash-text-nodes.js +0 -35
  723. package/node_modules/ink/build/squash-text-nodes.js.map +0 -1
  724. package/node_modules/ink/build/styles.d.ts +0 -243
  725. package/node_modules/ink/build/styles.js +0 -232
  726. package/node_modules/ink/build/styles.js.map +0 -1
  727. package/node_modules/ink/build/wrap-text.js +0 -31
  728. package/node_modules/ink/build/wrap-text.js.map +0 -1
  729. package/node_modules/ink/license +0 -9
  730. package/node_modules/ink/node_modules/ansi-styles/index.d.ts +0 -236
  731. package/node_modules/ink/node_modules/ansi-styles/index.js +0 -223
  732. package/node_modules/ink/node_modules/ansi-styles/package.json +0 -54
  733. package/node_modules/ink/node_modules/ansi-styles/readme.md +0 -173
  734. package/node_modules/ink/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
  735. package/node_modules/ink/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  736. package/node_modules/ink/node_modules/emoji-regex/README.md +0 -107
  737. package/node_modules/ink/node_modules/emoji-regex/index.d.ts +0 -3
  738. package/node_modules/ink/node_modules/emoji-regex/index.js +0 -4
  739. package/node_modules/ink/node_modules/emoji-regex/index.mjs +0 -4
  740. package/node_modules/ink/node_modules/emoji-regex/package.json +0 -45
  741. package/node_modules/ink/node_modules/string-width/index.d.ts +0 -39
  742. package/node_modules/ink/node_modules/string-width/index.js +0 -82
  743. package/node_modules/ink/node_modules/string-width/package.json +0 -64
  744. package/node_modules/ink/node_modules/string-width/readme.md +0 -66
  745. package/node_modules/ink/node_modules/type-fest/index.d.ts +0 -178
  746. package/node_modules/ink/node_modules/type-fest/package.json +0 -91
  747. package/node_modules/ink/node_modules/type-fest/readme.md +0 -1060
  748. package/node_modules/ink/node_modules/type-fest/source/all-union-fields.d.ts +0 -88
  749. package/node_modules/ink/node_modules/type-fest/source/and.d.ts +0 -25
  750. package/node_modules/ink/node_modules/type-fest/source/array-indices.d.ts +0 -23
  751. package/node_modules/ink/node_modules/type-fest/source/array-slice.d.ts +0 -109
  752. package/node_modules/ink/node_modules/type-fest/source/array-splice.d.ts +0 -99
  753. package/node_modules/ink/node_modules/type-fest/source/array-tail.d.ts +0 -76
  754. package/node_modules/ink/node_modules/type-fest/source/array-values.d.ts +0 -22
  755. package/node_modules/ink/node_modules/type-fest/source/arrayable.d.ts +0 -29
  756. package/node_modules/ink/node_modules/type-fest/source/async-return-type.d.ts +0 -23
  757. package/node_modules/ink/node_modules/type-fest/source/asyncify.d.ts +0 -32
  758. package/node_modules/ink/node_modules/type-fest/source/basic.d.ts +0 -68
  759. package/node_modules/ink/node_modules/type-fest/source/camel-case.d.ts +0 -89
  760. package/node_modules/ink/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +0 -97
  761. package/node_modules/ink/node_modules/type-fest/source/camel-cased-properties.d.ts +0 -43
  762. package/node_modules/ink/node_modules/type-fest/source/conditional-except.d.ts +0 -45
  763. package/node_modules/ink/node_modules/type-fest/source/conditional-keys.d.ts +0 -47
  764. package/node_modules/ink/node_modules/type-fest/source/conditional-pick-deep.d.ts +0 -118
  765. package/node_modules/ink/node_modules/type-fest/source/conditional-pick.d.ts +0 -44
  766. package/node_modules/ink/node_modules/type-fest/source/conditional-simplify.d.ts +0 -32
  767. package/node_modules/ink/node_modules/type-fest/source/delimiter-case.d.ts +0 -78
  768. package/node_modules/ink/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +0 -106
  769. package/node_modules/ink/node_modules/type-fest/source/delimiter-cased-properties.d.ts +0 -46
  770. package/node_modules/ink/node_modules/type-fest/source/distributed-omit.d.ts +0 -89
  771. package/node_modules/ink/node_modules/type-fest/source/distributed-pick.d.ts +0 -85
  772. package/node_modules/ink/node_modules/type-fest/source/empty-object.d.ts +0 -46
  773. package/node_modules/ink/node_modules/type-fest/source/enforce-optional.d.ts +0 -47
  774. package/node_modules/ink/node_modules/type-fest/source/entries.d.ts +0 -62
  775. package/node_modules/ink/node_modules/type-fest/source/entry.d.ts +0 -65
  776. package/node_modules/ink/node_modules/type-fest/source/exact.d.ts +0 -68
  777. package/node_modules/ink/node_modules/type-fest/source/except.d.ts +0 -108
  778. package/node_modules/ink/node_modules/type-fest/source/find-global-type.d.ts +0 -64
  779. package/node_modules/ink/node_modules/type-fest/source/fixed-length-array.d.ts +0 -43
  780. package/node_modules/ink/node_modules/type-fest/source/get.d.ts +0 -219
  781. package/node_modules/ink/node_modules/type-fest/source/global-this.d.ts +0 -21
  782. package/node_modules/ink/node_modules/type-fest/source/greater-than-or-equal.d.ts +0 -22
  783. package/node_modules/ink/node_modules/type-fest/source/greater-than.d.ts +0 -56
  784. package/node_modules/ink/node_modules/type-fest/source/has-optional-keys.d.ts +0 -21
  785. package/node_modules/ink/node_modules/type-fest/source/has-readonly-keys.d.ts +0 -21
  786. package/node_modules/ink/node_modules/type-fest/source/has-required-keys.d.ts +0 -59
  787. package/node_modules/ink/node_modules/type-fest/source/has-writable-keys.d.ts +0 -21
  788. package/node_modules/ink/node_modules/type-fest/source/if-any.d.ts +0 -24
  789. package/node_modules/ink/node_modules/type-fest/source/if-empty-object.d.ts +0 -26
  790. package/node_modules/ink/node_modules/type-fest/source/if-never.d.ts +0 -24
  791. package/node_modules/ink/node_modules/type-fest/source/if-null.d.ts +0 -24
  792. package/node_modules/ink/node_modules/type-fest/source/if-unknown.d.ts +0 -24
  793. package/node_modules/ink/node_modules/type-fest/source/includes.d.ts +0 -22
  794. package/node_modules/ink/node_modules/type-fest/source/int-closed-range.d.ts +0 -35
  795. package/node_modules/ink/node_modules/type-fest/source/int-range.d.ts +0 -55
  796. package/node_modules/ink/node_modules/type-fest/source/internal/array.d.ts +0 -126
  797. package/node_modules/ink/node_modules/type-fest/source/internal/characters.d.ts +0 -67
  798. package/node_modules/ink/node_modules/type-fest/source/internal/index.d.ts +0 -8
  799. package/node_modules/ink/node_modules/type-fest/source/internal/keys.d.ts +0 -97
  800. package/node_modules/ink/node_modules/type-fest/source/internal/numeric.d.ts +0 -118
  801. package/node_modules/ink/node_modules/type-fest/source/internal/object.d.ts +0 -236
  802. package/node_modules/ink/node_modules/type-fest/source/internal/string.d.ts +0 -210
  803. package/node_modules/ink/node_modules/type-fest/source/internal/tuple.d.ts +0 -90
  804. package/node_modules/ink/node_modules/type-fest/source/internal/type.d.ts +0 -139
  805. package/node_modules/ink/node_modules/type-fest/source/invariant-of.d.ts +0 -76
  806. package/node_modules/ink/node_modules/type-fest/source/is-any.d.ts +0 -33
  807. package/node_modules/ink/node_modules/type-fest/source/is-equal.d.ts +0 -31
  808. package/node_modules/ink/node_modules/type-fest/source/is-float.d.ts +0 -41
  809. package/node_modules/ink/node_modules/type-fest/source/is-integer.d.ts +0 -58
  810. package/node_modules/ink/node_modules/type-fest/source/is-literal.d.ts +0 -296
  811. package/node_modules/ink/node_modules/type-fest/source/is-never.d.ts +0 -42
  812. package/node_modules/ink/node_modules/type-fest/source/is-null.d.ts +0 -20
  813. package/node_modules/ink/node_modules/type-fest/source/is-tuple.d.ts +0 -89
  814. package/node_modules/ink/node_modules/type-fest/source/is-unknown.d.ts +0 -52
  815. package/node_modules/ink/node_modules/type-fest/source/iterable-element.d.ts +0 -64
  816. package/node_modules/ink/node_modules/type-fest/source/join.d.ts +0 -68
  817. package/node_modules/ink/node_modules/type-fest/source/jsonifiable.d.ts +0 -37
  818. package/node_modules/ink/node_modules/type-fest/source/jsonify.d.ts +0 -122
  819. package/node_modules/ink/node_modules/type-fest/source/kebab-case.d.ts +0 -44
  820. package/node_modules/ink/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +0 -63
  821. package/node_modules/ink/node_modules/type-fest/source/kebab-cased-properties.d.ts +0 -40
  822. package/node_modules/ink/node_modules/type-fest/source/keys-of-union.d.ts +0 -42
  823. package/node_modules/ink/node_modules/type-fest/source/last-array-element.d.ts +0 -38
  824. package/node_modules/ink/node_modules/type-fest/source/less-than-or-equal.d.ts +0 -22
  825. package/node_modules/ink/node_modules/type-fest/source/less-than.d.ts +0 -26
  826. package/node_modules/ink/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +0 -36
  827. package/node_modules/ink/node_modules/type-fest/source/literal-to-primitive.d.ts +0 -36
  828. package/node_modules/ink/node_modules/type-fest/source/literal-union.d.ts +0 -37
  829. package/node_modules/ink/node_modules/type-fest/source/merge-deep.d.ts +0 -486
  830. package/node_modules/ink/node_modules/type-fest/source/merge-exclusive.d.ts +0 -41
  831. package/node_modules/ink/node_modules/type-fest/source/merge.d.ts +0 -48
  832. package/node_modules/ink/node_modules/type-fest/source/multidimensional-array.d.ts +0 -44
  833. package/node_modules/ink/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +0 -48
  834. package/node_modules/ink/node_modules/type-fest/source/non-empty-object.d.ts +0 -35
  835. package/node_modules/ink/node_modules/type-fest/source/non-empty-string.d.ts +0 -28
  836. package/node_modules/ink/node_modules/type-fest/source/non-empty-tuple.d.ts +0 -21
  837. package/node_modules/ink/node_modules/type-fest/source/numeric.d.ts +0 -222
  838. package/node_modules/ink/node_modules/type-fest/source/observable-like.d.ts +0 -63
  839. package/node_modules/ink/node_modules/type-fest/source/omit-deep.d.ts +0 -167
  840. package/node_modules/ink/node_modules/type-fest/source/omit-index-signature.d.ts +0 -95
  841. package/node_modules/ink/node_modules/type-fest/source/opaque.d.ts +0 -1
  842. package/node_modules/ink/node_modules/type-fest/source/optional-keys-of.d.ts +0 -39
  843. package/node_modules/ink/node_modules/type-fest/source/or.d.ts +0 -25
  844. package/node_modules/ink/node_modules/type-fest/source/override-properties.d.ts +0 -36
  845. package/node_modules/ink/node_modules/type-fest/source/package-json.d.ts +0 -676
  846. package/node_modules/ink/node_modules/type-fest/source/partial-deep.d.ts +0 -151
  847. package/node_modules/ink/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +0 -78
  848. package/node_modules/ink/node_modules/type-fest/source/pascal-case.d.ts +0 -42
  849. package/node_modules/ink/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +0 -62
  850. package/node_modules/ink/node_modules/type-fest/source/pascal-cased-properties.d.ts +0 -36
  851. package/node_modules/ink/node_modules/type-fest/source/paths.d.ts +0 -262
  852. package/node_modules/ink/node_modules/type-fest/source/pick-deep.d.ts +0 -149
  853. package/node_modules/ink/node_modules/type-fest/source/pick-index-signature.d.ts +0 -50
  854. package/node_modules/ink/node_modules/type-fest/source/primitive.d.ts +0 -13
  855. package/node_modules/ink/node_modules/type-fest/source/promisable.d.ts +0 -25
  856. package/node_modules/ink/node_modules/type-fest/source/readonly-deep.d.ts +0 -81
  857. package/node_modules/ink/node_modules/type-fest/source/readonly-keys-of.d.ts +0 -30
  858. package/node_modules/ink/node_modules/type-fest/source/readonly-tuple.d.ts +0 -41
  859. package/node_modules/ink/node_modules/type-fest/source/replace.d.ts +0 -85
  860. package/node_modules/ink/node_modules/type-fest/source/require-all-or-none.d.ts +0 -51
  861. package/node_modules/ink/node_modules/type-fest/source/require-at-least-one.d.ts +0 -47
  862. package/node_modules/ink/node_modules/type-fest/source/require-exactly-one.d.ts +0 -45
  863. package/node_modules/ink/node_modules/type-fest/source/require-one-or-none.d.ts +0 -46
  864. package/node_modules/ink/node_modules/type-fest/source/required-deep.d.ts +0 -78
  865. package/node_modules/ink/node_modules/type-fest/source/required-keys-of.d.ts +0 -30
  866. package/node_modules/ink/node_modules/type-fest/source/schema.d.ts +0 -114
  867. package/node_modules/ink/node_modules/type-fest/source/screaming-snake-case.d.ts +0 -28
  868. package/node_modules/ink/node_modules/type-fest/source/set-field-type.d.ts +0 -65
  869. package/node_modules/ink/node_modules/type-fest/source/set-non-nullable-deep.d.ts +0 -83
  870. package/node_modules/ink/node_modules/type-fest/source/set-non-nullable.d.ts +0 -39
  871. package/node_modules/ink/node_modules/type-fest/source/set-optional.d.ts +0 -38
  872. package/node_modules/ink/node_modules/type-fest/source/set-parameter-type.d.ts +0 -117
  873. package/node_modules/ink/node_modules/type-fest/source/set-readonly.d.ts +0 -39
  874. package/node_modules/ink/node_modules/type-fest/source/set-required-deep.d.ts +0 -68
  875. package/node_modules/ink/node_modules/type-fest/source/set-required.d.ts +0 -70
  876. package/node_modules/ink/node_modules/type-fest/source/set-return-type.d.ts +0 -29
  877. package/node_modules/ink/node_modules/type-fest/source/shared-union-fields-deep.d.ts +0 -178
  878. package/node_modules/ink/node_modules/type-fest/source/shared-union-fields.d.ts +0 -76
  879. package/node_modules/ink/node_modules/type-fest/source/simplify-deep.d.ts +0 -115
  880. package/node_modules/ink/node_modules/type-fest/source/simplify.d.ts +0 -58
  881. package/node_modules/ink/node_modules/type-fest/source/single-key-object.d.ts +0 -29
  882. package/node_modules/ink/node_modules/type-fest/source/snake-case.d.ts +0 -45
  883. package/node_modules/ink/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +0 -63
  884. package/node_modules/ink/node_modules/type-fest/source/snake-cased-properties.d.ts +0 -40
  885. package/node_modules/ink/node_modules/type-fest/source/split.d.ts +0 -88
  886. package/node_modules/ink/node_modules/type-fest/source/spread.d.ts +0 -84
  887. package/node_modules/ink/node_modules/type-fest/source/string-key-of.d.ts +0 -25
  888. package/node_modules/ink/node_modules/type-fest/source/string-repeat.d.ts +0 -47
  889. package/node_modules/ink/node_modules/type-fest/source/string-slice.d.ts +0 -37
  890. package/node_modules/ink/node_modules/type-fest/source/stringified.d.ts +0 -23
  891. package/node_modules/ink/node_modules/type-fest/source/structured-cloneable.d.ts +0 -92
  892. package/node_modules/ink/node_modules/type-fest/source/subtract.d.ts +0 -83
  893. package/node_modules/ink/node_modules/type-fest/source/sum.d.ts +0 -78
  894. package/node_modules/ink/node_modules/type-fest/source/tagged-union.d.ts +0 -51
  895. package/node_modules/ink/node_modules/type-fest/source/tagged.d.ts +0 -256
  896. package/node_modules/ink/node_modules/type-fest/source/trim.d.ts +0 -27
  897. package/node_modules/ink/node_modules/type-fest/source/tsconfig-json.d.ts +0 -1294
  898. package/node_modules/ink/node_modules/type-fest/source/tuple-to-object.d.ts +0 -42
  899. package/node_modules/ink/node_modules/type-fest/source/tuple-to-union.d.ts +0 -51
  900. package/node_modules/ink/node_modules/type-fest/source/typed-array.d.ts +0 -17
  901. package/node_modules/ink/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +0 -80
  902. package/node_modules/ink/node_modules/type-fest/source/union-to-intersection.d.ts +0 -61
  903. package/node_modules/ink/node_modules/type-fest/source/union-to-tuple.d.ts +0 -56
  904. package/node_modules/ink/node_modules/type-fest/source/unknown-array.d.ts +0 -25
  905. package/node_modules/ink/node_modules/type-fest/source/unknown-map.d.ts +0 -24
  906. package/node_modules/ink/node_modules/type-fest/source/unknown-record.d.ts +0 -31
  907. package/node_modules/ink/node_modules/type-fest/source/unknown-set.d.ts +0 -24
  908. package/node_modules/ink/node_modules/type-fest/source/value-of.d.ts +0 -42
  909. package/node_modules/ink/node_modules/type-fest/source/words.d.ts +0 -118
  910. package/node_modules/ink/node_modules/type-fest/source/writable-deep.d.ts +0 -83
  911. package/node_modules/ink/node_modules/type-fest/source/writable-keys-of.d.ts +0 -33
  912. package/node_modules/ink/node_modules/type-fest/source/writable.d.ts +0 -68
  913. package/node_modules/ink/node_modules/wrap-ansi/index.d.ts +0 -41
  914. package/node_modules/ink/node_modules/wrap-ansi/index.js +0 -222
  915. package/node_modules/ink/node_modules/wrap-ansi/package.json +0 -69
  916. package/node_modules/ink/node_modules/wrap-ansi/readme.md +0 -75
  917. package/node_modules/ink/package.json +0 -196
  918. package/node_modules/ink/readme.md +0 -2162
  919. package/node_modules/is-in-ci/index.js +0 -11
  920. package/node_modules/is-in-ci/license +0 -9
  921. package/node_modules/is-in-ci/package.json +0 -49
  922. package/node_modules/is-in-ci/readme.md +0 -44
  923. package/node_modules/js-tokens/CHANGELOG.md +0 -151
  924. package/node_modules/js-tokens/LICENSE +0 -21
  925. package/node_modules/js-tokens/README.md +0 -240
  926. package/node_modules/js-tokens/index.js +0 -23
  927. package/node_modules/js-tokens/package.json +0 -30
  928. package/node_modules/loose-envify/LICENSE +0 -21
  929. package/node_modules/loose-envify/README.md +0 -45
  930. package/node_modules/loose-envify/cli.js +0 -16
  931. package/node_modules/loose-envify/custom.js +0 -4
  932. package/node_modules/loose-envify/index.js +0 -3
  933. package/node_modules/loose-envify/loose-envify.js +0 -36
  934. package/node_modules/loose-envify/package.json +0 -36
  935. package/node_modules/loose-envify/replace.js +0 -65
  936. package/node_modules/react/LICENSE +0 -21
  937. package/node_modules/react/README.md +0 -37
  938. package/node_modules/react/cjs/react-jsx-dev-runtime.development.js +0 -1315
  939. package/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +0 -10
  940. package/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +0 -10
  941. package/node_modules/react/cjs/react-jsx-runtime.development.js +0 -1333
  942. package/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -11
  943. package/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +0 -11
  944. package/node_modules/react/cjs/react.development.js +0 -2740
  945. package/node_modules/react/cjs/react.production.min.js +0 -26
  946. package/node_modules/react/cjs/react.shared-subset.development.js +0 -20
  947. package/node_modules/react/cjs/react.shared-subset.production.min.js +0 -10
  948. package/node_modules/react/index.js +0 -7
  949. package/node_modules/react/jsx-dev-runtime.js +0 -7
  950. package/node_modules/react/jsx-runtime.js +0 -7
  951. package/node_modules/react/package.json +0 -47
  952. package/node_modules/react/react.shared-subset.js +0 -7
  953. package/node_modules/react/umd/react.development.js +0 -3343
  954. package/node_modules/react/umd/react.production.min.js +0 -31
  955. package/node_modules/react/umd/react.profiling.min.js +0 -31
  956. package/node_modules/react-reconciler/LICENSE +0 -21
  957. package/node_modules/react-reconciler/README.md +0 -337
  958. package/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js +0 -45
  959. package/node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js +0 -10
  960. package/node_modules/react-reconciler/cjs/react-reconciler-reflection.development.js +0 -660
  961. package/node_modules/react-reconciler/cjs/react-reconciler-reflection.production.min.js +0 -15
  962. package/node_modules/react-reconciler/cjs/react-reconciler.development.js +0 -21531
  963. package/node_modules/react-reconciler/cjs/react-reconciler.production.min.js +0 -234
  964. package/node_modules/react-reconciler/cjs/react-reconciler.profiling.min.js +0 -255
  965. package/node_modules/react-reconciler/constants.js +0 -7
  966. package/node_modules/react-reconciler/index.js +0 -7
  967. package/node_modules/react-reconciler/package.json +0 -40
  968. package/node_modules/react-reconciler/reflection.js +0 -7
  969. package/node_modules/scheduler/LICENSE +0 -21
  970. package/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +0 -700
  971. package/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +0 -20
  972. package/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +0 -207
  973. package/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.min.js +0 -14
  974. package/node_modules/scheduler/cjs/scheduler.development.js +0 -634
  975. package/node_modules/scheduler/cjs/scheduler.production.min.js +0 -19
  976. package/node_modules/scheduler/index.js +0 -7
  977. package/node_modules/scheduler/package.json +0 -36
  978. package/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +0 -699
  979. package/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +0 -19
  980. package/node_modules/scheduler/umd/scheduler.development.js +0 -152
  981. package/node_modules/scheduler/umd/scheduler.production.min.js +0 -146
  982. package/node_modules/scheduler/umd/scheduler.profiling.min.js +0 -146
  983. package/node_modules/scheduler/unstable_mock.js +0 -7
  984. package/node_modules/scheduler/unstable_post_task.js +0 -7
  985. package/node_modules/slice-ansi/index.d.ts +0 -19
  986. package/node_modules/slice-ansi/index.js +0 -169
  987. package/node_modules/slice-ansi/license +0 -10
  988. package/node_modules/slice-ansi/node_modules/ansi-styles/index.d.ts +0 -236
  989. package/node_modules/slice-ansi/node_modules/ansi-styles/index.js +0 -223
  990. package/node_modules/slice-ansi/node_modules/ansi-styles/license +0 -9
  991. package/node_modules/slice-ansi/node_modules/ansi-styles/package.json +0 -54
  992. package/node_modules/slice-ansi/node_modules/ansi-styles/readme.md +0 -173
  993. package/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  994. package/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/license +0 -9
  995. package/node_modules/slice-ansi/package.json +0 -58
  996. package/node_modules/slice-ansi/readme.md +0 -54
  997. package/node_modules/widest-line/license +0 -9
  998. package/node_modules/widest-line/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  999. package/node_modules/widest-line/node_modules/emoji-regex/README.md +0 -107
  1000. package/node_modules/widest-line/node_modules/emoji-regex/index.d.ts +0 -3
  1001. package/node_modules/widest-line/node_modules/emoji-regex/index.js +0 -4
  1002. package/node_modules/widest-line/node_modules/emoji-regex/index.mjs +0 -4
  1003. package/node_modules/widest-line/node_modules/emoji-regex/package.json +0 -45
  1004. package/node_modules/widest-line/node_modules/string-width/index.d.ts +0 -39
  1005. package/node_modules/widest-line/node_modules/string-width/index.js +0 -82
  1006. package/node_modules/widest-line/node_modules/string-width/license +0 -9
  1007. package/node_modules/widest-line/node_modules/string-width/package.json +0 -64
  1008. package/node_modules/widest-line/node_modules/string-width/readme.md +0 -66
  1009. package/node_modules/widest-line/package.json +0 -60
  1010. /package/node_modules/{ink/build/devtools-window-polyfill.d.ts → @quantiya/codevibe-core/dist/orchestration-shell/__tests__/companion-turn-mirror.test.d.ts} +0 -0
  1011. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/diff.d.ts +0 -0
  1012. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/index.d.ts +0 -0
  1013. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/index.js +0 -0
  1014. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/index.js.map +0 -0
  1015. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/reduce.d.ts +0 -0
  1016. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/styledChars.d.ts +0 -0
  1017. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/styledChars.js +0 -0
  1018. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/styledChars.js.map +0 -0
  1019. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/undo.d.ts +0 -0
  1020. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/undo.js +0 -0
  1021. /package/node_modules/{@alcalzone → @quantiya/codevibe-core/node_modules/@alcalzone}/ansi-tokenize/build/undo.js.map +0 -0
  1022. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/ansi-escapes/base.d.ts +0 -0
  1023. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/ansi-escapes/base.js +0 -0
  1024. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/ansi-escapes/index.d.ts +0 -0
  1025. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/ansi-escapes/index.js +0 -0
  1026. /package/node_modules/{@alcalzone/ansi-tokenize/node_modules/ansi-styles → @quantiya/codevibe-core/node_modules/ansi-escapes}/license +0 -0
  1027. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/ansi-escapes/package.json +0 -0
  1028. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/ansi-escapes/readme.md +0 -0
  1029. /package/node_modules/{@alcalzone/ansi-tokenize → @quantiya/codevibe-core}/node_modules/ansi-styles/index.d.ts +0 -0
  1030. /package/node_modules/{@alcalzone/ansi-tokenize → @quantiya/codevibe-core}/node_modules/ansi-styles/index.js +0 -0
  1031. /package/node_modules/{@alcalzone/ansi-tokenize/node_modules/is-fullwidth-code-point → @quantiya/codevibe-core/node_modules/ansi-styles}/license +0 -0
  1032. /package/node_modules/{@alcalzone/ansi-tokenize → @quantiya/codevibe-core}/node_modules/ansi-styles/package.json +0 -0
  1033. /package/node_modules/{@alcalzone/ansi-tokenize → @quantiya/codevibe-core}/node_modules/ansi-styles/readme.md +0 -0
  1034. /package/node_modules/{cli-boxes → @quantiya/codevibe-core/node_modules/chalk}/license +0 -0
  1035. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/package.json +0 -0
  1036. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/readme.md +0 -0
  1037. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/index.d.ts +0 -0
  1038. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/index.js +0 -0
  1039. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/utilities.js +0 -0
  1040. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -0
  1041. /package/node_modules/{cli-truncate/node_modules → @quantiya/codevibe-core/node_modules/chalk/source/vendor}/ansi-styles/index.js +0 -0
  1042. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -0
  1043. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/vendor/supports-color/browser.js +0 -0
  1044. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -0
  1045. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/chalk/source/vendor/supports-color/index.js +0 -0
  1046. /package/node_modules/{cli-boxes → @quantiya/codevibe-core/node_modules/cli-boxes}/boxes.json +0 -0
  1047. /package/node_modules/{cli-truncate → @quantiya/codevibe-core/node_modules/cli-boxes}/license +0 -0
  1048. /package/node_modules/{cli-truncate/node_modules/ansi-styles → @quantiya/codevibe-core/node_modules/cli-truncate}/license +0 -0
  1049. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/colorize.d.ts +0 -0
  1050. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/colorize.js +0 -0
  1051. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/colorize.js.map +0 -0
  1052. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/components/ErrorOverview.d.ts +0 -0
  1053. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/components/FocusContext.d.ts +0 -0
  1054. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/components/FocusContext.js +0 -0
  1055. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/components/FocusContext.js.map +0 -0
  1056. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/devtools.d.ts +0 -0
  1057. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/get-max-width.d.ts +0 -0
  1058. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/get-max-width.js +0 -0
  1059. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/get-max-width.js.map +0 -0
  1060. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/instances.d.ts +0 -0
  1061. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/instances.js +0 -0
  1062. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/instances.js.map +0 -0
  1063. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/measure-text.d.ts +0 -0
  1064. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/render-border.d.ts +0 -0
  1065. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/squash-text-nodes.d.ts +0 -0
  1066. /package/node_modules/{ink → @quantiya/codevibe-core/node_modules/ink}/build/wrap-text.d.ts +0 -0
  1067. /package/node_modules/{@alcalzone/ansi-tokenize → @quantiya/codevibe-core}/node_modules/is-fullwidth-code-point/index.d.ts +0 -0
  1068. /package/node_modules/{slice-ansi → @quantiya/codevibe-core}/node_modules/is-fullwidth-code-point/index.js +0 -0
  1069. /package/node_modules/{cli-truncate → @quantiya/codevibe-core}/node_modules/is-fullwidth-code-point/license +0 -0
  1070. /package/node_modules/{slice-ansi → @quantiya/codevibe-core}/node_modules/is-fullwidth-code-point/package.json +0 -0
  1071. /package/node_modules/{slice-ansi → @quantiya/codevibe-core}/node_modules/is-fullwidth-code-point/readme.md +0 -0
  1072. /package/node_modules/{is-in-ci → @quantiya/codevibe-core/node_modules/is-in-ci}/cli.js +0 -0
  1073. /package/node_modules/{is-in-ci → @quantiya/codevibe-core/node_modules/is-in-ci}/index.d.ts +0 -0
  1074. /package/node_modules/{cli-truncate/node_modules/string-width → @quantiya/codevibe-core/node_modules/is-in-ci}/license +0 -0
  1075. /package/node_modules/{scheduler → @quantiya/codevibe-core/node_modules/scheduler}/README.md +0 -0
  1076. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/signal-exit/LICENSE.txt +0 -0
  1077. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/signal-exit/README.md +0 -0
  1078. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/signal-exit/index.js +0 -0
  1079. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/signal-exit/package.json +0 -0
  1080. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/signal-exit/signals.js +0 -0
  1081. /package/node_modules/{cli-truncate → @quantiya/codevibe-core}/node_modules/slice-ansi/license +0 -0
  1082. /package/node_modules/{cli-truncate → @quantiya/codevibe-core}/node_modules/string-width/index.d.ts +0 -0
  1083. /package/node_modules/{ink/node_modules/ansi-escapes → @quantiya/codevibe-core/node_modules/string-width}/license +0 -0
  1084. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/type-fest/license-cc0 +0 -0
  1085. /package/node_modules/{ink → @quantiya/codevibe-core}/node_modules/type-fest/license-mit +0 -0
  1086. /package/node_modules/{widest-line → @quantiya/codevibe-core/node_modules/widest-line}/index.d.ts +0 -0
  1087. /package/node_modules/{widest-line → @quantiya/codevibe-core/node_modules/widest-line}/index.js +0 -0
  1088. /package/node_modules/{ink/node_modules/ansi-styles → @quantiya/codevibe-core/node_modules/widest-line}/license +0 -0
  1089. /package/node_modules/{widest-line → @quantiya/codevibe-core/node_modules/widest-line}/readme.md +0 -0
  1090. /package/node_modules/{ink/node_modules/chalk → @quantiya/codevibe-core/node_modules/wrap-ansi}/license +0 -0
  1091. /package/node_modules/{ink/node_modules/string-width → tagged-tag}/license +0 -0
  1092. /package/node_modules/{ink/node_modules/wrap-ansi → terminal-size}/license +0 -0
@@ -6,8 +6,13 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esm = (fn, res) => function __init() {
10
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ var __esm = (fn, res, err) => function __init() {
10
+ if (err) throw err[0];
11
+ try {
12
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
13
+ } catch (e) {
14
+ throw err = [e], e;
15
+ }
11
16
  };
12
17
  var __export = (target, all) => {
13
18
  for (var name in all)
@@ -321,7 +326,7 @@ var init_types = __esm({
321
326
  // src/continuation/dirty-state-collector.ts
322
327
  function isPathInAuthorityScope(repoPath, scope) {
323
328
  const scopes = [...scope.writeScopes, ...scope.readScopes];
324
- return scopes.some((s) => repoPath === s || repoPath.startsWith(s + path9.sep));
329
+ return scopes.some((s) => repoPath === s || repoPath.startsWith(s + path8.sep));
325
330
  }
326
331
  async function collectOne(knownRepo, gitExec, timeoutMs) {
327
332
  let headSha = "unknown";
@@ -373,12 +378,12 @@ async function collectRepoStates(authority, knownRepos, options = {}) {
373
378
  );
374
379
  return Promise.all(clamped.map((r) => collectOne(r, gitExec, timeoutMs)));
375
380
  }
376
- var import_node_child_process, path9, GIT_TIMEOUT_MS, SCRUBBED_ENV, defaultGitExec;
381
+ var import_node_child_process, path8, GIT_TIMEOUT_MS, SCRUBBED_ENV, defaultGitExec;
377
382
  var init_dirty_state_collector = __esm({
378
383
  "src/continuation/dirty-state-collector.ts"() {
379
384
  "use strict";
380
385
  import_node_child_process = require("node:child_process");
381
- path9 = __toESM(require("node:path"));
386
+ path8 = __toESM(require("node:path"));
382
387
  GIT_TIMEOUT_MS = 5e3;
383
388
  SCRUBBED_ENV = (() => {
384
389
  const out = {};
@@ -520,11 +525,11 @@ ${yaml}---
520
525
 
521
526
  ${prose}`;
522
527
  }
523
- function getTaskDirectoryPath(taskId, homeDir = os10.homedir()) {
524
- return path10.join(homeDir, ".codevibe", "tasks", taskId);
528
+ function getTaskDirectoryPath(taskId, homeDir = os9.homedir()) {
529
+ return path9.join(homeDir, ".codevibe", "tasks", taskId);
525
530
  }
526
- function getPacketFilePath(taskId, homeDir = os10.homedir()) {
527
- return path10.join(getTaskDirectoryPath(taskId, homeDir), "CONTINUATION.md");
531
+ function getPacketFilePath(taskId, homeDir = os9.homedir()) {
532
+ return path9.join(getTaskDirectoryPath(taskId, homeDir), "CONTINUATION.md");
528
533
  }
529
534
  async function atomicWritePacket(taskDir, finalPath, bytes, pid, ts, randHex) {
530
535
  await import_node_fs.promises.mkdir(taskDir, { recursive: true, mode: 448 });
@@ -538,7 +543,7 @@ async function atomicWritePacket(taskDir, finalPath, bytes, pid, ts, randHex) {
538
543
  );
539
544
  }
540
545
  }
541
- const tmpPath = path10.join(
546
+ const tmpPath = path9.join(
542
547
  taskDir,
543
548
  `CONTINUATION.md.${pid}.${ts}.${randHex}.tmp`
544
549
  );
@@ -587,7 +592,7 @@ async function atomicWritePacket(taskDir, finalPath, bytes, pid, ts, randHex) {
587
592
  }
588
593
  function createContinuationPacketWriter(deps) {
589
594
  const perTaskMutex = /* @__PURE__ */ new Map();
590
- const homeDir = deps.homeDir ?? os10.homedir();
595
+ const homeDir = deps.homeDir ?? os9.homedir();
591
596
  const clock = deps.clock ?? Date.now;
592
597
  const randomHex = deps.randomHex ?? defaultRandomHex;
593
598
  const collector = deps.dirtyStateCollector ?? {
@@ -630,7 +635,7 @@ function createContinuationPacketWriter(deps) {
630
635
  ts,
631
636
  randomHex()
632
637
  );
633
- const packetRelativePath = path10.relative(path10.join(homeDir, ".codevibe", "tasks"), finalPath).split(path10.sep).join("/");
638
+ const packetRelativePath = path9.relative(path9.join(homeDir, ".codevibe", "tasks"), finalPath).split(path9.sep).join("/");
634
639
  const result = await deps.appsync.recordContinuationPacketWritten({
635
640
  taskId: input.taskId,
636
641
  offerId: input.offerId ?? null,
@@ -675,13 +680,13 @@ function createContinuationPacketWriter(deps) {
675
680
  }
676
681
  };
677
682
  }
678
- var import_node_fs, path10, os10, crypto3, import_json_freeze, import_yaml, Mutex, WORK_NOT_ENUMERATED_SENTINEL, VERIFICATION_NOT_RECORDED_SENTINEL;
683
+ var import_node_fs, path9, os9, crypto3, import_json_freeze, import_yaml, Mutex, WORK_NOT_ENUMERATED_SENTINEL, VERIFICATION_NOT_RECORDED_SENTINEL;
679
684
  var init_packet_writer = __esm({
680
685
  "src/continuation/packet-writer.ts"() {
681
686
  "use strict";
682
687
  import_node_fs = require("node:fs");
683
- path10 = __toESM(require("node:path"));
684
- os10 = __toESM(require("node:os"));
688
+ path9 = __toESM(require("node:path"));
689
+ os9 = __toESM(require("node:os"));
685
690
  crypto3 = __toESM(require("node:crypto"));
686
691
  import_json_freeze = require("json-freeze");
687
692
  import_yaml = require("yaml");
@@ -841,22 +846,22 @@ var init_resolve_agent = __esm({
841
846
  });
842
847
 
843
848
  // src/companion-mode/persist-preference.ts
844
- function resolveHome6() {
849
+ function resolveHome5() {
845
850
  const isTestEnv = process.env.VITEST === "true" || process.env.NODE_ENV === "test";
846
851
  if (isTestEnv && process.env.CODEVIBE_HOME_OVERRIDE) {
847
852
  return process.env.CODEVIBE_HOME_OVERRIDE;
848
853
  }
849
- return os31.homedir();
854
+ return os30.homedir();
850
855
  }
851
856
  function companionPreferenceFilePath() {
852
- return path53.join(resolveHome6(), ".codevibe", "companion-preference.json");
857
+ return path52.join(resolveHome5(), ".codevibe", "companion-preference.json");
853
858
  }
854
859
  async function readCompanionPreference() {
855
860
  const filePath = companionPreferenceFilePath();
856
861
  let raw;
857
862
  let st;
858
863
  try {
859
- st = await fs44.stat(filePath);
864
+ st = await fs43.stat(filePath);
860
865
  } catch (err) {
861
866
  const code = err?.code;
862
867
  if (code !== "ENOENT") {
@@ -875,7 +880,7 @@ async function readCompanionPreference() {
875
880
  return null;
876
881
  }
877
882
  try {
878
- raw = await fs44.readFile(filePath, "utf8");
883
+ raw = await fs43.readFile(filePath, "utf8");
879
884
  } catch (err) {
880
885
  logger.debug("[companion-preference] read error \u2014 treating as missing", {
881
886
  filePath,
@@ -897,21 +902,21 @@ async function readCompanionPreference() {
897
902
  }
898
903
  async function persistCompanionPreference(pref) {
899
904
  const filePath = companionPreferenceFilePath();
900
- const dir = path53.dirname(filePath);
901
- await fs44.mkdir(dir, { recursive: true });
902
- await fs44.writeFile(filePath, JSON.stringify(pref, null, 2), {
905
+ const dir = path52.dirname(filePath);
906
+ await fs43.mkdir(dir, { recursive: true });
907
+ await fs43.writeFile(filePath, JSON.stringify(pref, null, 2), {
903
908
  encoding: "utf8",
904
909
  mode: 384
905
910
  });
906
911
  try {
907
- await fs44.chmod(filePath, 384);
912
+ await fs43.chmod(filePath, 384);
908
913
  } catch {
909
914
  }
910
915
  }
911
916
  async function clearCompanionPreference() {
912
917
  const filePath = companionPreferenceFilePath();
913
918
  try {
914
- await fs44.unlink(filePath);
919
+ await fs43.unlink(filePath);
915
920
  } catch (err) {
916
921
  const code = err?.code;
917
922
  if (code !== "ENOENT") {
@@ -922,13 +927,13 @@ async function clearCompanionPreference() {
922
927
  }
923
928
  }
924
929
  }
925
- var fs44, path53, os31, import_zod4, CompanionPreferenceSchema;
930
+ var fs43, path52, os30, import_zod4, CompanionPreferenceSchema;
926
931
  var init_persist_preference = __esm({
927
932
  "src/companion-mode/persist-preference.ts"() {
928
933
  "use strict";
929
- fs44 = __toESM(require("fs/promises"));
930
- path53 = __toESM(require("path"));
931
- os31 = __toESM(require("os"));
934
+ fs43 = __toESM(require("fs/promises"));
935
+ path52 = __toESM(require("path"));
936
+ os30 = __toESM(require("os"));
932
937
  import_zod4 = require("zod");
933
938
  init_logger2();
934
939
  CompanionPreferenceSchema = import_zod4.z.object({
@@ -998,9 +1003,9 @@ function defaultResolveBinPath(kind) {
998
1003
  }
999
1004
  }
1000
1005
  async function isCodevibeWrapper(kind, binPath, versionProbe = defaultVersionProbe) {
1001
- const dir = path54.join(os32.homedir(), `.codevibe-${kind.toLowerCase()}`);
1006
+ const dir = path53.join(os31.homedir(), `.codevibe-${kind.toLowerCase()}`);
1002
1007
  try {
1003
- const st = await fs45.stat(dir);
1008
+ const st = await fs44.stat(dir);
1004
1009
  if (!st.isDirectory()) return false;
1005
1010
  } catch {
1006
1011
  return false;
@@ -1119,15 +1124,15 @@ async function runCompanionMode(args) {
1119
1124
  const handoff = args.execFile ?? import_child_process7.execFileSync;
1120
1125
  handoff(selected.binPath, args.passthrough, { stdio: "inherit" });
1121
1126
  }
1122
- var import_child_process7, import_child_process8, path54, fs45, os32, NoAgentInstalledError, AGENT_BIN, AGENT_VERSION_PROBE_TIMEOUT_MS;
1127
+ var import_child_process7, import_child_process8, path53, fs44, os31, NoAgentInstalledError, AGENT_BIN, AGENT_VERSION_PROBE_TIMEOUT_MS;
1123
1128
  var init_companion_mode = __esm({
1124
1129
  "src/companion-mode/index.ts"() {
1125
1130
  "use strict";
1126
1131
  import_child_process7 = require("child_process");
1127
1132
  import_child_process8 = require("child_process");
1128
- path54 = __toESM(require("path"));
1129
- fs45 = __toESM(require("fs/promises"));
1130
- os32 = __toESM(require("os"));
1133
+ path53 = __toESM(require("path"));
1134
+ fs44 = __toESM(require("fs/promises"));
1135
+ os31 = __toESM(require("os"));
1131
1136
  init_logger2();
1132
1137
  init_detect_agents();
1133
1138
  init_process_markers();
@@ -6330,10 +6335,10 @@ function truncate(s, max) {
6330
6335
  if (max === 1) return "\u2026";
6331
6336
  return s.slice(0, max - 1) + "\u2026";
6332
6337
  }
6333
- function formatProjectPath(projectPath, homedir21, maxCols) {
6338
+ function formatProjectPath(projectPath, homedir20, maxCols) {
6334
6339
  let p = projectPath ?? "";
6335
- if (homedir21 && (p === homedir21 || p.startsWith(homedir21 + "/"))) {
6336
- p = "~" + p.slice(homedir21.length);
6340
+ if (homedir20 && (p === homedir20 || p.startsWith(homedir20 + "/"))) {
6341
+ p = "~" + p.slice(homedir20.length);
6337
6342
  }
6338
6343
  if (p.length > maxCols) {
6339
6344
  if (maxCols <= 0) return "";
@@ -6360,117 +6365,17 @@ function plannerBadge(kind, label) {
6360
6365
  return null;
6361
6366
  }
6362
6367
  function computeStatusLayout(args) {
6363
- const { tier, homedir: homedir21, columns, badge } = args;
6368
+ const { tier, homedir: homedir20, columns, badge } = args;
6364
6369
  const SEP = " \xB7 ";
6365
6370
  const badgeText = badge ? truncate(badge.text, Math.max(0, columns - SEP.length - tier.length - 2)) : "";
6366
6371
  const rightWidth = badgeText ? badgeText.length + 1 : 0;
6367
6372
  const cwdMax = Math.max(0, columns - rightWidth - SEP.length - tier.length);
6368
- const cwd = formatProjectPath(args.cwd, homedir21, cwdMax);
6373
+ const cwd = formatProjectPath(args.cwd, homedir20, cwdMax);
6369
6374
  const leftFull = cwd ? `${cwd}${SEP}${tier}` : tier;
6370
6375
  const leftText = truncate(leftFull, Math.max(0, columns - rightWidth));
6371
6376
  return { leftText, badgeText };
6372
6377
  }
6373
6378
 
6374
- // src/orchestration-shell/sticky-preference.ts
6375
- var fs4 = __toESM(require("fs/promises"));
6376
- var path4 = __toESM(require("path"));
6377
- var os6 = __toESM(require("os"));
6378
- var import_zod = require("zod");
6379
- init_logger2();
6380
- function resolveHome() {
6381
- const isTestEnv = process.env.VITEST === "true" || process.env.NODE_ENV === "test";
6382
- if (isTestEnv && process.env.CODEVIBE_HOME_OVERRIDE) {
6383
- return process.env.CODEVIBE_HOME_OVERRIDE;
6384
- }
6385
- return os6.homedir();
6386
- }
6387
- function stickyPreferenceFilePath() {
6388
- return path4.join(resolveHome(), ".codevibe", "last-mode.json");
6389
- }
6390
- var LastModeFileSchema = import_zod.z.object({
6391
- schemaVersion: import_zod.z.literal(1),
6392
- mode: import_zod.z.union([import_zod.z.literal("companion"), import_zod.z.literal("orchestration")]),
6393
- pickedAt: import_zod.z.string(),
6394
- pickedByTier: import_zod.z.union([import_zod.z.literal("PRO"), import_zod.z.literal("MAX")])
6395
- });
6396
- async function readStickyPreference(currentTier) {
6397
- const filePath = stickyPreferenceFilePath();
6398
- let st;
6399
- try {
6400
- st = await fs4.stat(filePath);
6401
- } catch (err) {
6402
- const code = err?.code;
6403
- if (code !== "ENOENT") {
6404
- logger.debug("[sticky-preference] stat error \u2014 treating as missing", {
6405
- filePath,
6406
- error: err?.message
6407
- });
6408
- }
6409
- return null;
6410
- }
6411
- if ((st.mode & 63) !== 0) {
6412
- process.stderr.write(
6413
- `last-mode.json has loose permissions; ignoring
6414
- `
6415
- );
6416
- return null;
6417
- }
6418
- let raw;
6419
- try {
6420
- raw = await fs4.readFile(filePath, "utf8");
6421
- } catch (err) {
6422
- logger.debug("[sticky-preference] Read error \u2014 falling back to prompt", {
6423
- filePath,
6424
- error: err?.message
6425
- });
6426
- return null;
6427
- }
6428
- let parsedJson;
6429
- try {
6430
- parsedJson = JSON.parse(raw);
6431
- } catch (err) {
6432
- logger.debug("[sticky-preference] Malformed JSON \u2014 falling back to prompt", {
6433
- filePath,
6434
- error: err?.message
6435
- });
6436
- return null;
6437
- }
6438
- const result = LastModeFileSchema.safeParse(parsedJson);
6439
- if (!result.success) {
6440
- logger.debug("[sticky-preference] Schema mismatch \u2014 falling back to prompt", {
6441
- filePath,
6442
- issues: result.error.issues
6443
- });
6444
- return null;
6445
- }
6446
- const file = result.data;
6447
- if (currentTier === "FREE") {
6448
- logger.debug(
6449
- "[sticky-preference] Tier downgrade to FREE invalidates sticky \u2014 falling back to prompt",
6450
- { filePath, pickedByTier: file.pickedByTier }
6451
- );
6452
- return null;
6453
- }
6454
- return file.mode;
6455
- }
6456
- async function writeStickyPreference(args) {
6457
- const filePath = stickyPreferenceFilePath();
6458
- const dir = path4.dirname(filePath);
6459
- await fs4.mkdir(dir, { recursive: true });
6460
- const file = {
6461
- schemaVersion: 1,
6462
- mode: args.mode,
6463
- pickedAt: (/* @__PURE__ */ new Date()).toISOString(),
6464
- pickedByTier: args.pickedByTier
6465
- };
6466
- await fs4.writeFile(filePath, JSON.stringify(file, null, 2), { encoding: "utf8", mode: 384 });
6467
- try {
6468
- await fs4.chmod(filePath, 384);
6469
- } catch {
6470
- }
6471
- logger.debug("[sticky-preference] Wrote", { filePath, mode: args.mode });
6472
- }
6473
-
6474
6379
  // src/orchestration-shell/mode-selection.ts
6475
6380
  var TierError = class extends Error {
6476
6381
  constructor(message) {
@@ -6490,18 +6395,10 @@ async function pickMode(args, tier, deps = defaultDeps()) {
6490
6395
  if (tier === "FREE") {
6491
6396
  return "companion";
6492
6397
  }
6493
- const sticky = await deps.readStickyPreference(tier);
6494
- if (sticky) {
6495
- return sticky;
6496
- }
6497
- const picked = await deps.promptUserForMode(tier);
6498
- await deps.writeStickyPreference({ mode: picked, pickedByTier: tier });
6499
- return picked;
6398
+ return await deps.promptUserForMode(tier);
6500
6399
  }
6501
6400
  function defaultDeps() {
6502
6401
  return {
6503
- readStickyPreference: (tier) => readStickyPreference(tier),
6504
- writeStickyPreference,
6505
6402
  promptUserForMode: defaultPromptUserForMode
6506
6403
  };
6507
6404
  }
@@ -6530,8 +6427,8 @@ CodeVibe \u2014 choose mode (${tier} tier):
6530
6427
 
6531
6428
  // src/orchestration-shell/index.ts
6532
6429
  var React20 = __toESM(require("react"));
6533
- var path43 = __toESM(require("path"));
6534
- var os24 = __toESM(require("os"));
6430
+ var path42 = __toESM(require("path"));
6431
+ var os23 = __toESM(require("os"));
6535
6432
  init_logger2();
6536
6433
 
6537
6434
  // src/orchestration-shell/ink-runtime.ts
@@ -9086,9 +8983,9 @@ function ConversationPane(props) {
9086
8983
  }
9087
8984
 
9088
8985
  // src/orchestration-shell/components/StatusBar.tsx
9089
- var os7 = __toESM(require("os"));
8986
+ var os6 = __toESM(require("os"));
9090
8987
  var React13 = __toESM(require("react"));
9091
- var HOME = os7.homedir();
8988
+ var HOME = os6.homedir();
9092
8989
  function StatusBar(props) {
9093
8990
  const { ink } = getInkRuntime();
9094
8991
  const { Box, Text } = ink;
@@ -9115,7 +9012,7 @@ function StatusBar(props) {
9115
9012
  }
9116
9013
 
9117
9014
  // src/orchestration-shell/slash-router.ts
9118
- var path5 = __toESM(require("path"));
9015
+ var path4 = __toESM(require("path"));
9119
9016
  var TIER_RANK = { FREE: 0, PRO: 1, MAX: 2 };
9120
9017
  function tierMeets(actual, required) {
9121
9018
  if (!required) return true;
@@ -9288,7 +9185,7 @@ var CATALOG = [
9288
9185
  "Usage: /structural-summary --include-bodies <absolute-path>"
9289
9186
  );
9290
9187
  }
9291
- if (!path5.isAbsolute(subdir)) {
9188
+ if (!path4.isAbsolute(subdir)) {
9292
9189
  return staticOutput(
9293
9190
  "/structural-summary",
9294
9191
  `Path must be absolute (got: ${subdir}). Example: /structural-summary --include-bodies /Users/me/Workspace/myrepo/src`
@@ -9584,11 +9481,11 @@ function LiveProgressLine(props) {
9584
9481
 
9585
9482
  // src/orchestration-shell/components/InputBar.tsx
9586
9483
  var React16 = __toESM(require("react"));
9587
- var os8 = __toESM(require("node:os"));
9484
+ var os7 = __toESM(require("node:os"));
9588
9485
 
9589
9486
  // src/orchestration-shell/attachments.ts
9590
- var fs5 = __toESM(require("node:fs"));
9591
- var path6 = __toESM(require("node:path"));
9487
+ var fs4 = __toESM(require("node:fs"));
9488
+ var path5 = __toESM(require("node:path"));
9592
9489
  var import_node_url = require("node:url");
9593
9490
  var import_node_crypto = require("node:crypto");
9594
9491
  var MAX_IMAGE_BYTES = 10 * 1024 * 1024;
@@ -9606,7 +9503,7 @@ function sniffImageMime(head) {
9606
9503
  return null;
9607
9504
  }
9608
9505
  var IMAGE_EXT_RE = /\.(png|jpe?g|gif|webp|bmp)$/i;
9609
- function unescapeToken(raw, homedir21) {
9506
+ function unescapeToken(raw, homedir20) {
9610
9507
  let s = raw.trim();
9611
9508
  let wasQuoted = false;
9612
9509
  if (s.startsWith("'") && s.endsWith("'") || s.startsWith('"') && s.endsWith('"')) {
@@ -9620,11 +9517,11 @@ function unescapeToken(raw, homedir21) {
9620
9517
  }
9621
9518
  }
9622
9519
  if (!wasQuoted) s = s.replace(/\\(.)/g, "$1");
9623
- return expandHome(s, homedir21);
9520
+ return expandHome(s, homedir20);
9624
9521
  }
9625
- function expandHome(p, homedir21) {
9626
- if (p === "~") return homedir21;
9627
- if (p.startsWith("~/")) return path6.join(homedir21, p.slice(2));
9522
+ function expandHome(p, homedir20) {
9523
+ if (p === "~") return homedir20;
9524
+ if (p.startsWith("~/")) return path5.join(homedir20, p.slice(2));
9628
9525
  return p;
9629
9526
  }
9630
9527
  function extractImagePathSpans(text2) {
@@ -9685,7 +9582,7 @@ function detectImageAttachments(text2, opts) {
9685
9582
  let lexical;
9686
9583
  try {
9687
9584
  const unescaped = unescapeToken(rawToken, opts.homedir);
9688
- lexical = path6.resolve(opts.cwd, unescaped);
9585
+ lexical = path5.resolve(opts.cwd, unescaped);
9689
9586
  } catch {
9690
9587
  rejects.push({ token: rawToken, reason: "could not resolve the path" });
9691
9588
  continue;
@@ -9704,7 +9601,7 @@ function promoteLexicalImagePath(lexical, rawToken, bySource, rejects, newId) {
9704
9601
  }
9705
9602
  let st;
9706
9603
  try {
9707
- st = fs5.statSync(lexical);
9604
+ st = fs4.statSync(lexical);
9708
9605
  } catch {
9709
9606
  rejects.push({ token: rawToken, reason: "not found" });
9710
9607
  return;
@@ -9720,16 +9617,16 @@ function promoteLexicalImagePath(lexical, rawToken, bySource, rejects, newId) {
9720
9617
  let head;
9721
9618
  let fd;
9722
9619
  try {
9723
- fd = fs5.openSync(lexical, "r");
9620
+ fd = fs4.openSync(lexical, "r");
9724
9621
  head = Buffer.alloc(32);
9725
- const n = fs5.readSync(fd, head, 0, 32, 0);
9622
+ const n = fs4.readSync(fd, head, 0, 32, 0);
9726
9623
  head = head.subarray(0, n);
9727
9624
  } catch {
9728
9625
  rejects.push({ token: rawToken, reason: "could not read" });
9729
9626
  return;
9730
9627
  } finally {
9731
9628
  if (fd !== void 0) try {
9732
- fs5.closeSync(fd);
9629
+ fs4.closeSync(fd);
9733
9630
  } catch {
9734
9631
  }
9735
9632
  }
@@ -9746,7 +9643,7 @@ function promoteLexicalImagePath(lexical, rawToken, bySource, rejects, newId) {
9746
9643
  id: newId(),
9747
9644
  sourcePath: lexical,
9748
9645
  rawTokens: [rawToken],
9749
- filename: path6.basename(lexical),
9646
+ filename: path5.basename(lexical),
9750
9647
  mime: sniff.mime,
9751
9648
  sizeBytes: st.size
9752
9649
  });
@@ -9759,7 +9656,7 @@ function attachmentsFromPaths(paths, opts) {
9759
9656
  for (const raw of paths) {
9760
9657
  let lexical;
9761
9658
  try {
9762
- lexical = path6.resolve(raw);
9659
+ lexical = path5.resolve(raw);
9763
9660
  } catch {
9764
9661
  rejects.push({ token: raw, reason: "could not resolve the path" });
9765
9662
  continue;
@@ -9797,41 +9694,41 @@ function prepareAttachmentsForSpawn(roundBrief, attachments, shadowDir) {
9797
9694
  const failedAttachments = [];
9798
9695
  let brief = roundBrief;
9799
9696
  if (attachments.length === 0) return { copiedAttachments, failedAttachments, roundBrief: brief };
9800
- const destDir = path6.join(shadowDir, SHADOW_ATTACHMENTS_DIR);
9697
+ const destDir = path5.join(shadowDir, SHADOW_ATTACHMENTS_DIR);
9801
9698
  try {
9802
- const st = fs5.lstatSync(destDir);
9699
+ const st = fs4.lstatSync(destDir);
9803
9700
  if (st.isSymbolicLink() || !st.isDirectory()) {
9804
- fs5.rmSync(destDir, { recursive: true, force: true });
9805
- fs5.mkdirSync(destDir, { recursive: true, mode: 448 });
9701
+ fs4.rmSync(destDir, { recursive: true, force: true });
9702
+ fs4.mkdirSync(destDir, { recursive: true, mode: 448 });
9806
9703
  }
9807
9704
  } catch {
9808
9705
  try {
9809
- fs5.mkdirSync(destDir, { recursive: true, mode: 448 });
9706
+ fs4.mkdirSync(destDir, { recursive: true, mode: 448 });
9810
9707
  } catch {
9811
9708
  }
9812
9709
  }
9813
9710
  for (const a of attachments) {
9814
9711
  const rel = attachmentRelPath(a);
9815
- const dest = path6.join(shadowDir, rel);
9816
- const tmp = path6.join(destDir, `.${a.id}.${(0, import_node_crypto.randomUUID)()}.tmp`);
9712
+ const dest = path5.join(shadowDir, rel);
9713
+ const tmp = path5.join(destDir, `.${a.id}.${(0, import_node_crypto.randomUUID)()}.tmp`);
9817
9714
  let fd;
9818
9715
  try {
9819
9716
  const { buf } = readImageFdSafe(a.sourcePath, MAX_IMAGE_BYTES);
9820
- fd = fs5.openSync(tmp, fs5.constants.O_CREAT | fs5.constants.O_EXCL | fs5.constants.O_WRONLY | fs5.constants.O_NOFOLLOW, 384);
9821
- fs5.writeSync(fd, buf);
9822
- fs5.closeSync(fd);
9717
+ fd = fs4.openSync(tmp, fs4.constants.O_CREAT | fs4.constants.O_EXCL | fs4.constants.O_WRONLY | fs4.constants.O_NOFOLLOW, 384);
9718
+ fs4.writeSync(fd, buf);
9719
+ fs4.closeSync(fd);
9823
9720
  fd = void 0;
9824
- fs5.renameSync(tmp, dest);
9721
+ fs4.renameSync(tmp, dest);
9825
9722
  copiedAttachments.push({ id: a.id, relPath: rel, mime: a.mime });
9826
9723
  } catch {
9827
9724
  if (fd !== void 0) {
9828
9725
  try {
9829
- fs5.closeSync(fd);
9726
+ fs4.closeSync(fd);
9830
9727
  } catch {
9831
9728
  }
9832
9729
  }
9833
9730
  try {
9834
- fs5.unlinkSync(tmp);
9731
+ fs4.unlinkSync(tmp);
9835
9732
  } catch {
9836
9733
  }
9837
9734
  brief = brief.split(rel).join("[attached image skipped]");
@@ -9896,19 +9793,19 @@ function rewriteChipTokensByNumber(brief, orderedPaths, attachments) {
9896
9793
  }
9897
9794
  var MAX_BASE64_SOURCE_BYTES = 8 * 1024 * 1024;
9898
9795
  function readImageFdSafe(sourcePath, maxBytes = MAX_IMAGE_BYTES) {
9899
- const fd = fs5.openSync(sourcePath, fs5.constants.O_RDONLY | fs5.constants.O_NOFOLLOW);
9796
+ const fd = fs4.openSync(sourcePath, fs4.constants.O_RDONLY | fs4.constants.O_NOFOLLOW);
9900
9797
  try {
9901
- const st = fs5.fstatSync(fd);
9798
+ const st = fs4.fstatSync(fd);
9902
9799
  if (!st.isFile()) throw new Error("not a regular file");
9903
9800
  if (st.size > maxBytes) throw new Error(`exceeds byte ceiling (${st.size} > ${maxBytes})`);
9904
9801
  const head = Buffer.alloc(32);
9905
- const n = fs5.readSync(fd, head, 0, 32, 0);
9802
+ const n = fs4.readSync(fd, head, 0, 32, 0);
9906
9803
  const sniff = sniffImageMime(head.subarray(0, n));
9907
9804
  if (!sniff) throw new Error("not a raster image (fd re-sniff failed)");
9908
9805
  const buf = Buffer.alloc(st.size);
9909
9806
  let off = 0;
9910
9807
  while (off < st.size) {
9911
- const n2 = fs5.readSync(fd, buf, off, st.size - off, off);
9808
+ const n2 = fs4.readSync(fd, buf, off, st.size - off, off);
9912
9809
  if (n2 <= 0) break;
9913
9810
  off += n2;
9914
9811
  if (off > maxBytes) throw new Error("exceeds byte ceiling (grew during read)");
@@ -9916,7 +9813,7 @@ function readImageFdSafe(sourcePath, maxBytes = MAX_IMAGE_BYTES) {
9916
9813
  return { buf: buf.subarray(0, off), mime: sniff.mime };
9917
9814
  } finally {
9918
9815
  try {
9919
- fs5.closeSync(fd);
9816
+ fs4.closeSync(fd);
9920
9817
  } catch {
9921
9818
  }
9922
9819
  }
@@ -10221,17 +10118,66 @@ function imageChip(n) {
10221
10118
  function displayChips(v) {
10222
10119
  return v.split(CHIP_SENTINEL).join("[");
10223
10120
  }
10121
+ var NEWLINE_MARKER = "\u23CE";
10122
+ function displayValue(v) {
10123
+ return displayChips(v).split("\n").join(NEWLINE_MARKER);
10124
+ }
10224
10125
  var EMPTY_CMDS = [];
10126
+ var CARET_X_BASE = 4;
10127
+ var CARET_Y_BASE = 1;
10128
+ function caretPosition(rowLeft, rowTop, visibleCol) {
10129
+ return { x: rowLeft + CARET_X_BASE + visibleCol, y: rowTop + CARET_Y_BASE };
10130
+ }
10131
+ var clampN = (n, lo, hi) => n < lo ? lo : n > hi ? hi : n;
10132
+ function computeInputWindow(display, caretCol, valueWidth, prevScroll) {
10133
+ const len = display.length;
10134
+ const cw = Math.max(1, valueWidth);
10135
+ const cc = clampN(caretCol, 0, len);
10136
+ if (len <= cw) {
10137
+ return { text: display, visibleCol: cc, scroll: 0 };
10138
+ }
10139
+ const maxScroll = len - cw;
10140
+ let scroll = clampN(prevScroll, 0, maxScroll);
10141
+ if (cc < scroll) scroll = cc;
10142
+ else if (cc > scroll + cw) scroll = cc - cw;
10143
+ scroll = clampN(scroll, 0, maxScroll);
10144
+ let text2 = display.slice(scroll, scroll + cw);
10145
+ if (scroll > 0) text2 = "\u2026" + text2.slice(1);
10146
+ if (scroll + cw < len) text2 = text2.slice(0, -1) + "\u2026";
10147
+ return { text: text2, visibleCol: cc - scroll, scroll };
10148
+ }
10149
+ function measureRowOrigin(node) {
10150
+ try {
10151
+ let left = 0;
10152
+ let top = 0;
10153
+ let n = node;
10154
+ while (n && n.nodeName !== "ink-root") {
10155
+ const yn = n.yogaNode;
10156
+ if (yn && typeof yn.getComputedLeft === "function") {
10157
+ left += yn.getComputedLeft();
10158
+ top += yn.getComputedTop();
10159
+ }
10160
+ n = n.parentNode;
10161
+ }
10162
+ return { left, top };
10163
+ } catch {
10164
+ return null;
10165
+ }
10166
+ }
10225
10167
  var GATE_PROMPT_NOTES_CANCEL_SENTINEL = "__GATE_PROMPT_NOTES_CANCEL__";
10226
10168
  var clampCursor = (c, len) => c < 0 ? 0 : c > len ? len : c;
10227
10169
  function InputBar(props) {
10228
10170
  const { ink } = getInkRuntime();
10229
- const { Box, Text, useStdout, useStdin } = ink;
10171
+ const { Box, Text, useStdout, useStdin, useCursor } = ink;
10172
+ const { setCursorPosition } = useCursor();
10173
+ const rowRef = React16.useRef(null);
10174
+ const [rowOrigin, setRowOrigin] = React16.useState(null);
10230
10175
  const initial = props.initialValue ?? "";
10231
10176
  const [value, setValue] = React16.useState(initial);
10232
10177
  const [cursor, setCursor] = React16.useState(initial.length);
10233
10178
  const valueRef = React16.useRef(initial);
10234
10179
  const cursorRef = React16.useRef(initial.length);
10180
+ const scrollRef = React16.useRef(0);
10235
10181
  const [errorHint, setErrorHint] = React16.useState(null);
10236
10182
  const [highlight, setHighlightState] = React16.useState(0);
10237
10183
  const highlightRef = React16.useRef(0);
@@ -10387,7 +10333,7 @@ function InputBar(props) {
10387
10333
  return;
10388
10334
  }
10389
10335
  if (gatePromptMode === null && chunk.length <= 4096) {
10390
- const detected = detectImageAttachments(chunk, { cwd: process.cwd(), homedir: os8.homedir() });
10336
+ const detected = detectImageAttachments(chunk, { cwd: process.cwd(), homedir: os7.homedir() });
10391
10337
  if (detected.attachments.length > 0) {
10392
10338
  let wc = chunk;
10393
10339
  for (const att of detected.attachments) {
@@ -10522,7 +10468,15 @@ function InputBar(props) {
10522
10468
  emitter.removeListener("input", onRawChunk);
10523
10469
  };
10524
10470
  }, [internal_eventEmitter, onRawChunk]);
10471
+ React16.useEffect(() => {
10472
+ const origin2 = measureRowOrigin(rowRef.current);
10473
+ if (!origin2) return;
10474
+ setRowOrigin(
10475
+ (prev) => prev && prev.left === origin2.left && prev.top === origin2.top ? prev : origin2
10476
+ );
10477
+ });
10525
10478
  if (gatePromptMode?.kind === "submitting") {
10479
+ setCursorPosition(void 0);
10526
10480
  return React16.createElement(
10527
10481
  Box,
10528
10482
  {
@@ -10545,17 +10499,18 @@ function InputBar(props) {
10545
10499
  } else if (gatePromptMode?.kind === "awaiting-notes") {
10546
10500
  placeholder = "Type your notes + Enter";
10547
10501
  }
10548
- const shown = displayChips(value);
10502
+ const shown = displayValue(value);
10549
10503
  const cur = clampCursor(cursor, shown.length);
10550
- const head = shown.slice(0, cur);
10551
- const at = shown.slice(cur, cur + 1);
10552
- const tail = shown.slice(cur + 1);
10553
- const cursorEl = at.length > 0 ? React16.createElement(Text, { key: "cursor", inverse: true }, at) : React16.createElement(Text, { key: "cursor" }, "\u2588");
10504
+ const valueWidth = Math.max(1, columns - 6);
10505
+ const win = computeInputWindow(shown, cur, valueWidth, scrollRef.current);
10506
+ scrollRef.current = win.scroll;
10507
+ const origin = rowOrigin ?? { left: 0, top: 0 };
10508
+ setCursorPosition(caretPosition(origin.left, origin.top, win.visibleCol));
10554
10509
  const rowChildren = [
10555
10510
  React16.createElement(Text, { key: "prompt", color: ACCENT }, "\u276F "),
10556
- React16.createElement(Text, { key: "head" }, head),
10557
- cursorEl,
10558
- React16.createElement(Text, { key: "tail" }, tail)
10511
+ // wrap:'truncate' the value is PRE-WINDOWED to fit; truncate is a belt-and-
10512
+ // suspenders guard so it can NEVER wrap even if the width math is off by a cell.
10513
+ React16.createElement(Text, { key: "value", wrap: "truncate" }, win.text)
10559
10514
  ];
10560
10515
  if (value.length === 0 && placeholder.length > 0) {
10561
10516
  rowChildren.push(
@@ -10573,6 +10528,9 @@ function InputBar(props) {
10573
10528
  Box,
10574
10529
  {
10575
10530
  key: "row",
10531
+ // ink 7 forwards a `ref` on <Box> to its DOMElement (yogaNode) — measured
10532
+ // by the effect above to place the real terminal cursor on the right line.
10533
+ ref: rowRef,
10576
10534
  flexDirection: "row",
10577
10535
  borderStyle: "round",
10578
10536
  borderColor: ACCENT,
@@ -11835,9 +11793,9 @@ function validateGeminiEnvelope(value) {
11835
11793
  }
11836
11794
 
11837
11795
  // src/reviewer/providers/codex.ts
11838
- var fs6 = __toESM(require("fs"));
11839
- var os9 = __toESM(require("os"));
11840
- var path7 = __toESM(require("path"));
11796
+ var fs5 = __toESM(require("fs"));
11797
+ var os8 = __toESM(require("os"));
11798
+ var path6 = __toESM(require("path"));
11841
11799
  var import_uuid5 = require("uuid");
11842
11800
  var CodexReviewerProvider = class {
11843
11801
  constructor(opts = {}) {
@@ -11881,7 +11839,7 @@ var CodexReviewerProvider = class {
11881
11839
  }
11882
11840
  let lastMessage;
11883
11841
  try {
11884
- lastMessage = fs6.readFileSync(hostPath, "utf8");
11842
+ lastMessage = fs5.readFileSync(hostPath, "utf8");
11885
11843
  } catch (ioErr) {
11886
11844
  bestEffortUnlink(hostPath);
11887
11845
  const reason = ioErr instanceof Error ? ioErr.message : String(ioErr);
@@ -11986,7 +11944,7 @@ function sumCodexTokens(stdout) {
11986
11944
  return totals.reduce((a, b) => a + b, 0);
11987
11945
  }
11988
11946
  function makeLastMessagePath() {
11989
- return path7.join(os9.tmpdir(), `quorum-codex-last-${process.pid}-${(0, import_uuid5.v4)()}.txt`);
11947
+ return path6.join(os8.tmpdir(), `quorum-codex-last-${process.pid}-${(0, import_uuid5.v4)()}.txt`);
11990
11948
  }
11991
11949
  function makeLastMessageBasename() {
11992
11950
  return `quorum-codex-last-${process.pid}-${(0, import_uuid5.v4)()}.txt`;
@@ -12005,11 +11963,11 @@ function resolveLastMessagePaths(sandboxed, workdir) {
12005
11963
  });
12006
11964
  }
12007
11965
  const name = makeLastMessageBasename();
12008
- return { argPath: name, hostPath: path7.join(workdir, name) };
11966
+ return { argPath: name, hostPath: path6.join(workdir, name) };
12009
11967
  }
12010
11968
  function bestEffortUnlink(p) {
12011
11969
  try {
12012
- fs6.unlinkSync(p);
11970
+ fs5.unlinkSync(p);
12013
11971
  } catch {
12014
11972
  }
12015
11973
  }
@@ -12917,7 +12875,7 @@ function OrchestrationApp(props) {
12917
12875
  }
12918
12876
  return () => disableBracketedPaste();
12919
12877
  }, [wizardOpen, isRawModeSupported]);
12920
- const staticOrderRef = React18.useRef();
12878
+ const staticOrderRef = React18.useRef(null);
12921
12879
  if (!staticOrderRef.current) {
12922
12880
  staticOrderRef.current = makeStaticOrderAccum();
12923
12881
  }
@@ -15119,8 +15077,8 @@ ${formatPacket(packet, hash)}`
15119
15077
 
15120
15078
  // src/continuation/packet-reader.ts
15121
15079
  var import_node_fs2 = require("node:fs");
15122
- var path11 = __toESM(require("node:path"));
15123
- var os11 = __toESM(require("node:os"));
15080
+ var path10 = __toESM(require("node:path"));
15081
+ var os10 = __toESM(require("node:os"));
15124
15082
  var import_yaml2 = require("yaml");
15125
15083
  init_types();
15126
15084
  init_packet_writer();
@@ -15241,21 +15199,21 @@ async function packetHashIsInAudit(appsync, packet, packetHash) {
15241
15199
  }
15242
15200
  }
15243
15201
  function createContinuationPacketReader(deps) {
15244
- const homeDir = deps.homeDir ?? os11.homedir();
15202
+ const homeDir = deps.homeDir ?? os10.homedir();
15245
15203
  return {
15246
15204
  async read(taskId, expectedHash) {
15247
15205
  const filePath = getPacketFilePath(taskId, homeDir);
15248
- let stat7;
15206
+ let stat6;
15249
15207
  try {
15250
- stat7 = await import_node_fs2.promises.lstat(filePath);
15208
+ stat6 = await import_node_fs2.promises.lstat(filePath);
15251
15209
  } catch (err) {
15252
15210
  if (err.code === "ENOENT") {
15253
15211
  throw new PacketNotFound(filePath);
15254
15212
  }
15255
15213
  throw err;
15256
15214
  }
15257
- if (isPathPermissivelyOpen(stat7.mode)) {
15258
- throw new PacketPermissionsLoose(filePath, stat7.mode);
15215
+ if (isPathPermissivelyOpen(stat6.mode)) {
15216
+ throw new PacketPermissionsLoose(filePath, stat6.mode);
15259
15217
  }
15260
15218
  let body;
15261
15219
  try {
@@ -15291,7 +15249,7 @@ function createContinuationPacketReader(deps) {
15291
15249
  return packet;
15292
15250
  },
15293
15251
  async list() {
15294
- const tasksDir = path11.join(homeDir, ".codevibe", "tasks");
15252
+ const tasksDir = path10.join(homeDir, ".codevibe", "tasks");
15295
15253
  let entries;
15296
15254
  try {
15297
15255
  entries = await import_node_fs2.promises.readdir(tasksDir, { withFileTypes: true });
@@ -15310,9 +15268,9 @@ function createContinuationPacketReader(deps) {
15310
15268
  let lastModified = null;
15311
15269
  let packetHash;
15312
15270
  try {
15313
- const stat7 = await import_node_fs2.promises.lstat(packetPath);
15271
+ const stat6 = await import_node_fs2.promises.lstat(packetPath);
15314
15272
  packetExists = true;
15315
- lastModified = stat7.mtime;
15273
+ lastModified = stat6.mtime;
15316
15274
  try {
15317
15275
  const body = await import_node_fs2.promises.readFile(packetPath, "utf8");
15318
15276
  const { yaml } = splitFrontmatter(body);
@@ -15340,24 +15298,24 @@ function createContinuationPacketReader(deps) {
15340
15298
  init_logger2();
15341
15299
 
15342
15300
  // src/orchestration-shell/cohort-flag.ts
15343
- var fs9 = __toESM(require("fs/promises"));
15344
- var path12 = __toESM(require("path"));
15345
- var os12 = __toESM(require("os"));
15301
+ var fs8 = __toESM(require("fs/promises"));
15302
+ var path11 = __toESM(require("path"));
15303
+ var os11 = __toESM(require("os"));
15346
15304
  init_logger2();
15347
- function resolveHome2() {
15305
+ function resolveHome() {
15348
15306
  const isTestEnv = process.env.VITEST === "true" || process.env.NODE_ENV === "test";
15349
15307
  if (isTestEnv && process.env.CODEVIBE_HOME_OVERRIDE) {
15350
15308
  return process.env.CODEVIBE_HOME_OVERRIDE;
15351
15309
  }
15352
- return os12.homedir();
15310
+ return os11.homedir();
15353
15311
  }
15354
15312
  function cohortFlagFilePath() {
15355
- return path12.join(resolveHome2(), ".codevibe", "cohort-flags.json");
15313
+ return path11.join(resolveHome(), ".codevibe", "cohort-flags.json");
15356
15314
  }
15357
15315
  async function getCohortFlag(name, _sessionId) {
15358
15316
  const filePath = cohortFlagFilePath();
15359
15317
  try {
15360
- const raw = await fs9.readFile(filePath, "utf8");
15318
+ const raw = await fs8.readFile(filePath, "utf8");
15361
15319
  const parsed = JSON.parse(raw);
15362
15320
  const value = parsed[name];
15363
15321
  if (typeof value !== "boolean") {
@@ -15750,15 +15708,15 @@ ${result.upgradeHint}`;
15750
15708
 
15751
15709
  // src/structural-summary/generator.ts
15752
15710
  var crypto4 = __toESM(require("crypto"));
15753
- var path19 = __toESM(require("path"));
15711
+ var path18 = __toESM(require("path"));
15754
15712
  init_logger2();
15755
15713
 
15756
15714
  // src/structural-summary/privacy-filter.ts
15757
- var path13 = __toESM(require("path"));
15715
+ var path12 = __toESM(require("path"));
15758
15716
  function isOutsideRoot(rel) {
15759
15717
  if (rel === "..") return true;
15760
- if (rel.startsWith(".." + path13.sep)) return true;
15761
- if (path13.sep !== "/" && rel.startsWith("../")) return true;
15718
+ if (rel.startsWith(".." + path12.sep)) return true;
15719
+ if (path12.sep !== "/" && rel.startsWith("../")) return true;
15762
15720
  return false;
15763
15721
  }
15764
15722
  var SECRET_DENY_LIST = [
@@ -15784,12 +15742,12 @@ var SECRET_DENY_SUFFIXES = [
15784
15742
  ".keystore"
15785
15743
  ];
15786
15744
  function matchesSecretDenyList(absolutePath) {
15787
- const base = path13.basename(absolutePath);
15745
+ const base = path12.basename(absolutePath);
15788
15746
  for (const entry of SECRET_DENY_LIST) {
15789
15747
  if (base === entry) {
15790
15748
  if (entry === "credentials") {
15791
- const dir = path13.dirname(absolutePath);
15792
- if (path13.basename(dir) === ".aws") return true;
15749
+ const dir = path12.dirname(absolutePath);
15750
+ if (path12.basename(dir) === ".aws") return true;
15793
15751
  continue;
15794
15752
  }
15795
15753
  return true;
@@ -15809,7 +15767,7 @@ function isPathInIgnoredPrefixes(absolutePath, exactPaths, dirPrefixes) {
15809
15767
  let p = absolutePath;
15810
15768
  for (let i = 0; i < 4096; i++) {
15811
15769
  if (dirPrefixes.has(p)) return true;
15812
- const parent = path13.dirname(p);
15770
+ const parent = path12.dirname(p);
15813
15771
  if (parent === p) return false;
15814
15772
  p = parent;
15815
15773
  }
@@ -15820,7 +15778,7 @@ function isPathAccountedFor(realFile, countedExactPaths, countedPrunedPrefixes)
15820
15778
  let p = realFile;
15821
15779
  for (let i = 0; i < 4096; i++) {
15822
15780
  if (countedPrunedPrefixes.has(p)) return true;
15823
- const parent = path13.dirname(p);
15781
+ const parent = path12.dirname(p);
15824
15782
  if (parent === p) return false;
15825
15783
  p = parent;
15826
15784
  }
@@ -15840,8 +15798,8 @@ function isPathAdmissible(absolutePath, state, isDir = false) {
15840
15798
  )) {
15841
15799
  return { admissible: false, reason: "gitignore" };
15842
15800
  }
15843
- const rel = path13.relative(state.realRootPath, absolutePath);
15844
- if (rel.length > 0 && !isOutsideRoot(rel) && !path13.isAbsolute(rel) && state.userIgnoreMatcher.ignores(rel, isDir)) {
15801
+ const rel = path12.relative(state.realRootPath, absolutePath);
15802
+ if (rel.length > 0 && !isOutsideRoot(rel) && !path12.isAbsolute(rel) && state.userIgnoreMatcher.ignores(rel, isDir)) {
15845
15803
  return { admissible: false, reason: "userIgnore" };
15846
15804
  }
15847
15805
  return { admissible: true };
@@ -15857,8 +15815,8 @@ var StructuralSummaryError = class extends Error {
15857
15815
  };
15858
15816
 
15859
15817
  // src/structural-summary/walker.ts
15860
- var fs10 = __toESM(require("fs/promises"));
15861
- var path14 = __toESM(require("path"));
15818
+ var fs9 = __toESM(require("fs/promises"));
15819
+ var path13 = __toESM(require("path"));
15862
15820
  var import_child_process3 = require("child_process");
15863
15821
  var import_util = require("util");
15864
15822
  init_logger2();
@@ -16006,7 +15964,7 @@ var DEFAULT_SKIP_DIRS = /* @__PURE__ */ new Set([
16006
15964
  async function walk(opts) {
16007
15965
  let realRootPath;
16008
15966
  try {
16009
- realRootPath = await fs10.realpath(opts.rootPath);
15967
+ realRootPath = await fs9.realpath(opts.rootPath);
16010
15968
  } catch {
16011
15969
  realRootPath = opts.rootPath;
16012
15970
  }
@@ -16078,7 +16036,7 @@ async function walkDir(realDir, presentedPath, depth, ctx, isRoot) {
16078
16036
  }
16079
16037
  let entries;
16080
16038
  try {
16081
- entries = await fs10.readdir(realDir, { withFileTypes: true });
16039
+ entries = await fs9.readdir(realDir, { withFileTypes: true });
16082
16040
  } catch (err) {
16083
16041
  if (isRoot) {
16084
16042
  throw new StructuralSummaryError(
@@ -16098,8 +16056,8 @@ async function walkDir(realDir, presentedPath, depth, ctx, isRoot) {
16098
16056
  ctx.truncated = true;
16099
16057
  break;
16100
16058
  }
16101
- const childReal = path14.join(realDir, entry.name);
16102
- const childPresented = path14.join(presentedPath, entry.name);
16059
+ const childReal = path13.join(realDir, entry.name);
16060
+ const childPresented = path13.join(presentedPath, entry.name);
16103
16061
  if (entry.isDirectory() && DEFAULT_SKIP_DIRS.has(entry.name)) {
16104
16062
  ctx.counts.excludedByGitignore++;
16105
16063
  ctx.countedPrunedPrefixes.add(childReal);
@@ -16158,7 +16116,7 @@ async function walkDir(realDir, presentedPath, depth, ctx, isRoot) {
16158
16116
  if (entry.isFile()) {
16159
16117
  let size = 0;
16160
16118
  try {
16161
- const st = await fs10.stat(childReal);
16119
+ const st = await fs9.stat(childReal);
16162
16120
  size = st.size;
16163
16121
  } catch {
16164
16122
  continue;
@@ -16166,7 +16124,7 @@ async function walkDir(realDir, presentedPath, depth, ctx, isRoot) {
16166
16124
  ctx.opts.fileCountBudget.remaining--;
16167
16125
  node.fileCount++;
16168
16126
  node.bytes += size;
16169
- const ext = path14.extname(entry.name).toLowerCase();
16127
+ const ext = path13.extname(entry.name).toLowerCase();
16170
16128
  if (ext) {
16171
16129
  ctx.fileExtensions.set(ext, (ctx.fileExtensions.get(ext) ?? 0) + 1);
16172
16130
  }
@@ -16191,7 +16149,7 @@ async function walkDir(realDir, presentedPath, depth, ctx, isRoot) {
16191
16149
  const cap = Math.min(size, MAX_BODY_PER_FILE);
16192
16150
  if (size > MAX_BODY_PER_FILE) {
16193
16151
  try {
16194
- const handle = await fs10.open(childReal, "r");
16152
+ const handle = await fs9.open(childReal, "r");
16195
16153
  try {
16196
16154
  const buf = Buffer.alloc(cap);
16197
16155
  await handle.read(buf, 0, cap, 0);
@@ -16205,7 +16163,7 @@ async function walkDir(realDir, presentedPath, depth, ctx, isRoot) {
16205
16163
  }
16206
16164
  } else {
16207
16165
  try {
16208
- bodyNode.body = await fs10.readFile(childReal, "utf8");
16166
+ bodyNode.body = await fs9.readFile(childReal, "utf8");
16209
16167
  } catch {
16210
16168
  bodyNode.bodyTruncated = true;
16211
16169
  }
@@ -16225,9 +16183,9 @@ function shouldIncludeBody(realFile, includeBodies, realRootPath) {
16225
16183
  if (!includeBodies || includeBodies.length === 0) return false;
16226
16184
  void realRootPath;
16227
16185
  for (const optIn of includeBodies) {
16228
- if (!path14.isAbsolute(optIn)) continue;
16186
+ if (!path13.isAbsolute(optIn)) continue;
16229
16187
  if (realFile === optIn) return true;
16230
- const sep16 = optIn.endsWith(path14.sep) ? optIn : optIn + path14.sep;
16188
+ const sep16 = optIn.endsWith(path13.sep) ? optIn : optIn + path13.sep;
16231
16189
  if (realFile.startsWith(sep16)) return true;
16232
16190
  }
16233
16191
  return false;
@@ -16243,8 +16201,8 @@ async function buildExclusionState(callerRoot, realRootPath, ignoreFile) {
16243
16201
  if (!repoTopLevel) {
16244
16202
  notInGitRepo = true;
16245
16203
  } else {
16246
- const rel = path14.relative(repoTopLevel, realRootPath);
16247
- if (rel.length > 0 && (isOutsideRoot(rel) || path14.isAbsolute(rel))) {
16204
+ const rel = path13.relative(repoTopLevel, realRootPath);
16205
+ if (rel.length > 0 && (isOutsideRoot(rel) || path13.isAbsolute(rel))) {
16248
16206
  notInGitRepo = true;
16249
16207
  logger.info("[structural-summary] realRootPath outside repoTopLevel \u2014 non-git fallback", {
16250
16208
  realRootPath,
@@ -16271,9 +16229,9 @@ async function buildExclusionState(callerRoot, realRootPath, ignoreFile) {
16271
16229
  for (const rec of records) {
16272
16230
  if (rec.startsWith("?? ")) {
16273
16231
  const relPath = rec.slice(3);
16274
- const abs = path14.join(repoTopLevel, relPath);
16275
- const relFromRoot = path14.relative(realRootPath, abs);
16276
- if (relFromRoot.length > 0 && !isOutsideRoot(relFromRoot) && !path14.isAbsolute(relFromRoot)) {
16232
+ const abs = path13.join(repoTopLevel, relPath);
16233
+ const relFromRoot = path13.relative(realRootPath, abs);
16234
+ if (relFromRoot.length > 0 && !isOutsideRoot(relFromRoot) && !path13.isAbsolute(relFromRoot)) {
16277
16235
  untrackedSet.add(abs);
16278
16236
  }
16279
16237
  }
@@ -16304,7 +16262,7 @@ async function buildExclusionState(callerRoot, realRootPath, ignoreFile) {
16304
16262
  for (const rec of records) {
16305
16263
  const isDir = rec.endsWith("/");
16306
16264
  const trimmed = isDir ? rec.slice(0, -1) : rec;
16307
- const abs = path14.join(repoTopLevel, trimmed);
16265
+ const abs = path13.join(repoTopLevel, trimmed);
16308
16266
  if (isDir) {
16309
16267
  ignoredDirPrefixes.add(abs);
16310
16268
  } else {
@@ -16320,7 +16278,7 @@ async function buildExclusionState(callerRoot, realRootPath, ignoreFile) {
16320
16278
  let userIgnoreMatcher = emptyUserIgnoreMatcher();
16321
16279
  if (ignoreFile) {
16322
16280
  try {
16323
- const text2 = await fs10.readFile(ignoreFile, "utf8");
16281
+ const text2 = await fs9.readFile(ignoreFile, "utf8");
16324
16282
  userIgnoreMatcher = compileUserIgnore(text2);
16325
16283
  } catch (err) {
16326
16284
  const code = err.code;
@@ -16346,7 +16304,7 @@ async function buildExclusionState(callerRoot, realRootPath, ignoreFile) {
16346
16304
  }
16347
16305
 
16348
16306
  // src/structural-summary/manifest-parsers/index.ts
16349
- var path18 = __toESM(require("path"));
16307
+ var path17 = __toESM(require("path"));
16350
16308
  init_logger2();
16351
16309
 
16352
16310
  // src/structural-summary/manifest-parsers/npm.ts
@@ -16355,16 +16313,16 @@ __export(npm_exports, {
16355
16313
  findManifest: () => findManifest,
16356
16314
  parse: () => parse
16357
16315
  });
16358
- var fs12 = __toESM(require("fs/promises"));
16359
- var path15 = __toESM(require("path"));
16316
+ var fs11 = __toESM(require("fs/promises"));
16317
+ var path14 = __toESM(require("path"));
16360
16318
 
16361
16319
  // src/structural-summary/safe-file-read.ts
16362
- var fs11 = __toESM(require("fs/promises"));
16320
+ var fs10 = __toESM(require("fs/promises"));
16363
16321
  var fsConstants2 = __toESM(require("fs"));
16364
16322
  async function safeReadTextFile(absPath) {
16365
16323
  let lstatResult;
16366
16324
  try {
16367
- lstatResult = await fs11.lstat(absPath, { bigint: true });
16325
+ lstatResult = await fs10.lstat(absPath, { bigint: true });
16368
16326
  } catch {
16369
16327
  return null;
16370
16328
  }
@@ -16374,7 +16332,7 @@ async function safeReadTextFile(absPath) {
16374
16332
  const flags = fsConstants2.constants.O_RDONLY | (oNofollow ?? 0);
16375
16333
  let handle;
16376
16334
  try {
16377
- handle = await fs11.open(absPath, flags);
16335
+ handle = await fs10.open(absPath, flags);
16378
16336
  } catch {
16379
16337
  return null;
16380
16338
  }
@@ -16397,9 +16355,9 @@ async function safeReadTextFile(absPath) {
16397
16355
 
16398
16356
  // src/structural-summary/manifest-parsers/npm.ts
16399
16357
  async function findManifest(rootPath) {
16400
- const candidate = path15.join(rootPath, "package.json");
16358
+ const candidate = path14.join(rootPath, "package.json");
16401
16359
  try {
16402
- const st = await fs12.lstat(candidate);
16360
+ const st = await fs11.lstat(candidate);
16403
16361
  if (st.isSymbolicLink()) return null;
16404
16362
  if (st.isFile()) return candidate;
16405
16363
  } catch {
@@ -16439,13 +16397,13 @@ __export(cargo_exports, {
16439
16397
  findManifest: () => findManifest2,
16440
16398
  parse: () => parse3
16441
16399
  });
16442
- var fs13 = __toESM(require("fs/promises"));
16443
- var path16 = __toESM(require("path"));
16400
+ var fs12 = __toESM(require("fs/promises"));
16401
+ var path15 = __toESM(require("path"));
16444
16402
  var toml = __toESM(require("@iarna/toml"));
16445
16403
  async function findManifest2(rootPath) {
16446
- const candidate = path16.join(rootPath, "Cargo.toml");
16404
+ const candidate = path15.join(rootPath, "Cargo.toml");
16447
16405
  try {
16448
- const st = await fs13.lstat(candidate);
16406
+ const st = await fs12.lstat(candidate);
16449
16407
  if (st.isSymbolicLink()) return null;
16450
16408
  if (st.isFile()) return candidate;
16451
16409
  } catch {
@@ -16492,14 +16450,14 @@ async function parse3(file) {
16492
16450
  }
16493
16451
 
16494
16452
  // src/structural-summary/manifest-parsers/other.ts
16495
- var fs14 = __toESM(require("fs/promises"));
16496
- var path17 = __toESM(require("path"));
16453
+ var fs13 = __toESM(require("fs/promises"));
16454
+ var path16 = __toESM(require("path"));
16497
16455
  init_logger2();
16498
16456
  var pyproject = {
16499
16457
  async findManifest(rootPath) {
16500
- const candidate = path17.join(rootPath, "pyproject.toml");
16458
+ const candidate = path16.join(rootPath, "pyproject.toml");
16501
16459
  try {
16502
- const st = await fs14.lstat(candidate);
16460
+ const st = await fs13.lstat(candidate);
16503
16461
  if (st.isSymbolicLink()) return null;
16504
16462
  if (st.isFile()) return candidate;
16505
16463
  } catch {
@@ -16546,9 +16504,9 @@ var pyproject = {
16546
16504
  };
16547
16505
  var gomod = {
16548
16506
  async findManifest(rootPath) {
16549
- const candidate = path17.join(rootPath, "go.mod");
16507
+ const candidate = path16.join(rootPath, "go.mod");
16550
16508
  try {
16551
- const st = await fs14.lstat(candidate);
16509
+ const st = await fs13.lstat(candidate);
16552
16510
  if (st.isSymbolicLink()) return null;
16553
16511
  if (st.isFile()) return candidate;
16554
16512
  } catch {
@@ -16592,9 +16550,9 @@ var gomod = {
16592
16550
  };
16593
16551
  var podfile = {
16594
16552
  async findManifest(rootPath) {
16595
- const candidate = path17.join(rootPath, "Podfile");
16553
+ const candidate = path16.join(rootPath, "Podfile");
16596
16554
  try {
16597
- const st = await fs14.lstat(candidate);
16555
+ const st = await fs13.lstat(candidate);
16598
16556
  if (st.isSymbolicLink()) return null;
16599
16557
  if (st.isFile()) return candidate;
16600
16558
  } catch {
@@ -16635,9 +16593,9 @@ var podfile = {
16635
16593
  var gradle = {
16636
16594
  async findManifest(rootPath) {
16637
16595
  for (const name of ["build.gradle", "build.gradle.kts"]) {
16638
- const candidate = path17.join(rootPath, name);
16596
+ const candidate = path16.join(rootPath, name);
16639
16597
  try {
16640
- const st = await fs14.lstat(candidate);
16598
+ const st = await fs13.lstat(candidate);
16641
16599
  if (st.isSymbolicLink()) continue;
16642
16600
  if (st.isFile()) return candidate;
16643
16601
  } catch {
@@ -16677,7 +16635,7 @@ async function parse4(rootPath, exclusionState, countedExactPaths, countedPruned
16677
16635
  for (const parser of PARSERS) {
16678
16636
  const file = await parser.findManifest(rootPath);
16679
16637
  if (!file) continue;
16680
- const lexicalFile = path18.join(exclusionState.realRootPath, path18.basename(file));
16638
+ const lexicalFile = path17.join(exclusionState.realRootPath, path17.basename(file));
16681
16639
  const admission = isPathAdmissible(lexicalFile, exclusionState);
16682
16640
  if (!admission.admissible) {
16683
16641
  const walkerAccountedFor = isPathAccountedFor(
@@ -16733,7 +16691,7 @@ async function generate(opts) {
16733
16691
  }
16734
16692
  if (opts.includeBodies) {
16735
16693
  for (const p of opts.includeBodies) {
16736
- if (!path19.isAbsolute(p)) {
16694
+ if (!path18.isAbsolute(p)) {
16737
16695
  throw new StructuralSummaryError(
16738
16696
  `includeBodies entry must be absolute (got: ${p}).`,
16739
16697
  "invalid_path"
@@ -16867,7 +16825,7 @@ var README_CANDIDATES = ["README.md", "README.rst", "README.txt", "README"];
16867
16825
  async function readReadmePreview(rootPath, exclusionState, countedExactPaths, countedPrunedPrefixes, counters) {
16868
16826
  void rootPath;
16869
16827
  for (const name of README_CANDIDATES) {
16870
- const candidatePath = path19.join(exclusionState.realRootPath, name);
16828
+ const candidatePath = path18.join(exclusionState.realRootPath, name);
16871
16829
  try {
16872
16830
  const admission = isPathAdmissible(candidatePath, exclusionState);
16873
16831
  if (!admission.admissible) {
@@ -16955,19 +16913,19 @@ function inferLanguages(extensions) {
16955
16913
  }
16956
16914
 
16957
16915
  // src/structural-summary/opt-in-store.ts
16958
- var fs15 = __toESM(require("fs/promises"));
16959
- var path20 = __toESM(require("path"));
16960
- var os13 = __toESM(require("os"));
16916
+ var fs14 = __toESM(require("fs/promises"));
16917
+ var path19 = __toESM(require("path"));
16918
+ var os12 = __toESM(require("os"));
16961
16919
  init_logger2();
16962
- function resolveHome3() {
16920
+ function resolveHome2() {
16963
16921
  const isTestEnv = process.env.VITEST === "true" || process.env.NODE_ENV === "test";
16964
16922
  if (isTestEnv && process.env.CODEVIBE_HOME_OVERRIDE) {
16965
16923
  return process.env.CODEVIBE_HOME_OVERRIDE;
16966
16924
  }
16967
- return os13.homedir();
16925
+ return os12.homedir();
16968
16926
  }
16969
16927
  function optInFilePath() {
16970
- return path20.join(resolveHome3(), ".codevibe", "structural-summary.opt-in.json");
16928
+ return path19.join(resolveHome2(), ".codevibe", "structural-summary.opt-in.json");
16971
16929
  }
16972
16930
  function isOptInFile(value) {
16973
16931
  if (!value || typeof value !== "object") return false;
@@ -16985,7 +16943,7 @@ function filterToAbsolutePaths(file) {
16985
16943
  const dropped = [];
16986
16944
  const kept = [];
16987
16945
  for (const p of file.bodyInclusionPaths) {
16988
- if (path20.isAbsolute(p)) {
16946
+ if (path19.isAbsolute(p)) {
16989
16947
  kept.push(p);
16990
16948
  } else {
16991
16949
  dropped.push(p);
@@ -17006,7 +16964,7 @@ async function readOptIn(currentTier) {
17006
16964
  const filePath = optInFilePath();
17007
16965
  let st;
17008
16966
  try {
17009
- st = await fs15.stat(filePath);
16967
+ st = await fs14.stat(filePath);
17010
16968
  } catch (err) {
17011
16969
  const code = err?.code;
17012
16970
  if (code !== "ENOENT") {
@@ -17026,7 +16984,7 @@ async function readOptIn(currentTier) {
17026
16984
  }
17027
16985
  let raw;
17028
16986
  try {
17029
- raw = await fs15.readFile(filePath, "utf8");
16987
+ raw = await fs14.readFile(filePath, "utf8");
17030
16988
  } catch (err) {
17031
16989
  logger.debug("[structural-summary] opt-in read error \u2014 treating as missing", {
17032
16990
  filePath,
@@ -17062,14 +17020,14 @@ async function readOptIn(currentTier) {
17062
17020
  }
17063
17021
  async function writeOptInRaw(file) {
17064
17022
  const filePath = optInFilePath();
17065
- const dir = path20.dirname(filePath);
17066
- await fs15.mkdir(dir, { recursive: true });
17067
- await fs15.writeFile(filePath, JSON.stringify(file, null, 2), {
17023
+ const dir = path19.dirname(filePath);
17024
+ await fs14.mkdir(dir, { recursive: true });
17025
+ await fs14.writeFile(filePath, JSON.stringify(file, null, 2), {
17068
17026
  encoding: "utf8",
17069
17027
  mode: 384
17070
17028
  });
17071
17029
  try {
17072
- await fs15.chmod(filePath, 384);
17030
+ await fs14.chmod(filePath, 384);
17073
17031
  } catch {
17074
17032
  }
17075
17033
  }
@@ -17080,16 +17038,16 @@ async function addBodyPath(bodyPath, currentTier) {
17080
17038
  "tier_gate"
17081
17039
  );
17082
17040
  }
17083
- if (!path20.isAbsolute(bodyPath)) {
17041
+ if (!path19.isAbsolute(bodyPath)) {
17084
17042
  throw new StructuralSummaryError(
17085
17043
  `Body inclusion opt-in path must be absolute (got: ${bodyPath}).`,
17086
17044
  "invalid_path"
17087
17045
  );
17088
17046
  }
17089
- const normalised = path20.resolve(bodyPath);
17047
+ const normalised = path19.resolve(bodyPath);
17090
17048
  let canonical;
17091
17049
  try {
17092
- canonical = await fs15.realpath(normalised);
17050
+ canonical = await fs14.realpath(normalised);
17093
17051
  } catch (err) {
17094
17052
  const code = err?.code;
17095
17053
  throw new StructuralSummaryError(
@@ -17112,8 +17070,8 @@ async function addBodyPath(bodyPath, currentTier) {
17112
17070
 
17113
17071
  // src/orchestration-shell/quorum-loop.ts
17114
17072
  var import_node_fs18 = require("node:fs");
17115
- var path40 = __toESM(require("node:path"));
17116
- var os22 = __toESM(require("node:os"));
17073
+ var path39 = __toESM(require("node:path"));
17074
+ var os21 = __toESM(require("node:os"));
17117
17075
  var import_node_child_process6 = require("node:child_process");
17118
17076
  var import_node_util3 = require("node:util");
17119
17077
  var import_uuid11 = require("uuid");
@@ -17121,7 +17079,7 @@ var import_ulid3 = require("ulid");
17121
17079
 
17122
17080
  // src/local-executor/authority.ts
17123
17081
  var import_node_fs3 = require("node:fs");
17124
- var path21 = __toESM(require("node:path"));
17082
+ var path20 = __toESM(require("node:path"));
17125
17083
  var AuthorityError = class extends Error {
17126
17084
  constructor(refusal) {
17127
17085
  super(`${refusal.category}: ${refusal.detail}`);
@@ -17145,8 +17103,8 @@ function authorityExpired(scope) {
17145
17103
  async function enforceWrite(scope, p) {
17146
17104
  const canonical = await import_node_fs3.promises.realpath(p).catch((e) => {
17147
17105
  if (e.code === "ENOENT") {
17148
- const parent = path21.dirname(p);
17149
- return import_node_fs3.promises.realpath(parent).then((realParent) => path21.join(realParent, path21.basename(p))).catch((parentErr) => {
17106
+ const parent = path20.dirname(p);
17107
+ return import_node_fs3.promises.realpath(parent).then((realParent) => path20.join(realParent, path20.basename(p))).catch((parentErr) => {
17150
17108
  throw new AuthorityError({
17151
17109
  category: "authority_scope_conflict",
17152
17110
  detail: `parent directory ${parent} for write target ${p} does not exist or is unresolvable: ${parentErr.message}`
@@ -17158,7 +17116,7 @@ async function enforceWrite(scope, p) {
17158
17116
  detail: `realpath(${p}) failed: ${e.message}`
17159
17117
  });
17160
17118
  });
17161
- const inScope = scope.writeScopes.some((s) => canonical.startsWith(s + path21.sep) || canonical === s);
17119
+ const inScope = scope.writeScopes.some((s) => canonical.startsWith(s + path20.sep) || canonical === s);
17162
17120
  if (!inScope) {
17163
17121
  throw new AuthorityError({
17164
17122
  category: "authority_scope_conflict",
@@ -17184,7 +17142,7 @@ async function enforceRead(scope, p) {
17184
17142
  } catch (e) {
17185
17143
  const err = e;
17186
17144
  if (err.code === "ENOENT") {
17187
- const parent = path21.dirname(p);
17145
+ const parent = path20.dirname(p);
17188
17146
  let realParent;
17189
17147
  try {
17190
17148
  realParent = await import_node_fs3.promises.realpath(parent);
@@ -17196,7 +17154,7 @@ async function enforceRead(scope, p) {
17196
17154
  });
17197
17155
  }
17198
17156
  const parentInScope = scope.readScopes.some(
17199
- (s) => realParent.startsWith(s + path21.sep) || realParent === s
17157
+ (s) => realParent.startsWith(s + path20.sep) || realParent === s
17200
17158
  );
17201
17159
  if (!parentInScope) {
17202
17160
  throw new AuthorityError({
@@ -17210,14 +17168,14 @@ async function enforceRead(scope, p) {
17210
17168
  detail: "authority expired; re-authorize"
17211
17169
  });
17212
17170
  }
17213
- throw new FileNotFound(path21.join(realParent, path21.basename(p)), err);
17171
+ throw new FileNotFound(path20.join(realParent, path20.basename(p)), err);
17214
17172
  }
17215
17173
  throw new AuthorityError({
17216
17174
  category: "authority_scope_conflict",
17217
17175
  detail: `realpath(${p}) failed: ${err.message}`
17218
17176
  });
17219
17177
  }
17220
- const inScope = scope.readScopes.some((s) => canonical.startsWith(s + path21.sep) || canonical === s);
17178
+ const inScope = scope.readScopes.some((s) => canonical.startsWith(s + path20.sep) || canonical === s);
17221
17179
  if (!inScope) {
17222
17180
  throw new AuthorityError({
17223
17181
  category: "authority_scope_conflict",
@@ -18017,7 +17975,7 @@ var HookBridge = class {
18017
17975
 
18018
17976
  // src/local-executor/local-executor-impl.ts
18019
17977
  var import_node_fs13 = require("node:fs");
18020
- var path32 = __toESM(require("node:path"));
17978
+ var path31 = __toESM(require("node:path"));
18021
17979
 
18022
17980
  // src/local-executor/class-a-emit.ts
18023
17981
  var import_node_fs6 = require("node:fs");
@@ -18323,8 +18281,8 @@ function normalizeTrackAssignedWire(raw) {
18323
18281
  if (!raw || typeof raw !== "object") return {};
18324
18282
  const o = raw;
18325
18283
  const osRaw = pick(o, "ownershipScope", "ownership_scope");
18326
- const os33 = osRaw && typeof osRaw === "object" ? osRaw : {};
18327
- const sharedContracts = pick(os33, "sharedContracts", "shared_contracts");
18284
+ const os32 = osRaw && typeof osRaw === "object" ? osRaw : {};
18285
+ const sharedContracts = pick(os32, "sharedContracts", "shared_contracts");
18328
18286
  const ccRaw = pick(o, "conflictContext", "conflict_context");
18329
18287
  const conflictContext = ccRaw && typeof ccRaw === "object" ? normalizeConflictContext(ccRaw) : void 0;
18330
18288
  return {
@@ -18333,10 +18291,10 @@ function normalizeTrackAssignedWire(raw) {
18333
18291
  task_id: pick(o, "taskId", "task_id"),
18334
18292
  implementor_agent: upperAgentKind(pick(o, "implementorAgent", "implementor_agent")),
18335
18293
  ownership_scope: {
18336
- write_paths: pick(os33, "writePaths", "write_paths"),
18294
+ write_paths: pick(os32, "writePaths", "write_paths"),
18337
18295
  shared_contracts: sharedContracts,
18338
- test_surfaces: pick(os33, "testSurfaces", "test_surfaces"),
18339
- auto_modified_files: pick(os33, "autoModifiedFiles", "auto_modified_files")
18296
+ test_surfaces: pick(os32, "testSurfaces", "test_surfaces"),
18297
+ auto_modified_files: pick(os32, "autoModifiedFiles", "auto_modified_files")
18340
18298
  },
18341
18299
  is_shared_test_owner: pick(o, "isSharedTestOwner", "is_shared_test_owner"),
18342
18300
  state_dir: pick(o, "stateDir", "state_dir"),
@@ -18452,15 +18410,15 @@ function isValidTrackAssignedPayload(payload) {
18452
18410
  return false;
18453
18411
  }
18454
18412
  if (typeof payload.is_shared_test_owner !== "boolean") return false;
18455
- const os33 = payload.ownership_scope;
18456
- if (!os33 || typeof os33 !== "object") return false;
18457
- if (!Array.isArray(os33.write_paths)) return false;
18458
- if (!Array.isArray(os33.auto_modified_files)) return false;
18459
- if (!Array.isArray(os33.shared_contracts)) return false;
18460
- if (!Array.isArray(os33.test_surfaces)) return false;
18461
- if (!os33.write_paths.every((p) => typeof p === "string")) return false;
18462
- if (!os33.auto_modified_files.every((p) => typeof p === "string")) return false;
18463
- if (!os33.test_surfaces.every((p) => typeof p === "string")) return false;
18413
+ const os32 = payload.ownership_scope;
18414
+ if (!os32 || typeof os32 !== "object") return false;
18415
+ if (!Array.isArray(os32.write_paths)) return false;
18416
+ if (!Array.isArray(os32.auto_modified_files)) return false;
18417
+ if (!Array.isArray(os32.shared_contracts)) return false;
18418
+ if (!Array.isArray(os32.test_surfaces)) return false;
18419
+ if (!os32.write_paths.every((p) => typeof p === "string")) return false;
18420
+ if (!os32.auto_modified_files.every((p) => typeof p === "string")) return false;
18421
+ if (!os32.test_surfaces.every((p) => typeof p === "string")) return false;
18464
18422
  return true;
18465
18423
  }
18466
18424
  function isValidMergeGateDispatchPayload(payload) {
@@ -18940,17 +18898,17 @@ var ClassBConsumer = class {
18940
18898
 
18941
18899
  // src/local-executor/merge-train.ts
18942
18900
  var crypto8 = __toESM(require("node:crypto"));
18943
- var fs23 = __toESM(require("node:fs/promises"));
18944
- var os16 = __toESM(require("node:os"));
18945
- var path28 = __toESM(require("node:path"));
18901
+ var fs22 = __toESM(require("node:fs/promises"));
18902
+ var os15 = __toESM(require("node:os"));
18903
+ var path27 = __toESM(require("node:path"));
18946
18904
  init_logger2();
18947
18905
 
18948
18906
  // src/orchestration-shell/declared-test-runner.ts
18949
- var path23 = __toESM(require("node:path"));
18907
+ var path22 = __toESM(require("node:path"));
18950
18908
  var DECLARED_TEST_TIMEOUT_MS = 3e5;
18951
18909
  var SUPPORTED_JS_EXTS = [".js", ".mjs", ".cjs"];
18952
18910
  function normalizeScopePath(rel) {
18953
- const n = path23.posix.normalize(rel.replace(/\\/g, "/")).replace(/\/+$/, "");
18911
+ const n = path22.posix.normalize(rel.replace(/\\/g, "/")).replace(/\/+$/, "");
18954
18912
  return n === "." ? "" : n;
18955
18913
  }
18956
18914
  function shadowDiffDrift(before, after) {
@@ -18972,16 +18930,16 @@ function shadowDiffDrift(before, after) {
18972
18930
  return [...drift].sort();
18973
18931
  }
18974
18932
  function isContained(abs, shadowReal) {
18975
- return abs === shadowReal || abs.startsWith(shadowReal + path23.sep);
18933
+ return abs === shadowReal || abs.startsWith(shadowReal + path22.sep);
18976
18934
  }
18977
18935
  function toShadowRel(raw, shadowReal) {
18978
- const abs = path23.resolve(shadowReal, normalizeScopePath(raw));
18936
+ const abs = path22.resolve(shadowReal, normalizeScopePath(raw));
18979
18937
  if (!isContained(abs, shadowReal)) return { kind: "escape" };
18980
- const rel = path23.relative(shadowReal, abs);
18938
+ const rel = path22.relative(shadowReal, abs);
18981
18939
  return rel.length === 0 ? { kind: "empty" } : { kind: "rel", rel };
18982
18940
  }
18983
18941
  async function classify(rel, shadowReal, deps) {
18984
- const abs = path23.resolve(shadowReal, rel);
18942
+ const abs = path22.resolve(shadowReal, rel);
18985
18943
  if (!isContained(abs, shadowReal)) {
18986
18944
  return { kind: "escape" };
18987
18945
  }
@@ -19014,7 +18972,7 @@ function isDeleted(rel, deletedPaths) {
19014
18972
  return deletedPaths.some((d) => d === rel || d.startsWith(rel + "/"));
19015
18973
  }
19016
18974
  function isSupportedJs(rel) {
19017
- return SUPPORTED_JS_EXTS.includes(path23.extname(rel).toLowerCase());
18975
+ return SUPPORTED_JS_EXTS.includes(path22.extname(rel).toLowerCase());
19018
18976
  }
19019
18977
  var FRAMEWORK_RUNNERS = [
19020
18978
  // `vitest run <file>` — `run` forces single-shot (no watch); the path filters to that file.
@@ -19026,11 +18984,11 @@ var FRAMEWORK_RUNNERS = [
19026
18984
  ];
19027
18985
  async function detectFramework(fileAbsReal, shadowReal, deps) {
19028
18986
  let framework;
19029
- let dir = path23.dirname(fileAbsReal);
18987
+ let dir = path22.dirname(fileAbsReal);
19030
18988
  while (isContained(dir, shadowReal)) {
19031
18989
  let declared;
19032
18990
  try {
19033
- const pkg = JSON.parse(await deps.readFile(path23.join(dir, "package.json")));
18991
+ const pkg = JSON.parse(await deps.readFile(path22.join(dir, "package.json")));
19034
18992
  const allDeps = { ...pkg.dependencies ?? {}, ...pkg.devDependencies ?? {} };
19035
18993
  declared = FRAMEWORK_RUNNERS.find((r) => Object.prototype.hasOwnProperty.call(allDeps, r.dep));
19036
18994
  } catch {
@@ -19040,22 +18998,22 @@ async function detectFramework(fileAbsReal, shadowReal, deps) {
19040
18998
  framework = declared;
19041
18999
  break;
19042
19000
  }
19043
- const parent = path23.dirname(dir);
19001
+ const parent = path22.dirname(dir);
19044
19002
  if (parent === dir) break;
19045
19003
  dir = parent;
19046
19004
  }
19047
19005
  if (!framework) {
19048
19006
  return { kind: "node" };
19049
19007
  }
19050
- let bdir = path23.dirname(fileAbsReal);
19008
+ let bdir = path22.dirname(fileAbsReal);
19051
19009
  while (isContained(bdir, shadowReal)) {
19052
- const binAbs = path23.join(bdir, "node_modules", ".bin", framework.bin);
19010
+ const binAbs = path22.join(bdir, "node_modules", ".bin", framework.bin);
19053
19011
  try {
19054
19012
  await deps.lstat(binAbs);
19055
19013
  return { kind: "framework", name: framework.dep, binAbs, args: framework.args(fileAbsReal) };
19056
19014
  } catch {
19057
19015
  }
19058
- const parent = path23.dirname(bdir);
19016
+ const parent = path22.dirname(bdir);
19059
19017
  if (parent === bdir) break;
19060
19018
  bdir = parent;
19061
19019
  }
@@ -19224,7 +19182,7 @@ async function runDeclaredTestSurfaces(args) {
19224
19182
  return {
19225
19183
  outcome: "fail",
19226
19184
  failingPath: rel,
19227
- reason: `no supported runner for ${path23.extname(rel)}`,
19185
+ reason: `no supported runner for ${path22.extname(rel)}`,
19228
19186
  ranCount: ran.count,
19229
19187
  skipped
19230
19188
  };
@@ -19267,7 +19225,7 @@ async function runDeclaredTestSurfaces(args) {
19267
19225
 
19268
19226
  // src/local-executor/verification-gates/build.ts
19269
19227
  var import_node_fs7 = require("node:fs");
19270
- var path24 = __toESM(require("node:path"));
19228
+ var path23 = __toESM(require("node:path"));
19271
19229
 
19272
19230
  // src/local-executor/verification-gates/shell-runner.ts
19273
19231
  var import_node_child_process3 = require("node:child_process");
@@ -19368,8 +19326,8 @@ verification-gate spawn error: ${err.message ?? err.code ?? "unknown"}`;
19368
19326
 
19369
19327
  // src/local-executor/verification-gates/build.ts
19370
19328
  async function runBuildGate(args) {
19371
- const hasCargo = await fileExists(path24.join(args.cwd, "Cargo.toml"));
19372
- const hasPackageJson = await fileExists(path24.join(args.cwd, "package.json"));
19329
+ const hasCargo = await fileExists(path23.join(args.cwd, "Cargo.toml"));
19330
+ const hasPackageJson = await fileExists(path23.join(args.cwd, "package.json"));
19373
19331
  if (hasCargo) {
19374
19332
  return runShellCommand({
19375
19333
  command: "cargo",
@@ -19404,10 +19362,10 @@ async function fileExists(p) {
19404
19362
 
19405
19363
  // src/local-executor/verification-gates/tests.ts
19406
19364
  var import_node_fs8 = require("node:fs");
19407
- var path25 = __toESM(require("node:path"));
19365
+ var path24 = __toESM(require("node:path"));
19408
19366
  async function runTestsGate(args) {
19409
- const hasCargo = await fileExists2(path25.join(args.cwd, "Cargo.toml"));
19410
- const hasPackageJson = await fileExists2(path25.join(args.cwd, "package.json"));
19367
+ const hasCargo = await fileExists2(path24.join(args.cwd, "Cargo.toml"));
19368
+ const hasPackageJson = await fileExists2(path24.join(args.cwd, "package.json"));
19411
19369
  if (hasCargo) {
19412
19370
  return runShellCommand({
19413
19371
  command: "cargo",
@@ -19442,10 +19400,10 @@ async function fileExists2(p) {
19442
19400
 
19443
19401
  // src/local-executor/verification-gates/typecheck.ts
19444
19402
  var import_node_fs9 = require("node:fs");
19445
- var path26 = __toESM(require("node:path"));
19403
+ var path25 = __toESM(require("node:path"));
19446
19404
  async function runTypecheckGate(args) {
19447
- const hasCargo = await fileExists3(path26.join(args.cwd, "Cargo.toml"));
19448
- const hasPackageJson = await fileExists3(path26.join(args.cwd, "package.json"));
19405
+ const hasCargo = await fileExists3(path25.join(args.cwd, "Cargo.toml"));
19406
+ const hasPackageJson = await fileExists3(path25.join(args.cwd, "package.json"));
19449
19407
  if (hasCargo) {
19450
19408
  return runShellCommand({
19451
19409
  command: "cargo",
@@ -19481,9 +19439,9 @@ async function fileExists3(p) {
19481
19439
  // src/local-executor/worktree-merge.ts
19482
19440
  var import_node_child_process4 = require("node:child_process");
19483
19441
  var crypto7 = __toESM(require("node:crypto"));
19484
- var fs22 = __toESM(require("node:fs/promises"));
19485
- var os15 = __toESM(require("node:os"));
19486
- var path27 = __toESM(require("node:path"));
19442
+ var fs21 = __toESM(require("node:fs/promises"));
19443
+ var os14 = __toESM(require("node:os"));
19444
+ var path26 = __toESM(require("node:path"));
19487
19445
  var import_node_util = require("node:util");
19488
19446
 
19489
19447
  // src/local-executor/git-lock-retry.ts
@@ -19972,8 +19930,8 @@ function canonPath(p, caseInsensitive) {
19972
19930
  async function captureUntrackedTree(repoDir, taskGroupId, repoId) {
19973
19931
  const paths = await untrackedPaths(repoDir);
19974
19932
  if (paths.length === 0) return null;
19975
- const tmpIndex = path27.join(
19976
- os15.tmpdir(),
19933
+ const tmpIndex = path26.join(
19934
+ os14.tmpdir(),
19977
19935
  `cv-untracked-idx.${process.pid}.${crypto7.randomBytes(6).toString("hex")}`
19978
19936
  );
19979
19937
  try {
@@ -19990,7 +19948,7 @@ async function captureUntrackedTree(repoDir, taskGroupId, repoId) {
19990
19948
  });
19991
19949
  return tree;
19992
19950
  } finally {
19993
- await fs22.rm(tmpIndex, { force: true }).catch(() => void 0);
19951
+ await fs21.rm(tmpIndex, { force: true }).catch(() => void 0);
19994
19952
  }
19995
19953
  }
19996
19954
  async function restoreUntrackedTree(repoDir, treeSha, guard) {
@@ -20103,8 +20061,8 @@ async function snapshotWorktreeTree(repoDir) {
20103
20061
  return snapshotWorktreeTreeSeeded(repoDir, "HEAD");
20104
20062
  }
20105
20063
  async function snapshotWorktreeTreeSeeded(repoDir, seedRef) {
20106
- const tmpIndex = path27.join(
20107
- os15.tmpdir(),
20064
+ const tmpIndex = path26.join(
20065
+ os14.tmpdir(),
20108
20066
  `cv-wt-snap-idx.${process.pid}.${crypto7.randomBytes(6).toString("hex")}`
20109
20067
  );
20110
20068
  try {
@@ -20122,7 +20080,7 @@ async function snapshotWorktreeTreeSeeded(repoDir, seedRef) {
20122
20080
  const { stdout } = await gitWithIndex(repoDir, tmpIndex, ["write-tree"]);
20123
20081
  return stdout.trim();
20124
20082
  } finally {
20125
- await fs22.rm(tmpIndex, { force: true }).catch(() => void 0);
20083
+ await fs21.rm(tmpIndex, { force: true }).catch(() => void 0);
20126
20084
  }
20127
20085
  }
20128
20086
  async function treeEntryMap(repoDir, treeSha) {
@@ -20173,7 +20131,7 @@ async function normalizingRawDigest(repoDir, paths) {
20173
20131
  for (const p of normalizing) {
20174
20132
  hash.update(`${p.length}:${p}\0`);
20175
20133
  try {
20176
- const bytes = await fs22.readFile(path27.join(repoDir, p));
20134
+ const bytes = await fs21.readFile(path26.join(repoDir, p));
20177
20135
  hash.update(`${bytes.length}:`);
20178
20136
  hash.update(bytes);
20179
20137
  } catch {
@@ -20208,8 +20166,8 @@ async function refTreeNormalizingRawDigest(repoDir, ref) {
20208
20166
  }
20209
20167
  }
20210
20168
  async function reconstructPostResetAnchor(repoDir, targetRef, entryWorktreeTree, entryIndexTree) {
20211
- const tmpIndex = path27.join(
20212
- os15.tmpdir(),
20169
+ const tmpIndex = path26.join(
20170
+ os14.tmpdir(),
20213
20171
  `cv-postreset-idx.${process.pid}.${crypto7.randomBytes(6).toString("hex")}`
20214
20172
  );
20215
20173
  try {
@@ -20245,12 +20203,12 @@ async function reconstructPostResetAnchor(repoDir, targetRef, entryWorktreeTree,
20245
20203
  });
20246
20204
  return void 0;
20247
20205
  } finally {
20248
- await fs22.rm(tmpIndex, { force: true }).catch(() => void 0);
20206
+ await fs21.rm(tmpIndex, { force: true }).catch(() => void 0);
20249
20207
  }
20250
20208
  }
20251
20209
  async function reconstructDirtyUncommittedPostPromoteTree(repoDir, integrationTree, prePromoteWorktreeTree, applySet) {
20252
- const tmpIndex = path27.join(
20253
- os15.tmpdir(),
20210
+ const tmpIndex = path26.join(
20211
+ os14.tmpdir(),
20254
20212
  `cv-du-post-idx.${process.pid}.${crypto7.randomBytes(6).toString("hex")}`
20255
20213
  );
20256
20214
  try {
@@ -20277,7 +20235,7 @@ async function reconstructDirtyUncommittedPostPromoteTree(repoDir, integrationTr
20277
20235
  });
20278
20236
  return void 0;
20279
20237
  } finally {
20280
- await fs22.rm(tmpIndex, { force: true }).catch(() => void 0);
20238
+ await fs21.rm(tmpIndex, { force: true }).catch(() => void 0);
20281
20239
  }
20282
20240
  }
20283
20241
  async function reconstructUntrackedCheckoutAnchor(repoDir, prePromoteUserRef, trackedStashSha) {
@@ -21307,31 +21265,31 @@ async function catBlobRaw(repoDir, oid) {
21307
21265
  return res.stdout;
21308
21266
  }
21309
21267
  async function hashObjectW(repoDir, bytes) {
21310
- const tmp = path27.join(os15.tmpdir(), `cp14-w3-blob-${crypto7.randomBytes(8).toString("hex")}`);
21311
- await fs22.writeFile(tmp, bytes);
21268
+ const tmp = path26.join(os14.tmpdir(), `cp14-w3-blob-${crypto7.randomBytes(8).toString("hex")}`);
21269
+ await fs21.writeFile(tmp, bytes);
21312
21270
  try {
21313
21271
  const r = await git(repoDir, ["hash-object", "-w", "--no-filters", "--", tmp], { hermetic: true });
21314
21272
  return r.stdout.trim();
21315
21273
  } finally {
21316
- await fs22.rm(tmp, { force: true });
21274
+ await fs21.rm(tmp, { force: true });
21317
21275
  }
21318
21276
  }
21319
21277
  async function diff3MergeBlobs(repoDir, oursOid, baseOid, theirsOid) {
21320
- const dir = await fs22.mkdtemp(path27.join(os15.tmpdir(), "cp14-w3-mf-"));
21278
+ const dir = await fs21.mkdtemp(path26.join(os14.tmpdir(), "cp14-w3-mf-"));
21321
21279
  try {
21322
- const oursF = path27.join(dir, "ours");
21323
- const baseF = path27.join(dir, "base");
21324
- const theirsF = path27.join(dir, "theirs");
21325
- await fs22.writeFile(oursF, await catBlobRaw(repoDir, oursOid));
21326
- await fs22.writeFile(baseF, baseOid ? await catBlobRaw(repoDir, baseOid) : Buffer.alloc(0));
21327
- await fs22.writeFile(theirsF, await catBlobRaw(repoDir, theirsOid));
21280
+ const oursF = path26.join(dir, "ours");
21281
+ const baseF = path26.join(dir, "base");
21282
+ const theirsF = path26.join(dir, "theirs");
21283
+ await fs21.writeFile(oursF, await catBlobRaw(repoDir, oursOid));
21284
+ await fs21.writeFile(baseF, baseOid ? await catBlobRaw(repoDir, baseOid) : Buffer.alloc(0));
21285
+ await fs21.writeFile(theirsF, await catBlobRaw(repoDir, theirsOid));
21328
21286
  const r = await git(repoDir, ["merge-file", "-p", "--diff3", oursF, baseF, theirsF], {
21329
21287
  allowFail: true,
21330
21288
  hermetic: true
21331
21289
  });
21332
21290
  return r.stdout;
21333
21291
  } finally {
21334
- await fs22.rm(dir, { recursive: true, force: true });
21292
+ await fs21.rm(dir, { recursive: true, force: true });
21335
21293
  }
21336
21294
  }
21337
21295
  async function extractThreeWayConflict(repoDir, oursCommit, theirsCommit, p) {
@@ -21398,7 +21356,7 @@ async function extractThreeWayConflict(repoDir, oursCommit, theirsCommit, p) {
21398
21356
  return { meta, conflictedBlob, multipleMergeBases };
21399
21357
  }
21400
21358
  async function assembleResolvedTree(repoDir, conflictedTree, resolved) {
21401
- const idx = path27.join(os15.tmpdir(), `cp14-w3-idx-${crypto7.randomBytes(8).toString("hex")}`);
21359
+ const idx = path26.join(os14.tmpdir(), `cp14-w3-idx-${crypto7.randomBytes(8).toString("hex")}`);
21402
21360
  const runIdx = async (args) => {
21403
21361
  const env = sanitizeGitEnv();
21404
21362
  env.GIT_INDEX_FILE = idx;
@@ -21417,7 +21375,7 @@ async function assembleResolvedTree(repoDir, conflictedTree, resolved) {
21417
21375
  }
21418
21376
  return await runIdx(["write-tree"]);
21419
21377
  } finally {
21420
- await fs22.rm(idx, { force: true });
21378
+ await fs21.rm(idx, { force: true });
21421
21379
  }
21422
21380
  }
21423
21381
  async function commitTreeOffBranch(repoDir, tree, parents, message, opts = {}) {
@@ -22589,8 +22547,8 @@ function stableStringify2(v) {
22589
22547
  const keys = Object.keys(obj).sort();
22590
22548
  return `{${keys.map((k) => `${JSON.stringify(k)}:${stableStringify2(obj[k])}`).join(",")}}`;
22591
22549
  }
22592
- function lockfileCanonicalEntries(path55, content) {
22593
- const base = path55.replace(/\\/g, "/").toLowerCase();
22550
+ function lockfileCanonicalEntries(path54, content) {
22551
+ const base = path54.replace(/\\/g, "/").toLowerCase();
22594
22552
  const name = base.slice(base.lastIndexOf("/") + 1);
22595
22553
  try {
22596
22554
  if (name === "cargo.lock") {
@@ -22891,18 +22849,18 @@ function globToRegExp(glob) {
22891
22849
  }
22892
22850
  return new RegExp("^" + re + "$");
22893
22851
  }
22894
- function normalizePath(path55) {
22895
- let p = path55.replace(/\\/g, "/");
22852
+ function normalizePath(path54) {
22853
+ let p = path54.replace(/\\/g, "/");
22896
22854
  if (p.startsWith("./")) p = p.slice(2);
22897
22855
  return p;
22898
22856
  }
22899
- function basenameLower(path55) {
22900
- const p = normalizePath(path55);
22857
+ function basenameLower(path54) {
22858
+ const p = normalizePath(path54);
22901
22859
  const slash = p.lastIndexOf("/");
22902
22860
  return (slash >= 0 ? p.slice(slash + 1) : p).toLowerCase();
22903
22861
  }
22904
- function pathMatchesGlob(path55, glob) {
22905
- const p = normalizePath(path55);
22862
+ function pathMatchesGlob(path54, glob) {
22863
+ const p = normalizePath(path54);
22906
22864
  const g = glob.replace(/\\/g, "/");
22907
22865
  if (!g.includes("/")) {
22908
22866
  const base = p.slice(p.lastIndexOf("/") + 1);
@@ -22910,8 +22868,8 @@ function pathMatchesGlob(path55, glob) {
22910
22868
  }
22911
22869
  return globToRegExp(g).test(p);
22912
22870
  }
22913
- function detectSharedContract(path55, opts = {}) {
22914
- const base = basenameLower(path55);
22871
+ function detectSharedContract(path54, opts = {}) {
22872
+ const base = basenameLower(path54);
22915
22873
  for (const [ext, category] of HARD_GATE_EXTENSIONS) {
22916
22874
  if (base.endsWith(ext)) {
22917
22875
  return {
@@ -22933,7 +22891,7 @@ function detectSharedContract(path55, opts = {}) {
22933
22891
  }
22934
22892
  }
22935
22893
  for (const glob of opts.alwaysGateGlobs ?? []) {
22936
- if (glob.length > 0 && pathMatchesGlob(path55, glob)) {
22894
+ if (glob.length > 0 && pathMatchesGlob(path54, glob)) {
22937
22895
  return {
22938
22896
  category: "always_gate_glob",
22939
22897
  hardGate: true,
@@ -22943,7 +22901,7 @@ function detectSharedContract(path55, opts = {}) {
22943
22901
  }
22944
22902
  }
22945
22903
  for (const pattern of opts.plannerSharedContracts ?? []) {
22946
- if (pattern.length > 0 && pathMatchesGlob(path55, pattern)) {
22904
+ if (pattern.length > 0 && pathMatchesGlob(path54, pattern)) {
22947
22905
  return {
22948
22906
  category: "planner",
22949
22907
  hardGate: true,
@@ -24206,7 +24164,7 @@ async function runTier1OnIntegrationWorktree(repoDir, integrationTip, tracks, co
24206
24164
  });
24207
24165
  return { status: "attribute_halt", attributePaths: treeDanger };
24208
24166
  }
24209
- const wtDir = await fs23.mkdtemp(path28.join(os16.tmpdir(), "cv-tier1-"));
24167
+ const wtDir = await fs22.mkdtemp(path27.join(os15.tmpdir(), "cv-tier1-"));
24210
24168
  let worktreeAdded = false;
24211
24169
  try {
24212
24170
  const add = await pinnedGit(
@@ -24253,11 +24211,11 @@ async function runTier1OnIntegrationWorktree(repoDir, integrationTip, tracks, co
24253
24211
  trackIndex: -1,
24254
24212
  // a union run — not a single track.
24255
24213
  runShell: runShellCommand,
24256
- lstat: fs23.lstat,
24257
- realpath: fs23.realpath,
24258
- stat: fs23.stat,
24259
- readdir: (p) => fs23.readdir(p, { withFileTypes: true }),
24260
- readFile: (p) => fs23.readFile(p, "utf8"),
24214
+ lstat: fs22.lstat,
24215
+ realpath: fs22.realpath,
24216
+ stat: fs22.stat,
24217
+ readdir: (p) => fs22.readdir(p, { withFileTypes: true }),
24218
+ readFile: (p) => fs22.readFile(p, "utf8"),
24261
24219
  timeoutMs
24262
24220
  });
24263
24221
  if (declared.outcome === "fail") {
@@ -24273,7 +24231,7 @@ async function runTier1OnIntegrationWorktree(repoDir, integrationTip, tracks, co
24273
24231
  if (worktreeAdded) {
24274
24232
  await pinnedGit(repoDir, ["worktree", "remove", "--force", wtDir], { allowFail: true });
24275
24233
  }
24276
- await fs23.rm(wtDir, { recursive: true, force: true }).catch(() => void 0);
24234
+ await fs22.rm(wtDir, { recursive: true, force: true }).catch(() => void 0);
24277
24235
  if (worktreeAdded) {
24278
24236
  await pinnedGit(repoDir, ["worktree", "prune"], { allowFail: true });
24279
24237
  }
@@ -24573,10 +24531,10 @@ async function detectGraftsHalt(repoDir, integrationTip) {
24573
24531
  if (gp.code !== 0) return null;
24574
24532
  const graftsPath = gp.stdout.trim();
24575
24533
  if (graftsPath.length === 0) return null;
24576
- const resolved = path28.isAbsolute(graftsPath) ? graftsPath : path28.join(repoDir, graftsPath);
24534
+ const resolved = path27.isAbsolute(graftsPath) ? graftsPath : path27.join(repoDir, graftsPath);
24577
24535
  let content;
24578
24536
  try {
24579
- content = await fs23.readFile(resolved, "utf8");
24537
+ content = await fs22.readFile(resolved, "utf8");
24580
24538
  } catch (err) {
24581
24539
  if (err?.code === "ENOENT") return null;
24582
24540
  return { status: "grafts_halt", graftsPath: resolved, integrationTip };
@@ -24594,7 +24552,7 @@ async function detectShallowHalt(repoDir, integrationTip) {
24594
24552
  });
24595
24553
  const gp = await pinnedGit(repoDir, ["rev-parse", "--git-path", "shallow"], { allowFail: true });
24596
24554
  const shallowPathRaw = gp.code === 0 ? gp.stdout.trim() : "";
24597
- const resolved = shallowPathRaw.length === 0 ? `${repoDir}/.git/shallow` : path28.isAbsolute(shallowPathRaw) ? shallowPathRaw : path28.join(repoDir, shallowPathRaw);
24555
+ const resolved = shallowPathRaw.length === 0 ? `${repoDir}/.git/shallow` : path27.isAbsolute(shallowPathRaw) ? shallowPathRaw : path27.join(repoDir, shallowPathRaw);
24598
24556
  if (isShallow.code === 0 && isShallow.stdout.trim() === "true") {
24599
24557
  return { status: "shallow_halt", shallowPath: resolved, integrationTip };
24600
24558
  }
@@ -24603,7 +24561,7 @@ async function detectShallowHalt(repoDir, integrationTip) {
24603
24561
  }
24604
24562
  let present;
24605
24563
  try {
24606
- await fs23.access(resolved);
24564
+ await fs22.access(resolved);
24607
24565
  present = true;
24608
24566
  } catch (err) {
24609
24567
  if (err?.code === "ENOENT") return null;
@@ -25221,9 +25179,9 @@ async function reconstructResolutionSetEntry(repoDir, commit, setHash, repoId, m
25221
25179
  // src/local-executor/conflict-resolution-durable-store.ts
25222
25180
  var import_node_crypto7 = require("node:crypto");
25223
25181
  var import_node_fs10 = require("node:fs");
25224
- var fs24 = __toESM(require("node:fs/promises"));
25225
- var os17 = __toESM(require("node:os"));
25226
- var path29 = __toESM(require("node:path"));
25182
+ var fs23 = __toESM(require("node:fs/promises"));
25183
+ var os16 = __toESM(require("node:os"));
25184
+ var path28 = __toESM(require("node:path"));
25227
25185
  var DIR_MODE = 448;
25228
25186
  var FILE_MODE = 384;
25229
25187
  var RECORDS_FILE = "records.json";
@@ -25231,30 +25189,30 @@ var AGENTIC_RECORDS_FILE = "agentic-records.json";
25231
25189
  var PENDING_FILE = "pending-attempts.json";
25232
25190
  var INDEX_FILE = "resolution-sets.json";
25233
25191
  function defaultRoot() {
25234
- return path29.join(os17.homedir(), ".codevibe", "conflict-resolutions");
25192
+ return path28.join(os16.homedir(), ".codevibe", "conflict-resolutions");
25235
25193
  }
25236
25194
  var SafeGroupDir = class {
25237
25195
  constructor(rootDir, taskGroupId) {
25238
25196
  this.rootDir = rootDir;
25239
25197
  this.taskGroupId = taskGroupId;
25240
- if (typeof taskGroupId !== "string" || taskGroupId.length === 0 || taskGroupId === "." || taskGroupId === ".." || taskGroupId.includes("/") || taskGroupId.includes("\\") || taskGroupId.includes("\0") || path29.isAbsolute(taskGroupId)) {
25198
+ if (typeof taskGroupId !== "string" || taskGroupId.length === 0 || taskGroupId === "." || taskGroupId === ".." || taskGroupId.includes("/") || taskGroupId.includes("\\") || taskGroupId.includes("\0") || path28.isAbsolute(taskGroupId)) {
25241
25199
  throw new Error("ConflictResolutionDurableStore: taskGroupId is not a safe path segment");
25242
25200
  }
25243
25201
  }
25244
25202
  dir() {
25245
- return path29.join(this.rootDir, this.taskGroupId);
25203
+ return path28.join(this.rootDir, this.taskGroupId);
25246
25204
  }
25247
25205
  async assertNoSymlinkComponents(target) {
25248
- const rel = path29.relative(this.rootDir, target);
25249
- if (rel.startsWith("..") || path29.isAbsolute(rel)) {
25206
+ const rel = path28.relative(this.rootDir, target);
25207
+ if (rel.startsWith("..") || path28.isAbsolute(rel)) {
25250
25208
  throw new Error("ConflictResolutionDurableStore: refusing a path outside the store root");
25251
25209
  }
25252
- const segments = rel.length === 0 ? [] : rel.split(path29.sep);
25210
+ const segments = rel.length === 0 ? [] : rel.split(path28.sep);
25253
25211
  let cur = this.rootDir;
25254
25212
  for (let i = -1; i < segments.length; i++) {
25255
- if (i >= 0) cur = path29.join(cur, segments[i]);
25213
+ if (i >= 0) cur = path28.join(cur, segments[i]);
25256
25214
  try {
25257
- const st = await fs24.lstat(cur);
25215
+ const st = await fs23.lstat(cur);
25258
25216
  if (st.isSymbolicLink()) {
25259
25217
  throw new Error("ConflictResolutionDurableStore: refusing a symlinked path component");
25260
25218
  }
@@ -25265,10 +25223,10 @@ var SafeGroupDir = class {
25265
25223
  }
25266
25224
  }
25267
25225
  async readJson(file) {
25268
- const p = path29.join(this.dir(), file);
25226
+ const p = path28.join(this.dir(), file);
25269
25227
  await this.assertNoSymlinkComponents(p);
25270
25228
  try {
25271
- const raw = await fs24.readFile(p, "utf8");
25229
+ const raw = await fs23.readFile(p, "utf8");
25272
25230
  return JSON.parse(raw);
25273
25231
  } catch (err) {
25274
25232
  if (err.code === "ENOENT") return null;
@@ -25277,24 +25235,24 @@ var SafeGroupDir = class {
25277
25235
  }
25278
25236
  async writeJsonAtomic(file, value) {
25279
25237
  const dir = this.dir();
25280
- const p = path29.join(dir, file);
25238
+ const p = path28.join(dir, file);
25281
25239
  await this.assertNoSymlinkComponents(p);
25282
- await fs24.mkdir(dir, { recursive: true, mode: DIR_MODE });
25240
+ await fs23.mkdir(dir, { recursive: true, mode: DIR_MODE });
25283
25241
  const data = JSON.stringify(value);
25284
25242
  const tmp = `${p}.tmp.${process.pid}.${(0, import_node_crypto7.randomBytes)(6).toString("hex")}`;
25285
25243
  let fh;
25286
25244
  try {
25287
- fh = await fs24.open(tmp, import_node_fs10.constants.O_WRONLY | import_node_fs10.constants.O_CREAT | import_node_fs10.constants.O_EXCL, FILE_MODE);
25245
+ fh = await fs23.open(tmp, import_node_fs10.constants.O_WRONLY | import_node_fs10.constants.O_CREAT | import_node_fs10.constants.O_EXCL, FILE_MODE);
25288
25246
  await fh.writeFile(data, "utf8");
25289
25247
  await fh.sync();
25290
25248
  } finally {
25291
25249
  await fh?.close().catch(() => void 0);
25292
25250
  }
25293
- await fs24.chmod(tmp, FILE_MODE).catch(() => void 0);
25294
- await fs24.rename(tmp, p);
25251
+ await fs23.chmod(tmp, FILE_MODE).catch(() => void 0);
25252
+ await fs23.rename(tmp, p);
25295
25253
  let dirFh;
25296
25254
  try {
25297
- dirFh = await fs24.open(dir, import_node_fs10.constants.O_RDONLY);
25255
+ dirFh = await fs23.open(dir, import_node_fs10.constants.O_RDONLY);
25298
25256
  await dirFh.sync();
25299
25257
  } catch {
25300
25258
  } finally {
@@ -25474,17 +25432,17 @@ var DurableResolutionSetIndex = class {
25474
25432
 
25475
25433
  // src/local-executor/merge-journal-store.ts
25476
25434
  var crypto9 = __toESM(require("node:crypto"));
25477
- var fs25 = __toESM(require("node:fs/promises"));
25435
+ var fs24 = __toESM(require("node:fs/promises"));
25478
25436
  var import_node_fs11 = require("node:fs");
25479
- var os18 = __toESM(require("node:os"));
25480
- var path30 = __toESM(require("node:path"));
25437
+ var os17 = __toESM(require("node:os"));
25438
+ var path29 = __toESM(require("node:path"));
25481
25439
  init_logger2();
25482
25440
  var DIR_MODE2 = 448;
25483
25441
  var FILE_MODE2 = 384;
25484
25442
  var MERGE_JOURNAL_VERSION = 1;
25485
25443
  var MERGE_JOURNAL_FILE = "merge.json";
25486
25444
  function defaultRoot2() {
25487
- return path30.join(os18.homedir(), ".codevibe", "merge-journal");
25445
+ return path29.join(os17.homedir(), ".codevibe", "merge-journal");
25488
25446
  }
25489
25447
  function computeMergeKey(args) {
25490
25448
  const canonical = [
@@ -25502,20 +25460,20 @@ var MergeJournalStore = class {
25502
25460
  }
25503
25461
  /** The per-`(group, repo)` directory `<root>/<taskGroupId>/<repoId>/`. */
25504
25462
  repoDir(taskGroupId, repoId) {
25505
- return path30.join(this.rootDir, this.safeSegment(taskGroupId), this.safeSegment(repoId));
25463
+ return path29.join(this.rootDir, this.safeSegment(taskGroupId), this.safeSegment(repoId));
25506
25464
  }
25507
25465
  /**
25508
25466
  * Validate `seg` is a safe SINGLE path segment so a malicious id can't escape
25509
25467
  * `<root>/` (defense-in-depth, mirrors #589-G / W1 `PromoteWalStore.safeSegment`).
25510
25468
  */
25511
25469
  safeSegment(seg) {
25512
- if (typeof seg !== "string" || seg.length === 0 || seg === "." || seg === ".." || seg.includes("/") || seg.includes("\\") || seg.includes("\0") || path30.isAbsolute(seg)) {
25470
+ if (typeof seg !== "string" || seg.length === 0 || seg === "." || seg === ".." || seg.includes("/") || seg.includes("\\") || seg.includes("\0") || path29.isAbsolute(seg)) {
25513
25471
  throw new Error("MergeJournalStore: id is not a safe path segment");
25514
25472
  }
25515
25473
  return seg;
25516
25474
  }
25517
25475
  async mkdirSecure(dir) {
25518
- await fs25.mkdir(dir, { recursive: true, mode: DIR_MODE2 });
25476
+ await fs24.mkdir(dir, { recursive: true, mode: DIR_MODE2 });
25519
25477
  }
25520
25478
  /**
25521
25479
  * Refuse to operate under a path whose any in-`rootDir` component is a symlink
@@ -25523,17 +25481,17 @@ var MergeJournalStore = class {
25523
25481
  * down; a symlinked component throws. Missing components are fine.
25524
25482
  */
25525
25483
  async assertNoSymlinkComponents(target) {
25526
- const rel = path30.relative(this.rootDir, target);
25527
- if (rel.startsWith("..") || path30.isAbsolute(rel)) {
25484
+ const rel = path29.relative(this.rootDir, target);
25485
+ if (rel.startsWith("..") || path29.isAbsolute(rel)) {
25528
25486
  throw new Error("MergeJournalStore: refusing a path outside the store root");
25529
25487
  }
25530
- const segments = rel.length === 0 ? [] : rel.split(path30.sep);
25488
+ const segments = rel.length === 0 ? [] : rel.split(path29.sep);
25531
25489
  let cur = this.rootDir;
25532
25490
  for (let i = -1; i < segments.length; i++) {
25533
- if (i >= 0) cur = path30.join(cur, segments[i]);
25491
+ if (i >= 0) cur = path29.join(cur, segments[i]);
25534
25492
  let st;
25535
25493
  try {
25536
- st = await fs25.lstat(cur);
25494
+ st = await fs24.lstat(cur);
25537
25495
  } catch (err) {
25538
25496
  if (err.code === "ENOENT") return;
25539
25497
  throw err;
@@ -25545,13 +25503,13 @@ var MergeJournalStore = class {
25545
25503
  }
25546
25504
  /** Atomic write: `<final>.tmp.<pid>.<rand>` (0600) → fsync → rename → fsync(dir). */
25547
25505
  async atomicWrite(finalPath, data) {
25548
- const dir = path30.dirname(finalPath);
25506
+ const dir = path29.dirname(finalPath);
25549
25507
  await this.assertNoSymlinkComponents(finalPath);
25550
25508
  await this.mkdirSecure(dir);
25551
25509
  const tmp = `${finalPath}.tmp.${process.pid}.${crypto9.randomBytes(6).toString("hex")}`;
25552
25510
  let fh;
25553
25511
  try {
25554
- fh = await fs25.open(
25512
+ fh = await fs24.open(
25555
25513
  tmp,
25556
25514
  import_node_fs11.constants.O_WRONLY | import_node_fs11.constants.O_CREAT | import_node_fs11.constants.O_EXCL,
25557
25515
  FILE_MODE2
@@ -25561,11 +25519,11 @@ var MergeJournalStore = class {
25561
25519
  } finally {
25562
25520
  await fh?.close().catch(() => void 0);
25563
25521
  }
25564
- await fs25.chmod(tmp, FILE_MODE2).catch(() => void 0);
25565
- await fs25.rename(tmp, finalPath);
25522
+ await fs24.chmod(tmp, FILE_MODE2).catch(() => void 0);
25523
+ await fs24.rename(tmp, finalPath);
25566
25524
  let dirFh;
25567
25525
  try {
25568
- dirFh = await fs25.open(dir, import_node_fs11.constants.O_RDONLY);
25526
+ dirFh = await fs24.open(dir, import_node_fs11.constants.O_RDONLY);
25569
25527
  await dirFh.sync();
25570
25528
  } catch {
25571
25529
  } finally {
@@ -25575,7 +25533,7 @@ var MergeJournalStore = class {
25575
25533
  async readJson(p) {
25576
25534
  await this.assertNoSymlinkComponents(p);
25577
25535
  try {
25578
- const raw = await fs25.readFile(p, "utf8");
25536
+ const raw = await fs24.readFile(p, "utf8");
25579
25537
  return JSON.parse(raw);
25580
25538
  } catch (err) {
25581
25539
  if (err.code === "ENOENT") return null;
@@ -25885,7 +25843,7 @@ var MergeJournalStore = class {
25885
25843
  /** Read the journal record for `(group, repo)`, or `null` if none. */
25886
25844
  async readRecord(taskGroupId, repoId) {
25887
25845
  const rec = await this.readJson(
25888
- path30.join(this.repoDir(taskGroupId, repoId), MERGE_JOURNAL_FILE)
25846
+ path29.join(this.repoDir(taskGroupId, repoId), MERGE_JOURNAL_FILE)
25889
25847
  );
25890
25848
  if (rec && !Array.isArray(rec.steps)) rec.steps = [];
25891
25849
  return rec;
@@ -25898,13 +25856,13 @@ var MergeJournalStore = class {
25898
25856
  }
25899
25857
  async writeRecord(taskGroupId, repoId, record) {
25900
25858
  await this.atomicWrite(
25901
- path30.join(this.repoDir(taskGroupId, repoId), MERGE_JOURNAL_FILE),
25859
+ path29.join(this.repoDir(taskGroupId, repoId), MERGE_JOURNAL_FILE),
25902
25860
  JSON.stringify(record, null, 2)
25903
25861
  );
25904
25862
  }
25905
25863
  /** Delete the journal record for `(group, repo)` (terminal cleanup / GC). */
25906
25864
  async deleteRecord(taskGroupId, repoId) {
25907
- await fs25.rm(this.repoDir(taskGroupId, repoId), { recursive: true, force: true }).catch(() => void 0);
25865
+ await fs24.rm(this.repoDir(taskGroupId, repoId), { recursive: true, force: true }).catch(() => void 0);
25908
25866
  }
25909
25867
  };
25910
25868
  function arraysEqual(a, b) {
@@ -25927,17 +25885,17 @@ function tracksEqual(a, b) {
25927
25885
 
25928
25886
  // src/local-executor/promote-wal-store.ts
25929
25887
  var crypto10 = __toESM(require("node:crypto"));
25930
- var fs26 = __toESM(require("node:fs/promises"));
25888
+ var fs25 = __toESM(require("node:fs/promises"));
25931
25889
  var import_node_fs12 = require("node:fs");
25932
- var os19 = __toESM(require("node:os"));
25933
- var path31 = __toESM(require("node:path"));
25890
+ var os18 = __toESM(require("node:os"));
25891
+ var path30 = __toESM(require("node:path"));
25934
25892
  init_logger2();
25935
25893
  var DIR_MODE3 = 448;
25936
25894
  var FILE_MODE3 = 384;
25937
25895
  var PROMOTE_WAL_VERSION = 1;
25938
25896
  var PROMOTE_WAL_FILE = "promote.json";
25939
25897
  function defaultRoot3() {
25940
- return path31.join(os19.homedir(), ".codevibe", "promote-wal");
25898
+ return path30.join(os18.homedir(), ".codevibe", "promote-wal");
25941
25899
  }
25942
25900
  function computePromoteKey(args) {
25943
25901
  const canonical = [
@@ -25956,20 +25914,20 @@ var PromoteWalStore = class {
25956
25914
  }
25957
25915
  /** The per-`(group, repo)` directory `<root>/<taskGroupId>/<repoId>/`. */
25958
25916
  repoDir(taskGroupId, repoId) {
25959
- return path31.join(this.rootDir, this.safeSegment(taskGroupId), this.safeSegment(repoId));
25917
+ return path30.join(this.rootDir, this.safeSegment(taskGroupId), this.safeSegment(repoId));
25960
25918
  }
25961
25919
  /**
25962
25920
  * Validate `seg` is a safe SINGLE path segment so a malicious id can't escape
25963
25921
  * `<root>/` (defense-in-depth, mirrors #589-G `RevertManifestStore.safeSegment`).
25964
25922
  */
25965
25923
  safeSegment(seg) {
25966
- if (typeof seg !== "string" || seg.length === 0 || seg === "." || seg === ".." || seg.includes("/") || seg.includes("\\") || seg.includes("\0") || path31.isAbsolute(seg)) {
25924
+ if (typeof seg !== "string" || seg.length === 0 || seg === "." || seg === ".." || seg.includes("/") || seg.includes("\\") || seg.includes("\0") || path30.isAbsolute(seg)) {
25967
25925
  throw new Error("PromoteWalStore: id is not a safe path segment");
25968
25926
  }
25969
25927
  return seg;
25970
25928
  }
25971
25929
  async mkdirSecure(dir) {
25972
- await fs26.mkdir(dir, { recursive: true, mode: DIR_MODE3 });
25930
+ await fs25.mkdir(dir, { recursive: true, mode: DIR_MODE3 });
25973
25931
  }
25974
25932
  /**
25975
25933
  * Refuse to operate under a path whose any in-`rootDir` component is a symlink
@@ -25977,17 +25935,17 @@ var PromoteWalStore = class {
25977
25935
  * down; a symlinked component throws. Missing components are fine.
25978
25936
  */
25979
25937
  async assertNoSymlinkComponents(target) {
25980
- const rel = path31.relative(this.rootDir, target);
25981
- if (rel.startsWith("..") || path31.isAbsolute(rel)) {
25938
+ const rel = path30.relative(this.rootDir, target);
25939
+ if (rel.startsWith("..") || path30.isAbsolute(rel)) {
25982
25940
  throw new Error("PromoteWalStore: refusing a path outside the store root");
25983
25941
  }
25984
- const segments = rel.length === 0 ? [] : rel.split(path31.sep);
25942
+ const segments = rel.length === 0 ? [] : rel.split(path30.sep);
25985
25943
  let cur = this.rootDir;
25986
25944
  for (let i = -1; i < segments.length; i++) {
25987
- if (i >= 0) cur = path31.join(cur, segments[i]);
25945
+ if (i >= 0) cur = path30.join(cur, segments[i]);
25988
25946
  let st;
25989
25947
  try {
25990
- st = await fs26.lstat(cur);
25948
+ st = await fs25.lstat(cur);
25991
25949
  } catch (err) {
25992
25950
  if (err.code === "ENOENT") return;
25993
25951
  throw err;
@@ -25999,13 +25957,13 @@ var PromoteWalStore = class {
25999
25957
  }
26000
25958
  /** Atomic write: `<final>.tmp.<pid>.<rand>` (0600) → fsync → rename → fsync(dir). */
26001
25959
  async atomicWrite(finalPath, data) {
26002
- const dir = path31.dirname(finalPath);
25960
+ const dir = path30.dirname(finalPath);
26003
25961
  await this.assertNoSymlinkComponents(finalPath);
26004
25962
  await this.mkdirSecure(dir);
26005
25963
  const tmp = `${finalPath}.tmp.${process.pid}.${crypto10.randomBytes(6).toString("hex")}`;
26006
25964
  let fh;
26007
25965
  try {
26008
- fh = await fs26.open(
25966
+ fh = await fs25.open(
26009
25967
  tmp,
26010
25968
  import_node_fs12.constants.O_WRONLY | import_node_fs12.constants.O_CREAT | import_node_fs12.constants.O_EXCL,
26011
25969
  FILE_MODE3
@@ -26015,11 +25973,11 @@ var PromoteWalStore = class {
26015
25973
  } finally {
26016
25974
  await fh?.close().catch(() => void 0);
26017
25975
  }
26018
- await fs26.chmod(tmp, FILE_MODE3).catch(() => void 0);
26019
- await fs26.rename(tmp, finalPath);
25976
+ await fs25.chmod(tmp, FILE_MODE3).catch(() => void 0);
25977
+ await fs25.rename(tmp, finalPath);
26020
25978
  let dirFh;
26021
25979
  try {
26022
- dirFh = await fs26.open(dir, import_node_fs12.constants.O_RDONLY);
25980
+ dirFh = await fs25.open(dir, import_node_fs12.constants.O_RDONLY);
26023
25981
  await dirFh.sync();
26024
25982
  } catch {
26025
25983
  } finally {
@@ -26029,7 +25987,7 @@ var PromoteWalStore = class {
26029
25987
  async readJson(p) {
26030
25988
  await this.assertNoSymlinkComponents(p);
26031
25989
  try {
26032
- const raw = await fs26.readFile(p, "utf8");
25990
+ const raw = await fs25.readFile(p, "utf8");
26033
25991
  return JSON.parse(raw);
26034
25992
  } catch (err) {
26035
25993
  if (err.code === "ENOENT") return null;
@@ -26213,18 +26171,18 @@ var PromoteWalStore = class {
26213
26171
  /** Read the WAL record for `(group, repo)`, or `null` if none. */
26214
26172
  async readRecord(taskGroupId, repoId) {
26215
26173
  return this.readJson(
26216
- path31.join(this.repoDir(taskGroupId, repoId), PROMOTE_WAL_FILE)
26174
+ path30.join(this.repoDir(taskGroupId, repoId), PROMOTE_WAL_FILE)
26217
26175
  );
26218
26176
  }
26219
26177
  async writeRecord(taskGroupId, repoId, record) {
26220
26178
  await this.atomicWrite(
26221
- path31.join(this.repoDir(taskGroupId, repoId), PROMOTE_WAL_FILE),
26179
+ path30.join(this.repoDir(taskGroupId, repoId), PROMOTE_WAL_FILE),
26222
26180
  JSON.stringify(record, null, 2)
26223
26181
  );
26224
26182
  }
26225
26183
  /** Delete the WAL record for `(group, repo)` (terminal cleanup / GC). */
26226
26184
  async deleteRecord(taskGroupId, repoId) {
26227
- await fs26.rm(this.repoDir(taskGroupId, repoId), { recursive: true, force: true }).catch(() => void 0);
26185
+ await fs25.rm(this.repoDir(taskGroupId, repoId), { recursive: true, force: true }).catch(() => void 0);
26228
26186
  }
26229
26187
  /**
26230
26188
  * List every `(group, repo)` that has a started-but-not-committed WAL record —
@@ -26235,7 +26193,7 @@ var PromoteWalStore = class {
26235
26193
  const out = [];
26236
26194
  let groups;
26237
26195
  try {
26238
- groups = (await fs26.readdir(this.rootDir, { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name);
26196
+ groups = (await fs25.readdir(this.rootDir, { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name);
26239
26197
  } catch (err) {
26240
26198
  if (err.code === "ENOENT") return out;
26241
26199
  throw err;
@@ -26243,7 +26201,7 @@ var PromoteWalStore = class {
26243
26201
  for (const gid of groups) {
26244
26202
  let repos;
26245
26203
  try {
26246
- repos = (await fs26.readdir(path31.join(this.rootDir, gid), { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name);
26204
+ repos = (await fs25.readdir(path30.join(this.rootDir, gid), { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name);
26247
26205
  } catch {
26248
26206
  continue;
26249
26207
  }
@@ -27477,7 +27435,7 @@ var LocalExecutorImpl = class {
27477
27435
  return null;
27478
27436
  }
27479
27437
  const taskGroupId = payload.task_group_id;
27480
- if (typeof taskGroupId !== "string" || taskGroupId.length === 0 || taskGroupId === "." || taskGroupId === ".." || taskGroupId.includes("/") || taskGroupId.includes("\\") || taskGroupId.includes("\0") || path32.isAbsolute(taskGroupId)) {
27438
+ if (typeof taskGroupId !== "string" || taskGroupId.length === 0 || taskGroupId === "." || taskGroupId === ".." || taskGroupId.includes("/") || taskGroupId.includes("\\") || taskGroupId.includes("\0") || path31.isAbsolute(taskGroupId)) {
27481
27439
  this.logger.warn(
27482
27440
  "[LocalExecutorImpl] TrackAssigned rejected \u2014 task_group_id is not a safe single path segment",
27483
27441
  { taskGroupId, trackIndex: payload.track_index }
@@ -27493,10 +27451,10 @@ var LocalExecutorImpl = class {
27493
27451
  return null;
27494
27452
  }
27495
27453
  const repoRootCanonical = await import_node_fs13.promises.realpath(repoRoot);
27496
- const stateRoot = path32.join(repoRootCanonical, ".codevibe", "state");
27454
+ const stateRoot = path31.join(repoRootCanonical, ".codevibe", "state");
27497
27455
  await import_node_fs13.promises.mkdir(stateRoot, { recursive: true });
27498
27456
  const stateRootReal = await import_node_fs13.promises.realpath(stateRoot);
27499
- const groupDir = path32.join(stateRootReal, taskGroupId);
27457
+ const groupDir = path31.join(stateRootReal, taskGroupId);
27500
27458
  await import_node_fs13.promises.mkdir(groupDir, { recursive: true });
27501
27459
  const groupLstat = await import_node_fs13.promises.lstat(groupDir);
27502
27460
  if (groupLstat.isSymbolicLink()) {
@@ -27507,31 +27465,31 @@ var LocalExecutorImpl = class {
27507
27465
  return null;
27508
27466
  }
27509
27467
  const groupReal = await import_node_fs13.promises.realpath(groupDir);
27510
- const groupRel = path32.relative(stateRootReal, groupReal);
27511
- if (groupRel === "" || groupRel === ".." || groupRel.startsWith(".." + path32.sep) || path32.isAbsolute(groupRel)) {
27468
+ const groupRel = path31.relative(stateRootReal, groupReal);
27469
+ if (groupRel === "" || groupRel === ".." || groupRel.startsWith(".." + path31.sep) || path31.isAbsolute(groupRel)) {
27512
27470
  this.logger.warn(
27513
27471
  "[LocalExecutorImpl] TrackAssigned rejected \u2014 task_group_id group dir escapes the trusted state root",
27514
27472
  { taskGroupId, trackIndex, stateRootReal, groupReal }
27515
27473
  );
27516
27474
  return null;
27517
27475
  }
27518
- const derived = path32.join(groupReal, String(trackIndex));
27476
+ const derived = path31.join(groupReal, String(trackIndex));
27519
27477
  await import_node_fs13.promises.mkdir(derived, { recursive: true });
27520
27478
  const derivedReal = await import_node_fs13.promises.realpath(derived);
27521
- const rel = path32.relative(stateRootReal, derivedReal);
27522
- if (rel === "" || rel === ".." || rel.startsWith(".." + path32.sep) || path32.isAbsolute(rel)) {
27479
+ const rel = path31.relative(stateRootReal, derivedReal);
27480
+ if (rel === "" || rel === ".." || rel.startsWith(".." + path31.sep) || path31.isAbsolute(rel)) {
27523
27481
  this.logger.warn(
27524
27482
  "[LocalExecutorImpl] TrackAssigned rejected \u2014 derived state dir escapes the trusted state root",
27525
27483
  { taskGroupId, trackIndex, stateRootReal, derived: derivedReal }
27526
27484
  );
27527
27485
  return null;
27528
27486
  }
27529
- const suppliedAnchored = path32.isAbsolute(payload.state_dir) ? payload.state_dir : path32.join(repoRootCanonical, payload.state_dir);
27487
+ const suppliedAnchored = path31.isAbsolute(payload.state_dir) ? payload.state_dir : path31.join(repoRootCanonical, payload.state_dir);
27530
27488
  let suppliedCanonical;
27531
27489
  try {
27532
27490
  suppliedCanonical = await import_node_fs13.promises.realpath(suppliedAnchored);
27533
27491
  } catch {
27534
- suppliedCanonical = path32.resolve(suppliedAnchored);
27492
+ suppliedCanonical = path31.resolve(suppliedAnchored);
27535
27493
  }
27536
27494
  if (suppliedCanonical !== derivedReal) {
27537
27495
  this.logger.warn(
@@ -27556,7 +27514,7 @@ var LocalExecutorImpl = class {
27556
27514
  */
27557
27515
  scopeFromOwnership(payload, stateDir) {
27558
27516
  const repoRoot = this.teamDeps.repoRoot;
27559
- const toAbs = (p) => path32.isAbsolute(p) ? p : repoRoot ? path32.join(repoRoot, p) : p;
27517
+ const toAbs = (p) => path31.isAbsolute(p) ? p : repoRoot ? path31.join(repoRoot, p) : p;
27560
27518
  const writeScopes = [
27561
27519
  ...payload.ownership_scope.write_paths.map(toAbs),
27562
27520
  ...payload.ownership_scope.auto_modified_files.map(toAbs),
@@ -28048,16 +28006,16 @@ var Cp7AuditWriter = class {
28048
28006
  };
28049
28007
 
28050
28008
  // src/local-executor/verification-gates/deploy-preflight.ts
28051
- var path33 = __toESM(require("node:path"));
28052
- var DEPLOY_PREFLIGHT_SCRIPT = path33.join("scripts", "deploy-preflight.sh");
28009
+ var path32 = __toESM(require("node:path"));
28010
+ var DEPLOY_PREFLIGHT_SCRIPT = path32.join("scripts", "deploy-preflight.sh");
28053
28011
 
28054
28012
  // src/local-executor/verification-gates/hostile-grep.ts
28055
- var path34 = __toESM(require("node:path"));
28056
- var HOSTILE_GREP_SCRIPT = path34.join("scripts", "hostile-grep.sh");
28013
+ var path33 = __toESM(require("node:path"));
28014
+ var HOSTILE_GREP_SCRIPT = path33.join("scripts", "hostile-grep.sh");
28057
28015
 
28058
28016
  // src/local-executor/verification-gates/source-traceability.ts
28059
- var path35 = __toESM(require("node:path"));
28060
- var SOURCE_TRACE_SCRIPT = path35.join("scripts", "source-traceability.sh");
28017
+ var path34 = __toESM(require("node:path"));
28018
+ var SOURCE_TRACE_SCRIPT = path34.join("scripts", "source-traceability.sh");
28061
28019
 
28062
28020
  // src/local-executor/verification-runner.ts
28063
28021
  var NO_OP_PASS = Object.freeze({
@@ -28069,10 +28027,10 @@ var NO_OP_PASS = Object.freeze({
28069
28027
 
28070
28028
  // src/local-executor/durable-store.ts
28071
28029
  var crypto11 = __toESM(require("node:crypto"));
28072
- var fs28 = __toESM(require("node:fs/promises"));
28030
+ var fs27 = __toESM(require("node:fs/promises"));
28073
28031
  var import_node_fs15 = require("node:fs");
28074
- var os20 = __toESM(require("node:os"));
28075
- var path36 = __toESM(require("node:path"));
28032
+ var os19 = __toESM(require("node:os"));
28033
+ var path35 = __toESM(require("node:path"));
28076
28034
  init_logger2();
28077
28035
  var DIR_MODE4 = 448;
28078
28036
  var FILE_MODE4 = 384;
@@ -28088,7 +28046,7 @@ function revertEntryKey(promoteOrder, relPath) {
28088
28046
  return `${promoteOrder} ${relPath}`;
28089
28047
  }
28090
28048
  function defaultRoot4() {
28091
- return path36.join(os20.homedir(), ".codevibe", "revert-state");
28049
+ return path35.join(os19.homedir(), ".codevibe", "revert-state");
28092
28050
  }
28093
28051
  function hashContent(content) {
28094
28052
  return crypto11.createHash("sha256").update(Buffer.from(content, "utf8")).digest("hex");
@@ -28121,7 +28079,7 @@ var RevertManifestStore = class {
28121
28079
  }
28122
28080
  /** The per-group directory `<root>/<taskGroupId>/`. */
28123
28081
  groupDir(taskGroupId) {
28124
- return path36.join(this.rootDir, this.safeSegment(taskGroupId));
28082
+ return path35.join(this.rootDir, this.safeSegment(taskGroupId));
28125
28083
  }
28126
28084
  /**
28127
28085
  * Validate `taskGroupId` is a safe SINGLE path segment so a malicious id can't
@@ -28129,7 +28087,7 @@ var RevertManifestStore = class {
28129
28087
  * trust a field as a path segment, #589-G).
28130
28088
  */
28131
28089
  safeSegment(taskGroupId) {
28132
- if (typeof taskGroupId !== "string" || taskGroupId.length === 0 || taskGroupId === "." || taskGroupId === ".." || taskGroupId.includes("/") || taskGroupId.includes("\\") || taskGroupId.includes("\0") || path36.isAbsolute(taskGroupId)) {
28090
+ if (typeof taskGroupId !== "string" || taskGroupId.length === 0 || taskGroupId === "." || taskGroupId === ".." || taskGroupId.includes("/") || taskGroupId.includes("\\") || taskGroupId.includes("\0") || path35.isAbsolute(taskGroupId)) {
28133
28091
  throw new Error("RevertManifestStore: taskGroupId is not a safe path segment");
28134
28092
  }
28135
28093
  return taskGroupId;
@@ -28140,7 +28098,7 @@ var RevertManifestStore = class {
28140
28098
  * `recursive: true` honors `mode` for the components it creates.
28141
28099
  */
28142
28100
  async mkdirSecure(dir) {
28143
- await fs28.mkdir(dir, { recursive: true, mode: DIR_MODE4 });
28101
+ await fs27.mkdir(dir, { recursive: true, mode: DIR_MODE4 });
28144
28102
  }
28145
28103
  /**
28146
28104
  * Refuse to operate under a path whose any in-`rootDir` component is a symlink
@@ -28149,17 +28107,17 @@ var RevertManifestStore = class {
28149
28107
  * created). The `rootDir` itself is lstat-checked too.
28150
28108
  */
28151
28109
  async assertNoSymlinkComponents(target) {
28152
- const rel = path36.relative(this.rootDir, target);
28153
- if (rel.startsWith("..") || path36.isAbsolute(rel)) {
28110
+ const rel = path35.relative(this.rootDir, target);
28111
+ if (rel.startsWith("..") || path35.isAbsolute(rel)) {
28154
28112
  throw new Error("RevertManifestStore: refusing a path outside the store root");
28155
28113
  }
28156
- const segments = rel.length === 0 ? [] : rel.split(path36.sep);
28114
+ const segments = rel.length === 0 ? [] : rel.split(path35.sep);
28157
28115
  let cur = this.rootDir;
28158
28116
  for (let i = -1; i < segments.length; i++) {
28159
- if (i >= 0) cur = path36.join(cur, segments[i]);
28117
+ if (i >= 0) cur = path35.join(cur, segments[i]);
28160
28118
  let st;
28161
28119
  try {
28162
- st = await fs28.lstat(cur);
28120
+ st = await fs27.lstat(cur);
28163
28121
  } catch (err) {
28164
28122
  if (err.code === "ENOENT") return;
28165
28123
  throw err;
@@ -28174,23 +28132,23 @@ var RevertManifestStore = class {
28174
28132
  * fsync(dir). Refuses symlinked components first. NEVER logs CONTENT.
28175
28133
  */
28176
28134
  async atomicWrite(finalPath, data) {
28177
- const dir = path36.dirname(finalPath);
28135
+ const dir = path35.dirname(finalPath);
28178
28136
  await this.assertNoSymlinkComponents(finalPath);
28179
28137
  await this.mkdirSecure(dir);
28180
28138
  const tmp = `${finalPath}.tmp.${process.pid}.${crypto11.randomBytes(6).toString("hex")}`;
28181
28139
  let fh;
28182
28140
  try {
28183
- fh = await fs28.open(tmp, import_node_fs15.constants.O_WRONLY | import_node_fs15.constants.O_CREAT | import_node_fs15.constants.O_EXCL, FILE_MODE4);
28141
+ fh = await fs27.open(tmp, import_node_fs15.constants.O_WRONLY | import_node_fs15.constants.O_CREAT | import_node_fs15.constants.O_EXCL, FILE_MODE4);
28184
28142
  await fh.writeFile(data, "utf8");
28185
28143
  await fh.sync();
28186
28144
  } finally {
28187
28145
  await fh?.close().catch(() => void 0);
28188
28146
  }
28189
- await fs28.chmod(tmp, FILE_MODE4).catch(() => void 0);
28190
- await fs28.rename(tmp, finalPath);
28147
+ await fs27.chmod(tmp, FILE_MODE4).catch(() => void 0);
28148
+ await fs27.rename(tmp, finalPath);
28191
28149
  let dirFh;
28192
28150
  try {
28193
- dirFh = await fs28.open(dir, import_node_fs15.constants.O_RDONLY);
28151
+ dirFh = await fs27.open(dir, import_node_fs15.constants.O_RDONLY);
28194
28152
  await dirFh.sync();
28195
28153
  } catch {
28196
28154
  } finally {
@@ -28200,7 +28158,7 @@ var RevertManifestStore = class {
28200
28158
  async readJson(p) {
28201
28159
  await this.assertNoSymlinkComponents(p);
28202
28160
  try {
28203
- const raw = await fs28.readFile(p, "utf8");
28161
+ const raw = await fs27.readFile(p, "utf8");
28204
28162
  return JSON.parse(raw);
28205
28163
  } catch (err) {
28206
28164
  if (err.code === "ENOENT") return null;
@@ -28220,11 +28178,11 @@ var RevertManifestStore = class {
28220
28178
  async appendPromote(taskGroupId, _trackIndex, entries) {
28221
28179
  if (entries.length === 0) return;
28222
28180
  const dir = this.groupDir(taskGroupId);
28223
- await this.assertNoSymlinkComponents(path36.join(dir, PREIMAGE_DIR));
28181
+ await this.assertNoSymlinkComponents(path35.join(dir, PREIMAGE_DIR));
28224
28182
  await this.mkdirSecure(dir);
28225
- await this.mkdirSecure(path36.join(dir, PREIMAGE_DIR));
28183
+ await this.mkdirSecure(path35.join(dir, PREIMAGE_DIR));
28226
28184
  const now = Date.now();
28227
- const existing = await this.readJson(path36.join(dir, MANIFEST_FILE)) ?? {
28185
+ const existing = await this.readJson(path35.join(dir, MANIFEST_FILE)) ?? {
28228
28186
  version: REVERT_MANIFEST_VERSION,
28229
28187
  taskGroupId,
28230
28188
  lifecycle: "in_flight",
@@ -28240,10 +28198,10 @@ var RevertManifestStore = class {
28240
28198
  preImageRef = ABSENT_PREIMAGE;
28241
28199
  } else {
28242
28200
  const sha = e.preImageHash ?? hashContent(e.preImageContent);
28243
- preImageRef = path36.join(PREIMAGE_DIR, `${sha}.blob`);
28244
- const blobPath = path36.join(dir, preImageRef);
28201
+ preImageRef = path35.join(PREIMAGE_DIR, `${sha}.blob`);
28202
+ const blobPath = path35.join(dir, preImageRef);
28245
28203
  try {
28246
- await fs28.access(blobPath, import_node_fs15.constants.F_OK);
28204
+ await fs27.access(blobPath, import_node_fs15.constants.F_OK);
28247
28205
  } catch {
28248
28206
  await this.atomicWrite(blobPath, e.preImageContent);
28249
28207
  }
@@ -28273,13 +28231,13 @@ var RevertManifestStore = class {
28273
28231
  }
28274
28232
  async writeRecord(taskGroupId, record) {
28275
28233
  await this.atomicWrite(
28276
- path36.join(this.groupDir(taskGroupId), MANIFEST_FILE),
28234
+ path35.join(this.groupDir(taskGroupId), MANIFEST_FILE),
28277
28235
  JSON.stringify(record, null, 2)
28278
28236
  );
28279
28237
  }
28280
28238
  /** Read the full unified record, or `null` if none exists. */
28281
28239
  async readRecord(taskGroupId) {
28282
- return this.readJson(path36.join(this.groupDir(taskGroupId), MANIFEST_FILE));
28240
+ return this.readJson(path35.join(this.groupDir(taskGroupId), MANIFEST_FILE));
28283
28241
  }
28284
28242
  /** Read just the manifest entries (empty when no record). */
28285
28243
  async readManifest(taskGroupId) {
@@ -28297,10 +28255,10 @@ var RevertManifestStore = class {
28297
28255
  async appendTrackTip(taskGroupId, baseSha, tip) {
28298
28256
  return this.withTrackTipLock(taskGroupId, async () => {
28299
28257
  const dir = this.groupDir(taskGroupId);
28300
- await this.assertNoSymlinkComponents(path36.join(dir, TRACK_TIPS_FILE));
28258
+ await this.assertNoSymlinkComponents(path35.join(dir, TRACK_TIPS_FILE));
28301
28259
  await this.mkdirSecure(dir);
28302
28260
  const now = Date.now();
28303
- const existing = await this.readJson(path36.join(dir, TRACK_TIPS_FILE)) ?? {
28261
+ const existing = await this.readJson(path35.join(dir, TRACK_TIPS_FILE)) ?? {
28304
28262
  version: TRACK_TIPS_VERSION,
28305
28263
  taskGroupId,
28306
28264
  baseSha,
@@ -28317,7 +28275,7 @@ var RevertManifestStore = class {
28317
28275
  else existing.tips.push(tip);
28318
28276
  existing.updatedAtMs = now;
28319
28277
  await this.atomicWrite(
28320
- path36.join(dir, TRACK_TIPS_FILE),
28278
+ path35.join(dir, TRACK_TIPS_FILE),
28321
28279
  JSON.stringify(existing, null, 2)
28322
28280
  );
28323
28281
  logger.info("[RevertManifestStore] recorded track tip", {
@@ -28337,7 +28295,7 @@ var RevertManifestStore = class {
28337
28295
  */
28338
28296
  async readTrackTips(taskGroupId) {
28339
28297
  const rec = await this.readJson(
28340
- path36.join(this.groupDir(taskGroupId), TRACK_TIPS_FILE)
28298
+ path35.join(this.groupDir(taskGroupId), TRACK_TIPS_FILE)
28341
28299
  );
28342
28300
  return { baseSha: rec?.baseSha ?? null, tips: rec?.tips ?? [] };
28343
28301
  }
@@ -28346,9 +28304,9 @@ var RevertManifestStore = class {
28346
28304
  if (preImageRef === ABSENT_PREIMAGE) {
28347
28305
  throw new Error("RevertManifestStore: readPreImage called for an ABSENT (created) entry");
28348
28306
  }
28349
- const blobPath = path36.join(this.groupDir(taskGroupId), preImageRef);
28307
+ const blobPath = path35.join(this.groupDir(taskGroupId), preImageRef);
28350
28308
  await this.assertNoSymlinkComponents(blobPath);
28351
- return fs28.readFile(blobPath, "utf8");
28309
+ return fs27.readFile(blobPath, "utf8");
28352
28310
  }
28353
28311
  // ─── lifecycle transitions (the GC predicate key) ─────────────────────────
28354
28312
  async setLifecycle(taskGroupId, lifecycle) {
@@ -28500,7 +28458,7 @@ var RevertManifestStore = class {
28500
28458
  */
28501
28459
  async beginRevert(taskGroupId) {
28502
28460
  const existing = await this.readJson(
28503
- path36.join(this.groupDir(taskGroupId), JOURNAL_FILE)
28461
+ path35.join(this.groupDir(taskGroupId), JOURNAL_FILE)
28504
28462
  );
28505
28463
  if (existing && existing.state === "reverting") {
28506
28464
  logger.info("[RevertManifestStore] resuming revert from journal", {
@@ -28526,11 +28484,11 @@ var RevertManifestStore = class {
28526
28484
  }
28527
28485
  /** Read the current journal (or `null`). */
28528
28486
  async readJournal(taskGroupId) {
28529
- return this.readJson(path36.join(this.groupDir(taskGroupId), JOURNAL_FILE));
28487
+ return this.readJson(path35.join(this.groupDir(taskGroupId), JOURNAL_FILE));
28530
28488
  }
28531
28489
  async writeJournal(taskGroupId, journal) {
28532
28490
  await this.atomicWrite(
28533
- path36.join(this.groupDir(taskGroupId), JOURNAL_FILE),
28491
+ path35.join(this.groupDir(taskGroupId), JOURNAL_FILE),
28534
28492
  JSON.stringify(journal, null, 2)
28535
28493
  );
28536
28494
  }
@@ -28575,7 +28533,7 @@ var RevertManifestStore = class {
28575
28533
  /** List every group id with a durable record under `<root>/`. */
28576
28534
  async listManifests() {
28577
28535
  try {
28578
- const entries = await fs28.readdir(this.rootDir, { withFileTypes: true });
28536
+ const entries = await fs27.readdir(this.rootDir, { withFileTypes: true });
28579
28537
  const out = [];
28580
28538
  for (const ent of entries) {
28581
28539
  if (!ent.isDirectory()) continue;
@@ -28603,7 +28561,7 @@ var RevertManifestStore = class {
28603
28561
  const terminal = this.isLifecycleTerminal(rec.lifecycle);
28604
28562
  const orphanExpired = now - rec.updatedAtMs > ttlMs;
28605
28563
  if (terminal || orphanExpired) {
28606
- await fs28.rm(this.groupDir(taskGroupId), { recursive: true, force: true });
28564
+ await fs27.rm(this.groupDir(taskGroupId), { recursive: true, force: true });
28607
28565
  removed.push(taskGroupId);
28608
28566
  logger.info("[RevertManifestStore] gc removed group revert-state", {
28609
28567
  taskGroupId,
@@ -28618,13 +28576,13 @@ var RevertManifestStore = class {
28618
28576
 
28619
28577
  // src/local-executor/revert-runner.ts
28620
28578
  var crypto12 = __toESM(require("node:crypto"));
28621
- var fs29 = __toESM(require("node:fs/promises"));
28622
- var path37 = __toESM(require("node:path"));
28579
+ var fs28 = __toESM(require("node:fs/promises"));
28580
+ var path36 = __toESM(require("node:path"));
28623
28581
  init_logger2();
28624
28582
  var FILE_MODE5 = 384;
28625
28583
  async function hashRealFile(workingDir, rel) {
28626
28584
  try {
28627
- const buf = await fs29.readFile(path37.join(workingDir, rel));
28585
+ const buf = await fs28.readFile(path36.join(workingDir, rel));
28628
28586
  return crypto12.createHash("sha256").update(buf).digest("hex");
28629
28587
  } catch (err) {
28630
28588
  if (err.code === "ENOENT") return null;
@@ -28681,7 +28639,7 @@ async function revertGroup(store, taskGroupId, workingDir) {
28681
28639
  return { reverted, alreadyReverted, conflicts };
28682
28640
  }
28683
28641
  async function revertOne(store, taskGroupId, workingDir, entry) {
28684
- const realPath = path37.join(workingDir, entry.path);
28642
+ const realPath = path36.join(workingDir, entry.path);
28685
28643
  const onDiskHash = await hashRealFile(workingDir, entry.path);
28686
28644
  if (entry.changeKind === "created") {
28687
28645
  if (onDiskHash === null) return "already";
@@ -28693,14 +28651,14 @@ async function revertOne(store, taskGroupId, workingDir, entry) {
28693
28651
  return "conflict";
28694
28652
  }
28695
28653
  if (entry.changeKind === "created") {
28696
- await fs29.rm(realPath, { force: true });
28654
+ await fs28.rm(realPath, { force: true });
28697
28655
  } else {
28698
28656
  if (entry.preImageRef === ABSENT_PREIMAGE) {
28699
28657
  return "conflict";
28700
28658
  }
28701
28659
  const preImage = await store.readPreImage(taskGroupId, entry.preImageRef);
28702
- await fs29.mkdir(path37.dirname(realPath), { recursive: true });
28703
- await fs29.writeFile(realPath, preImage, { encoding: "utf8", mode: FILE_MODE5 });
28660
+ await fs28.mkdir(path36.dirname(realPath), { recursive: true });
28661
+ await fs28.writeFile(realPath, preImage, { encoding: "utf8", mode: FILE_MODE5 });
28704
28662
  }
28705
28663
  return "reverted";
28706
28664
  }
@@ -28870,13 +28828,13 @@ var ConfinedModelCaller = class {
28870
28828
  };
28871
28829
 
28872
28830
  // src/local-executor/agentic-resolve.ts
28873
- var fs31 = __toESM(require("node:fs/promises"));
28831
+ var fs30 = __toESM(require("node:fs/promises"));
28874
28832
 
28875
28833
  // src/local-executor/agentic-disposable-repo.ts
28876
28834
  var import_node_crypto10 = require("node:crypto");
28877
28835
  var import_node_fs16 = require("node:fs");
28878
- var fs30 = __toESM(require("node:fs/promises"));
28879
- var path38 = __toESM(require("node:path"));
28836
+ var fs29 = __toESM(require("node:fs/promises"));
28837
+ var path37 = __toESM(require("node:path"));
28880
28838
  var DisposableRepoError = class extends Error {
28881
28839
  constructor(reason, message) {
28882
28840
  super(message);
@@ -28900,10 +28858,10 @@ var HERMETIC_LOCAL_CONFIG = [
28900
28858
  ["commit.gpgSign", "false"]
28901
28859
  ];
28902
28860
  async function materializeDisposableRepo(opts) {
28903
- const repoDir = path38.join(opts.parentDir, `cp14-wb2-resolve-${(0, import_node_crypto10.randomBytes)(8).toString("hex")}`);
28904
- await fs30.mkdir(repoDir, { recursive: true, mode: 448 });
28861
+ const repoDir = path37.join(opts.parentDir, `cp14-wb2-resolve-${(0, import_node_crypto10.randomBytes)(8).toString("hex")}`);
28862
+ await fs29.mkdir(repoDir, { recursive: true, mode: 448 });
28905
28863
  const cleanup = async () => {
28906
- await fs30.rm(repoDir, { recursive: true, force: true }).catch(() => void 0);
28864
+ await fs29.rm(repoDir, { recursive: true, force: true }).catch(() => void 0);
28907
28865
  };
28908
28866
  try {
28909
28867
  const init = await pinnedGit(repoDir, ["-c", "init.templateDir=", "init", "--quiet"], {
@@ -28927,7 +28885,7 @@ async function materializeDisposableRepo(opts) {
28927
28885
  opts.conflictedTree,
28928
28886
  ...ls.stdout.split("\n").map((s) => s.trim()).filter((s) => s.length > 0)
28929
28887
  ];
28930
- const packBase = path38.join(repoDir, ".git", "objects", "pack", "cp14-import");
28888
+ const packBase = path37.join(repoDir, ".git", "objects", "pack", "cp14-import");
28931
28889
  const pk = await pinnedGitWithInput(
28932
28890
  opts.realRepoDir,
28933
28891
  ["pack-objects", "-q", packBase],
@@ -28960,8 +28918,8 @@ async function materializeDisposableRepo(opts) {
28960
28918
  }
28961
28919
  }
28962
28920
  async function stageDirForRead(dir) {
28963
- const staged = path38.join(path38.dirname(dir), `.cp14-staged-${(0, import_node_crypto10.randomBytes)(12).toString("hex")}`);
28964
- await fs30.rename(dir, staged);
28921
+ const staged = path37.join(path37.dirname(dir), `.cp14-staged-${(0, import_node_crypto10.randomBytes)(12).toString("hex")}`);
28922
+ await fs29.rename(dir, staged);
28965
28923
  return staged;
28966
28924
  }
28967
28925
  async function fdSafeReadFile(rootDir, relPath) {
@@ -28971,18 +28929,18 @@ async function fdSafeReadFile(rootDir, relPath) {
28971
28929
  if (relPath.includes("\0")) {
28972
28930
  throw new FdSafeImportError("nul", "fd-safe import: NUL in path");
28973
28931
  }
28974
- if (path38.isAbsolute(relPath)) {
28932
+ if (path37.isAbsolute(relPath)) {
28975
28933
  throw new FdSafeImportError("absolute", `fd-safe import: absolute path ${relPath}`);
28976
28934
  }
28977
28935
  const parts = relPath.split(/[\\/]+/).filter((p) => p.length > 0);
28978
28936
  if (parts.length === 0 || parts.some((p) => p === "." || p === "..")) {
28979
28937
  throw new FdSafeImportError("traversal", `fd-safe import: traversal in ${relPath}`);
28980
28938
  }
28981
- const rootReal = await fs30.realpath(rootDir);
28982
- const expected = path38.join(rootReal, ...parts);
28939
+ const rootReal = await fs29.realpath(rootDir);
28940
+ const expected = path37.join(rootReal, ...parts);
28983
28941
  let real;
28984
28942
  try {
28985
- real = await fs30.realpath(path38.join(rootDir, relPath));
28943
+ real = await fs29.realpath(path37.join(rootDir, relPath));
28986
28944
  } catch (err) {
28987
28945
  if (err.code === "ENOENT") {
28988
28946
  throw new FdSafeImportError("missing", `fd-safe import: ${relPath} not found`);
@@ -28997,7 +28955,7 @@ async function fdSafeReadFile(rootDir, relPath) {
28997
28955
  }
28998
28956
  let fh;
28999
28957
  try {
29000
- fh = await fs30.open(real, import_node_fs16.constants.O_RDONLY | import_node_fs16.constants.O_NOFOLLOW | import_node_fs16.constants.O_NONBLOCK);
28958
+ fh = await fs29.open(real, import_node_fs16.constants.O_RDONLY | import_node_fs16.constants.O_NOFOLLOW | import_node_fs16.constants.O_NONBLOCK);
29001
28959
  const st = await fh.stat();
29002
28960
  if (!st.isFile()) {
29003
28961
  throw new FdSafeImportError("not-regular", `fd-safe import: ${relPath} is not a regular file`);
@@ -29082,17 +29040,17 @@ async function resolveAgenticSlot(args) {
29082
29040
  return { status: "resolved", resolvedBlobs };
29083
29041
  } finally {
29084
29042
  await disp.cleanup().catch(() => void 0);
29085
- if (staged) await fs31.rm(staged, { recursive: true, force: true }).catch(() => void 0);
29043
+ if (staged) await fs30.rm(staged, { recursive: true, force: true }).catch(() => void 0);
29086
29044
  }
29087
29045
  }
29088
29046
 
29089
29047
  // src/local-executor/workspace-shadow.ts
29090
29048
  var import_node_child_process5 = require("node:child_process");
29091
29049
  var crypto13 = __toESM(require("node:crypto"));
29092
- var fs32 = __toESM(require("node:fs/promises"));
29050
+ var fs31 = __toESM(require("node:fs/promises"));
29093
29051
  var import_node_fs17 = require("node:fs");
29094
- var os21 = __toESM(require("node:os"));
29095
- var path39 = __toESM(require("node:path"));
29052
+ var os20 = __toESM(require("node:os"));
29053
+ var path38 = __toESM(require("node:path"));
29096
29054
  var import_node_util2 = require("node:util");
29097
29055
  var import_uuid10 = require("uuid");
29098
29056
  init_logger2();
@@ -29121,11 +29079,11 @@ var BUILD_ENV_FILENAMES = [
29121
29079
  var SHADOW_STATE_FILE = "shadow-state.json";
29122
29080
  var DEFAULT_SHADOW_TTL_MS = 24 * 60 * 60 * 1e3;
29123
29081
  var realSleep2 = (ms) => new Promise((r) => setTimeout(r, ms));
29124
- function resolveHome4() {
29125
- return os21.homedir();
29082
+ function resolveHome3() {
29083
+ return os20.homedir();
29126
29084
  }
29127
29085
  function defaultStateRoot() {
29128
- return path39.join(resolveHome4(), ".codevibe", "shadow-state");
29086
+ return path38.join(resolveHome3(), ".codevibe", "shadow-state");
29129
29087
  }
29130
29088
  var WorkspaceShadow = class _WorkspaceShadow {
29131
29089
  constructor(args) {
@@ -29162,14 +29120,14 @@ var WorkspaceShadow = class _WorkspaceShadow {
29162
29120
  }
29163
29121
  let canonicalWorkingDir;
29164
29122
  try {
29165
- canonicalWorkingDir = await fs32.realpath(workingDir);
29123
+ canonicalWorkingDir = await fs31.realpath(workingDir);
29166
29124
  } catch {
29167
29125
  canonicalWorkingDir = workingDir;
29168
29126
  }
29169
- const shadowRoot = env.shadowRootDir ?? os21.tmpdir();
29170
- let shadowDir = path39.join(shadowRoot, `codevibe-shadow-${taskId}-${(0, import_uuid10.v4)()}`);
29127
+ const shadowRoot = env.shadowRootDir ?? os20.tmpdir();
29128
+ let shadowDir = path38.join(shadowRoot, `codevibe-shadow-${taskId}-${(0, import_uuid10.v4)()}`);
29171
29129
  const stateRoot = env.stateRootDir ?? defaultStateRoot();
29172
- const stateDir = path39.join(stateRoot, taskId);
29130
+ const stateDir = path38.join(stateRoot, taskId);
29173
29131
  const sleep = env.sleep ?? realSleep2;
29174
29132
  const isGit = await isGitWorkspace(canonicalWorkingDir);
29175
29133
  if (opts.trackBranch !== void 0 && !isGit) {
@@ -29188,7 +29146,7 @@ var WorkspaceShadow = class _WorkspaceShadow {
29188
29146
  } else {
29189
29147
  trackedSet = await createCopyShadow(canonicalWorkingDir, shadowDir);
29190
29148
  }
29191
- shadowDir = await fs32.realpath(shadowDir);
29149
+ shadowDir = await fs31.realpath(shadowDir);
29192
29150
  const preTaskHashes = /* @__PURE__ */ new Map();
29193
29151
  for (const rel of trackedSet) {
29194
29152
  preTaskHashes.set(rel, await hashRealFile2(canonicalWorkingDir, rel));
@@ -29322,7 +29280,7 @@ var WorkspaceShadow = class _WorkspaceShadow {
29322
29280
  }
29323
29281
  const message = opts.message ?? `CodeVibe track ${this.trackBranch}`;
29324
29282
  const baseSha = (await execFile4("git", ["-C", this.shadowDir, "rev-parse", "HEAD"])).stdout.trim();
29325
- const idxFile = path39.join(os21.tmpdir(), `cv-track-idx-${(0, import_uuid10.v4)()}`);
29283
+ const idxFile = path38.join(os20.tmpdir(), `cv-track-idx-${(0, import_uuid10.v4)()}`);
29326
29284
  const idxEnv = { ...process.env, GIT_INDEX_FILE: idxFile };
29327
29285
  const runIdx = (args) => execFile4("git", ["-C", this.shadowDir, ...args], {
29328
29286
  env: idxEnv,
@@ -29343,13 +29301,13 @@ var WorkspaceShadow = class _WorkspaceShadow {
29343
29301
  const m = staged.split(/\s+/)[0];
29344
29302
  if (/^\d{6}$/.test(m)) mode = m;
29345
29303
  }
29346
- const blobTmp = path39.join(os21.tmpdir(), `cv-track-blob-${(0, import_uuid10.v4)()}`);
29347
- await fs32.writeFile(blobTmp, f.content, "utf8");
29304
+ const blobTmp = path38.join(os20.tmpdir(), `cv-track-blob-${(0, import_uuid10.v4)()}`);
29305
+ await fs31.writeFile(blobTmp, f.content, "utf8");
29348
29306
  try {
29349
29307
  const oid = (await runIdx(["hash-object", "-w", "--no-filters", "--", blobTmp])).stdout.trim();
29350
29308
  await runIdx(["update-index", "--add", "--cacheinfo", `${mode},${oid},${f.path}`]);
29351
29309
  } finally {
29352
- await fs32.rm(blobTmp, { force: true });
29310
+ await fs31.rm(blobTmp, { force: true });
29353
29311
  }
29354
29312
  }
29355
29313
  const treeOid = (await runIdx(["write-tree"])).stdout.trim();
@@ -29396,7 +29354,7 @@ var WorkspaceShadow = class _WorkspaceShadow {
29396
29354
  });
29397
29355
  return commitOid;
29398
29356
  } finally {
29399
- await fs32.rm(idxFile, { force: true });
29357
+ await fs31.rm(idxFile, { force: true });
29400
29358
  }
29401
29359
  }
29402
29360
  // ─── promote (§4 / #PM-1 / #PM-2 / #PR-2 / #PR-4) ────────────────────────
@@ -29462,7 +29420,7 @@ var WorkspaceShadow = class _WorkspaceShadow {
29462
29420
  });
29463
29421
  continue;
29464
29422
  }
29465
- const realPath = path39.join(this.workingDir, rel);
29423
+ const realPath = path38.join(this.workingDir, rel);
29466
29424
  const expected = this.preTaskHashes.get(rel) ?? null;
29467
29425
  let currentHash;
29468
29426
  try {
@@ -29477,10 +29435,10 @@ var WorkspaceShadow = class _WorkspaceShadow {
29477
29435
  }
29478
29436
  try {
29479
29437
  if (file.change_kind === "deleted") {
29480
- await fs32.rm(realPath, { force: true });
29438
+ await fs31.rm(realPath, { force: true });
29481
29439
  } else {
29482
- await fs32.mkdir(path39.dirname(realPath), { recursive: true });
29483
- await fs32.writeFile(realPath, file.content, "utf8");
29440
+ await fs31.mkdir(path38.dirname(realPath), { recursive: true });
29441
+ await fs31.writeFile(realPath, file.content, "utf8");
29484
29442
  }
29485
29443
  promoted.push(rel);
29486
29444
  } catch (err) {
@@ -29538,7 +29496,7 @@ var WorkspaceShadow = class _WorkspaceShadow {
29538
29496
  if (this.isGit) {
29539
29497
  await this.removeGitWorktree();
29540
29498
  } else {
29541
- await fs32.rm(this.shadowDir, { recursive: true, force: true });
29499
+ await fs31.rm(this.shadowDir, { recursive: true, force: true });
29542
29500
  }
29543
29501
  removed = true;
29544
29502
  } catch (err) {
@@ -29549,7 +29507,7 @@ var WorkspaceShadow = class _WorkspaceShadow {
29549
29507
  });
29550
29508
  }
29551
29509
  if (removed && !opts.preserveStateDir) {
29552
- await fs32.rm(this.stateDir, { recursive: true, force: true }).catch(() => void 0);
29510
+ await fs31.rm(this.stateDir, { recursive: true, force: true }).catch(() => void 0);
29553
29511
  }
29554
29512
  }
29555
29513
  /**
@@ -29585,15 +29543,15 @@ var WorkspaceShadow = class _WorkspaceShadow {
29585
29543
  createdAtMs: Date.now()
29586
29544
  };
29587
29545
  const json = JSON.stringify(marker, null, 2);
29588
- await fs32.mkdir(this.stateDir, { recursive: true });
29589
- await fs32.writeFile(path39.join(this.stateDir, SHADOW_STATE_FILE), json, "utf8");
29546
+ await fs31.mkdir(this.stateDir, { recursive: true });
29547
+ await fs31.writeFile(path38.join(this.stateDir, SHADOW_STATE_FILE), json, "utf8");
29590
29548
  if (promoteState === "pending") {
29591
- await fs32.writeFile(path39.join(this.shadowDir, SHADOW_STATE_FILE), json, "utf8").catch(() => void 0);
29549
+ await fs31.writeFile(path38.join(this.shadowDir, SHADOW_STATE_FILE), json, "utf8").catch(() => void 0);
29592
29550
  }
29593
29551
  }
29594
29552
  async readStateMarker() {
29595
29553
  try {
29596
- const raw = await fs32.readFile(path39.join(this.stateDir, SHADOW_STATE_FILE), "utf8");
29554
+ const raw = await fs31.readFile(path38.join(this.stateDir, SHADOW_STATE_FILE), "utf8");
29597
29555
  return JSON.parse(raw);
29598
29556
  } catch {
29599
29557
  return null;
@@ -29655,15 +29613,15 @@ async function listRecoverableShadows(env = {}) {
29655
29613
  const stateRoot = env.stateRootDir ?? defaultStateRoot();
29656
29614
  let entries;
29657
29615
  try {
29658
- entries = await fs32.readdir(stateRoot);
29616
+ entries = await fs31.readdir(stateRoot);
29659
29617
  } catch {
29660
29618
  return [];
29661
29619
  }
29662
29620
  const out = [];
29663
29621
  for (const taskId of entries) {
29664
- const stateDir = path39.join(stateRoot, taskId);
29622
+ const stateDir = path38.join(stateRoot, taskId);
29665
29623
  try {
29666
- const raw = await fs32.readFile(path39.join(stateDir, SHADOW_STATE_FILE), "utf8");
29624
+ const raw = await fs31.readFile(path38.join(stateDir, SHADOW_STATE_FILE), "utf8");
29667
29625
  const marker = JSON.parse(raw);
29668
29626
  out.push({
29669
29627
  taskId: marker.taskId,
@@ -29681,7 +29639,7 @@ async function listRecoverableShadows(env = {}) {
29681
29639
  }
29682
29640
  async function reopenShadow(recovered, env = {}) {
29683
29641
  try {
29684
- await fs32.access(recovered.shadowDir, import_node_fs17.constants.F_OK);
29642
+ await fs31.access(recovered.shadowDir, import_node_fs17.constants.F_OK);
29685
29643
  } catch {
29686
29644
  return null;
29687
29645
  }
@@ -29708,7 +29666,7 @@ async function reapOrphanShadows(keepTaskIds, env = {}) {
29708
29666
  if (shadow) {
29709
29667
  await shadow.discard();
29710
29668
  } else {
29711
- await fs32.rm(r.stateDir, { recursive: true, force: true }).catch(() => void 0);
29669
+ await fs31.rm(r.stateDir, { recursive: true, force: true }).catch(() => void 0);
29712
29670
  }
29713
29671
  reaped.push(r.taskId);
29714
29672
  }
@@ -29747,9 +29705,9 @@ async function createGitWorktreeShadow(workingDir, shadowDir, sleep, trackBranch
29747
29705
  await withGitLockRetry(() => execFile4("git", addArgs), { sleep });
29748
29706
  try {
29749
29707
  const { stdout: excludeRel } = await execFile4("git", ["-C", shadowDir, "rev-parse", "--git-path", "info/exclude"]);
29750
- const excludeAbs = path39.resolve(shadowDir, excludeRel.trim());
29751
- await fs32.mkdir(path39.dirname(excludeAbs), { recursive: true });
29752
- await fs32.appendFile(excludeAbs, `
29708
+ const excludeAbs = path38.resolve(shadowDir, excludeRel.trim());
29709
+ await fs31.mkdir(path38.dirname(excludeAbs), { recursive: true });
29710
+ await fs31.appendFile(excludeAbs, `
29753
29711
  ${SHADOW_ATTACHMENTS_DIR2}/
29754
29712
  `);
29755
29713
  } catch (err) {
@@ -29781,48 +29739,48 @@ ${SHADOW_ATTACHMENTS_DIR2}/
29781
29739
  return tracked;
29782
29740
  }
29783
29741
  async function createCopyShadow(workingDir, shadowDir) {
29784
- await fs32.mkdir(shadowDir, { recursive: true });
29742
+ await fs31.mkdir(shadowDir, { recursive: true });
29785
29743
  const tracked = /* @__PURE__ */ new Set();
29786
29744
  await copyTree(workingDir, shadowDir, "", tracked);
29787
- const realNodeModules = path39.join(workingDir, "node_modules");
29745
+ const realNodeModules = path38.join(workingDir, "node_modules");
29788
29746
  try {
29789
- await fs32.access(realNodeModules, import_node_fs17.constants.F_OK);
29790
- await fs32.symlink(realNodeModules, path39.join(shadowDir, "node_modules"), "dir").catch(() => void 0);
29747
+ await fs31.access(realNodeModules, import_node_fs17.constants.F_OK);
29748
+ await fs31.symlink(realNodeModules, path38.join(shadowDir, "node_modules"), "dir").catch(() => void 0);
29791
29749
  } catch {
29792
29750
  }
29793
29751
  for (const name of BUILD_ENV_FILENAMES) {
29794
- const src = path39.join(workingDir, name);
29752
+ const src = path38.join(workingDir, name);
29795
29753
  if (matchesSecretDenyList(src)) continue;
29796
29754
  try {
29797
- const stat7 = await fs32.lstat(src);
29798
- if (!stat7.isFile()) continue;
29799
- await fs32.copyFile(src, path39.join(shadowDir, name));
29755
+ const stat6 = await fs31.lstat(src);
29756
+ if (!stat6.isFile()) continue;
29757
+ await fs31.copyFile(src, path38.join(shadowDir, name));
29800
29758
  } catch {
29801
29759
  }
29802
29760
  }
29803
29761
  return tracked;
29804
29762
  }
29805
29763
  async function copyTree(srcRoot, dstRoot, relDir, tracked) {
29806
- const srcDir = path39.join(srcRoot, relDir);
29764
+ const srcDir = path38.join(srcRoot, relDir);
29807
29765
  let entries;
29808
29766
  try {
29809
- entries = await fs32.readdir(srcDir, { withFileTypes: true });
29767
+ entries = await fs31.readdir(srcDir, { withFileTypes: true });
29810
29768
  } catch {
29811
29769
  return;
29812
29770
  }
29813
29771
  for (const ent of entries) {
29814
- const rel = relDir ? path39.join(relDir, ent.name) : ent.name;
29815
- const srcPath = path39.join(srcRoot, rel);
29816
- const dstPath = path39.join(dstRoot, rel);
29772
+ const rel = relDir ? path38.join(relDir, ent.name) : ent.name;
29773
+ const srcPath = path38.join(srcRoot, rel);
29774
+ const dstPath = path38.join(dstRoot, rel);
29817
29775
  if (ent.isDirectory()) {
29818
29776
  if (SHADOW_SKIP_DIRS.has(ent.name)) continue;
29819
- await fs32.mkdir(dstPath, { recursive: true });
29777
+ await fs31.mkdir(dstPath, { recursive: true });
29820
29778
  await copyTree(srcRoot, dstRoot, rel, tracked);
29821
29779
  } else if (ent.isFile()) {
29822
29780
  if (matchesSecretDenyList(srcPath)) continue;
29823
29781
  if (relDir === "" && BUILD_ENV_FILENAMES.includes(ent.name)) continue;
29824
- await fs32.mkdir(path39.dirname(dstPath), { recursive: true });
29825
- await fs32.copyFile(srcPath, dstPath);
29782
+ await fs31.mkdir(path38.dirname(dstPath), { recursive: true });
29783
+ await fs31.copyFile(srcPath, dstPath);
29826
29784
  tracked.add(rel);
29827
29785
  }
29828
29786
  }
@@ -29830,15 +29788,15 @@ async function copyTree(srcRoot, dstRoot, relDir, tracked) {
29830
29788
  async function listShadowRegularFiles(shadowDir) {
29831
29789
  const out = [];
29832
29790
  async function walk2(relDir) {
29833
- const dir = path39.join(shadowDir, relDir);
29791
+ const dir = path38.join(shadowDir, relDir);
29834
29792
  let entries;
29835
29793
  try {
29836
- entries = await fs32.readdir(dir, { withFileTypes: true });
29794
+ entries = await fs31.readdir(dir, { withFileTypes: true });
29837
29795
  } catch {
29838
29796
  return;
29839
29797
  }
29840
29798
  for (const ent of entries) {
29841
- const rel = relDir ? path39.join(relDir, ent.name) : ent.name;
29799
+ const rel = relDir ? path38.join(relDir, ent.name) : ent.name;
29842
29800
  if (ent.isDirectory()) {
29843
29801
  if (SHADOW_SKIP_DIRS.has(ent.name)) continue;
29844
29802
  await walk2(rel);
@@ -29853,14 +29811,14 @@ async function listShadowRegularFiles(shadowDir) {
29853
29811
  return out;
29854
29812
  }
29855
29813
  async function readShadowFile(shadowDir, rel) {
29856
- return fs32.readFile(path39.join(shadowDir, rel), "utf8");
29814
+ return fs31.readFile(path38.join(shadowDir, rel), "utf8");
29857
29815
  }
29858
29816
  function hashBuffer(buf) {
29859
29817
  return crypto13.createHash("sha256").update(buf).digest("hex");
29860
29818
  }
29861
29819
  async function readRealFileForManifest(workingDir, rel) {
29862
29820
  try {
29863
- const buf = await fs32.readFile(path39.join(workingDir, rel));
29821
+ const buf = await fs31.readFile(path38.join(workingDir, rel));
29864
29822
  return { content: buf.toString("utf8"), hash: hashBuffer(buf) };
29865
29823
  } catch (err) {
29866
29824
  if (err.code === "ENOENT") {
@@ -29871,7 +29829,7 @@ async function readRealFileForManifest(workingDir, rel) {
29871
29829
  }
29872
29830
  async function hashRealFile2(workingDir, rel) {
29873
29831
  try {
29874
- const buf = await fs32.readFile(path39.join(workingDir, rel));
29832
+ const buf = await fs31.readFile(path38.join(workingDir, rel));
29875
29833
  return hashBuffer(buf);
29876
29834
  } catch (err) {
29877
29835
  if (err.code === "ENOENT") return null;
@@ -32828,7 +32786,7 @@ var QuorumLoop = class {
32828
32786
  implementorAgent,
32829
32787
  implementorTaskId
32830
32788
  }) => {
32831
- const parentDir = await import_node_fs18.promises.mkdtemp(path40.join(os22.tmpdir(), "codevibe-wb2-resolve-"));
32789
+ const parentDir = await import_node_fs18.promises.mkdtemp(path39.join(os21.tmpdir(), "codevibe-wb2-resolve-"));
32832
32790
  return resolveAgenticSlot({
32833
32791
  realRepoDir: this.deps.workingDir,
32834
32792
  // canonical loop workdir == repo root
@@ -34164,37 +34122,37 @@ function capFindingsOldestFirst(findings, budget) {
34164
34122
 
34165
34123
  // src/orchestration-shell/team-decompose.ts
34166
34124
  var import_node_fs19 = require("node:fs");
34167
- var import_zod2 = require("zod");
34125
+ var import_zod = require("zod");
34168
34126
  init_logger2();
34169
34127
  var AGENT_KINDS = ["CLAUDE", "CODEX", "GEMINI", "ANTIGRAVITY"];
34170
- var ContractRefInputSchema = import_zod2.z.object({
34171
- path: import_zod2.z.string(),
34172
- access: import_zod2.z.enum(["write", "read"])
34128
+ var ContractRefInputSchema = import_zod.z.object({
34129
+ path: import_zod.z.string(),
34130
+ access: import_zod.z.enum(["write", "read"])
34173
34131
  });
34174
- var OwnershipScopeInputSchema = import_zod2.z.object({
34175
- write_paths: import_zod2.z.array(import_zod2.z.string()),
34176
- shared_contracts: import_zod2.z.array(ContractRefInputSchema),
34177
- test_surfaces: import_zod2.z.array(import_zod2.z.string()),
34178
- auto_modified_files: import_zod2.z.array(import_zod2.z.string())
34132
+ var OwnershipScopeInputSchema = import_zod.z.object({
34133
+ write_paths: import_zod.z.array(import_zod.z.string()),
34134
+ shared_contracts: import_zod.z.array(ContractRefInputSchema),
34135
+ test_surfaces: import_zod.z.array(import_zod.z.string()),
34136
+ auto_modified_files: import_zod.z.array(import_zod.z.string())
34179
34137
  });
34180
- var ImplementorAgentSchema = import_zod2.z.preprocess(
34138
+ var ImplementorAgentSchema = import_zod.z.preprocess(
34181
34139
  (v) => typeof v === "string" ? v.toUpperCase() : v,
34182
- import_zod2.z.enum(AGENT_KINDS)
34140
+ import_zod.z.enum(AGENT_KINDS)
34183
34141
  );
34184
- var WorkItemWithDescriptionSchema = import_zod2.z.object({
34142
+ var WorkItemWithDescriptionSchema = import_zod.z.object({
34185
34143
  ownershipScope: OwnershipScopeInputSchema,
34186
34144
  implementorAgent: ImplementorAgentSchema,
34187
- isSharedTestOwner: import_zod2.z.boolean(),
34188
- description: import_zod2.z.string()
34145
+ isSharedTestOwner: import_zod.z.boolean(),
34146
+ description: import_zod.z.string()
34189
34147
  });
34190
- var WorkItemInputSchema = import_zod2.z.discriminatedUnion("decompose", [
34191
- import_zod2.z.object({
34192
- decompose: import_zod2.z.literal(true),
34193
- workItems: import_zod2.z.array(WorkItemWithDescriptionSchema).min(2)
34148
+ var WorkItemInputSchema = import_zod.z.discriminatedUnion("decompose", [
34149
+ import_zod.z.object({
34150
+ decompose: import_zod.z.literal(true),
34151
+ workItems: import_zod.z.array(WorkItemWithDescriptionSchema).min(2)
34194
34152
  }),
34195
- import_zod2.z.object({
34196
- decompose: import_zod2.z.literal(false),
34197
- reason: import_zod2.z.string()
34153
+ import_zod.z.object({
34154
+ decompose: import_zod.z.literal(false),
34155
+ reason: import_zod.z.string()
34198
34156
  })
34199
34157
  ]);
34200
34158
  async function readImplementorFinalMessage(plan, handle, agent, exitCode) {
@@ -34415,10 +34373,10 @@ function validateAgentAvailability(workItems, detected) {
34415
34373
  var import_node_crypto11 = require("node:crypto");
34416
34374
 
34417
34375
  // src/orchestration-shell/context-store.ts
34418
- var fs35 = __toESM(require("fs/promises"));
34376
+ var fs34 = __toESM(require("fs/promises"));
34419
34377
  var import_fs = require("fs");
34420
- var path41 = __toESM(require("path"));
34421
- var os23 = __toESM(require("os"));
34378
+ var path40 = __toESM(require("path"));
34379
+ var os22 = __toESM(require("os"));
34422
34380
  var crypto14 = __toESM(require("crypto"));
34423
34381
  var import_child_process4 = require("child_process");
34424
34382
  var import_util2 = require("util");
@@ -34436,39 +34394,39 @@ function isSha256Hex(s) {
34436
34394
  return SHA256_HEX_RE.test(s);
34437
34395
  }
34438
34396
  function deriveWorkspaceId(absoluteWorkspaceRoot) {
34439
- const canonical = path41.resolve(absoluteWorkspaceRoot);
34397
+ const canonical = path40.resolve(absoluteWorkspaceRoot);
34440
34398
  return crypto14.createHash("sha256").update(canonical, "utf8").digest("hex").slice(0, 16);
34441
34399
  }
34442
34400
  async function canonicalizeRoot(p) {
34443
34401
  try {
34444
- return await fs35.realpath(p);
34402
+ return await fs34.realpath(p);
34445
34403
  } catch {
34446
- return path41.resolve(p);
34404
+ return path40.resolve(p);
34447
34405
  }
34448
34406
  }
34449
- function resolveHome5() {
34407
+ function resolveHome4() {
34450
34408
  const isTestEnv = process.env.VITEST === "true" || process.env.NODE_ENV === "test";
34451
34409
  if (isTestEnv && process.env.CODEVIBE_HOME_OVERRIDE) {
34452
34410
  return process.env.CODEVIBE_HOME_OVERRIDE;
34453
34411
  }
34454
- return os23.homedir();
34412
+ return os22.homedir();
34455
34413
  }
34456
34414
  function contextStoreDir(workspaceId) {
34457
- return path41.join(resolveHome5(), ".codevibe", "context", workspaceId);
34415
+ return path40.join(resolveHome4(), ".codevibe", "context", workspaceId);
34458
34416
  }
34459
34417
  async function atomicWriteFile(finalPath, bytes) {
34460
- const dir = path41.dirname(finalPath);
34461
- await fs35.mkdir(dir, { recursive: true, mode: DIR_MODE5 });
34418
+ const dir = path40.dirname(finalPath);
34419
+ await fs34.mkdir(dir, { recursive: true, mode: DIR_MODE5 });
34462
34420
  if (process.platform !== "win32") {
34463
34421
  try {
34464
- await fs35.chmod(dir, DIR_MODE5);
34422
+ await fs34.chmod(dir, DIR_MODE5);
34465
34423
  } catch {
34466
34424
  }
34467
34425
  }
34468
34426
  const tmpPath = `${finalPath}.tmp.${process.pid}.${crypto14.randomBytes(6).toString("hex")}`;
34469
34427
  let fh = null;
34470
34428
  try {
34471
- fh = await fs35.open(
34429
+ fh = await fs34.open(
34472
34430
  tmpPath,
34473
34431
  import_fs.constants.O_WRONLY | import_fs.constants.O_CREAT | import_fs.constants.O_EXCL,
34474
34432
  FILE_MODE6
@@ -34479,11 +34437,11 @@ async function atomicWriteFile(finalPath, bytes) {
34479
34437
  fh = null;
34480
34438
  if (process.platform !== "win32") {
34481
34439
  try {
34482
- await fs35.chmod(tmpPath, FILE_MODE6);
34440
+ await fs34.chmod(tmpPath, FILE_MODE6);
34483
34441
  } catch {
34484
34442
  }
34485
34443
  }
34486
- await fs35.rename(tmpPath, finalPath);
34444
+ await fs34.rename(tmpPath, finalPath);
34487
34445
  } catch (err) {
34488
34446
  if (fh) {
34489
34447
  try {
@@ -34492,14 +34450,14 @@ async function atomicWriteFile(finalPath, bytes) {
34492
34450
  }
34493
34451
  }
34494
34452
  try {
34495
- await fs35.unlink(tmpPath);
34453
+ await fs34.unlink(tmpPath);
34496
34454
  } catch {
34497
34455
  }
34498
34456
  throw err;
34499
34457
  }
34500
34458
  let dirFh = null;
34501
34459
  try {
34502
- dirFh = await fs35.open(dir, import_fs.constants.O_RDONLY);
34460
+ dirFh = await fs34.open(dir, import_fs.constants.O_RDONLY);
34503
34461
  await dirFh.sync();
34504
34462
  } catch {
34505
34463
  } finally {
@@ -34521,20 +34479,20 @@ async function writeContextStore(deps) {
34521
34479
  summarySha256: deps.summary.sha256
34522
34480
  };
34523
34481
  await removeStoreFile(dir, DIGEST_FILE);
34524
- await atomicWriteFile(path41.join(dir, SUMMARY_FILE), JSON.stringify(deps.summary));
34525
- await atomicWriteFile(path41.join(dir, METADATA_FILE), JSON.stringify(metadata));
34526
- await atomicWriteFile(path41.join(dir, DIGEST_FILE), deps.summary.sha256);
34482
+ await atomicWriteFile(path40.join(dir, SUMMARY_FILE), JSON.stringify(deps.summary));
34483
+ await atomicWriteFile(path40.join(dir, METADATA_FILE), JSON.stringify(metadata));
34484
+ await atomicWriteFile(path40.join(dir, DIGEST_FILE), deps.summary.sha256);
34527
34485
  }
34528
34486
  async function removeStoreFile(dir, name) {
34529
34487
  try {
34530
- await fs35.unlink(path41.join(dir, name));
34488
+ await fs34.unlink(path40.join(dir, name));
34531
34489
  } catch {
34532
34490
  }
34533
34491
  }
34534
34492
  async function purgeContextStoreFiles(dir) {
34535
34493
  for (const name of [SUMMARY_FILE, DIGEST_FILE, METADATA_FILE]) {
34536
34494
  try {
34537
- await fs35.unlink(path41.join(dir, name));
34495
+ await fs34.unlink(path40.join(dir, name));
34538
34496
  } catch {
34539
34497
  }
34540
34498
  }
@@ -34542,7 +34500,7 @@ async function purgeContextStoreFiles(dir) {
34542
34500
  async function purgeContextStoreFilesStrict(dir) {
34543
34501
  for (const name of [SUMMARY_FILE, DIGEST_FILE, METADATA_FILE]) {
34544
34502
  try {
34545
- await fs35.unlink(path41.join(dir, name));
34503
+ await fs34.unlink(path40.join(dir, name));
34546
34504
  } catch (err) {
34547
34505
  if (err?.code === "ENOENT") continue;
34548
34506
  throw new Error(`failed to purge context store file ${name}: ${err.message}`);
@@ -34553,9 +34511,9 @@ async function loadContextStore(workspaceId) {
34553
34511
  const dir = contextStoreDir(workspaceId);
34554
34512
  try {
34555
34513
  const [summaryRaw, digestRaw, metadataRaw] = await Promise.all([
34556
- fs35.readFile(path41.join(dir, SUMMARY_FILE), "utf8"),
34557
- fs35.readFile(path41.join(dir, DIGEST_FILE), "utf8"),
34558
- fs35.readFile(path41.join(dir, METADATA_FILE), "utf8")
34514
+ fs34.readFile(path40.join(dir, SUMMARY_FILE), "utf8"),
34515
+ fs34.readFile(path40.join(dir, DIGEST_FILE), "utf8"),
34516
+ fs34.readFile(path40.join(dir, METADATA_FILE), "utf8")
34559
34517
  ]);
34560
34518
  const summary = JSON.parse(summaryRaw);
34561
34519
  const metadata = JSON.parse(metadataRaw);
@@ -34625,10 +34583,10 @@ async function computeSummaryInputHash(deps) {
34625
34583
  const canonicalRootPaths = await canonicalizeRootPaths(deps.rootPaths);
34626
34584
  const optIn = await readOptIn(deps.tier);
34627
34585
  const bodyPaths = (optIn?.bodyInclusionPaths ?? []).slice().sort();
34628
- const ignoreFilePath = path41.join(resolveHome5(), ".codevibe", "structural-summary.ignore");
34586
+ const ignoreFilePath = path40.join(resolveHome4(), ".codevibe", "structural-summary.ignore");
34629
34587
  let ignoreFileHash = "absent";
34630
34588
  try {
34631
- const raw = await fs35.readFile(ignoreFilePath, "utf8");
34589
+ const raw = await fs34.readFile(ignoreFilePath, "utf8");
34632
34590
  ignoreFileHash = crypto14.createHash("sha256").update(raw, "utf8").digest("hex");
34633
34591
  } catch {
34634
34592
  }
@@ -34658,7 +34616,7 @@ async function canonicalizeRootPaths(rootPaths) {
34658
34616
  function stableUniqueRootPaths(rootPaths) {
34659
34617
  const seen = /* @__PURE__ */ new Set();
34660
34618
  const result = [];
34661
- for (const root of rootPaths.map((p) => path41.resolve(p)).sort(strictStringCompare)) {
34619
+ for (const root of rootPaths.map((p) => path40.resolve(p)).sort(strictStringCompare)) {
34662
34620
  if (seen.has(root)) continue;
34663
34621
  seen.add(root);
34664
34622
  result.push(root);
@@ -34702,10 +34660,10 @@ async function probeFreshness(deps) {
34702
34660
  return stale("input-hash-mismatch", true);
34703
34661
  }
34704
34662
  const cachedFreshnessByRoot = new Map(
34705
- deps.cached.metadata.rootFreshness.map((root) => [path41.resolve(root.rootPath), root])
34663
+ deps.cached.metadata.rootFreshness.map((root) => [path40.resolve(root.rootPath), root])
34706
34664
  );
34707
34665
  for (const liveRoot of rootFreshness) {
34708
- const cachedRoot = cachedFreshnessByRoot.get(path41.resolve(liveRoot.rootPath));
34666
+ const cachedRoot = cachedFreshnessByRoot.get(path40.resolve(liveRoot.rootPath));
34709
34667
  if (!cachedRoot) {
34710
34668
  return stale("root-set-mismatch");
34711
34669
  }
@@ -34729,7 +34687,7 @@ async function probeFreshness(deps) {
34729
34687
  }
34730
34688
  function rootFreshnessFromProbe(rootPath, git2) {
34731
34689
  return {
34732
- rootPath: path41.resolve(rootPath),
34690
+ rootPath: path40.resolve(rootPath),
34733
34691
  ...git2.gitTopLevel ? { gitTopLevel: git2.gitTopLevel } : {},
34734
34692
  isGitRepo: git2.isGitRepo,
34735
34693
  ...git2.head ? { head: git2.head } : {},
@@ -34805,7 +34763,7 @@ async function ensureFreshContextStore(deps) {
34805
34763
  const optIn = await readOptIn(tier);
34806
34764
  const summary = await generator.generate({
34807
34765
  rootPaths: canonicalRootPaths,
34808
- ignoreFile: path41.join(resolveHome5(), ".codevibe", "structural-summary.ignore"),
34766
+ ignoreFile: path40.join(resolveHome4(), ".codevibe", "structural-summary.ignore"),
34809
34767
  includeBodies: optIn?.bodyInclusionPaths ?? [],
34810
34768
  userId,
34811
34769
  tier
@@ -34858,8 +34816,8 @@ async function ensureFreshContextStore(deps) {
34858
34816
  }
34859
34817
 
34860
34818
  // src/orchestration-shell/root-discovery.ts
34861
- var fs36 = __toESM(require("fs/promises"));
34862
- var path42 = __toESM(require("path"));
34819
+ var fs35 = __toESM(require("fs/promises"));
34820
+ var path41 = __toESM(require("path"));
34863
34821
  var DEFAULT_DISCOVERY_MAX_DEPTH = 2;
34864
34822
  var DEFAULT_DISCOVERY_MAX_ROOTS = 25;
34865
34823
  var PRUNED_DIRECTORY_NAMES = /* @__PURE__ */ new Set([
@@ -34928,7 +34886,7 @@ async function discoverRepositoryRoots(deps = {}) {
34928
34886
  return true;
34929
34887
  }).sort(compareStrings);
34930
34888
  for (const child of childDirs) {
34931
- await walk2(path42.join(dir, child), depth + 1);
34889
+ await walk2(path41.join(dir, child), depth + 1);
34932
34890
  }
34933
34891
  }
34934
34892
  await walk2(launchDir, 0);
@@ -34951,16 +34909,16 @@ async function discoverRepositoryRoots(deps = {}) {
34951
34909
  };
34952
34910
  }
34953
34911
  async function canonicalizeDirectory(dir) {
34954
- const resolved = path42.resolve(dir);
34912
+ const resolved = path41.resolve(dir);
34955
34913
  try {
34956
- return await fs36.realpath(resolved);
34914
+ return await fs35.realpath(resolved);
34957
34915
  } catch {
34958
34916
  return resolved;
34959
34917
  }
34960
34918
  }
34961
34919
  async function readDirSafe(dir) {
34962
34920
  try {
34963
- return await fs36.readdir(dir, { withFileTypes: true });
34921
+ return await fs35.readdir(dir, { withFileTypes: true });
34964
34922
  } catch {
34965
34923
  return null;
34966
34924
  }
@@ -34976,8 +34934,8 @@ function ancestorRootsWithChildren(candidates) {
34976
34934
  ).sort(compareStrings);
34977
34935
  }
34978
34936
  function isStrictSubpath(parent, child) {
34979
- const rel = path42.relative(parent, child);
34980
- return rel.length > 0 && rel !== ".." && !rel.startsWith(`..${path42.sep}`) && !path42.isAbsolute(rel);
34937
+ const rel = path41.relative(parent, child);
34938
+ return rel.length > 0 && rel !== ".." && !rel.startsWith(`..${path41.sep}`) && !path41.isAbsolute(rel);
34981
34939
  }
34982
34940
  function compareStrings(a, b) {
34983
34941
  if (a < b) return -1;
@@ -34988,6 +34946,16 @@ function compareStrings(a, b) {
34988
34946
  // src/orchestration-shell/index.ts
34989
34947
  init_process_markers();
34990
34948
 
34949
+ // src/orchestration-shell/sticky-preference.ts
34950
+ var import_zod2 = require("zod");
34951
+ init_logger2();
34952
+ var LastModeFileSchema = import_zod2.z.object({
34953
+ schemaVersion: import_zod2.z.literal(1),
34954
+ mode: import_zod2.z.union([import_zod2.z.literal("companion"), import_zod2.z.literal("orchestration")]),
34955
+ pickedAt: import_zod2.z.string(),
34956
+ pickedByTier: import_zod2.z.union([import_zod2.z.literal("PRO"), import_zod2.z.literal("MAX")])
34957
+ });
34958
+
34991
34959
  // src/orchestration-shell/components/AuditLogPanel.tsx
34992
34960
  var React19 = __toESM(require("react"));
34993
34961
 
@@ -35131,15 +35099,21 @@ async function runOrchestrationShell(args) {
35131
35099
  try {
35132
35100
  unsubscribeEvents = args.appsyncClient.subscribeToEvents(
35133
35101
  args.session.sessionId,
35134
- (event) => {
35135
- handleSubscribedEvent(
35136
- event,
35137
- store,
35138
- sessionKeyResolver,
35139
- reviewSummaryFetcher,
35140
- maybeAutoContinueMax
35141
- );
35142
- },
35102
+ // The dispatcher routes MOBILE `USER_PROMPT`s into the shell's serialized
35103
+ // submission pipeline (mobile→desktop RETURN path) and everything else into
35104
+ // `handleSubscribedEvent` (gate/continuation prompts). `submit` is a THUNK so
35105
+ // the forward reference to `handleUserInput` (declared below) is read only when
35106
+ // an event actually arrives (async) — never during this synchronous setup.
35107
+ createSubscribedEventDispatcher({
35108
+ store,
35109
+ submit: (text2, images, options) => handleUserInput(text2, images, options),
35110
+ sessionKeyResolver,
35111
+ reviewSummaryFetcher,
35112
+ maybeAutoContinue: maybeAutoContinueMax,
35113
+ // Advance the mobile prompt's delivery checkmarks (DELIVERED → EXECUTED) via the
35114
+ // same `updateEventStatus` mutation the companion plugins use.
35115
+ updateEventStatus: (input) => args.appsyncClient.updateEventStatus(input)
35116
+ }),
35143
35117
  (err) => {
35144
35118
  logger.warn("[orchestration-shell] subscribeToEvents error (non-fatal)", {
35145
35119
  error: err.message
@@ -35150,8 +35124,12 @@ async function runOrchestrationShell(args) {
35150
35124
  // `source = DESKTOP` (`emittedBy = SYSTEM`). Opt into DESKTOP-source
35151
35125
  // delivery so those prompts reach handleSubscribedEvent — without
35152
35126
  // this they are filtered out as Companion-style desktop echoes and
35153
- // the orchestration loop appears to hang. The shell originates no
35154
- // createEvent rows of its own, so there are no self-echoes to drop.
35127
+ // the orchestration loop appears to hang. The shell now ALSO emits its
35128
+ // OWN DESKTOP mirror rows (Bug-A `emitOrchestrationTurnMirror`:
35129
+ // USER_PROMPT + ASSISTANT_RESPONSE), which are re-delivered here — they
35130
+ // are harmlessly dropped by `handleSubscribedEvent`'s INTERACTIVE_PROMPT
35131
+ // pre-check, and the mobile-return branch above only ever feeds
35132
+ // `source === 'MOBILE'` prompts, so the shell never re-feeds its own echo.
35155
35133
  { receiveDesktopEvents: true }
35156
35134
  );
35157
35135
  } catch (err) {
@@ -35262,16 +35240,29 @@ async function runOrchestrationShell(args) {
35262
35240
  }
35263
35241
  }
35264
35242
  const handleUserInput = serializeShellSubmissions(
35265
- (text2, images) => handleShellUserInput({
35266
- text: text2,
35267
- store,
35268
- args,
35269
- emitShellEventBound,
35270
- generator,
35271
- // IMAGE-ATTACHMENT-DESIGN.md §13 (Option 2) — the `[Image #N]` input-chip paths
35272
- // carried out-of-band from the InputBar (never re-detected from the chip text).
35273
- ...images && images.length ? { images } : {}
35274
- })
35243
+ async (text2, images, options) => {
35244
+ const fromMobile = options?.fromMobile === true;
35245
+ const convLenBefore = store.getState().conversation.length;
35246
+ const userTurnTimestamp = (/* @__PURE__ */ new Date()).toISOString();
35247
+ await handleShellUserInput({
35248
+ text: text2,
35249
+ store,
35250
+ args,
35251
+ emitShellEventBound,
35252
+ generator,
35253
+ // IMAGE-ATTACHMENT-DESIGN.md §13 (Option 2) — the `[Image #N]` input-chip paths
35254
+ // carried out-of-band from the InputBar (never re-detected from the chip text).
35255
+ ...images && images.length ? { images } : {}
35256
+ });
35257
+ await emitOrchestrationTurnMirror({
35258
+ store,
35259
+ sessionId: args.session.sessionId,
35260
+ emitShellEventBound,
35261
+ convLenBefore,
35262
+ userTurnTimestamp,
35263
+ skipUserPromptMirror: fromMobile
35264
+ });
35265
+ }
35275
35266
  );
35276
35267
  let teardownDone = false;
35277
35268
  const runPlannerTeardown = async () => {
@@ -35293,13 +35284,44 @@ async function runOrchestrationShell(args) {
35293
35284
  } catch {
35294
35285
  }
35295
35286
  };
35287
+ const SESSION_RETIRE_TIMEOUT_MS = 3e3;
35288
+ let sessionRetired = false;
35289
+ const retireSession = async () => {
35290
+ if (sessionRetired) return;
35291
+ sessionRetired = true;
35292
+ const sessionId = args.session.sessionId;
35293
+ if (sessionId.startsWith("cp1a-local-")) return;
35294
+ try {
35295
+ args.appsyncClient.stopHeartbeat(sessionId);
35296
+ } catch (err) {
35297
+ logger.warn("[orchestration-shell] stopHeartbeat on teardown failed", {
35298
+ error: err.message
35299
+ });
35300
+ }
35301
+ let retireTimer;
35302
+ try {
35303
+ await Promise.race([
35304
+ args.appsyncClient.updateSession({ sessionId, status: "INACTIVE" /* INACTIVE */ }),
35305
+ new Promise((resolve9) => {
35306
+ retireTimer = setTimeout(resolve9, SESSION_RETIRE_TIMEOUT_MS);
35307
+ retireTimer.unref?.();
35308
+ })
35309
+ ]);
35310
+ } catch (err) {
35311
+ logger.warn("[orchestration-shell] session retire (updateSession INACTIVE) on teardown failed", {
35312
+ error: err.message
35313
+ });
35314
+ } finally {
35315
+ if (retireTimer) clearTimeout(retireTimer);
35316
+ }
35317
+ };
35296
35318
  let inkUnmount = null;
35297
35319
  let nonTtyAbort = null;
35298
35320
  const signalsRegistered = /* @__PURE__ */ new Set();
35299
35321
  const onSignal = (sig) => {
35300
35322
  disableBracketedPaste();
35301
- void runPlannerTeardown().catch(() => void 0).finally(() => {
35302
- logger.info(`[orchestration-shell] caught ${sig}, planner teardown complete`);
35323
+ void Promise.allSettled([runPlannerTeardown(), retireSession()]).finally(() => {
35324
+ logger.info(`[orchestration-shell] caught ${sig}, teardown complete`);
35303
35325
  try {
35304
35326
  if (inkUnmount) {
35305
35327
  inkUnmount();
@@ -35429,7 +35451,10 @@ async function runOrchestrationShell(args) {
35429
35451
  // store merged; pass it straight through. ABSENT on a non-team session →
35430
35452
  // the optional spread keeps the props byte-identical.
35431
35453
  ...gateDecisionDeps.groupDecision ? { groupDecision: gateDecisionDeps.groupDecision } : {}
35432
- })
35454
+ }),
35455
+ // ink 7 emits synchronized output (DEC 2026) natively + manages the cursor
35456
+ // itself (via <InputBar>'s `useCursor`), so pass `process.stdout` straight.
35457
+ { stdout: process.stdout }
35433
35458
  );
35434
35459
  inkUnmount = unmount;
35435
35460
  const unsubscribe = store.subscribe((state) => {
@@ -35489,6 +35514,7 @@ async function runOrchestrationShell(args) {
35489
35514
  }
35490
35515
  signalsRegistered.clear();
35491
35516
  await runPlannerTeardown();
35517
+ await retireSession();
35492
35518
  }
35493
35519
  }
35494
35520
  var TASK_REVIEW_SUMMARY_FETCH_TIMEOUT_MS = 5e3;
@@ -35719,6 +35745,87 @@ async function routeNonGateInteractivePrompt(event, metadata, store, sessionKeyR
35719
35745
  });
35720
35746
  }
35721
35747
  }
35748
+ async function routeMobileUserPrompt(event, sessionKeyResolver, submit, updateEventStatus) {
35749
+ try {
35750
+ if (event.sessionId.startsWith("cp1a-local-")) return;
35751
+ let text2;
35752
+ if (event.isEncrypted) {
35753
+ if (!sessionKeyResolver) {
35754
+ logger.warn("[orchestration-shell] mobile USER_PROMPT dropped \u2014 no session-key resolver", {
35755
+ eventId: event.eventId
35756
+ });
35757
+ return;
35758
+ }
35759
+ let sessionKey = null;
35760
+ try {
35761
+ sessionKey = await sessionKeyResolver(event.sessionId);
35762
+ } catch (err) {
35763
+ logger.warn("[orchestration-shell] mobile USER_PROMPT session-key resolve threw", {
35764
+ eventId: event.eventId,
35765
+ error: err.message
35766
+ });
35767
+ return;
35768
+ }
35769
+ if (sessionKey === null) {
35770
+ logger.warn(
35771
+ "[orchestration-shell] mobile USER_PROMPT \u2014 session key unavailable, cannot decrypt",
35772
+ { eventId: event.eventId, sessionId: event.sessionId }
35773
+ );
35774
+ return;
35775
+ }
35776
+ try {
35777
+ text2 = cryptoService.decryptContent(event.content, sessionKey);
35778
+ } catch (err) {
35779
+ logger.warn("[orchestration-shell] mobile USER_PROMPT decryptContent failed", {
35780
+ eventId: event.eventId,
35781
+ error: err.message
35782
+ });
35783
+ return;
35784
+ }
35785
+ } else {
35786
+ text2 = typeof event.content === "string" ? event.content : "";
35787
+ }
35788
+ if (typeof text2 !== "string" || text2.trim().length === 0) return;
35789
+ const markStatus = async (status) => {
35790
+ if (!updateEventStatus || !event.eventId) return;
35791
+ try {
35792
+ await updateEventStatus({
35793
+ eventId: event.eventId,
35794
+ sessionId: event.sessionId,
35795
+ timestamp: event.timestamp,
35796
+ deliveryStatus: status
35797
+ });
35798
+ } catch (err) {
35799
+ logger.warn("[orchestration-shell] mobile USER_PROMPT status update failed (non-fatal)", {
35800
+ eventId: event.eventId,
35801
+ status,
35802
+ error: err.message
35803
+ });
35804
+ }
35805
+ };
35806
+ await markStatus("DELIVERED" /* DELIVERED */);
35807
+ try {
35808
+ await submit(text2, void 0, { fromMobile: true });
35809
+ } finally {
35810
+ await markStatus("EXECUTED" /* EXECUTED */);
35811
+ }
35812
+ } catch (err) {
35813
+ logger.warn("[orchestration-shell] mobile USER_PROMPT routing failed (non-fatal)", {
35814
+ eventId: event.eventId,
35815
+ error: err.message
35816
+ });
35817
+ }
35818
+ }
35819
+ function createSubscribedEventDispatcher(deps) {
35820
+ const { store, submit, sessionKeyResolver, reviewSummaryFetcher, maybeAutoContinue, updateEventStatus } = deps;
35821
+ return (event) => {
35822
+ if (event.source === "MOBILE" && event.type === "USER_PROMPT") {
35823
+ void routeMobileUserPrompt(event, sessionKeyResolver, submit, updateEventStatus);
35824
+ return;
35825
+ }
35826
+ handleSubscribedEvent(event, store, sessionKeyResolver, reviewSummaryFetcher, maybeAutoContinue);
35827
+ };
35828
+ }
35722
35829
  function routeTeamShellEventToStore(store, evt) {
35723
35830
  const md = evt.metadata;
35724
35831
  if (!md || typeof md !== "object") return;
@@ -36570,8 +36677,8 @@ function parseTeamWorkItems(rawArg) {
36570
36677
  if (item !== null && typeof item === "object") {
36571
36678
  const rec = item;
36572
36679
  if (typeof rec.description === "string" && rec.description.length > 0) {
36573
- const os33 = rec.ownershipScope;
36574
- const rawTestSurfaces = os33?.test_surfaces;
36680
+ const os32 = rec.ownershipScope;
36681
+ const rawTestSurfaces = os32?.test_surfaces;
36575
36682
  const testSurfaces = Array.isArray(rawTestSurfaces) ? rawTestSurfaces.filter((p) => typeof p === "string") : [];
36576
36683
  briefsByTrackIndex.set(i, appendTestSurfaceGuidance(rec.description, testSurfaces));
36577
36684
  }
@@ -36583,11 +36690,11 @@ function parseTeamWorkItems(rawArg) {
36583
36690
  }
36584
36691
  function serializeShellSubmissions(handler) {
36585
36692
  let queue = Promise.resolve();
36586
- return (text2, images) => {
36693
+ return (text2, images, options) => {
36587
36694
  if (/^\/[a-zA-Z][\w-]*(?:\s|$)/.test(text2)) {
36588
- return handler(text2, images);
36695
+ return handler(text2, images, options);
36589
36696
  }
36590
- const turn = queue.then(() => handler(text2, images));
36697
+ const turn = queue.then(() => handler(text2, images, options));
36591
36698
  queue = turn.then(
36592
36699
  () => void 0,
36593
36700
  () => void 0
@@ -37116,7 +37223,7 @@ async function handleShellUserInput(deps) {
37116
37223
  const isAnsweringPending = !!pendingForIngest && pendingForIngest.rounds.length > 0 && pendingForIngest.rounds[pendingForIngest.rounds.length - 1].answer === void 0;
37117
37224
  const existingAttachments = !text2.startsWith("/") && isAnsweringPending ? pendingForIngest.attachments : void 0;
37118
37225
  const cwd = args.cwd ?? process.cwd();
37119
- const homedir21 = os24.homedir();
37226
+ const homedir20 = os23.homedir();
37120
37227
  let ingest;
37121
37228
  if (deps.images && deps.images.length > 0) {
37122
37229
  const carried = attachmentsFromPaths(
@@ -37125,19 +37232,19 @@ async function handleShellUserInput(deps) {
37125
37232
  );
37126
37233
  const fromText = detectImageAttachments(text2.replace(/\[Image #\d+\]/g, " "), {
37127
37234
  cwd,
37128
- homedir: homedir21,
37235
+ homedir: homedir20,
37129
37236
  existing: carried.attachments
37130
37237
  });
37131
37238
  ingest = { attachments: fromText.attachments, rejects: [...carried.rejects, ...fromText.rejects] };
37132
37239
  } else {
37133
37240
  ingest = detectImageAttachments(text2, {
37134
37241
  cwd,
37135
- homedir: homedir21,
37242
+ homedir: homedir20,
37136
37243
  ...existingAttachments && existingAttachments.length ? { existing: existingAttachments } : {}
37137
37244
  });
37138
37245
  }
37139
37246
  const turnAttachments = ingest.attachments;
37140
- const turnImagePaths = (deps.images ?? []).map((p) => path43.resolve(p));
37247
+ const turnImagePaths = (deps.images ?? []).map((p) => path42.resolve(p));
37141
37248
  const teamDurableStore = typeof args.quorumLoop?.getDurableStore === "function" ? args.quorumLoop.getDurableStore() : void 0;
37142
37249
  const ingestAdvisory = formatIngestRejects(ingest.rejects);
37143
37250
  if (ingestAdvisory) {
@@ -37750,6 +37857,58 @@ async function handleShellUserInput(deps) {
37750
37857
  });
37751
37858
  }
37752
37859
  }
37860
+ async function emitOrchestrationTurnMirror(deps) {
37861
+ const {
37862
+ store,
37863
+ sessionId,
37864
+ emitShellEventBound,
37865
+ convLenBefore,
37866
+ userTurnTimestamp,
37867
+ skipUserPromptMirror
37868
+ } = deps;
37869
+ const delta = store.getState().conversation.slice(convLenBefore);
37870
+ const userEntry = delta.find(
37871
+ (e) => e.kind === "user-message"
37872
+ );
37873
+ if (!userEntry) return;
37874
+ if (userEntry.text.trim().length === 0) return;
37875
+ if (!skipUserPromptMirror) {
37876
+ await emitShellEventBound({
37877
+ sessionId,
37878
+ type: "USER_PROMPT",
37879
+ source: "DESKTOP",
37880
+ isEncrypted: true,
37881
+ content: userEntry.text,
37882
+ timestamp: userTurnTimestamp
37883
+ }).catch((err) => {
37884
+ logger.warn("[orchestration-shell] emit USER_PROMPT mirror failed (non-fatal)", {
37885
+ error: err.message
37886
+ });
37887
+ });
37888
+ }
37889
+ const isTeamTurn = delta.some(
37890
+ (e) => e.kind === "planner-decision" && (e.action === "start_task" || e.action === "team_decompose")
37891
+ );
37892
+ if (isTeamTurn) return;
37893
+ const replyText = delta.map((e) => {
37894
+ if (e.kind === "advisory") return e.text;
37895
+ if (e.kind === "slash-output" && e.command === "planner-error") return e.output;
37896
+ return "";
37897
+ }).map((t) => t.trim()).filter((t) => t.length > 0).join("\n\n").trim();
37898
+ if (replyText.length === 0) return;
37899
+ await emitShellEventBound({
37900
+ sessionId,
37901
+ type: "ASSISTANT_RESPONSE",
37902
+ source: "DESKTOP",
37903
+ isEncrypted: true,
37904
+ content: replyText,
37905
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
37906
+ }).catch((err) => {
37907
+ logger.warn("[orchestration-shell] emit ASSISTANT_RESPONSE mirror failed (non-fatal)", {
37908
+ error: err.message
37909
+ });
37910
+ });
37911
+ }
37753
37912
  function buildStatusSummary(state, quorumLoop) {
37754
37913
  const lines = [];
37755
37914
  if (state.team) {
@@ -37910,7 +38069,7 @@ async function runStructuralSummarySessionStart(deps) {
37910
38069
  const discovery = await discoverRepositoryRoots({ launchDir: process.cwd() });
37911
38070
  const summary = await generator.generate({
37912
38071
  rootPaths: discovery.rootPaths,
37913
- ignoreFile: path43.join(os24.homedir(), ".codevibe", "structural-summary.ignore"),
38072
+ ignoreFile: path42.join(os23.homedir(), ".codevibe", "structural-summary.ignore"),
37914
38073
  includeBodies: optIn?.bodyInclusionPaths ?? [],
37915
38074
  userId: args.session.userId,
37916
38075
  tier: args.tier
@@ -38075,8 +38234,8 @@ var PlannerDecisionSchema = import_zod3.z.object({
38075
38234
 
38076
38235
  // src/planner/cache.ts
38077
38236
  var import_node_fs20 = require("node:fs");
38078
- var path44 = __toESM(require("node:path"));
38079
- var os25 = __toESM(require("node:os"));
38237
+ var path43 = __toESM(require("node:path"));
38238
+ var os24 = __toESM(require("node:os"));
38080
38239
  var crypto15 = __toESM(require("node:crypto"));
38081
38240
  var TAXONOMY_VERSION = 2;
38082
38241
  var CACHE_SCHEMA_VERSION = 2;
@@ -38115,7 +38274,7 @@ var PlannerCacheLayer = class {
38115
38274
  this.signatureCache = /* @__PURE__ */ new Map();
38116
38275
  this.hydrated = /* @__PURE__ */ new Set();
38117
38276
  this.mutex = new AsyncMutex();
38118
- this.cacheRoot = cacheRoot ?? path44.join(os25.homedir(), ".codevibe", "cache");
38277
+ this.cacheRoot = cacheRoot ?? path43.join(os24.homedir(), ".codevibe", "cache");
38119
38278
  }
38120
38279
  async getWorkflowClassification(userId, prompt) {
38121
38280
  await this.hydrateWorkflowIfNeeded(userId);
@@ -38214,7 +38373,7 @@ var PlannerCacheLayer = class {
38214
38373
  const entries = await import_node_fs20.promises.readdir(this.cacheRoot, { withFileTypes: true });
38215
38374
  for (const ent of entries) {
38216
38375
  if (ent.isDirectory()) {
38217
- await this.rmRecursiveSafe(path44.join(this.cacheRoot, ent.name));
38376
+ await this.rmRecursiveSafe(path43.join(this.cacheRoot, ent.name));
38218
38377
  }
38219
38378
  }
38220
38379
  } catch {
@@ -38224,7 +38383,7 @@ var PlannerCacheLayer = class {
38224
38383
  async purgeOnUserSwitch(newUserId) {
38225
38384
  await this.mutex.run(async () => {
38226
38385
  const newPrefix = this.userIdPrefix(newUserId);
38227
- const markerPath = path44.join(this.cacheRoot, ".last-user");
38386
+ const markerPath = path43.join(this.cacheRoot, ".last-user");
38228
38387
  let lastUserPrefix = null;
38229
38388
  try {
38230
38389
  const raw = (await import_node_fs20.promises.readFile(markerPath, "utf-8")).trim();
@@ -38246,7 +38405,7 @@ var PlannerCacheLayer = class {
38246
38405
  const entries = await import_node_fs20.promises.readdir(this.cacheRoot, { withFileTypes: true });
38247
38406
  for (const ent of entries) {
38248
38407
  if (ent.isDirectory()) {
38249
- await this.rmRecursiveSafe(path44.join(this.cacheRoot, ent.name));
38408
+ await this.rmRecursiveSafe(path43.join(this.cacheRoot, ent.name));
38250
38409
  }
38251
38410
  }
38252
38411
  } catch {
@@ -38266,8 +38425,8 @@ var PlannerCacheLayer = class {
38266
38425
  this.hydrated.add(userId);
38267
38426
  const filePath = this.workflowFilePath(userId);
38268
38427
  try {
38269
- const stat7 = await import_node_fs20.promises.stat(filePath);
38270
- if ((stat7.mode & 63) !== 0) {
38428
+ const stat6 = await import_node_fs20.promises.stat(filePath);
38429
+ if ((stat6.mode & 63) !== 0) {
38271
38430
  await this.rotateCorrupt(filePath);
38272
38431
  return;
38273
38432
  }
@@ -38305,13 +38464,13 @@ var PlannerCacheLayer = class {
38305
38464
  await import_node_fs20.promises.rename(tmp, filePath);
38306
38465
  }
38307
38466
  cacheDir(userId) {
38308
- return path44.join(this.cacheRoot, this.userIdPrefix(userId));
38467
+ return path43.join(this.cacheRoot, this.userIdPrefix(userId));
38309
38468
  }
38310
38469
  userIdPrefix(userId) {
38311
38470
  return crypto15.createHash("sha256").update(userId).digest("hex").slice(0, 16);
38312
38471
  }
38313
38472
  workflowFilePath(userId) {
38314
- return path44.join(this.cacheDir(userId), "workflow-query-classifications.json");
38473
+ return path43.join(this.cacheDir(userId), "workflow-query-classifications.json");
38315
38474
  }
38316
38475
  canonicalize(prompt) {
38317
38476
  return crypto15.createHash("sha256").update(`taxonomy:${TAXONOMY_VERSION}\0${prompt.trim().toLowerCase()}`).digest("hex");
@@ -39038,7 +39197,7 @@ var import_uuid12 = require("uuid");
39038
39197
 
39039
39198
  // src/substrate-launch/engage-substrate.ts
39040
39199
  var import_node_fs26 = require("node:fs");
39041
- var path49 = __toESM(require("node:path"));
39200
+ var path48 = __toESM(require("node:path"));
39042
39201
 
39043
39202
  // src/credential-broker/types.ts
39044
39203
  var BROKER_ROUTES = [
@@ -39121,9 +39280,9 @@ var PROVIDER_CONFIGS = {
39121
39280
  function getProviderConfig(provider) {
39122
39281
  return PROVIDER_CONFIGS[provider];
39123
39282
  }
39124
- function providerForPath(path55) {
39125
- if (path55 === "/v1/messages") return "anthropic";
39126
- if (path55 === "/v1/responses") return "openai";
39283
+ function providerForPath(path54) {
39284
+ if (path54 === "/v1/messages") return "anthropic";
39285
+ if (path54 === "/v1/responses") return "openai";
39127
39286
  return null;
39128
39287
  }
39129
39288
 
@@ -39363,16 +39522,16 @@ function joinPath(base, key) {
39363
39522
  }
39364
39523
  return `${base}['${key.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}']`;
39365
39524
  }
39366
- function scrubValue(value, path55, findings) {
39525
+ function scrubValue(value, path54, findings) {
39367
39526
  if (typeof value === "string") {
39368
39527
  const { redacted, classes } = scrubString(value);
39369
39528
  for (const patternClass of classes) {
39370
- findings.push({ field: path55, patternClass });
39529
+ findings.push({ field: path54, patternClass });
39371
39530
  }
39372
39531
  return redacted;
39373
39532
  }
39374
39533
  if (Array.isArray(value)) {
39375
- return value.map((item, i) => scrubValue(item, joinPath(path55, i), findings));
39534
+ return value.map((item, i) => scrubValue(item, joinPath(path54, i), findings));
39376
39535
  }
39377
39536
  if (value !== null && typeof value === "object") {
39378
39537
  const out = /* @__PURE__ */ Object.create(null);
@@ -39381,11 +39540,11 @@ function scrubValue(value, path55, findings) {
39381
39540
  if (keyIsSecret(k)) {
39382
39541
  redactedKeyCount += 1;
39383
39542
  const placeholder = `${KEY_REDACTION}-${redactedKeyCount}`;
39384
- const placeholderPath = joinPath(path55, placeholder);
39543
+ const placeholderPath = joinPath(path54, placeholder);
39385
39544
  findings.push({ field: placeholderPath, patternClass: "secret_object_key" });
39386
39545
  out[placeholder] = scrubValue(v, placeholderPath, findings);
39387
39546
  } else {
39388
- out[k] = scrubValue(v, joinPath(path55, k), findings);
39547
+ out[k] = scrubValue(v, joinPath(path54, k), findings);
39389
39548
  }
39390
39549
  }
39391
39550
  return out;
@@ -39469,8 +39628,8 @@ function selfCredentialGuard(body, secrets) {
39469
39628
  const SELF_CRED_KEY_REDACTION = "[REDACTED-SELF-CRED-KEY]";
39470
39629
  const GENERAL_KEY_REDACTION = "[REDACTED-CP7-KEY]";
39471
39630
  const keyHasSelfCred = (k) => nonEmpty.some((secret) => k.includes(secret));
39472
- const buildPath = (path55, k) => /^[A-Za-z_][A-Za-z0-9_]*$/.test(k) ? `${path55}.${k}` : `${path55}['${k.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}']`;
39473
- const walk2 = (value, path55) => {
39631
+ const buildPath = (path54, k) => /^[A-Za-z_][A-Za-z0-9_]*$/.test(k) ? `${path54}.${k}` : `${path54}['${k.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}']`;
39632
+ const walk2 = (value, path54) => {
39474
39633
  if (typeof value === "string") {
39475
39634
  if (nonEmpty.length === 0) return value;
39476
39635
  let out = value;
@@ -39481,11 +39640,11 @@ function selfCredentialGuard(body, secrets) {
39481
39640
  leaked = true;
39482
39641
  }
39483
39642
  }
39484
- if (leaked) leakedPaths.push(path55);
39643
+ if (leaked) leakedPaths.push(path54);
39485
39644
  return out;
39486
39645
  }
39487
39646
  if (Array.isArray(value)) {
39488
- return value.map((item, i) => walk2(item, `${path55}[${i}]`));
39647
+ return value.map((item, i) => walk2(item, `${path54}[${i}]`));
39489
39648
  }
39490
39649
  if (value !== null && typeof value === "object") {
39491
39650
  const out = /* @__PURE__ */ Object.create(null);
@@ -39495,17 +39654,17 @@ function selfCredentialGuard(body, secrets) {
39495
39654
  if (nonEmpty.length > 0 && keyHasSelfCred(k)) {
39496
39655
  selfCredKeyCount += 1;
39497
39656
  const placeholderKey = `${SELF_CRED_KEY_REDACTION}-${selfCredKeyCount}`;
39498
- const placeholderPath = buildPath(path55, placeholderKey);
39657
+ const placeholderPath = buildPath(path54, placeholderKey);
39499
39658
  leakedPaths.push(placeholderPath);
39500
39659
  out[placeholderKey] = walk2(v, placeholderPath);
39501
39660
  } else if (keyIsSecret(k)) {
39502
39661
  secretKeyCount += 1;
39503
39662
  const placeholderKey = `${GENERAL_KEY_REDACTION}-${secretKeyCount}`;
39504
- const placeholderPath = buildPath(path55, placeholderKey);
39663
+ const placeholderPath = buildPath(path54, placeholderKey);
39505
39664
  keyScrubs.push({ field: placeholderPath, patternClass: "secret_object_key" });
39506
39665
  out[placeholderKey] = walk2(v, placeholderPath);
39507
39666
  } else {
39508
- out[k] = walk2(v, buildPath(path55, k));
39667
+ out[k] = walk2(v, buildPath(path54, k));
39509
39668
  }
39510
39669
  }
39511
39670
  return out;
@@ -39764,10 +39923,10 @@ var LocalModelGatewayBroker = class {
39764
39923
  const selfSecrets = [key, ...this.tokenMinter.acceptedValues()];
39765
39924
  const guard = selfCredentialGuard(canonical.body, selfSecrets);
39766
39925
  const scrub = scrubRequestBody(guard.body);
39767
- for (const path55 of guard.leakedPaths) {
39926
+ for (const path54 of guard.leakedPaths) {
39768
39927
  const acked = await this.emitGated("model_context_scrubbed", {
39769
39928
  model_call_id: modelCallId,
39770
- field: path55,
39929
+ field: path54,
39771
39930
  pattern_class: "self_credential"
39772
39931
  });
39773
39932
  if (!acked) {
@@ -39960,7 +40119,7 @@ var LocalModelGatewayBroker = class {
39960
40119
  try {
39961
40120
  const method = req.method ?? "GET";
39962
40121
  const url = new URL(req.url ?? "/", "http://127.0.0.1");
39963
- const path55 = url.pathname;
40122
+ const path54 = url.pathname;
39964
40123
  const agentHeaders = {};
39965
40124
  for (const [k, v] of Object.entries(req.headers)) {
39966
40125
  if (typeof v === "string") agentHeaders[k.toLowerCase()] = v;
@@ -39981,13 +40140,13 @@ var LocalModelGatewayBroker = class {
39981
40140
  }
39982
40141
  }
39983
40142
  }
39984
- if (bodyParseFailed && BROKER_ROUTES.some((r) => r.method === method && r.path === path55)) {
40143
+ if (bodyParseFailed && BROKER_ROUTES.some((r) => r.method === method && r.path === path54)) {
39985
40144
  this.writeJson(res, 400, { error: "malformed JSON body" });
39986
40145
  return;
39987
40146
  }
39988
40147
  const result = await this.handle({
39989
40148
  method,
39990
- path: path55,
40149
+ path: path54,
39991
40150
  brokerToken,
39992
40151
  body,
39993
40152
  agentHeaders,
@@ -40083,8 +40242,8 @@ init_logger2();
40083
40242
 
40084
40243
  // src/substrate/docker.ts
40085
40244
  var import_node_fs23 = require("node:fs");
40086
- var os26 = __toESM(require("node:os"));
40087
- var path46 = __toESM(require("node:path"));
40245
+ var os25 = __toESM(require("node:os"));
40246
+ var path45 = __toESM(require("node:path"));
40088
40247
 
40089
40248
  // src/substrate/command-runner.ts
40090
40249
  var import_node_child_process7 = require("node:child_process");
@@ -40305,7 +40464,7 @@ var defaultForwarderFactory = (spec) => new HostEgressForwarder(spec);
40305
40464
 
40306
40465
  // src/substrate/git-proxy.ts
40307
40466
  var import_node_fs22 = require("node:fs");
40308
- var path45 = __toESM(require("node:path"));
40467
+ var path44 = __toESM(require("node:path"));
40309
40468
  var COPIED_GIT_ENTRIES = ["HEAD", "refs", "packed-refs", "objects"];
40310
40469
  var SCRUBBED_CONFIG = [
40311
40470
  "[core]",
@@ -40316,14 +40475,14 @@ var SCRUBBED_CONFIG = [
40316
40475
  ""
40317
40476
  ].join("\n");
40318
40477
  async function resolveGitCommonDir(workdir) {
40319
- const dotGit = path45.join(workdir, ".git");
40320
- let stat7;
40478
+ const dotGit = path44.join(workdir, ".git");
40479
+ let stat6;
40321
40480
  try {
40322
- stat7 = await import_node_fs22.promises.stat(dotGit);
40481
+ stat6 = await import_node_fs22.promises.stat(dotGit);
40323
40482
  } catch {
40324
40483
  return null;
40325
40484
  }
40326
- if (stat7.isDirectory()) {
40485
+ if (stat6.isDirectory()) {
40327
40486
  return dotGit;
40328
40487
  }
40329
40488
  let contents;
@@ -40335,10 +40494,10 @@ async function resolveGitCommonDir(workdir) {
40335
40494
  const m = contents.match(/^gitdir:\s*(.+)\s*$/m);
40336
40495
  if (!m) return null;
40337
40496
  const worktreeGitDir = m[1].trim();
40338
- const worktreesDir = path45.dirname(worktreeGitDir);
40339
- const commonDir = path45.dirname(worktreesDir);
40497
+ const worktreesDir = path44.dirname(worktreeGitDir);
40498
+ const commonDir = path44.dirname(worktreesDir);
40340
40499
  try {
40341
- await import_node_fs22.promises.access(path45.join(commonDir, "objects"));
40500
+ await import_node_fs22.promises.access(path44.join(commonDir, "objects"));
40342
40501
  } catch {
40343
40502
  return null;
40344
40503
  }
@@ -40350,7 +40509,7 @@ async function buildScrubbedGitProxy(workdir, destDir) {
40350
40509
  await import_node_fs22.promises.rm(destDir, { recursive: true, force: true });
40351
40510
  await import_node_fs22.promises.mkdir(destDir, { recursive: true });
40352
40511
  for (const entry of COPIED_GIT_ENTRIES) {
40353
- const src = path45.join(commonDir, entry);
40512
+ const src = path44.join(commonDir, entry);
40354
40513
  let exists = true;
40355
40514
  try {
40356
40515
  await import_node_fs22.promises.access(src);
@@ -40358,20 +40517,20 @@ async function buildScrubbedGitProxy(workdir, destDir) {
40358
40517
  exists = false;
40359
40518
  }
40360
40519
  if (!exists) continue;
40361
- const dest = path45.join(destDir, entry);
40520
+ const dest = path44.join(destDir, entry);
40362
40521
  await import_node_fs22.promises.cp(src, dest, {
40363
40522
  recursive: true,
40364
40523
  filter: (s) => !isUnderRefsRemotes(commonDir, s)
40365
40524
  });
40366
40525
  }
40367
- await scrubPackedRefsRemotes(path45.join(destDir, "packed-refs"));
40368
- await import_node_fs22.promises.writeFile(path45.join(destDir, "config"), SCRUBBED_CONFIG, "utf8");
40526
+ await scrubPackedRefsRemotes(path44.join(destDir, "packed-refs"));
40527
+ await import_node_fs22.promises.writeFile(path44.join(destDir, "config"), SCRUBBED_CONFIG, "utf8");
40369
40528
  return destDir;
40370
40529
  }
40371
40530
  function isUnderRefsRemotes(commonDir, srcPath) {
40372
- const rel = path45.relative(commonDir, srcPath);
40531
+ const rel = path44.relative(commonDir, srcPath);
40373
40532
  if (rel === "" || rel.startsWith("..")) return false;
40374
- const parts = rel.split(path45.sep);
40533
+ const parts = rel.split(path44.sep);
40375
40534
  return parts[0] === "refs" && parts[1] === "remotes";
40376
40535
  }
40377
40536
  async function scrubPackedRefsRemotes(packedRefsPath) {
@@ -40537,13 +40696,13 @@ var DockerSubstrate = class {
40537
40696
  this.forwarderFactory = deps.forwarderFactory ?? defaultForwarderFactory;
40538
40697
  this.onEgressDenied = deps.onEgressDenied ?? NOOP_EGRESS_HOOK;
40539
40698
  this.image = deps.image ?? DEFAULT_IMAGE;
40540
- this.sessionRoot = deps.sessionRoot ?? os26.tmpdir();
40699
+ this.sessionRoot = deps.sessionRoot ?? os25.tmpdir();
40541
40700
  }
40542
40701
  async launch(spec) {
40543
40702
  await this.assertDockerAvailable();
40544
40703
  const id = randomId();
40545
- const sessionDir = path46.join(this.sessionRoot, `codevibe-substrate-${id}`);
40546
- const udsDir = path46.join(sessionDir, "uds");
40704
+ const sessionDir = path45.join(this.sessionRoot, `codevibe-substrate-${id}`);
40705
+ const udsDir = path45.join(sessionDir, "uds");
40547
40706
  try {
40548
40707
  await import_node_fs23.promises.mkdir(sessionDir, { recursive: true, mode: 448 });
40549
40708
  await import_node_fs23.promises.mkdir(udsDir, { recursive: true, mode: 448 });
@@ -40555,8 +40714,8 @@ var DockerSubstrate = class {
40555
40714
  e
40556
40715
  );
40557
40716
  }
40558
- const udsPath = path46.join(udsDir, BROKER_SOCK_NAME);
40559
- const relayScriptPath = path46.join(sessionDir, "relay.js");
40717
+ const udsPath = path45.join(udsDir, BROKER_SOCK_NAME);
40718
+ const relayScriptPath = path45.join(sessionDir, "relay.js");
40560
40719
  try {
40561
40720
  await import_node_fs23.promises.writeFile(relayScriptPath, IN_CONTAINER_RELAY_SOURCE, {
40562
40721
  encoding: "utf8",
@@ -40589,7 +40748,7 @@ var DockerSubstrate = class {
40589
40748
  let gitProxyPath = null;
40590
40749
  let gitProxyIsEmptyFallback = false;
40591
40750
  try {
40592
- const dest = path46.join(sessionDir, "gitproxy");
40751
+ const dest = path45.join(sessionDir, "gitproxy");
40593
40752
  gitProxyPath = await buildScrubbedGitProxy(spec.workdir, dest);
40594
40753
  if (gitProxyPath === null) {
40595
40754
  gitProxyPath = await this.ensureGitOverlayOrFailClosed(
@@ -40676,16 +40835,16 @@ var DockerSubstrate = class {
40676
40835
  * those "exists" cases must be shadowed.
40677
40836
  */
40678
40837
  async ensureGitOverlayOrFailClosed(workdir, sessionDir, forwarder) {
40679
- const hasRealGit = await import_node_fs23.promises.stat(path46.join(workdir, ".git")).then(() => true).catch(() => false);
40838
+ const hasRealGit = await import_node_fs23.promises.stat(path45.join(workdir, ".git")).then(() => true).catch(() => false);
40680
40839
  if (!hasRealGit) {
40681
40840
  return null;
40682
40841
  }
40683
40842
  try {
40684
- const emptyDest = path46.join(sessionDir, "gitproxy");
40843
+ const emptyDest = path45.join(sessionDir, "gitproxy");
40685
40844
  await import_node_fs23.promises.rm(emptyDest, { recursive: true, force: true });
40686
40845
  await import_node_fs23.promises.mkdir(emptyDest, { recursive: true, mode: 448 });
40687
40846
  await import_node_fs23.promises.writeFile(
40688
- path46.join(emptyDest, "config"),
40847
+ path45.join(emptyDest, "config"),
40689
40848
  EMPTY_SCRUBBED_GIT_CONFIG,
40690
40849
  { encoding: "utf8", mode: 384 }
40691
40850
  );
@@ -40727,8 +40886,8 @@ function randomId() {
40727
40886
 
40728
40887
  // src/substrate-launch/apikey-bootstrap.ts
40729
40888
  var import_node_fs24 = require("node:fs");
40730
- var os27 = __toESM(require("node:os"));
40731
- var path47 = __toESM(require("node:path"));
40889
+ var os26 = __toESM(require("node:os"));
40890
+ var path46 = __toESM(require("node:path"));
40732
40891
  var HELPER_SCRIPT_NAME = "broker-apikey-helper.sh";
40733
40892
  var TOKEN_FILE_NAME = "broker-token";
40734
40893
  var CLAUDE_SETTINGS_NAME = "settings.json";
@@ -40769,8 +40928,8 @@ function tomlStr(s) {
40769
40928
  }
40770
40929
  function isInsideOrEqual(child, parent) {
40771
40930
  if (child === parent) return true;
40772
- const rel = path47.relative(parent, child);
40773
- return rel.length > 0 && !rel.startsWith("..") && !path47.isAbsolute(rel);
40931
+ const rel = path46.relative(parent, child);
40932
+ return rel.length > 0 && !rel.startsWith("..") && !path46.isAbsolute(rel);
40774
40933
  }
40775
40934
  var ApiKeyBootstrap = class _ApiKeyBootstrap {
40776
40935
  constructor(hostDir, sandboxDir, tokenFileHostPath) {
@@ -40784,8 +40943,8 @@ var ApiKeyBootstrap = class _ApiKeyBootstrap {
40784
40943
  * the live {@link ApiKeyBootstrap}.
40785
40944
  */
40786
40945
  static async create(input) {
40787
- const hostRoot = input.hostRoot ?? os27.tmpdir();
40788
- const rawHostDir = await import_node_fs24.promises.mkdtemp(path47.join(hostRoot, "codevibe-agent-"));
40946
+ const hostRoot = input.hostRoot ?? os26.tmpdir();
40947
+ const rawHostDir = await import_node_fs24.promises.mkdtemp(path46.join(hostRoot, "codevibe-agent-"));
40789
40948
  await import_node_fs24.promises.chmod(rawHostDir, 448).catch(() => void 0);
40790
40949
  const hostDir = await import_node_fs24.promises.realpath(rawHostDir);
40791
40950
  if (input.workdir !== void 0) {
@@ -40812,27 +40971,27 @@ var ApiKeyBootstrap = class _ApiKeyBootstrap {
40812
40971
  "ApiKeyBootstrap.create: provide `sandboxDir` or `sandboxDirEqualsHostDir`"
40813
40972
  );
40814
40973
  }
40815
- const tokenInSandbox = path47.posix.join(sandboxDir, TOKEN_FILE_NAME);
40816
- const helperInSandbox = path47.posix.join(sandboxDir, HELPER_SCRIPT_NAME);
40817
- const tokenFileHostPath = path47.join(hostDir, TOKEN_FILE_NAME);
40974
+ const tokenInSandbox = path46.posix.join(sandboxDir, TOKEN_FILE_NAME);
40975
+ const helperInSandbox = path46.posix.join(sandboxDir, HELPER_SCRIPT_NAME);
40976
+ const tokenFileHostPath = path46.join(hostDir, TOKEN_FILE_NAME);
40818
40977
  await import_node_fs24.promises.writeFile(tokenFileHostPath, input.initialToken, {
40819
40978
  encoding: "utf8",
40820
40979
  mode: 384
40821
40980
  });
40822
40981
  await import_node_fs24.promises.writeFile(
40823
- path47.join(hostDir, HELPER_SCRIPT_NAME),
40982
+ path46.join(hostDir, HELPER_SCRIPT_NAME),
40824
40983
  helperScriptSource(tokenInSandbox),
40825
40984
  { encoding: "utf8", mode: 448 }
40826
40985
  );
40827
40986
  if (input.provider === "anthropic") {
40828
40987
  await import_node_fs24.promises.writeFile(
40829
- path47.join(hostDir, CLAUDE_SETTINGS_NAME),
40988
+ path46.join(hostDir, CLAUDE_SETTINGS_NAME),
40830
40989
  claudeSettings(helperInSandbox),
40831
40990
  { encoding: "utf8", mode: 384 }
40832
40991
  );
40833
40992
  } else {
40834
40993
  await import_node_fs24.promises.writeFile(
40835
- path47.join(hostDir, CODEX_CONFIG_NAME),
40994
+ path46.join(hostDir, CODEX_CONFIG_NAME),
40836
40995
  codexConfig(input.sandboxBrokerUrl, helperInSandbox),
40837
40996
  { encoding: "utf8", mode: 384 }
40838
40997
  );
@@ -40864,8 +41023,8 @@ var ApiKeyBootstrap = class _ApiKeyBootstrap {
40864
41023
 
40865
41024
  // src/substrate/sandbox-exec.ts
40866
41025
  var import_node_fs25 = require("node:fs");
40867
- var os28 = __toESM(require("node:os"));
40868
- var path48 = __toESM(require("node:path"));
41026
+ var os27 = __toESM(require("node:os"));
41027
+ var path47 = __toESM(require("node:path"));
40869
41028
  var import_node_path2 = require("node:path");
40870
41029
  var NODE_PREFIXES = ["/opt/homebrew", "/usr/local", "/opt/local"];
40871
41030
  var FILE_KEYCHAIN_DIR_NAME = ".codevibe";
@@ -40892,10 +41051,10 @@ var SYSCTL_READ_ALLOW = [
40892
41051
  ];
40893
41052
  function ancestorDirEntries(dir) {
40894
41053
  const out = [];
40895
- let cur = path48.dirname(dir);
41054
+ let cur = path47.dirname(dir);
40896
41055
  while (true) {
40897
41056
  out.push(cur);
40898
- const parent = path48.dirname(cur);
41057
+ const parent = path47.dirname(cur);
40899
41058
  if (parent === cur) break;
40900
41059
  cur = parent;
40901
41060
  }
@@ -40914,7 +41073,7 @@ function nodeReadDirs(execPath) {
40914
41073
  }
40915
41074
  return [...dirs];
40916
41075
  }
40917
- function buildSeatbeltProfile(workdir, execPath = process.execPath, extraReadDirs = [], gitProxyDir = null, homedir21 = os28.homedir(), auditDir = null) {
41076
+ function buildSeatbeltProfile(workdir, execPath = process.execPath, extraReadDirs = [], gitProxyDir = null, homedir20 = os27.homedir(), auditDir = null) {
40918
41077
  const esc = (s) => s.replace(/"/g, '\\"');
40919
41078
  const wd = esc(workdir);
40920
41079
  const lines = [
@@ -41040,7 +41199,7 @@ function buildSeatbeltProfile(workdir, execPath = process.execPath, extraReadDir
41040
41199
  `(deny file-read* (subpath "${wd}/.git"))`,
41041
41200
  `(deny file-write* (subpath "${wd}/.git"))`
41042
41201
  );
41043
- const fileKeychainDir = esc(path48.join(homedir21, FILE_KEYCHAIN_DIR_NAME));
41202
+ const fileKeychainDir = esc(path47.join(homedir20, FILE_KEYCHAIN_DIR_NAME));
41044
41203
  lines.push(
41045
41204
  `(deny file-read* (subpath "${fileKeychainDir}"))`,
41046
41205
  `(deny file-write* (subpath "${fileKeychainDir}"))`
@@ -41065,7 +41224,7 @@ async function resolveOnParentPath(cmd) {
41065
41224
  const parentPath = process.env.PATH ?? "";
41066
41225
  for (const dir of parentPath.split(":")) {
41067
41226
  if (!dir) continue;
41068
- const candidate = path48.join(dir, cmd);
41227
+ const candidate = path47.join(dir, cmd);
41069
41228
  try {
41070
41229
  await import_node_fs25.promises.access(candidate, import_node_fs25.constants.X_OK);
41071
41230
  return candidate;
@@ -41100,15 +41259,15 @@ var SandboxExecHandle = class {
41100
41259
  }
41101
41260
  const realArgv0 = await import_node_fs25.promises.realpath(resolvedArgv0).catch(() => resolvedArgv0);
41102
41261
  const deniedRoots = [
41103
- path48.join(os28.homedir(), ".codevibe"),
41104
- path48.join(this.workdir, ".git"),
41262
+ path47.join(os27.homedir(), ".codevibe"),
41263
+ path47.join(this.workdir, ".git"),
41105
41264
  ...this.auditDir !== null ? [this.auditDir] : []
41106
41265
  ];
41107
41266
  const overlapsDeniedRoot = (d) => deniedRoots.some(
41108
- (root) => d === root || d.startsWith(root + path48.sep) || root.startsWith(d + path48.sep)
41267
+ (root) => d === root || d.startsWith(root + path47.sep) || root.startsWith(d + path47.sep)
41109
41268
  );
41110
- const broadRoots = /* @__PURE__ */ new Set(["/", "/Users", "/home", os28.homedir()]);
41111
- const binDirs = /* @__PURE__ */ new Set([path48.dirname(resolvedArgv0), path48.dirname(realArgv0)]);
41269
+ const broadRoots = /* @__PURE__ */ new Set(["/", "/Users", "/home", os27.homedir()]);
41270
+ const binDirs = /* @__PURE__ */ new Set([path47.dirname(resolvedArgv0), path47.dirname(realArgv0)]);
41112
41271
  for (const d of binDirs) {
41113
41272
  if (overlapsDeniedRoot(d) || broadRoots.has(d)) {
41114
41273
  throw new SubstrateLaunchError(
@@ -41155,7 +41314,7 @@ ${allowLines}
41155
41314
  var SandboxExecSubstrate = class {
41156
41315
  constructor(deps = {}) {
41157
41316
  this.runner = deps.runner ?? new ChildProcessCommandRunner();
41158
- this.profileRoot = deps.profileRoot ?? os28.tmpdir();
41317
+ this.profileRoot = deps.profileRoot ?? os27.tmpdir();
41159
41318
  this.platform = deps.platform ?? process.platform;
41160
41319
  }
41161
41320
  async launch(spec) {
@@ -41184,10 +41343,10 @@ var SandboxExecSubstrate = class {
41184
41343
  let gitProxyDir = null;
41185
41344
  let gitEnv = {};
41186
41345
  try {
41187
- const sd = path48.join(this.profileRoot, `codevibe-seatbelt-${id}`);
41346
+ const sd = path47.join(this.profileRoot, `codevibe-seatbelt-${id}`);
41188
41347
  await import_node_fs25.promises.mkdir(sd, { recursive: true, mode: 448 });
41189
41348
  sessionDir = sd;
41190
- const proxyDest = path48.join(sd, "gitproxy");
41349
+ const proxyDest = path47.join(sd, "gitproxy");
41191
41350
  const builtProxy = await buildScrubbedGitProxy(canonicalWorkdir, proxyDest);
41192
41351
  if (builtProxy !== null) {
41193
41352
  gitProxyDir = await import_node_fs25.promises.realpath(builtProxy).catch(() => builtProxy);
@@ -41225,10 +41384,10 @@ var SandboxExecSubstrate = class {
41225
41384
  process.execPath,
41226
41385
  extraReadDirs,
41227
41386
  gitProxyDir,
41228
- os28.homedir(),
41387
+ os27.homedir(),
41229
41388
  resolvedAuditDir
41230
41389
  );
41231
- const profilePath = path48.join(this.profileRoot, `codevibe-seatbelt-${id}.sb`);
41390
+ const profilePath = path47.join(this.profileRoot, `codevibe-seatbelt-${id}.sb`);
41232
41391
  try {
41233
41392
  await import_node_fs25.promises.writeFile(profilePath, profile, { encoding: "utf8", mode: 384 });
41234
41393
  } catch (e) {
@@ -41381,21 +41540,21 @@ var CODEVIBE_DIR = ".codevibe";
41381
41540
  var AUDIT_FILE_NAME = "audit.jsonl";
41382
41541
  function isInsideOrEqual2(child, parent) {
41383
41542
  if (child === parent) return true;
41384
- const rel = path49.relative(parent, child);
41385
- return rel.length > 0 && !rel.startsWith("..") && !path49.isAbsolute(rel);
41543
+ const rel = path48.relative(parent, child);
41544
+ return rel.length > 0 && !rel.startsWith("..") && !path48.isAbsolute(rel);
41386
41545
  }
41387
41546
  function deriveAuditPath(workdir) {
41388
- const parts = workdir.split(path49.sep);
41547
+ const parts = workdir.split(path48.sep);
41389
41548
  for (let i = parts.length - 2; i >= 0; i--) {
41390
41549
  if (parts[i] === CODEVIBE_DIR && parts[i + 1] === STATE_SEGMENT) {
41391
41550
  const swapped = [...parts];
41392
41551
  swapped[i + 1] = AUDIT_SEGMENT;
41393
- return path49.join(swapped.join(path49.sep), AUDIT_FILE_NAME);
41552
+ return path48.join(swapped.join(path48.sep), AUDIT_FILE_NAME);
41394
41553
  }
41395
41554
  }
41396
- const parent = path49.dirname(workdir);
41397
- const base = path49.basename(workdir);
41398
- return path49.join(parent, ".codevibe-audit", base, AUDIT_FILE_NAME);
41555
+ const parent = path48.dirname(workdir);
41556
+ const base = path48.basename(workdir);
41557
+ return path48.join(parent, ".codevibe-audit", base, AUDIT_FILE_NAME);
41399
41558
  }
41400
41559
  async function assertAuditOutsideWorkdir(auditPath, workdir) {
41401
41560
  let realWorkdir;
@@ -41406,7 +41565,7 @@ async function assertAuditOutsideWorkdir(auditPath, workdir) {
41406
41565
  `CP-7 W3: cannot realpath workdir "${workdir}" \u2014 refusing to launch (audit containment fail-closed)`
41407
41566
  );
41408
41567
  }
41409
- const auditDir = path49.dirname(auditPath);
41568
+ const auditDir = path48.dirname(auditPath);
41410
41569
  await import_node_fs26.promises.mkdir(auditDir, { recursive: true });
41411
41570
  let realAuditDir;
41412
41571
  try {
@@ -41416,7 +41575,7 @@ async function assertAuditOutsideWorkdir(auditPath, workdir) {
41416
41575
  `CP-7 W3: cannot realpath audit dir "${auditDir}" \u2014 refusing to launch (fail-closed)`
41417
41576
  );
41418
41577
  }
41419
- const resolvedAuditPath = path49.join(realAuditDir, path49.basename(auditPath));
41578
+ const resolvedAuditPath = path48.join(realAuditDir, path48.basename(auditPath));
41420
41579
  let leafStat;
41421
41580
  try {
41422
41581
  leafStat = await import_node_fs26.promises.lstat(resolvedAuditPath);
@@ -41469,7 +41628,7 @@ async function engageSubstrate(input) {
41469
41628
  derivedAuditPath,
41470
41629
  input.workdir
41471
41630
  );
41472
- resolvedAuditDir = path49.dirname(resolvedAuditPath);
41631
+ resolvedAuditDir = path48.dirname(resolvedAuditPath);
41473
41632
  auditSink = new Cp7AuditWriter(input.taskId, resolvedAuditPath);
41474
41633
  }
41475
41634
  const upstreamClient = input.upstreamClient ?? new FetchUpstreamClient();
@@ -42015,6 +42174,8 @@ var DEFAULT_TIMEOUT_MS3 = 6e4;
42015
42174
  var MAX_TIMEOUT_MS2 = 5 * 6e4;
42016
42175
  var MAX_RESPONSE_BYTES = 512 * 1024;
42017
42176
  var OLLAMA_MODEL_RE = /^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,127}$/;
42177
+ var PULL_STALL_TIMEOUT_MS = 5 * 6e4;
42178
+ var MAX_PULL_LINE_BYTES = 1024 * 1024;
42018
42179
  function trimEnvValue2(value) {
42019
42180
  const trimmed = value?.trim();
42020
42181
  return trimmed ? trimmed : null;
@@ -42149,23 +42310,108 @@ function requestOllamaGenerate(config, promptText, opts) {
42149
42310
  }
42150
42311
  });
42151
42312
  }
42152
- async function requestOllamaPull(config) {
42153
- const body = JSON.stringify({
42154
- name: config.model,
42155
- stream: false
42313
+ function requestOllamaPull(config, onProgress = () => void 0, options) {
42314
+ const url = new URL("/api/pull", config.host);
42315
+ const body = JSON.stringify({ name: config.model, stream: true });
42316
+ const stallTimeoutMs = typeof options?.stallTimeoutMs === "number" && options.stallTimeoutMs > 0 ? options.stallTimeoutMs : PULL_STALL_TIMEOUT_MS;
42317
+ return new Promise((resolve9, reject) => {
42318
+ let settled = false;
42319
+ let buffer = "";
42320
+ let stallTimer = null;
42321
+ const clearStall = () => {
42322
+ if (stallTimer) {
42323
+ clearTimeout(stallTimer);
42324
+ stallTimer = null;
42325
+ }
42326
+ };
42327
+ const finish = (fn) => {
42328
+ if (settled) return;
42329
+ settled = true;
42330
+ clearStall();
42331
+ fn();
42332
+ };
42333
+ const resetStall = () => {
42334
+ clearStall();
42335
+ stallTimer = setTimeout(() => {
42336
+ req.destroy(
42337
+ new Error(
42338
+ `Ollama pull stalled \u2014 no progress for ${Math.round(stallTimeoutMs / 1e3)}s`
42339
+ )
42340
+ );
42341
+ }, stallTimeoutMs);
42342
+ };
42343
+ const handleLine = (line) => {
42344
+ if (settled) return;
42345
+ const trimmed = line.trim();
42346
+ if (!trimmed) return;
42347
+ let parsed;
42348
+ try {
42349
+ parsed = JSON.parse(trimmed);
42350
+ } catch {
42351
+ return;
42352
+ }
42353
+ if (parsed.error) {
42354
+ finish(() => reject(new Error(`Ollama pull failed: ${parsed.error}`)));
42355
+ return;
42356
+ }
42357
+ const status = typeof parsed.status === "string" ? parsed.status : "";
42358
+ if (status) {
42359
+ onProgress({
42360
+ status,
42361
+ completed: typeof parsed.completed === "number" ? parsed.completed : void 0,
42362
+ total: typeof parsed.total === "number" ? parsed.total : void 0
42363
+ });
42364
+ if (status === "success") {
42365
+ finish(() => resolve9());
42366
+ }
42367
+ }
42368
+ };
42369
+ const req = chooseHttpClient(url).request(
42370
+ url,
42371
+ {
42372
+ method: "POST",
42373
+ headers: {
42374
+ "Content-Type": "application/json",
42375
+ "Content-Length": Buffer.byteLength(body)
42376
+ }
42377
+ },
42378
+ (res) => {
42379
+ const status = res.statusCode ?? 0;
42380
+ if (status !== 200) {
42381
+ res.resume();
42382
+ finish(() => reject(new Error(`Ollama request failed with HTTP ${status}`)));
42383
+ return;
42384
+ }
42385
+ res.on("error", (err) => finish(() => reject(err)));
42386
+ res.on("data", (chunk) => {
42387
+ if (settled) return;
42388
+ resetStall();
42389
+ buffer += chunk.toString("utf8");
42390
+ let newlineIndex = buffer.indexOf("\n");
42391
+ while (newlineIndex >= 0) {
42392
+ const line = buffer.slice(0, newlineIndex);
42393
+ buffer = buffer.slice(newlineIndex + 1);
42394
+ handleLine(line);
42395
+ if (settled) return;
42396
+ newlineIndex = buffer.indexOf("\n");
42397
+ }
42398
+ if (buffer.length > MAX_PULL_LINE_BYTES) {
42399
+ finish(() => reject(new Error("Ollama pull response line exceeded the size limit")));
42400
+ res.destroy();
42401
+ }
42402
+ });
42403
+ res.on("end", () => {
42404
+ if (settled) return;
42405
+ handleLine(buffer);
42406
+ buffer = "";
42407
+ finish(() => resolve9());
42408
+ });
42409
+ }
42410
+ );
42411
+ req.on("error", (err) => finish(() => reject(err)));
42412
+ resetStall();
42413
+ req.end(body);
42156
42414
  });
42157
- const responseBody = await requestOllamaJson(config, "/api/pull", body);
42158
- try {
42159
- const parsed = JSON.parse(responseBody);
42160
- if (parsed.error) {
42161
- throw new Error(`Ollama pull failed: ${parsed.error}`);
42162
- }
42163
- } catch (err) {
42164
- if (err.message.startsWith("Ollama pull")) {
42165
- throw err;
42166
- }
42167
- throw new Error(`Ollama pull response was not valid JSON: ${err.message}`);
42168
- }
42169
42415
  }
42170
42416
  var OllamaGemmaPlannerRunner = class {
42171
42417
  constructor(config) {
@@ -42294,8 +42540,8 @@ var FileSystemLocalModelStore = class {
42294
42540
  const artifactPath = localModelArtifactPath(config);
42295
42541
  if (!artifactPath) return false;
42296
42542
  try {
42297
- const stat7 = await import_fs3.promises.stat(artifactPath);
42298
- return stat7.isDirectory() || stat7.isFile();
42543
+ const stat6 = await import_fs3.promises.stat(artifactPath);
42544
+ return stat6.isDirectory() || stat6.isFile();
42299
42545
  } catch {
42300
42546
  return false;
42301
42547
  }
@@ -42402,7 +42648,7 @@ var OllamaProcessPuller = class {
42402
42648
  this.command = command;
42403
42649
  this.spawnPull = spawnPull;
42404
42650
  }
42405
- pull(model, localOllamaHost) {
42651
+ pull(model, localOllamaHost, _onProgress) {
42406
42652
  return new Promise((resolve9, reject) => {
42407
42653
  const env = { ...process.env };
42408
42654
  if (localOllamaHost) {
@@ -42447,12 +42693,12 @@ function applyPersistedSelection(config, state) {
42447
42693
  };
42448
42694
  }
42449
42695
  var OllamaHttpPuller = class {
42450
- async pull(model) {
42696
+ async pull(model, _localOllamaHost, onProgress) {
42451
42697
  const config = loadOllamaRuntimeConfigFromEnv(ollamaEnvForModel(model));
42452
42698
  if (!config.ok) {
42453
42699
  throw new Error(config.reason);
42454
42700
  }
42455
- await requestOllamaPull(config.config);
42701
+ await requestOllamaPull(config.config, onProgress);
42456
42702
  }
42457
42703
  };
42458
42704
  var DefaultOllamaPuller = class {
@@ -42460,16 +42706,16 @@ var DefaultOllamaPuller = class {
42460
42706
  this.httpPuller = httpPuller;
42461
42707
  this.processPuller = processPuller;
42462
42708
  }
42463
- async pull(model) {
42709
+ async pull(model, localOllamaHost, onProgress) {
42464
42710
  const runtimeConfig = loadOllamaRuntimeConfigFromEnv(ollamaEnvForModel(model));
42465
42711
  if (!runtimeConfig.ok) {
42466
42712
  throw new Error(runtimeConfig.reason);
42467
42713
  }
42468
42714
  try {
42469
- await this.httpPuller.pull(model);
42715
+ await this.httpPuller.pull(model, localOllamaHost, onProgress);
42470
42716
  } catch (err) {
42471
42717
  if (process.env.CODEVIBE_OLLAMA_INSTALL_FALLBACK_CLI?.trim() === "1") {
42472
- await this.processPuller.pull(model, runtimeConfig.config.host);
42718
+ await this.processPuller.pull(model, runtimeConfig.config.host, onProgress);
42473
42719
  return;
42474
42720
  }
42475
42721
  throw err;
@@ -42480,13 +42726,13 @@ var OllamaLocalModelInstaller = class {
42480
42726
  constructor(puller = new DefaultOllamaPuller()) {
42481
42727
  this.puller = puller;
42482
42728
  }
42483
- async install(config) {
42729
+ async install(config, onProgress) {
42484
42730
  const artifactPath = localModelArtifactPath(config);
42485
42731
  const model = config.ollamaModel?.trim();
42486
42732
  if (!artifactPath || !isSafeOllamaModelName(model)) {
42487
42733
  throw new Error("local Gemma Ollama install requires CODEVIBE_LOCAL_MODEL_OLLAMA_MODEL");
42488
42734
  }
42489
- await this.puller.pull(model);
42735
+ await this.puller.pull(model, void 0, onProgress);
42490
42736
  await import_fs3.promises.mkdir(import_path5.default.dirname(artifactPath), { recursive: true, mode: 448 });
42491
42737
  await import_fs3.promises.writeFile(
42492
42738
  artifactPath,
@@ -42500,7 +42746,7 @@ var HttpsLocalModelInstaller = class {
42500
42746
  constructor(transport = defaultLocalModelDownloadTransport) {
42501
42747
  this.transport = transport;
42502
42748
  }
42503
- async install(config) {
42749
+ async install(config, _onProgress) {
42504
42750
  const artifactPath = localModelArtifactPath(config);
42505
42751
  const expectedBytes = config.expectedBytes;
42506
42752
  if (!artifactPath || !config.downloadUrl || !config.sha256 || typeof expectedBytes !== "number" || !Number.isSafeInteger(expectedBytes) || expectedBytes <= 0) {
@@ -42546,9 +42792,9 @@ var HttpsLocalModelInstaller = class {
42546
42792
  }
42547
42793
  async tryDigestExistingArtifact(artifactPath) {
42548
42794
  try {
42549
- const stat7 = await import_fs3.promises.stat(artifactPath);
42550
- if (!stat7.isFile()) {
42551
- return { kind: "other", sha256: "", bytes: stat7.size };
42795
+ const stat6 = await import_fs3.promises.stat(artifactPath);
42796
+ if (!stat6.isFile()) {
42797
+ return { kind: "other", sha256: "", bytes: stat6.size };
42552
42798
  }
42553
42799
  return { kind: "file", ...await fileDigest(artifactPath) };
42554
42800
  } catch {
@@ -42561,11 +42807,11 @@ var DefaultLocalModelInstaller = class {
42561
42807
  this.httpsInstaller = new HttpsLocalModelInstaller();
42562
42808
  this.ollamaInstaller = new OllamaLocalModelInstaller();
42563
42809
  }
42564
- install(config) {
42810
+ install(config, onProgress) {
42565
42811
  if (config.ollamaModel) {
42566
- return this.ollamaInstaller.install(config);
42812
+ return this.ollamaInstaller.install(config, onProgress);
42567
42813
  }
42568
- return this.httpsInstaller.install(config);
42814
+ return this.httpsInstaller.install(config, onProgress);
42569
42815
  }
42570
42816
  };
42571
42817
  var defaultLocalModelInstaller = new DefaultLocalModelInstaller();
@@ -42622,6 +42868,22 @@ function renderConfigSummary(config) {
42622
42868
  const bytes = typeof config.expectedBytes === "number" && Number.isFinite(config.expectedBytes) ? `, expected bytes: ${config.expectedBytes}` : "";
42623
42869
  return `artifact: ${id}${ollama}${bytes}, cache: ${config.cacheDir}`;
42624
42870
  }
42871
+ function createInstallProgressReporter(config, out) {
42872
+ const label = config.ollamaModel ? ` ${config.ollamaModel}` : "";
42873
+ const toMB = (bytes) => (bytes / (1024 * 1024)).toFixed(0);
42874
+ let sawBytes = false;
42875
+ const onProgress = (p) => {
42876
+ if (typeof p.completed === "number" && typeof p.total === "number" && p.total > 0) {
42877
+ const pct = Math.max(0, Math.min(100, Math.floor(p.completed / p.total * 100)));
42878
+ out(`\rPulling${label}: ${pct}% (${toMB(p.completed)}/${toMB(p.total)} MB)\x1B[K`);
42879
+ sawBytes = true;
42880
+ }
42881
+ };
42882
+ const finish = () => {
42883
+ if (sawBytes) out("\n");
42884
+ };
42885
+ return { onProgress, finish };
42886
+ }
42625
42887
  async function runLocalModelCommand(options) {
42626
42888
  const out = options.stdout ?? ((s) => process.stdout.write(s));
42627
42889
  const err = options.stderr ?? ((s) => process.stderr.write(s));
@@ -42739,7 +43001,9 @@ No download was started.
42739
43001
  );
42740
43002
  return 2;
42741
43003
  }
42742
- await installer.install(config);
43004
+ const progress = createInstallProgressReporter(config, out);
43005
+ await installer.install(config, progress.onProgress);
43006
+ progress.finish();
42743
43007
  await markLocalModelEnabled(config.artifactId, config.ollamaModel ?? null, stateStore);
42744
43008
  out(`Installed CodeVibe local Gemma artifact ${config.artifactId}.
42745
43009
  `);
@@ -42884,7 +43148,9 @@ function buildStubSession() {
42884
43148
  return {
42885
43149
  sessionId: `cp1a-local-${Date.now()}`,
42886
43150
  userId: "cp1a-local-user",
42887
- agentType: "CLAUDE" /* CLAUDE */,
43151
+ // The orchestration shell IS CodeVibe 2.0 — stamp its own session CODEVIBE
43152
+ // (not CLAUDE) so it surfaces as "CodeVibe" in the mobile companion.
43153
+ agentType: "CODEVIBE" /* CODEVIBE */,
42888
43154
  projectPath: process.cwd(),
42889
43155
  status: "ACTIVE" /* ACTIVE */,
42890
43156
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -42991,7 +43257,9 @@ async function resumeOrCreateSession2(appsyncClient, deps) {
42991
43257
  const created = await appsyncClient.createSession({
42992
43258
  sessionId,
42993
43259
  userId,
42994
- agentType: "CLAUDE" /* CLAUDE */,
43260
+ // The orchestration shell IS CodeVibe 2.0 — stamp its own session CODEVIBE
43261
+ // (not CLAUDE) so it surfaces as "CodeVibe" in the mobile companion.
43262
+ agentType: "CODEVIBE" /* CODEVIBE */,
42995
43263
  projectPath: sessionProjectPath,
42996
43264
  status: "ACTIVE" /* ACTIVE */,
42997
43265
  // E2E encryption fields (mirror session-resume.ts).
@@ -43153,11 +43421,31 @@ function resolveLocalModelBoot(args) {
43153
43421
  const skipped = args.state.choice === "skipped";
43154
43422
  return {
43155
43423
  mode: "companion",
43156
- notice: `Local Gemma is required for Orchestration Mode in CodeVibe 2.0. ` + (skipped ? "You previously skipped local model setup. " : "No enabled local model was found. ") + "Starting Companion Mode. Run `codevibe model install` with a Pro/Max account to enable local orchestration.\n"
43424
+ notice: `Local Gemma is required for Orchestration Mode in CodeVibe 2.0. ` + (skipped ? "You previously skipped local model setup. " : "No enabled local model was found. ") + "Starting Companion Mode. Run `codevibe model install` with a Pro/Max account to enable local orchestration.\n",
43425
+ // We are past the companion-request and tier < Pro guards above, so this
43426
+ // branch is always Orchestration + Pro/Max. Signal the interactive install
43427
+ // offer; keep `mode: 'companion'` + `notice` as the decline / non-TTY path.
43428
+ promptInstall: args.requestedMode === "orchestration" && (args.entitlement.tier === "PRO" || args.entitlement.tier === "MAX")
43157
43429
  };
43158
43430
  }
43159
43431
  return { mode: "orchestration", notice: null };
43160
43432
  }
43433
+ async function promptInstallLocalModel() {
43434
+ const readline3 = require("readline");
43435
+ const rl = readline3.createInterface({ input: process.stdin, output: process.stdout });
43436
+ try {
43437
+ const answer = await new Promise((resolve9) => {
43438
+ rl.question(
43439
+ "Orchestration Mode needs the local model (~7GB), which isn't installed. Install it now? [Y/n]: ",
43440
+ resolve9
43441
+ );
43442
+ });
43443
+ const trimmed = answer.trim().toLowerCase();
43444
+ return trimmed === "" || trimmed.startsWith("y");
43445
+ } finally {
43446
+ rl.close();
43447
+ }
43448
+ }
43161
43449
  async function buildLocalGemmaPlannerAdapter(args) {
43162
43450
  const state = args.state;
43163
43451
  const config = applyPersistedSelection(
@@ -43349,14 +43637,57 @@ async function main(argv) {
43349
43637
  });
43350
43638
  }
43351
43639
  const emitter = createShellEventEmitter(appsyncClient);
43352
- const localModelState = await readLocalModelState();
43640
+ let localModelState = await readLocalModelState();
43353
43641
  const localModelEntitlement = await resolveModelEntitlement(appsyncClient);
43354
- const localModelBoot = resolveLocalModelBoot({
43642
+ let localModelBoot = resolveLocalModelBoot({
43355
43643
  requestedMode: mode,
43356
43644
  entitlement: localModelEntitlement,
43357
43645
  state: localModelState
43358
43646
  });
43359
- if (localModelBoot.notice) {
43647
+ if (localModelBoot.promptInstall && process.stdin.isTTY) {
43648
+ const proceed = await promptInstallLocalModel();
43649
+ if (!proceed) {
43650
+ if (localModelBoot.notice) {
43651
+ process.stdout.write(localModelBoot.notice);
43652
+ }
43653
+ } else {
43654
+ let installExit = null;
43655
+ try {
43656
+ installExit = await runModelCli(
43657
+ { command: "install", viaWithLocalModelFlag: false },
43658
+ {
43659
+ appsyncClient,
43660
+ resolveEntitlement: async () => localModelEntitlement
43661
+ }
43662
+ );
43663
+ } catch (err) {
43664
+ logger.warn("[cli] inline local model install threw", {
43665
+ error: err?.message
43666
+ });
43667
+ process.stdout.write(
43668
+ `Local model install failed: ${err?.message ?? "unknown error"}. Starting Companion Mode.
43669
+ `
43670
+ );
43671
+ }
43672
+ if (installExit === 0) {
43673
+ localModelState = await readLocalModelState();
43674
+ localModelBoot = resolveLocalModelBoot({
43675
+ requestedMode: mode,
43676
+ entitlement: localModelEntitlement,
43677
+ state: localModelState
43678
+ });
43679
+ if (localModelBoot.mode !== "orchestration") {
43680
+ process.stdout.write(
43681
+ "Local model install did not complete \u2014 starting Companion Mode.\n"
43682
+ );
43683
+ }
43684
+ } else if (installExit !== null) {
43685
+ process.stdout.write(
43686
+ "Local model install did not complete \u2014 starting Companion Mode.\n"
43687
+ );
43688
+ }
43689
+ }
43690
+ } else if (localModelBoot.notice) {
43360
43691
  process.stdout.write(localModelBoot.notice);
43361
43692
  }
43362
43693
  mode = localModelBoot.mode;