@bf-meishijian/aip 0.0.43 → 0.0.44

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 (760) hide show
  1. package/README.md +3 -3
  2. package/dist/coding-run-manager.d.ts +1 -0
  3. package/dist/coding-run-manager.d.ts.map +1 -1
  4. package/dist/coding-run-manager.js +60 -4
  5. package/dist/coding-run-manager.js.map +1 -1
  6. package/dist/daemon.d.ts.map +1 -1
  7. package/dist/daemon.js +48 -5
  8. package/dist/daemon.js.map +1 -1
  9. package/dist/diagnostics.d.ts.map +1 -1
  10. package/dist/general-run-client.d.ts.map +1 -1
  11. package/dist/host-status.d.ts.map +1 -1
  12. package/dist/host-update.d.ts.map +1 -1
  13. package/dist/host-update.js +21 -82
  14. package/dist/host-update.js.map +1 -1
  15. package/dist/host-updater.d.ts +4 -0
  16. package/dist/host-updater.d.ts.map +1 -0
  17. package/dist/host-updater.js +246 -0
  18. package/dist/host-updater.js.map +1 -0
  19. package/dist/installer.d.ts.map +1 -1
  20. package/dist/installer.js +10 -2
  21. package/dist/installer.js.map +1 -1
  22. package/dist/pi-model-service.d.ts.map +1 -1
  23. package/dist/platform-client.d.ts +22 -0
  24. package/dist/platform-client.d.ts.map +1 -1
  25. package/dist/platform-client.js +9 -0
  26. package/dist/platform-client.js.map +1 -1
  27. package/dist/runtime-download.d.ts +11 -0
  28. package/dist/runtime-download.d.ts.map +1 -0
  29. package/dist/runtime-download.js +136 -0
  30. package/dist/runtime-download.js.map +1 -0
  31. package/dist/runtime-update-control.d.ts +14 -0
  32. package/dist/runtime-update-control.d.ts.map +1 -0
  33. package/dist/runtime-update-control.js +111 -0
  34. package/dist/runtime-update-control.js.map +1 -0
  35. package/dist/runtime-update-state.d.ts +24 -0
  36. package/dist/runtime-update-state.d.ts.map +1 -0
  37. package/dist/runtime-update-state.js +38 -0
  38. package/dist/runtime-update-state.js.map +1 -0
  39. package/dist/update-service.d.ts +19 -0
  40. package/dist/update-service.d.ts.map +1 -0
  41. package/dist/update-service.js +119 -0
  42. package/dist/update-service.js.map +1 -0
  43. package/dist/workflow-guidance.js +1 -1
  44. package/dist/workspace-diff.d.ts.map +1 -1
  45. package/dist/workspace-diff.js +7 -1
  46. package/dist/workspace-diff.js.map +1 -1
  47. package/package.json +4 -4
  48. package/dist/apps/local-coding-host/src/bash-discovery.d.ts +0 -8
  49. package/dist/apps/local-coding-host/src/bash-discovery.d.ts.map +0 -1
  50. package/dist/apps/local-coding-host/src/bash-discovery.js +0 -66
  51. package/dist/apps/local-coding-host/src/bash-discovery.js.map +0 -1
  52. package/dist/apps/local-coding-host/src/cli.d.ts +0 -4
  53. package/dist/apps/local-coding-host/src/cli.d.ts.map +0 -1
  54. package/dist/apps/local-coding-host/src/cli.js +0 -388
  55. package/dist/apps/local-coding-host/src/cli.js.map +0 -1
  56. package/dist/apps/local-coding-host/src/coding-run-manager.d.ts +0 -174
  57. package/dist/apps/local-coding-host/src/coding-run-manager.d.ts.map +0 -1
  58. package/dist/apps/local-coding-host/src/coding-run-manager.js +0 -1587
  59. package/dist/apps/local-coding-host/src/coding-run-manager.js.map +0 -1
  60. package/dist/apps/local-coding-host/src/coding-subagent-child.d.ts +0 -22
  61. package/dist/apps/local-coding-host/src/coding-subagent-child.d.ts.map +0 -1
  62. package/dist/apps/local-coding-host/src/coding-subagent-child.js +0 -96
  63. package/dist/apps/local-coding-host/src/coding-subagent-child.js.map +0 -1
  64. package/dist/apps/local-coding-host/src/coding-subagents.d.ts +0 -65
  65. package/dist/apps/local-coding-host/src/coding-subagents.d.ts.map +0 -1
  66. package/dist/apps/local-coding-host/src/coding-subagents.js +0 -521
  67. package/dist/apps/local-coding-host/src/coding-subagents.js.map +0 -1
  68. package/dist/apps/local-coding-host/src/command-executor.d.ts +0 -9
  69. package/dist/apps/local-coding-host/src/command-executor.d.ts.map +0 -1
  70. package/dist/apps/local-coding-host/src/command-executor.js +0 -222
  71. package/dist/apps/local-coding-host/src/command-executor.js.map +0 -1
  72. package/dist/apps/local-coding-host/src/command-wakeup.d.ts +0 -19
  73. package/dist/apps/local-coding-host/src/command-wakeup.d.ts.map +0 -1
  74. package/dist/apps/local-coding-host/src/command-wakeup.js +0 -109
  75. package/dist/apps/local-coding-host/src/command-wakeup.js.map +0 -1
  76. package/dist/apps/local-coding-host/src/daemon.d.ts +0 -8
  77. package/dist/apps/local-coding-host/src/daemon.d.ts.map +0 -1
  78. package/dist/apps/local-coding-host/src/daemon.js +0 -314
  79. package/dist/apps/local-coding-host/src/daemon.js.map +0 -1
  80. package/dist/apps/local-coding-host/src/delivery-files.d.ts +0 -39
  81. package/dist/apps/local-coding-host/src/delivery-files.d.ts.map +0 -1
  82. package/dist/apps/local-coding-host/src/delivery-files.js +0 -237
  83. package/dist/apps/local-coding-host/src/delivery-files.js.map +0 -1
  84. package/dist/apps/local-coding-host/src/delivery-tools.d.ts +0 -30
  85. package/dist/apps/local-coding-host/src/delivery-tools.d.ts.map +0 -1
  86. package/dist/apps/local-coding-host/src/delivery-tools.js +0 -196
  87. package/dist/apps/local-coding-host/src/delivery-tools.js.map +0 -1
  88. package/dist/apps/local-coding-host/src/diagnostic-log.d.ts +0 -20
  89. package/dist/apps/local-coding-host/src/diagnostic-log.d.ts.map +0 -1
  90. package/dist/apps/local-coding-host/src/diagnostic-log.js +0 -61
  91. package/dist/apps/local-coding-host/src/diagnostic-log.js.map +0 -1
  92. package/dist/apps/local-coding-host/src/diagnostics.d.ts +0 -38
  93. package/dist/apps/local-coding-host/src/diagnostics.d.ts.map +0 -1
  94. package/dist/apps/local-coding-host/src/diagnostics.js +0 -217
  95. package/dist/apps/local-coding-host/src/diagnostics.js.map +0 -1
  96. package/dist/apps/local-coding-host/src/execution-process-observer.d.ts +0 -19
  97. package/dist/apps/local-coding-host/src/execution-process-observer.d.ts.map +0 -1
  98. package/dist/apps/local-coding-host/src/execution-process-observer.js +0 -35
  99. package/dist/apps/local-coding-host/src/execution-process-observer.js.map +0 -1
  100. package/dist/apps/local-coding-host/src/execution-process-tree.d.ts +0 -32
  101. package/dist/apps/local-coding-host/src/execution-process-tree.d.ts.map +0 -1
  102. package/dist/apps/local-coding-host/src/execution-process-tree.js +0 -288
  103. package/dist/apps/local-coding-host/src/execution-process-tree.js.map +0 -1
  104. package/dist/apps/local-coding-host/src/execution-process.d.ts +0 -59
  105. package/dist/apps/local-coding-host/src/execution-process.d.ts.map +0 -1
  106. package/dist/apps/local-coding-host/src/execution-process.js +0 -112
  107. package/dist/apps/local-coding-host/src/execution-process.js.map +0 -1
  108. package/dist/apps/local-coding-host/src/execution-receipts.d.ts +0 -12
  109. package/dist/apps/local-coding-host/src/execution-receipts.d.ts.map +0 -1
  110. package/dist/apps/local-coding-host/src/execution-receipts.js +0 -89
  111. package/dist/apps/local-coding-host/src/execution-receipts.js.map +0 -1
  112. package/dist/apps/local-coding-host/src/execution-supervisor.d.ts +0 -25
  113. package/dist/apps/local-coding-host/src/execution-supervisor.d.ts.map +0 -1
  114. package/dist/apps/local-coding-host/src/execution-supervisor.js +0 -482
  115. package/dist/apps/local-coding-host/src/execution-supervisor.js.map +0 -1
  116. package/dist/apps/local-coding-host/src/execution-worker.d.ts +0 -42
  117. package/dist/apps/local-coding-host/src/execution-worker.d.ts.map +0 -1
  118. package/dist/apps/local-coding-host/src/execution-worker.js +0 -165
  119. package/dist/apps/local-coding-host/src/execution-worker.js.map +0 -1
  120. package/dist/apps/local-coding-host/src/general-run-client.d.ts +0 -111
  121. package/dist/apps/local-coding-host/src/general-run-client.d.ts.map +0 -1
  122. package/dist/apps/local-coding-host/src/general-run-client.js +0 -41
  123. package/dist/apps/local-coding-host/src/general-run-client.js.map +0 -1
  124. package/dist/apps/local-coding-host/src/general-run-manager.d.ts +0 -33
  125. package/dist/apps/local-coding-host/src/general-run-manager.d.ts.map +0 -1
  126. package/dist/apps/local-coding-host/src/general-run-manager.js +0 -363
  127. package/dist/apps/local-coding-host/src/general-run-manager.js.map +0 -1
  128. package/dist/apps/local-coding-host/src/general-run-supervisor.d.ts +0 -12
  129. package/dist/apps/local-coding-host/src/general-run-supervisor.d.ts.map +0 -1
  130. package/dist/apps/local-coding-host/src/general-run-supervisor.js +0 -160
  131. package/dist/apps/local-coding-host/src/general-run-supervisor.js.map +0 -1
  132. package/dist/apps/local-coding-host/src/general-run-tools.d.ts +0 -25
  133. package/dist/apps/local-coding-host/src/general-run-tools.d.ts.map +0 -1
  134. package/dist/apps/local-coding-host/src/general-run-tools.js +0 -123
  135. package/dist/apps/local-coding-host/src/general-run-tools.js.map +0 -1
  136. package/dist/apps/local-coding-host/src/git-credential-environment.d.ts +0 -3
  137. package/dist/apps/local-coding-host/src/git-credential-environment.d.ts.map +0 -1
  138. package/dist/apps/local-coding-host/src/git-credential-environment.js +0 -46
  139. package/dist/apps/local-coding-host/src/git-credential-environment.js.map +0 -1
  140. package/dist/apps/local-coding-host/src/git-credential-helper.d.ts +0 -2
  141. package/dist/apps/local-coding-host/src/git-credential-helper.d.ts.map +0 -1
  142. package/dist/apps/local-coding-host/src/git-credential-helper.js +0 -38
  143. package/dist/apps/local-coding-host/src/git-credential-helper.js.map +0 -1
  144. package/dist/apps/local-coding-host/src/git-http-migration.d.ts +0 -24
  145. package/dist/apps/local-coding-host/src/git-http-migration.d.ts.map +0 -1
  146. package/dist/apps/local-coding-host/src/git-http-migration.js +0 -197
  147. package/dist/apps/local-coding-host/src/git-http-migration.js.map +0 -1
  148. package/dist/apps/local-coding-host/src/git-process.d.ts +0 -25
  149. package/dist/apps/local-coding-host/src/git-process.d.ts.map +0 -1
  150. package/dist/apps/local-coding-host/src/git-process.js +0 -85
  151. package/dist/apps/local-coding-host/src/git-process.js.map +0 -1
  152. package/dist/apps/local-coding-host/src/git-transport.d.ts +0 -6
  153. package/dist/apps/local-coding-host/src/git-transport.d.ts.map +0 -1
  154. package/dist/apps/local-coding-host/src/git-transport.js +0 -57
  155. package/dist/apps/local-coding-host/src/git-transport.js.map +0 -1
  156. package/dist/apps/local-coding-host/src/gitlab-cli.d.ts +0 -2
  157. package/dist/apps/local-coding-host/src/gitlab-cli.d.ts.map +0 -1
  158. package/dist/apps/local-coding-host/src/gitlab-cli.js +0 -39
  159. package/dist/apps/local-coding-host/src/gitlab-cli.js.map +0 -1
  160. package/dist/apps/local-coding-host/src/gitlab-credentials.d.ts +0 -18
  161. package/dist/apps/local-coding-host/src/gitlab-credentials.d.ts.map +0 -1
  162. package/dist/apps/local-coding-host/src/gitlab-credentials.js +0 -137
  163. package/dist/apps/local-coding-host/src/gitlab-credentials.js.map +0 -1
  164. package/dist/apps/local-coding-host/src/handoff-cli.d.ts +0 -2
  165. package/dist/apps/local-coding-host/src/handoff-cli.d.ts.map +0 -1
  166. package/dist/apps/local-coding-host/src/handoff-cli.js +0 -86
  167. package/dist/apps/local-coding-host/src/handoff-cli.js.map +0 -1
  168. package/dist/apps/local-coding-host/src/harness.d.ts +0 -2
  169. package/dist/apps/local-coding-host/src/harness.d.ts.map +0 -1
  170. package/dist/apps/local-coding-host/src/harness.js +0 -2
  171. package/dist/apps/local-coding-host/src/harness.js.map +0 -1
  172. package/dist/apps/local-coding-host/src/host-log.d.ts +0 -13
  173. package/dist/apps/local-coding-host/src/host-log.d.ts.map +0 -1
  174. package/dist/apps/local-coding-host/src/host-log.js +0 -43
  175. package/dist/apps/local-coding-host/src/host-log.js.map +0 -1
  176. package/dist/apps/local-coding-host/src/host-shell.d.ts +0 -2
  177. package/dist/apps/local-coding-host/src/host-shell.d.ts.map +0 -1
  178. package/dist/apps/local-coding-host/src/host-shell.js +0 -2
  179. package/dist/apps/local-coding-host/src/host-shell.js.map +0 -1
  180. package/dist/apps/local-coding-host/src/host-status.d.ts +0 -57
  181. package/dist/apps/local-coding-host/src/host-status.d.ts.map +0 -1
  182. package/dist/apps/local-coding-host/src/host-status.js +0 -144
  183. package/dist/apps/local-coding-host/src/host-status.js.map +0 -1
  184. package/dist/apps/local-coding-host/src/host-tools.d.ts +0 -15
  185. package/dist/apps/local-coding-host/src/host-tools.d.ts.map +0 -1
  186. package/dist/apps/local-coding-host/src/host-tools.js +0 -178
  187. package/dist/apps/local-coding-host/src/host-tools.js.map +0 -1
  188. package/dist/apps/local-coding-host/src/host-update.d.ts +0 -3
  189. package/dist/apps/local-coding-host/src/host-update.d.ts.map +0 -1
  190. package/dist/apps/local-coding-host/src/host-update.js +0 -95
  191. package/dist/apps/local-coding-host/src/host-update.js.map +0 -1
  192. package/dist/apps/local-coding-host/src/installer.d.ts +0 -28
  193. package/dist/apps/local-coding-host/src/installer.d.ts.map +0 -1
  194. package/dist/apps/local-coding-host/src/installer.js +0 -346
  195. package/dist/apps/local-coding-host/src/installer.js.map +0 -1
  196. package/dist/apps/local-coding-host/src/linux-service.d.ts +0 -14
  197. package/dist/apps/local-coding-host/src/linux-service.d.ts.map +0 -1
  198. package/dist/apps/local-coding-host/src/linux-service.js +0 -63
  199. package/dist/apps/local-coding-host/src/linux-service.js.map +0 -1
  200. package/dist/apps/local-coding-host/src/live-employee.d.ts +0 -17
  201. package/dist/apps/local-coding-host/src/live-employee.d.ts.map +0 -1
  202. package/dist/apps/local-coding-host/src/live-employee.js +0 -74
  203. package/dist/apps/local-coding-host/src/live-employee.js.map +0 -1
  204. package/dist/apps/local-coding-host/src/local-employee-runtime.d.ts +0 -30
  205. package/dist/apps/local-coding-host/src/local-employee-runtime.d.ts.map +0 -1
  206. package/dist/apps/local-coding-host/src/local-employee-runtime.js +0 -521
  207. package/dist/apps/local-coding-host/src/local-employee-runtime.js.map +0 -1
  208. package/dist/apps/local-coding-host/src/local-handoff-workspace.d.ts +0 -27
  209. package/dist/apps/local-coding-host/src/local-handoff-workspace.d.ts.map +0 -1
  210. package/dist/apps/local-coding-host/src/local-handoff-workspace.js +0 -71
  211. package/dist/apps/local-coding-host/src/local-handoff-workspace.js.map +0 -1
  212. package/dist/apps/local-coding-host/src/local-mcp.d.ts +0 -246
  213. package/dist/apps/local-coding-host/src/local-mcp.d.ts.map +0 -1
  214. package/dist/apps/local-coding-host/src/local-mcp.js +0 -173
  215. package/dist/apps/local-coding-host/src/local-mcp.js.map +0 -1
  216. package/dist/apps/local-coding-host/src/local-model-usage.d.ts +0 -6
  217. package/dist/apps/local-coding-host/src/local-model-usage.d.ts.map +0 -1
  218. package/dist/apps/local-coding-host/src/local-model-usage.js +0 -40
  219. package/dist/apps/local-coding-host/src/local-model-usage.js.map +0 -1
  220. package/dist/apps/local-coding-host/src/login-url.d.ts +0 -3
  221. package/dist/apps/local-coding-host/src/login-url.d.ts.map +0 -1
  222. package/dist/apps/local-coding-host/src/login-url.js +0 -30
  223. package/dist/apps/local-coding-host/src/login-url.js.map +0 -1
  224. package/dist/apps/local-coding-host/src/managed-process.d.ts +0 -21
  225. package/dist/apps/local-coding-host/src/managed-process.d.ts.map +0 -1
  226. package/dist/apps/local-coding-host/src/managed-process.js +0 -119
  227. package/dist/apps/local-coding-host/src/managed-process.js.map +0 -1
  228. package/dist/apps/local-coding-host/src/merge-requests.d.ts +0 -54
  229. package/dist/apps/local-coding-host/src/merge-requests.d.ts.map +0 -1
  230. package/dist/apps/local-coding-host/src/merge-requests.js +0 -230
  231. package/dist/apps/local-coding-host/src/merge-requests.js.map +0 -1
  232. package/dist/apps/local-coding-host/src/model-stores.d.ts +0 -20
  233. package/dist/apps/local-coding-host/src/model-stores.d.ts.map +0 -1
  234. package/dist/apps/local-coding-host/src/model-stores.js +0 -77
  235. package/dist/apps/local-coding-host/src/model-stores.js.map +0 -1
  236. package/dist/apps/local-coding-host/src/open-browser.d.ts +0 -2
  237. package/dist/apps/local-coding-host/src/open-browser.d.ts.map +0 -1
  238. package/dist/apps/local-coding-host/src/open-browser.js +0 -20
  239. package/dist/apps/local-coding-host/src/open-browser.js.map +0 -1
  240. package/dist/apps/local-coding-host/src/operation-context.d.ts +0 -31
  241. package/dist/apps/local-coding-host/src/operation-context.d.ts.map +0 -1
  242. package/dist/apps/local-coding-host/src/operation-context.js +0 -166
  243. package/dist/apps/local-coding-host/src/operation-context.js.map +0 -1
  244. package/dist/apps/local-coding-host/src/outcome-cli.d.ts +0 -3
  245. package/dist/apps/local-coding-host/src/outcome-cli.d.ts.map +0 -1
  246. package/dist/apps/local-coding-host/src/outcome-cli.js +0 -91
  247. package/dist/apps/local-coding-host/src/outcome-cli.js.map +0 -1
  248. package/dist/apps/local-coding-host/src/paths.d.ts +0 -30
  249. package/dist/apps/local-coding-host/src/paths.d.ts.map +0 -1
  250. package/dist/apps/local-coding-host/src/paths.js +0 -52
  251. package/dist/apps/local-coding-host/src/paths.js.map +0 -1
  252. package/dist/apps/local-coding-host/src/pi-message-queue.d.ts +0 -20
  253. package/dist/apps/local-coding-host/src/pi-message-queue.d.ts.map +0 -1
  254. package/dist/apps/local-coding-host/src/pi-message-queue.js +0 -78
  255. package/dist/apps/local-coding-host/src/pi-message-queue.js.map +0 -1
  256. package/dist/apps/local-coding-host/src/pi-model-service.d.ts +0 -91
  257. package/dist/apps/local-coding-host/src/pi-model-service.d.ts.map +0 -1
  258. package/dist/apps/local-coding-host/src/pi-model-service.js +0 -372
  259. package/dist/apps/local-coding-host/src/pi-model-service.js.map +0 -1
  260. package/dist/apps/local-coding-host/src/platform-client.d.ts +0 -398
  261. package/dist/apps/local-coding-host/src/platform-client.d.ts.map +0 -1
  262. package/dist/apps/local-coding-host/src/platform-client.js +0 -255
  263. package/dist/apps/local-coding-host/src/platform-client.js.map +0 -1
  264. package/dist/apps/local-coding-host/src/platform-gitlab-credential.d.ts +0 -8
  265. package/dist/apps/local-coding-host/src/platform-gitlab-credential.d.ts.map +0 -1
  266. package/dist/apps/local-coding-host/src/platform-gitlab-credential.js +0 -31
  267. package/dist/apps/local-coding-host/src/platform-gitlab-credential.js.map +0 -1
  268. package/dist/apps/local-coding-host/src/platform.d.ts +0 -2
  269. package/dist/apps/local-coding-host/src/platform.d.ts.map +0 -1
  270. package/dist/apps/local-coding-host/src/platform.js +0 -15
  271. package/dist/apps/local-coding-host/src/platform.js.map +0 -1
  272. package/dist/apps/local-coding-host/src/profile.d.ts +0 -9
  273. package/dist/apps/local-coding-host/src/profile.d.ts.map +0 -1
  274. package/dist/apps/local-coding-host/src/profile.js +0 -43
  275. package/dist/apps/local-coding-host/src/profile.js.map +0 -1
  276. package/dist/apps/local-coding-host/src/project-facts.d.ts +0 -20
  277. package/dist/apps/local-coding-host/src/project-facts.d.ts.map +0 -1
  278. package/dist/apps/local-coding-host/src/project-facts.js +0 -94
  279. package/dist/apps/local-coding-host/src/project-facts.js.map +0 -1
  280. package/dist/apps/local-coding-host/src/provider-auth-error.d.ts +0 -3
  281. package/dist/apps/local-coding-host/src/provider-auth-error.d.ts.map +0 -1
  282. package/dist/apps/local-coding-host/src/provider-auth-error.js +0 -12
  283. package/dist/apps/local-coding-host/src/provider-auth-error.js.map +0 -1
  284. package/dist/apps/local-coding-host/src/qa-contract.d.ts +0 -2
  285. package/dist/apps/local-coding-host/src/qa-contract.d.ts.map +0 -1
  286. package/dist/apps/local-coding-host/src/qa-contract.js +0 -3
  287. package/dist/apps/local-coding-host/src/qa-contract.js.map +0 -1
  288. package/dist/apps/local-coding-host/src/qa-project-checkout.d.ts +0 -16
  289. package/dist/apps/local-coding-host/src/qa-project-checkout.d.ts.map +0 -1
  290. package/dist/apps/local-coding-host/src/qa-project-checkout.js +0 -92
  291. package/dist/apps/local-coding-host/src/qa-project-checkout.js.map +0 -1
  292. package/dist/apps/local-coding-host/src/qa-session-manager.d.ts +0 -83
  293. package/dist/apps/local-coding-host/src/qa-session-manager.d.ts.map +0 -1
  294. package/dist/apps/local-coding-host/src/qa-session-manager.js +0 -782
  295. package/dist/apps/local-coding-host/src/qa-session-manager.js.map +0 -1
  296. package/dist/apps/local-coding-host/src/run-resources.d.ts +0 -17
  297. package/dist/apps/local-coding-host/src/run-resources.d.ts.map +0 -1
  298. package/dist/apps/local-coding-host/src/run-resources.js +0 -115
  299. package/dist/apps/local-coding-host/src/run-resources.js.map +0 -1
  300. package/dist/apps/local-coding-host/src/runtime-cleanup.d.ts +0 -5
  301. package/dist/apps/local-coding-host/src/runtime-cleanup.d.ts.map +0 -1
  302. package/dist/apps/local-coding-host/src/runtime-cleanup.js +0 -187
  303. package/dist/apps/local-coding-host/src/runtime-cleanup.js.map +0 -1
  304. package/dist/apps/local-coding-host/src/runtime-environment.d.ts +0 -2
  305. package/dist/apps/local-coding-host/src/runtime-environment.d.ts.map +0 -1
  306. package/dist/apps/local-coding-host/src/runtime-environment.js +0 -7
  307. package/dist/apps/local-coding-host/src/runtime-environment.js.map +0 -1
  308. package/dist/apps/local-coding-host/src/runtime-search-tools.d.ts +0 -3
  309. package/dist/apps/local-coding-host/src/runtime-search-tools.d.ts.map +0 -1
  310. package/dist/apps/local-coding-host/src/runtime-search-tools.js +0 -30
  311. package/dist/apps/local-coding-host/src/runtime-search-tools.js.map +0 -1
  312. package/dist/apps/local-coding-host/src/secure-json.d.ts +0 -12
  313. package/dist/apps/local-coding-host/src/secure-json.d.ts.map +0 -1
  314. package/dist/apps/local-coding-host/src/secure-json.js +0 -129
  315. package/dist/apps/local-coding-host/src/secure-json.js.map +0 -1
  316. package/dist/apps/local-coding-host/src/self-check.d.ts +0 -3
  317. package/dist/apps/local-coding-host/src/self-check.d.ts.map +0 -1
  318. package/dist/apps/local-coding-host/src/self-check.js +0 -9
  319. package/dist/apps/local-coding-host/src/self-check.js.map +0 -1
  320. package/dist/apps/local-coding-host/src/skill-bundle-cache.d.ts +0 -11
  321. package/dist/apps/local-coding-host/src/skill-bundle-cache.d.ts.map +0 -1
  322. package/dist/apps/local-coding-host/src/skill-bundle-cache.js +0 -76
  323. package/dist/apps/local-coding-host/src/skill-bundle-cache.js.map +0 -1
  324. package/dist/apps/local-coding-host/src/skill-storage.d.ts +0 -18
  325. package/dist/apps/local-coding-host/src/skill-storage.d.ts.map +0 -1
  326. package/dist/apps/local-coding-host/src/skill-storage.js +0 -287
  327. package/dist/apps/local-coding-host/src/skill-storage.js.map +0 -1
  328. package/dist/apps/local-coding-host/src/stage-delivery.d.ts +0 -2
  329. package/dist/apps/local-coding-host/src/stage-delivery.d.ts.map +0 -1
  330. package/dist/apps/local-coding-host/src/stage-delivery.js +0 -3
  331. package/dist/apps/local-coding-host/src/stage-delivery.js.map +0 -1
  332. package/dist/apps/local-coding-host/src/state.d.ts +0 -55
  333. package/dist/apps/local-coding-host/src/state.d.ts.map +0 -1
  334. package/dist/apps/local-coding-host/src/state.js +0 -151
  335. package/dist/apps/local-coding-host/src/state.js.map +0 -1
  336. package/dist/apps/local-coding-host/src/storage-maintenance.d.ts +0 -13
  337. package/dist/apps/local-coding-host/src/storage-maintenance.d.ts.map +0 -1
  338. package/dist/apps/local-coding-host/src/storage-maintenance.js +0 -62
  339. package/dist/apps/local-coding-host/src/storage-maintenance.js.map +0 -1
  340. package/dist/apps/local-coding-host/src/test-cli.d.ts +0 -2
  341. package/dist/apps/local-coding-host/src/test-cli.d.ts.map +0 -1
  342. package/dist/apps/local-coding-host/src/test-cli.js +0 -48
  343. package/dist/apps/local-coding-host/src/test-cli.js.map +0 -1
  344. package/dist/apps/local-coding-host/src/test-executor.d.ts +0 -41
  345. package/dist/apps/local-coding-host/src/test-executor.d.ts.map +0 -1
  346. package/dist/apps/local-coding-host/src/test-executor.js +0 -483
  347. package/dist/apps/local-coding-host/src/test-executor.js.map +0 -1
  348. package/dist/apps/local-coding-host/src/test-reports.d.ts +0 -25
  349. package/dist/apps/local-coding-host/src/test-reports.d.ts.map +0 -1
  350. package/dist/apps/local-coding-host/src/test-reports.js +0 -129
  351. package/dist/apps/local-coding-host/src/test-reports.js.map +0 -1
  352. package/dist/apps/local-coding-host/src/test-run-manager.d.ts +0 -34
  353. package/dist/apps/local-coding-host/src/test-run-manager.d.ts.map +0 -1
  354. package/dist/apps/local-coding-host/src/test-run-manager.js +0 -180
  355. package/dist/apps/local-coding-host/src/test-run-manager.js.map +0 -1
  356. package/dist/apps/local-coding-host/src/tool-dispatch.d.ts +0 -14
  357. package/dist/apps/local-coding-host/src/tool-dispatch.d.ts.map +0 -1
  358. package/dist/apps/local-coding-host/src/tool-dispatch.js +0 -59
  359. package/dist/apps/local-coding-host/src/tool-dispatch.js.map +0 -1
  360. package/dist/apps/local-coding-host/src/tool-probe.d.ts +0 -31
  361. package/dist/apps/local-coding-host/src/tool-probe.d.ts.map +0 -1
  362. package/dist/apps/local-coding-host/src/tool-probe.js +0 -95
  363. package/dist/apps/local-coding-host/src/tool-probe.js.map +0 -1
  364. package/dist/apps/local-coding-host/src/windows-runtime.d.ts +0 -9
  365. package/dist/apps/local-coding-host/src/windows-runtime.d.ts.map +0 -1
  366. package/dist/apps/local-coding-host/src/windows-runtime.js +0 -64
  367. package/dist/apps/local-coding-host/src/windows-runtime.js.map +0 -1
  368. package/dist/apps/local-coding-host/src/windows-service.d.ts +0 -22
  369. package/dist/apps/local-coding-host/src/windows-service.d.ts.map +0 -1
  370. package/dist/apps/local-coding-host/src/windows-service.js +0 -126
  371. package/dist/apps/local-coding-host/src/windows-service.js.map +0 -1
  372. package/dist/apps/local-coding-host/src/workflow-guidance.d.ts +0 -2
  373. package/dist/apps/local-coding-host/src/workflow-guidance.d.ts.map +0 -1
  374. package/dist/apps/local-coding-host/src/workflow-guidance.js +0 -3
  375. package/dist/apps/local-coding-host/src/workflow-guidance.js.map +0 -1
  376. package/dist/apps/local-coding-host/src/workspace-diff.d.ts +0 -6
  377. package/dist/apps/local-coding-host/src/workspace-diff.d.ts.map +0 -1
  378. package/dist/apps/local-coding-host/src/workspace-diff.js +0 -280
  379. package/dist/apps/local-coding-host/src/workspace-diff.js.map +0 -1
  380. package/dist/apps/local-coding-host/src/workspace-gc.d.ts +0 -25
  381. package/dist/apps/local-coding-host/src/workspace-gc.d.ts.map +0 -1
  382. package/dist/apps/local-coding-host/src/workspace-gc.js +0 -417
  383. package/dist/apps/local-coding-host/src/workspace-gc.js.map +0 -1
  384. package/dist/apps/local-coding-host/tests/bash-discovery.test.d.ts +0 -2
  385. package/dist/apps/local-coding-host/tests/bash-discovery.test.d.ts.map +0 -1
  386. package/dist/apps/local-coding-host/tests/bash-discovery.test.js +0 -36
  387. package/dist/apps/local-coding-host/tests/bash-discovery.test.js.map +0 -1
  388. package/dist/apps/local-coding-host/tests/cli-startup.test.d.ts +0 -2
  389. package/dist/apps/local-coding-host/tests/cli-startup.test.d.ts.map +0 -1
  390. package/dist/apps/local-coding-host/tests/cli-startup.test.js +0 -176
  391. package/dist/apps/local-coding-host/tests/cli-startup.test.js.map +0 -1
  392. package/dist/apps/local-coding-host/tests/coding-run-manager.test.d.ts +0 -2
  393. package/dist/apps/local-coding-host/tests/coding-run-manager.test.d.ts.map +0 -1
  394. package/dist/apps/local-coding-host/tests/coding-run-manager.test.js +0 -3211
  395. package/dist/apps/local-coding-host/tests/coding-run-manager.test.js.map +0 -1
  396. package/dist/apps/local-coding-host/tests/coding-subagent-child.test.d.ts +0 -2
  397. package/dist/apps/local-coding-host/tests/coding-subagent-child.test.d.ts.map +0 -1
  398. package/dist/apps/local-coding-host/tests/coding-subagent-child.test.js +0 -223
  399. package/dist/apps/local-coding-host/tests/coding-subagent-child.test.js.map +0 -1
  400. package/dist/apps/local-coding-host/tests/coding-subagents.integration.test.d.ts +0 -2
  401. package/dist/apps/local-coding-host/tests/coding-subagents.integration.test.d.ts.map +0 -1
  402. package/dist/apps/local-coding-host/tests/coding-subagents.integration.test.js +0 -390
  403. package/dist/apps/local-coding-host/tests/coding-subagents.integration.test.js.map +0 -1
  404. package/dist/apps/local-coding-host/tests/command-wakeup.test.d.ts +0 -2
  405. package/dist/apps/local-coding-host/tests/command-wakeup.test.d.ts.map +0 -1
  406. package/dist/apps/local-coding-host/tests/command-wakeup.test.js +0 -148
  407. package/dist/apps/local-coding-host/tests/command-wakeup.test.js.map +0 -1
  408. package/dist/apps/local-coding-host/tests/daemon-wakeup.test.d.ts +0 -2
  409. package/dist/apps/local-coding-host/tests/daemon-wakeup.test.d.ts.map +0 -1
  410. package/dist/apps/local-coding-host/tests/daemon-wakeup.test.js +0 -636
  411. package/dist/apps/local-coding-host/tests/daemon-wakeup.test.js.map +0 -1
  412. package/dist/apps/local-coding-host/tests/database-tool-transport.test.d.ts +0 -2
  413. package/dist/apps/local-coding-host/tests/database-tool-transport.test.d.ts.map +0 -1
  414. package/dist/apps/local-coding-host/tests/database-tool-transport.test.js +0 -37
  415. package/dist/apps/local-coding-host/tests/database-tool-transport.test.js.map +0 -1
  416. package/dist/apps/local-coding-host/tests/delivery-files.test.d.ts +0 -2
  417. package/dist/apps/local-coding-host/tests/delivery-files.test.d.ts.map +0 -1
  418. package/dist/apps/local-coding-host/tests/delivery-files.test.js +0 -655
  419. package/dist/apps/local-coding-host/tests/delivery-files.test.js.map +0 -1
  420. package/dist/apps/local-coding-host/tests/device-gitlab-sync.test.d.ts +0 -2
  421. package/dist/apps/local-coding-host/tests/device-gitlab-sync.test.d.ts.map +0 -1
  422. package/dist/apps/local-coding-host/tests/device-gitlab-sync.test.js +0 -116
  423. package/dist/apps/local-coding-host/tests/device-gitlab-sync.test.js.map +0 -1
  424. package/dist/apps/local-coding-host/tests/diagnostic-logging.test.d.ts +0 -2
  425. package/dist/apps/local-coding-host/tests/diagnostic-logging.test.d.ts.map +0 -1
  426. package/dist/apps/local-coding-host/tests/diagnostic-logging.test.js +0 -143
  427. package/dist/apps/local-coding-host/tests/diagnostic-logging.test.js.map +0 -1
  428. package/dist/apps/local-coding-host/tests/execution-process.test.d.ts +0 -2
  429. package/dist/apps/local-coding-host/tests/execution-process.test.d.ts.map +0 -1
  430. package/dist/apps/local-coding-host/tests/execution-process.test.js +0 -127
  431. package/dist/apps/local-coding-host/tests/execution-process.test.js.map +0 -1
  432. package/dist/apps/local-coding-host/tests/execution-receipts.test.d.ts +0 -2
  433. package/dist/apps/local-coding-host/tests/execution-receipts.test.d.ts.map +0 -1
  434. package/dist/apps/local-coding-host/tests/execution-receipts.test.js +0 -72
  435. package/dist/apps/local-coding-host/tests/execution-receipts.test.js.map +0 -1
  436. package/dist/apps/local-coding-host/tests/execution-supervisor.test.d.ts +0 -2
  437. package/dist/apps/local-coding-host/tests/execution-supervisor.test.d.ts.map +0 -1
  438. package/dist/apps/local-coding-host/tests/execution-supervisor.test.js +0 -488
  439. package/dist/apps/local-coding-host/tests/execution-supervisor.test.js.map +0 -1
  440. package/dist/apps/local-coding-host/tests/general-employee-fixture.d.ts +0 -3
  441. package/dist/apps/local-coding-host/tests/general-employee-fixture.d.ts.map +0 -1
  442. package/dist/apps/local-coding-host/tests/general-employee-fixture.js +0 -43
  443. package/dist/apps/local-coding-host/tests/general-employee-fixture.js.map +0 -1
  444. package/dist/apps/local-coding-host/tests/general-run-manager.test.d.ts +0 -2
  445. package/dist/apps/local-coding-host/tests/general-run-manager.test.d.ts.map +0 -1
  446. package/dist/apps/local-coding-host/tests/general-run-manager.test.js +0 -506
  447. package/dist/apps/local-coding-host/tests/general-run-manager.test.js.map +0 -1
  448. package/dist/apps/local-coding-host/tests/general-run-supervisor.test.d.ts +0 -2
  449. package/dist/apps/local-coding-host/tests/general-run-supervisor.test.d.ts.map +0 -1
  450. package/dist/apps/local-coding-host/tests/general-run-supervisor.test.js +0 -252
  451. package/dist/apps/local-coding-host/tests/general-run-supervisor.test.js.map +0 -1
  452. package/dist/apps/local-coding-host/tests/general-run-tools.test.d.ts +0 -2
  453. package/dist/apps/local-coding-host/tests/general-run-tools.test.d.ts.map +0 -1
  454. package/dist/apps/local-coding-host/tests/general-run-tools.test.js +0 -202
  455. package/dist/apps/local-coding-host/tests/general-run-tools.test.js.map +0 -1
  456. package/dist/apps/local-coding-host/tests/general-run.integration.test.d.ts +0 -2
  457. package/dist/apps/local-coding-host/tests/general-run.integration.test.d.ts.map +0 -1
  458. package/dist/apps/local-coding-host/tests/general-run.integration.test.js +0 -150
  459. package/dist/apps/local-coding-host/tests/general-run.integration.test.js.map +0 -1
  460. package/dist/apps/local-coding-host/tests/git-http-migration.test.d.ts +0 -2
  461. package/dist/apps/local-coding-host/tests/git-http-migration.test.d.ts.map +0 -1
  462. package/dist/apps/local-coding-host/tests/git-http-migration.test.js +0 -140
  463. package/dist/apps/local-coding-host/tests/git-http-migration.test.js.map +0 -1
  464. package/dist/apps/local-coding-host/tests/git-process.test.d.ts +0 -2
  465. package/dist/apps/local-coding-host/tests/git-process.test.d.ts.map +0 -1
  466. package/dist/apps/local-coding-host/tests/git-process.test.js +0 -106
  467. package/dist/apps/local-coding-host/tests/git-process.test.js.map +0 -1
  468. package/dist/apps/local-coding-host/tests/git-transport.test.d.ts +0 -2
  469. package/dist/apps/local-coding-host/tests/git-transport.test.d.ts.map +0 -1
  470. package/dist/apps/local-coding-host/tests/git-transport.test.js +0 -56
  471. package/dist/apps/local-coding-host/tests/git-transport.test.js.map +0 -1
  472. package/dist/apps/local-coding-host/tests/gitlab-credentials.test.d.ts +0 -2
  473. package/dist/apps/local-coding-host/tests/gitlab-credentials.test.d.ts.map +0 -1
  474. package/dist/apps/local-coding-host/tests/gitlab-credentials.test.js +0 -130
  475. package/dist/apps/local-coding-host/tests/gitlab-credentials.test.js.map +0 -1
  476. package/dist/apps/local-coding-host/tests/gitlab-platform-credentials.test.d.ts +0 -2
  477. package/dist/apps/local-coding-host/tests/gitlab-platform-credentials.test.d.ts.map +0 -1
  478. package/dist/apps/local-coding-host/tests/gitlab-platform-credentials.test.js +0 -273
  479. package/dist/apps/local-coding-host/tests/gitlab-platform-credentials.test.js.map +0 -1
  480. package/dist/apps/local-coding-host/tests/host-log.test.d.ts +0 -2
  481. package/dist/apps/local-coding-host/tests/host-log.test.d.ts.map +0 -1
  482. package/dist/apps/local-coding-host/tests/host-log.test.js +0 -51
  483. package/dist/apps/local-coding-host/tests/host-log.test.js.map +0 -1
  484. package/dist/apps/local-coding-host/tests/host-status-workspace.test.d.ts +0 -2
  485. package/dist/apps/local-coding-host/tests/host-status-workspace.test.d.ts.map +0 -1
  486. package/dist/apps/local-coding-host/tests/host-status-workspace.test.js +0 -256
  487. package/dist/apps/local-coding-host/tests/host-status-workspace.test.js.map +0 -1
  488. package/dist/apps/local-coding-host/tests/host-tool-stages.test.d.ts +0 -2
  489. package/dist/apps/local-coding-host/tests/host-tool-stages.test.d.ts.map +0 -1
  490. package/dist/apps/local-coding-host/tests/host-tool-stages.test.js +0 -82
  491. package/dist/apps/local-coding-host/tests/host-tool-stages.test.js.map +0 -1
  492. package/dist/apps/local-coding-host/tests/host-tools-logging.test.d.ts +0 -2
  493. package/dist/apps/local-coding-host/tests/host-tools-logging.test.d.ts.map +0 -1
  494. package/dist/apps/local-coding-host/tests/host-tools-logging.test.js +0 -110
  495. package/dist/apps/local-coding-host/tests/host-tools-logging.test.js.map +0 -1
  496. package/dist/apps/local-coding-host/tests/host-tools.test.d.ts +0 -2
  497. package/dist/apps/local-coding-host/tests/host-tools.test.d.ts.map +0 -1
  498. package/dist/apps/local-coding-host/tests/host-tools.test.js +0 -96
  499. package/dist/apps/local-coding-host/tests/host-tools.test.js.map +0 -1
  500. package/dist/apps/local-coding-host/tests/host-update.test.d.ts +0 -2
  501. package/dist/apps/local-coding-host/tests/host-update.test.d.ts.map +0 -1
  502. package/dist/apps/local-coding-host/tests/host-update.test.js +0 -102
  503. package/dist/apps/local-coding-host/tests/host-update.test.js.map +0 -1
  504. package/dist/apps/local-coding-host/tests/install-scripts.test.d.ts +0 -2
  505. package/dist/apps/local-coding-host/tests/install-scripts.test.d.ts.map +0 -1
  506. package/dist/apps/local-coding-host/tests/install-scripts.test.js +0 -80
  507. package/dist/apps/local-coding-host/tests/install-scripts.test.js.map +0 -1
  508. package/dist/apps/local-coding-host/tests/linux-service.test.d.ts +0 -2
  509. package/dist/apps/local-coding-host/tests/linux-service.test.d.ts.map +0 -1
  510. package/dist/apps/local-coding-host/tests/linux-service.test.js +0 -32
  511. package/dist/apps/local-coding-host/tests/linux-service.test.js.map +0 -1
  512. package/dist/apps/local-coding-host/tests/live-employee.test.d.ts +0 -2
  513. package/dist/apps/local-coding-host/tests/live-employee.test.d.ts.map +0 -1
  514. package/dist/apps/local-coding-host/tests/live-employee.test.js +0 -739
  515. package/dist/apps/local-coding-host/tests/live-employee.test.js.map +0 -1
  516. package/dist/apps/local-coding-host/tests/local-handoff-workspace-errors.test.d.ts +0 -2
  517. package/dist/apps/local-coding-host/tests/local-handoff-workspace-errors.test.d.ts.map +0 -1
  518. package/dist/apps/local-coding-host/tests/local-handoff-workspace-errors.test.js +0 -33
  519. package/dist/apps/local-coding-host/tests/local-handoff-workspace-errors.test.js.map +0 -1
  520. package/dist/apps/local-coding-host/tests/local-handoff-workspace.test.d.ts +0 -2
  521. package/dist/apps/local-coding-host/tests/local-handoff-workspace.test.d.ts.map +0 -1
  522. package/dist/apps/local-coding-host/tests/local-handoff-workspace.test.js +0 -67
  523. package/dist/apps/local-coding-host/tests/local-handoff-workspace.test.js.map +0 -1
  524. package/dist/apps/local-coding-host/tests/local-host.test.d.ts +0 -2
  525. package/dist/apps/local-coding-host/tests/local-host.test.d.ts.map +0 -1
  526. package/dist/apps/local-coding-host/tests/local-host.test.js +0 -1009
  527. package/dist/apps/local-coding-host/tests/local-host.test.js.map +0 -1
  528. package/dist/apps/local-coding-host/tests/local-intake-recovery.test.d.ts +0 -2
  529. package/dist/apps/local-coding-host/tests/local-intake-recovery.test.d.ts.map +0 -1
  530. package/dist/apps/local-coding-host/tests/local-intake-recovery.test.js +0 -71
  531. package/dist/apps/local-coding-host/tests/local-intake-recovery.test.js.map +0 -1
  532. package/dist/apps/local-coding-host/tests/local-mcp.test.d.ts +0 -2
  533. package/dist/apps/local-coding-host/tests/local-mcp.test.d.ts.map +0 -1
  534. package/dist/apps/local-coding-host/tests/local-mcp.test.js +0 -193
  535. package/dist/apps/local-coding-host/tests/local-mcp.test.js.map +0 -1
  536. package/dist/apps/local-coding-host/tests/local-model-usage.test.d.ts +0 -2
  537. package/dist/apps/local-coding-host/tests/local-model-usage.test.d.ts.map +0 -1
  538. package/dist/apps/local-coding-host/tests/local-model-usage.test.js +0 -55
  539. package/dist/apps/local-coding-host/tests/local-model-usage.test.js.map +0 -1
  540. package/dist/apps/local-coding-host/tests/local-outcome-workspace.test.d.ts +0 -2
  541. package/dist/apps/local-coding-host/tests/local-outcome-workspace.test.d.ts.map +0 -1
  542. package/dist/apps/local-coding-host/tests/local-outcome-workspace.test.js +0 -87
  543. package/dist/apps/local-coding-host/tests/local-outcome-workspace.test.js.map +0 -1
  544. package/dist/apps/local-coding-host/tests/login-url.test.d.ts +0 -2
  545. package/dist/apps/local-coding-host/tests/login-url.test.d.ts.map +0 -1
  546. package/dist/apps/local-coding-host/tests/login-url.test.js +0 -82
  547. package/dist/apps/local-coding-host/tests/login-url.test.js.map +0 -1
  548. package/dist/apps/local-coding-host/tests/material-fixture.d.ts +0 -13
  549. package/dist/apps/local-coding-host/tests/material-fixture.d.ts.map +0 -1
  550. package/dist/apps/local-coding-host/tests/material-fixture.js +0 -32
  551. package/dist/apps/local-coding-host/tests/material-fixture.js.map +0 -1
  552. package/dist/apps/local-coding-host/tests/merge-requests.test.d.ts +0 -2
  553. package/dist/apps/local-coding-host/tests/merge-requests.test.d.ts.map +0 -1
  554. package/dist/apps/local-coding-host/tests/merge-requests.test.js +0 -318
  555. package/dist/apps/local-coding-host/tests/merge-requests.test.js.map +0 -1
  556. package/dist/apps/local-coding-host/tests/model-stores.test.d.ts +0 -2
  557. package/dist/apps/local-coding-host/tests/model-stores.test.d.ts.map +0 -1
  558. package/dist/apps/local-coding-host/tests/model-stores.test.js +0 -152
  559. package/dist/apps/local-coding-host/tests/model-stores.test.js.map +0 -1
  560. package/dist/apps/local-coding-host/tests/operation-context.test.d.ts +0 -2
  561. package/dist/apps/local-coding-host/tests/operation-context.test.d.ts.map +0 -1
  562. package/dist/apps/local-coding-host/tests/operation-context.test.js +0 -171
  563. package/dist/apps/local-coding-host/tests/operation-context.test.js.map +0 -1
  564. package/dist/apps/local-coding-host/tests/outcome-cli.test.d.ts +0 -2
  565. package/dist/apps/local-coding-host/tests/outcome-cli.test.d.ts.map +0 -1
  566. package/dist/apps/local-coding-host/tests/outcome-cli.test.js +0 -208
  567. package/dist/apps/local-coding-host/tests/outcome-cli.test.js.map +0 -1
  568. package/dist/apps/local-coding-host/tests/pi-message-queue.test.d.ts +0 -2
  569. package/dist/apps/local-coding-host/tests/pi-message-queue.test.d.ts.map +0 -1
  570. package/dist/apps/local-coding-host/tests/pi-message-queue.test.js +0 -91
  571. package/dist/apps/local-coding-host/tests/pi-message-queue.test.js.map +0 -1
  572. package/dist/apps/local-coding-host/tests/pi-model-switch.test.d.ts +0 -2
  573. package/dist/apps/local-coding-host/tests/pi-model-switch.test.d.ts.map +0 -1
  574. package/dist/apps/local-coding-host/tests/pi-model-switch.test.js +0 -244
  575. package/dist/apps/local-coding-host/tests/pi-model-switch.test.js.map +0 -1
  576. package/dist/apps/local-coding-host/tests/pi-native-capabilities.test.d.ts +0 -2
  577. package/dist/apps/local-coding-host/tests/pi-native-capabilities.test.d.ts.map +0 -1
  578. package/dist/apps/local-coding-host/tests/pi-native-capabilities.test.js +0 -75
  579. package/dist/apps/local-coding-host/tests/pi-native-capabilities.test.js.map +0 -1
  580. package/dist/apps/local-coding-host/tests/pi-overflow-recovery.test.d.ts +0 -2
  581. package/dist/apps/local-coding-host/tests/pi-overflow-recovery.test.d.ts.map +0 -1
  582. package/dist/apps/local-coding-host/tests/pi-overflow-recovery.test.js +0 -183
  583. package/dist/apps/local-coding-host/tests/pi-overflow-recovery.test.js.map +0 -1
  584. package/dist/apps/local-coding-host/tests/pi-session-restore.test.d.ts +0 -2
  585. package/dist/apps/local-coding-host/tests/pi-session-restore.test.d.ts.map +0 -1
  586. package/dist/apps/local-coding-host/tests/pi-session-restore.test.js +0 -84
  587. package/dist/apps/local-coding-host/tests/pi-session-restore.test.js.map +0 -1
  588. package/dist/apps/local-coding-host/tests/platform-client-status.test.d.ts +0 -2
  589. package/dist/apps/local-coding-host/tests/platform-client-status.test.d.ts.map +0 -1
  590. package/dist/apps/local-coding-host/tests/platform-client-status.test.js +0 -29
  591. package/dist/apps/local-coding-host/tests/platform-client-status.test.js.map +0 -1
  592. package/dist/apps/local-coding-host/tests/platform-models.test.d.ts +0 -2
  593. package/dist/apps/local-coding-host/tests/platform-models.test.d.ts.map +0 -1
  594. package/dist/apps/local-coding-host/tests/platform-models.test.js +0 -395
  595. package/dist/apps/local-coding-host/tests/platform-models.test.js.map +0 -1
  596. package/dist/apps/local-coding-host/tests/powershell-resolution.test.d.ts +0 -2
  597. package/dist/apps/local-coding-host/tests/powershell-resolution.test.d.ts.map +0 -1
  598. package/dist/apps/local-coding-host/tests/powershell-resolution.test.js +0 -138
  599. package/dist/apps/local-coding-host/tests/powershell-resolution.test.js.map +0 -1
  600. package/dist/apps/local-coding-host/tests/profile-installer.test.d.ts +0 -2
  601. package/dist/apps/local-coding-host/tests/profile-installer.test.d.ts.map +0 -1
  602. package/dist/apps/local-coding-host/tests/profile-installer.test.js +0 -88
  603. package/dist/apps/local-coding-host/tests/profile-installer.test.js.map +0 -1
  604. package/dist/apps/local-coding-host/tests/profile.test.d.ts +0 -2
  605. package/dist/apps/local-coding-host/tests/profile.test.d.ts.map +0 -1
  606. package/dist/apps/local-coding-host/tests/profile.test.js +0 -88
  607. package/dist/apps/local-coding-host/tests/profile.test.js.map +0 -1
  608. package/dist/apps/local-coding-host/tests/provider-auth-status.test.d.ts +0 -2
  609. package/dist/apps/local-coding-host/tests/provider-auth-status.test.d.ts.map +0 -1
  610. package/dist/apps/local-coding-host/tests/provider-auth-status.test.js +0 -82
  611. package/dist/apps/local-coding-host/tests/provider-auth-status.test.js.map +0 -1
  612. package/dist/apps/local-coding-host/tests/qa-project-checkout.test.d.ts +0 -2
  613. package/dist/apps/local-coding-host/tests/qa-project-checkout.test.d.ts.map +0 -1
  614. package/dist/apps/local-coding-host/tests/qa-project-checkout.test.js +0 -101
  615. package/dist/apps/local-coding-host/tests/qa-project-checkout.test.js.map +0 -1
  616. package/dist/apps/local-coding-host/tests/qa-session-manager.test.d.ts +0 -2
  617. package/dist/apps/local-coding-host/tests/qa-session-manager.test.d.ts.map +0 -1
  618. package/dist/apps/local-coding-host/tests/qa-session-manager.test.js +0 -1493
  619. package/dist/apps/local-coding-host/tests/qa-session-manager.test.js.map +0 -1
  620. package/dist/apps/local-coding-host/tests/qa-verification-contract.test.d.ts +0 -2
  621. package/dist/apps/local-coding-host/tests/qa-verification-contract.test.d.ts.map +0 -1
  622. package/dist/apps/local-coding-host/tests/qa-verification-contract.test.js +0 -208
  623. package/dist/apps/local-coding-host/tests/qa-verification-contract.test.js.map +0 -1
  624. package/dist/apps/local-coding-host/tests/recovery-workspace.test.d.ts +0 -2
  625. package/dist/apps/local-coding-host/tests/recovery-workspace.test.d.ts.map +0 -1
  626. package/dist/apps/local-coding-host/tests/recovery-workspace.test.js +0 -69
  627. package/dist/apps/local-coding-host/tests/recovery-workspace.test.js.map +0 -1
  628. package/dist/apps/local-coding-host/tests/review-query.test.d.ts +0 -2
  629. package/dist/apps/local-coding-host/tests/review-query.test.d.ts.map +0 -1
  630. package/dist/apps/local-coding-host/tests/review-query.test.js +0 -66
  631. package/dist/apps/local-coding-host/tests/review-query.test.js.map +0 -1
  632. package/dist/apps/local-coding-host/tests/run-resources.test.d.ts +0 -2
  633. package/dist/apps/local-coding-host/tests/run-resources.test.d.ts.map +0 -1
  634. package/dist/apps/local-coding-host/tests/run-resources.test.js +0 -207
  635. package/dist/apps/local-coding-host/tests/run-resources.test.js.map +0 -1
  636. package/dist/apps/local-coding-host/tests/runtime-cleanup.test.d.ts +0 -2
  637. package/dist/apps/local-coding-host/tests/runtime-cleanup.test.d.ts.map +0 -1
  638. package/dist/apps/local-coding-host/tests/runtime-cleanup.test.js +0 -161
  639. package/dist/apps/local-coding-host/tests/runtime-cleanup.test.js.map +0 -1
  640. package/dist/apps/local-coding-host/tests/runtime-package-install.test.d.ts +0 -2
  641. package/dist/apps/local-coding-host/tests/runtime-package-install.test.d.ts.map +0 -1
  642. package/dist/apps/local-coding-host/tests/runtime-package-install.test.js +0 -63
  643. package/dist/apps/local-coding-host/tests/runtime-package-install.test.js.map +0 -1
  644. package/dist/apps/local-coding-host/tests/runtime-version.test.d.ts +0 -2
  645. package/dist/apps/local-coding-host/tests/runtime-version.test.d.ts.map +0 -1
  646. package/dist/apps/local-coding-host/tests/runtime-version.test.js +0 -15
  647. package/dist/apps/local-coding-host/tests/runtime-version.test.js.map +0 -1
  648. package/dist/apps/local-coding-host/tests/secure-json.test.d.ts +0 -2
  649. package/dist/apps/local-coding-host/tests/secure-json.test.d.ts.map +0 -1
  650. package/dist/apps/local-coding-host/tests/secure-json.test.js +0 -64
  651. package/dist/apps/local-coding-host/tests/secure-json.test.js.map +0 -1
  652. package/dist/apps/local-coding-host/tests/skill-storage-gc.test.d.ts +0 -2
  653. package/dist/apps/local-coding-host/tests/skill-storage-gc.test.d.ts.map +0 -1
  654. package/dist/apps/local-coding-host/tests/skill-storage-gc.test.js +0 -312
  655. package/dist/apps/local-coding-host/tests/skill-storage-gc.test.js.map +0 -1
  656. package/dist/apps/local-coding-host/tests/storage-maintenance.test.d.ts +0 -2
  657. package/dist/apps/local-coding-host/tests/storage-maintenance.test.d.ts.map +0 -1
  658. package/dist/apps/local-coding-host/tests/storage-maintenance.test.js +0 -135
  659. package/dist/apps/local-coding-host/tests/storage-maintenance.test.js.map +0 -1
  660. package/dist/apps/local-coding-host/tests/test-executor.test.d.ts +0 -2
  661. package/dist/apps/local-coding-host/tests/test-executor.test.d.ts.map +0 -1
  662. package/dist/apps/local-coding-host/tests/test-executor.test.js +0 -365
  663. package/dist/apps/local-coding-host/tests/test-executor.test.js.map +0 -1
  664. package/dist/apps/local-coding-host/tests/test-reports.test.d.ts +0 -2
  665. package/dist/apps/local-coding-host/tests/test-reports.test.d.ts.map +0 -1
  666. package/dist/apps/local-coding-host/tests/test-reports.test.js +0 -68
  667. package/dist/apps/local-coding-host/tests/test-reports.test.js.map +0 -1
  668. package/dist/apps/local-coding-host/tests/test-run-manager.test.d.ts +0 -2
  669. package/dist/apps/local-coding-host/tests/test-run-manager.test.d.ts.map +0 -1
  670. package/dist/apps/local-coding-host/tests/test-run-manager.test.js +0 -287
  671. package/dist/apps/local-coding-host/tests/test-run-manager.test.js.map +0 -1
  672. package/dist/apps/local-coding-host/tests/tool-dispatch.integration.test.d.ts +0 -2
  673. package/dist/apps/local-coding-host/tests/tool-dispatch.integration.test.d.ts.map +0 -1
  674. package/dist/apps/local-coding-host/tests/tool-dispatch.integration.test.js +0 -224
  675. package/dist/apps/local-coding-host/tests/tool-dispatch.integration.test.js.map +0 -1
  676. package/dist/apps/local-coding-host/tests/tool-dispatch.test.d.ts +0 -2
  677. package/dist/apps/local-coding-host/tests/tool-dispatch.test.d.ts.map +0 -1
  678. package/dist/apps/local-coding-host/tests/tool-dispatch.test.js +0 -47
  679. package/dist/apps/local-coding-host/tests/tool-dispatch.test.js.map +0 -1
  680. package/dist/apps/local-coding-host/tests/tool-probe.test.d.ts +0 -2
  681. package/dist/apps/local-coding-host/tests/tool-probe.test.d.ts.map +0 -1
  682. package/dist/apps/local-coding-host/tests/tool-probe.test.js +0 -55
  683. package/dist/apps/local-coding-host/tests/tool-probe.test.js.map +0 -1
  684. package/dist/apps/local-coding-host/tests/windows-background-check.test.d.ts +0 -2
  685. package/dist/apps/local-coding-host/tests/windows-background-check.test.d.ts.map +0 -1
  686. package/dist/apps/local-coding-host/tests/windows-background-check.test.js +0 -60
  687. package/dist/apps/local-coding-host/tests/windows-background-check.test.js.map +0 -1
  688. package/dist/apps/local-coding-host/tests/windows-install-script.test.d.ts +0 -2
  689. package/dist/apps/local-coding-host/tests/windows-install-script.test.d.ts.map +0 -1
  690. package/dist/apps/local-coding-host/tests/windows-install-script.test.js +0 -170
  691. package/dist/apps/local-coding-host/tests/windows-install-script.test.js.map +0 -1
  692. package/dist/apps/local-coding-host/tests/windows-installer.test.d.ts +0 -2
  693. package/dist/apps/local-coding-host/tests/windows-installer.test.d.ts.map +0 -1
  694. package/dist/apps/local-coding-host/tests/windows-installer.test.js +0 -244
  695. package/dist/apps/local-coding-host/tests/windows-installer.test.js.map +0 -1
  696. package/dist/apps/local-coding-host/tests/windows-task-configuration.test.d.ts +0 -2
  697. package/dist/apps/local-coding-host/tests/windows-task-configuration.test.d.ts.map +0 -1
  698. package/dist/apps/local-coding-host/tests/windows-task-configuration.test.js +0 -34
  699. package/dist/apps/local-coding-host/tests/windows-task-configuration.test.js.map +0 -1
  700. package/dist/apps/local-coding-host/tests/workflow-rule-projection.test.d.ts +0 -2
  701. package/dist/apps/local-coding-host/tests/workflow-rule-projection.test.d.ts.map +0 -1
  702. package/dist/apps/local-coding-host/tests/workflow-rule-projection.test.js +0 -370
  703. package/dist/apps/local-coding-host/tests/workflow-rule-projection.test.js.map +0 -1
  704. package/dist/apps/local-coding-host/tests/workspace-diff.test.d.ts +0 -2
  705. package/dist/apps/local-coding-host/tests/workspace-diff.test.d.ts.map +0 -1
  706. package/dist/apps/local-coding-host/tests/workspace-diff.test.js +0 -166
  707. package/dist/apps/local-coding-host/tests/workspace-diff.test.js.map +0 -1
  708. package/dist/apps/local-coding-host/tests/workspace-gc.test.d.ts +0 -2
  709. package/dist/apps/local-coding-host/tests/workspace-gc.test.d.ts.map +0 -1
  710. package/dist/apps/local-coding-host/tests/workspace-gc.test.js +0 -391
  711. package/dist/apps/local-coding-host/tests/workspace-gc.test.js.map +0 -1
  712. package/dist/services/platform-api/src/coding-run/coding-tool-definitions.d.ts +0 -83
  713. package/dist/services/platform-api/src/coding-run/coding-tool-definitions.d.ts.map +0 -1
  714. package/dist/services/platform-api/src/coding-run/coding-tool-definitions.js +0 -282
  715. package/dist/services/platform-api/src/coding-run/coding-tool-definitions.js.map +0 -1
  716. package/dist/services/platform-api/src/coding-run/delivery-requirements.d.ts +0 -15
  717. package/dist/services/platform-api/src/coding-run/delivery-requirements.d.ts.map +0 -1
  718. package/dist/services/platform-api/src/coding-run/delivery-requirements.js +0 -60
  719. package/dist/services/platform-api/src/coding-run/delivery-requirements.js.map +0 -1
  720. package/dist/services/platform-api/src/coding-run/development-test-report.d.ts +0 -10
  721. package/dist/services/platform-api/src/coding-run/development-test-report.d.ts.map +0 -1
  722. package/dist/services/platform-api/src/coding-run/development-test-report.js +0 -32
  723. package/dist/services/platform-api/src/coding-run/development-test-report.js.map +0 -1
  724. package/dist/services/platform-api/src/coding-run/host-tool-dispatch.d.ts +0 -21
  725. package/dist/services/platform-api/src/coding-run/host-tool-dispatch.d.ts.map +0 -1
  726. package/dist/services/platform-api/src/coding-run/host-tool-dispatch.js +0 -86
  727. package/dist/services/platform-api/src/coding-run/host-tool-dispatch.js.map +0 -1
  728. package/dist/services/platform-api/src/coding-run/workspace-materials.d.ts +0 -37
  729. package/dist/services/platform-api/src/coding-run/workspace-materials.d.ts.map +0 -1
  730. package/dist/services/platform-api/src/coding-run/workspace-materials.js +0 -99
  731. package/dist/services/platform-api/src/coding-run/workspace-materials.js.map +0 -1
  732. package/dist/services/platform-api/src/common/app-exception.d.ts +0 -17
  733. package/dist/services/platform-api/src/common/app-exception.d.ts.map +0 -1
  734. package/dist/services/platform-api/src/common/app-exception.js +0 -46
  735. package/dist/services/platform-api/src/common/app-exception.js.map +0 -1
  736. package/dist/services/platform-api/src/config/environment.d.ts +0 -30
  737. package/dist/services/platform-api/src/config/environment.d.ts.map +0 -1
  738. package/dist/services/platform-api/src/config/environment.js +0 -123
  739. package/dist/services/platform-api/src/config/environment.js.map +0 -1
  740. package/dist/services/platform-api/src/database/database.service.d.ts +0 -38
  741. package/dist/services/platform-api/src/database/database.service.d.ts.map +0 -1
  742. package/dist/services/platform-api/src/database/database.service.js +0 -520
  743. package/dist/services/platform-api/src/database/database.service.js.map +0 -1
  744. package/dist/services/platform-api/src/database/migration-ledger.d.ts +0 -5
  745. package/dist/services/platform-api/src/database/migration-ledger.d.ts.map +0 -1
  746. package/dist/services/platform-api/src/database/migration-ledger.js +0 -33
  747. package/dist/services/platform-api/src/database/migration-ledger.js.map +0 -1
  748. package/dist/services/platform-api/src/digital-employee/local-skill-bundles.d.ts +0 -13
  749. package/dist/services/platform-api/src/digital-employee/local-skill-bundles.d.ts.map +0 -1
  750. package/dist/services/platform-api/src/digital-employee/local-skill-bundles.js +0 -25
  751. package/dist/services/platform-api/src/digital-employee/local-skill-bundles.js.map +0 -1
  752. package/dist/services/platform-api/src/mcp-connection/mcp-tool-name.d.ts +0 -6
  753. package/dist/services/platform-api/src/mcp-connection/mcp-tool-name.d.ts.map +0 -1
  754. package/dist/services/platform-api/src/mcp-connection/mcp-tool-name.js +0 -20
  755. package/dist/services/platform-api/src/mcp-connection/mcp-tool-name.js.map +0 -1
  756. package/dist/services/platform-api/src/qa/qa-tool-definitions.d.ts +0 -100
  757. package/dist/services/platform-api/src/qa/qa-tool-definitions.d.ts.map +0 -1
  758. package/dist/services/platform-api/src/qa/qa-tool-definitions.js +0 -498
  759. package/dist/services/platform-api/src/qa/qa-tool-definitions.js.map +0 -1
  760. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,655 +0,0 @@
1
- import { WORKSPACE_TEMPLATE_FILES } from "@ai-platform/api-contracts";
2
- import { execFileSync } from "node:child_process";
3
- import { mkdir, mkdtemp, readdir, readFile, rm, symlink, writeFile } from "node:fs/promises";
4
- import { tmpdir } from "node:os";
5
- import { join } from "node:path";
6
- import { afterEach, describe, expect, it, vi } from "vitest";
7
- import { codingDeliveryRequirements } from "../../../services/platform-api/src/coding-run/delivery-requirements.js";
8
- import { workspaceMaterialPreparation } from "../../../services/platform-api/src/coding-run/workspace-materials.js";
9
- import { initialPrompt, worktreeTreeHash } from "../src/coding-run-manager.js";
10
- import { collectDeliveryFiles as collectFiles, commandMaterialReader, initializeDeliveryFiles as executeMaterials, publishReviewMaterials as publishMaterials, } from "../src/delivery-files.js";
11
- import { DELIVERY_FILES, STAGE_DELIVERY_PROTOCOLS } from "../src/stage-delivery.js";
12
- import { hostIdentity, readDeviceAuth, syncDeviceGitLabCredential, writeDeviceAuth, writeHostState, } from "../src/state.js";
13
- import { materialInput, materialSource, readMaterialFixture } from "./material-fixture.js";
14
- const withMaterials = (input) => ({
15
- ...materialInput(input),
16
- materialPreparation: workspaceMaterialPreparation(materialInput(input)),
17
- deliveryRequirements: codingDeliveryRequirements(input),
18
- });
19
- const initializeDeliveryFiles = async (root, input, resume = false) => executeMaterials(root, withMaterials(input), resume, readMaterialFixture);
20
- const publishReviewMaterials = async (root, input) => publishMaterials(root, withMaterials({ ...input, phase: "PREPARATION" }), readMaterialFixture);
21
- const collectDeliveryFiles = (root, input, slots) => collectFiles(root, materialInput(input), Object.entries(DELIVERY_FILES)
22
- .filter(([slot]) => !["SUMMARY", "DEPLOYMENT_REPORT"].includes(slot))
23
- .filter(([slot]) => slots
24
- ? slots.includes(slot)
25
- : !["TEST_PLAN", "TEST_REPORT"].includes(slot))
26
- .filter(([slot]) => slot !== "DESIGN" || input.technicalDesign)
27
- .filter(([slot]) => slot !== "SYSTEM_REVIEW")
28
- .map(([slot, path]) => ({
29
- slot: slot,
30
- path,
31
- required: slot !== "TEST_PLAN" &&
32
- !(input.phase === "DEPLOYMENT" && ["PRD", "DESIGN"].includes(slot)),
33
- })));
34
- let root = "";
35
- afterEach(async () => {
36
- vi.unstubAllEnvs();
37
- if (root)
38
- await rm(root, { recursive: true, force: true });
39
- });
40
- async function setup() {
41
- root = await mkdtemp(join(tmpdir(), "aip-files-"));
42
- await mkdir(join(root, "main"));
43
- await mkdir(join(root, "other"));
44
- const input = withMaterials({
45
- workItem: { key: "AIP-12" },
46
- primaryProjectId: "p1",
47
- projects: [
48
- { id: "p2", name: "other" },
49
- { id: "p1", name: "main" },
50
- ],
51
- requirement: { body_markdown: "实际需求正文" },
52
- technicalDesign: { content: "实际设计正文" },
53
- });
54
- return { input, directory: await initializeDeliveryFiles(root, input) };
55
- }
56
- describe("固定交付文件", () => {
57
- it("主项目不在首项时仍只采集主项目材料,缺失时不从次项目补取", async () => {
58
- const { input, directory } = await setup();
59
- const secondary = join(root, "other", "docs/aip/AIP-12");
60
- await mkdir(secondary, { recursive: true });
61
- await writeFile(join(secondary, "plan.md"), "次项目材料不应采集");
62
- await writeFile(join(directory, "plan.md"), "主项目真实计划");
63
- const files = await collectDeliveryFiles(root, input, ["IMPLEMENTATION_PLAN"]);
64
- expect(files).toHaveLength(1);
65
- expect(files[0]?.content).toBe("主项目真实计划");
66
- await rm(join(directory, "plan.md"));
67
- await expect(collectDeliveryFiles(root, input, ["IMPLEMENTATION_PLAN"])).rejects.toThrow("plan.md 文件不存在");
68
- });
69
- it("下发所有原型与二进制资源并保持 PRD 相对链接,恢复不覆盖本地修改", async () => {
70
- const { input, directory } = await setup();
71
- input.prototypeFiles = [
72
- { path: "方案/index.html", base64: Buffer.from("adopted").toString("base64") },
73
- { path: "draft.html", base64: Buffer.from("draft").toString("base64") },
74
- { path: "assets/image.png", base64: Buffer.from([0, 255, 1]).toString("base64") },
75
- ];
76
- await initializeDeliveryFiles(root, input);
77
- expect(await readFile(join(directory, "prototype/方案/index.html"), "utf8")).toBe("adopted");
78
- expect(await readFile(join(directory, "prototype/draft.html"), "utf8")).toBe("draft");
79
- expect(await readFile(join(directory, "prototype/assets/image.png"))).toEqual(Buffer.from([0, 255, 1]));
80
- await writeFile(join(directory, "prototype/draft.html"), "local changes");
81
- await initializeDeliveryFiles(root, input, true);
82
- expect(await readFile(join(directory, "prototype/draft.html"), "utf8")).toBe("local changes");
83
- });
84
- it("原型下发拒绝越界路径和本地符号链接", async () => {
85
- const { input, directory } = await setup();
86
- for (const path of ["../prd.md", "/tmp/file", "a/../../file", "C:/file"]) {
87
- await expect(initializeDeliveryFiles(root, { ...input, prototypeFiles: [{ path, base64: "eA==" }] })).rejects.toThrow("AIP_MATERIAL_PATH_INVALID");
88
- }
89
- await symlink(join(root, "other"), join(directory, "prototype"));
90
- await expect(initializeDeliveryFiles(root, {
91
- ...input,
92
- prototypeFiles: [{ path: "index.html", base64: "eA==" }],
93
- })).rejects.toThrow("AIP_MATERIAL_PATH_INVALID");
94
- });
95
- it("开发协议增加必交测试报告,部署携带已有报告且不新增必交要求", () => {
96
- for (const protocol of [
97
- STAGE_DELIVERY_PROTOCOLS.DEVELOPMENT,
98
- STAGE_DELIVERY_PROTOCOLS.DEPLOYMENT,
99
- ]) {
100
- expect(protocol.instructions).toContain("summary");
101
- expect(protocol.instructions).not.toMatch(/summary\.md|deployment\.md|无参数/);
102
- }
103
- expect(STAGE_DELIVERY_PROTOCOLS.DEVELOPMENT.requiredFiles).toEqual([
104
- "plan.md",
105
- "code_review.md",
106
- "report.md",
107
- "release_checklist.md",
108
- ]);
109
- expect(STAGE_DELIVERY_PROTOCOLS.DEPLOYMENT.requiredFiles).toEqual([
110
- "plan.md",
111
- "code_review.md",
112
- "release_checklist.md",
113
- ]);
114
- expect(STAGE_DELIVERY_PROTOCOLS.DEPLOYMENT.optionalFiles).toContain("report.md");
115
- });
116
- it("只在主项目下发真实输入及完整模板包,恢复保留修改", async () => {
117
- const { input, directory } = await setup();
118
- expect((await readdir(directory)).sort()).toEqual([...WORKSPACE_TEMPLATE_FILES, "prd.md", "design.md"].sort());
119
- expect(await readdir(join(root, "other"))).toEqual([]);
120
- expect(await readFile(join(directory, "prd.md"), "utf8")).toBe("实际需求正文");
121
- expect(await readdir(directory)).not.toContain("deployment.md");
122
- expect(await readdir(directory)).not.toContain("summary.md");
123
- await writeFile(join(directory, "prd.md"), "本地改稿");
124
- await writeFile(join(directory, "deployment.md"), "本地结果");
125
- await initializeDeliveryFiles(root, { ...input, projects: [...input.projects].reverse() });
126
- expect(await readFile(join(directory, "prd.md"), "utf8")).toBe("本地改稿");
127
- expect(await readFile(join(directory, "deployment.md"), "utf8")).toBe("本地结果");
128
- });
129
- it("错误定位缺文件与空正文,正文自由并忽略目录中过程稿", async () => {
130
- const { input, directory } = await setup();
131
- await expect(collectDeliveryFiles(root, input)).rejects.toThrow("code_review.md 内容为空");
132
- for (const f of [
133
- "summary.md",
134
- "plan.md",
135
- "deployment.md",
136
- "code_review.md",
137
- "release_checklist.md",
138
- ])
139
- await writeFile(join(directory, f), "任意正文".repeat(300));
140
- await writeFile(join(directory, "report-final-v3.md"), "不应收集");
141
- expect((await collectDeliveryFiles(root, input)).map((f) => f.slot)).toHaveLength(5);
142
- await rm(join(directory, "prd.md"));
143
- await initializeDeliveryFiles(root, input, true);
144
- await expect(collectDeliveryFiles(root, input)).rejects.toThrow("prd.md 文件不存在");
145
- });
146
- it("plan 必须有非空内容,不校验清单格式和勾选状态", async () => {
147
- const { input, directory } = await setup();
148
- const plan = join(directory, "plan.md");
149
- for (const content of ["", " \n\t"]) {
150
- await writeFile(plan, content);
151
- await expect(collectDeliveryFiles(root, input, ["IMPLEMENTATION_PLAN"])).rejects.toThrow("plan.md 内容为空");
152
- }
153
- for (const content of ["开发完成后整理的实施说明", "- [ ] 尚未勾选"]) {
154
- await writeFile(plan, content);
155
- expect(await collectDeliveryFiles(root, input, ["IMPLEMENTATION_PLAN"])).toEqual([
156
- expect.objectContaining({ slot: "IMPLEMENTATION_PLAN", content }),
157
- ]);
158
- }
159
- await rm(plan);
160
- await expect(collectDeliveryFiles(root, input, ["IMPLEMENTATION_PLAN"])).rejects.toThrow("plan.md 文件不存在");
161
- });
162
- it("部署收集无需旧测试报告,缺失可选需求文档不阻断", async () => {
163
- const { input, directory } = await setup();
164
- for (const name of [
165
- "summary.md",
166
- "plan.md",
167
- "deployment.md",
168
- "code_review.md",
169
- "release_checklist.md",
170
- ])
171
- await writeFile(join(directory, name), "真实事实");
172
- await rm(join(directory, "prd.md"));
173
- await rm(join(directory, "design.md"));
174
- const files = await collectDeliveryFiles(root, { ...input, phase: "DEPLOYMENT" });
175
- expect(files.map((file) => file.slot)).not.toContain("DEPLOYMENT_REPORT");
176
- expect(files.map((file) => file.slot)).not.toContain("SUMMARY");
177
- expect(files.map((file) => file.slot)).not.toContain("TEST_REPORT");
178
- });
179
- it("只按路径指引主/子会话,不把原始正文放进提示", async () => {
180
- const { input } = await setup();
181
- const promptInput = {
182
- ...materialInput(input),
183
- deliveryRequirements: codingDeliveryRequirements({ ...input, phase: "DEVELOPMENT" }),
184
- phase: "DEVELOPMENT",
185
- requirement: { title: "PRD", source: materialSource(input.requirement.body_markdown) },
186
- technicalDesign: input.technicalDesign
187
- ? { source: materialSource(input.technicalDesign.content), title: "Design" }
188
- : null,
189
- workItem: { ...input.workItem, id: "work-item", title: "任务" },
190
- agent: { systemPrompt: "", skills: [] },
191
- providerId: "openai-codex",
192
- modelId: "m",
193
- thinkingLevel: "high",
194
- projects: input.projects.map((p) => ({
195
- ...p,
196
- repositoryUrl: "",
197
- baselineCommit: "",
198
- baselineBranch: "main",
199
- devBranch: "feature",
200
- testBranch: "",
201
- })),
202
- };
203
- const confirmed = materialSource("已确认的上线交接正文");
204
- promptInput.testHandoff = {
205
- summary: "已验收",
206
- files: [
207
- {
208
- slot: "TEST_REPORT",
209
- path: "docs/aip/AIP-12/test_report.md",
210
- materialPath: "handoff/confirmed-1.md",
211
- source: confirmed,
212
- baseMaterialPath: "handoff/base-1.md",
213
- baseSource: materialSource("旧版正文"),
214
- },
215
- ],
216
- };
217
- const prompt = initialPrompt(materialInput(promptInput), root);
218
- expect(prompt).toContain(JSON.stringify(join(root, "main/docs/aip/AIP-12/handoff/confirmed-1.md")));
219
- expect(prompt).toContain(JSON.stringify(join(root, "main/docs/aip/AIP-12/handoff/base-1.md")));
220
- expect(prompt).not.toContain(confirmed.fileRef);
221
- expect(prompt).not.toContain("已确认的上线交接正文");
222
- expect(prompt).not.toContain("节点规则");
223
- expect(prompt).not.toContain("谁执行谁");
224
- expect(prompt).not.toContain("Apollo");
225
- const updated = initialPrompt(materialInput({ ...promptInput, inputConflict: true }), root);
226
- expect(updated).toContain("正式输入材料已更新");
227
- expect(updated).not.toContain(".platform.md");
228
- expect(prompt).toContain(join(root, "main/docs/aip/AIP-12/prd.md"));
229
- expect(prompt).not.toContain("实际需求正文");
230
- expect(prompt).not.toContain("实际设计正文");
231
- });
232
- it.each([true, false, undefined])("开发交接完整分支成果不依赖审查开关(%s),普通聊天不强制推送", (reviewEnabled) => {
233
- const input = withMaterials({
234
- phase: "DEVELOPMENT",
235
- ...(reviewEnabled === undefined ? {} : { qualityReview: { enabled: reviewEnabled } }),
236
- requirement: { title: "本轮修改", body_markdown: "部署新改动" },
237
- technicalDesign: null,
238
- primaryProjectId: "p1",
239
- workItem: { id: "work-item", key: "AIP-12", title: "修复后重新部署" },
240
- agent: { systemPrompt: "", skills: [] },
241
- providerId: "openai-codex",
242
- modelId: "m",
243
- thinkingLevel: "high",
244
- projects: [
245
- {
246
- id: "p1",
247
- name: "app",
248
- repositoryUrl: "",
249
- baselineCommit: "",
250
- baselineBranch: "main",
251
- devBranch: "aip/AIP-12",
252
- testBranch: "test",
253
- },
254
- ],
255
- });
256
- const development = initialPrompt(materialInput(input), "/workspace");
257
- expect(development).toContain("aip/AIP-12");
258
- expect(development).not.toContain("节点规则");
259
- expect(STAGE_DELIVERY_PROTOCOLS.DEVELOPMENT.instructions).toContain("调用 complete_development 前提交本轮改动并推送已分配开发分支");
260
- const deployment = initialPrompt(materialInput({ ...input, phase: "DEPLOYMENT" }), "/workspace");
261
- expect(deployment).toContain("DEPLOYMENT");
262
- expect(deployment).not.toContain("调用 complete_development 前");
263
- });
264
- it.each([false, true])("开发提示词不暴露部署配置(已有部署快照:%s)", async (hasSnapshot) => {
265
- const { input } = await setup();
266
- const deploymentConfiguration = hasSnapshot
267
- ? {
268
- projects: [
269
- {
270
- projectId: "p1",
271
- projectName: "app",
272
- testBranch: "private-test-branch",
273
- instructions: "private-deployment-instructions",
274
- pipelines: [
275
- {
276
- name: "private-pipeline",
277
- pipelineId: "private-pipeline-id",
278
- consoleUrl: "https://deploy.example/private-pipeline",
279
- triggerMode: "AUTO",
280
- targets: [],
281
- },
282
- ],
283
- },
284
- ],
285
- }
286
- : undefined;
287
- const context = {
288
- ...input,
289
- workItem: { id: "work-item", key: "AIP-12", title: "修复缺陷" },
290
- agent: { systemPrompt: "", skills: [] },
291
- providerId: "openai-codex",
292
- modelId: "m",
293
- thinkingLevel: "high",
294
- projects: input.projects.map((project) => ({
295
- ...project,
296
- repositoryUrl: "",
297
- baselineCommit: "",
298
- baselineBranch: "main",
299
- devBranch: "aip/AIP-12",
300
- testBranch: "private-test-branch",
301
- })),
302
- ...(deploymentConfiguration ? { deploymentConfiguration } : {}),
303
- };
304
- const development = initialPrompt(withMaterials({ ...context, phase: "DEVELOPMENT" }), root);
305
- expect(development).not.toContain("deploymentConfiguration");
306
- expect(development).not.toContain("private-");
307
- const deployment = initialPrompt(withMaterials({ ...context, phase: "DEPLOYMENT" }), root);
308
- expect(deployment).toContain("private-test-branch");
309
- if (hasSnapshot) {
310
- expect(JSON.parse(deployment.split("本轮执行上下文:\n")[1]).deploymentConfiguration).toEqual(deploymentConfiguration);
311
- }
312
- });
313
- it("拒绝错误主项目、路径穿越、文件外链和替换整个任务目录", async () => {
314
- const { input, directory } = await setup();
315
- await expect(initializeDeliveryFiles(root, { ...input, primaryProjectId: "missing" })).rejects.toThrow("PRIMARY_PROJECT");
316
- await expect(initializeDeliveryFiles(root, { ...input, workItem: { key: "../../outside" } })).rejects.toThrow("KEY_INVALID");
317
- const external = join(root, "external");
318
- await mkdir(external);
319
- await writeFile(join(external, "private"), "private");
320
- await rm(join(directory, "prd.md"));
321
- await symlink(join(external, "private"), join(directory, "prd.md"));
322
- await expect(collectDeliveryFiles(root, input)).rejects.toThrow("无法读取或路径越界");
323
- await rm(directory, { recursive: true });
324
- await symlink(external, directory);
325
- await expect(collectDeliveryFiles(root, input)).rejects.toThrow("OUTSIDE_PROJECT");
326
- });
327
- it("输入更新覆盖正式文件且不沿外链写入,历史对照文件保留", async () => {
328
- const { input, directory } = await setup();
329
- const external = join(root, "private");
330
- await writeFile(external, "keep");
331
- await writeFile(join(directory, "prd.platform.md"), "历史稿");
332
- await rm(join(directory, "prd.md"));
333
- await symlink(external, join(directory, "prd.md"));
334
- await initializeDeliveryFiles(root, {
335
- ...input,
336
- inputConflict: true,
337
- requirement: { body_markdown: "最新平台稿" },
338
- });
339
- expect(await readFile(external, "utf8")).toBe("keep");
340
- expect(await readFile(join(directory, "prd.platform.md"), "utf8")).toBe("历史稿");
341
- expect(await readFile(join(directory, "prd.md"), "utf8")).toBe("最新平台稿");
342
- expect(await readdir(directory)).not.toContain("design.platform.md");
343
- });
344
- it("仅本次指定文件不影响被测代码树,源码变化必须重新验证", async () => {
345
- const { directory } = await setup();
346
- const cwd = join(root, "main");
347
- const git = (...args) => execFileSync("git", args, { cwd, stdio: "pipe" });
348
- git("init");
349
- git("config", "user.email", "test@example.invalid");
350
- git("config", "user.name", "test");
351
- await writeFile(join(cwd, "code.js"), "export const x=1");
352
- git("add", ".");
353
- git("commit", "-m", "base");
354
- const base = await worktreeTreeHash(cwd, "AIP-12", true);
355
- await writeFile(join(directory, "deployment.md"), "新报告");
356
- expect(await worktreeTreeHash(cwd, "AIP-12")).toBe(base);
357
- git("add", ".");
358
- git("commit", "-m", "report");
359
- expect(await worktreeTreeHash(cwd, "AIP-12", true)).toBe(base);
360
- await writeFile(join(cwd, "code.js"), "export const x=2");
361
- expect(await worktreeTreeHash(cwd, "AIP-12")).not.toBe(base);
362
- });
363
- });
364
- describe("准备阶段发布审查材料", () => {
365
- it.each(["directory", "contents", "local-exclude"])("只向主项目发布材料,其他项目只推分支并保留忽略与暂存:%s", async (ignoreMode) => {
366
- const { input } = await setup();
367
- vi.stubEnv("AIP_HOME", join(root, "host"));
368
- vi.stubEnv("AIP_PROFILE", "local");
369
- await writeDeviceAuth({
370
- platformUrl: "http://127.0.0.1:3000",
371
- deviceToken: "test-only-device-token",
372
- expiresAt: "2099-01-01T00:00:00Z",
373
- user: { id: "robot", username: "robot" },
374
- });
375
- const host = { ...hostIdentity(), hostId: "host", generation: 1, catalogRevision: 0 };
376
- await writeHostState(host);
377
- await syncDeviceGitLabCredential((await readDeviceAuth()), host, {
378
- baseUrl: "https://gitlab.example.test",
379
- revision: 1,
380
- credential: {
381
- username: "robot",
382
- token: "test-only-gitlab-token",
383
- commitIdentity: { name: "Review Robot", email: "review@example.test" },
384
- },
385
- });
386
- const projects = [];
387
- const git = (cwd, ...args) => execFileSync("git", args, { cwd, encoding: "utf8", stdio: "pipe" }).trim();
388
- for (const p of input.projects) {
389
- const cwd = join(root, p.name);
390
- git(cwd, "init", "-b", "main");
391
- git(cwd, "config", "user.name", "fixture");
392
- git(cwd, "config", "user.email", "fixture@example.invalid");
393
- await writeFile(join(cwd, "code.js"), "baseline");
394
- git(cwd, "add", "code.js");
395
- if (p.id === input.primaryProjectId) {
396
- await writeFile(join(cwd, "docs/aip/AIP-12/prd.md"), "仓库中的旧版需求");
397
- git(cwd, "add", "docs/aip/AIP-12/prd.md");
398
- }
399
- if (ignoreMode === "local-exclude") {
400
- await writeFile(join(cwd, ".git/info/exclude"), "docs/\n");
401
- }
402
- else {
403
- await writeFile(join(cwd, ".gitignore"), (ignoreMode === "directory" ? "docs/\n" : "docs/*\n") +
404
- (p.id === input.primaryProjectId ? "" : "*.md\n"));
405
- git(cwd, "add", ".gitignore");
406
- }
407
- git(cwd, "commit", "-m", "baseline");
408
- const remote = join(root, `${p.name}.git`);
409
- git(root, "clone", "--bare", cwd, remote);
410
- git(cwd, "remote", "add", "origin", remote);
411
- git(cwd, "config", "remote.origin.mirror", "true");
412
- git(cwd, "checkout", "-b", "aip/materials");
413
- await writeFile(join(cwd, "unrelated.txt"), "leave staged");
414
- git(cwd, "add", "unrelated.txt");
415
- projects.push({
416
- ...p,
417
- devBranch: "aip/materials",
418
- baselineBranch: "main",
419
- testBranch: "test",
420
- baseline: git(cwd, "rev-parse", "HEAD"),
421
- });
422
- }
423
- input.prototypeFiles = [
424
- { path: "pages/index.html", base64: Buffer.from("prototype").toString("base64") },
425
- ];
426
- await publishReviewMaterials(root, { ...input, projects });
427
- for (const project of projects) {
428
- const cwd = join(root, project.name);
429
- const remote = join(root, `${project.name}.git`);
430
- const head = git(cwd, "rev-parse", "HEAD");
431
- expect(git(remote, "rev-parse", "refs/heads/aip/materials")).toBe(head);
432
- expect(git(remote, "rev-parse", "main")).toBe(project.baseline);
433
- expect(git(cwd, "diff", "--cached", "--name-only")).toBe("unrelated.txt");
434
- if (project.id !== input.primaryProjectId) {
435
- expect(head).toBe(project.baseline);
436
- expect(await readdir(cwd)).not.toContain("docs");
437
- expect(git(cwd, "status", "--porcelain")).toBe("A unrelated.txt");
438
- continue;
439
- }
440
- expect(git(cwd, "log", "-1", "--format=%an <%ae>%n%cn <%ce>")).toBe("Review Robot <review@example.test>\nReview Robot <review@example.test>");
441
- expect(git(remote, "show", `${head}:docs/aip/AIP-12/prd.md`)).toBe(input.requirement.body_markdown);
442
- expect(git(remote, "show", `${head}:docs/aip/AIP-12/design.md`)).toBe(input.technicalDesign.content);
443
- expect(git(cwd, "diff", "--name-only", `${project.baseline}..HEAD`)).toBe([
444
- ".gitignore",
445
- "docs/aip/AIP-12/design.md",
446
- "docs/aip/AIP-12/prd.md",
447
- "docs/aip/AIP-12/prototype/pages/index.html",
448
- ...WORKSPACE_TEMPLATE_FILES.map((name) => `docs/aip/AIP-12/${name}`),
449
- ]
450
- .sort()
451
- .join("\n"));
452
- for (const name of WORKSPACE_TEMPLATE_FILES)
453
- expect(git(remote, "show", `${head}:docs/aip/AIP-12/${name}`)).toBe("");
454
- await writeFile(join(cwd, "docs/private.md"), "不应开放");
455
- expect(git(cwd, "check-ignore", "docs/private.md")).toBe("docs/private.md");
456
- expect(git(remote, "show", `${head}:.gitignore`)).toContain("!/docs/aip/**");
457
- await publishReviewMaterials(root, { ...input, projects });
458
- expect(git(cwd, "rev-parse", "HEAD")).toBe(head);
459
- }
460
- await writeFile(join(root, "main/docs/aip/AIP-12/prd.md"), "local edit");
461
- await expect(publishReviewMaterials(root, { ...input, projects })).rejects.toThrow("AIP_MATERIALS_CONTENT_CONFLICT");
462
- expect(await readFile(join(root, "main/docs/aip/AIP-12/prd.md"), "utf8")).toBe("local edit");
463
- const secondary = join(root, "other");
464
- const ref = "refs/heads/aip/materials";
465
- git(secondary, "checkout", "main");
466
- await expect(publishReviewMaterials(root, { ...input, projects })).rejects.toThrow("AIP_MATERIALS_BRANCH_MISMATCH");
467
- git(secondary, "checkout", "aip/materials");
468
- const remote = join(root, "other.git");
469
- const base = git(remote, "rev-parse", ref);
470
- const advance = git(secondary, "commit-tree", `${base}^{tree}`, "-p", base, "-m", "advance");
471
- git(secondary, "-c", "remote.origin.mirror=false", "push", "origin", `${advance}:${ref}`);
472
- await expect(publishReviewMaterials(root, { ...input, projects })).rejects.toThrow("GIT_PROCESS_EXIT");
473
- expect(git(remote, "rev-parse", ref)).toBe(advance);
474
- expect(git(secondary, "diff", "--cached", "--name-only")).toBe("unrelated.txt");
475
- }, 30_000);
476
- });
477
- describe("平台指定材料的执行", () => {
478
- it("无需 Host 识别业务文件名即可创建、保留和替换补充材料", async () => {
479
- const { input, directory } = await setup();
480
- const file = {
481
- projectId: input.primaryProjectId,
482
- path: "context/constraints.txt",
483
- source: materialSource("平台补充材料 v1"),
484
- mode: "create",
485
- };
486
- const prepared = {
487
- ...input,
488
- phase: "DEPLOYMENT",
489
- materialPreparation: {
490
- ...input.materialPreparation,
491
- initialFiles: [file],
492
- resumeFiles: [],
493
- inputPaths: [file.path],
494
- reviewPublications: [],
495
- },
496
- };
497
- await executeMaterials(root, materialInput(prepared), false, readMaterialFixture);
498
- const path = join(directory, file.path);
499
- expect(await readFile(path, "utf8")).toBe("平台补充材料 v1");
500
- await writeFile(path, "本地补充");
501
- await executeMaterials(root, materialInput(prepared), false, readMaterialFixture);
502
- await executeMaterials(root, materialInput(prepared), true, readMaterialFixture);
503
- expect(await readFile(path, "utf8")).toBe("本地补充");
504
- prepared.materialPreparation.resumeFiles = [
505
- { ...file, source: materialSource("平台明确更新"), mode: "replace" },
506
- ];
507
- await executeMaterials(root, materialInput(prepared), true, readMaterialFixture);
508
- expect(await readFile(path, "utf8")).toBe("平台明确更新");
509
- expect(await readFile(join(directory, "prd.md"), "utf8")).toBe(input.requirement.body_markdown);
510
- });
511
- it("执行下发的任意二进制材料并拒绝不同内容与越界", async () => {
512
- const { input, directory } = await setup();
513
- const file = {
514
- projectId: input.primaryProjectId,
515
- path: "reference/data.bin",
516
- source: materialSource(Buffer.from([0, 255, 18]).toString("base64"), "base64"),
517
- mode: "verify",
518
- };
519
- const prepared = {
520
- ...input,
521
- materialPreparation: { ...input.materialPreparation, initialFiles: [file] },
522
- };
523
- await executeMaterials(root, materialInput(prepared), false, readMaterialFixture);
524
- await executeMaterials(root, materialInput(prepared), false, readMaterialFixture);
525
- expect(await readFile(join(directory, file.path))).toEqual(Buffer.from([0, 255, 18]));
526
- file.source = materialSource("eA==", "base64");
527
- await expect(executeMaterials(root, materialInput(prepared), false, readMaterialFixture)).rejects.toThrow("CONTENT_CONFLICT");
528
- for (const path of ["../outside", "/tmp/outside", "a/../../outside", "C:/outside"]) {
529
- file.path = path;
530
- await expect(executeMaterials(root, materialInput(prepared), false, readMaterialFixture)).rejects.toThrow("PATH_INVALID");
531
- }
532
- file.path = "valid.txt";
533
- file.projectId = "unauthorized";
534
- await expect(executeMaterials(root, materialInput(prepared), false, readMaterialFixture)).rejects.toThrow("PRIMARY_PROJECT");
535
- });
536
- });
537
- describe("平台明确的交付收集要求", () => {
538
- it("平台可指定已有槽位的新路径与必需性,Host 不按业务阶段改写清单", async () => {
539
- const { input, directory } = await setup();
540
- const requirements = [
541
- { slot: "TEST_REPORT", path: "proof/result.md", required: true },
542
- ];
543
- await expect(collectFiles(root, input, requirements)).rejects.toThrow("文件不存在");
544
- expect(await collectFiles(root, input, [{ ...requirements[0], required: false }])).toEqual([]);
545
- await mkdir(join(directory, "proof"));
546
- await writeFile(join(directory, "proof/result.md"), "真实测试证据");
547
- expect(await collectFiles(root, input, requirements)).toMatchObject([
548
- { slot: "TEST_REPORT", path: "docs/aip/AIP-12/proof/result.md", content: "真实测试证据" },
549
- ]);
550
- for (const path of [
551
- "../outside.md",
552
- "/tmp/outside.md",
553
- "C:/outside.md",
554
- "proof/../../outside.md",
555
- ])
556
- await expect(collectFiles(root, input, [{ ...requirements[0], path }])).rejects.toThrow("AIP_MATERIAL_PATH_INVALID");
557
- await symlink(join(root, "other"), join(directory, "escaped"));
558
- await writeFile(join(root, "other/result.md"), "外部哨兵");
559
- await expect(collectFiles(root, input, [
560
- { ...requirements[0], path: "escaped/result.md", required: false },
561
- ])).rejects.toThrow("路径越界");
562
- expect(await readFile(join(root, "other/result.md"), "utf8")).toBe("外部哨兵");
563
- });
564
- });
565
- describe("命令材料读取", () => {
566
- it("多个项目引用同一大文件时仅下载一次并校验原始二进制字节", async () => {
567
- const body = Buffer.concat([Buffer.from("中文材料".repeat(80_000)), Buffer.from([0, 255])]);
568
- const source = materialSource(body.toString("base64"), "base64");
569
- const fetch = vi.fn(async () => ({
570
- content: body.toString("base64"),
571
- encoding: "base64",
572
- contentHash: source.contentHash,
573
- }));
574
- const reader = commandMaterialReader(fetch);
575
- const copies = await Promise.all([
576
- reader(source),
577
- reader({ ...source, fileRef: "another-reference" }),
578
- reader(source),
579
- ]);
580
- for (const copy of copies)
581
- expect(copy.equals(body)).toBe(true);
582
- expect(fetch).toHaveBeenCalledTimes(1);
583
- });
584
- it.each(["utf8", "base64"])("相同字节使用不同引用编码时接受服务端 %s 表示并复用下载", async (encoding) => {
585
- const body = Buffer.from("相同的 PRD 和原型正文");
586
- const utf8 = materialSource(body.toString("utf8"));
587
- const base64 = materialSource(body.toString("base64"), "base64");
588
- const fetch = vi.fn(async () => ({
589
- content: body.toString(encoding),
590
- encoding,
591
- contentHash: utf8.contentHash,
592
- }));
593
- const reader = commandMaterialReader(fetch);
594
- const first = encoding === "utf8" ? base64 : utf8;
595
- const second = encoding === "utf8" ? utf8 : base64;
596
- expect(await reader(first)).toEqual(body);
597
- expect(await reader(second)).toEqual(body);
598
- expect(fetch).toHaveBeenCalledTimes(1);
599
- });
600
- it.each(["hash", "body", "encoding"])("拒绝 %s 不符合材料引用的响应", async (mismatch) => {
601
- const source = materialSource("确认材料");
602
- const reader = commandMaterialReader(async () => ({
603
- content: mismatch === "body" ? "被替换材料" : "确认材料",
604
- contentHash: mismatch === "hash" ? "0".repeat(64) : source.contentHash,
605
- encoding: mismatch === "encoding" ? "base64" : "utf8",
606
- }));
607
- await expect(reader(source)).rejects.toThrow("AIP_MATERIAL_CONTENT_INVALID");
608
- });
609
- });
610
- describe("材料包发布创建语义", () => {
611
- it("保留已有提交和本地填写,空文件推送工单分支,重试不覆盖也不新增提交", async () => {
612
- const { input, directory } = await setup();
613
- const cwd = join(root, "main");
614
- const git = (at, ...args) => execFileSync("git", args, { cwd: at, encoding: "utf8", stdio: "pipe" }).trim();
615
- git(cwd, "init", "-b", "main");
616
- git(cwd, "config", "user.name", "fixture");
617
- git(cwd, "config", "user.email", "fixture@example.invalid");
618
- await writeFile(join(directory, "plan.md"), "已提交的开发计划");
619
- git(cwd, "add", "docs/aip/AIP-12/plan.md");
620
- git(cwd, "commit", "-m", "existing plan");
621
- const remote = join(root, "material-pack.git");
622
- git(root, "clone", "--bare", cwd, remote);
623
- git(cwd, "remote", "add", "origin", remote);
624
- git(cwd, "checkout", "-b", "aip/material-pack");
625
- await writeFile(join(directory, "report.md"), "本地已完成的测试报告");
626
- const prepared = withMaterials({
627
- ...input,
628
- phase: "PREPARATION",
629
- projects: [
630
- {
631
- id: "p1",
632
- name: "main",
633
- devBranch: "aip/material-pack",
634
- baselineBranch: "main",
635
- testBranch: "test",
636
- },
637
- ],
638
- });
639
- const publication = prepared.materialPreparation.reviewPublications[0];
640
- for (const file of publication.files.filter((file) => file.mode === "create"))
641
- file.source = materialSource(file.path === "release_checklist.md" ? "" : `# 新版模板 ${file.path}`);
642
- await publishMaterials(root, prepared, readMaterialFixture);
643
- const head = git(cwd, "rev-parse", "HEAD");
644
- expect(git(remote, "show", `${head}:docs/aip/AIP-12/plan.md`)).toBe("已提交的开发计划");
645
- expect(git(remote, "show", `${head}:docs/aip/AIP-12/report.md`)).toBe("本地已完成的测试报告");
646
- expect(git(remote, "show", `${head}:docs/aip/AIP-12/release_checklist.md`)).toBe("");
647
- expect(git(remote, "rev-parse", "refs/heads/aip/material-pack")).toBe(head);
648
- for (const file of publication.files.filter((file) => file.mode === "create"))
649
- file.source = materialSource("再次调整模板");
650
- await publishMaterials(root, prepared, readMaterialFixture);
651
- expect(git(cwd, "rev-parse", "HEAD")).toBe(head);
652
- expect(await readFile(join(directory, "report.md"), "utf8")).toBe("本地已完成的测试报告");
653
- });
654
- });
655
- //# sourceMappingURL=delivery-files.test.js.map