clinkx 1.1.2 → 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 (309) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +67 -14
  3. package/clinkx-workflows/dist/allowed-roots.js +2 -0
  4. package/clinkx-workflows/dist/allowed-roots.js.map +1 -1
  5. package/clinkx-workflows/dist/architecture-arena/admission.d.ts +16 -0
  6. package/clinkx-workflows/dist/architecture-arena/admission.js +107 -0
  7. package/clinkx-workflows/dist/architecture-arena/admission.js.map +1 -0
  8. package/clinkx-workflows/dist/architecture-arena/contract.d.ts +1368 -0
  9. package/clinkx-workflows/dist/architecture-arena/contract.js +254 -0
  10. package/clinkx-workflows/dist/architecture-arena/contract.js.map +1 -0
  11. package/clinkx-workflows/dist/architecture-arena/runtime.d.ts +53 -0
  12. package/clinkx-workflows/dist/architecture-arena/runtime.js +511 -0
  13. package/clinkx-workflows/dist/architecture-arena/runtime.js.map +1 -0
  14. package/clinkx-workflows/dist/architecture-comparison/admission.d.ts +17 -1
  15. package/clinkx-workflows/dist/architecture-comparison/admission.js +27 -4
  16. package/clinkx-workflows/dist/architecture-comparison/admission.js.map +1 -1
  17. package/clinkx-workflows/dist/architecture-comparison/contract.d.ts +59 -62
  18. package/clinkx-workflows/dist/architecture-comparison/contract.js +4 -21
  19. package/clinkx-workflows/dist/architecture-comparison/contract.js.map +1 -1
  20. package/clinkx-workflows/dist/architecture-comparison/runtime.d.ts +4 -3
  21. package/clinkx-workflows/dist/architecture-comparison/runtime.js +22 -67
  22. package/clinkx-workflows/dist/architecture-comparison/runtime.js.map +1 -1
  23. package/clinkx-workflows/dist/artifacts.d.ts +19 -4
  24. package/clinkx-workflows/dist/artifacts.js +16 -7
  25. package/clinkx-workflows/dist/artifacts.js.map +1 -1
  26. package/clinkx-workflows/dist/backend.d.ts +30 -0
  27. package/clinkx-workflows/dist/child-env.d.ts +3 -1
  28. package/clinkx-workflows/dist/child-env.js +6 -2
  29. package/clinkx-workflows/dist/child-env.js.map +1 -1
  30. package/clinkx-workflows/dist/clink-client.d.ts +8 -2
  31. package/clinkx-workflows/dist/clink-client.js +4 -2
  32. package/clinkx-workflows/dist/clink-client.js.map +1 -1
  33. package/clinkx-workflows/dist/config.d.ts +28 -5
  34. package/clinkx-workflows/dist/config.js +137 -20
  35. package/clinkx-workflows/dist/config.js.map +1 -1
  36. package/clinkx-workflows/dist/contained-file.js +9 -0
  37. package/clinkx-workflows/dist/contained-file.js.map +1 -1
  38. package/clinkx-workflows/dist/context-preflight.d.ts +6 -0
  39. package/clinkx-workflows/dist/context-preflight.js.map +1 -1
  40. package/clinkx-workflows/dist/council-execution-policy.d.ts +3 -1
  41. package/clinkx-workflows/dist/council-execution-policy.js +4 -0
  42. package/clinkx-workflows/dist/council-execution-policy.js.map +1 -1
  43. package/clinkx-workflows/dist/dashboard/contracts.d.ts +586 -586
  44. package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +28 -28
  45. package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +32 -32
  46. package/clinkx-workflows/dist/dashboard/session-log-identity.js +2 -1
  47. package/clinkx-workflows/dist/dashboard/session-log-identity.js.map +1 -1
  48. package/clinkx-workflows/dist/dashboard-ui/assets/index-DRId2DVA.js +119 -0
  49. package/clinkx-workflows/dist/dashboard-ui/assets/style-CHAw57y5.css +1 -0
  50. package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
  51. package/clinkx-workflows/dist/delegate-signature.d.ts +4 -3
  52. package/clinkx-workflows/dist/delegate-signature.js +4 -3
  53. package/clinkx-workflows/dist/delegate-signature.js.map +1 -1
  54. package/clinkx-workflows/dist/durable-file.d.ts +69 -0
  55. package/clinkx-workflows/dist/durable-file.js +145 -0
  56. package/clinkx-workflows/dist/durable-file.js.map +1 -0
  57. package/clinkx-workflows/dist/engine.d.ts +42 -7
  58. package/clinkx-workflows/dist/engine.js +196 -24
  59. package/clinkx-workflows/dist/engine.js.map +1 -1
  60. package/clinkx-workflows/dist/ping-pong/admission.d.ts +127 -0
  61. package/clinkx-workflows/dist/ping-pong/admission.js +522 -0
  62. package/clinkx-workflows/dist/ping-pong/admission.js.map +1 -0
  63. package/clinkx-workflows/dist/ping-pong/contract.d.ts +2539 -0
  64. package/clinkx-workflows/dist/ping-pong/contract.js +819 -0
  65. package/clinkx-workflows/dist/ping-pong/contract.js.map +1 -0
  66. package/clinkx-workflows/dist/ping-pong/control.d.ts +67 -0
  67. package/clinkx-workflows/dist/ping-pong/control.js +12 -0
  68. package/clinkx-workflows/dist/ping-pong/control.js.map +1 -0
  69. package/clinkx-workflows/dist/ping-pong/runtime-handle.d.ts +24 -0
  70. package/clinkx-workflows/dist/ping-pong/runtime-handle.js +55 -0
  71. package/clinkx-workflows/dist/ping-pong/runtime-handle.js.map +1 -0
  72. package/clinkx-workflows/dist/ping-pong/runtime.d.ts +235 -0
  73. package/clinkx-workflows/dist/ping-pong/runtime.js +1183 -0
  74. package/clinkx-workflows/dist/ping-pong/runtime.js.map +1 -0
  75. package/clinkx-workflows/dist/ping-pong/settle.d.ts +57 -0
  76. package/clinkx-workflows/dist/ping-pong/settle.js +58 -0
  77. package/clinkx-workflows/dist/ping-pong/settle.js.map +1 -0
  78. package/clinkx-workflows/dist/ping-pong/sidecar.d.ts +65 -0
  79. package/clinkx-workflows/dist/ping-pong/sidecar.js +138 -0
  80. package/clinkx-workflows/dist/ping-pong/sidecar.js.map +1 -0
  81. package/clinkx-workflows/dist/plan-review/publication.d.ts +2 -1
  82. package/clinkx-workflows/dist/plan-review/publication.js +5 -6
  83. package/clinkx-workflows/dist/plan-review/publication.js.map +1 -1
  84. package/clinkx-workflows/dist/plan-review/snapshot.d.ts +3 -2
  85. package/clinkx-workflows/dist/plan-review/snapshot.js +8 -8
  86. package/clinkx-workflows/dist/plan-review/snapshot.js.map +1 -1
  87. package/clinkx-workflows/dist/recipe-host.d.ts +315 -0
  88. package/clinkx-workflows/dist/recipe-host.js +183 -0
  89. package/clinkx-workflows/dist/recipe-host.js.map +1 -0
  90. package/clinkx-workflows/dist/recipe-seats.d.ts +96 -0
  91. package/clinkx-workflows/dist/recipe-seats.js +163 -0
  92. package/clinkx-workflows/dist/recipe-seats.js.map +1 -0
  93. package/clinkx-workflows/dist/recipe-shared/evidence.d.ts +67 -0
  94. package/clinkx-workflows/dist/recipe-shared/evidence.js +111 -0
  95. package/clinkx-workflows/dist/recipe-shared/evidence.js.map +1 -0
  96. package/clinkx-workflows/dist/reducers/index.d.ts +9 -1
  97. package/clinkx-workflows/dist/reducers/index.js +30 -0
  98. package/clinkx-workflows/dist/reducers/index.js.map +1 -1
  99. package/clinkx-workflows/dist/root-path-validation.d.ts +12 -0
  100. package/clinkx-workflows/dist/root-path-validation.js +63 -0
  101. package/clinkx-workflows/dist/root-path-validation.js.map +1 -0
  102. package/clinkx-workflows/dist/rosters.d.ts +1 -0
  103. package/clinkx-workflows/dist/rosters.js +16 -6
  104. package/clinkx-workflows/dist/rosters.js.map +1 -1
  105. package/clinkx-workflows/dist/run-lock-reclaim.d.ts +44 -0
  106. package/clinkx-workflows/dist/run-lock-reclaim.js +86 -0
  107. package/clinkx-workflows/dist/run-lock-reclaim.js.map +1 -0
  108. package/clinkx-workflows/dist/server.js +5 -2
  109. package/clinkx-workflows/dist/server.js.map +1 -1
  110. package/clinkx-workflows/dist/state-schema.d.ts +24 -0
  111. package/clinkx-workflows/dist/state-schema.js +4 -1
  112. package/clinkx-workflows/dist/state-schema.js.map +1 -1
  113. package/clinkx-workflows/dist/state.d.ts +185 -4
  114. package/clinkx-workflows/dist/state.js +684 -88
  115. package/clinkx-workflows/dist/state.js.map +1 -1
  116. package/clinkx-workflows/dist/transport.d.ts +2 -1
  117. package/clinkx-workflows/dist/transport.js +5 -0
  118. package/clinkx-workflows/dist/transport.js.map +1 -1
  119. package/clinkx-workflows/dist/validators/architecture-arena.d.ts +6 -0
  120. package/clinkx-workflows/dist/validators/architecture-arena.js +16 -0
  121. package/clinkx-workflows/dist/validators/architecture-arena.js.map +1 -0
  122. package/clinkx-workflows/dist/validators/index.js +4 -0
  123. package/clinkx-workflows/dist/validators/index.js.map +1 -1
  124. package/clinkx-workflows/dist/validators/ping-pong.d.ts +6 -0
  125. package/clinkx-workflows/dist/validators/ping-pong.js +10 -0
  126. package/clinkx-workflows/dist/validators/ping-pong.js.map +1 -0
  127. package/clinkx-workflows/dist/workflow-completion.d.ts +83 -0
  128. package/clinkx-workflows/dist/workflow-completion.js +250 -0
  129. package/clinkx-workflows/dist/workflow-completion.js.map +1 -0
  130. package/clinkx-workflows/dist/workflow-tools.d.ts +53 -6
  131. package/clinkx-workflows/dist/workflow-tools.js +1123 -65
  132. package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
  133. package/clinkx-workflows/dist/workflow-verification-contract.d.ts +4 -4
  134. package/clinkx-workflows/templates/architecture-arena/candidate.txt +39 -0
  135. package/clinkx-workflows/templates/architecture-arena/judge.txt +34 -0
  136. package/clinkx-workflows/templates/ping-pong/implement.txt +14 -0
  137. package/clinkx-workflows/templates/ping-pong/remediate.txt +14 -0
  138. package/clinkx-workflows/templates/ping-pong/review.txt +27 -0
  139. package/clinkx-workflows/workflows/architecture-arena.yaml +127 -0
  140. package/clinkx-workflows/workflows/ping-pong.yaml +158 -0
  141. package/dist/allowed-roots.d.ts +1 -1
  142. package/dist/allowed-roots.js +124 -14
  143. package/dist/allowed-roots.js.map +1 -1
  144. package/dist/context-builder/bundle.js +4 -3
  145. package/dist/context-builder/bundle.js.map +1 -1
  146. package/dist/context-builder/config.d.ts +1 -0
  147. package/dist/context-builder/config.js +21 -9
  148. package/dist/context-builder/config.js.map +1 -1
  149. package/dist/context-builder/delegate-packet.d.ts +1 -0
  150. package/dist/context-builder/delegate-packet.js +66 -7
  151. package/dist/context-builder/delegate-packet.js.map +1 -1
  152. package/dist/context-builder/delegate-validation.d.ts +12 -3
  153. package/dist/context-builder/delegate-validation.js +23 -13
  154. package/dist/context-builder/delegate-validation.js.map +1 -1
  155. package/dist/context-builder/external-gaps.d.ts +14 -3
  156. package/dist/context-builder/external-gaps.js +124 -18
  157. package/dist/context-builder/external-gaps.js.map +1 -1
  158. package/dist/context-builder/handler.js +108 -191
  159. package/dist/context-builder/handler.js.map +1 -1
  160. package/dist/context-builder/mutation-lock.d.ts +4 -0
  161. package/dist/context-builder/mutation-lock.js +7 -1
  162. package/dist/context-builder/mutation-lock.js.map +1 -1
  163. package/dist/context-builder/review-coverage.js +27 -1
  164. package/dist/context-builder/review-coverage.js.map +1 -1
  165. package/dist/context-builder/secrets.js +1 -1
  166. package/dist/context-builder/secrets.js.map +1 -1
  167. package/dist/context-builder/storage.d.ts +10 -2
  168. package/dist/context-builder/storage.js +213 -16
  169. package/dist/context-builder/storage.js.map +1 -1
  170. package/dist/context-builder/versions.d.ts +10 -4
  171. package/dist/context-builder/versions.js +10 -4
  172. package/dist/context-builder/versions.js.map +1 -1
  173. package/dist/context-builder/workflow-runner.js +33 -24
  174. package/dist/context-builder/workflow-runner.js.map +1 -1
  175. package/dist/dashboard-cli.d.ts +8 -0
  176. package/dist/dashboard-cli.js +155 -86
  177. package/dist/dashboard-cli.js.map +1 -1
  178. package/dist/dashboard-companion/client.d.ts +10 -0
  179. package/dist/dashboard-companion/client.js +43 -1
  180. package/dist/dashboard-companion/client.js.map +1 -1
  181. package/dist/dashboard-companion/config.d.ts +19 -1
  182. package/dist/dashboard-companion/config.js +104 -3
  183. package/dist/dashboard-companion/config.js.map +1 -1
  184. package/dist/dashboard-companion/protocol.d.ts +16 -0
  185. package/dist/dashboard-companion/protocol.js +38 -1
  186. package/dist/dashboard-companion/protocol.js.map +1 -1
  187. package/dist/dashboard-companion/workstation-binding.d.ts +69 -0
  188. package/dist/dashboard-companion/workstation-binding.js +192 -0
  189. package/dist/dashboard-companion/workstation-binding.js.map +1 -0
  190. package/dist/dashboard-gateway/admin-cli.d.ts +10 -0
  191. package/dist/dashboard-gateway/admin-cli.js +266 -0
  192. package/dist/dashboard-gateway/admin-cli.js.map +1 -0
  193. package/dist/dashboard-gateway/config.d.ts +50 -0
  194. package/dist/dashboard-gateway/config.js +235 -1
  195. package/dist/dashboard-gateway/config.js.map +1 -1
  196. package/dist/dashboard-gateway/connection-registry.d.ts +100 -0
  197. package/dist/dashboard-gateway/connection-registry.js +228 -0
  198. package/dist/dashboard-gateway/connection-registry.js.map +1 -0
  199. package/dist/dashboard-gateway/control-plane/account-auth.d.ts +78 -0
  200. package/dist/dashboard-gateway/control-plane/account-auth.js +198 -0
  201. package/dist/dashboard-gateway/control-plane/account-auth.js.map +1 -0
  202. package/dist/dashboard-gateway/control-plane/billing.d.ts +264 -0
  203. package/dist/dashboard-gateway/control-plane/billing.js +787 -0
  204. package/dist/dashboard-gateway/control-plane/billing.js.map +1 -0
  205. package/dist/dashboard-gateway/control-plane/contracts.d.ts +1293 -0
  206. package/dist/dashboard-gateway/control-plane/contracts.js +280 -0
  207. package/dist/dashboard-gateway/control-plane/contracts.js.map +1 -0
  208. package/dist/dashboard-gateway/control-plane/cookies.d.ts +13 -0
  209. package/dist/dashboard-gateway/control-plane/cookies.js +46 -0
  210. package/dist/dashboard-gateway/control-plane/cookies.js.map +1 -0
  211. package/dist/dashboard-gateway/control-plane/credentials.d.ts +63 -0
  212. package/dist/dashboard-gateway/control-plane/credentials.js +66 -0
  213. package/dist/dashboard-gateway/control-plane/credentials.js.map +1 -0
  214. package/dist/dashboard-gateway/control-plane/entitlements.d.ts +118 -0
  215. package/dist/dashboard-gateway/control-plane/entitlements.js +329 -0
  216. package/dist/dashboard-gateway/control-plane/entitlements.js.map +1 -0
  217. package/dist/dashboard-gateway/control-plane/errors.d.ts +17 -0
  218. package/dist/dashboard-gateway/control-plane/errors.js +23 -0
  219. package/dist/dashboard-gateway/control-plane/errors.js.map +1 -0
  220. package/dist/dashboard-gateway/control-plane/hosts.d.ts +6 -0
  221. package/dist/dashboard-gateway/control-plane/hosts.js +16 -0
  222. package/dist/dashboard-gateway/control-plane/hosts.js.map +1 -0
  223. package/dist/dashboard-gateway/control-plane/http.d.ts +34 -0
  224. package/dist/dashboard-gateway/control-plane/http.js +331 -0
  225. package/dist/dashboard-gateway/control-plane/http.js.map +1 -0
  226. package/dist/dashboard-gateway/control-plane/schema.d.ts +9 -0
  227. package/dist/dashboard-gateway/control-plane/schema.js +247 -0
  228. package/dist/dashboard-gateway/control-plane/schema.js.map +1 -0
  229. package/dist/dashboard-gateway/control-plane/secrets.d.ts +20 -0
  230. package/dist/dashboard-gateway/control-plane/secrets.js +39 -0
  231. package/dist/dashboard-gateway/control-plane/secrets.js.map +1 -0
  232. package/dist/dashboard-gateway/control-plane/store.d.ts +579 -0
  233. package/dist/dashboard-gateway/control-plane/store.js +1115 -0
  234. package/dist/dashboard-gateway/control-plane/store.js.map +1 -0
  235. package/dist/dashboard-gateway/cookie-boundary.d.ts +60 -0
  236. package/dist/dashboard-gateway/cookie-boundary.js +205 -0
  237. package/dist/dashboard-gateway/cookie-boundary.js.map +1 -0
  238. package/dist/dashboard-gateway/index.js +271 -494
  239. package/dist/dashboard-gateway/index.js.map +1 -1
  240. package/dist/dashboard-gateway/main.js +7 -2
  241. package/dist/dashboard-gateway/main.js.map +1 -1
  242. package/dist/dashboard-gateway/routing.d.ts +43 -0
  243. package/dist/dashboard-gateway/routing.js +65 -0
  244. package/dist/dashboard-gateway/routing.js.map +1 -0
  245. package/dist/dashboard-gateway/tenant-gateway.d.ts +56 -0
  246. package/dist/dashboard-gateway/tenant-gateway.js +989 -0
  247. package/dist/dashboard-gateway/tenant-gateway.js.map +1 -0
  248. package/dist/dashboard-gateway/tenant-main.d.ts +41 -0
  249. package/dist/dashboard-gateway/tenant-main.js +303 -0
  250. package/dist/dashboard-gateway/tenant-main.js.map +1 -0
  251. package/dist/dashboard-gateway/tunnel-errors.d.ts +16 -0
  252. package/dist/dashboard-gateway/tunnel-errors.js +22 -0
  253. package/dist/dashboard-gateway/tunnel-errors.js.map +1 -0
  254. package/dist/dashboard-gateway/tunnel-http.d.ts +21 -0
  255. package/dist/dashboard-gateway/tunnel-http.js +175 -0
  256. package/dist/dashboard-gateway/tunnel-http.js.map +1 -0
  257. package/dist/handler.d.ts +6 -0
  258. package/dist/handler.js +17 -1
  259. package/dist/handler.js.map +1 -1
  260. package/dist/local-clink-backend.d.ts +2 -1
  261. package/dist/local-clink-backend.js +28 -4
  262. package/dist/local-clink-backend.js.map +1 -1
  263. package/dist/parsers/extract.d.ts +19 -1
  264. package/dist/parsers/extract.js +68 -3
  265. package/dist/parsers/extract.js.map +1 -1
  266. package/dist/pipeline.d.ts +17 -1
  267. package/dist/pipeline.js +34 -6
  268. package/dist/pipeline.js.map +1 -1
  269. package/dist/process-group.d.ts +65 -0
  270. package/dist/process-group.js +153 -0
  271. package/dist/process-group.js.map +1 -0
  272. package/dist/progress-report/schema.d.ts +23 -23
  273. package/dist/project-verification/files.js +1 -1
  274. package/dist/project-verification/files.js.map +1 -1
  275. package/dist/project-verification/process.js +23 -44
  276. package/dist/project-verification/process.js.map +1 -1
  277. package/dist/project-verification/service.js +9 -1
  278. package/dist/project-verification/service.js.map +1 -1
  279. package/dist/prompt.d.ts +7 -0
  280. package/dist/prompt.js +18 -1
  281. package/dist/prompt.js.map +1 -1
  282. package/dist/recipe-host/git-trust.d.ts +43 -0
  283. package/dist/recipe-host/git-trust.js +360 -0
  284. package/dist/recipe-host/git-trust.js.map +1 -0
  285. package/dist/recipe-host/git.d.ts +42 -0
  286. package/dist/recipe-host/git.js +207 -0
  287. package/dist/recipe-host/git.js.map +1 -0
  288. package/dist/recipe-host/native-recipe-host.d.ts +127 -0
  289. package/dist/recipe-host/native-recipe-host.js +880 -0
  290. package/dist/recipe-host/native-recipe-host.js.map +1 -0
  291. package/dist/recipe-host/seat-cwd.d.ts +16 -0
  292. package/dist/recipe-host/seat-cwd.js +170 -0
  293. package/dist/recipe-host/seat-cwd.js.map +1 -0
  294. package/dist/registry.d.ts +1 -1
  295. package/dist/registry.js +5 -1
  296. package/dist/registry.js.map +1 -1
  297. package/dist/runner.d.ts +43 -1
  298. package/dist/runner.js +234 -35
  299. package/dist/runner.js.map +1 -1
  300. package/dist/server.js +21 -6
  301. package/dist/server.js.map +1 -1
  302. package/docs/configuration.md +181 -15
  303. package/docs/engineering-recipes.md +291 -0
  304. package/docs/security.md +87 -0
  305. package/docs/verification/project-checks.md +24 -2
  306. package/package.json +5 -1
  307. package/scripts/provider-doctor-core.mjs +21 -5
  308. package/clinkx-workflows/dist/dashboard-ui/assets/index-BdpmbPps.js +0 -115
  309. package/clinkx-workflows/dist/dashboard-ui/assets/style-Im5i1iAs.css +0 -1
@@ -0,0 +1,1368 @@
1
+ import { z } from "zod";
2
+ import { CandidateSchema, MAX_CANDIDATE_BYTES, MAX_JUDGE_BYTES, MAX_RECORD_BYTES, MAX_SHARED_BYTES, MAX_VIEW_BYTES, RouteSchema, type Candidate } from "../architecture-comparison/contract.js";
3
+ export { CandidateSchema, MAX_CANDIDATE_BYTES, MAX_JUDGE_BYTES, MAX_RECORD_BYTES, MAX_SHARED_BYTES, MAX_VIEW_BYTES, RouteSchema };
4
+ export type { Candidate };
5
+ export declare const ARENA_WORKFLOW = "architecture-arena";
6
+ export declare const ARENA_MIN_CANDIDATES: number;
7
+ export declare const ARENA_MAX_CANDIDATES: number;
8
+ /** Smallest per-candidate cap worth dispatching authors for (C2). */
9
+ export declare const ARENA_CANDIDATE_FLOOR_BYTES: number;
10
+ /**
11
+ * Upper bound on the judge-view bytes that are neither the standalone frozen
12
+ * shared input nor the standalone candidate bodies: the view envelope, the
13
+ * per-candidate `{alias, body}` wrappers, and the extra pretty-print
14
+ * indentation the nested shared input (+2 B/line) and bodies (+6 B/line) get.
15
+ *
16
+ * Measured 2026-11-01 as `serialized(view) - serialized(shared) -
17
+ * sum(serialized(body))` on the worst-case line-count fixture: 32 sources and
18
+ * 33 source refs in the shared input, and every body carrying 12 tradeoffs,
19
+ * 12 assumptions, 12 rejected alternatives and 33 source refs. Result: n = 2:
20
+ * 1,692 B; n = 3: 2,253 B; n = 4: 2,814 B. Content length does not change it
21
+ * (only line count does), so the n = 4 value bounds every admitted shape; the
22
+ * constant rounds it up to 3 KiB. `tests/architecture-arena.test.ts`
23
+ * re-proves the full-size bound for n = 2, 3, 4.
24
+ *
25
+ * Consequence: at the 48 KiB shared ceiling the derived caps are 16,384 B
26
+ * (n = 2), 15,360 B (n = 3) and 11,520 B (n = 4), so the 4 KiB floor is not
27
+ * reachable with today's ceilings; it guards future ceiling changes.
28
+ */
29
+ export declare const ARENA_JUDGE_VIEW_FIXED_OVERHEAD_BYTES = 3072;
30
+ export declare const ARENA_STATE_PATH = "architecture-arena.v2.json";
31
+ export declare const ARENA_CAPACITY_PATH = "architecture-arena.capacity.v2.json";
32
+ export declare const ARENA_SEAT_PLAN_VARIABLE = "arena_seat_plan";
33
+ export declare const ARENA_ALIASES: readonly ["candidate_A", "candidate_B", "candidate_C", "candidate_D"];
34
+ export declare const ARENA_AUTHOR_CALL_IDS: readonly ["author_a", "author_b", "author_c", "author_d"];
35
+ export declare const SHARED_REF = "freeze.input";
36
+ export declare const VIEW_REF = "judge_view.view";
37
+ export declare const JUDGE_REF = "judge.judge";
38
+ export declare const RECORD_REF = "comparison.record";
39
+ /**
40
+ * Root fail-fast semaphore text (src/concurrency.ts, transient since 2-8).
41
+ * Legacy fallback only: a call's structured `failureKind` decides when
42
+ * present. Anchored so a provider error that quotes the phrase is not busy.
43
+ */
44
+ export declare const ROOT_BUSY_PATTERN: RegExp;
45
+ export type ArenaAlias = typeof ARENA_ALIASES[number];
46
+ /** Architecture recipes rehydrate retained evidence through contained, bounded reads (state.ts). */
47
+ export declare function usesContainedArchitectureEvidence(workflowName: string): boolean;
48
+ export declare function candidateRef(memberIndex: number): string;
49
+ export declare function aliasesFor(count: number): ArenaAlias[];
50
+ export declare const ArenaSharedInputSchema: z.ZodObject<{
51
+ schema_version: z.ZodLiteral<"architecture-arena-shared-input-v2">;
52
+ requirements: z.ZodString;
53
+ source_identity: z.ZodString;
54
+ sources: z.ZodArray<z.ZodObject<{
55
+ source_ref: z.ZodString;
56
+ sha256: z.ZodString;
57
+ size_bytes: z.ZodNumber;
58
+ content: z.ZodString;
59
+ }, "strict", z.ZodTypeAny, {
60
+ sha256: string;
61
+ content: string;
62
+ source_ref: string;
63
+ size_bytes: number;
64
+ }, {
65
+ sha256: string;
66
+ content: string;
67
+ source_ref: string;
68
+ size_bytes: number;
69
+ }>, "many">;
70
+ source_refs: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
71
+ /** Told to every author: the complete candidate JSON must fit this many bytes. */
72
+ arena: z.ZodObject<{
73
+ candidate_count: z.ZodNumber;
74
+ candidate_max_bytes: z.ZodNumber;
75
+ }, "strict", z.ZodTypeAny, {
76
+ candidate_count: number;
77
+ candidate_max_bytes: number;
78
+ }, {
79
+ candidate_count: number;
80
+ candidate_max_bytes: number;
81
+ }>;
82
+ frozen_digest: z.ZodString;
83
+ }, "strict", z.ZodTypeAny, {
84
+ schema_version: "architecture-arena-shared-input-v2";
85
+ sources: {
86
+ sha256: string;
87
+ content: string;
88
+ source_ref: string;
89
+ size_bytes: number;
90
+ }[];
91
+ frozen_digest: string;
92
+ requirements: string;
93
+ source_identity: string;
94
+ source_refs: string[];
95
+ arena: {
96
+ candidate_count: number;
97
+ candidate_max_bytes: number;
98
+ };
99
+ }, {
100
+ schema_version: "architecture-arena-shared-input-v2";
101
+ sources: {
102
+ sha256: string;
103
+ content: string;
104
+ source_ref: string;
105
+ size_bytes: number;
106
+ }[];
107
+ frozen_digest: string;
108
+ requirements: string;
109
+ source_identity: string;
110
+ source_refs: string[];
111
+ arena: {
112
+ candidate_count: number;
113
+ candidate_max_bytes: number;
114
+ };
115
+ }>;
116
+ export type ArenaSharedInput = z.infer<typeof ArenaSharedInputSchema>;
117
+ export declare const ArenaJudgeViewSchema: z.ZodEffects<z.ZodObject<{
118
+ schema_version: z.ZodLiteral<"architecture-arena-judge-view-v2">;
119
+ shared: z.ZodObject<{
120
+ schema_version: z.ZodLiteral<"architecture-arena-shared-input-v2">;
121
+ requirements: z.ZodString;
122
+ source_identity: z.ZodString;
123
+ sources: z.ZodArray<z.ZodObject<{
124
+ source_ref: z.ZodString;
125
+ sha256: z.ZodString;
126
+ size_bytes: z.ZodNumber;
127
+ content: z.ZodString;
128
+ }, "strict", z.ZodTypeAny, {
129
+ sha256: string;
130
+ content: string;
131
+ source_ref: string;
132
+ size_bytes: number;
133
+ }, {
134
+ sha256: string;
135
+ content: string;
136
+ source_ref: string;
137
+ size_bytes: number;
138
+ }>, "many">;
139
+ source_refs: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
140
+ /** Told to every author: the complete candidate JSON must fit this many bytes. */
141
+ arena: z.ZodObject<{
142
+ candidate_count: z.ZodNumber;
143
+ candidate_max_bytes: z.ZodNumber;
144
+ }, "strict", z.ZodTypeAny, {
145
+ candidate_count: number;
146
+ candidate_max_bytes: number;
147
+ }, {
148
+ candidate_count: number;
149
+ candidate_max_bytes: number;
150
+ }>;
151
+ frozen_digest: z.ZodString;
152
+ }, "strict", z.ZodTypeAny, {
153
+ schema_version: "architecture-arena-shared-input-v2";
154
+ sources: {
155
+ sha256: string;
156
+ content: string;
157
+ source_ref: string;
158
+ size_bytes: number;
159
+ }[];
160
+ frozen_digest: string;
161
+ requirements: string;
162
+ source_identity: string;
163
+ source_refs: string[];
164
+ arena: {
165
+ candidate_count: number;
166
+ candidate_max_bytes: number;
167
+ };
168
+ }, {
169
+ schema_version: "architecture-arena-shared-input-v2";
170
+ sources: {
171
+ sha256: string;
172
+ content: string;
173
+ source_ref: string;
174
+ size_bytes: number;
175
+ }[];
176
+ frozen_digest: string;
177
+ requirements: string;
178
+ source_identity: string;
179
+ source_refs: string[];
180
+ arena: {
181
+ candidate_count: number;
182
+ candidate_max_bytes: number;
183
+ };
184
+ }>;
185
+ candidates: z.ZodArray<z.ZodObject<{
186
+ alias: z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>;
187
+ body: z.ZodObject<{
188
+ schema_version: z.ZodLiteral<"architecture-candidate-v1">;
189
+ frozen_digest: z.ZodString;
190
+ caller_usage: z.ZodString;
191
+ public_signatures: z.ZodString;
192
+ ownership: z.ZodString;
193
+ failure_behavior: z.ZodString;
194
+ tradeoffs: z.ZodArray<z.ZodString, "many">;
195
+ assumptions: z.ZodArray<z.ZodString, "many">;
196
+ rejected_alternatives: z.ZodArray<z.ZodString, "many">;
197
+ source_refs: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
198
+ }, "strict", z.ZodTypeAny, {
199
+ schema_version: "architecture-candidate-v1";
200
+ frozen_digest: string;
201
+ source_refs: string[];
202
+ caller_usage: string;
203
+ public_signatures: string;
204
+ ownership: string;
205
+ failure_behavior: string;
206
+ tradeoffs: string[];
207
+ assumptions: string[];
208
+ rejected_alternatives: string[];
209
+ }, {
210
+ schema_version: "architecture-candidate-v1";
211
+ frozen_digest: string;
212
+ source_refs: string[];
213
+ caller_usage: string;
214
+ public_signatures: string;
215
+ ownership: string;
216
+ failure_behavior: string;
217
+ tradeoffs: string[];
218
+ assumptions: string[];
219
+ rejected_alternatives: string[];
220
+ }>;
221
+ }, "strict", z.ZodTypeAny, {
222
+ body: {
223
+ schema_version: "architecture-candidate-v1";
224
+ frozen_digest: string;
225
+ source_refs: string[];
226
+ caller_usage: string;
227
+ public_signatures: string;
228
+ ownership: string;
229
+ failure_behavior: string;
230
+ tradeoffs: string[];
231
+ assumptions: string[];
232
+ rejected_alternatives: string[];
233
+ };
234
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
235
+ }, {
236
+ body: {
237
+ schema_version: "architecture-candidate-v1";
238
+ frozen_digest: string;
239
+ source_refs: string[];
240
+ caller_usage: string;
241
+ public_signatures: string;
242
+ ownership: string;
243
+ failure_behavior: string;
244
+ tradeoffs: string[];
245
+ assumptions: string[];
246
+ rejected_alternatives: string[];
247
+ };
248
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
249
+ }>, "many">;
250
+ }, "strict", z.ZodTypeAny, {
251
+ schema_version: "architecture-arena-judge-view-v2";
252
+ shared: {
253
+ schema_version: "architecture-arena-shared-input-v2";
254
+ sources: {
255
+ sha256: string;
256
+ content: string;
257
+ source_ref: string;
258
+ size_bytes: number;
259
+ }[];
260
+ frozen_digest: string;
261
+ requirements: string;
262
+ source_identity: string;
263
+ source_refs: string[];
264
+ arena: {
265
+ candidate_count: number;
266
+ candidate_max_bytes: number;
267
+ };
268
+ };
269
+ candidates: {
270
+ body: {
271
+ schema_version: "architecture-candidate-v1";
272
+ frozen_digest: string;
273
+ source_refs: string[];
274
+ caller_usage: string;
275
+ public_signatures: string;
276
+ ownership: string;
277
+ failure_behavior: string;
278
+ tradeoffs: string[];
279
+ assumptions: string[];
280
+ rejected_alternatives: string[];
281
+ };
282
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
283
+ }[];
284
+ }, {
285
+ schema_version: "architecture-arena-judge-view-v2";
286
+ shared: {
287
+ schema_version: "architecture-arena-shared-input-v2";
288
+ sources: {
289
+ sha256: string;
290
+ content: string;
291
+ source_ref: string;
292
+ size_bytes: number;
293
+ }[];
294
+ frozen_digest: string;
295
+ requirements: string;
296
+ source_identity: string;
297
+ source_refs: string[];
298
+ arena: {
299
+ candidate_count: number;
300
+ candidate_max_bytes: number;
301
+ };
302
+ };
303
+ candidates: {
304
+ body: {
305
+ schema_version: "architecture-candidate-v1";
306
+ frozen_digest: string;
307
+ source_refs: string[];
308
+ caller_usage: string;
309
+ public_signatures: string;
310
+ ownership: string;
311
+ failure_behavior: string;
312
+ tradeoffs: string[];
313
+ assumptions: string[];
314
+ rejected_alternatives: string[];
315
+ };
316
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
317
+ }[];
318
+ }>, {
319
+ schema_version: "architecture-arena-judge-view-v2";
320
+ shared: {
321
+ schema_version: "architecture-arena-shared-input-v2";
322
+ sources: {
323
+ sha256: string;
324
+ content: string;
325
+ source_ref: string;
326
+ size_bytes: number;
327
+ }[];
328
+ frozen_digest: string;
329
+ requirements: string;
330
+ source_identity: string;
331
+ source_refs: string[];
332
+ arena: {
333
+ candidate_count: number;
334
+ candidate_max_bytes: number;
335
+ };
336
+ };
337
+ candidates: {
338
+ body: {
339
+ schema_version: "architecture-candidate-v1";
340
+ frozen_digest: string;
341
+ source_refs: string[];
342
+ caller_usage: string;
343
+ public_signatures: string;
344
+ ownership: string;
345
+ failure_behavior: string;
346
+ tradeoffs: string[];
347
+ assumptions: string[];
348
+ rejected_alternatives: string[];
349
+ };
350
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
351
+ }[];
352
+ }, {
353
+ schema_version: "architecture-arena-judge-view-v2";
354
+ shared: {
355
+ schema_version: "architecture-arena-shared-input-v2";
356
+ sources: {
357
+ sha256: string;
358
+ content: string;
359
+ source_ref: string;
360
+ size_bytes: number;
361
+ }[];
362
+ frozen_digest: string;
363
+ requirements: string;
364
+ source_identity: string;
365
+ source_refs: string[];
366
+ arena: {
367
+ candidate_count: number;
368
+ candidate_max_bytes: number;
369
+ };
370
+ };
371
+ candidates: {
372
+ body: {
373
+ schema_version: "architecture-candidate-v1";
374
+ frozen_digest: string;
375
+ source_refs: string[];
376
+ caller_usage: string;
377
+ public_signatures: string;
378
+ ownership: string;
379
+ failure_behavior: string;
380
+ tradeoffs: string[];
381
+ assumptions: string[];
382
+ rejected_alternatives: string[];
383
+ };
384
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
385
+ }[];
386
+ }>;
387
+ export type ArenaJudgeView = z.infer<typeof ArenaJudgeViewSchema>;
388
+ export declare const ArenaJudgeSchema: z.ZodEffects<z.ZodObject<{
389
+ schema_version: z.ZodLiteral<"architecture-arena-judge-v2">;
390
+ frozen_digest: z.ZodString;
391
+ assessments: z.ZodArray<z.ZodObject<{
392
+ alias: z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>;
393
+ strengths: z.ZodArray<z.ZodString, "many">;
394
+ weaknesses: z.ZodArray<z.ZodString, "many">;
395
+ }, "strict", z.ZodTypeAny, {
396
+ strengths: string[];
397
+ weaknesses: string[];
398
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
399
+ }, {
400
+ strengths: string[];
401
+ weaknesses: string[];
402
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
403
+ }>, "many">;
404
+ ranking: z.ZodArray<z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>, "many">;
405
+ recommendation: z.ZodUnion<[z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>, z.ZodLiteral<"neither">]>;
406
+ rationale: z.ZodString;
407
+ source_refs: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
408
+ }, "strict", z.ZodTypeAny, {
409
+ schema_version: "architecture-arena-judge-v2";
410
+ rationale: string;
411
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
412
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
413
+ frozen_digest: string;
414
+ source_refs: string[];
415
+ assessments: {
416
+ strengths: string[];
417
+ weaknesses: string[];
418
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
419
+ }[];
420
+ }, {
421
+ schema_version: "architecture-arena-judge-v2";
422
+ rationale: string;
423
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
424
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
425
+ frozen_digest: string;
426
+ source_refs: string[];
427
+ assessments: {
428
+ strengths: string[];
429
+ weaknesses: string[];
430
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
431
+ }[];
432
+ }>, {
433
+ schema_version: "architecture-arena-judge-v2";
434
+ rationale: string;
435
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
436
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
437
+ frozen_digest: string;
438
+ source_refs: string[];
439
+ assessments: {
440
+ strengths: string[];
441
+ weaknesses: string[];
442
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
443
+ }[];
444
+ }, {
445
+ schema_version: "architecture-arena-judge-v2";
446
+ rationale: string;
447
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
448
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
449
+ frozen_digest: string;
450
+ source_refs: string[];
451
+ assessments: {
452
+ strengths: string[];
453
+ weaknesses: string[];
454
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
455
+ }[];
456
+ }>;
457
+ export type ArenaJudge = z.infer<typeof ArenaJudgeSchema>;
458
+ /** Server-materialized seat plan (members + chairman), stance text included. */
459
+ export declare const ArenaSeatPlanSchema: z.ZodEffects<z.ZodObject<{
460
+ schema_version: z.ZodLiteral<"architecture-arena-seats-v2">;
461
+ authors: z.ZodArray<z.ZodObject<{
462
+ member_index: z.ZodNumber;
463
+ call_id: z.ZodEnum<["author_a", "author_b", "author_c", "author_d"]>;
464
+ route: z.ZodObject<{
465
+ cli_name: z.ZodString;
466
+ model: z.ZodOptional<z.ZodString>;
467
+ effort: z.ZodOptional<z.ZodString>;
468
+ }, "strict", z.ZodTypeAny, {
469
+ cli_name: string;
470
+ model?: string | undefined;
471
+ effort?: string | undefined;
472
+ }, {
473
+ cli_name: string;
474
+ model?: string | undefined;
475
+ effort?: string | undefined;
476
+ }>;
477
+ stance: z.ZodOptional<z.ZodString>;
478
+ }, "strict", z.ZodTypeAny, {
479
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
480
+ route: {
481
+ cli_name: string;
482
+ model?: string | undefined;
483
+ effort?: string | undefined;
484
+ };
485
+ member_index: number;
486
+ stance?: string | undefined;
487
+ }, {
488
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
489
+ route: {
490
+ cli_name: string;
491
+ model?: string | undefined;
492
+ effort?: string | undefined;
493
+ };
494
+ member_index: number;
495
+ stance?: string | undefined;
496
+ }>, "many">;
497
+ judge: z.ZodObject<{
498
+ cli_name: z.ZodString;
499
+ model: z.ZodOptional<z.ZodString>;
500
+ effort: z.ZodOptional<z.ZodString>;
501
+ }, "strict", z.ZodTypeAny, {
502
+ cli_name: string;
503
+ model?: string | undefined;
504
+ effort?: string | undefined;
505
+ }, {
506
+ cli_name: string;
507
+ model?: string | undefined;
508
+ effort?: string | undefined;
509
+ }>;
510
+ }, "strict", z.ZodTypeAny, {
511
+ schema_version: "architecture-arena-seats-v2";
512
+ judge: {
513
+ cli_name: string;
514
+ model?: string | undefined;
515
+ effort?: string | undefined;
516
+ };
517
+ authors: {
518
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
519
+ route: {
520
+ cli_name: string;
521
+ model?: string | undefined;
522
+ effort?: string | undefined;
523
+ };
524
+ member_index: number;
525
+ stance?: string | undefined;
526
+ }[];
527
+ }, {
528
+ schema_version: "architecture-arena-seats-v2";
529
+ judge: {
530
+ cli_name: string;
531
+ model?: string | undefined;
532
+ effort?: string | undefined;
533
+ };
534
+ authors: {
535
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
536
+ route: {
537
+ cli_name: string;
538
+ model?: string | undefined;
539
+ effort?: string | undefined;
540
+ };
541
+ member_index: number;
542
+ stance?: string | undefined;
543
+ }[];
544
+ }>, {
545
+ schema_version: "architecture-arena-seats-v2";
546
+ judge: {
547
+ cli_name: string;
548
+ model?: string | undefined;
549
+ effort?: string | undefined;
550
+ };
551
+ authors: {
552
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
553
+ route: {
554
+ cli_name: string;
555
+ model?: string | undefined;
556
+ effort?: string | undefined;
557
+ };
558
+ member_index: number;
559
+ stance?: string | undefined;
560
+ }[];
561
+ }, {
562
+ schema_version: "architecture-arena-seats-v2";
563
+ judge: {
564
+ cli_name: string;
565
+ model?: string | undefined;
566
+ effort?: string | undefined;
567
+ };
568
+ authors: {
569
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
570
+ route: {
571
+ cli_name: string;
572
+ model?: string | undefined;
573
+ effort?: string | undefined;
574
+ };
575
+ member_index: number;
576
+ stance?: string | undefined;
577
+ }[];
578
+ }>;
579
+ export type ArenaSeatPlan = z.infer<typeof ArenaSeatPlanSchema>;
580
+ export declare const ArenaStateSchema: z.ZodEffects<z.ZodObject<{
581
+ schema_version: z.ZodLiteral<"architecture-arena-state-v2">;
582
+ run_id: z.ZodString;
583
+ definition_sha256: z.ZodString;
584
+ variables_sha256: z.ZodString;
585
+ frozen_digest: z.ZodString;
586
+ candidate_max_bytes: z.ZodNumber;
587
+ /** presentation_order[k] = members index shown to the judge as ARENA_ALIASES[k]. */
588
+ presentation_order: z.ZodArray<z.ZodNumber, "many">;
589
+ seats: z.ZodEffects<z.ZodObject<{
590
+ schema_version: z.ZodLiteral<"architecture-arena-seats-v2">;
591
+ authors: z.ZodArray<z.ZodObject<{
592
+ member_index: z.ZodNumber;
593
+ call_id: z.ZodEnum<["author_a", "author_b", "author_c", "author_d"]>;
594
+ route: z.ZodObject<{
595
+ cli_name: z.ZodString;
596
+ model: z.ZodOptional<z.ZodString>;
597
+ effort: z.ZodOptional<z.ZodString>;
598
+ }, "strict", z.ZodTypeAny, {
599
+ cli_name: string;
600
+ model?: string | undefined;
601
+ effort?: string | undefined;
602
+ }, {
603
+ cli_name: string;
604
+ model?: string | undefined;
605
+ effort?: string | undefined;
606
+ }>;
607
+ stance: z.ZodOptional<z.ZodString>;
608
+ }, "strict", z.ZodTypeAny, {
609
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
610
+ route: {
611
+ cli_name: string;
612
+ model?: string | undefined;
613
+ effort?: string | undefined;
614
+ };
615
+ member_index: number;
616
+ stance?: string | undefined;
617
+ }, {
618
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
619
+ route: {
620
+ cli_name: string;
621
+ model?: string | undefined;
622
+ effort?: string | undefined;
623
+ };
624
+ member_index: number;
625
+ stance?: string | undefined;
626
+ }>, "many">;
627
+ judge: z.ZodObject<{
628
+ cli_name: z.ZodString;
629
+ model: z.ZodOptional<z.ZodString>;
630
+ effort: z.ZodOptional<z.ZodString>;
631
+ }, "strict", z.ZodTypeAny, {
632
+ cli_name: string;
633
+ model?: string | undefined;
634
+ effort?: string | undefined;
635
+ }, {
636
+ cli_name: string;
637
+ model?: string | undefined;
638
+ effort?: string | undefined;
639
+ }>;
640
+ }, "strict", z.ZodTypeAny, {
641
+ schema_version: "architecture-arena-seats-v2";
642
+ judge: {
643
+ cli_name: string;
644
+ model?: string | undefined;
645
+ effort?: string | undefined;
646
+ };
647
+ authors: {
648
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
649
+ route: {
650
+ cli_name: string;
651
+ model?: string | undefined;
652
+ effort?: string | undefined;
653
+ };
654
+ member_index: number;
655
+ stance?: string | undefined;
656
+ }[];
657
+ }, {
658
+ schema_version: "architecture-arena-seats-v2";
659
+ judge: {
660
+ cli_name: string;
661
+ model?: string | undefined;
662
+ effort?: string | undefined;
663
+ };
664
+ authors: {
665
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
666
+ route: {
667
+ cli_name: string;
668
+ model?: string | undefined;
669
+ effort?: string | undefined;
670
+ };
671
+ member_index: number;
672
+ stance?: string | undefined;
673
+ }[];
674
+ }>, {
675
+ schema_version: "architecture-arena-seats-v2";
676
+ judge: {
677
+ cli_name: string;
678
+ model?: string | undefined;
679
+ effort?: string | undefined;
680
+ };
681
+ authors: {
682
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
683
+ route: {
684
+ cli_name: string;
685
+ model?: string | undefined;
686
+ effort?: string | undefined;
687
+ };
688
+ member_index: number;
689
+ stance?: string | undefined;
690
+ }[];
691
+ }, {
692
+ schema_version: "architecture-arena-seats-v2";
693
+ judge: {
694
+ cli_name: string;
695
+ model?: string | undefined;
696
+ effort?: string | undefined;
697
+ };
698
+ authors: {
699
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
700
+ route: {
701
+ cli_name: string;
702
+ model?: string | undefined;
703
+ effort?: string | undefined;
704
+ };
705
+ member_index: number;
706
+ stance?: string | undefined;
707
+ }[];
708
+ }>;
709
+ source_files: z.ZodArray<z.ZodObject<{
710
+ path: z.ZodString;
711
+ sha256: z.ZodString;
712
+ }, "strict", z.ZodTypeAny, {
713
+ path: string;
714
+ sha256: string;
715
+ }, {
716
+ path: string;
717
+ sha256: string;
718
+ }>, "many">;
719
+ artifacts: z.ZodRecord<z.ZodString, z.ZodObject<{
720
+ path: z.ZodString;
721
+ sha256: z.ZodString;
722
+ }, "strict", z.ZodTypeAny, {
723
+ path: string;
724
+ sha256: string;
725
+ }, {
726
+ path: string;
727
+ sha256: string;
728
+ }>>;
729
+ }, "strict", z.ZodTypeAny, {
730
+ schema_version: "architecture-arena-state-v2";
731
+ seats: {
732
+ schema_version: "architecture-arena-seats-v2";
733
+ judge: {
734
+ cli_name: string;
735
+ model?: string | undefined;
736
+ effort?: string | undefined;
737
+ };
738
+ authors: {
739
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
740
+ route: {
741
+ cli_name: string;
742
+ model?: string | undefined;
743
+ effort?: string | undefined;
744
+ };
745
+ member_index: number;
746
+ stance?: string | undefined;
747
+ }[];
748
+ };
749
+ run_id: string;
750
+ frozen_digest: string;
751
+ definition_sha256: string;
752
+ variables_sha256: string;
753
+ source_files: {
754
+ path: string;
755
+ sha256: string;
756
+ }[];
757
+ artifacts: Record<string, {
758
+ path: string;
759
+ sha256: string;
760
+ }>;
761
+ candidate_max_bytes: number;
762
+ presentation_order: number[];
763
+ }, {
764
+ schema_version: "architecture-arena-state-v2";
765
+ seats: {
766
+ schema_version: "architecture-arena-seats-v2";
767
+ judge: {
768
+ cli_name: string;
769
+ model?: string | undefined;
770
+ effort?: string | undefined;
771
+ };
772
+ authors: {
773
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
774
+ route: {
775
+ cli_name: string;
776
+ model?: string | undefined;
777
+ effort?: string | undefined;
778
+ };
779
+ member_index: number;
780
+ stance?: string | undefined;
781
+ }[];
782
+ };
783
+ run_id: string;
784
+ frozen_digest: string;
785
+ definition_sha256: string;
786
+ variables_sha256: string;
787
+ source_files: {
788
+ path: string;
789
+ sha256: string;
790
+ }[];
791
+ artifacts: Record<string, {
792
+ path: string;
793
+ sha256: string;
794
+ }>;
795
+ candidate_max_bytes: number;
796
+ presentation_order: number[];
797
+ }>, {
798
+ schema_version: "architecture-arena-state-v2";
799
+ seats: {
800
+ schema_version: "architecture-arena-seats-v2";
801
+ judge: {
802
+ cli_name: string;
803
+ model?: string | undefined;
804
+ effort?: string | undefined;
805
+ };
806
+ authors: {
807
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
808
+ route: {
809
+ cli_name: string;
810
+ model?: string | undefined;
811
+ effort?: string | undefined;
812
+ };
813
+ member_index: number;
814
+ stance?: string | undefined;
815
+ }[];
816
+ };
817
+ run_id: string;
818
+ frozen_digest: string;
819
+ definition_sha256: string;
820
+ variables_sha256: string;
821
+ source_files: {
822
+ path: string;
823
+ sha256: string;
824
+ }[];
825
+ artifacts: Record<string, {
826
+ path: string;
827
+ sha256: string;
828
+ }>;
829
+ candidate_max_bytes: number;
830
+ presentation_order: number[];
831
+ }, {
832
+ schema_version: "architecture-arena-state-v2";
833
+ seats: {
834
+ schema_version: "architecture-arena-seats-v2";
835
+ judge: {
836
+ cli_name: string;
837
+ model?: string | undefined;
838
+ effort?: string | undefined;
839
+ };
840
+ authors: {
841
+ call_id: "author_a" | "author_b" | "author_c" | "author_d";
842
+ route: {
843
+ cli_name: string;
844
+ model?: string | undefined;
845
+ effort?: string | undefined;
846
+ };
847
+ member_index: number;
848
+ stance?: string | undefined;
849
+ }[];
850
+ };
851
+ run_id: string;
852
+ frozen_digest: string;
853
+ definition_sha256: string;
854
+ variables_sha256: string;
855
+ source_files: {
856
+ path: string;
857
+ sha256: string;
858
+ }[];
859
+ artifacts: Record<string, {
860
+ path: string;
861
+ sha256: string;
862
+ }>;
863
+ candidate_max_bytes: number;
864
+ presentation_order: number[];
865
+ }>;
866
+ export type ArenaState = z.infer<typeof ArenaStateSchema>;
867
+ export declare const ArenaCapacitySchema: z.ZodObject<{
868
+ schema_version: z.ZodLiteral<"architecture-arena-capacity-v2">;
869
+ run_id: z.ZodString;
870
+ status: z.ZodLiteral<"rejected">;
871
+ reason: z.ZodLiteral<"candidate_cap_below_floor">;
872
+ candidate_count: z.ZodNumber;
873
+ frozen_shared_bytes: z.ZodNumber;
874
+ judge_view_budget_bytes: z.ZodNumber;
875
+ judge_fixed_overhead_bytes: z.ZodNumber;
876
+ derived_candidate_cap_bytes: z.ZodNumber;
877
+ floor_bytes: z.ZodNumber;
878
+ }, "strict", z.ZodTypeAny, {
879
+ status: "rejected";
880
+ schema_version: "architecture-arena-capacity-v2";
881
+ reason: "candidate_cap_below_floor";
882
+ run_id: string;
883
+ candidate_count: number;
884
+ frozen_shared_bytes: number;
885
+ judge_view_budget_bytes: number;
886
+ judge_fixed_overhead_bytes: number;
887
+ derived_candidate_cap_bytes: number;
888
+ floor_bytes: number;
889
+ }, {
890
+ status: "rejected";
891
+ schema_version: "architecture-arena-capacity-v2";
892
+ reason: "candidate_cap_below_floor";
893
+ run_id: string;
894
+ candidate_count: number;
895
+ frozen_shared_bytes: number;
896
+ judge_view_budget_bytes: number;
897
+ judge_fixed_overhead_bytes: number;
898
+ derived_candidate_cap_bytes: number;
899
+ floor_bytes: number;
900
+ }>;
901
+ export type ArenaCapacity = z.infer<typeof ArenaCapacitySchema>;
902
+ export declare const ArenaRecordSchema: z.ZodEffects<z.ZodObject<{
903
+ schema_version: z.ZodLiteral<"architecture-arena-record-v2">;
904
+ run_id: z.ZodString;
905
+ status: z.ZodEnum<["complete", "incomplete"]>;
906
+ missing: z.ZodArray<z.ZodString, "many">;
907
+ missing_participants: z.ZodArray<z.ZodObject<{
908
+ participant: z.ZodString;
909
+ member_index: z.ZodOptional<z.ZodNumber>;
910
+ reason: z.ZodEnum<["busy", "failed", "invalid", "not_dispatched", "integrity"]>;
911
+ }, "strict", z.ZodTypeAny, {
912
+ reason: "failed" | "invalid" | "busy" | "not_dispatched" | "integrity";
913
+ participant: string;
914
+ member_index?: number | undefined;
915
+ }, {
916
+ reason: "failed" | "invalid" | "busy" | "not_dispatched" | "integrity";
917
+ participant: string;
918
+ member_index?: number | undefined;
919
+ }>, "many">;
920
+ candidate_count: z.ZodNumber;
921
+ candidate_max_bytes: z.ZodOptional<z.ZodNumber>;
922
+ frozen_digest: z.ZodOptional<z.ZodString>;
923
+ source_identity: z.ZodOptional<z.ZodString>;
924
+ evidence: z.ZodArray<z.ZodObject<{
925
+ reference: z.ZodString;
926
+ path: z.ZodString;
927
+ sha256: z.ZodString;
928
+ }, "strict", z.ZodTypeAny, {
929
+ path: string;
930
+ sha256: string;
931
+ reference: string;
932
+ }, {
933
+ path: string;
934
+ sha256: string;
935
+ reference: string;
936
+ }>, "many">;
937
+ candidates: z.ZodArray<z.ZodObject<{
938
+ alias: z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>;
939
+ member_index: z.ZodNumber;
940
+ route: z.ZodObject<{
941
+ cli_name: z.ZodString;
942
+ model: z.ZodOptional<z.ZodString>;
943
+ effort: z.ZodOptional<z.ZodString>;
944
+ }, "strict", z.ZodTypeAny, {
945
+ cli_name: string;
946
+ model?: string | undefined;
947
+ effort?: string | undefined;
948
+ }, {
949
+ cli_name: string;
950
+ model?: string | undefined;
951
+ effort?: string | undefined;
952
+ }>;
953
+ stance: z.ZodOptional<z.ZodString>;
954
+ body_sha256: z.ZodString;
955
+ duplicate_of: z.ZodOptional<z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>>;
956
+ body: z.ZodObject<{
957
+ schema_version: z.ZodLiteral<"architecture-candidate-v1">;
958
+ frozen_digest: z.ZodString;
959
+ caller_usage: z.ZodString;
960
+ public_signatures: z.ZodString;
961
+ ownership: z.ZodString;
962
+ failure_behavior: z.ZodString;
963
+ tradeoffs: z.ZodArray<z.ZodString, "many">;
964
+ assumptions: z.ZodArray<z.ZodString, "many">;
965
+ rejected_alternatives: z.ZodArray<z.ZodString, "many">;
966
+ source_refs: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
967
+ }, "strict", z.ZodTypeAny, {
968
+ schema_version: "architecture-candidate-v1";
969
+ frozen_digest: string;
970
+ source_refs: string[];
971
+ caller_usage: string;
972
+ public_signatures: string;
973
+ ownership: string;
974
+ failure_behavior: string;
975
+ tradeoffs: string[];
976
+ assumptions: string[];
977
+ rejected_alternatives: string[];
978
+ }, {
979
+ schema_version: "architecture-candidate-v1";
980
+ frozen_digest: string;
981
+ source_refs: string[];
982
+ caller_usage: string;
983
+ public_signatures: string;
984
+ ownership: string;
985
+ failure_behavior: string;
986
+ tradeoffs: string[];
987
+ assumptions: string[];
988
+ rejected_alternatives: string[];
989
+ }>;
990
+ }, "strict", z.ZodTypeAny, {
991
+ body: {
992
+ schema_version: "architecture-candidate-v1";
993
+ frozen_digest: string;
994
+ source_refs: string[];
995
+ caller_usage: string;
996
+ public_signatures: string;
997
+ ownership: string;
998
+ failure_behavior: string;
999
+ tradeoffs: string[];
1000
+ assumptions: string[];
1001
+ rejected_alternatives: string[];
1002
+ };
1003
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1004
+ route: {
1005
+ cli_name: string;
1006
+ model?: string | undefined;
1007
+ effort?: string | undefined;
1008
+ };
1009
+ member_index: number;
1010
+ body_sha256: string;
1011
+ stance?: string | undefined;
1012
+ duplicate_of?: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D" | undefined;
1013
+ }, {
1014
+ body: {
1015
+ schema_version: "architecture-candidate-v1";
1016
+ frozen_digest: string;
1017
+ source_refs: string[];
1018
+ caller_usage: string;
1019
+ public_signatures: string;
1020
+ ownership: string;
1021
+ failure_behavior: string;
1022
+ tradeoffs: string[];
1023
+ assumptions: string[];
1024
+ rejected_alternatives: string[];
1025
+ };
1026
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1027
+ route: {
1028
+ cli_name: string;
1029
+ model?: string | undefined;
1030
+ effort?: string | undefined;
1031
+ };
1032
+ member_index: number;
1033
+ body_sha256: string;
1034
+ stance?: string | undefined;
1035
+ duplicate_of?: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D" | undefined;
1036
+ }>, "many">;
1037
+ judge: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1038
+ schema_version: z.ZodLiteral<"architecture-arena-judge-v2">;
1039
+ frozen_digest: z.ZodString;
1040
+ assessments: z.ZodArray<z.ZodObject<{
1041
+ alias: z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>;
1042
+ strengths: z.ZodArray<z.ZodString, "many">;
1043
+ weaknesses: z.ZodArray<z.ZodString, "many">;
1044
+ }, "strict", z.ZodTypeAny, {
1045
+ strengths: string[];
1046
+ weaknesses: string[];
1047
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1048
+ }, {
1049
+ strengths: string[];
1050
+ weaknesses: string[];
1051
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1052
+ }>, "many">;
1053
+ ranking: z.ZodArray<z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>, "many">;
1054
+ recommendation: z.ZodUnion<[z.ZodEnum<["candidate_A", "candidate_B", "candidate_C", "candidate_D"]>, z.ZodLiteral<"neither">]>;
1055
+ rationale: z.ZodString;
1056
+ source_refs: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
1057
+ }, "strict", z.ZodTypeAny, {
1058
+ schema_version: "architecture-arena-judge-v2";
1059
+ rationale: string;
1060
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1061
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1062
+ frozen_digest: string;
1063
+ source_refs: string[];
1064
+ assessments: {
1065
+ strengths: string[];
1066
+ weaknesses: string[];
1067
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1068
+ }[];
1069
+ }, {
1070
+ schema_version: "architecture-arena-judge-v2";
1071
+ rationale: string;
1072
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1073
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1074
+ frozen_digest: string;
1075
+ source_refs: string[];
1076
+ assessments: {
1077
+ strengths: string[];
1078
+ weaknesses: string[];
1079
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1080
+ }[];
1081
+ }>, {
1082
+ schema_version: "architecture-arena-judge-v2";
1083
+ rationale: string;
1084
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1085
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1086
+ frozen_digest: string;
1087
+ source_refs: string[];
1088
+ assessments: {
1089
+ strengths: string[];
1090
+ weaknesses: string[];
1091
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1092
+ }[];
1093
+ }, {
1094
+ schema_version: "architecture-arena-judge-v2";
1095
+ rationale: string;
1096
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1097
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1098
+ frozen_digest: string;
1099
+ source_refs: string[];
1100
+ assessments: {
1101
+ strengths: string[];
1102
+ weaknesses: string[];
1103
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1104
+ }[];
1105
+ }>>;
1106
+ owner_acceptance: z.ZodLiteral<"not_recorded">;
1107
+ owner_next_steps: z.ZodArray<z.ZodString, "many">;
1108
+ limitations: z.ZodArray<z.ZodString, "many">;
1109
+ }, "strict", z.ZodTypeAny, {
1110
+ status: "complete" | "incomplete";
1111
+ schema_version: "architecture-arena-record-v2";
1112
+ missing: string[];
1113
+ run_id: string;
1114
+ evidence: {
1115
+ path: string;
1116
+ sha256: string;
1117
+ reference: string;
1118
+ }[];
1119
+ candidates: {
1120
+ body: {
1121
+ schema_version: "architecture-candidate-v1";
1122
+ frozen_digest: string;
1123
+ source_refs: string[];
1124
+ caller_usage: string;
1125
+ public_signatures: string;
1126
+ ownership: string;
1127
+ failure_behavior: string;
1128
+ tradeoffs: string[];
1129
+ assumptions: string[];
1130
+ rejected_alternatives: string[];
1131
+ };
1132
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1133
+ route: {
1134
+ cli_name: string;
1135
+ model?: string | undefined;
1136
+ effort?: string | undefined;
1137
+ };
1138
+ member_index: number;
1139
+ body_sha256: string;
1140
+ stance?: string | undefined;
1141
+ duplicate_of?: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D" | undefined;
1142
+ }[];
1143
+ owner_acceptance: "not_recorded";
1144
+ owner_next_steps: string[];
1145
+ limitations: string[];
1146
+ candidate_count: number;
1147
+ missing_participants: {
1148
+ reason: "failed" | "invalid" | "busy" | "not_dispatched" | "integrity";
1149
+ participant: string;
1150
+ member_index?: number | undefined;
1151
+ }[];
1152
+ frozen_digest?: string | undefined;
1153
+ source_identity?: string | undefined;
1154
+ judge?: {
1155
+ schema_version: "architecture-arena-judge-v2";
1156
+ rationale: string;
1157
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1158
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1159
+ frozen_digest: string;
1160
+ source_refs: string[];
1161
+ assessments: {
1162
+ strengths: string[];
1163
+ weaknesses: string[];
1164
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1165
+ }[];
1166
+ } | undefined;
1167
+ candidate_max_bytes?: number | undefined;
1168
+ }, {
1169
+ status: "complete" | "incomplete";
1170
+ schema_version: "architecture-arena-record-v2";
1171
+ missing: string[];
1172
+ run_id: string;
1173
+ evidence: {
1174
+ path: string;
1175
+ sha256: string;
1176
+ reference: string;
1177
+ }[];
1178
+ candidates: {
1179
+ body: {
1180
+ schema_version: "architecture-candidate-v1";
1181
+ frozen_digest: string;
1182
+ source_refs: string[];
1183
+ caller_usage: string;
1184
+ public_signatures: string;
1185
+ ownership: string;
1186
+ failure_behavior: string;
1187
+ tradeoffs: string[];
1188
+ assumptions: string[];
1189
+ rejected_alternatives: string[];
1190
+ };
1191
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1192
+ route: {
1193
+ cli_name: string;
1194
+ model?: string | undefined;
1195
+ effort?: string | undefined;
1196
+ };
1197
+ member_index: number;
1198
+ body_sha256: string;
1199
+ stance?: string | undefined;
1200
+ duplicate_of?: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D" | undefined;
1201
+ }[];
1202
+ owner_acceptance: "not_recorded";
1203
+ owner_next_steps: string[];
1204
+ limitations: string[];
1205
+ candidate_count: number;
1206
+ missing_participants: {
1207
+ reason: "failed" | "invalid" | "busy" | "not_dispatched" | "integrity";
1208
+ participant: string;
1209
+ member_index?: number | undefined;
1210
+ }[];
1211
+ frozen_digest?: string | undefined;
1212
+ source_identity?: string | undefined;
1213
+ judge?: {
1214
+ schema_version: "architecture-arena-judge-v2";
1215
+ rationale: string;
1216
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1217
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1218
+ frozen_digest: string;
1219
+ source_refs: string[];
1220
+ assessments: {
1221
+ strengths: string[];
1222
+ weaknesses: string[];
1223
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1224
+ }[];
1225
+ } | undefined;
1226
+ candidate_max_bytes?: number | undefined;
1227
+ }>, {
1228
+ status: "complete" | "incomplete";
1229
+ schema_version: "architecture-arena-record-v2";
1230
+ missing: string[];
1231
+ run_id: string;
1232
+ evidence: {
1233
+ path: string;
1234
+ sha256: string;
1235
+ reference: string;
1236
+ }[];
1237
+ candidates: {
1238
+ body: {
1239
+ schema_version: "architecture-candidate-v1";
1240
+ frozen_digest: string;
1241
+ source_refs: string[];
1242
+ caller_usage: string;
1243
+ public_signatures: string;
1244
+ ownership: string;
1245
+ failure_behavior: string;
1246
+ tradeoffs: string[];
1247
+ assumptions: string[];
1248
+ rejected_alternatives: string[];
1249
+ };
1250
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1251
+ route: {
1252
+ cli_name: string;
1253
+ model?: string | undefined;
1254
+ effort?: string | undefined;
1255
+ };
1256
+ member_index: number;
1257
+ body_sha256: string;
1258
+ stance?: string | undefined;
1259
+ duplicate_of?: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D" | undefined;
1260
+ }[];
1261
+ owner_acceptance: "not_recorded";
1262
+ owner_next_steps: string[];
1263
+ limitations: string[];
1264
+ candidate_count: number;
1265
+ missing_participants: {
1266
+ reason: "failed" | "invalid" | "busy" | "not_dispatched" | "integrity";
1267
+ participant: string;
1268
+ member_index?: number | undefined;
1269
+ }[];
1270
+ frozen_digest?: string | undefined;
1271
+ source_identity?: string | undefined;
1272
+ judge?: {
1273
+ schema_version: "architecture-arena-judge-v2";
1274
+ rationale: string;
1275
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1276
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1277
+ frozen_digest: string;
1278
+ source_refs: string[];
1279
+ assessments: {
1280
+ strengths: string[];
1281
+ weaknesses: string[];
1282
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1283
+ }[];
1284
+ } | undefined;
1285
+ candidate_max_bytes?: number | undefined;
1286
+ }, {
1287
+ status: "complete" | "incomplete";
1288
+ schema_version: "architecture-arena-record-v2";
1289
+ missing: string[];
1290
+ run_id: string;
1291
+ evidence: {
1292
+ path: string;
1293
+ sha256: string;
1294
+ reference: string;
1295
+ }[];
1296
+ candidates: {
1297
+ body: {
1298
+ schema_version: "architecture-candidate-v1";
1299
+ frozen_digest: string;
1300
+ source_refs: string[];
1301
+ caller_usage: string;
1302
+ public_signatures: string;
1303
+ ownership: string;
1304
+ failure_behavior: string;
1305
+ tradeoffs: string[];
1306
+ assumptions: string[];
1307
+ rejected_alternatives: string[];
1308
+ };
1309
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1310
+ route: {
1311
+ cli_name: string;
1312
+ model?: string | undefined;
1313
+ effort?: string | undefined;
1314
+ };
1315
+ member_index: number;
1316
+ body_sha256: string;
1317
+ stance?: string | undefined;
1318
+ duplicate_of?: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D" | undefined;
1319
+ }[];
1320
+ owner_acceptance: "not_recorded";
1321
+ owner_next_steps: string[];
1322
+ limitations: string[];
1323
+ candidate_count: number;
1324
+ missing_participants: {
1325
+ reason: "failed" | "invalid" | "busy" | "not_dispatched" | "integrity";
1326
+ participant: string;
1327
+ member_index?: number | undefined;
1328
+ }[];
1329
+ frozen_digest?: string | undefined;
1330
+ source_identity?: string | undefined;
1331
+ judge?: {
1332
+ schema_version: "architecture-arena-judge-v2";
1333
+ rationale: string;
1334
+ recommendation: "candidate_A" | "candidate_B" | "neither" | "candidate_C" | "candidate_D";
1335
+ ranking: ("candidate_A" | "candidate_B" | "candidate_C" | "candidate_D")[];
1336
+ frozen_digest: string;
1337
+ source_refs: string[];
1338
+ assessments: {
1339
+ strengths: string[];
1340
+ weaknesses: string[];
1341
+ alias: "candidate_A" | "candidate_B" | "candidate_C" | "candidate_D";
1342
+ }[];
1343
+ } | undefined;
1344
+ candidate_max_bytes?: number | undefined;
1345
+ }>;
1346
+ export type ArenaRecord = z.infer<typeof ArenaRecordSchema>;
1347
+ export declare function assertBounded(value: unknown, maximum: number): void;
1348
+ /**
1349
+ * Per-candidate cap after freeze (C2): min(16 KiB, floor((judge view budget -
1350
+ * fixed overhead - frozen shared bytes) / n)). Below the floor the run is
1351
+ * rejected before any author dispatch; nothing is ever truncated.
1352
+ */
1353
+ export declare function deriveCandidateCap(frozenSharedBytes: number, candidateCount: number): {
1354
+ readonly cap: number;
1355
+ readonly accepted: boolean;
1356
+ };
1357
+ /**
1358
+ * Deterministic presentation permutation from the frozen digest and run id, so
1359
+ * the judge never sees authors in `members` (route) order. Aliases follow it.
1360
+ */
1361
+ export declare function presentationOrder(frozenDigest: string, runId: string, count: number): number[];
1362
+ export declare function assertArenaShared(input: unknown, expectedCount?: number): ArenaSharedInput;
1363
+ export declare function assertReferences(body: {
1364
+ frozen_digest: string;
1365
+ source_refs: string[];
1366
+ }, shared: ArenaSharedInput): void;
1367
+ /** The judge must assess and rank exactly the admitted aliases: no missing, duplicate or unknown alias. */
1368
+ export declare function assertJudgeAliases(judge: ArenaJudge, aliases: readonly string[]): void;