clinkx 1.2.0 → 1.3.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 (270) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +4 -2
  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/clink-client.d.ts +8 -2
  26. package/clinkx-workflows/dist/clink-client.js +4 -2
  27. package/clinkx-workflows/dist/clink-client.js.map +1 -1
  28. package/clinkx-workflows/dist/context-preflight.d.ts +6 -0
  29. package/clinkx-workflows/dist/context-preflight.js.map +1 -1
  30. package/clinkx-workflows/dist/council-execution-policy.d.ts +3 -1
  31. package/clinkx-workflows/dist/council-execution-policy.js +4 -0
  32. package/clinkx-workflows/dist/council-execution-policy.js.map +1 -1
  33. package/clinkx-workflows/dist/dashboard/contracts.d.ts +586 -586
  34. package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +28 -28
  35. package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +32 -32
  36. package/clinkx-workflows/dist/dashboard-ui/assets/index-DRId2DVA.js +119 -0
  37. package/clinkx-workflows/dist/dashboard-ui/assets/style-CHAw57y5.css +1 -0
  38. package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
  39. package/clinkx-workflows/dist/delegate-signature.d.ts +4 -3
  40. package/clinkx-workflows/dist/delegate-signature.js +4 -3
  41. package/clinkx-workflows/dist/delegate-signature.js.map +1 -1
  42. package/clinkx-workflows/dist/durable-file.d.ts +69 -0
  43. package/clinkx-workflows/dist/durable-file.js +145 -0
  44. package/clinkx-workflows/dist/durable-file.js.map +1 -0
  45. package/clinkx-workflows/dist/engine.d.ts +42 -7
  46. package/clinkx-workflows/dist/engine.js +196 -24
  47. package/clinkx-workflows/dist/engine.js.map +1 -1
  48. package/clinkx-workflows/dist/ping-pong/admission.d.ts +127 -0
  49. package/clinkx-workflows/dist/ping-pong/admission.js +522 -0
  50. package/clinkx-workflows/dist/ping-pong/admission.js.map +1 -0
  51. package/clinkx-workflows/dist/ping-pong/contract.d.ts +2539 -0
  52. package/clinkx-workflows/dist/ping-pong/contract.js +819 -0
  53. package/clinkx-workflows/dist/ping-pong/contract.js.map +1 -0
  54. package/clinkx-workflows/dist/ping-pong/control.d.ts +67 -0
  55. package/clinkx-workflows/dist/ping-pong/control.js +12 -0
  56. package/clinkx-workflows/dist/ping-pong/control.js.map +1 -0
  57. package/clinkx-workflows/dist/ping-pong/runtime-handle.d.ts +24 -0
  58. package/clinkx-workflows/dist/ping-pong/runtime-handle.js +55 -0
  59. package/clinkx-workflows/dist/ping-pong/runtime-handle.js.map +1 -0
  60. package/clinkx-workflows/dist/ping-pong/runtime.d.ts +235 -0
  61. package/clinkx-workflows/dist/ping-pong/runtime.js +1183 -0
  62. package/clinkx-workflows/dist/ping-pong/runtime.js.map +1 -0
  63. package/clinkx-workflows/dist/ping-pong/settle.d.ts +57 -0
  64. package/clinkx-workflows/dist/ping-pong/settle.js +58 -0
  65. package/clinkx-workflows/dist/ping-pong/settle.js.map +1 -0
  66. package/clinkx-workflows/dist/ping-pong/sidecar.d.ts +65 -0
  67. package/clinkx-workflows/dist/ping-pong/sidecar.js +138 -0
  68. package/clinkx-workflows/dist/ping-pong/sidecar.js.map +1 -0
  69. package/clinkx-workflows/dist/plan-review/publication.d.ts +2 -1
  70. package/clinkx-workflows/dist/plan-review/publication.js +5 -6
  71. package/clinkx-workflows/dist/plan-review/publication.js.map +1 -1
  72. package/clinkx-workflows/dist/plan-review/snapshot.d.ts +3 -2
  73. package/clinkx-workflows/dist/plan-review/snapshot.js +8 -8
  74. package/clinkx-workflows/dist/plan-review/snapshot.js.map +1 -1
  75. package/clinkx-workflows/dist/recipe-host.d.ts +315 -0
  76. package/clinkx-workflows/dist/recipe-host.js +183 -0
  77. package/clinkx-workflows/dist/recipe-host.js.map +1 -0
  78. package/clinkx-workflows/dist/recipe-seats.d.ts +96 -0
  79. package/clinkx-workflows/dist/recipe-seats.js +163 -0
  80. package/clinkx-workflows/dist/recipe-seats.js.map +1 -0
  81. package/clinkx-workflows/dist/recipe-shared/evidence.d.ts +67 -0
  82. package/clinkx-workflows/dist/recipe-shared/evidence.js +111 -0
  83. package/clinkx-workflows/dist/recipe-shared/evidence.js.map +1 -0
  84. package/clinkx-workflows/dist/reducers/index.d.ts +9 -1
  85. package/clinkx-workflows/dist/reducers/index.js +30 -0
  86. package/clinkx-workflows/dist/reducers/index.js.map +1 -1
  87. package/clinkx-workflows/dist/run-lock-reclaim.d.ts +44 -0
  88. package/clinkx-workflows/dist/run-lock-reclaim.js +86 -0
  89. package/clinkx-workflows/dist/run-lock-reclaim.js.map +1 -0
  90. package/clinkx-workflows/dist/state-schema.d.ts +11 -0
  91. package/clinkx-workflows/dist/state-schema.js +4 -1
  92. package/clinkx-workflows/dist/state-schema.js.map +1 -1
  93. package/clinkx-workflows/dist/state.d.ts +178 -3
  94. package/clinkx-workflows/dist/state.js +618 -83
  95. package/clinkx-workflows/dist/state.js.map +1 -1
  96. package/clinkx-workflows/dist/transport.d.ts +2 -1
  97. package/clinkx-workflows/dist/transport.js +5 -0
  98. package/clinkx-workflows/dist/transport.js.map +1 -1
  99. package/clinkx-workflows/dist/validators/architecture-arena.d.ts +6 -0
  100. package/clinkx-workflows/dist/validators/architecture-arena.js +16 -0
  101. package/clinkx-workflows/dist/validators/architecture-arena.js.map +1 -0
  102. package/clinkx-workflows/dist/validators/index.js +4 -0
  103. package/clinkx-workflows/dist/validators/index.js.map +1 -1
  104. package/clinkx-workflows/dist/validators/ping-pong.d.ts +6 -0
  105. package/clinkx-workflows/dist/validators/ping-pong.js +10 -0
  106. package/clinkx-workflows/dist/validators/ping-pong.js.map +1 -0
  107. package/clinkx-workflows/dist/workflow-tools.d.ts +51 -5
  108. package/clinkx-workflows/dist/workflow-tools.js +785 -34
  109. package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
  110. package/clinkx-workflows/dist/workflow-verification-contract.d.ts +4 -4
  111. package/clinkx-workflows/templates/architecture-arena/candidate.txt +39 -0
  112. package/clinkx-workflows/templates/architecture-arena/judge.txt +34 -0
  113. package/clinkx-workflows/templates/ping-pong/implement.txt +14 -0
  114. package/clinkx-workflows/templates/ping-pong/remediate.txt +14 -0
  115. package/clinkx-workflows/templates/ping-pong/review.txt +27 -0
  116. package/clinkx-workflows/workflows/architecture-arena.yaml +127 -0
  117. package/clinkx-workflows/workflows/ping-pong.yaml +158 -0
  118. package/dist/context-builder/bundle.js +4 -3
  119. package/dist/context-builder/bundle.js.map +1 -1
  120. package/dist/context-builder/delegate-packet.d.ts +1 -0
  121. package/dist/context-builder/delegate-packet.js +66 -7
  122. package/dist/context-builder/delegate-packet.js.map +1 -1
  123. package/dist/context-builder/delegate-validation.d.ts +12 -3
  124. package/dist/context-builder/delegate-validation.js +23 -13
  125. package/dist/context-builder/delegate-validation.js.map +1 -1
  126. package/dist/context-builder/external-gaps.d.ts +14 -3
  127. package/dist/context-builder/external-gaps.js +124 -18
  128. package/dist/context-builder/external-gaps.js.map +1 -1
  129. package/dist/context-builder/handler.js +108 -191
  130. package/dist/context-builder/handler.js.map +1 -1
  131. package/dist/context-builder/review-coverage.js +27 -1
  132. package/dist/context-builder/review-coverage.js.map +1 -1
  133. package/dist/context-builder/secrets.js +1 -1
  134. package/dist/context-builder/secrets.js.map +1 -1
  135. package/dist/context-builder/versions.d.ts +10 -4
  136. package/dist/context-builder/versions.js +10 -4
  137. package/dist/context-builder/versions.js.map +1 -1
  138. package/dist/context-builder/workflow-runner.js +33 -24
  139. package/dist/context-builder/workflow-runner.js.map +1 -1
  140. package/dist/dashboard-cli.d.ts +2 -0
  141. package/dist/dashboard-cli.js +147 -57
  142. package/dist/dashboard-cli.js.map +1 -1
  143. package/dist/dashboard-companion/client.d.ts +10 -0
  144. package/dist/dashboard-companion/client.js +43 -1
  145. package/dist/dashboard-companion/client.js.map +1 -1
  146. package/dist/dashboard-companion/config.d.ts +19 -1
  147. package/dist/dashboard-companion/config.js +104 -3
  148. package/dist/dashboard-companion/config.js.map +1 -1
  149. package/dist/dashboard-companion/protocol.d.ts +16 -0
  150. package/dist/dashboard-companion/protocol.js +38 -1
  151. package/dist/dashboard-companion/protocol.js.map +1 -1
  152. package/dist/dashboard-companion/workstation-binding.d.ts +69 -0
  153. package/dist/dashboard-companion/workstation-binding.js +192 -0
  154. package/dist/dashboard-companion/workstation-binding.js.map +1 -0
  155. package/dist/dashboard-gateway/admin-cli.d.ts +10 -0
  156. package/dist/dashboard-gateway/admin-cli.js +266 -0
  157. package/dist/dashboard-gateway/admin-cli.js.map +1 -0
  158. package/dist/dashboard-gateway/config.d.ts +50 -0
  159. package/dist/dashboard-gateway/config.js +235 -1
  160. package/dist/dashboard-gateway/config.js.map +1 -1
  161. package/dist/dashboard-gateway/connection-registry.d.ts +100 -0
  162. package/dist/dashboard-gateway/connection-registry.js +228 -0
  163. package/dist/dashboard-gateway/connection-registry.js.map +1 -0
  164. package/dist/dashboard-gateway/control-plane/account-auth.d.ts +78 -0
  165. package/dist/dashboard-gateway/control-plane/account-auth.js +198 -0
  166. package/dist/dashboard-gateway/control-plane/account-auth.js.map +1 -0
  167. package/dist/dashboard-gateway/control-plane/billing.d.ts +264 -0
  168. package/dist/dashboard-gateway/control-plane/billing.js +787 -0
  169. package/dist/dashboard-gateway/control-plane/billing.js.map +1 -0
  170. package/dist/dashboard-gateway/control-plane/contracts.d.ts +1293 -0
  171. package/dist/dashboard-gateway/control-plane/contracts.js +280 -0
  172. package/dist/dashboard-gateway/control-plane/contracts.js.map +1 -0
  173. package/dist/dashboard-gateway/control-plane/cookies.d.ts +13 -0
  174. package/dist/dashboard-gateway/control-plane/cookies.js +46 -0
  175. package/dist/dashboard-gateway/control-plane/cookies.js.map +1 -0
  176. package/dist/dashboard-gateway/control-plane/credentials.d.ts +63 -0
  177. package/dist/dashboard-gateway/control-plane/credentials.js +66 -0
  178. package/dist/dashboard-gateway/control-plane/credentials.js.map +1 -0
  179. package/dist/dashboard-gateway/control-plane/entitlements.d.ts +118 -0
  180. package/dist/dashboard-gateway/control-plane/entitlements.js +329 -0
  181. package/dist/dashboard-gateway/control-plane/entitlements.js.map +1 -0
  182. package/dist/dashboard-gateway/control-plane/errors.d.ts +17 -0
  183. package/dist/dashboard-gateway/control-plane/errors.js +23 -0
  184. package/dist/dashboard-gateway/control-plane/errors.js.map +1 -0
  185. package/dist/dashboard-gateway/control-plane/hosts.d.ts +6 -0
  186. package/dist/dashboard-gateway/control-plane/hosts.js +16 -0
  187. package/dist/dashboard-gateway/control-plane/hosts.js.map +1 -0
  188. package/dist/dashboard-gateway/control-plane/http.d.ts +34 -0
  189. package/dist/dashboard-gateway/control-plane/http.js +331 -0
  190. package/dist/dashboard-gateway/control-plane/http.js.map +1 -0
  191. package/dist/dashboard-gateway/control-plane/schema.d.ts +9 -0
  192. package/dist/dashboard-gateway/control-plane/schema.js +247 -0
  193. package/dist/dashboard-gateway/control-plane/schema.js.map +1 -0
  194. package/dist/dashboard-gateway/control-plane/secrets.d.ts +20 -0
  195. package/dist/dashboard-gateway/control-plane/secrets.js +39 -0
  196. package/dist/dashboard-gateway/control-plane/secrets.js.map +1 -0
  197. package/dist/dashboard-gateway/control-plane/store.d.ts +579 -0
  198. package/dist/dashboard-gateway/control-plane/store.js +1115 -0
  199. package/dist/dashboard-gateway/control-plane/store.js.map +1 -0
  200. package/dist/dashboard-gateway/cookie-boundary.d.ts +60 -0
  201. package/dist/dashboard-gateway/cookie-boundary.js +205 -0
  202. package/dist/dashboard-gateway/cookie-boundary.js.map +1 -0
  203. package/dist/dashboard-gateway/index.js +271 -494
  204. package/dist/dashboard-gateway/index.js.map +1 -1
  205. package/dist/dashboard-gateway/main.js +7 -2
  206. package/dist/dashboard-gateway/main.js.map +1 -1
  207. package/dist/dashboard-gateway/routing.d.ts +43 -0
  208. package/dist/dashboard-gateway/routing.js +65 -0
  209. package/dist/dashboard-gateway/routing.js.map +1 -0
  210. package/dist/dashboard-gateway/tenant-gateway.d.ts +56 -0
  211. package/dist/dashboard-gateway/tenant-gateway.js +989 -0
  212. package/dist/dashboard-gateway/tenant-gateway.js.map +1 -0
  213. package/dist/dashboard-gateway/tenant-main.d.ts +41 -0
  214. package/dist/dashboard-gateway/tenant-main.js +303 -0
  215. package/dist/dashboard-gateway/tenant-main.js.map +1 -0
  216. package/dist/dashboard-gateway/tunnel-errors.d.ts +16 -0
  217. package/dist/dashboard-gateway/tunnel-errors.js +22 -0
  218. package/dist/dashboard-gateway/tunnel-errors.js.map +1 -0
  219. package/dist/dashboard-gateway/tunnel-http.d.ts +21 -0
  220. package/dist/dashboard-gateway/tunnel-http.js +175 -0
  221. package/dist/dashboard-gateway/tunnel-http.js.map +1 -0
  222. package/dist/handler.d.ts +6 -0
  223. package/dist/handler.js +17 -1
  224. package/dist/handler.js.map +1 -1
  225. package/dist/local-clink-backend.d.ts +2 -1
  226. package/dist/local-clink-backend.js +28 -4
  227. package/dist/local-clink-backend.js.map +1 -1
  228. package/dist/parsers/extract.d.ts +19 -1
  229. package/dist/parsers/extract.js +68 -3
  230. package/dist/parsers/extract.js.map +1 -1
  231. package/dist/pipeline.d.ts +17 -1
  232. package/dist/pipeline.js +34 -6
  233. package/dist/pipeline.js.map +1 -1
  234. package/dist/process-group.d.ts +65 -0
  235. package/dist/process-group.js +153 -0
  236. package/dist/process-group.js.map +1 -0
  237. package/dist/progress-report/schema.d.ts +23 -23
  238. package/dist/project-verification/files.js +1 -1
  239. package/dist/project-verification/files.js.map +1 -1
  240. package/dist/project-verification/process.js +23 -44
  241. package/dist/project-verification/process.js.map +1 -1
  242. package/dist/project-verification/service.js +9 -1
  243. package/dist/project-verification/service.js.map +1 -1
  244. package/dist/prompt.d.ts +7 -0
  245. package/dist/prompt.js +18 -1
  246. package/dist/prompt.js.map +1 -1
  247. package/dist/recipe-host/git-trust.d.ts +43 -0
  248. package/dist/recipe-host/git-trust.js +360 -0
  249. package/dist/recipe-host/git-trust.js.map +1 -0
  250. package/dist/recipe-host/git.d.ts +42 -0
  251. package/dist/recipe-host/git.js +207 -0
  252. package/dist/recipe-host/git.js.map +1 -0
  253. package/dist/recipe-host/native-recipe-host.d.ts +127 -0
  254. package/dist/recipe-host/native-recipe-host.js +880 -0
  255. package/dist/recipe-host/native-recipe-host.js.map +1 -0
  256. package/dist/recipe-host/seat-cwd.d.ts +16 -0
  257. package/dist/recipe-host/seat-cwd.js +170 -0
  258. package/dist/recipe-host/seat-cwd.js.map +1 -0
  259. package/dist/runner.d.ts +43 -1
  260. package/dist/runner.js +234 -35
  261. package/dist/runner.js.map +1 -1
  262. package/dist/server.js +9 -1
  263. package/dist/server.js.map +1 -1
  264. package/docs/configuration.md +24 -3
  265. package/docs/engineering-recipes.md +291 -0
  266. package/docs/security.md +84 -0
  267. package/docs/verification/project-checks.md +24 -2
  268. package/package.json +5 -1
  269. package/clinkx-workflows/dist/dashboard-ui/assets/index-BdpmbPps.js +0 -115
  270. package/clinkx-workflows/dist/dashboard-ui/assets/style-Im5i1iAs.css +0 -1
@@ -105,7 +105,7 @@ Full field reference:
105
105
  | `roles` | record<string,Role> | `{}` | Role prompts selected by request `role` (default: `"default"`). |
106
106
  | `supports_images` | boolean | `false` | Informational (v1 does not inline image bytes). |
107
107
  | `requires_tty` | boolean | `false` | If true: ClinkX rejects the call (PTY/TTY not supported in v1). |
108
- | `result_contract` | object | `{ enabled:false, filename:"RESULT.md" }` | Optional file-based result extraction from the run dir. |
108
+ | `result_contract` | object | `{ enabled:false, filename:"RESULT.md" }` | Optional file-based result extraction from the run dir. A complete valid result file takes precedence. For JSON-enforced calls the prompt says the file must hold exactly the single JSON value (no Markdown); if the file is invalid or salvage-only, a complete, unsalvaged parser JSON document from untruncated stdout is used instead and `_debug.result_contract_rejected` (`invalid_json` \| `salvage_only`) records it. |
109
109
  | `prompt_mode` | enum | `"stdin"` | One of: `stdin`, `arg`, `file`. Controls how the assembled prompt is delivered. |
110
110
  | `prompt_file_flag` | string | (optional) | Flag starting with `-`, valid only with `prompt_mode:"file"`; delivery emits the flag and generated path together. |
111
111
  | `invocation_overrides` | object | (optional) | Strict adapter consent block for per-call `model` and `effort`. Each knob declares an exactly two-token `args` template; effort also requires `allowed_values`. Load-time validation rejects a knob flag that exactly equals any `unsafe_args` token, `prompt_file_flag`, `native_output_file_flag`, or `stdin_placeholder_arg`. Collisions with base `args` / role `extra_args` remain legal (replacement targets). Not supported on `backend:"app_server"`. |
@@ -276,7 +276,7 @@ If `glm-5.3[1m]` 404s, fall back to the 200k pin: drop the `[1m]` suffix, set `C
276
276
  | `CLINKX_WORKFLOWS_DASHBOARD_PORT` | Dashboard listener port; local passkey mode binds both loopback families, while cloud passkey mode binds the private container interface. `0` selects an ephemeral local port. | `4180` |
277
277
  | `CLINKX_WORKFLOWS_DASHBOARD_AUTH_MODE` | Dashboard auth selector. `passkey` is the default. `bearer` is a temporary rollback until the real local and live Traefik proof gates pass. `none` disables authentication entirely for loopback-only local testing (rejected in remote/gateway mode; the cloud artifacts never set it). | `passkey` |
278
278
  | `CLINKX_WORKFLOWS_DASHBOARD_CREDENTIAL_DIR` | Optional absolute, non-root passkey credential directory. Overrides credential storage only, not workflow state. Containers pin it to the independent writable `/data/dashboard-credentials` volume. | `${CLINKX_WORKFLOWS_STATE_DIR}/dashboard/webauthn` |
279
- | `CLINKX_WORKFLOWS_PROGRESS_REPORT_OVERRIDE_DIR` | Optional absolute, non-root parent directory for dashboard-private sidecars: `progress-report-status-overrides.json` and `prompt-builder-library.json`. Unset/empty keeps them beside `progress-reports/` under the workflow state directory. Containers pin it to the independent writable `/data/dashboard-overrides` volume so those files survive a read-only producer-state mount. Neither file is an execution input. | `${CLINKX_WORKFLOWS_STATE_DIR}` |
279
+ | `CLINKX_WORKFLOWS_PROGRESS_REPORT_OVERRIDE_DIR` | Optional absolute, non-root parent directory for dashboard-private sidecars: `progress-report-status-overrides.json` and `prompt-builder-library.json`. Unset/empty keeps them beside `progress-reports/` under the workflow state directory. Containers pin it to the independent writable `/data/dashboard-overrides` volume so those files survive a read-only producer-state mount. Neither file is an execution input. A companion in workstation-key mode (`clxd_` token) also keeps `workstation-binding.json` here; with this variable unset, that one file goes to `${CLINKX_WORKFLOWS_STATE_DIR}/dashboard/binding/` instead, because the state root contains the default credential directory. | `${CLINKX_WORKFLOWS_STATE_DIR}` |
280
280
  | `CLINKX_WORKFLOWS_DASHBOARD_RP_NAME` | WebAuthn RP display name shown by the authenticator. | `ClinkX Dashboard` |
281
281
  | `CLINKX_WORKFLOWS_DASHBOARD_SESSION_TTL_SECONDS` | Absolute, non-sliding passkey session lifetime in seconds. | `43200` |
282
282
  | `CLINKX_WORKFLOWS_DASHBOARD_MAX_STATE_BYTES` | Maximum admitted `state.json` bytes per run. Strict integer range `1048576..67108864`. | `16777216` |
@@ -284,7 +284,7 @@ If `glm-5.3[1m]` 404s, fall back to the 200k pin: drop the `[1m]` suffix, set `C
284
284
  | `CLINKX_WORKFLOWS_DASHBOARD_UI_ORIGIN` | Cloud dashboard canonical HTTPS origin. Passkey mode requires the same origin as the API. | _(unset → local)_ |
285
285
  | `CLINKX_WORKFLOWS_RETAIN_SUCCEEDED_DAYS` | Retention for ordinary synchronous successes after `run.lock` release. `0` keeps indefinitely. | `1` |
286
286
  | `CLINKX_WORKFLOWS_RETAIN_ASYNC_DAYS` | Retention for successful detached runs. `0` keeps indefinitely. | `1` |
287
- | `CLINKX_WORKFLOWS_RETAIN_FAILED_DAYS` | Retention for failed runs. `0` keeps indefinitely. | `30` |
287
+ | `CLINKX_WORKFLOWS_RETAIN_FAILED_DAYS` | Retention for failed runs. Recipe run directories (any run with a `recipe-state.json` sidecar) use it for every terminal status, so it is also the effective `ping-pong` decision TTL; successful runs with degraded health keep at least this long. `0` keeps indefinitely. | `30` |
288
288
  | `CLINKX_WORKFLOWS_RETAIN_CANCELLED_DAYS` | Retention for cancelled runs. `0` keeps indefinitely. | `30` |
289
289
  | `CLINKX_WORKFLOWS_RETAIN_DEBUG_DAYS` | Retention for debug-kept runs. `0` keeps indefinitely. | `7` |
290
290
  | `CLINKX_INVOCATION_AUDIT_V2_PERSISTENCE_ENABLED` | Reader-first activation for all invocation-audit V2 writes. Only exact `true` enables root workflow call invocation, Activity V2, and context-builder sidecar updates; every other value preserves old-reader-safe writes. Readers stay V1/V2-capable. | `false` |
@@ -518,6 +518,27 @@ Shutdown closes all dashboard listeners before auth/gateway resources. All
518
518
  cleanup failures are retained in one listener-or-resource aggregate, and signal
519
519
  handling remains idempotent.
520
520
 
521
+ ## Browser agent preview
522
+
523
+ The dashboard's **agent** control opts one page into page-local WebMCP tools for an
524
+ AI agent working in that tab, in bearer, passkey, auth-disabled and hosted sessions.
525
+ Access starts disabled on every page load, needs a secure top-level document with
526
+ the native `document.modelContext.registerTool` API, and is never saved. An
527
+ unsupported browser keeps ordinary dashboard use.
528
+
529
+ The five tools report the visible view (`clinkx_get_context`), list run identifiers
530
+ (`clinkx_list_runs`), navigate the page (`clinkx_open_view`) and, while the council
531
+ builder's run-workflow target is active, read and conditionally patch the visible
532
+ draft (`clinkx_get_draft`, `clinkx_patch_draft`), which the builder keeps in browser
533
+ storage like the user's own edits. No browser tool reads results or logs, launches a
534
+ workflow, calls a provider or saves a preset; agents with the ClinkX MCP server should
535
+ use it for those. There is no configuration beyond the
536
+ opt-in.
537
+
538
+ See the [dashboard WebMCP guide](dashboard-webmcp.md) for inputs, outcomes, bounds and
539
+ compatibility, and the [qualification record](dashboard-webmcp-qualification.md) for
540
+ the exact consumers and builds tested, including earlier failures.
541
+
521
542
  ## Context Builder
522
543
 
523
544
  `context_builder` stores runs under environment-configured local state and uses the same adapter registry as `clink` only when delegate mode is explicitly enabled in the request. Without `delegate.enabled:true`, it uses deterministic local curation and does not invoke a CLI adapter.
@@ -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
@@ -224,6 +224,90 @@ The subprocess shares the user's filesystem. The run directory is a convenience
224
224
 
225
225
  `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
226
 
227
+ ### Recipe worktrees are not containment
228
+
229
+ The `ping-pong` recipe runs writer seats in host-owned git worktrees under
230
+ `${CLINKX_HOME}/workspaces/<run_id>/<seat>`. Worktrees separate directories, not
231
+ privileges:
232
+
233
+ - Every recipe seat uses its stock adapter flags (`--dangerously-bypass-approvals-and-sandbox`,
234
+ `--permission-mode acceptEdits`, `--dangerously-skip-permissions`, `--always-approve`).
235
+ A writer can change anything the host user can change, including peer
236
+ worktrees and the source repository. Reviewer and judge seats are read-only by
237
+ prompt only. `architecture-arena` authors and judge run in the server's
238
+ `process.cwd()` with the same flags.
239
+ - Host verification (`verification_run` machinery) runs writer-authored code on
240
+ the host. Copy-preparation manifests are not sandboxed. Check cleanup routes
241
+ every group probe and signal through the same retiring process-group handle
242
+ as the runner: SIGKILL only for a group a probe saw alive, never past EPERM,
243
+ and a PGID is never addressed again after ESRCH.
244
+ - Recipe admission requires an unmarked `CLINKX_ALLOWED_ROOTS` entry covering
245
+ `${CLINKX_HOME}/workspaces`; that grant also makes the directory an eligible
246
+ `context_builder` source root when a call names it. Ping-pong context
247
+ preflight reads the implementer worktree at the baseline commit (roots and
248
+ absolute focus paths rebased at admission, anything outside the repository
249
+ rejected), not the live checkout. Because admission canonicalizes against the
250
+ live checkout but the worktree holds the baseline tree, a root or focus path
251
+ that is (or sits below) a symlink in the baseline is rejected, relative
252
+ focus paths must exist in the baseline under a root, and the start fails
253
+ before the ack if any rebased anchor canonicalizes outside the worktree.
254
+ Preflight skips the workflow context cache, so it
255
+ never runs the cache's workspace-signature git, which is not isolated
256
+ (`git diff --binary` with inherited environment and config).
257
+ - The host performs every git operation with hardened argv (`core.hooksPath=/dev/null`,
258
+ `core.fsmonitor=false`, `core.attributesFile=/dev/null`, forced
259
+ `core.filemode`/`core.symlinks` for identity) and an isolated environment
260
+ (`GIT_CONFIG_NOSYSTEM=1`, `GIT_CONFIG_GLOBAL=/dev/null`, `GIT_ATTR_NOSYSTEM=1`;
261
+ `GIT_CONFIG_PARAMETERS`/`GIT_CONFIG_COUNT`/`GIT_CONFIG_SYSTEM` dropped), so
262
+ only the repository's own config applies; global-only settings such as
263
+ `safe.directory`, a global git-lfs filter or `core.autocrlf` no longer affect
264
+ host git. It re-binds the directory chain from `$CLINKX_HOME` down around every
265
+ git call, and never runs a repository-wide `git worktree prune`. A same-user
266
+ process can still race the final re-check and git's own path resolution inside
267
+ one call.
268
+ - A writer can still reach the shared repository metadata. The host snapshots
269
+ shared config, `config.worktree` and `info/attributes`/`info/exclude` digests
270
+ at worktree creation (persisted in the sidecar) and rechecks them before every
271
+ later host git spawn, and the git dir and common dir that git resolves for the
272
+ seat must still be the snapshotted ones (a re-pointed `.git` link drifts); a
273
+ change outside `user.name`, `user.email`,
274
+ `branch.*.{remote,merge,rebase,description}` and `remote.*.fetch` (for example
275
+ a planted clean filter or `git remote add`) stops the run `recovery_required`
276
+ before host git runs it, naming the file and keys but never values. The
277
+ sidecar and `workflow_run_status` carry that cause as a bounded
278
+ `recipe.stop_detail` (at most 600 characters) with a remediation hint. ClinkX
279
+ never edits or reverts the user's git metadata, because it cannot tell a
280
+ writer-planted key from one the user added: a planted key persists in the
281
+ repository until the user removes it. Worktree `git config` writes go to the
282
+ shared repository config, so drift from one run stops every concurrent
283
+ ping-pong run on the same repository. Not covered: a file reached through
284
+ `include.path`, or a change landing between the recheck and git's own read.
285
+ - Reviewer sign-off binds to a raw-byte candidate witness (mode, path, raw bytes
286
+ or symlink target over the throwaway-index path list), not only the git tree
287
+ id, so a lossy clean filter or eol-only change cannot carry a stale sign-off
288
+ forward.
289
+ - Cleanup removes only sidecar-inventoried seats that verify against the
290
+ sidecar's repository; foreign or unverified entries under the run's workspace
291
+ directory are preserved and veto the prune.
292
+ - The recipe cwd is accepted only for a real linked worktree seat (gitfile,
293
+ admin back-pointer and commondir checks) and is not reachable from the public
294
+ `clink` schema. Binding a seat to its run is the recipe runtime's job.
295
+ - Runner exit confirmation (`recipeExitConfirm`) sweeps the child's process
296
+ group on leader exit and, unless exit is already confirmed, after `close`, sending SIGKILL only after a
297
+ `kill(-pid, 0)` probe shows the group alive. Only ESRCH confirms exit; EPERM
298
+ never does. After any ESRCH the group handle is retired and its (reusable)
299
+ PGID is never probed or signalled again, for recipe and non-recipe children
300
+ alike. An unconfirmed recipe call settles after a bounded deadline with
301
+ `exited:false` and stays registered for shutdown. Host `runGit` runs detached
302
+ in its own process group, is swept at shutdown, and refuses to spawn after the
303
+ shutdown latch. A recipe child that emits `'error'` after spawn stays
304
+ registered until a sweep confirms its exit. Descendants that leave the process
305
+ group (`setsid`, daemonizing) are not covered unless they still hold a stdio
306
+ pipe: one that also closes its stdio is reported `exited:true` while alive
307
+ (a residual pinned by `tests/runner.test.ts`). On Linux, a group left
308
+ with only unreaped zombies (non-reaping PID 1 in a container) reports
309
+ "unconfirmed", and the recipe stops with `recovery_required`.
310
+
227
311
  ### Delegate mode is not a sandbox
228
312
 
229
313
  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,6 +1,6 @@
1
1
  {
2
2
  "name": "clinkx",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "ClinkX MCP STDIO server \u2014 CLI-to-CLI bridge tool",
5
5
  "type": "module",
6
6
  "engines": {
@@ -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"