clinkx 1.2.0 → 1.4.0

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 (371) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +17 -8
  3. package/clinkx-workflows/dist/architecture-arena/admission.d.ts +16 -0
  4. package/clinkx-workflows/dist/architecture-arena/admission.js +107 -0
  5. package/clinkx-workflows/dist/architecture-arena/admission.js.map +1 -0
  6. package/clinkx-workflows/dist/architecture-arena/contract.d.ts +1368 -0
  7. package/clinkx-workflows/dist/architecture-arena/contract.js +254 -0
  8. package/clinkx-workflows/dist/architecture-arena/contract.js.map +1 -0
  9. package/clinkx-workflows/dist/architecture-arena/runtime.d.ts +53 -0
  10. package/clinkx-workflows/dist/architecture-arena/runtime.js +511 -0
  11. package/clinkx-workflows/dist/architecture-arena/runtime.js.map +1 -0
  12. package/clinkx-workflows/dist/architecture-comparison/admission.d.ts +17 -1
  13. package/clinkx-workflows/dist/architecture-comparison/admission.js +27 -4
  14. package/clinkx-workflows/dist/architecture-comparison/admission.js.map +1 -1
  15. package/clinkx-workflows/dist/architecture-comparison/contract.d.ts +59 -62
  16. package/clinkx-workflows/dist/architecture-comparison/contract.js +4 -21
  17. package/clinkx-workflows/dist/architecture-comparison/contract.js.map +1 -1
  18. package/clinkx-workflows/dist/architecture-comparison/runtime.d.ts +4 -3
  19. package/clinkx-workflows/dist/architecture-comparison/runtime.js +22 -67
  20. package/clinkx-workflows/dist/architecture-comparison/runtime.js.map +1 -1
  21. package/clinkx-workflows/dist/artifacts.d.ts +19 -4
  22. package/clinkx-workflows/dist/artifacts.js +16 -7
  23. package/clinkx-workflows/dist/artifacts.js.map +1 -1
  24. package/clinkx-workflows/dist/backend.d.ts +30 -0
  25. package/clinkx-workflows/dist/child-env.d.ts +3 -0
  26. package/clinkx-workflows/dist/child-env.js +11 -0
  27. package/clinkx-workflows/dist/child-env.js.map +1 -1
  28. package/clinkx-workflows/dist/clink-client.d.ts +8 -2
  29. package/clinkx-workflows/dist/clink-client.js +4 -2
  30. package/clinkx-workflows/dist/clink-client.js.map +1 -1
  31. package/clinkx-workflows/dist/context-preflight.d.ts +6 -0
  32. package/clinkx-workflows/dist/context-preflight.js.map +1 -1
  33. package/clinkx-workflows/dist/council-execution-policy.d.ts +3 -1
  34. package/clinkx-workflows/dist/council-execution-policy.js +4 -0
  35. package/clinkx-workflows/dist/council-execution-policy.js.map +1 -1
  36. package/clinkx-workflows/dist/dashboard/api-routes.d.ts +21 -0
  37. package/clinkx-workflows/dist/dashboard/api-routes.js +27 -0
  38. package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -1
  39. package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +13 -0
  40. package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -1
  41. package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +27 -0
  42. package/clinkx-workflows/dist/dashboard/auth/controller.js +262 -23
  43. package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -1
  44. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.d.ts +62 -0
  45. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js +70 -0
  46. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js.map +1 -0
  47. package/clinkx-workflows/dist/dashboard/contracts.d.ts +586 -586
  48. package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +28 -28
  49. package/clinkx-workflows/dist/dashboard/request-admission.d.ts +6 -0
  50. package/clinkx-workflows/dist/dashboard/request-admission.js +9 -0
  51. package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -1
  52. package/clinkx-workflows/dist/dashboard/server-factory.js +15 -1
  53. package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -1
  54. package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +32 -32
  55. package/clinkx-workflows/dist/dashboard/settings-contract.d.ts +1806 -0
  56. package/clinkx-workflows/dist/dashboard/settings-contract.js +630 -0
  57. package/clinkx-workflows/dist/dashboard/settings-contract.js.map +1 -0
  58. package/clinkx-workflows/dist/dashboard/settings-process-reader.d.ts +48 -0
  59. package/clinkx-workflows/dist/dashboard/settings-process-reader.js +195 -0
  60. package/clinkx-workflows/dist/dashboard/settings-process-reader.js.map +1 -0
  61. package/clinkx-workflows/dist/dashboard/settings-routes.d.ts +87 -0
  62. package/clinkx-workflows/dist/dashboard/settings-routes.js +690 -0
  63. package/clinkx-workflows/dist/dashboard/settings-routes.js.map +1 -0
  64. package/clinkx-workflows/dist/dashboard-ui/assets/index-DSOtuS0p.js +122 -0
  65. package/clinkx-workflows/dist/dashboard-ui/assets/style-C5guUjwN.css +1 -0
  66. package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
  67. package/clinkx-workflows/dist/delegate-signature.d.ts +4 -3
  68. package/clinkx-workflows/dist/delegate-signature.js +4 -3
  69. package/clinkx-workflows/dist/delegate-signature.js.map +1 -1
  70. package/clinkx-workflows/dist/durable-file-core.d.ts +76 -0
  71. package/clinkx-workflows/dist/durable-file-core.js +146 -0
  72. package/clinkx-workflows/dist/durable-file-core.js.map +1 -0
  73. package/clinkx-workflows/dist/durable-file.d.ts +13 -0
  74. package/clinkx-workflows/dist/durable-file.js +22 -0
  75. package/clinkx-workflows/dist/durable-file.js.map +1 -0
  76. package/clinkx-workflows/dist/engine.d.ts +42 -7
  77. package/clinkx-workflows/dist/engine.js +196 -24
  78. package/clinkx-workflows/dist/engine.js.map +1 -1
  79. package/clinkx-workflows/dist/index.js +68 -2
  80. package/clinkx-workflows/dist/index.js.map +1 -1
  81. package/clinkx-workflows/dist/ping-pong/admission.d.ts +127 -0
  82. package/clinkx-workflows/dist/ping-pong/admission.js +522 -0
  83. package/clinkx-workflows/dist/ping-pong/admission.js.map +1 -0
  84. package/clinkx-workflows/dist/ping-pong/contract.d.ts +2539 -0
  85. package/clinkx-workflows/dist/ping-pong/contract.js +819 -0
  86. package/clinkx-workflows/dist/ping-pong/contract.js.map +1 -0
  87. package/clinkx-workflows/dist/ping-pong/control.d.ts +67 -0
  88. package/clinkx-workflows/dist/ping-pong/control.js +12 -0
  89. package/clinkx-workflows/dist/ping-pong/control.js.map +1 -0
  90. package/clinkx-workflows/dist/ping-pong/runtime-handle.d.ts +24 -0
  91. package/clinkx-workflows/dist/ping-pong/runtime-handle.js +55 -0
  92. package/clinkx-workflows/dist/ping-pong/runtime-handle.js.map +1 -0
  93. package/clinkx-workflows/dist/ping-pong/runtime.d.ts +235 -0
  94. package/clinkx-workflows/dist/ping-pong/runtime.js +1183 -0
  95. package/clinkx-workflows/dist/ping-pong/runtime.js.map +1 -0
  96. package/clinkx-workflows/dist/ping-pong/settle.d.ts +57 -0
  97. package/clinkx-workflows/dist/ping-pong/settle.js +58 -0
  98. package/clinkx-workflows/dist/ping-pong/settle.js.map +1 -0
  99. package/clinkx-workflows/dist/ping-pong/sidecar.d.ts +65 -0
  100. package/clinkx-workflows/dist/ping-pong/sidecar.js +138 -0
  101. package/clinkx-workflows/dist/ping-pong/sidecar.js.map +1 -0
  102. package/clinkx-workflows/dist/plan-review/publication.d.ts +2 -1
  103. package/clinkx-workflows/dist/plan-review/publication.js +5 -6
  104. package/clinkx-workflows/dist/plan-review/publication.js.map +1 -1
  105. package/clinkx-workflows/dist/plan-review/snapshot.d.ts +3 -2
  106. package/clinkx-workflows/dist/plan-review/snapshot.js +8 -8
  107. package/clinkx-workflows/dist/plan-review/snapshot.js.map +1 -1
  108. package/clinkx-workflows/dist/recipe-host.d.ts +315 -0
  109. package/clinkx-workflows/dist/recipe-host.js +183 -0
  110. package/clinkx-workflows/dist/recipe-host.js.map +1 -0
  111. package/clinkx-workflows/dist/recipe-seats.d.ts +96 -0
  112. package/clinkx-workflows/dist/recipe-seats.js +163 -0
  113. package/clinkx-workflows/dist/recipe-seats.js.map +1 -0
  114. package/clinkx-workflows/dist/recipe-shared/evidence.d.ts +67 -0
  115. package/clinkx-workflows/dist/recipe-shared/evidence.js +111 -0
  116. package/clinkx-workflows/dist/recipe-shared/evidence.js.map +1 -0
  117. package/clinkx-workflows/dist/reducers/index.d.ts +9 -1
  118. package/clinkx-workflows/dist/reducers/index.js +30 -0
  119. package/clinkx-workflows/dist/reducers/index.js.map +1 -1
  120. package/clinkx-workflows/dist/run-lock-reclaim.d.ts +44 -0
  121. package/clinkx-workflows/dist/run-lock-reclaim.js +86 -0
  122. package/clinkx-workflows/dist/run-lock-reclaim.js.map +1 -0
  123. package/clinkx-workflows/dist/settings/audit.d.ts +101 -0
  124. package/clinkx-workflows/dist/settings/audit.js +318 -0
  125. package/clinkx-workflows/dist/settings/audit.js.map +1 -0
  126. package/clinkx-workflows/dist/settings/bootstrap.d.ts +35 -0
  127. package/clinkx-workflows/dist/settings/bootstrap.js +52 -0
  128. package/clinkx-workflows/dist/settings/bootstrap.js.map +1 -0
  129. package/clinkx-workflows/dist/settings/codec.d.ts +51 -0
  130. package/clinkx-workflows/dist/settings/codec.js +410 -0
  131. package/clinkx-workflows/dist/settings/codec.js.map +1 -0
  132. package/clinkx-workflows/dist/settings/durable-write.d.ts +48 -0
  133. package/clinkx-workflows/dist/settings/durable-write.js +31 -0
  134. package/clinkx-workflows/dist/settings/durable-write.js.map +1 -0
  135. package/clinkx-workflows/dist/settings/index.d.ts +20 -0
  136. package/clinkx-workflows/dist/settings/index.js +23 -0
  137. package/clinkx-workflows/dist/settings/index.js.map +1 -0
  138. package/clinkx-workflows/dist/settings/loader.d.ts +80 -0
  139. package/clinkx-workflows/dist/settings/loader.js +577 -0
  140. package/clinkx-workflows/dist/settings/loader.js.map +1 -0
  141. package/clinkx-workflows/dist/settings/lock.d.ts +108 -0
  142. package/clinkx-workflows/dist/settings/lock.js +344 -0
  143. package/clinkx-workflows/dist/settings/lock.js.map +1 -0
  144. package/clinkx-workflows/dist/settings/paths.d.ts +65 -0
  145. package/clinkx-workflows/dist/settings/paths.js +173 -0
  146. package/clinkx-workflows/dist/settings/paths.js.map +1 -0
  147. package/clinkx-workflows/dist/settings/process-heartbeat.d.ts +47 -0
  148. package/clinkx-workflows/dist/settings/process-heartbeat.js +305 -0
  149. package/clinkx-workflows/dist/settings/process-heartbeat.js.map +1 -0
  150. package/clinkx-workflows/dist/settings/registry.d.ts +178 -0
  151. package/clinkx-workflows/dist/settings/registry.js +1285 -0
  152. package/clinkx-workflows/dist/settings/registry.js.map +1 -0
  153. package/clinkx-workflows/dist/settings/schema.d.ts +404 -0
  154. package/clinkx-workflows/dist/settings/schema.js +415 -0
  155. package/clinkx-workflows/dist/settings/schema.js.map +1 -0
  156. package/clinkx-workflows/dist/settings/store.d.ts +157 -0
  157. package/clinkx-workflows/dist/settings/store.js +842 -0
  158. package/clinkx-workflows/dist/settings/store.js.map +1 -0
  159. package/clinkx-workflows/dist/state-schema.d.ts +11 -0
  160. package/clinkx-workflows/dist/state-schema.js +4 -1
  161. package/clinkx-workflows/dist/state-schema.js.map +1 -1
  162. package/clinkx-workflows/dist/state.d.ts +178 -3
  163. package/clinkx-workflows/dist/state.js +618 -83
  164. package/clinkx-workflows/dist/state.js.map +1 -1
  165. package/clinkx-workflows/dist/stdio-entry.d.ts +2 -0
  166. package/clinkx-workflows/dist/stdio-entry.js +52 -0
  167. package/clinkx-workflows/dist/stdio-entry.js.map +1 -0
  168. package/clinkx-workflows/dist/transport.d.ts +2 -1
  169. package/clinkx-workflows/dist/transport.js +5 -0
  170. package/clinkx-workflows/dist/transport.js.map +1 -1
  171. package/clinkx-workflows/dist/validators/architecture-arena.d.ts +6 -0
  172. package/clinkx-workflows/dist/validators/architecture-arena.js +16 -0
  173. package/clinkx-workflows/dist/validators/architecture-arena.js.map +1 -0
  174. package/clinkx-workflows/dist/validators/index.js +4 -0
  175. package/clinkx-workflows/dist/validators/index.js.map +1 -1
  176. package/clinkx-workflows/dist/validators/ping-pong.d.ts +6 -0
  177. package/clinkx-workflows/dist/validators/ping-pong.js +10 -0
  178. package/clinkx-workflows/dist/validators/ping-pong.js.map +1 -0
  179. package/clinkx-workflows/dist/workflow-tools.d.ts +51 -5
  180. package/clinkx-workflows/dist/workflow-tools.js +785 -34
  181. package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
  182. package/clinkx-workflows/dist/workflow-verification-contract.d.ts +4 -4
  183. package/clinkx-workflows/templates/architecture-arena/candidate.txt +39 -0
  184. package/clinkx-workflows/templates/architecture-arena/judge.txt +34 -0
  185. package/clinkx-workflows/templates/ping-pong/implement.txt +14 -0
  186. package/clinkx-workflows/templates/ping-pong/remediate.txt +14 -0
  187. package/clinkx-workflows/templates/ping-pong/review.txt +27 -0
  188. package/clinkx-workflows/workflows/architecture-arena.yaml +127 -0
  189. package/clinkx-workflows/workflows/ping-pong.yaml +158 -0
  190. package/dist/context-builder/bundle.js +4 -3
  191. package/dist/context-builder/bundle.js.map +1 -1
  192. package/dist/context-builder/delegate-packet.d.ts +1 -0
  193. package/dist/context-builder/delegate-packet.js +66 -7
  194. package/dist/context-builder/delegate-packet.js.map +1 -1
  195. package/dist/context-builder/delegate-validation.d.ts +12 -3
  196. package/dist/context-builder/delegate-validation.js +23 -13
  197. package/dist/context-builder/delegate-validation.js.map +1 -1
  198. package/dist/context-builder/external-gaps.d.ts +14 -3
  199. package/dist/context-builder/external-gaps.js +124 -18
  200. package/dist/context-builder/external-gaps.js.map +1 -1
  201. package/dist/context-builder/handler.js +108 -191
  202. package/dist/context-builder/handler.js.map +1 -1
  203. package/dist/context-builder/review-coverage.js +27 -1
  204. package/dist/context-builder/review-coverage.js.map +1 -1
  205. package/dist/context-builder/secrets.js +1 -1
  206. package/dist/context-builder/secrets.js.map +1 -1
  207. package/dist/context-builder/versions.d.ts +10 -4
  208. package/dist/context-builder/versions.js +10 -4
  209. package/dist/context-builder/versions.js.map +1 -1
  210. package/dist/context-builder/workflow-runner.js +33 -24
  211. package/dist/context-builder/workflow-runner.js.map +1 -1
  212. package/dist/dashboard-cli.d.ts +2 -0
  213. package/dist/dashboard-cli.js +197 -58
  214. package/dist/dashboard-cli.js.map +1 -1
  215. package/dist/dashboard-companion/client.d.ts +10 -0
  216. package/dist/dashboard-companion/client.js +43 -1
  217. package/dist/dashboard-companion/client.js.map +1 -1
  218. package/dist/dashboard-companion/config.d.ts +19 -1
  219. package/dist/dashboard-companion/config.js +104 -3
  220. package/dist/dashboard-companion/config.js.map +1 -1
  221. package/dist/dashboard-companion/protocol.d.ts +16 -0
  222. package/dist/dashboard-companion/protocol.js +55 -1
  223. package/dist/dashboard-companion/protocol.js.map +1 -1
  224. package/dist/dashboard-companion/workstation-binding.d.ts +69 -0
  225. package/dist/dashboard-companion/workstation-binding.js +192 -0
  226. package/dist/dashboard-companion/workstation-binding.js.map +1 -0
  227. package/dist/dashboard-gateway/admin-cli.d.ts +10 -0
  228. package/dist/dashboard-gateway/admin-cli.js +266 -0
  229. package/dist/dashboard-gateway/admin-cli.js.map +1 -0
  230. package/dist/dashboard-gateway/config.d.ts +50 -0
  231. package/dist/dashboard-gateway/config.js +235 -1
  232. package/dist/dashboard-gateway/config.js.map +1 -1
  233. package/dist/dashboard-gateway/connection-registry.d.ts +100 -0
  234. package/dist/dashboard-gateway/connection-registry.js +228 -0
  235. package/dist/dashboard-gateway/connection-registry.js.map +1 -0
  236. package/dist/dashboard-gateway/control-plane/account-auth.d.ts +78 -0
  237. package/dist/dashboard-gateway/control-plane/account-auth.js +198 -0
  238. package/dist/dashboard-gateway/control-plane/account-auth.js.map +1 -0
  239. package/dist/dashboard-gateway/control-plane/billing.d.ts +264 -0
  240. package/dist/dashboard-gateway/control-plane/billing.js +787 -0
  241. package/dist/dashboard-gateway/control-plane/billing.js.map +1 -0
  242. package/dist/dashboard-gateway/control-plane/contracts.d.ts +1293 -0
  243. package/dist/dashboard-gateway/control-plane/contracts.js +280 -0
  244. package/dist/dashboard-gateway/control-plane/contracts.js.map +1 -0
  245. package/dist/dashboard-gateway/control-plane/cookies.d.ts +13 -0
  246. package/dist/dashboard-gateway/control-plane/cookies.js +46 -0
  247. package/dist/dashboard-gateway/control-plane/cookies.js.map +1 -0
  248. package/dist/dashboard-gateway/control-plane/credentials.d.ts +63 -0
  249. package/dist/dashboard-gateway/control-plane/credentials.js +66 -0
  250. package/dist/dashboard-gateway/control-plane/credentials.js.map +1 -0
  251. package/dist/dashboard-gateway/control-plane/entitlements.d.ts +118 -0
  252. package/dist/dashboard-gateway/control-plane/entitlements.js +329 -0
  253. package/dist/dashboard-gateway/control-plane/entitlements.js.map +1 -0
  254. package/dist/dashboard-gateway/control-plane/errors.d.ts +17 -0
  255. package/dist/dashboard-gateway/control-plane/errors.js +23 -0
  256. package/dist/dashboard-gateway/control-plane/errors.js.map +1 -0
  257. package/dist/dashboard-gateway/control-plane/hosts.d.ts +6 -0
  258. package/dist/dashboard-gateway/control-plane/hosts.js +16 -0
  259. package/dist/dashboard-gateway/control-plane/hosts.js.map +1 -0
  260. package/dist/dashboard-gateway/control-plane/http.d.ts +34 -0
  261. package/dist/dashboard-gateway/control-plane/http.js +331 -0
  262. package/dist/dashboard-gateway/control-plane/http.js.map +1 -0
  263. package/dist/dashboard-gateway/control-plane/schema.d.ts +9 -0
  264. package/dist/dashboard-gateway/control-plane/schema.js +247 -0
  265. package/dist/dashboard-gateway/control-plane/schema.js.map +1 -0
  266. package/dist/dashboard-gateway/control-plane/secrets.d.ts +20 -0
  267. package/dist/dashboard-gateway/control-plane/secrets.js +39 -0
  268. package/dist/dashboard-gateway/control-plane/secrets.js.map +1 -0
  269. package/dist/dashboard-gateway/control-plane/store.d.ts +579 -0
  270. package/dist/dashboard-gateway/control-plane/store.js +1115 -0
  271. package/dist/dashboard-gateway/control-plane/store.js.map +1 -0
  272. package/dist/dashboard-gateway/cookie-boundary.d.ts +60 -0
  273. package/dist/dashboard-gateway/cookie-boundary.js +205 -0
  274. package/dist/dashboard-gateway/cookie-boundary.js.map +1 -0
  275. package/dist/dashboard-gateway/index.js +271 -494
  276. package/dist/dashboard-gateway/index.js.map +1 -1
  277. package/dist/dashboard-gateway/main.js +7 -2
  278. package/dist/dashboard-gateway/main.js.map +1 -1
  279. package/dist/dashboard-gateway/routing.d.ts +43 -0
  280. package/dist/dashboard-gateway/routing.js +65 -0
  281. package/dist/dashboard-gateway/routing.js.map +1 -0
  282. package/dist/dashboard-gateway/tenant-gateway.d.ts +56 -0
  283. package/dist/dashboard-gateway/tenant-gateway.js +989 -0
  284. package/dist/dashboard-gateway/tenant-gateway.js.map +1 -0
  285. package/dist/dashboard-gateway/tenant-main.d.ts +41 -0
  286. package/dist/dashboard-gateway/tenant-main.js +303 -0
  287. package/dist/dashboard-gateway/tenant-main.js.map +1 -0
  288. package/dist/dashboard-gateway/tunnel-errors.d.ts +16 -0
  289. package/dist/dashboard-gateway/tunnel-errors.js +22 -0
  290. package/dist/dashboard-gateway/tunnel-errors.js.map +1 -0
  291. package/dist/dashboard-gateway/tunnel-http.d.ts +21 -0
  292. package/dist/dashboard-gateway/tunnel-http.js +195 -0
  293. package/dist/dashboard-gateway/tunnel-http.js.map +1 -0
  294. package/dist/elaris/config.d.ts +10 -0
  295. package/dist/elaris/config.js +27 -1
  296. package/dist/elaris/config.js.map +1 -1
  297. package/dist/elaris/tools.js +4 -1
  298. package/dist/elaris/tools.js.map +1 -1
  299. package/dist/handler.d.ts +6 -0
  300. package/dist/handler.js +17 -1
  301. package/dist/handler.js.map +1 -1
  302. package/dist/index.d.ts +0 -31
  303. package/dist/index.js +41 -404
  304. package/dist/index.js.map +1 -1
  305. package/dist/lib.d.ts +17 -0
  306. package/dist/lib.js +17 -0
  307. package/dist/lib.js.map +1 -0
  308. package/dist/local-clink-backend.d.ts +2 -1
  309. package/dist/local-clink-backend.js +28 -4
  310. package/dist/local-clink-backend.js.map +1 -1
  311. package/dist/parsers/extract.d.ts +19 -1
  312. package/dist/parsers/extract.js +68 -3
  313. package/dist/parsers/extract.js.map +1 -1
  314. package/dist/pipeline.d.ts +17 -1
  315. package/dist/pipeline.js +34 -6
  316. package/dist/pipeline.js.map +1 -1
  317. package/dist/process-group.d.ts +65 -0
  318. package/dist/process-group.js +153 -0
  319. package/dist/process-group.js.map +1 -0
  320. package/dist/progress-report/lock.d.ts +17 -59
  321. package/dist/progress-report/lock.js +25 -329
  322. package/dist/progress-report/lock.js.map +1 -1
  323. package/dist/progress-report/schema.d.ts +23 -23
  324. package/dist/project-verification/files.js +1 -1
  325. package/dist/project-verification/files.js.map +1 -1
  326. package/dist/project-verification/process.js +23 -44
  327. package/dist/project-verification/process.js.map +1 -1
  328. package/dist/project-verification/service.js +9 -1
  329. package/dist/project-verification/service.js.map +1 -1
  330. package/dist/prompt.d.ts +7 -0
  331. package/dist/prompt.js +18 -1
  332. package/dist/prompt.js.map +1 -1
  333. package/dist/recipe-host/git-trust.d.ts +43 -0
  334. package/dist/recipe-host/git-trust.js +360 -0
  335. package/dist/recipe-host/git-trust.js.map +1 -0
  336. package/dist/recipe-host/git.d.ts +42 -0
  337. package/dist/recipe-host/git.js +207 -0
  338. package/dist/recipe-host/git.js.map +1 -0
  339. package/dist/recipe-host/native-recipe-host.d.ts +127 -0
  340. package/dist/recipe-host/native-recipe-host.js +880 -0
  341. package/dist/recipe-host/native-recipe-host.js.map +1 -0
  342. package/dist/recipe-host/seat-cwd.d.ts +16 -0
  343. package/dist/recipe-host/seat-cwd.js +170 -0
  344. package/dist/recipe-host/seat-cwd.js.map +1 -0
  345. package/dist/runner.d.ts +43 -1
  346. package/dist/runner.js +234 -35
  347. package/dist/runner.js.map +1 -1
  348. package/dist/server.js +84 -5
  349. package/dist/server.js.map +1 -1
  350. package/dist/settings-cli/clients.d.ts +137 -0
  351. package/dist/settings-cli/clients.js +1124 -0
  352. package/dist/settings-cli/clients.js.map +1 -0
  353. package/dist/settings-cli/commands.d.ts +67 -0
  354. package/dist/settings-cli/commands.js +726 -0
  355. package/dist/settings-cli/commands.js.map +1 -0
  356. package/dist/settings-cli/format.d.ts +34 -0
  357. package/dist/settings-cli/format.js +40 -0
  358. package/dist/settings-cli/format.js.map +1 -0
  359. package/dist/settings-cli/main.d.ts +18 -0
  360. package/dist/settings-cli/main.js +256 -0
  361. package/dist/settings-cli/main.js.map +1 -0
  362. package/dist/stdio-main.d.ts +73 -0
  363. package/dist/stdio-main.js +455 -0
  364. package/dist/stdio-main.js.map +1 -0
  365. package/docs/configuration.md +362 -40
  366. package/docs/engineering-recipes.md +291 -0
  367. package/docs/security.md +234 -6
  368. package/docs/verification/project-checks.md +24 -2
  369. package/package.json +6 -2
  370. package/clinkx-workflows/dist/dashboard-ui/assets/index-BdpmbPps.js +0 -115
  371. package/clinkx-workflows/dist/dashboard-ui/assets/style-Im5i1iAs.css +0 -1
@@ -129,6 +129,297 @@ qualify ClinkX; use the installed project-check control for your own project's
129
129
  commands through the same MCP connection. `npx clinkx` starts the MCP server;
130
130
  readiness and verification are tools on that server.
131
131
 
132
+ ## Built-in architecture arena (2-4 candidates)
133
+
134
+ `architecture-arena` (v2.0.0) generalizes the comparison to 2-4 design authors
135
+ and keeps `architecture-comparison` (v1) unchanged. Seats use the council seat
136
+ parameters: `members` are the authors (2..4; each member's optional `stance` is
137
+ its exploration direction under one shared acceptance contract) and `chairman`
138
+ is the judge (required; there is no YAML default judge). `roster` is rejected.
139
+ Model and effort follow adapter `invocation_overrides`, as for council seats.
140
+
141
+ ```json
142
+ {
143
+ "name": "run_workflow",
144
+ "arguments": {
145
+ "workflow": "architecture-arena",
146
+ "run_id": "arena-001",
147
+ "members": [
148
+ {"cli_name": "codex", "stance": "minimize new modules"},
149
+ {"cli_name": "claude", "stance": "optimize for testability"},
150
+ {"cli_name": "glm"}
151
+ ],
152
+ "chairman": "codex",
153
+ "variables": {
154
+ "user_request": "Design the change. State caller usage, signatures, ownership, failures and rejected alternatives.",
155
+ "source_identity": "my-project at reviewed revision; declared attached files only",
156
+ "context_files": ["/absolute/path/to/project/design-context.md"]
157
+ }
158
+ }
159
+ }
160
+ ```
161
+
162
+ - **Seat binding.** Admission materializes one author call per member before any
163
+ state exists and stores the seat plan (stance text included) in the
164
+ server-owned `arena_seat_plan` variable; a caller-supplied value is rejected.
165
+ Resume and inspection read the persisted plan, never the caller input. Stance
166
+ text is inserted literally; `$&`, `` $` ``, `$'` and `$$` are not expanded.
167
+ - **Capacity.** n outside 2..4 is rejected before preflight. The 32-file freeze
168
+ cap is checked at admission against the merged `context_files` and
169
+ `context_bundle_files` plus the slots a selecting preflight appends (2, or 3
170
+ with `include_selected_context_artifact`), so an overflow is a pre-state
171
+ `-32602`, not a freeze failure after preflight. The reserve is 0 for
172
+ `cb_context_mode: "off"` or on a server without a context runner; an inherited
173
+ server default of `off` is not visible at admission and still reserves. v1
174
+ `architecture-comparison` shares the check (its golden digests are unchanged). After the freeze,
175
+ the per-candidate cap is `min(16 KiB, floor((98,304 - 3,072 - frozen shared
176
+ bytes) / n))` with a 4 KiB floor; each author is told its cap through the
177
+ sealed packet. With a worst-case 48 KiB shared packet the caps are 16,384 B
178
+ (n=2), 15,360 B (n=3) and 11,520 B (n=4); the n=4 judge view then measures
179
+ 98,046 B against the 98,304 B ceiling. The floor cannot trigger under today's
180
+ ceilings and is kept as a guard, so `capacity_rejected` is unreachable today.
181
+ Below-floor freezes write `architecture-arena.capacity.v2.json`; async runs
182
+ end `failed` and status shows `comparison.status: "capacity_rejected"`.
183
+ Nothing is truncated. A declared `judge_prompt_token_limit` must cover the
184
+ judge's byte-token bound (98,304 B view + 12,288 B judge output + 100,000 B
185
+ reserve + judge prompt bytes, about 212.5K); a smaller value is rejected at
186
+ admission.
187
+ - **Complete fan-in.** Every admitted author must produce a valid candidate
188
+ before the judge runs. A missing, invalid or busy author blocks the judge and
189
+ the owner record lists `missing_participants` with a reason (`busy`, `failed`,
190
+ `invalid`, `not_dispatched`, `integrity`). A surviving subset is never
191
+ compared. The judge must assess and rank exactly the admitted aliases; exact
192
+ duplicates are recorded as `duplicate_of`. `owner_acceptance` stays
193
+ `not_recorded`.
194
+ - **Busy seats.** Author and judge calls retry transport-class failures
195
+ (`transport_only`, 2 retries). A full root clink semaphore is a transient
196
+ failure; an author still busy after its retries is recorded `missing: busy`.
197
+ Busy detection uses the persisted `failureKind: "busy_before_spawn"`; legacy
198
+ and stdio records without it count as busy only when `failureClass` is
199
+ `transient` and the error starts with the root semaphore message.
200
+ - **Blind judging.** Presentation order is a deterministic permutation from
201
+ `frozen_digest` and `run_id`; aliases follow it. Routes, CLI names and stances
202
+ never enter the judge view.
203
+ - **Evidence.** The owner record has n+3 evidence entries (shared input, n
204
+ candidates, judge view, judge output) and stays within 128 KiB. Status projects
205
+ `comparison` with `status` (`complete`, `incomplete`, `unrecorded`,
206
+ `unavailable`, `capacity_rejected`), `missing_participants`,
207
+ `candidate_count` and `candidate_max_bytes`. `workflow_verification_attach`
208
+ works as for v1.
209
+ - **Runtime.** The arena runs in standalone `createWorkflowServer` with no
210
+ recipe host. Authors and the judge run with the server's `process.cwd()` and
211
+ their stock write-capable adapter flags; read-only behavior is a prompt
212
+ instruction, not a boundary. The run is resumable through `resume_workflow`
213
+ like v1; unlike v1, a failed freeze aborts the run.
214
+
215
+ ## Built-in native code ping-pong
216
+
217
+ `ping-pong` (v1.0.0) runs implement → verify → review rounds on a code task in a
218
+ host-owned git worktree, and pauses after every review round so the calling
219
+ agent (the "main agent") admits or rejects each finding. It is root-server only
220
+ (standalone `createWorkflowServer` rejects it) and requires `async: true`.
221
+ `list_workflows` advertises both as `async_only: true` and `root_only: true` (keys
222
+ omitted for every other workflow), and the standalone server leaves `ping-pong`
223
+ out of its listing.
224
+ Contracts: `.ai/plans/arena-ping-pong-orchestration/CONTRACTS.md`.
225
+
226
+ ```json
227
+ {
228
+ "name": "run_workflow",
229
+ "arguments": {
230
+ "workflow": "ping-pong",
231
+ "run_id": "pp-001",
232
+ "async": true,
233
+ "members": [
234
+ {"cli_name": "codex", "model": "gpt-6.1-sol", "effort": "high"},
235
+ {"cli_name": "claude", "model": "claude-sonnet-5-5", "effort": "max"}
236
+ ],
237
+ "variables": {
238
+ "user_request": "Make parseCsv honor quoted fields with embedded commas and newlines.",
239
+ "rounds": 3,
240
+ "acceptance_manifest": "verification.json"
241
+ }
242
+ }
243
+ }
244
+ ```
245
+
246
+ - **Seats.** `members[0]` is the implementer; `members[1..k]` are 1-4 reviewers
247
+ (members 2-5). `chairman`, `chairman_model`, `chairman_effort` and `roster` are
248
+ rejected, and so is a `stance` on any seat (the recipe owns every seat
249
+ prompt). Reviewer seat k in finding ids `R{round}-S{k}-{n}` is `members[k]`.
250
+ - **Inputs.** `user_request` (≤ 16 KiB), `rounds` (1..8, default 3),
251
+ `sign_off_threshold` (integer 0..10, default 9), `active_budget_seconds`
252
+ (default 7200, max 28800; execution time only), `deadline_seconds` (default
253
+ 86400, max 259200; absolute, includes decision wait), `acceptance_manifest`
254
+ (required, repository-relative project-check manifest),
255
+ `copy_preparation_manifest`, `acceptance_inputs` (≤ 30), and the usual `cb_*`
256
+ context variables. `pp_seat_plan` and `pp_admission` are server-owned and
257
+ rejected if supplied, as is a non-empty `context_bundle_files`.
258
+ - **Admission (all `-32602` before any state).** Async required; recipe host
259
+ present; an unmarked `CLINKX_ALLOWED_ROOTS` entry covering
260
+ `${CLINKX_HOME}/workspaces` that is not an ancestor of the state dir; a fresh
261
+ run id (no existing recipe run or workspace directory); every acceptance path
262
+ must be a regular file in the pinned baseline commit. The baseline is `HEAD` of
263
+ `CLINKX_WORKFLOWS_WORKSPACE_ROOT`; uncommitted changes are excluded and flagged
264
+ as `baseline_uncommitted_changes_excluded`.
265
+ - **Context.** Preflight reads the implementer worktree at the baseline
266
+ commit, never your checkout. Admission rebases `cb_roots` (empty = the
267
+ workspace root's location inside the worktree, which is the worktree itself
268
+ only when the workspace root is the repository toplevel) and absolute
269
+ `cb_focus_paths` onto the worktree path and records the original → rebased
270
+ mapping in `pp_admission.context_roots`. A path is anchored at the repository
271
+ toplevel or an alias of it (resolved component by component; symlinks and
272
+ `..` are followed only outside the repository, spelling is the on-disk
273
+ name); symlinks inside the repository are never followed, so a path through
274
+ one is judged by the baseline rule below, and a `..` inside the repository
275
+ (or after a named component of a relative focus path) is `-32602`. A root or absolute focus path outside the
276
+ repository, or absent from the baseline commit (uncommitted, untracked, or a
277
+ submodule), is `-32602`; a tracked file with uncommitted edits is accepted
278
+ and bundled at its baseline content. In the baseline tree a root must be a
279
+ directory and a focus path a file or directory; a symlink, or a path below
280
+ one, is `-32602` (the worktree holds the baseline symlink, which could point
281
+ back into your checkout). A relative focus path must name such an entry
282
+ under at least one root (joined onto each root, `..` escapes skipped), else
283
+ `-32602`. After the worktree is created, and before the ack, every rebased
284
+ root and absolute focus path must still canonicalize inside it, or the start
285
+ fails. Recipe runs bypass the
286
+ workflow context cache (no lookup, promotion, eviction or workspace-signature
287
+ git). The bundle is built once and reused by every decide, so in later rounds
288
+ it is stale by design: seats are told the worktree is authoritative, and
289
+ reviewers get the round delta.
290
+ - **Round.** The implementer works in `${CLINKX_HOME}/workspaces/<run_id>/implementer`
291
+ (detached HEAD). After its process group exit is confirmed, the host captures
292
+ the candidate identity (temporary-index `git write-tree`) and delta, checks
293
+ HEAD did not move, rechecks acceptance pins, and runs host verification on the
294
+ worktree. Reviewers then run serially in the same worktree and return strict
295
+ `pp-review-v1` JSON (`sign_off.{approved, score}`, `findings[]` with severity
296
+ `blocker|major|minor|nit`). Rounds ≥ 2 carry a simplification-audit mandate,
297
+ the admitted findings, and bounded `rejected[]` history (`{id, summary?,
298
+ reason}`; no summary for rejections recorded by older builds).
299
+ - **Withhold must be justified.** Each review packet binds, inside its digest,
300
+ `sign_off_threshold` and `findings_budget_remaining` (24 minus the findings
301
+ earlier seats reported this round). A withhold (`approved:false`, or a score
302
+ below the threshold) must cite at least one finding or list ids from the
303
+ packet's `rejected` list in `sign_off.blocking_rejected`, unless the budget is
304
+ 0; otherwise the seat fails `unjustified_withhold` (an id outside that list
305
+ fails `schema`). Unverified behavior is reported as an `unverified: …`
306
+ finding. There is no review-only round: a false-positive finding with a
307
+ withheld reviewer cannot be cleared without remediation.
308
+ - **Reviewer retry.** A reviewer attempt that fails `pp-review-v1` validation
309
+ (`invalid_json`, `schema`, `oversize`, `echo_mismatch`, `self_contradictory`,
310
+ `finding_overflow`, `unjustified_withhold`) or with a provider error the child
311
+ classified `transient` that is not a timeout is retried once per seat per
312
+ round, before later seats, only when its process-group exit is confirmed, its
313
+ operation result is durably recorded, the candidate is unchanged and nothing
314
+ stopped the run; budgets are re-checked first. The retry packet adds
315
+ `attempt: 2` and `retry_reason` (a code, never provider text) and has a new
316
+ digest, so echoing attempt 1 fails `echo_mismatch`. Each attempt records its
317
+ own operation, written before dispatch with `attempt`, `retry_reason` (on
318
+ attempt 2), `packet_digest`, and the dispatched packet saved as
319
+ `recipe-evidence/round-<i>/review-<operation id>.json` (`packet_file`,
320
+ `packet_sha256`); a second failure leaves the seat `failed` with that reason.
321
+ The retried dispatch's session log is its own `attempt:2` lane of the same
322
+ call (observability only; the call state still shows one attempt).
323
+ Timeouts, permanent provider errors, unconfirmed exits and engine-side
324
+ failures (output fidelity, artifact write) are not retried; writers never are.
325
+ - **Pause and decide.** After each review round the execution ends as an
326
+ ordinary terminal `succeeded` envelope with the recipe phase
327
+ `awaiting_decision`. `workflow_run_status` adds a `recipe` block
328
+ (`execution_id`, `revision`, `phase`, `pending_findings` (untrusted data),
329
+ `reviewers[{seat, outcome, reason?, score?}]`, `sign_off_threshold`,
330
+ `rounds_used`, `round_cap`, budgets, `deadline_expired` (read-time, only while
331
+ paused at or past `deadline_at`), `worktrees`, `unresolved_operations`,
332
+ `effects_stopped`, `outcome`, `stop_reason`). A paused run is terminal, so it
333
+ is never `orphaned`; `effects_stopped` appears only on a run cancelled or
334
+ failed without its own terminal record. The main agent calls
335
+ `workflow_recipe_decide {run_id, execution_id, revision,
336
+ decision:{admit[{id, rationale}], reject[{id, reason}], audit_requests[], stop}}`
337
+ with every pending id exactly once; with `stop:true` pending ids may be left
338
+ out (recorded unresolved, their bodies kept in `pending_findings`), but
339
+ unknown or duplicate ids are still rejected.
340
+ The wall deadline is checked before completeness: a decision at or after
341
+ `deadline_at`, complete or not, stops the run `deadline_exceeded`. Identical
342
+ retries replay the stored receipt; `stale_decision` returns the current
343
+ execution and revision; `recovery_required` is refused while operations are
344
+ unresolved. `run_busy` and a full admission cap
345
+ (`CLINKX_WORKFLOWS_MAX_CONCURRENT_ASYNC`, default 1, shared with every
346
+ workflow run) are retryable, and the cap also refuses a paused-run cancel
347
+ (`{status:"running", cancellable:false, reason:"run_busy", retryable:true}`).
348
+ `resume_workflow` never resumes a recipe run.
349
+ - **Transitions.** Admitted findings whose set of (severity, path, normalized
350
+ summary) equals the previous decision's → `no_progress` (checked at decide
351
+ time; line and detail do not count); a remediation
352
+ round that leaves the candidate identity unchanged → `no_progress` at the gate,
353
+ with that round's reviewer evidence recorded. Otherwise admitted findings with rounds left → remediation round;
354
+ no rounds left → `round_budget_exhausted` (admitting any finding in the final
355
+ round, even a nit, ends here); nothing admitted and every reviewer
356
+ signed off (approved and score ≥ threshold) → final verification → `qualified`
357
+ or `final_verification_failed`; a failed reviewer seat → `seat_unavailable`;
358
+ withheld sign-off → `no_sign_off`; `stop:true` → `main_agent_stop`.
359
+ - **Stops.** Closed enum: `main_agent_stop`, `round_budget_exhausted`,
360
+ `no_sign_off`, `seat_unavailable`, `no_progress`, `final_verification_failed`,
361
+ `acceptance_input_changed`, `target_changed_during_review`,
362
+ `recovery_required`, `permission_failure`, `deadline_exceeded`,
363
+ `active_budget_exhausted`, `evidence_capacity`, `cancelled`. Recipe outcome
364
+ (`qualified | stopped | failed | cancelled`) is separate from execution status.
365
+ - **Safety rules.** No seat advances while its process-group exit is
366
+ unconfirmed; an uncertain writer operation stops `recovery_required` and is
367
+ never redispatched. Any candidate identity change after the writer's exit
368
+ (by a reviewer or the verifier) voids that round's sign-offs. In-place
369
+ retries are a root-semaphore busy failure before spawn (typed marker, 3
370
+ attempts) and the one reviewer retry; a writer is never retried. A busy
371
+ verification slot is waited on (bounded) without consuming a round. When a
372
+ seat's leader exits, the runner sweeps its process group at once: anything
373
+ the seat left running in the group (a dev server, a watcher) gets SIGKILL
374
+ with no SIGTERM first. This is intended. A descendant that left the group
375
+ and holds no stdio pipe is not detected.
376
+ - **Delivery and retention.** The qualified worktree is delivered in place; it is
377
+ not merged into your checkout. Recipe runs use the failed-run retention TTL
378
+ (`CLINKX_WORKFLOWS_RETAIN_FAILED_DAYS`, default 30) for every terminal status;
379
+ it is also the effective decision TTL of a paused run, and the delivered
380
+ worktree is removed with the run directory, so copy or merge it before then.
381
+ Before pruning, and only when the sidecar records zero unresolved operations,
382
+ the host removes the seats listed in the sidecar's `worktrees` inventory that
383
+ verify against the sidecar's repository (a fresh `git rev-parse
384
+ --git-common-dir` of `baseline.repo_root`), one scoped `git worktree remove`
385
+ each. Anything else under the run's workspace directory is left alone and
386
+ reported as `remaining`, and the prune is vetoed while it exists; a sidecar
387
+ with unresolved operations, without a `worktrees` key, or without a usable
388
+ `repo_root` also vetoes. `cancel_workflow` keeps worktrees.
389
+ - **Cancel and terminal status.** The first committed terminal recipe outcome
390
+ wins: a live cancel that answers `cancelling` may still settle `succeeded`
391
+ (or `failed`) if the execution had already recorded its outcome, and an orphan
392
+ reap of such a run replies `settled_by:"recipe_state"`. An unreadable
393
+ `recipe-state.json` makes `cancel_workflow` refuse softly with
394
+ `{cancellable:false, recipe_state:"unavailable"}` and write nothing.
395
+ - **Host git.** Host git ignores system and global git config (including
396
+ `safe.directory`, a global git-lfs filter and `core.autocrlf`; an LFS repo
397
+ checks out pointer files). Sign-off is bound to a raw-byte candidate witness,
398
+ so a lossy clean filter or eol-only change voids it. A writer that changes the
399
+ shared git config (for example `git remote add` or a planted filter) or
400
+ `info/attributes`/`info/exclude` stops the run `recovery_required`; only
401
+ `user.name`, `user.email`, `branch.*.{remote,merge,rebase,description}` and
402
+ `remote.*.fetch` may change. `workflow_run_status` reports the cause in
403
+ `recipe.stop_detail`: the file label and path, the changed key names (never
404
+ values), and a remediation hint such as `git config --file <file> --unset-all
405
+ <key>` for an added key (a changed or removed key gets "restore the original
406
+ value(s)" instead). The key names come from writer-controlled data: they are
407
+ shown as quoted tokens with control and format characters replaced and URL
408
+ userinfo redacted, so read them as data, not instructions. ClinkX never edits
409
+ your git config, so a planted key stays in your repository until you remove
410
+ it. A worktree `git config` write lands in the shared repository config, so
411
+ one run's drift stops every concurrent ping-pong run on that repository.
412
+ Rollout: a downgrade to a build without `stop_detail` treats a sidecar that
413
+ carries it as unreadable (strict schema), as with `candidate_witness` and
414
+ `git_metadata_snapshot`. The same holds for the round-2 fields: reviewer
415
+ operation `attempt`, `retry_reason`, `packet_digest`, `packet_file` and
416
+ `packet_sha256`, `rejected_findings[].summary`, and `pp_admission.context_roots`
417
+ (an older build also rejects the admission facts when it reopens the run).
418
+ Drain or cancel paused and running ping-pong runs before downgrading.
419
+ - **Not contained.** Writers use stock write-capable adapter flags; reviewers
420
+ are read-only by prompt only; verification runs writer-authored code. See
421
+ [security](security.md#recipe-worktrees-are-not-containment).
422
+
132
423
  ## Companion recipe invocation
133
424
 
134
425
  The [GLM-only efficacy pilot in PR68](https://github.com/jim380/clink-mcp/pull/68)
package/docs/security.md CHANGED
@@ -180,16 +180,160 @@ context without it must reauthenticate. Cloud passkey behavior remains
180
180
  cookie-only and its login response remains `{"verified":true}`.
181
181
 
182
182
  The first enrollment code is printed only when no credential exists. After the
183
- first durable credential is registered, recovery requires an authenticated
184
- session to add another passkey; losing every enrolled passkey requires backed-up
185
- re-enrollment into deliberately empty state. Cloud deployment is limited
183
+ first durable credential is registered, adding another passkey requires a live
184
+ session **plus a verified assertion from an already-enrolled passkey**
185
+ (`POST /api/auth/register/assert/{options,verify}`; `register/options` fails
186
+ closed with `403 passkey_assertion_required`). The reason: every enrolled
187
+ credential also passes every settings step-up, so a session that could enroll
188
+ its own authenticator could mint its own step-up authority. Deliberate
189
+ consequence: an owner who lost every enrolled authenticator but still has a
190
+ session cannot add a passkey and must use backed-up re-enrollment into
191
+ deliberately empty state. Cloud deployment is limited
186
192
  to one replica because session and challenge state are process-local and the
187
- credential writer is single-owner. Credential state belongs on a narrow
188
- independent read-write volume; operator progress-report status pins belong on
189
- a second independent read-write volume. All other dashboard input mounts remain
193
+ credential writer is single-owner. The dashboard deployment has exactly three
194
+ writable surfaces, each narrow and purpose-built: passkey credential state on an
195
+ independent read-write volume (`/data/dashboard-credentials`); operator
196
+ progress-report status pins and the prompt-builder library on a second
197
+ read-write volume (`/data/dashboard-overrides`); and — since the Settings page
198
+ (owner decision 2026-11-03, `.ai/plans/dashboard-settings/DECISIONS.md` #1) —
199
+ the settings directory, mounted as a read-write **host bind** at
200
+ `/data/settings` rather than a named volume, so host-side producers and
201
+ `clinkx settings …` see the same documents (`create_host_path: false`: run
202
+ `clinkx settings init` first; on Linux a host/container UID mismatch surfaces
203
+ as 503 `settings_unavailable` on save). All other dashboard input mounts remain
190
204
  read-only. Deployment preflight classifies strict-v1 absent/zero/nonzero state
191
205
  only; store open remains the sole RP-ID authority.
192
206
 
207
+ ### Dashboard settings authority
208
+
209
+ The dashboard Settings page **writes an execution input by design** (owner
210
+ decision 2026-11-03): every ClinkX server process reads the same
211
+ `~/.config/clinkx/settings/settings.json` at startup (env override
212
+ `CLINKX_SETTINGS_DIR`; `CLINKX_SETTINGS=off` disables loading entirely). This
213
+ deliberately reverses the earlier "the dashboard writes nothing any execution
214
+ path reads" rule for this one surface; adapters, rosters, and the two
215
+ dashboard-private sidecars keep their old constraints. Five routes exist:
216
+ `GET /api/settings`, `GET /api/settings/processes`, and the three POSTs
217
+ `/api/settings/save`, `/api/settings/secrets/save`, `/api/settings/step-up`.
218
+
219
+ **Auth matrix (OQ-7).** Tuning, retention, feature-gate, and reader-first keys
220
+ save with a normal session and are allowed in passkey, bearer, and none auth
221
+ modes (POST Origin enforcement stays with the server factory). Any op touching
222
+ a **policy** or **secret** key requires a *fresh passkey step-up*: the class of
223
+ change is computed **server-side from the registry** (`opsTouchElevatedClass`),
224
+ so the client cannot downgrade a policy save to tuning. **Every `recover` save
225
+ requires a step-up regardless of its ops** — recovering an unreadable document
226
+ is always elevated, and the intent digest additionally binds the
227
+ recovery fact (`recover:true` plus the `expectedDigest` sha256 of the corrupt
228
+ bytes), so a recovery ceremony cannot be replayed against an ordinary save (or
229
+ vice versa). The ceremony binds the assertion to the save it authorizes: the
230
+ server computes an intent digest (sha256 over the secret-free projection
231
+ `{target, expected_revision, recover?, expected_digest?, ops:[{key, action,
232
+ value-if-not-secret}]}` — secret values never enter the digest), mints a
233
+ challenge bound to `{sessionId, intentDigest}` with a **120 s TTL**, and the
234
+ save request must carry `{challengeId, assertion}`; verification recomputes the
235
+ digest from *this* request, checks the session binding, requires
236
+ `userVerification:"required"`, and **consumes the challenge once** with the
237
+ write attempt. Step-up challenges live in a dedicated store, purpose-checked on
238
+ consume: a login challenge can never satisfy a step-up (or vice versa), and a
239
+ step-up never mints a session. Bearer and none modes have no session to bind a
240
+ challenge to, so policy/secret intents — including step-up option requests and
241
+ recover — fail 403 `step_up_unavailable` there; the UI then shows the
242
+ `clinkx settings recover --digest <sha256>` CLI command instead. A passkey
243
+ deployment with no enrolled credential fails the same way.
244
+
245
+ **Audit log.** Every save (all classes) appends a **pending** line to
246
+ `audit.jsonl` *before* anything is published and an outcome line after
247
+ (0600, `O_APPEND|O_CREAT|O_NOFOLLOW`, fsynced per line, ≤4 KiB per line with a
248
+ `keysOmitted` marker when truncated, rotated once at 1 MiB). A failed pending
249
+ append is a clean 503 with **nothing published**; a failed outcome append —
250
+ the bytes are already live — surfaces as `settings_published_uncertain` (HTTP
251
+ 500, the landed revision in the body), never a clean rejection. A line carries
252
+ `{schema_version, at, actor, auth, keys, classes, action, revisionBefore,
253
+ revisionAfter, digestAfter, outcome}` — **key names, classes, revisions, and a
254
+ document digest, never values**. `digestAfter` (sha256 of the settings bytes) is
255
+ omitted for secrets saves: hashing the secrets document would hash secret
256
+ material into the log.
257
+
258
+ **Secrets.** Secret-class keys (v1: `CLINKX_ELARIS_API_KEY`) live only in a
259
+ separate `secrets.json`, mode `0600`, with its own revision under the same
260
+ lock. The browser sees write-only state: set/unset plus `updated_at`, never the
261
+ value; values are never returned, logged, hashed into DTOs, or audited. A
262
+ secrets file whose mode allows group/other access is refused — reads treat it
263
+ as unset with a warning and the next save rewrites it 0600. A secret-class key
264
+ inside the (0644, world-readable) `settings.json` is dropped loudly: it never
265
+ applies from the shared document, is never re-serialized by a save, and is
266
+ **filtered out of `GET /api/settings` `values` by the response schema** — a
267
+ secret can never round-trip through the read path.
268
+
269
+ **What the step-up does not protect.** Filesystem-write parity: anything that
270
+ can write `$HOME` (any process running as the user, any editor, any
271
+ unsandboxed CLI the user runs) can edit or replace the settings documents
272
+ directly. The passkey ceremony protects only the *dashboard write path*; it is
273
+ an authority control on the UI, not a filesystem boundary. Symmetrically,
274
+ `settings.json` is 0644 by design (the dashboard container reads it as another
275
+ user), so non-secret settings are not confidential. External edits are
276
+ *detected*, not prevented: the store's `read()` compares the sha256 of the
277
+ current bytes against the last audited `digestAfter` and reports the mismatch
278
+ as `externalEdit` (the audit log is the oracle; the dashboard GET wire does not
279
+ yet project the flag).
280
+
281
+ **Hosted path.** The hosted topology (gateway → tunnel → companion) forwards
282
+ exactly three settings POST literals — `/api/settings/save`,
283
+ `/api/settings/secrets/save`, `/api/settings/step-up` — with byte tiers
284
+ matching the dashboard's own route caps: 64 KiB for saves (a WebAuthn assertion
285
+ plus at most 64 ops) and 16 KiB for step-up options (intent projection only,
286
+ never secret values). The literals are pinned locally in
287
+ `src/dashboard-companion/protocol.ts` and `src/dashboard-gateway/tunnel-http.ts`
288
+ (closed transport graphs) and pinned against the settings contract by tests.
289
+
290
+ **WebMCP.** Settings are never exposed through WebMCP tools: the only
291
+ settings-related surface is the `clinkx_open_view` navigation `{kind:"settings"}`,
292
+ which carries no settings data; no WebMCP tool reads or writes settings.
293
+
294
+ **Failure behavior.** A settings-origin fault never prevents startup. A whole
295
+ document that is unreadable (corrupt JSON, bad shape, unsupported
296
+ `schema_version`, over the 256 KiB cap, symlink, or non-regular) is treated as
297
+ **absent** with loud warnings — no fills at all, and the per-process heartbeat
298
+ reports the unreadable state so the dashboard shows a banner (the shipped
299
+ defaults are not uniformly the safest choice; see `docs/configuration.md`
300
+ "Unreadable files"). A routine save refuses to overwrite it; recovery is an
301
+ explicit `recover` save — always step-up-gated, bound to the digest of the
302
+ corrupt bytes — which **copies** them to `settings.json.corrupt-<epochms>-<rand>`
303
+ through the durable writer and atomically replaces the active path (it never
304
+ renames the active path, and never deletes). A per-key *invalid* value follows
305
+ the registry policy: tuning keys are
306
+ not filled (the consumer default applies) with a warning; policy keys are filled
307
+ with their most-restrictive value (e.g. `CLINKX_CONTEXT_ALLOW_SECRETS` →
308
+ `false`, `CLINKX_MAX_AGENT_DEPTH` → `1`); `CLINKX_ALLOWED_ROOTS` is never filled
309
+ from an invalid file value (the no-config `cwd()` default applies, loudly).
310
+ Unknown keys warn and are ignored, so mixed code versions can share one file —
311
+ and a save persists unknown and untouched invalid entries verbatim.
312
+ Apply is **restart-only**: each server heartbeats its loaded settings revision,
313
+ secrets revision, and provenance to `<settingsDir>/processes/` (the process id
314
+ is the boot nonce, so restarts never alias), and the dashboard's processes view
315
+ lists which servers run the current revision, which are stale, and which keys
316
+ take their value from env (names only, even with no file value); a row that
317
+ fails validation is skipped with a warning and never fails the whole response.
318
+ See `docs/configuration.md` ("Settings file") and the Settings ADR in
319
+ `docs/architecture.md`.
320
+
321
+ **Writer exclusion.** The dashboard and the CLI share one cross-process lock
322
+ over the settings directory. A lock held from **another host, or one recording
323
+ no hostname at all, is never reclaimed automatically** — no staleness
324
+ heuristic can distinguish a dead foreign holder from a suspended one, so the
325
+ acquire deadline expires and the error names the `.lock` path, the recorded
326
+ host/pid, and the manual step ("confirm no writer runs on `<host>`, then
327
+ `rm '<lockPath>'`"); on the dashboard this surfaces as the wire error
328
+ `settings_locked` (HTTP 409) — a known nothing-published outcome, distinct
329
+ from the `settings_conflict` revision-CAS rejection. The lock body is published
330
+ atomically (`O_EXCL` temp +
331
+ `link`), so a partial or empty `.lock` can never exist to wedge every future
332
+ save. Only a same-host dead PID is reclaimed, serialized behind a second
333
+ `O_EXCL` `.lock.steal` file with the body re-observed under it before any
334
+ unlink. The same core (in `clinkx-workflows/src/settings/lock.ts`) backs the
335
+ progress-report session lock; the two surfaces cannot drift.
336
+
193
337
  Bearer mode remains a transitional rollback path until both a real local
194
338
  platform-passkey ceremony and a live same-origin Traefik ceremony have passed.
195
339
  The authenticated dashboard response path must not log enrollment codes,
@@ -224,6 +368,90 @@ The subprocess shares the user's filesystem. The run directory is a convenience
224
368
 
225
369
  `context_builder` artifacts are also not a security boundary. They are durable files intended to be attached to later `clink` calls. Treat `manifest.json`, `bundle.md`, and candidate artifacts as local working artifacts with manual retention and cleanup expectations.
226
370
 
371
+ ### Recipe worktrees are not containment
372
+
373
+ The `ping-pong` recipe runs writer seats in host-owned git worktrees under
374
+ `${CLINKX_HOME}/workspaces/<run_id>/<seat>`. Worktrees separate directories, not
375
+ privileges:
376
+
377
+ - Every recipe seat uses its stock adapter flags (`--dangerously-bypass-approvals-and-sandbox`,
378
+ `--permission-mode acceptEdits`, `--dangerously-skip-permissions`, `--always-approve`).
379
+ A writer can change anything the host user can change, including peer
380
+ worktrees and the source repository. Reviewer and judge seats are read-only by
381
+ prompt only. `architecture-arena` authors and judge run in the server's
382
+ `process.cwd()` with the same flags.
383
+ - Host verification (`verification_run` machinery) runs writer-authored code on
384
+ the host. Copy-preparation manifests are not sandboxed. Check cleanup routes
385
+ every group probe and signal through the same retiring process-group handle
386
+ as the runner: SIGKILL only for a group a probe saw alive, never past EPERM,
387
+ and a PGID is never addressed again after ESRCH.
388
+ - Recipe admission requires an unmarked `CLINKX_ALLOWED_ROOTS` entry covering
389
+ `${CLINKX_HOME}/workspaces`; that grant also makes the directory an eligible
390
+ `context_builder` source root when a call names it. Ping-pong context
391
+ preflight reads the implementer worktree at the baseline commit (roots and
392
+ absolute focus paths rebased at admission, anything outside the repository
393
+ rejected), not the live checkout. Because admission canonicalizes against the
394
+ live checkout but the worktree holds the baseline tree, a root or focus path
395
+ that is (or sits below) a symlink in the baseline is rejected, relative
396
+ focus paths must exist in the baseline under a root, and the start fails
397
+ before the ack if any rebased anchor canonicalizes outside the worktree.
398
+ Preflight skips the workflow context cache, so it
399
+ never runs the cache's workspace-signature git, which is not isolated
400
+ (`git diff --binary` with inherited environment and config).
401
+ - The host performs every git operation with hardened argv (`core.hooksPath=/dev/null`,
402
+ `core.fsmonitor=false`, `core.attributesFile=/dev/null`, forced
403
+ `core.filemode`/`core.symlinks` for identity) and an isolated environment
404
+ (`GIT_CONFIG_NOSYSTEM=1`, `GIT_CONFIG_GLOBAL=/dev/null`, `GIT_ATTR_NOSYSTEM=1`;
405
+ `GIT_CONFIG_PARAMETERS`/`GIT_CONFIG_COUNT`/`GIT_CONFIG_SYSTEM` dropped), so
406
+ only the repository's own config applies; global-only settings such as
407
+ `safe.directory`, a global git-lfs filter or `core.autocrlf` no longer affect
408
+ host git. It re-binds the directory chain from `$CLINKX_HOME` down around every
409
+ git call, and never runs a repository-wide `git worktree prune`. A same-user
410
+ process can still race the final re-check and git's own path resolution inside
411
+ one call.
412
+ - A writer can still reach the shared repository metadata. The host snapshots
413
+ shared config, `config.worktree` and `info/attributes`/`info/exclude` digests
414
+ at worktree creation (persisted in the sidecar) and rechecks them before every
415
+ later host git spawn, and the git dir and common dir that git resolves for the
416
+ seat must still be the snapshotted ones (a re-pointed `.git` link drifts); a
417
+ change outside `user.name`, `user.email`,
418
+ `branch.*.{remote,merge,rebase,description}` and `remote.*.fetch` (for example
419
+ a planted clean filter or `git remote add`) stops the run `recovery_required`
420
+ before host git runs it, naming the file and keys but never values. The
421
+ sidecar and `workflow_run_status` carry that cause as a bounded
422
+ `recipe.stop_detail` (at most 600 characters) with a remediation hint. ClinkX
423
+ never edits or reverts the user's git metadata, because it cannot tell a
424
+ writer-planted key from one the user added: a planted key persists in the
425
+ repository until the user removes it. Worktree `git config` writes go to the
426
+ shared repository config, so drift from one run stops every concurrent
427
+ ping-pong run on the same repository. Not covered: a file reached through
428
+ `include.path`, or a change landing between the recheck and git's own read.
429
+ - Reviewer sign-off binds to a raw-byte candidate witness (mode, path, raw bytes
430
+ or symlink target over the throwaway-index path list), not only the git tree
431
+ id, so a lossy clean filter or eol-only change cannot carry a stale sign-off
432
+ forward.
433
+ - Cleanup removes only sidecar-inventoried seats that verify against the
434
+ sidecar's repository; foreign or unverified entries under the run's workspace
435
+ directory are preserved and veto the prune.
436
+ - The recipe cwd is accepted only for a real linked worktree seat (gitfile,
437
+ admin back-pointer and commondir checks) and is not reachable from the public
438
+ `clink` schema. Binding a seat to its run is the recipe runtime's job.
439
+ - Runner exit confirmation (`recipeExitConfirm`) sweeps the child's process
440
+ group on leader exit and, unless exit is already confirmed, after `close`, sending SIGKILL only after a
441
+ `kill(-pid, 0)` probe shows the group alive. Only ESRCH confirms exit; EPERM
442
+ never does. After any ESRCH the group handle is retired and its (reusable)
443
+ PGID is never probed or signalled again, for recipe and non-recipe children
444
+ alike. An unconfirmed recipe call settles after a bounded deadline with
445
+ `exited:false` and stays registered for shutdown. Host `runGit` runs detached
446
+ in its own process group, is swept at shutdown, and refuses to spawn after the
447
+ shutdown latch. A recipe child that emits `'error'` after spawn stays
448
+ registered until a sweep confirms its exit. Descendants that leave the process
449
+ group (`setsid`, daemonizing) are not covered unless they still hold a stdio
450
+ pipe: one that also closes its stdio is reported `exited:true` while alive
451
+ (a residual pinned by `tests/runner.test.ts`). On Linux, a group left
452
+ with only unreaped zombies (non-reaping PID 1 in a container) reports
453
+ "unconfirmed", and the recipe stops with `recovery_required`.
454
+
227
455
  ### Delegate mode is not a sandbox
228
456
 
229
457
  When `context_builder` runs with `delegate.enabled:true`, curator and finalizer
@@ -8,7 +8,10 @@ dependencies are required. Install Node 24 or newer, ClinkX, and whatever your
8
8
  own check commands require on the MCP server's host.
9
9
 
10
10
  Project execution v1 supports macOS and Linux/POSIX hosts because cleanup owns
11
- POSIX process groups. A Windows run returns a prerequisite error. Provider
11
+ POSIX process groups: each check's group gets SIGTERM, then SIGKILL only if a
12
+ probe still sees it alive. Only ESRCH confirms cleanup; EPERM reports
13
+ `cleanup_failure`, and a group seen gone is never signalled again. A Windows
14
+ run returns a prerequisite error. Provider
12
15
  readiness is a separate tool, [`provider_doctor`](../configuration.md#provider-readiness-doctor).
13
16
 
14
17
  ## Configure project and evidence access
@@ -139,7 +142,10 @@ checks identities and digests, and recomputes coverage without trusting a cached
139
142
  success summary. Missing, changed, extra, or conflicting evidence cannot establish
140
143
  a complete result. Keep the same installed verifier version and project input
141
144
  bytes available when you intend to inspect the original run; changes make the
142
- original evidence inapplicable. Run a new attempt to qualify a new state.
145
+ original evidence inapplicable. The verifier identity digests its installed
146
+ runtime files (including the process-group cleanup module), so an upgrade that
147
+ changes any of them also makes older evidence inapplicable. Run a new attempt
148
+ to qualify a new state.
143
149
 
144
150
  The runner rehashes declared inputs before and after execution. A command may
145
151
  write outputs not listed as inputs, but changing a declared input makes the run
@@ -251,6 +257,22 @@ verification coverage, and owner acceptance remain independent; acceptance is
251
257
  not recorded by this tool.
252
258
 
253
259
 
260
+ ## Recipe worktree verification
261
+
262
+ The `ping-pong` recipe reuses this verification service on its host-owned
263
+ worktree (see [engineering recipes](../engineering-recipes.md#built-in-native-code-ping-pong)).
264
+ The acceptance manifest, optional copy-preparation manifest and declared
265
+ acceptance inputs must be regular files in the pinned baseline commit; their
266
+ digests are pinned by the controller and re-compared immediately before every
267
+ verification attempt and after it. A mismatch stops the run
268
+ (`acceptance_input_changed`). Evidence is kept under
269
+ `<runDir>/recipe-evidence/` (outside the worktree), one operation per
270
+ verification sequence. The evidence directory must be absolute, and the host
271
+ rejects it before creating anything when its canonical path is inside the
272
+ worktree or contains it. A check whose process-group cleanup is unconfirmed
273
+ reports `failed`, never `passed`, and stops the run `recovery_required`. The recipe shares the single verification slot with
274
+ `verification_run` and verified-repair and waits for it with a bounded policy.
275
+
254
276
  ## Native verified repair
255
277
 
256
278
  The installed `verified-repair` workflow combines scoped replacements with these
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clinkx",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "ClinkX MCP STDIO server \u2014 CLI-to-CLI bridge tool",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=24.0.0"
8
8
  },
9
- "main": "dist/index.js",
9
+ "main": "dist/lib.js",
10
10
  "bin": {
11
11
  "clinkx": "dist/index.js",
12
12
  "clinkx-workflows-dashboard": "dist/dashboard-cli.js"
@@ -48,6 +48,8 @@
48
48
  "test:dashboard:e2e:synthetic": "playwright test --config clinkx-workflows/dashboard-ui/playwright.config.ts",
49
49
  "test:dashboard:e2e:real-disk": "playwright test --config clinkx-workflows/dashboard-ui/playwright.real-disk.config.ts",
50
50
  "test:dashboard:e2e:dual-origin": "playwright test --config clinkx-workflows/dashboard-ui/playwright.dual-origin.config.ts",
51
+ "test:dashboard:e2e:multitenant": "playwright test --config clinkx-workflows/dashboard-ui/playwright.multitenant.config.ts",
52
+ "test:dashboard:e2e:webmcp-hosted-native": "playwright test --config clinkx-workflows/dashboard-ui/playwright.webmcp-hosted.config.ts",
51
53
  "bench:light-caller": "node scripts/benchmark/light-caller/run.mjs",
52
54
  "prepublishOnly": "node -e \"const root=require('./package.json').dependencies;const sub=require('./clinkx-workflows/package.json').dependencies;const missing=Object.keys(sub).filter(d=>!root[d]);if(missing.length){console.error('Missing from root deps:',missing);process.exit(1);}\""
53
55
  },
@@ -78,9 +80,11 @@
78
80
  "@vitejs/plugin-react": "^5.2.0",
79
81
  "esbuild": "0.27.3",
80
82
  "jsdom": "^25.0.1",
83
+ "openid-client": "^6.8.8",
81
84
  "postject": "1.0.0-alpha.6",
82
85
  "react": "^19.2.7",
83
86
  "react-dom": "^19.2.7",
87
+ "stripe": "22.6.2",
84
88
  "typescript": "^5.7.0",
85
89
  "vite": "^7.3.6",
86
90
  "vitest": "^3.0.0"