wicked-crew 0.18.19 → 0.18.21

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 (700) hide show
  1. package/README.md +9 -6
  2. package/dist/api/ask-paths.d.ts +2 -0
  3. package/dist/api/ask-paths.d.ts.map +1 -1
  4. package/dist/api/ask-paths.js +6 -0
  5. package/dist/api/ask-paths.js.map +1 -1
  6. package/dist/api/auth.d.ts +7 -5
  7. package/dist/api/auth.d.ts.map +1 -1
  8. package/dist/api/auth.js +23 -9
  9. package/dist/api/auth.js.map +1 -1
  10. package/dist/api/capture.d.ts +5 -2
  11. package/dist/api/capture.d.ts.map +1 -1
  12. package/dist/api/capture.js +13 -10
  13. package/dist/api/capture.js.map +1 -1
  14. package/dist/api/chat-attachments.d.ts.map +1 -1
  15. package/dist/api/chat-attachments.js +69 -19
  16. package/dist/api/chat-attachments.js.map +1 -1
  17. package/dist/api/chat-citations.d.ts.map +1 -1
  18. package/dist/api/chat-citations.js +22 -0
  19. package/dist/api/chat-citations.js.map +1 -1
  20. package/dist/api/chat-context.d.ts +16 -1
  21. package/dist/api/chat-context.d.ts.map +1 -1
  22. package/dist/api/chat-context.js +75 -14
  23. package/dist/api/chat-context.js.map +1 -1
  24. package/dist/api/chat-freshness.js +2 -2
  25. package/dist/api/chat-freshness.js.map +1 -1
  26. package/dist/api/chat-history.d.ts +13 -0
  27. package/dist/api/chat-history.d.ts.map +1 -1
  28. package/dist/api/chat-history.js +25 -0
  29. package/dist/api/chat-history.js.map +1 -1
  30. package/dist/api/chat-jobs.d.ts +67 -6
  31. package/dist/api/chat-jobs.d.ts.map +1 -1
  32. package/dist/api/chat-jobs.js +243 -22
  33. package/dist/api/chat-jobs.js.map +1 -1
  34. package/dist/api/chat-proposals.d.ts +69 -6
  35. package/dist/api/chat-proposals.d.ts.map +1 -1
  36. package/dist/api/chat-proposals.js +310 -49
  37. package/dist/api/chat-proposals.js.map +1 -1
  38. package/dist/api/chat-requirements.d.ts.map +1 -1
  39. package/dist/api/chat-requirements.js +4 -1
  40. package/dist/api/chat-requirements.js.map +1 -1
  41. package/dist/api/chat-scope.d.ts +17 -9
  42. package/dist/api/chat-scope.d.ts.map +1 -1
  43. package/dist/api/chat-scope.js +55 -21
  44. package/dist/api/chat-scope.js.map +1 -1
  45. package/dist/api/cluster-status.d.ts +24 -12
  46. package/dist/api/cluster-status.d.ts.map +1 -1
  47. package/dist/api/cluster-status.js +82 -4
  48. package/dist/api/cluster-status.js.map +1 -1
  49. package/dist/api/codebase-archive.d.ts +4 -3
  50. package/dist/api/codebase-archive.d.ts.map +1 -1
  51. package/dist/api/codebase-archive.js +6 -5
  52. package/dist/api/codebase-archive.js.map +1 -1
  53. package/dist/api/delivery-cache.d.ts +2 -0
  54. package/dist/api/delivery-cache.d.ts.map +1 -1
  55. package/dist/api/delivery-cache.js +1 -2
  56. package/dist/api/delivery-cache.js.map +1 -1
  57. package/dist/api/delivery-index.d.ts +2 -2
  58. package/dist/api/delivery-index.d.ts.map +1 -1
  59. package/dist/api/delivery-index.js +1 -2
  60. package/dist/api/delivery-index.js.map +1 -1
  61. package/dist/api/eval-compare.d.ts +1 -1
  62. package/dist/api/eval-compare.js +1 -1
  63. package/dist/api/eval-sample.d.ts +7 -0
  64. package/dist/api/eval-sample.d.ts.map +1 -1
  65. package/dist/api/eval-sample.js +20 -0
  66. package/dist/api/eval-sample.js.map +1 -1
  67. package/dist/api/gate-cache.d.ts +1 -0
  68. package/dist/api/gate-cache.d.ts.map +1 -1
  69. package/dist/api/gate-cache.js +19 -6
  70. package/dist/api/gate-cache.js.map +1 -1
  71. package/dist/api/governance-steering.d.ts +17 -4
  72. package/dist/api/governance-steering.d.ts.map +1 -1
  73. package/dist/api/governance-steering.js +56 -7
  74. package/dist/api/governance-steering.js.map +1 -1
  75. package/dist/api/mcp.d.ts +12 -2
  76. package/dist/api/mcp.d.ts.map +1 -1
  77. package/dist/api/mcp.js +56 -12
  78. package/dist/api/mcp.js.map +1 -1
  79. package/dist/api/needs.d.ts +20 -0
  80. package/dist/api/needs.d.ts.map +1 -1
  81. package/dist/api/needs.js +120 -19
  82. package/dist/api/needs.js.map +1 -1
  83. package/dist/api/onboarding-capture.d.ts +21 -1
  84. package/dist/api/onboarding-capture.d.ts.map +1 -1
  85. package/dist/api/onboarding-capture.js +112 -8
  86. package/dist/api/onboarding-capture.js.map +1 -1
  87. package/dist/api/policy-landing.d.ts +36 -0
  88. package/dist/api/policy-landing.d.ts.map +1 -1
  89. package/dist/api/policy-landing.js +123 -4
  90. package/dist/api/policy-landing.js.map +1 -1
  91. package/dist/api/post-hoc-deliver.d.ts.map +1 -1
  92. package/dist/api/post-hoc-deliver.js +2 -1
  93. package/dist/api/post-hoc-deliver.js.map +1 -1
  94. package/dist/api/product.d.ts +1 -1
  95. package/dist/api/proposal-decisions.d.ts +44 -0
  96. package/dist/api/proposal-decisions.d.ts.map +1 -0
  97. package/dist/api/proposal-decisions.js +85 -0
  98. package/dist/api/proposal-decisions.js.map +1 -0
  99. package/dist/api/proposal-onboard.d.ts +38 -1
  100. package/dist/api/proposal-onboard.d.ts.map +1 -1
  101. package/dist/api/proposal-onboard.js +203 -14
  102. package/dist/api/proposal-onboard.js.map +1 -1
  103. package/dist/api/recording.d.ts +1 -1
  104. package/dist/api/recording.d.ts.map +1 -1
  105. package/dist/api/recording.js +4 -5
  106. package/dist/api/recording.js.map +1 -1
  107. package/dist/api/redeliver.d.ts.map +1 -1
  108. package/dist/api/redeliver.js +11 -7
  109. package/dist/api/redeliver.js.map +1 -1
  110. package/dist/api/repo-input.d.ts.map +1 -1
  111. package/dist/api/repo-input.js +5 -2
  112. package/dist/api/repo-input.js.map +1 -1
  113. package/dist/api/repo-origins.d.ts +24 -0
  114. package/dist/api/repo-origins.d.ts.map +1 -0
  115. package/dist/api/repo-origins.js +71 -0
  116. package/dist/api/repo-origins.js.map +1 -0
  117. package/dist/api/requirements.d.ts +37 -16
  118. package/dist/api/requirements.d.ts.map +1 -1
  119. package/dist/api/requirements.js +73 -2
  120. package/dist/api/requirements.js.map +1 -1
  121. package/dist/api/retry-index.d.ts +2 -0
  122. package/dist/api/retry-index.d.ts.map +1 -1
  123. package/dist/api/retry-index.js +16 -8
  124. package/dist/api/retry-index.js.map +1 -1
  125. package/dist/api/review-change.d.ts +5 -6
  126. package/dist/api/review-change.d.ts.map +1 -1
  127. package/dist/api/review-change.js +45 -8
  128. package/dist/api/review-change.js.map +1 -1
  129. package/dist/api/roster-standing.d.ts +2 -0
  130. package/dist/api/roster-standing.d.ts.map +1 -1
  131. package/dist/api/roster-standing.js +8 -1
  132. package/dist/api/roster-standing.js.map +1 -1
  133. package/dist/api/routes.d.ts +55 -12
  134. package/dist/api/routes.d.ts.map +1 -1
  135. package/dist/api/routes.js +961 -277
  136. package/dist/api/routes.js.map +1 -1
  137. package/dist/api/run-documents.d.ts +9 -1
  138. package/dist/api/run-documents.d.ts.map +1 -1
  139. package/dist/api/run-documents.js +63 -5
  140. package/dist/api/run-documents.js.map +1 -1
  141. package/dist/api/run-sources.d.ts +11 -1
  142. package/dist/api/run-sources.d.ts.map +1 -1
  143. package/dist/api/run-sources.js +26 -3
  144. package/dist/api/run-sources.js.map +1 -1
  145. package/dist/api/run-timing-index.d.ts +47 -0
  146. package/dist/api/run-timing-index.d.ts.map +1 -1
  147. package/dist/api/run-timing-index.js +196 -86
  148. package/dist/api/run-timing-index.js.map +1 -1
  149. package/dist/api/runtime-state.d.ts +6 -0
  150. package/dist/api/runtime-state.d.ts.map +1 -1
  151. package/dist/api/runtime-state.js +14 -3
  152. package/dist/api/runtime-state.js.map +1 -1
  153. package/dist/api/seat-agents.d.ts.map +1 -1
  154. package/dist/api/seat-agents.js +3 -3
  155. package/dist/api/seat-agents.js.map +1 -1
  156. package/dist/api/seat-container-login.d.ts +6 -2
  157. package/dist/api/seat-container-login.d.ts.map +1 -1
  158. package/dist/api/seat-container-login.js +17 -9
  159. package/dist/api/seat-container-login.js.map +1 -1
  160. package/dist/api/seat-governance.d.ts +3 -2
  161. package/dist/api/seat-governance.d.ts.map +1 -1
  162. package/dist/api/seat-governance.js +31 -9
  163. package/dist/api/seat-governance.js.map +1 -1
  164. package/dist/api/seat-standing.d.ts +8 -0
  165. package/dist/api/seat-standing.d.ts.map +1 -1
  166. package/dist/api/seat-standing.js +26 -1
  167. package/dist/api/seat-standing.js.map +1 -1
  168. package/dist/api/server.d.ts +7 -0
  169. package/dist/api/server.d.ts.map +1 -1
  170. package/dist/api/server.js +172 -59
  171. package/dist/api/server.js.map +1 -1
  172. package/dist/api/stall-watchdog.d.ts +6 -0
  173. package/dist/api/stall-watchdog.d.ts.map +1 -1
  174. package/dist/api/stall-watchdog.js +28 -0
  175. package/dist/api/stall-watchdog.js.map +1 -1
  176. package/dist/api/start-on-login.d.ts +4 -0
  177. package/dist/api/start-on-login.d.ts.map +1 -0
  178. package/dist/api/start-on-login.js +35 -0
  179. package/dist/api/start-on-login.js.map +1 -0
  180. package/dist/api/steering-landing.d.ts +33 -8
  181. package/dist/api/steering-landing.d.ts.map +1 -1
  182. package/dist/api/steering-landing.js +235 -51
  183. package/dist/api/steering-landing.js.map +1 -1
  184. package/dist/api/system-snapshot.d.ts +5 -0
  185. package/dist/api/system-snapshot.d.ts.map +1 -1
  186. package/dist/api/system-snapshot.js +22 -10
  187. package/dist/api/system-snapshot.js.map +1 -1
  188. package/dist/api/testing.d.ts +2 -2
  189. package/dist/api/ui-text.js +2 -2
  190. package/dist/api/ui-text.js.map +1 -1
  191. package/dist/api/worktree-sweep.d.ts +7 -3
  192. package/dist/api/worktree-sweep.d.ts.map +1 -1
  193. package/dist/api/worktree-sweep.js +10 -6
  194. package/dist/api/worktree-sweep.js.map +1 -1
  195. package/dist/apps/actions/api-action.js +5 -2
  196. package/dist/apps/actions/api-action.js.map +1 -1
  197. package/dist/apps/actions/write-path.d.ts +9 -0
  198. package/dist/apps/actions/write-path.d.ts.map +1 -1
  199. package/dist/apps/actions/write-path.js +17 -9
  200. package/dist/apps/actions/write-path.js.map +1 -1
  201. package/dist/apps/exec/executor.d.ts +8 -15
  202. package/dist/apps/exec/executor.d.ts.map +1 -1
  203. package/dist/apps/exec/executor.js +10 -3
  204. package/dist/apps/exec/executor.js.map +1 -1
  205. package/dist/apps/exec/recall.d.ts.map +1 -1
  206. package/dist/apps/exec/recall.js +4 -4
  207. package/dist/apps/exec/recall.js.map +1 -1
  208. package/dist/apps/exec/redescribe.d.ts +37 -0
  209. package/dist/apps/exec/redescribe.d.ts.map +1 -0
  210. package/dist/apps/exec/redescribe.js +86 -0
  211. package/dist/apps/exec/redescribe.js.map +1 -0
  212. package/dist/apps/exec/source-stage.d.ts +3 -1
  213. package/dist/apps/exec/source-stage.d.ts.map +1 -1
  214. package/dist/apps/exec/source-stage.js +13 -3
  215. package/dist/apps/exec/source-stage.js.map +1 -1
  216. package/dist/apps/exec/sources.d.ts +6 -0
  217. package/dist/apps/exec/sources.d.ts.map +1 -1
  218. package/dist/apps/exec/sources.js +8 -0
  219. package/dist/apps/exec/sources.js.map +1 -1
  220. package/dist/apps/git.js +2 -2
  221. package/dist/apps/git.js.map +1 -1
  222. package/dist/apps/publish/manifest.d.ts +8 -1
  223. package/dist/apps/publish/manifest.d.ts.map +1 -1
  224. package/dist/apps/publish/manifest.js +14 -3
  225. package/dist/apps/publish/manifest.js.map +1 -1
  226. package/dist/apps/publish/run.d.ts +15 -2
  227. package/dist/apps/publish/run.d.ts.map +1 -1
  228. package/dist/apps/publish/run.js +100 -17
  229. package/dist/apps/publish/run.js.map +1 -1
  230. package/dist/apps/routes.d.ts +3 -0
  231. package/dist/apps/routes.d.ts.map +1 -1
  232. package/dist/apps/routes.js +58 -2
  233. package/dist/apps/routes.js.map +1 -1
  234. package/dist/apps/store.d.ts +24 -3
  235. package/dist/apps/store.d.ts.map +1 -1
  236. package/dist/apps/store.js +26 -9
  237. package/dist/apps/store.js.map +1 -1
  238. package/dist/apps/turns.d.ts +25 -2
  239. package/dist/apps/turns.d.ts.map +1 -1
  240. package/dist/apps/turns.js +276 -11
  241. package/dist/apps/turns.js.map +1 -1
  242. package/dist/apps-server/Dockerfile +2 -2
  243. package/dist/apps-server/runners/sqlite-runner.mjs +67 -12
  244. package/dist/apps-server/server/lib/bundle/server.mjs +353 -159
  245. package/dist/cli/governance.d.ts +5 -2
  246. package/dist/cli/governance.d.ts.map +1 -1
  247. package/dist/cli/governance.js +8 -5
  248. package/dist/cli/governance.js.map +1 -1
  249. package/dist/cli/index.d.ts.map +1 -1
  250. package/dist/cli/index.js +6 -5
  251. package/dist/cli/index.js.map +1 -1
  252. package/dist/cli/service.d.ts +10 -6
  253. package/dist/cli/service.d.ts.map +1 -1
  254. package/dist/cli/service.js +39 -23
  255. package/dist/cli/service.js.map +1 -1
  256. package/dist/core/adapter.d.ts +61 -29
  257. package/dist/core/adapter.d.ts.map +1 -1
  258. package/dist/core/adapter.js +214 -83
  259. package/dist/core/adapter.js.map +1 -1
  260. package/dist/core/ado-deliver-helper.d.ts +2 -1
  261. package/dist/core/ado-deliver-helper.d.ts.map +1 -1
  262. package/dist/core/ado-deliver-helper.js +26 -1
  263. package/dist/core/ado-deliver-helper.js.map +1 -1
  264. package/dist/core/assurance.d.ts +45 -42
  265. package/dist/core/assurance.d.ts.map +1 -1
  266. package/dist/core/assurance.js +74 -67
  267. package/dist/core/assurance.js.map +1 -1
  268. package/dist/core/deliver-text.d.ts +14 -0
  269. package/dist/core/deliver-text.d.ts.map +1 -1
  270. package/dist/core/deliver-text.js +41 -2
  271. package/dist/core/deliver-text.js.map +1 -1
  272. package/dist/core/deliver.d.ts +66 -1
  273. package/dist/core/deliver.d.ts.map +1 -1
  274. package/dist/core/deliver.js +183 -10
  275. package/dist/core/deliver.js.map +1 -1
  276. package/dist/core/engine-roster.d.ts +2 -0
  277. package/dist/core/engine-roster.d.ts.map +1 -1
  278. package/dist/core/engine-roster.js +13 -0
  279. package/dist/core/engine-roster.js.map +1 -1
  280. package/dist/core/estate-mcp-client.d.ts +13 -14
  281. package/dist/core/estate-mcp-client.d.ts.map +1 -1
  282. package/dist/core/estate-mcp-client.js +49 -68
  283. package/dist/core/estate-mcp-client.js.map +1 -1
  284. package/dist/core/exec.d.ts +24 -0
  285. package/dist/core/exec.d.ts.map +1 -1
  286. package/dist/core/exec.js +45 -2
  287. package/dist/core/exec.js.map +1 -1
  288. package/dist/core/linked-issues.d.ts +13 -2
  289. package/dist/core/linked-issues.d.ts.map +1 -1
  290. package/dist/core/linked-issues.js +135 -4
  291. package/dist/core/linked-issues.js.map +1 -1
  292. package/dist/core/pr-checks-helper.d.ts +8 -4
  293. package/dist/core/pr-checks-helper.d.ts.map +1 -1
  294. package/dist/core/pr-checks-helper.js +39 -17
  295. package/dist/core/pr-checks-helper.js.map +1 -1
  296. package/dist/core/redeliver.js +2 -2
  297. package/dist/core/redeliver.js.map +1 -1
  298. package/dist/core/repo-clone.d.ts +64 -0
  299. package/dist/core/repo-clone.d.ts.map +1 -0
  300. package/dist/core/repo-clone.js +306 -0
  301. package/dist/core/repo-clone.js.map +1 -0
  302. package/dist/core/repoPaths.d.ts +2 -4
  303. package/dist/core/repoPaths.d.ts.map +1 -1
  304. package/dist/core/repoPaths.js +4 -6
  305. package/dist/core/repoPaths.js.map +1 -1
  306. package/dist/core/run-identity.d.ts.map +1 -1
  307. package/dist/core/run-identity.js +3 -0
  308. package/dist/core/run-identity.js.map +1 -1
  309. package/dist/core/run-read-lane.d.ts +30 -0
  310. package/dist/core/run-read-lane.d.ts.map +1 -0
  311. package/dist/core/run-read-lane.js +103 -0
  312. package/dist/core/run-read-lane.js.map +1 -0
  313. package/dist/core/types.d.ts +10 -0
  314. package/dist/core/types.d.ts.map +1 -1
  315. package/dist/core/types.js +2 -0
  316. package/dist/core/types.js.map +1 -1
  317. package/dist/core/walkthrough-root.d.ts.map +1 -1
  318. package/dist/core/walkthrough-root.js +3 -5
  319. package/dist/core/walkthrough-root.js.map +1 -1
  320. package/dist/core/wicked-home.d.ts +9 -0
  321. package/dist/core/wicked-home.d.ts.map +1 -0
  322. package/dist/core/wicked-home.js +25 -0
  323. package/dist/core/wicked-home.js.map +1 -0
  324. package/dist/decisions/consider.d.ts +2 -1
  325. package/dist/decisions/consider.d.ts.map +1 -1
  326. package/dist/decisions/consider.js +2 -2
  327. package/dist/decisions/consider.js.map +1 -1
  328. package/dist/decisions/land.d.ts +2 -0
  329. package/dist/decisions/land.d.ts.map +1 -1
  330. package/dist/decisions/land.js +16 -3
  331. package/dist/decisions/land.js.map +1 -1
  332. package/dist/decisions/rules-brief.d.ts +4 -1
  333. package/dist/decisions/rules-brief.d.ts.map +1 -1
  334. package/dist/decisions/rules-brief.js +3 -2
  335. package/dist/decisions/rules-brief.js.map +1 -1
  336. package/dist/editors/conformance-runtime.d.ts +0 -2
  337. package/dist/editors/conformance-runtime.d.ts.map +1 -1
  338. package/dist/editors/conformance-runtime.js +0 -4
  339. package/dist/editors/conformance-runtime.js.map +1 -1
  340. package/dist/editors/csp.d.ts +6 -0
  341. package/dist/editors/csp.d.ts.map +1 -1
  342. package/dist/editors/csp.js +10 -0
  343. package/dist/editors/csp.js.map +1 -1
  344. package/dist/editors/pack-install.d.ts +11 -15
  345. package/dist/editors/pack-install.d.ts.map +1 -1
  346. package/dist/editors/pack-install.js +52 -65
  347. package/dist/editors/pack-install.js.map +1 -1
  348. package/dist/editors/registry.d.ts +31 -13
  349. package/dist/editors/registry.d.ts.map +1 -1
  350. package/dist/editors/registry.js +51 -18
  351. package/dist/editors/registry.js.map +1 -1
  352. package/dist/editors/routes.d.ts +4 -2
  353. package/dist/editors/routes.d.ts.map +1 -1
  354. package/dist/editors/routes.js +23 -6
  355. package/dist/editors/routes.js.map +1 -1
  356. package/dist/editors/visuals.d.ts +4 -3
  357. package/dist/editors/visuals.d.ts.map +1 -1
  358. package/dist/editors/visuals.js +17 -7
  359. package/dist/editors/visuals.js.map +1 -1
  360. package/dist/evals/runner.js +1 -1
  361. package/dist/evals/runner.js.map +1 -1
  362. package/dist/evals/shape-corrections.js +1 -1
  363. package/dist/evals/shape-corrections.js.map +1 -1
  364. package/dist/evals/shape.d.ts +7 -1
  365. package/dist/evals/shape.d.ts.map +1 -1
  366. package/dist/evals/shape.js +26 -6
  367. package/dist/evals/shape.js.map +1 -1
  368. package/dist/evals/workflow.d.ts +16 -3
  369. package/dist/evals/workflow.d.ts.map +1 -1
  370. package/dist/evals/workflow.js +32 -6
  371. package/dist/evals/workflow.js.map +1 -1
  372. package/dist/governance/rule-revision.d.ts +7 -0
  373. package/dist/governance/rule-revision.d.ts.map +1 -0
  374. package/dist/governance/rule-revision.js +23 -0
  375. package/dist/governance/rule-revision.js.map +1 -0
  376. package/dist/insights/review-service.d.ts +26 -3
  377. package/dist/insights/review-service.d.ts.map +1 -1
  378. package/dist/insights/review-service.js +101 -11
  379. package/dist/insights/review-service.js.map +1 -1
  380. package/dist/insights/routes.d.ts +2 -1
  381. package/dist/insights/routes.d.ts.map +1 -1
  382. package/dist/insights/routes.js +19 -4
  383. package/dist/insights/routes.js.map +1 -1
  384. package/dist/insights/run-facts.d.ts +5 -0
  385. package/dist/insights/run-facts.d.ts.map +1 -1
  386. package/dist/insights/run-facts.js +15 -0
  387. package/dist/insights/run-facts.js.map +1 -1
  388. package/dist/insights/workflow.d.ts +2 -1
  389. package/dist/insights/workflow.d.ts.map +1 -1
  390. package/dist/insights/workflow.js +4 -4
  391. package/dist/insights/workflow.js.map +1 -1
  392. package/dist/inspect/service.d.ts +3 -2
  393. package/dist/inspect/service.d.ts.map +1 -1
  394. package/dist/inspect/service.js +4 -4
  395. package/dist/inspect/service.js.map +1 -1
  396. package/dist/interactive/bridge-pool.d.ts +2 -0
  397. package/dist/interactive/bridge-pool.d.ts.map +1 -1
  398. package/dist/interactive/bridge-pool.js +18 -8
  399. package/dist/interactive/bridge-pool.js.map +1 -1
  400. package/dist/interactive/chat-events.d.ts +3 -0
  401. package/dist/interactive/chat-events.d.ts.map +1 -1
  402. package/dist/interactive/chat-events.js +20 -5
  403. package/dist/interactive/chat-events.js.map +1 -1
  404. package/dist/interactive/doc-delete-routes.d.ts +1 -0
  405. package/dist/interactive/doc-delete-routes.d.ts.map +1 -1
  406. package/dist/interactive/doc-delete-routes.js +126 -123
  407. package/dist/interactive/doc-delete-routes.js.map +1 -1
  408. package/dist/interactive/draft-events.d.ts +11 -7
  409. package/dist/interactive/draft-events.d.ts.map +1 -1
  410. package/dist/interactive/draft-events.js +29 -22
  411. package/dist/interactive/draft-events.js.map +1 -1
  412. package/dist/interactive/draft-skill.d.ts +56 -3
  413. package/dist/interactive/draft-skill.d.ts.map +1 -1
  414. package/dist/interactive/draft-skill.js +129 -20
  415. package/dist/interactive/draft-skill.js.map +1 -1
  416. package/dist/interactive/landing-guard.d.ts +30 -5
  417. package/dist/interactive/landing-guard.d.ts.map +1 -1
  418. package/dist/interactive/landing-guard.js +121 -5
  419. package/dist/interactive/landing-guard.js.map +1 -1
  420. package/dist/interactive/proposal-create.d.ts +9 -11
  421. package/dist/interactive/proposal-create.d.ts.map +1 -1
  422. package/dist/interactive/proposal-create.js +28 -21
  423. package/dist/interactive/proposal-create.js.map +1 -1
  424. package/dist/interactive/proposal-refine.d.ts +4 -4
  425. package/dist/interactive/proposal-refine.d.ts.map +1 -1
  426. package/dist/interactive/proposal-refine.js +40 -7
  427. package/dist/interactive/proposal-refine.js.map +1 -1
  428. package/dist/interactive/proxy-routes.d.ts +10 -5
  429. package/dist/interactive/proxy-routes.d.ts.map +1 -1
  430. package/dist/interactive/proxy-routes.js +108 -11
  431. package/dist/interactive/proxy-routes.js.map +1 -1
  432. package/dist/interactive/review-events.js +1 -1
  433. package/dist/interactive/review-events.js.map +1 -1
  434. package/dist/interactive/run-units.d.ts.map +1 -1
  435. package/dist/interactive/run-units.js +3 -2
  436. package/dist/interactive/run-units.js.map +1 -1
  437. package/dist/interactive/source-packet.d.ts +13 -1
  438. package/dist/interactive/source-packet.d.ts.map +1 -1
  439. package/dist/interactive/source-packet.js +108 -34
  440. package/dist/interactive/source-packet.js.map +1 -1
  441. package/dist/knowledge/adapters/toolbox/memory.d.ts +2 -0
  442. package/dist/knowledge/adapters/toolbox/memory.d.ts.map +1 -0
  443. package/dist/knowledge/adapters/toolbox/memory.js +43 -0
  444. package/dist/knowledge/adapters/toolbox/memory.js.map +1 -0
  445. package/dist/knowledge/adapters/toolbox/supervisor.d.ts +30 -4
  446. package/dist/knowledge/adapters/toolbox/supervisor.d.ts.map +1 -1
  447. package/dist/knowledge/adapters/toolbox/supervisor.js +112 -28
  448. package/dist/knowledge/adapters/toolbox/supervisor.js.map +1 -1
  449. package/dist/knowledge/estate-write.d.ts +5 -0
  450. package/dist/knowledge/estate-write.d.ts.map +1 -1
  451. package/dist/knowledge/estate-write.js +7 -0
  452. package/dist/knowledge/estate-write.js.map +1 -1
  453. package/dist/knowledge/gate/gate.d.ts.map +1 -1
  454. package/dist/knowledge/gate/gate.js +4 -1
  455. package/dist/knowledge/gate/gate.js.map +1 -1
  456. package/dist/knowledge/gate/record.d.ts +15 -2
  457. package/dist/knowledge/gate/record.d.ts.map +1 -1
  458. package/dist/knowledge/gate/record.js +108 -29
  459. package/dist/knowledge/gate/record.js.map +1 -1
  460. package/dist/knowledge/projector.d.ts +60 -5
  461. package/dist/knowledge/projector.d.ts.map +1 -1
  462. package/dist/knowledge/projector.js +264 -21
  463. package/dist/knowledge/projector.js.map +1 -1
  464. package/dist/knowledge/registry/entry.d.ts +7 -0
  465. package/dist/knowledge/registry/entry.d.ts.map +1 -1
  466. package/dist/knowledge/registry/entry.js +4 -0
  467. package/dist/knowledge/registry/entry.js.map +1 -1
  468. package/dist/knowledge/shapes/map.d.ts.map +1 -1
  469. package/dist/knowledge/shapes/map.js +12 -2
  470. package/dist/knowledge/shapes/map.js.map +1 -1
  471. package/dist/knowledge/shapes/routes.d.ts +1 -1
  472. package/dist/knowledge/shapes/routes.d.ts.map +1 -1
  473. package/dist/knowledge/shapes/routes.js +42 -16
  474. package/dist/knowledge/shapes/routes.js.map +1 -1
  475. package/dist/knowledge/shapes/shapes.d.ts +60 -13
  476. package/dist/knowledge/shapes/shapes.d.ts.map +1 -1
  477. package/dist/knowledge/shapes/shapes.js +199 -31
  478. package/dist/knowledge/shapes/shapes.js.map +1 -1
  479. package/dist/knowledge/shapes/verified.d.ts.map +1 -1
  480. package/dist/knowledge/shapes/verified.js +3 -2
  481. package/dist/knowledge/shapes/verified.js.map +1 -1
  482. package/dist/knowledge/trackers/addresses.d.ts +27 -3
  483. package/dist/knowledge/trackers/addresses.d.ts.map +1 -1
  484. package/dist/knowledge/trackers/addresses.js +33 -5
  485. package/dist/knowledge/trackers/addresses.js.map +1 -1
  486. package/dist/knowledge/trackers/gate-pm.d.ts.map +1 -1
  487. package/dist/knowledge/trackers/gate-pm.js +4 -2
  488. package/dist/knowledge/trackers/gate-pm.js.map +1 -1
  489. package/dist/knowledge/trackers/projector.d.ts +3 -1
  490. package/dist/knowledge/trackers/projector.d.ts.map +1 -1
  491. package/dist/knowledge/trackers/projector.js +59 -8
  492. package/dist/knowledge/trackers/projector.js.map +1 -1
  493. package/dist/learn/scheduler.d.ts.map +1 -1
  494. package/dist/learn/scheduler.js +13 -3
  495. package/dist/learn/scheduler.js.map +1 -1
  496. package/dist/learnings/estate.d.ts.map +1 -1
  497. package/dist/learnings/estate.js +3 -14
  498. package/dist/learnings/estate.js.map +1 -1
  499. package/dist/learnings/extract.d.ts +9 -3
  500. package/dist/learnings/extract.d.ts.map +1 -1
  501. package/dist/learnings/extract.js +62 -4
  502. package/dist/learnings/extract.js.map +1 -1
  503. package/dist/learnings/replacement-lineage.d.ts +3 -2
  504. package/dist/learnings/replacement-lineage.d.ts.map +1 -1
  505. package/dist/learnings/replacement-lineage.js +7 -6
  506. package/dist/learnings/replacement-lineage.js.map +1 -1
  507. package/dist/learnings/service.d.ts +12 -2
  508. package/dist/learnings/service.d.ts.map +1 -1
  509. package/dist/learnings/service.js +30 -5
  510. package/dist/learnings/service.js.map +1 -1
  511. package/dist/mcp/broker.d.ts.map +1 -1
  512. package/dist/mcp/broker.js +19 -5
  513. package/dist/mcp/broker.js.map +1 -1
  514. package/dist/mcp/env.d.ts +12 -4
  515. package/dist/mcp/env.d.ts.map +1 -1
  516. package/dist/mcp/env.js +24 -4
  517. package/dist/mcp/env.js.map +1 -1
  518. package/dist/mcp/estate-relay.d.ts +3 -0
  519. package/dist/mcp/estate-relay.d.ts.map +1 -1
  520. package/dist/mcp/estate-relay.js +7 -6
  521. package/dist/mcp/estate-relay.js.map +1 -1
  522. package/dist/mcp/invoke.d.ts.map +1 -1
  523. package/dist/mcp/invoke.js +6 -5
  524. package/dist/mcp/invoke.js.map +1 -1
  525. package/dist/mcp/probe.d.ts +14 -1
  526. package/dist/mcp/probe.d.ts.map +1 -1
  527. package/dist/mcp/probe.js +55 -10
  528. package/dist/mcp/probe.js.map +1 -1
  529. package/dist/mcp/redact.d.ts +1 -1
  530. package/dist/mcp/redact.d.ts.map +1 -1
  531. package/dist/mcp/redact.js +61 -4
  532. package/dist/mcp/redact.js.map +1 -1
  533. package/dist/mcp/registry-store.d.ts +37 -0
  534. package/dist/mcp/registry-store.d.ts.map +1 -1
  535. package/dist/mcp/registry-store.js +43 -0
  536. package/dist/mcp/registry-store.js.map +1 -1
  537. package/dist/mcp/registry.d.ts +38 -6
  538. package/dist/mcp/registry.d.ts.map +1 -1
  539. package/dist/mcp/registry.js +145 -14
  540. package/dist/mcp/registry.js.map +1 -1
  541. package/dist/mcp/rest.js +4 -4
  542. package/dist/mcp/rest.js.map +1 -1
  543. package/dist/mcp/run-fence.d.ts +2 -0
  544. package/dist/mcp/run-fence.d.ts.map +1 -1
  545. package/dist/mcp/run-fence.js +9 -0
  546. package/dist/mcp/run-fence.js.map +1 -1
  547. package/dist/mcp/secrets.d.ts +1 -1
  548. package/dist/mcp/secrets.d.ts.map +1 -1
  549. package/dist/mcp/secrets.js +10 -11
  550. package/dist/mcp/secrets.js.map +1 -1
  551. package/dist/mcp/upstream-error.d.ts +6 -2
  552. package/dist/mcp/upstream-error.d.ts.map +1 -1
  553. package/dist/mcp/upstream-error.js +5 -1
  554. package/dist/mcp/upstream-error.js.map +1 -1
  555. package/dist/projects/graph.d.ts +15 -5
  556. package/dist/projects/graph.d.ts.map +1 -1
  557. package/dist/projects/graph.js +354 -26
  558. package/dist/projects/graph.js.map +1 -1
  559. package/dist/projects/repo-watch.d.ts +2 -2
  560. package/dist/projects/repo-watch.d.ts.map +1 -1
  561. package/dist/projects/repo-watch.js +26 -9
  562. package/dist/projects/repo-watch.js.map +1 -1
  563. package/dist/projects/routes.d.ts +9 -1
  564. package/dist/projects/routes.d.ts.map +1 -1
  565. package/dist/projects/routes.js +63 -6
  566. package/dist/projects/routes.js.map +1 -1
  567. package/dist/projects/state-home-preflight.d.ts +5 -0
  568. package/dist/projects/state-home-preflight.d.ts.map +1 -1
  569. package/dist/projects/state-home-preflight.js +48 -8
  570. package/dist/projects/state-home-preflight.js.map +1 -1
  571. package/dist/projects/state-home-registry.d.ts.map +1 -1
  572. package/dist/projects/state-home-registry.js +9 -0
  573. package/dist/projects/state-home-registry.js.map +1 -1
  574. package/dist/projects/state-home.d.ts +11 -0
  575. package/dist/projects/state-home.d.ts.map +1 -1
  576. package/dist/projects/state-home.js +14 -0
  577. package/dist/projects/state-home.js.map +1 -1
  578. package/dist/qe/author-workflow.d.ts +4 -0
  579. package/dist/qe/author-workflow.d.ts.map +1 -1
  580. package/dist/qe/author-workflow.js +4 -0
  581. package/dist/qe/author-workflow.js.map +1 -1
  582. package/dist/qe/test-sets.d.ts +5 -6
  583. package/dist/qe/test-sets.d.ts.map +1 -1
  584. package/dist/qe/test-sets.js +4 -3
  585. package/dist/qe/test-sets.js.map +1 -1
  586. package/dist/schedules/routes.d.ts +5 -0
  587. package/dist/schedules/routes.d.ts.map +1 -1
  588. package/dist/schedules/routes.js +32 -5
  589. package/dist/schedules/routes.js.map +1 -1
  590. package/dist/schedules/scheduler.d.ts +8 -1
  591. package/dist/schedules/scheduler.d.ts.map +1 -1
  592. package/dist/schedules/scheduler.js +10 -1
  593. package/dist/schedules/scheduler.js.map +1 -1
  594. package/dist/schedules/store.d.ts +7 -0
  595. package/dist/schedules/store.d.ts.map +1 -1
  596. package/dist/schedules/store.js +19 -4
  597. package/dist/schedules/store.js.map +1 -1
  598. package/dist/skills/plugin-source.js +4 -4
  599. package/dist/skills/plugin-source.js.map +1 -1
  600. package/dist/sources/ask.d.ts.map +1 -1
  601. package/dist/sources/ask.js +12 -12
  602. package/dist/sources/ask.js.map +1 -1
  603. package/dist/sources/dialer.d.ts +6 -1
  604. package/dist/sources/dialer.d.ts.map +1 -1
  605. package/dist/sources/dialer.js +53 -31
  606. package/dist/sources/dialer.js.map +1 -1
  607. package/dist/sources/drivers/mysql.d.ts +2 -0
  608. package/dist/sources/drivers/mysql.d.ts.map +1 -1
  609. package/dist/sources/drivers/mysql.js +18 -2
  610. package/dist/sources/drivers/mysql.js.map +1 -1
  611. package/dist/sources/drivers/postgres.d.ts +2 -0
  612. package/dist/sources/drivers/postgres.d.ts.map +1 -1
  613. package/dist/sources/drivers/postgres.js +10 -3
  614. package/dist/sources/drivers/postgres.js.map +1 -1
  615. package/dist/sources/drivers/sqlite.d.ts +33 -3
  616. package/dist/sources/drivers/sqlite.d.ts.map +1 -1
  617. package/dist/sources/drivers/sqlite.js +18 -6
  618. package/dist/sources/drivers/sqlite.js.map +1 -1
  619. package/dist/sources/drivers/types.d.ts +3 -1
  620. package/dist/sources/drivers/types.d.ts.map +1 -1
  621. package/dist/sources/drivers/types.js +3 -1
  622. package/dist/sources/drivers/types.js.map +1 -1
  623. package/dist/sources/routes.d.ts.map +1 -1
  624. package/dist/sources/routes.js +1 -0
  625. package/dist/sources/routes.js.map +1 -1
  626. package/dist/sources/uploads.d.ts +22 -15
  627. package/dist/sources/uploads.d.ts.map +1 -1
  628. package/dist/sources/uploads.js +124 -436
  629. package/dist/sources/uploads.js.map +1 -1
  630. package/dist/standing-orders/history.d.ts +5 -3
  631. package/dist/standing-orders/history.d.ts.map +1 -1
  632. package/dist/standing-orders/history.js +6 -2
  633. package/dist/standing-orders/history.js.map +1 -1
  634. package/dist/standing-orders/parse.d.ts +8 -0
  635. package/dist/standing-orders/parse.d.ts.map +1 -1
  636. package/dist/standing-orders/parse.js +52 -5
  637. package/dist/standing-orders/parse.js.map +1 -1
  638. package/dist/studio/apps-standalone/fixture.js +3 -3
  639. package/dist/studio/apps-standalone/runtime.js +1 -1
  640. package/dist/studio/assets/{KnowledgeGraph-DWw0I8RJ.js → KnowledgeGraph-yP4WsnST.js} +1 -1
  641. package/dist/studio/assets/index-DNaLjJ7M.css +32 -0
  642. package/dist/studio/assets/index-DW53FKuT.js +1114 -0
  643. package/dist/studio/editors/wicked-apps/editor.json +1 -1
  644. package/dist/studio/editors/wicked-apps/index.html +2 -2
  645. package/dist/studio/editors/wicked-deck/editor.json +1 -1
  646. package/dist/studio/editors/wicked-deck/index.html +2 -2
  647. package/dist/studio/editors/wicked-doc/editor.json +1 -1
  648. package/dist/studio/editors/wicked-doc/index.html +1 -1
  649. package/dist/studio/editors/wicked-insights/editor.json +1 -1
  650. package/dist/studio/editors/wicked-insights/index.html +1 -1
  651. package/dist/studio/editors/wicked-page/editor.json +1 -1
  652. package/dist/studio/editors/wicked-page/index.html +1 -1
  653. package/dist/studio/editors/wicked-video/editor.json +1 -1
  654. package/dist/studio/editors/wicked-video/index.html +1 -1
  655. package/dist/studio/index.html +2 -2
  656. package/dist/studio/testid-inventory.json +1589 -281
  657. package/dist/team/routes.d.ts +11 -1
  658. package/dist/team/routes.d.ts.map +1 -1
  659. package/dist/team/routes.js +8 -4
  660. package/dist/team/routes.js.map +1 -1
  661. package/dist/voice/tts.d.ts +12 -0
  662. package/dist/voice/tts.d.ts.map +1 -1
  663. package/dist/voice/tts.js +118 -28
  664. package/dist/voice/tts.js.map +1 -1
  665. package/dist/workflow-catalog/build-v2.d.ts +34 -0
  666. package/dist/workflow-catalog/build-v2.d.ts.map +1 -1
  667. package/dist/workflow-catalog/build-v2.js +131 -10
  668. package/dist/workflow-catalog/build-v2.js.map +1 -1
  669. package/dist/workflow-catalog/catalog-data-v2.d.ts +6 -2
  670. package/dist/workflow-catalog/catalog-data-v2.d.ts.map +1 -1
  671. package/dist/workflow-catalog/catalog-data-v2.js.map +1 -1
  672. package/dist/workflow-catalog/catalog-data.d.ts.map +1 -1
  673. package/dist/workflow-catalog/catalog-data.js +0 -2
  674. package/dist/workflow-catalog/catalog-data.js.map +1 -1
  675. package/dist/workflow-catalog/detect.d.ts +18 -3
  676. package/dist/workflow-catalog/detect.d.ts.map +1 -1
  677. package/dist/workflow-catalog/detect.js +43 -8
  678. package/dist/workflow-catalog/detect.js.map +1 -1
  679. package/dist/workflow-catalog/shape.d.ts +1 -1
  680. package/dist/working-doc/event-lines.d.ts +12 -2
  681. package/dist/working-doc/event-lines.d.ts.map +1 -1
  682. package/dist/working-doc/event-lines.js +62 -10
  683. package/dist/working-doc/event-lines.js.map +1 -1
  684. package/dist/working-doc/sections.d.ts +3 -0
  685. package/dist/working-doc/sections.d.ts.map +1 -1
  686. package/dist/working-doc/sections.js +5 -0
  687. package/dist/working-doc/sections.js.map +1 -1
  688. package/dist/working-doc/service.d.ts +23 -3
  689. package/dist/working-doc/service.d.ts.map +1 -1
  690. package/dist/working-doc/service.js +93 -54
  691. package/dist/working-doc/service.js.map +1 -1
  692. package/endpoint-manifest.json +148 -8
  693. package/evals/corpora/shape-v1.json +25 -1
  694. package/evals/corpora/shape-v1.seat-fixture.json +25 -1
  695. package/package.json +4 -4
  696. package/runners/sqlite-runner.mjs +67 -12
  697. package/runners/upload-parse.d.mts +13 -0
  698. package/runners/upload-parse.mjs +364 -0
  699. package/dist/studio/assets/index-C4Xj-zxa.css +0 -32
  700. package/dist/studio/assets/index-CrNY3d06.js +0 -1109
@@ -1,3 +1,4 @@
1
+ import { type JudgeCoverage } from '../core/assurance.js';
1
2
  import type { ArtifactProposal, CatalogGateId, ProposalInputValue, ProposalRevisionEdits, ProposalSource, ProposalShape } from '../core/types.js';
2
3
  import { type ResolvedOption, type ServedState } from '../workflow-catalog/build-v2.js';
3
4
  import type { CardSeedV2 } from '../workflow-catalog/seeds-v2.js';
@@ -20,6 +21,7 @@ export interface JobChat {
20
21
  /** Everything a job proposal is resolved from (a fresh proposal, a merged revision, a reshape). */
21
22
  export interface JobFacts {
22
23
  card: string;
24
+ title: string | null;
23
25
  /** `undefined`: the card's default option. */
24
26
  option: string | null | undefined;
25
27
  depth: 'quick' | 'standard' | 'deep' | null;
@@ -39,6 +41,8 @@ export interface JobFacts {
39
41
  guess?: ProposalShape['guess'];
40
42
  }
41
43
  export interface JobContext {
44
+ /** The engine's judge coverage for the card's seats and repository binding; absent means unknown. */
45
+ coverage?: (keys: readonly string[], bound: boolean) => JudgeCoverage | null;
42
46
  /** The seat pool was drawn without a readable newWorkSeats setting. */
43
47
  seatsUnread?: boolean;
44
48
  chatId: string;
@@ -63,6 +67,9 @@ export interface JobContext {
63
67
  revises: string | null;
64
68
  lineage: string | null;
65
69
  notes: string[];
70
+ /** (crew#1803) A review of a change names the seats it left off and why. Kept apart from `notes`, which a seat edit
71
+ * reads as its refusal. */
72
+ reviewNote?: string;
66
73
  /** Authorised in the chat layer before this pure resolution; absent admits no document. */
67
74
  documents?: ProposalSource[];
68
75
  /** Sources in display order; a reason means the source cannot be picked. Absent = no list. */
@@ -85,7 +92,46 @@ export interface JobContext {
85
92
  * accepts here (the launch's own `namesPreset` source). A job whose workflow is one is started as a power run or held
86
93
  * at its plan by the person's Start, so its sentence promises neither. `null`/absent = no Start chooses. */
87
94
  powerPresets?: ReadonlySet<string> | null;
95
+ /** (crew#1840) The pull requests this chat's runs delivered, read when the words name a pull request. Absent = none
96
+ * read (a job then never updates one). */
97
+ deliveredPrs?: readonly DeliveredPr[];
88
98
  }
99
+ /** A pull request a run of this chat delivered (its run record's `deliverUrl`), on the run's repository. */
100
+ export interface DeliveredPr {
101
+ number: number;
102
+ url: string;
103
+ runId: string;
104
+ repoRef: string | null;
105
+ }
106
+ /** The number of a pull request URL crew records (`…/pull/<n>` on GitHub, `…/_git/<repo>/pullrequest/<n>` on Azure
107
+ * DevOps), else `null`. */
108
+ export declare function prNumberOfUrl(url: string): number | null;
109
+ /** Whether `words` name a pull request at all (the cheap gate before the chat's runs are read). */
110
+ export declare function mentionsPullRequest(words: string): boolean;
111
+ /** Why a job asked to change a pull request does not update one (the card's note says it). */
112
+ export type PrRevisionMiss = 'not-delivered' | 'none' | 'several';
113
+ /**
114
+ * Which delivered pull request, if any, the person's words ask this job to update. `null` = they do not ask to change
115
+ * a pull request (or ask for a new one). `{ pr: null, … }` = they ask, but crew cannot attach one: a PR they name (a
116
+ * URL or a number) is not one this chat delivered on the job's repository (`named`), they name more than one this chat
117
+ * delivered (`several`), or they name none and there is not exactly one (`none`). Every PR named is a target: one that
118
+ * cannot be matched never falls back to another.
119
+ */
120
+ export declare function prRevisionOf(words: string, delivered: readonly DeliveredPr[], repoRef: string | null): {
121
+ pr: DeliveredPr;
122
+ named: null;
123
+ miss?: undefined;
124
+ } | {
125
+ pr: null;
126
+ named: string | null;
127
+ miss: PrRevisionMiss;
128
+ } | null;
129
+ /** (crew#1840) What a job's Go adds to its run launch when the job updates a delivered pull request: `revisesPr` and
130
+ * `deliver: "pr"` (a revision needs its deliver phase). Empty for any other job. */
131
+ export declare function jobRevisionLaunch(p: Pick<ArtifactProposal, 'revisesPr' | 'repoRefs'>): {
132
+ revisesPr?: number;
133
+ deliver?: 'pr';
134
+ };
89
135
  export declare class JobRefusal extends Error {
90
136
  readonly code: string;
91
137
  readonly status: number;
@@ -93,14 +139,28 @@ export declare class JobRefusal extends Error {
93
139
  }
94
140
  /** The kind a resolved option proposes as: a run, a compose or a demo is a job; a document is an artifact create. */
95
141
  export declare function proposalKindOf(r: ResolvedOption): 'job' | 'create' | 'none';
96
- /** The seats a card needs to check its own work (Q31: words name who builds; the reviewer and judge stay). */
142
+ /** The seats a card needs: a builder and, when required, a distinct evaluator. */
97
143
  export declare function seatsNeeded(r: ResolvedOption): number;
144
+ export declare function seatsShortLine(r: ResolvedOption, have: number): string;
145
+ /** At the minimum seat count, disclose that the judge is the validator's author. */
146
+ export declare function judgeDisclosure(r: ResolvedOption, seatCount: number): string | null;
98
147
  /**
99
148
  * (F1/F2) What a revision's `removeSeats` did, said from the card as published: the seats that left it, and who works.
100
- * `after` is the published card's workers (a job's seats, a document's helpers). `job` false (the revision made it a
101
- * document, whose helpers are picked again): an asked seat that is still a helper is said to still work on it.
149
+ * `after` is the published card's workers (a job's seats, a document's helpers).
102
150
  */
103
- export declare function seatRemovalNote(asked: readonly string[] | undefined, before: readonly string[], after: readonly string[], nameOf: (k: string) => string, job?: boolean): string[];
151
+ export declare function seatRemovalNote(asked: readonly string[] | undefined, before: readonly string[], after: readonly string[], nameOf: (k: string) => string): string[];
152
+ /** The chat's repositories the words name, by name, id or link, in the chat's order (studio's `reposNamedIn`). */
153
+ export declare function reposNamedIn<R extends {
154
+ id: string;
155
+ name: string;
156
+ }>(words: string, repos: readonly R[]): R[];
157
+ /** (crew#1791) The one repository the words clearly name ("In tiny-math-rd, fix …", or a link into it): named by a
158
+ * link, a distinct name or id, and no other named. `null` = none or several: the proposal asks. Studio's
159
+ * `repoNamedInWords`, so the repository crew picks is the one studio would. */
160
+ export declare function repoNamedIn<R extends {
161
+ id: string;
162
+ name: string;
163
+ }>(words: string, repos: readonly R[]): R | null;
104
164
  /** The repository a job runs on: the one named, else the chat's only one. */
105
165
  export declare function repoOf(facts: Pick<JobFacts, 'repoRef'>, chat: JobChat): {
106
166
  id: string;
@@ -193,8 +253,9 @@ export declare function jobInputsOfProposal(p: ArtifactProposal, heldPick?: (run
193
253
  export declare function launchShapeOfProposal(p: ArtifactProposal): import('../core/types.js').LaunchShape;
194
254
  /**
195
255
  * The roster a job's Go hands the engine: `current` (the daemon's launch roster, naming the lead) narrowed to the seats
196
- * the person saw. A reshape inherits the held run's roster configuration; its membership is still the proposal's
197
- * seats (codex r2), with the current roster's entry for a seat added since (codex r3). `clisJson` is ALWAYS the card's
256
+ * the person saw. A reshape inherits the held run's roster configuration, with standing always from the current
257
+ * roster; its membership is still the proposal's seats (codex r2), with the current roster's entry for a seat added
258
+ * since (codex r3). An inherited seat no longer on the current roster is not carried. `clisJson` is ALWAYS the card's
198
259
  * seats when it names any (crew#1593): without it the launch waits for roster readiness and reads the roster again, so
199
260
  * a seat that became ready in between would join a job whose card never named it. Absent only for a card that names no
200
261
  * seat and inherits no roster (the engine is handed the daemon's roster, as for any launch that names none).
@@ -1 +1 @@
1
- {"version":3,"file":"chat-jobs.d.ts","sourceRoot":"","sources":["../../src/api/chat-jobs.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EAEb,kBAAkB,EAGlB,qBAAqB,EAGrB,cAAc,EACd,aAAa,EAKd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAiDlE,0FAA0F;AAC1F,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAMtE;AAoBD,eAAO,MAAM,WAAW,GAAI,MAAM,SAAS,aAAa,EAAE,KAAG,MAAsF,CAAC;AAOpJ;iGACiG;AACjG,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,MAAM,CAAgD,CAAC;AAI7F,8CAA8C;AAC9C,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED,mGAAmG;AAC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AAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,MAAM,EAAE,CASlF;AAED,sHAAsH;AACtH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAAE,GAAG,IAAI,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAepJ;AAED,iEAAiE;AACjE,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,gBAAgB,GAAG,OAAO,kBAAkB,EAAE,WAAW,CAUjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAAE,MAAM,EAAE,KAAK,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CA0BhM;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,CAAC,EAAE,gBAAgB,EACnB,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACpC,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,GAC5C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiBzB"}
@@ -14,6 +14,8 @@
14
14
  * that turn answers.
15
15
  */
16
16
  import { createHash } from 'node:crypto';
17
+ import { coverageNote, sharingNotes } from '../core/assurance.js';
18
+ import { SEAT_STANDING_FIELDS } from '../core/engine-roster.js';
17
19
  import { CATALOG_V2_CARDS } from '../workflow-catalog/catalog-data-v2.js';
18
20
  import { resolveOption } from '../workflow-catalog/build-v2.js';
19
21
  import { DEPTH_LINES } from '../workflow-catalog/shape.js';
@@ -93,6 +95,89 @@ const humanStep = (id) => {
93
95
  /** Workflows whose launch picks its own seat (the run review's preparer, the default evals' Tool step): the proposal's
94
96
  * seats are not what runs there, so they are neither shown as choosable nor sent (codex r2). */
95
97
  export const SELF_SEATED = new Set(['review-recent-work', 'run-evals']);
98
+ /** The number of a pull request URL crew records (`…/pull/<n>` on GitHub, `…/_git/<repo>/pullrequest/<n>` on Azure
99
+ * DevOps), else `null`. */
100
+ export function prNumberOfUrl(url) {
101
+ const m = /^https:\/\/[^\s?#]+\/(?:pull|pullrequest)\/(\d+)$/i.exec(url.trim());
102
+ return m === null ? null : Number(m[1]);
103
+ }
104
+ const PR_WORD = String.raw `(?:PRs?|pull[ -]?requests?)`;
105
+ /** A pull request URL inside words, up to its number (a `/files` tab, a query or a fragment after it is not part of it). */
106
+ const PR_URL_IN_WORDS = /https:\/\/[^\s?#)\]>"'<]+?\/(?:pull|pullrequest)\/\d+(?!\d)/gi;
107
+ /** Words that ask to change an existing pull request rather than make new work: "revise the PR", "update pull request
108
+ * #3", "add a test to PR #4", "push it on PR #4", "on the same PR", "do not open a new PR". */
109
+ const ASKS_PR_CHANGE = new RegExp([
110
+ String.raw `\b(?:revise|revising|update|updating|amend|amending|fix up)\b[^!?\n]{0,80}?(?:\b${PR_WORD}\b|\/(?:pull|pullrequest)\/\d+)`,
111
+ String.raw `\b(?:add|adding|push|pushing|commit|committing|put|apply|applying)\b[^!?\n]{0,80}?\b(?:to|on|onto|into)\s+(?:(?:the|that|this|my|our)\s+)?(?:(?:same|existing|open|delivered)\s+)?(?:\b${PR_WORD}\b|https:\/\/\S+\/(?:pull|pullrequest)\/\d+)`,
112
+ String.raw `\b(?:on|to|onto|into)\s+${PR_WORD}\s*#?\d+`,
113
+ String.raw `\b(?:same|existing|that|this|delivered|open)\s+${PR_WORD}\b`,
114
+ String.raw `\b(?:no|not open a|don'?t open a|never open a)\s+(?:new|second)\s+${PR_WORD}\b`,
115
+ ].join('|'), 'i');
116
+ /** The verbs of a request to change a pull request (the positive asks above and their negations below share them). */
117
+ const CHANGE_VERBS = String.raw `(?:revise|revising|update|updating|amend|amending|change|changing|touch|touching|fix up|add|adding|push|pushing|commit|committing|put|apply|applying)`;
118
+ const NEW_ADJ = String.raw `(?:new|second|separate|another|fresh)`;
119
+ /** Words that ask for a NEW pull request ("open a PR", "create a new pull request", "in a separate PR"), or say not to
120
+ * change one ("do not update PR #4", "don't add tests to PR #4"): no existing pull request is attached. A negated
121
+ * new-PR ask ("do not open a new PR", "don't open a PR") is not one. */
122
+ const NEW_PR_ASK = new RegExp(String.raw `\b(?:(?:open|opening|create|creating|raise|raising|make|making|start|starting|file|filing)\s+(?:(?:a|an)\s+(?:${NEW_ADJ}\s+)?|${NEW_ADJ}\s+|(?=(?:PRs|pull[ -]?requests)\b))|(?:in|as|into|with)\s+(?:a\s+|an\s+)?${NEW_ADJ}\s+)${PR_WORD}\b`, 'gi');
123
+ const NEW_PR_NEGATED = /(?:\b(?:not|never|without|no need to|dont)|n't|n’t)\s+(?:\w+\s+)?$/i;
124
+ const KEEP_PR_ASK = new RegExp(String.raw `(?:\b(?:do not|dont|never|without)|n't|n’t)\s+${CHANGE_VERBS}\b[^!?\n.;,]{0,40}?\b${PR_WORD}\b`, 'i');
125
+ function asksForNewPr(words) {
126
+ if (KEEP_PR_ASK.test(words))
127
+ return true;
128
+ return [...words.matchAll(NEW_PR_ASK)].some((m) => !NEW_PR_NEGATED.test(words.slice(Math.max(0, m.index - 24), m.index)));
129
+ }
130
+ /** Whether `words` name a pull request at all (the cheap gate before the chat's runs are read). */
131
+ export function mentionsPullRequest(words) {
132
+ return /\b(?:PRs?|pull[ -]?requests?)\b|\/(?:pull|pullrequest)\/\d+/i.test(words);
133
+ }
134
+ /**
135
+ * Which delivered pull request, if any, the person's words ask this job to update. `null` = they do not ask to change
136
+ * a pull request (or ask for a new one). `{ pr: null, … }` = they ask, but crew cannot attach one: a PR they name (a
137
+ * URL or a number) is not one this chat delivered on the job's repository (`named`), they name more than one this chat
138
+ * delivered (`several`), or they name none and there is not exactly one (`none`). Every PR named is a target: one that
139
+ * cannot be matched never falls back to another.
140
+ */
141
+ export function prRevisionOf(words, delivered, repoRef) {
142
+ if (!ASKS_PR_CHANGE.test(words) || asksForNewPr(words))
143
+ return null;
144
+ const mine = delivered.filter((d) => repoRef !== null && d.repoRef === repoRef);
145
+ const hits = new Map();
146
+ const urls = [...words.matchAll(PR_URL_IN_WORDS)].map((m) => m[0]);
147
+ for (const u of urls) {
148
+ const hit = mine.find((d) => d.url.toLowerCase() === u.toLowerCase());
149
+ if (hit === undefined)
150
+ return { pr: null, named: u, miss: 'not-delivered' };
151
+ hits.set(hit.url.toLowerCase(), hit);
152
+ }
153
+ // Numbers outside the URLs: "PR #4", "pull request 4", a list ("PRs #4 and #9") and a repository's ("PR o/r#9").
154
+ const rest = words.replace(PR_URL_IN_WORDS, ' ');
155
+ // After a singular head a list member needs its `#` ("PR #4 and 5 more tests" names one PR); after a plural one it may
156
+ // be bare ("pull requests 4 and 9").
157
+ const target = String.raw `(?:[\w.-]+\/[\w.-]+)?#?\d+`;
158
+ const list = new RegExp(String.raw `\b(?:(?:PR|pull[ -]?request)\s*(${target}(?:\s*(?:,|and|&|or)\s*(?:[\w.-]+\/[\w.-]+)?#\d+)*)|(?:PRs|pull[ -]?requests)\s*(${target}(?:\s*(?:,|and|&|or)\s*${target})*))`, 'gi');
159
+ for (const m of rest.matchAll(list)) {
160
+ for (const t of (m[1] ?? m[2]).matchAll(/(?:([\w.-]+\/[\w.-]+)#)?#?(\d+)/g)) {
161
+ const n = Number(t[2]);
162
+ const repo = t[1];
163
+ const hit = mine.find((d) => d.number === n && (repo === undefined || new RegExp(String.raw `/${repo.replace(/[.]/g, '\\.')}/pull/${n}$`, 'i').test(d.url)));
164
+ if (hit === undefined)
165
+ return { pr: null, named: repo === undefined ? `pull request #${n}` : `${repo}#${n}`, miss: 'not-delivered' };
166
+ hits.set(hit.url.toLowerCase(), hit);
167
+ }
168
+ }
169
+ if (hits.size > 1)
170
+ return { pr: null, named: null, miss: 'several' };
171
+ if (hits.size === 1)
172
+ return { pr: [...hits.values()][0], named: null };
173
+ const distinct = [...new Map(mine.map((d) => [d.url.toLowerCase(), d])).values()];
174
+ return distinct.length === 1 ? { pr: distinct[0], named: null } : { pr: null, named: null, miss: 'none' };
175
+ }
176
+ /** (crew#1840) What a job's Go adds to its run launch when the job updates a delivered pull request: `revisesPr` and
177
+ * `deliver: "pr"` (a revision needs its deliver phase). Empty for any other job. */
178
+ export function jobRevisionLaunch(p) {
179
+ return p.revisesPr !== undefined && p.repoRefs?.[0] !== undefined ? { revisesPr: p.revisesPr.number, deliver: 'pr' } : {};
180
+ }
96
181
  export class JobRefusal extends Error {
97
182
  code;
98
183
  status;
@@ -111,9 +196,20 @@ export function proposalKindOf(r) {
111
196
  return 'create';
112
197
  return r.resolved.status === 'coming_soon' ? 'job' : 'none';
113
198
  }
114
- /** The seats a card needs to check its own work (Q31: words name who builds; the reviewer and judge stay). */
199
+ /** The seats a card needs: a builder and, when required, a distinct evaluator. */
115
200
  export function seatsNeeded(r) {
116
- return 1 + (r.resolved.seats.distinctEvaluator ? 1 : 0) + (r.resolved.seats.distinctJudge ? 1 : 0);
201
+ return 1 + (r.resolved.seats.distinctEvaluator ? 1 : 0);
202
+ }
203
+ export function seatsShortLine(r, have) {
204
+ if (seatsNeeded(r) === 1)
205
+ return 'Needs a seat that can work now to build it, and none can. Sign in a seat to start it.';
206
+ return `Needs 2 seats that can work now, one to build it and one to check it, and ${have === 0 ? 'none' : `only ${have}`} can. ${have === 0 ? 'Sign in 2 more seats' : 'Sign in another seat'} to start it.`;
207
+ }
208
+ /** At the minimum seat count, disclose that the judge is the validator's author. */
209
+ export function judgeDisclosure(r, seatCount) {
210
+ return r.resolved.seats.distinctJudge && seatCount === seatsNeeded(r)
211
+ ? 'With these seats the judge is the author of the validator; a third seat would add an independent judge'
212
+ : null;
117
213
  }
118
214
  /**
119
215
  * (F1/F2) The order a job's seats are drawn in: the job's own lead (the person named it), then the chat's lead and
@@ -127,19 +223,15 @@ function drawOrder(lead, ctx) {
127
223
  }
128
224
  /**
129
225
  * (F1/F2) What a revision's `removeSeats` did, said from the card as published: the seats that left it, and who works.
130
- * `after` is the published card's workers (a job's seats, a document's helpers). `job` false (the revision made it a
131
- * document, whose helpers are picked again): an asked seat that is still a helper is said to still work on it.
226
+ * `after` is the published card's workers (a job's seats, a document's helpers).
132
227
  */
133
- export function seatRemovalNote(asked, before, after, nameOf, job = true) {
228
+ export function seatRemovalNote(asked, before, after, nameOf) {
134
229
  if (asked === undefined)
135
230
  return [];
136
231
  const notes = [];
137
232
  const off = before.filter((k) => asked.includes(k) && !after.includes(k));
138
233
  if (off.length > 0)
139
234
  notes.push(`${list(off.map(nameOf))} ${off.length === 1 ? 'is' : 'are'} off this job; ${after.length === 0 ? 'no seat works on it' : `${list(after.map(nameOf))} ${after.length === 1 ? 'works' : 'work'} on it`}`);
140
- const still = job ? [] : asked.filter((k) => after.includes(k));
141
- if (still.length > 0)
142
- notes.push(`Not changed: ${list(still.map(nameOf))} still ${still.length === 1 ? 'works' : 'work'} on it (its helpers are picked again; change them on the card)`);
143
235
  return notes;
144
236
  }
145
237
  function seatsOf(facts, ctx, r) {
@@ -184,7 +276,7 @@ function needsOf(facts, ctx, r) {
184
276
  }
185
277
  if (i.id === 'repo') {
186
278
  const hit = ctx.chat.repos.find((x) => x.id === facts.repoRef);
187
- const choices = ctx.chat.repos.slice(0, 8).map((x) => ({ label: x.name, value: x.id }));
279
+ const choices = repoChoicesFor(facts.words, ctx.chat.repos).map((x) => ({ label: x.name, value: x.id }));
188
280
  out.push({ id: i.id, label: i.label, kind: i.kind, required: i.required, status: hit !== undefined ? 'met' : 'missing', ...(hit !== undefined ? { value: hit.id } : {}), ...(choices.length > 0 ? { choices } : {}) });
189
281
  continue;
190
282
  }
@@ -206,6 +298,96 @@ function needsOf(facts, ctx, r) {
206
298
  }
207
299
  return out;
208
300
  }
301
+ const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
302
+ /** Whether `words` name `term` as a whole token (case-insensitive): not inside a longer name (`rg1` is not named by
303
+ * `rg10` or `rg1-old`); a sentence's punctuation after it still ends it. studio's `names` (repoProjects.ts), the same
304
+ * rule, so the chips studio offers and the repository crew picks agree. */
305
+ function namesTerm(words, term) {
306
+ if (term.trim() === '')
307
+ return false;
308
+ return new RegExp(`(?:^|[^\\p{L}\\p{N}_./-])${escapeRe(term)}(?=$|[^\\p{L}\\p{N}_./-]|\\.(?:$|[^\\p{L}\\p{N}_./-]))`, 'iu').test(words);
309
+ }
310
+ /** A name distinct enough to be read as a repository rather than a word (`tiny-math-rd`, `billing-api`): it carries
311
+ * something other than letters. `domain` or `docs` never is (studio's `distinctName`). */
312
+ function distinctName(name) {
313
+ return name.length >= 3 && /[^\p{L}]/u.test(name);
314
+ }
315
+ const REPO_OPS = new Set(['pull', 'pulls', 'pull-requests', 'merge_requests', 'tree', 'blob', 'commit', 'commits', 'compare']);
316
+ /** First path segments that are a host's own pages, not an owner: an organisation's or a group's link names no
317
+ * repository (`github.com/orgs/acme/projects/7`, `gitlab.com/groups/acme/-/merge_requests`), so it picks none. */
318
+ const NOT_AN_OWNER = new Set(['orgs', 'users', 'enterprises', 'settings', 'sponsors', 'marketplace', 'apps', 'topics', 'collections', 'search', 'notifications', 'groups', 'dashboard', 'explore', 'workspace', 'account']);
319
+ /** The repository one link names, or null: studio's `linkedRepo` (repoProjects.ts), and a host's own pages
320
+ * ({@link NOT_AN_OWNER}) name none. GitHub and Bitbucket:
321
+ * `<owner>/<repo>`, whatever follows. Elsewhere the segment before the first repository operation after it (or
322
+ * GitLab's `-` before one; on gitlab.com any `-`); with no operation, a GitLab project home names its last segment and
323
+ * a clone link (`…/<repo>.git`) its repository. Other links name nothing. */
324
+ function linkedRepo(link) {
325
+ let url;
326
+ try {
327
+ url = new URL(link);
328
+ }
329
+ catch {
330
+ return null;
331
+ }
332
+ const segs = url.pathname.split('/').filter((x) => x !== '').map((x) => { try {
333
+ return decodeURIComponent(x);
334
+ }
335
+ catch {
336
+ return x;
337
+ } });
338
+ const host = url.hostname.toLowerCase().replace(/^www\./u, '');
339
+ if (NOT_AN_OWNER.has((segs[0] ?? '').toLowerCase()))
340
+ return null;
341
+ let repo;
342
+ if (host === 'github.com' || host === 'bitbucket.org')
343
+ repo = segs.length >= 2 ? segs[1] : undefined;
344
+ else {
345
+ const gitlab = host === 'gitlab.com';
346
+ const at = segs.findIndex((x, i) => i >= 2 && (REPO_OPS.has(x) || (x === '-' && (gitlab || REPO_OPS.has(segs[i + 1] ?? '')))));
347
+ if (at >= 2)
348
+ repo = segs[at - 1];
349
+ else if (gitlab)
350
+ repo = segs.length >= 2 ? segs[segs.length - 1] : undefined;
351
+ else if (segs.length >= 2 && /\.git$/iu.test(segs[segs.length - 1]))
352
+ repo = segs[segs.length - 1];
353
+ }
354
+ const name = repo?.replace(/\.git$/iu, '').toLowerCase();
355
+ return name === undefined || name === '' || name === '-' ? null : name;
356
+ }
357
+ /** The repositories the links in the words name (lower-cased): studio's `linkedRepos`. A link ends at a space, a
358
+ * bracket or a quote, and a sentence's punctuation after it is not part of it. */
359
+ function linkedRepos(words) {
360
+ const out = [];
361
+ for (const m of words.matchAll(/https?:\/\/[^\s<>()[\]"'`]+/giu)) {
362
+ const name = linkedRepo(m[0].replace(/[.,;:!?]+$/u, ''));
363
+ if (name !== null)
364
+ out.push(name);
365
+ }
366
+ return out;
367
+ }
368
+ const linkedTo = (linked, r) => linked.includes(r.name.toLowerCase()) || linked.includes(r.id.toLowerCase());
369
+ /** The chat's repositories the words name, by name, id or link, in the chat's order (studio's `reposNamedIn`). */
370
+ export function reposNamedIn(words, repos) {
371
+ const linked = linkedRepos(words);
372
+ return repos.filter((r) => namesTerm(words, r.name) || (r.id !== r.name && namesTerm(words, r.id)) || linkedTo(linked, r));
373
+ }
374
+ /** (crew#1791) The one repository the words clearly name ("In tiny-math-rd, fix …", or a link into it): named by a
375
+ * link, a distinct name or id, and no other named. `null` = none or several: the proposal asks. Studio's
376
+ * `repoNamedInWords`, so the repository crew picks is the one studio would. */
377
+ export function repoNamedIn(words, repos) {
378
+ const named = reposNamedIn(words, repos);
379
+ if (named.length !== 1)
380
+ return null;
381
+ const r = named[0];
382
+ const linked = linkedRepos(words);
383
+ return linkedTo(linked, r) || (distinctName(r.name) && namesTerm(words, r.name)) || (r.id !== r.name && distinctName(r.id) && namesTerm(words, r.id)) ? r : null;
384
+ }
385
+ /** (crew#1791) Every repository the person can pick, those the words name first: no cap, so the named one and every
386
+ * other in the chat's scope are reachable from "Which repository?". */
387
+ function repoChoicesFor(words, repos) {
388
+ const named = reposNamedIn(words, repos);
389
+ return [...named, ...repos.filter((r) => !named.includes(r))];
390
+ }
209
391
  /** The repository a job runs on: the one named, else the chat's only one. */
210
392
  export function repoOf(facts, chat) {
211
393
  if (facts.repoRef !== null)
@@ -216,13 +398,15 @@ export function repoOf(facts, chat) {
216
398
  export function checksOf(r, skipQe) {
217
399
  return r.resolved.gate.filter((g) => !(g === 'qe-acceptance' && skipQe !== null));
218
400
  }
219
- function sketchOf(r) {
401
+ function sketchOf(r, startChooses) {
220
402
  const launch = r.resolved.launch.kind;
221
403
  if (launch === 'compose')
222
404
  return { steps: [{ label: 'Draft', asks: false }, { label: 'Review', asks: true }] };
223
405
  const steps = r.steps.map((s) => {
224
406
  const gate = s['gate'];
225
- const asks = gate === 'consent_before' || (gate !== null && typeof gate === 'object' && (gate['human_confirm'] !== undefined || gate['human_confirm_if'] !== undefined));
407
+ // (crew#1685) Where the Start chooses a power run, only consent is promised: a power run makes no def-gate stop,
408
+ // and a consent_before step pauses in every mode.
409
+ const asks = gate === 'consent_before' || (!startChooses && gate !== null && typeof gate === 'object' && (gate['human_confirm'] !== undefined || gate['human_confirm_if'] !== undefined));
226
410
  return { label: humanStep(s.id), asks };
227
411
  });
228
412
  return { steps };
@@ -268,7 +452,7 @@ export function resolveJob(facts, ctx, opts = {}) {
268
452
  const kind = proposalKindOf(r);
269
453
  if (kind !== 'job')
270
454
  throw new JobRefusal('not_a_job', `${card.title} makes a document: it is proposed as one`);
271
- const notes = [...ctx.notes];
455
+ const notes = [...ctx.notes, ...(ctx.reviewNote !== undefined ? [ctx.reviewNote] : [])];
272
456
  const takesDocuments = r.resolved.inputs.some((i) => i.id === 'documents');
273
457
  const takesSources = r.resolved.inputs.some((i) => i.id === 'sources');
274
458
  if (takesSources) {
@@ -321,7 +505,7 @@ export function resolveJob(facts, ctx, opts = {}) {
321
505
  }
322
506
  // A self-seated workflow picks its own seat at launch: the roster's count is not its requirement (codex r3).
323
507
  if (short && coming === undefined && !(r.workflow !== null && SELF_SEATED.has(r.workflow)))
324
- blockedBy.push(`Needs ${seatsNeeded(r)} seats that can work now (one builds, the others check it); sign another seat in`);
508
+ blockedBy.push(seatsShortLine(r, seats.keys.length));
325
509
  // The one question: the first required need that is missing.
326
510
  let question = null;
327
511
  const missing = needs.find((n) => n.required && n.status === 'missing');
@@ -330,7 +514,7 @@ export function resolveJob(facts, ctx, opts = {}) {
330
514
  question = {
331
515
  kind: 'missing',
332
516
  text: ctx.chat.repos.length === 0 ? 'Which repository? This chat has none in its scope: start a thread on one.' : 'Which repository?',
333
- choices: ctx.chat.repos.slice(0, 4).map((x) => ({ label: x.name, edit: { repoRef: x.id } })),
517
+ choices: repoChoicesFor(facts.words, ctx.chat.repos).map((x) => ({ label: x.name, edit: { repoRef: x.id } })),
334
518
  };
335
519
  }
336
520
  else if (missing.kind === 'documents') {
@@ -372,6 +556,13 @@ export function resolveJob(facts, ctx, opts = {}) {
372
556
  swap: ctx.chat.repos.length > 1 ? { choices: ctx.chat.repos.filter((x) => x.id !== repo.id).slice(0, 4).map((x) => ({ label: x.name, edit: { repoRef: x.id } })) } : null,
373
557
  });
374
558
  const selfSeated = r.workflow !== null && SELF_SEATED.has(r.workflow);
559
+ const nameOfSeat = (key) => ctx.roster.find((s) => s.key === key)?.name ?? key;
560
+ const coverage = !short && !selfSeated ? ctx.coverage?.(seats.keys, repo !== null) ?? null : null;
561
+ const disclosure = !short && !selfSeated ? coverageNote(coverage, nameOfSeat) ?? judgeDisclosure(r, seats.keys.length) : null;
562
+ if (disclosure !== null)
563
+ notes.push(disclosure);
564
+ // (crew#1673) A covered card still says, before launch, which seats were seen sharing a provider (core#1594).
565
+ notes.push(...sharingNotes(coverage, nameOfSeat));
375
566
  // Lead swaps come from the pool work is drawn from; the row shows only when it offers a choice (crew#1590).
376
567
  const swapChoices = (ctx.pool ?? ctx.roster).filter((x) => x.key !== seats.lead).slice(0, 4).map((x) => ({ label: `${x.name} leads`, edit: { lead: x.key } }));
377
568
  const seatsTok = t({
@@ -421,6 +612,22 @@ export function resolveJob(facts, ctx, opts = {}) {
421
612
  }
422
613
  if (facts.skipQe !== null)
423
614
  parts.push(`Without QE acceptance (you said: “${facts.skipQe.reason}”), labelled on the job.`);
615
+ // (crew#1840) A job that makes a pull request, asked to change one this chat delivered on the same repository,
616
+ // updates THAT pull request (`revisesPr`); asked but not attachable, the card says it updates none, why, and where a
617
+ // delivered PR is revised. Nothing else in the proposal ever says where the work is delivered.
618
+ const prAsk = launch === 'run' && delivers === 'pr' && repo !== null ? prRevisionOf(facts.words, ctx.deliveredPrs ?? [], repo.id) : null;
619
+ const revisesPr = prAsk?.pr ?? null;
620
+ if (revisesPr !== null) {
621
+ parts.push(`It updates pull request #${revisesPr.number}, which an earlier job of this chat delivered; no new pull request is opened.`);
622
+ }
623
+ else if (prAsk !== null && prAsk.miss !== undefined) {
624
+ const why = prAsk.miss === 'not-delivered'
625
+ ? `${prAsk.named ?? 'the pull request you named'} is not one this chat delivered on ${repo.name}`
626
+ : prAsk.miss === 'several'
627
+ ? `you named more than one pull request this chat delivered on ${repo.name}`
628
+ : `this chat has no one pull request on ${repo.name} it delivered to update`;
629
+ notes.push(`This job won't update an existing pull request: ${why}. To change a delivered pull request, use Revise this PR on the job that delivered it.`);
630
+ }
424
631
  // crew#1570: a domain extraction runs many hours on a large repository; the catalog's fixed range would mislead.
425
632
  const sizeBound = card.id === 'analyze-codebase' && r.option?.id === 'domain';
426
633
  const time = sizeBound ? DOMAIN_TIME : minutesLabel(r.resolved.typicalMinutes);
@@ -490,7 +697,8 @@ export function resolveJob(facts, ctx, opts = {}) {
490
697
  sentence,
491
698
  suggestions: suggestions.slice(0, 2),
492
699
  question,
493
- sketch: sketchOf(r),
700
+ sketch: sketchOf(r, startChooses),
701
+ ...(revisesPr !== null ? { revisesPr: { number: revisesPr.number, url: revisesPr.url, runId: revisesPr.runId } } : {}),
494
702
  revises: ctx.revises,
495
703
  lineage: ctx.lineage ?? ctx.pid,
496
704
  ...(ctx.answers !== undefined ? { answers: ctx.answers } : {}),
@@ -525,14 +733,15 @@ export function factsOf(p) {
525
733
  const shape = p.shape;
526
734
  return {
527
735
  card: shape.card,
736
+ title: p.namedTitle ?? null,
528
737
  option: shape.option,
529
738
  depth: shape.depth,
530
739
  words: p.words ?? p.brief ?? '',
531
740
  details: [...(p.details ?? [])],
532
741
  repoRef: p.repoRefs?.[0] ?? null,
533
742
  projectId: p.filedIn.projectId,
534
- lead: p.seats?.lead ?? null,
535
- seats: p.seats !== undefined ? [...p.seats.keys] : null,
743
+ lead: p.seats?.lead ?? p.helpers?.seats[0] ?? null,
744
+ seats: p.seats !== undefined ? [...p.seats.keys] : p.helpers !== null ? [...p.helpers.seats] : null,
536
745
  inputs: inputsOfProposal(p),
537
746
  skipQe: p.skipQe ?? null,
538
747
  by: shape.by,
@@ -667,10 +876,12 @@ export function mergeRevision(parent, edits, ctx) {
667
876
  }
668
877
  if (edits.project !== undefined && edits.project !== facts.projectId)
669
878
  notes.push("Not changed: the project is the chat's own");
670
- // 4. Seats: the lead, added seats; removing the card's only distinct reviewer or judge is refused. A self-seated
879
+ // 4. Seats: the lead, added seats; removing the card's only distinct evaluator is refused. A self-seated
671
880
  // workflow picks its own seat: a seat edit there changes nothing (codex r2).
672
881
  const card4 = CATALOG_V2_CARDS.find((c) => c.id === facts.card);
673
882
  const r4 = resolveOption(card4.id, optionFor(card4, facts.option), ctx.served);
883
+ if (r4 === null || proposalKindOf(r4) !== 'create')
884
+ facts.title = null;
674
885
  if (r4?.workflow !== null && r4?.workflow !== undefined && SELF_SEATED.has(r4.workflow) && (edits.lead !== undefined || edits.addSeats !== undefined || edits.removeSeats !== undefined)) {
675
886
  notes.push(`Not changed: ${card4.title} picks its own seat`);
676
887
  edits = { ...edits };
@@ -699,7 +910,7 @@ export function mergeRevision(parent, edits, ctx) {
699
910
  }
700
911
  if (edits.removeSeats !== undefined && edits.removeSeats.length > 0) {
701
912
  const r = resolveOption(facts.card, optionFor(CATALOG_V2_CARDS.find((c) => c.id === facts.card), facts.option), ctx.served);
702
- const need = r === null ? 1 : seatsNeeded(r);
913
+ const need = r !== null && proposalKindOf(r) === 'create' ? 2 : r === null ? 1 : seatsNeeded(r);
703
914
  const current = facts.seats ?? drawOrder(facts.lead, ctx).filter((k) => can.has(k));
704
915
  // (F1/F2) A removal is applied or refused in the card's words; what WAS applied is said from the published card
705
916
  // (`seatRemovalNote`), never from this intermediate merge. The count reads only the seats that can work now.
@@ -954,8 +1165,9 @@ export function launchShapeOfProposal(p) {
954
1165
  }
955
1166
  /**
956
1167
  * The roster a job's Go hands the engine: `current` (the daemon's launch roster, naming the lead) narrowed to the seats
957
- * the person saw. A reshape inherits the held run's roster configuration; its membership is still the proposal's
958
- * seats (codex r2), with the current roster's entry for a seat added since (codex r3). `clisJson` is ALWAYS the card's
1168
+ * the person saw. A reshape inherits the held run's roster configuration, with standing always from the current
1169
+ * roster; its membership is still the proposal's seats (codex r2), with the current roster's entry for a seat added
1170
+ * since (codex r3). An inherited seat no longer on the current roster is not carried. `clisJson` is ALWAYS the card's
959
1171
  * seats when it names any (crew#1593): without it the launch waits for roster readiness and reads the roster again, so
960
1172
  * a seat that became ready in between would join a job whose card never named it. Absent only for a card that names no
961
1173
  * seat and inherits no roster (the engine is handed the daemon's roster, as for any launch that names none).
@@ -973,7 +1185,16 @@ export function jobLaunchRoster(current, p) {
973
1185
  inherited = null;
974
1186
  }
975
1187
  }
976
- const roster = inherited === null ? [...current] : [...inherited, ...current.filter((s) => !inherited.some((i) => i.key === s.key))];
1188
+ const refreshStanding = (seat) => {
1189
+ const now = current.find((s) => s.key === seat.key);
1190
+ if (now === undefined)
1191
+ return [];
1192
+ return [{
1193
+ ...Object.fromEntries(Object.entries(seat).filter(([key]) => !SEAT_STANDING_FIELDS.has(key))),
1194
+ ...Object.fromEntries(Object.entries(now).filter(([key]) => SEAT_STANDING_FIELDS.has(key))),
1195
+ }];
1196
+ };
1197
+ const roster = inherited === null ? [...current] : [...inherited.flatMap(refreshStanding), ...current.filter((s) => !inherited.some((i) => i.key === s.key))];
977
1198
  const narrowed = keys.length > 0 ? roster.filter((s) => keys.includes(String(s.key))) : roster;
978
1199
  const missingSeat = keys.find((k) => !roster.some((s) => String(s.key) === k));
979
1200
  if (missingSeat !== undefined)