@xoxoai/checkmate 0.6.7 → 0.7.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 (382) hide show
  1. package/dist/checkmate.js +13375 -0
  2. package/package.json +14 -100
  3. package/plugin/.claude-plugin/plugin.json +10 -0
  4. package/plugin/bin/checkmate.ts +3 -0
  5. package/plugin/contracts/finding.schema.json +78 -0
  6. package/plugin/contracts/gap.schema.json +56 -0
  7. package/plugin/contracts/plan-candidate.schema.json +103 -0
  8. package/plugin/contracts/plan-delta.schema.json +63 -0
  9. package/plugin/contracts/plan-patch.schema.json +116 -0
  10. package/plugin/contracts/plan-request.schema.json +108 -0
  11. package/plugin/contracts/plan.schema.json +313 -0
  12. package/plugin/contracts/profile.schema.json +154 -0
  13. package/plugin/contracts/response.schema.json +25 -0
  14. package/plugin/contracts/result.schema.json +410 -0
  15. package/plugin/dist/checkmate.js +13012 -0
  16. package/plugin/package.json +4 -0
  17. package/plugin/references/browser.md +35 -0
  18. package/plugin/references/http.md +30 -0
  19. package/plugin/references/workflow.md +122 -0
  20. package/plugin/skills/execute/SKILL.md +92 -0
  21. package/plugin/skills/plan/SKILL.md +94 -0
  22. package/plugin/skills/report/SKILL.md +28 -0
  23. package/plugin/skills/revise/SKILL.md +43 -0
  24. package/plugin/skills/setup/SKILL.md +82 -0
  25. package/plugin/skills/status/SKILL.md +20 -0
  26. package/plugin/skills/ui/SKILL.md +26 -0
  27. package/plugin/src/actor.ts +21 -0
  28. package/plugin/src/cli.ts +1133 -0
  29. package/plugin/src/contracts.ts +342 -0
  30. package/plugin/src/index.ts +52 -0
  31. package/plugin/src/plans.ts +1028 -0
  32. package/plugin/src/render.ts +544 -0
  33. package/plugin/src/runs.ts +868 -0
  34. package/plugin/src/store.ts +384 -0
  35. package/plugin/src/targets.ts +205 -0
  36. package/plugin/src/types.ts +319 -0
  37. package/plugin/src/ui/assets/client.js +501 -0
  38. package/plugin/src/ui/assets/favicon.svg +1 -0
  39. package/plugin/src/ui/assets/fonts/inter-OFL.txt +93 -0
  40. package/plugin/src/ui/assets/fonts/inter.woff2 +0 -0
  41. package/plugin/src/ui/assets/fonts/jetbrains-mono-OFL.txt +93 -0
  42. package/plugin/src/ui/assets/fonts/jetbrains-mono.woff2 +0 -0
  43. package/plugin/src/ui/assets/fonts/space-grotesk-OFL.txt +93 -0
  44. package/plugin/src/ui/assets/fonts/space-grotesk.woff2 +0 -0
  45. package/plugin/src/ui/assets/style.css +1926 -0
  46. package/plugin/src/ui/edit.ts +305 -0
  47. package/plugin/src/ui/forms.ts +209 -0
  48. package/plugin/src/ui/html.ts +130 -0
  49. package/plugin/src/ui/layout.ts +198 -0
  50. package/plugin/src/ui/lists.ts +645 -0
  51. package/plugin/src/ui/plan.ts +577 -0
  52. package/plugin/src/ui/run.ts +489 -0
  53. package/plugin/src/ui/server.ts +684 -0
  54. package/plugin/src/validators.d.ts +13 -0
  55. package/plugin/src/validators.js +1 -0
  56. package/plugin/src/views.ts +839 -0
  57. package/LICENSE +0 -21
  58. package/README.md +0 -294
  59. package/bin/checkmate.js +0 -13
  60. package/dist/ai/client.d.ts +0 -64
  61. package/dist/ai/client.d.ts.map +0 -1
  62. package/dist/ai/client.js +0 -313
  63. package/dist/ai/client.js.map +0 -1
  64. package/dist/ai/message-handler.d.ts +0 -9
  65. package/dist/ai/message-handler.d.ts.map +0 -1
  66. package/dist/ai/message-handler.js +0 -50
  67. package/dist/ai/message-handler.js.map +0 -1
  68. package/dist/ai/message-history.d.ts +0 -17
  69. package/dist/ai/message-history.d.ts.map +0 -1
  70. package/dist/ai/message-history.js +0 -45
  71. package/dist/ai/message-history.js.map +0 -1
  72. package/dist/ai/prompts.d.ts +0 -4
  73. package/dist/ai/prompts.d.ts.map +0 -1
  74. package/dist/ai/prompts.js +0 -24
  75. package/dist/ai/prompts.js.map +0 -1
  76. package/dist/ai/rate-limit-policy.d.ts +0 -9
  77. package/dist/ai/rate-limit-policy.d.ts.map +0 -1
  78. package/dist/ai/rate-limit-policy.js +0 -34
  79. package/dist/ai/rate-limit-policy.js.map +0 -1
  80. package/dist/ai/tool-response-handler.d.ts +0 -16
  81. package/dist/ai/tool-response-handler.d.ts.map +0 -1
  82. package/dist/ai/tool-response-handler.js +0 -85
  83. package/dist/ai/tool-response-handler.js.map +0 -1
  84. package/dist/ai/turn-processor.d.ts +0 -34
  85. package/dist/ai/turn-processor.d.ts.map +0 -1
  86. package/dist/ai/turn-processor.js +0 -107
  87. package/dist/ai/turn-processor.js.map +0 -1
  88. package/dist/api/allocate-run-identity.d.ts +0 -8
  89. package/dist/api/allocate-run-identity.d.ts.map +0 -1
  90. package/dist/api/allocate-run-identity.js +0 -10
  91. package/dist/api/allocate-run-identity.js.map +0 -1
  92. package/dist/api/execute-prepared-run.d.ts +0 -22
  93. package/dist/api/execute-prepared-run.d.ts.map +0 -1
  94. package/dist/api/execute-prepared-run.js +0 -184
  95. package/dist/api/execute-prepared-run.js.map +0 -1
  96. package/dist/api/index.d.ts +0 -25
  97. package/dist/api/index.d.ts.map +0 -1
  98. package/dist/api/index.js +0 -69
  99. package/dist/api/index.js.map +0 -1
  100. package/dist/api/prepare-run.d.ts +0 -44
  101. package/dist/api/prepare-run.d.ts.map +0 -1
  102. package/dist/api/prepare-run.js +0 -261
  103. package/dist/api/prepare-run.js.map +0 -1
  104. package/dist/cli/diagnostic-relay.d.ts +0 -6
  105. package/dist/cli/diagnostic-relay.d.ts.map +0 -1
  106. package/dist/cli/diagnostic-relay.js +0 -6
  107. package/dist/cli/diagnostic-relay.js.map +0 -1
  108. package/dist/cli/main.d.ts +0 -21
  109. package/dist/cli/main.d.ts.map +0 -1
  110. package/dist/cli/main.js +0 -166
  111. package/dist/cli/main.js.map +0 -1
  112. package/dist/cli/protocol.d.ts +0 -57
  113. package/dist/cli/protocol.d.ts.map +0 -1
  114. package/dist/cli/protocol.js +0 -116
  115. package/dist/cli/protocol.js.map +0 -1
  116. package/dist/cli/reconcile-result.d.ts +0 -13
  117. package/dist/cli/reconcile-result.d.ts.map +0 -1
  118. package/dist/cli/reconcile-result.js +0 -300
  119. package/dist/cli/reconcile-result.js.map +0 -1
  120. package/dist/cli/run-parent.d.ts +0 -37
  121. package/dist/cli/run-parent.d.ts.map +0 -1
  122. package/dist/cli/run-parent.js +0 -491
  123. package/dist/cli/run-parent.js.map +0 -1
  124. package/dist/cli/signals.d.ts +0 -36
  125. package/dist/cli/signals.d.ts.map +0 -1
  126. package/dist/cli/signals.js +0 -85
  127. package/dist/cli/signals.js.map +0 -1
  128. package/dist/cli/static-commands.d.ts +0 -11
  129. package/dist/cli/static-commands.d.ts.map +0 -1
  130. package/dist/cli/static-commands.js +0 -83
  131. package/dist/cli/static-commands.js.map +0 -1
  132. package/dist/cli/worker-stream-guard.d.ts +0 -20
  133. package/dist/cli/worker-stream-guard.d.ts.map +0 -1
  134. package/dist/cli/worker-stream-guard.js +0 -41
  135. package/dist/cli/worker-stream-guard.js.map +0 -1
  136. package/dist/cli/worker.d.ts +0 -3
  137. package/dist/cli/worker.d.ts.map +0 -1
  138. package/dist/cli/worker.js +0 -111
  139. package/dist/cli/worker.js.map +0 -1
  140. package/dist/config/ingestion.d.ts +0 -58
  141. package/dist/config/ingestion.d.ts.map +0 -1
  142. package/dist/config/ingestion.js +0 -283
  143. package/dist/config/ingestion.js.map +0 -1
  144. package/dist/config/manifest.d.ts +0 -20
  145. package/dist/config/manifest.d.ts.map +0 -1
  146. package/dist/config/manifest.js +0 -91
  147. package/dist/config/manifest.js.map +0 -1
  148. package/dist/config/model-egress.d.ts +0 -10
  149. package/dist/config/model-egress.d.ts.map +0 -1
  150. package/dist/config/model-egress.js +0 -62
  151. package/dist/config/model-egress.js.map +0 -1
  152. package/dist/config/package-resolution.d.ts +0 -4
  153. package/dist/config/package-resolution.d.ts.map +0 -1
  154. package/dist/config/package-resolution.js +0 -24
  155. package/dist/config/package-resolution.js.map +0 -1
  156. package/dist/config/policy.d.ts +0 -44
  157. package/dist/config/policy.d.ts.map +0 -1
  158. package/dist/config/policy.js +0 -141
  159. package/dist/config/policy.js.map +0 -1
  160. package/dist/config/record.d.ts +0 -4
  161. package/dist/config/record.d.ts.map +0 -1
  162. package/dist/config/record.js +0 -10
  163. package/dist/config/record.js.map +0 -1
  164. package/dist/config/secrets.d.ts +0 -11
  165. package/dist/config/secrets.d.ts.map +0 -1
  166. package/dist/config/secrets.js +0 -42
  167. package/dist/config/secrets.js.map +0 -1
  168. package/dist/contracts/diagnostics.d.ts +0 -4
  169. package/dist/contracts/diagnostics.d.ts.map +0 -1
  170. package/dist/contracts/diagnostics.js +0 -31
  171. package/dist/contracts/diagnostics.js.map +0 -1
  172. package/dist/contracts/serialize.d.ts +0 -2
  173. package/dist/contracts/serialize.d.ts.map +0 -1
  174. package/dist/contracts/serialize.js +0 -90
  175. package/dist/contracts/serialize.js.map +0 -1
  176. package/dist/contracts/types.d.ts +0 -316
  177. package/dist/contracts/types.d.ts.map +0 -1
  178. package/dist/contracts/types.js +0 -74
  179. package/dist/contracts/types.js.map +0 -1
  180. package/dist/contracts/validator.d.ts +0 -8
  181. package/dist/contracts/validator.d.ts.map +0 -1
  182. package/dist/contracts/validator.js +0 -71
  183. package/dist/contracts/validator.js.map +0 -1
  184. package/dist/driver.d.ts +0 -97
  185. package/dist/driver.d.ts.map +0 -1
  186. package/dist/driver.js +0 -24
  187. package/dist/driver.js.map +0 -1
  188. package/dist/drivers/descriptor.d.ts +0 -15
  189. package/dist/drivers/descriptor.d.ts.map +0 -1
  190. package/dist/drivers/descriptor.js +0 -122
  191. package/dist/drivers/descriptor.js.map +0 -1
  192. package/dist/drivers/loader.d.ts +0 -18
  193. package/dist/drivers/loader.d.ts.map +0 -1
  194. package/dist/drivers/loader.js +0 -97
  195. package/dist/drivers/loader.js.map +0 -1
  196. package/dist/drivers/web/checkmate-driver.json +0 -47
  197. package/dist/drivers/web/index.d.ts +0 -6
  198. package/dist/drivers/web/index.d.ts.map +0 -1
  199. package/dist/drivers/web/index.js +0 -27
  200. package/dist/drivers/web/index.js.map +0 -1
  201. package/dist/drivers/web/session.d.ts +0 -25
  202. package/dist/drivers/web/session.d.ts.map +0 -1
  203. package/dist/drivers/web/session.js +0 -132
  204. package/dist/drivers/web/session.js.map +0 -1
  205. package/dist/drivers/web/tools/network-request-recorder.d.ts +0 -46
  206. package/dist/drivers/web/tools/network-request-recorder.d.ts.map +0 -1
  207. package/dist/drivers/web/tools/network-request-recorder.js +0 -164
  208. package/dist/drivers/web/tools/network-request-recorder.js.map +0 -1
  209. package/dist/drivers/web/tools/screenshot-service.d.ts +0 -10
  210. package/dist/drivers/web/tools/screenshot-service.d.ts.map +0 -1
  211. package/dist/drivers/web/tools/screenshot-service.js +0 -23
  212. package/dist/drivers/web/tools/screenshot-service.js.map +0 -1
  213. package/dist/drivers/web/tools/snapshot-filter/index.d.ts +0 -4
  214. package/dist/drivers/web/tools/snapshot-filter/index.d.ts.map +0 -1
  215. package/dist/drivers/web/tools/snapshot-filter/index.js +0 -4
  216. package/dist/drivers/web/tools/snapshot-filter/index.js.map +0 -1
  217. package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.d.ts +0 -15
  218. package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.d.ts.map +0 -1
  219. package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.js +0 -99
  220. package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.js.map +0 -1
  221. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.d.ts +0 -5
  222. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.d.ts.map +0 -1
  223. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.js +0 -56
  224. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.js.map +0 -1
  225. package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.d.ts +0 -3
  226. package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.d.ts.map +0 -1
  227. package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.js +0 -85
  228. package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.js.map +0 -1
  229. package/dist/drivers/web/tools/snapshot-service.d.ts +0 -31
  230. package/dist/drivers/web/tools/snapshot-service.d.ts.map +0 -1
  231. package/dist/drivers/web/tools/snapshot-service.js +0 -96
  232. package/dist/drivers/web/tools/snapshot-service.js.map +0 -1
  233. package/dist/drivers/web/tools/tool.d.ts +0 -76
  234. package/dist/drivers/web/tools/tool.d.ts.map +0 -1
  235. package/dist/drivers/web/tools/tool.js +0 -562
  236. package/dist/drivers/web/tools/tool.js.map +0 -1
  237. package/dist/drivers/web/tools/transient-state-tracker.d.ts +0 -26
  238. package/dist/drivers/web/tools/transient-state-tracker.d.ts.map +0 -1
  239. package/dist/drivers/web/tools/transient-state-tracker.js +0 -301
  240. package/dist/drivers/web/tools/transient-state-tracker.js.map +0 -1
  241. package/dist/drivers/web/tools/types.d.ts +0 -11
  242. package/dist/drivers/web/tools/types.d.ts.map +0 -1
  243. package/dist/drivers/web/tools/types.js +0 -2
  244. package/dist/drivers/web/tools/types.js.map +0 -1
  245. package/dist/evidence/atomic-file.d.ts +0 -23
  246. package/dist/evidence/atomic-file.d.ts.map +0 -1
  247. package/dist/evidence/atomic-file.js +0 -104
  248. package/dist/evidence/atomic-file.js.map +0 -1
  249. package/dist/evidence/layout.d.ts +0 -30
  250. package/dist/evidence/layout.d.ts.map +0 -1
  251. package/dist/evidence/layout.js +0 -152
  252. package/dist/evidence/layout.js.map +0 -1
  253. package/dist/evidence/retention.d.ts +0 -5
  254. package/dist/evidence/retention.d.ts.map +0 -1
  255. package/dist/evidence/retention.js +0 -10
  256. package/dist/evidence/retention.js.map +0 -1
  257. package/dist/evidence/store.d.ts +0 -101
  258. package/dist/evidence/store.d.ts.map +0 -1
  259. package/dist/evidence/store.js +0 -375
  260. package/dist/evidence/store.js.map +0 -1
  261. package/dist/evidence/terminal-finalizer.d.ts +0 -19
  262. package/dist/evidence/terminal-finalizer.d.ts.map +0 -1
  263. package/dist/evidence/terminal-finalizer.js +0 -56
  264. package/dist/evidence/terminal-finalizer.js.map +0 -1
  265. package/dist/index.d.ts +0 -9
  266. package/dist/index.d.ts.map +0 -1
  267. package/dist/index.js +0 -12
  268. package/dist/index.js.map +0 -1
  269. package/dist/logging/invocation-logger.d.ts +0 -4
  270. package/dist/logging/invocation-logger.d.ts.map +0 -1
  271. package/dist/logging/invocation-logger.js +0 -25
  272. package/dist/logging/invocation-logger.js.map +0 -1
  273. package/dist/logging/level-logger.d.ts +0 -11
  274. package/dist/logging/level-logger.d.ts.map +0 -1
  275. package/dist/logging/level-logger.js +0 -82
  276. package/dist/logging/level-logger.js.map +0 -1
  277. package/dist/logging/types.d.ts +0 -8
  278. package/dist/logging/types.d.ts.map +0 -1
  279. package/dist/logging/types.js +0 -7
  280. package/dist/logging/types.js.map +0 -1
  281. package/dist/redaction/diagnostic-sanitizer.d.ts +0 -7
  282. package/dist/redaction/diagnostic-sanitizer.d.ts.map +0 -1
  283. package/dist/redaction/diagnostic-sanitizer.js +0 -42
  284. package/dist/redaction/diagnostic-sanitizer.js.map +0 -1
  285. package/dist/redaction/redactor.d.ts +0 -40
  286. package/dist/redaction/redactor.d.ts.map +0 -1
  287. package/dist/redaction/redactor.js +0 -176
  288. package/dist/redaction/redactor.js.map +0 -1
  289. package/dist/redaction/scrub.d.ts +0 -29
  290. package/dist/redaction/scrub.d.ts.map +0 -1
  291. package/dist/redaction/scrub.js +0 -54
  292. package/dist/redaction/scrub.js.map +0 -1
  293. package/dist/runtime/config.d.ts +0 -16
  294. package/dist/runtime/config.d.ts.map +0 -1
  295. package/dist/runtime/config.js +0 -2
  296. package/dist/runtime/config.js.map +0 -1
  297. package/dist/runtime/driver-boundary.d.ts +0 -16
  298. package/dist/runtime/driver-boundary.d.ts.map +0 -1
  299. package/dist/runtime/driver-boundary.js +0 -71
  300. package/dist/runtime/driver-boundary.js.map +0 -1
  301. package/dist/runtime/driver-session.d.ts +0 -9
  302. package/dist/runtime/driver-session.d.ts.map +0 -1
  303. package/dist/runtime/driver-session.js +0 -64
  304. package/dist/runtime/driver-session.js.map +0 -1
  305. package/dist/runtime/internal-step-evidence.d.ts +0 -30
  306. package/dist/runtime/internal-step-evidence.d.ts.map +0 -1
  307. package/dist/runtime/internal-step-evidence.js +0 -82
  308. package/dist/runtime/internal-step-evidence.js.map +0 -1
  309. package/dist/runtime/result-adapter.d.ts +0 -9
  310. package/dist/runtime/result-adapter.d.ts.map +0 -1
  311. package/dist/runtime/result-adapter.js +0 -77
  312. package/dist/runtime/result-adapter.js.map +0 -1
  313. package/dist/runtime/runner.d.ts +0 -43
  314. package/dist/runtime/runner.d.ts.map +0 -1
  315. package/dist/runtime/runner.js +0 -72
  316. package/dist/runtime/runner.js.map +0 -1
  317. package/dist/runtime/scenario-control.d.ts +0 -40
  318. package/dist/runtime/scenario-control.d.ts.map +0 -1
  319. package/dist/runtime/scenario-control.js +0 -94
  320. package/dist/runtime/scenario-control.js.map +0 -1
  321. package/dist/runtime/scenario-runner.d.ts +0 -41
  322. package/dist/runtime/scenario-runner.d.ts.map +0 -1
  323. package/dist/runtime/scenario-runner.js +0 -274
  324. package/dist/runtime/scenario-runner.js.map +0 -1
  325. package/dist/runtime/scenario-state.d.ts +0 -55
  326. package/dist/runtime/scenario-state.d.ts.map +0 -1
  327. package/dist/runtime/scenario-state.js +0 -128
  328. package/dist/runtime/scenario-state.js.map +0 -1
  329. package/dist/runtime/step-execution.d.ts +0 -27
  330. package/dist/runtime/step-execution.d.ts.map +0 -1
  331. package/dist/runtime/step-execution.js +0 -143
  332. package/dist/runtime/step-execution.js.map +0 -1
  333. package/dist/runtime/text.d.ts +0 -10
  334. package/dist/runtime/text.d.ts.map +0 -1
  335. package/dist/runtime/text.js +0 -25
  336. package/dist/runtime/text.js.map +0 -1
  337. package/dist/runtime/types.d.ts +0 -53
  338. package/dist/runtime/types.d.ts.map +0 -1
  339. package/dist/runtime/types.js +0 -2
  340. package/dist/runtime/types.js.map +0 -1
  341. package/dist/runtime/usage-tracker.d.ts +0 -37
  342. package/dist/runtime/usage-tracker.d.ts.map +0 -1
  343. package/dist/runtime/usage-tracker.js +0 -110
  344. package/dist/runtime/usage-tracker.js.map +0 -1
  345. package/dist/tools/define-agent-tool.d.ts +0 -20
  346. package/dist/tools/define-agent-tool.d.ts.map +0 -1
  347. package/dist/tools/define-agent-tool.js +0 -30
  348. package/dist/tools/define-agent-tool.js.map +0 -1
  349. package/dist/tools/dispatcher.d.ts +0 -19
  350. package/dist/tools/dispatcher.d.ts.map +0 -1
  351. package/dist/tools/dispatcher.js +0 -91
  352. package/dist/tools/dispatcher.js.map +0 -1
  353. package/dist/tools/loop-detector.d.ts +0 -27
  354. package/dist/tools/loop-detector.d.ts.map +0 -1
  355. package/dist/tools/loop-detector.js +0 -76
  356. package/dist/tools/loop-detector.js.map +0 -1
  357. package/dist/tools/registry.d.ts +0 -19
  358. package/dist/tools/registry.d.ts.map +0 -1
  359. package/dist/tools/registry.js +0 -54
  360. package/dist/tools/registry.js.map +0 -1
  361. package/dist/tools/step/result-tool.d.ts +0 -7
  362. package/dist/tools/step/result-tool.d.ts.map +0 -1
  363. package/dist/tools/step/result-tool.js +0 -34
  364. package/dist/tools/step/result-tool.js.map +0 -1
  365. package/dist/tools/tool-contract.d.ts +0 -3
  366. package/dist/tools/tool-contract.d.ts.map +0 -1
  367. package/dist/tools/tool-contract.js +0 -2
  368. package/dist/tools/tool-contract.js.map +0 -1
  369. package/dist/tools/types.d.ts +0 -210
  370. package/dist/tools/types.d.ts.map +0 -1
  371. package/dist/tools/types.js +0 -4
  372. package/dist/tools/types.js.map +0 -1
  373. package/docs/CLI.md +0 -59
  374. package/docs/CONFIGURATION.md +0 -105
  375. package/docs/DRIVERS.md +0 -79
  376. package/docs/EVIDENCE.md +0 -64
  377. package/schemas/checkmate-config.v1.json +0 -176
  378. package/schemas/describe-result.v1.json +0 -414
  379. package/schemas/driver-descriptor.v1.json +0 -66
  380. package/schemas/run-request.v1.json +0 -67
  381. package/schemas/run-result.v1.json +0 -333
  382. package/schemas/validation-result.v1.json +0 -86
package/docs/CLI.md DELETED
@@ -1,59 +0,0 @@
1
- # CLI Reference
2
-
3
- The Checkmate CLI is non-interactive. Machine-readable commands write exactly one complete JSON document to stdout. Diagnostics and discarded-worker-stream notices use stderr.
4
-
5
- ## Commands
6
-
7
- ```text
8
- checkmate run <request.json|-> [--config <path>]
9
- checkmate validate <request.json|-> [--config <path>]
10
- checkmate describe [--config <path>]
11
- checkmate --help
12
- checkmate --version
13
- ```
14
-
15
- `-` reads the request from stdin. Request file paths and explicit config paths are resolved from the current working directory. Without `--config`, Checkmate reads exactly `$PWD/checkmate.config.json`; it does not walk parent directories.
16
-
17
- ## Run
18
-
19
- `run` performs bounded preparation in the CLI parent. Invalid input returns an `InvalidInvocationResultV1`. An operational preparation failure or identity-allocation failure returns a parent-authored `PreExecutionOperationalResultV1` with `infra / pre-execution-error`, exit `3`, `targetMutation: "not-attempted"`, and no scenario, step, usage, or evidence claims. A valid request reserves one run directory and starts a child worker. The worker executes only the prepared plan; it does not reread configuration, reprobe preflight secrets, or allocate another identity.
20
-
21
- The parent is the sole stdout writer. It accepts worker output only after validating the complete IPC frame, digest, deterministic bytes, `RunResultV1` schema, immutable prepared identity, policy, limits, step grammar, usage, and committed evidence references. Successful committed output is byte-identical to the run's `result.json`.
22
-
23
- If no authoritative worker result is accepted before the applicable cutoff, the parent emits `ContainmentResultV1`. Containment has no semantic `steps`, usage, evidence-completeness claim, or committed result reference.
24
-
25
- ## Validate
26
-
27
- `validate` performs the same static preparation as `run`, including secret availability, but stops before identity allocation, executable import, driver startup, target mutation, or output creation.
28
-
29
- ## Describe
30
-
31
- `describe` returns schema references, policy metadata, registered static driver descriptors, logical secret requirements, and reason-specific routing guidance. It neither imports drivers nor probes secret values.
32
-
33
- ## Exit Codes
34
-
35
- | Code | Route |
36
- | ---: | ------------------------------------------------------------------------------------- |
37
- | `0` | Passed run, valid request, or available description |
38
- | `1` | Application expectation failure |
39
- | `2` | Model failure |
40
- | `3` | Infrastructure failure, interruption, containment, or unexpected static-command error |
41
- | `4` | Invalid invocation or unavailable requested configuration |
42
-
43
- Exit codes provide coarse shell routing. The stdout document remains the detailed contract.
44
-
45
- ## Signals And Cutoffs
46
-
47
- Scenario timing starts when the parent forks the worker, so driver import and startup consume the scenario limit. Normal `cleanup-started` disarms the scenario timer and starts one fresh cleanup cutoff. A scenario timeout or first `SIGINT`/`SIGTERM` sends one cooperative abort and immediately starts one cleanup/termination bound; a later cleanup notification cannot extend it.
48
-
49
- The parent compares its monotonic clock with the absolute active deadline before every state transition and after asynchronous terminal reconciliation. After an external signal it accepts only `interrupted`, `driver-teardown-failed`, or `result-write-failed`. After a run deadline it accepts only `scenario-timeout`, `driver-teardown-failed`, or `result-write-failed`. Unrelated pass, application, and model results cannot override a latched stop cause.
50
-
51
- A worker-finalized interrupted result accepted in time exits `3`. A second signal after an external stop forces the first signal's native route: `130` for `SIGINT` or `143` for `SIGTERM`, with no fabricated stdout envelope.
52
-
53
- ## Output Discipline
54
-
55
- - Worker stdout and stderr bytes are counted, drained, and discarded.
56
- - Worker logger diagnostics enabled by the selected driver's `logLevel` are exact-secret and pattern sanitized before IPC.
57
- - The parent pattern-sanitizes diagnostic messages again before stderr.
58
- - Diagnostic `code` and RFC 6901 `path` fields remain structural and are not rewritten.
59
- - Terminal result bytes are never reserialized or modified by the parent.
@@ -1,105 +0,0 @@
1
- # Configuration Reference
2
-
3
- `checkmate.config.json` is the sole operator-controlled configuration source. It separates approved package registration and logical secret bindings from policy-owned execution behavior.
4
-
5
- ## Lookup
6
-
7
- - Default: `$PWD/checkmate.config.json`
8
- - Explicit: `--config <path>`, resolved from `$PWD`
9
- - Invocation root: always `$PWD`, even when the config file is elsewhere
10
- - No ancestor search, package metadata fallback, TypeScript config, or low-level environment override layer
11
-
12
- Relative output paths and driver package resolution remain anchored to the invocation root.
13
-
14
- ## Manifest Sections
15
-
16
- | Field | Purpose |
17
- | ----------------- | -------------------------------------------------------------- |
18
- | `schemaVersion` | Must be `1` |
19
- | `outputDirectory` | Relative run root; defaults to `.checkmate/runs` |
20
- | `defaultPolicy` | Policy selected when a request omits `scenario.policy` |
21
- | `secretBindings` | Logical names mapped to environment variable names |
22
- | `policies` | Model egress, bounds, evidence, and enabled-driver settings |
23
- | `drivers` | Stable driver IDs mapped to approved packages and secret slots |
24
-
25
- Unknown fields are rejected. Validation does not coerce, strip, default inside input documents, or clamp values.
26
-
27
- ## Model Egress
28
-
29
- Each policy owns:
30
-
31
- | Field | Meaning |
32
- | -------------------------- | ------------------------------------------------------- |
33
- | `provider.id` | `openai` in v1 |
34
- | `provider.model` | Provider model identifier |
35
- | `provider.baseUrl` | Optional OpenAI-compatible endpoint |
36
- | `provider.apiKeyBinding` | Logical binding, never a secret value |
37
- | `provider.temperature` | Optional non-negative number |
38
- | `provider.reasoningEffort` | Optional `low`, `medium`, or `high` |
39
- | `textRedaction` | `on` or `off` for provider-bound text |
40
- | `allowOpaque` | Whether provider-bound opaque/image context is allowed |
41
- | `maxStepBytes` | Maximum complete provider request bytes for a step |
42
- | `maxMessageBytes` | Maximum serialized bytes for one provider-bound message |
43
-
44
- The complete-request limit covers messages, tools, and JSON framing, not HTTP headers. Requests cannot override any model-egress field.
45
-
46
- ## Bounds
47
-
48
- | Field | Valid value | Scope |
49
- | -------------------- | --------------------: | ---------------------------------------------------- |
50
- | `scenarioTimeoutMs` | Integer >= 1 | Entire worker scenario, including import and startup |
51
- | `stepTimeoutMs` | Integer >= 1 | One model/tool step |
52
- | `turnsPerStep` | Integer >= 1 | Model turns per step |
53
- | `requestTimeoutMs` | Integer >= 1 | One provider request |
54
- | `maxRetries` | Integer >= 0 | Provider-level retries |
55
- | `loopMaxRepetitions` | Integer >= 1 | Repeated tool-call pattern bound |
56
- | `cleanupTimeoutMs` | Integer >= 1 | Shared runner/session cleanup deadline |
57
- | `budgetTokens` | Optional integer >= 1 | Cumulative scenario token ceiling |
58
-
59
- A request may only tighten `scenarioTimeoutMs` through `limits.timeoutMs`, and may tighten or introduce `limits.budgetTokens`. Attempts to raise a policy ceiling are invalid. V1 has no USD budget, cost calculation, or pricing table.
60
-
61
- ## Evidence Policy
62
-
63
- - `retention`: `on`, `retain-on-failure`, or `off`
64
- - `redaction`: `on` or `off`
65
- - `allowOpaque`: explicit permission for binary evidence that cannot be text-redacted
66
-
67
- Requests cannot weaken these settings.
68
-
69
- ## Driver Policy
70
-
71
- The root `drivers` entry approves a package and maps its descriptor-declared secret slots to logical bindings. `policies.<id>.drivers.<driverId>` enables that registered driver, supplies settings validated against its static descriptor, and provides `tools.allowed`.
72
-
73
- `["*"]` exposes every descriptor-declared tool. An explicit list exposes only those names. Unknown names, undeclared secret slots, missing slot bindings, unknown drivers, and drivers not enabled by the selected policy are invalid before executable import.
74
-
75
- The built-in web driver accepts `logLevel` (`debug`, `info`, `warn`, `error`, or `off`) and `logsAsEvidence` in its policy-owned settings. Both default to disabled behavior: `logLevel: "off"` and `logsAsEvidence: false`. For example:
76
-
77
- ```json
78
- {
79
- "settings": {
80
- "headless": true,
81
- "logLevel": "debug",
82
- "logsAsEvidence": true
83
- }
84
- }
85
- ```
86
-
87
- Enabled logs are sanitized and written by the CLI to stderr. When evidence logging is enabled, the same selected messages are also subject to the policy's evidence retention and redaction settings.
88
-
89
- ## Secret Handling
90
-
91
- Preflight reads a binding only long enough to verify that its environment value is a non-empty string. It does not return, retain, serialize, log, persist, derive from, or send that value over IPC. The worker resolves values independently for execution. Secret values never enter the prepared plan, request, result, checkpoint, evidence reference, or `describe` output.
92
-
93
- JavaScript heap erasure is not guaranteed. Registered executable code remains trusted and can access the host environment outside Checkmate's reader.
94
-
95
- ## Fixed Ingestion Limits
96
-
97
- Checkmate applies fixed parent-side limits before expensive validation, executable import, identity allocation, secret resolution, or worker creation:
98
-
99
- - 256 KiB each for request, manifest, and descriptor documents
100
- - Parsed depth 64 and 10,000 aggregate values
101
- - 100 scenario steps
102
- - 128 characters for IDs, 256 for scenario names
103
- - 16 KiB UTF-8 each for action and expectation text
104
- - 100 diagnostics and 64 KiB of serialized diagnostics
105
- - 1 MiB serialized worker start frame
package/docs/DRIVERS.md DELETED
@@ -1,79 +0,0 @@
1
- # Driver Authoring
2
-
3
- A driver gives the harness a model-visible interaction surface while Checkmate retains scenario sequencing, limits, verdict tools, result categories, evidence policy, and stdout behavior.
4
-
5
- ## Registration And Static Discovery
6
-
7
- An installed driver package exports both its executable module and `./checkmate-driver.json`. The manifest maps a trusted stable ID to the package. `describe` and `validate` resolve only the descriptor export as data; executable code is imported only after a validated `run` allocates identity and latches `targetMutation` to `possibly-mutated`.
8
-
9
- The descriptor declares:
10
-
11
- - `id` and `driverContractVersion: 1`
12
- - Strict JSON Schemas for request-owned target and policy-owned settings
13
- - Required local secret slot names
14
- - The exact runtime tool-name set
15
- - Permitted evidence kinds, media types, and text/opaque classification
16
-
17
- At startup, the executable ID and contract version must match the descriptor. Runtime tools must have exact set equality with descriptor tools and may not be duplicated or collide with the harness-owned `pass_test_step` and `fail_test_step` tools.
18
-
19
- ## Executable Contract
20
-
21
- ```typescript
22
- import type { CheckmateDriverV1 } from '@xoxoai/checkmate/driver'
23
-
24
- export const checkmateDriver: CheckmateDriverV1 = {
25
- id: 'database',
26
- driverContractVersion: 1,
27
- async start(input) {
28
- const connection = await connect(input.secrets.read('connection'))
29
- return {
30
- tools: databaseTools(connection),
31
- instructions: ['Use read-only queries to inspect application state.'],
32
- buildInitialContext: async ({ signal }) => currentSchema(connection, signal),
33
- handleToolResponses: async ({ signal }) => currentSchema(connection, signal),
34
- close: async () => connection.close(),
35
- }
36
- },
37
- }
38
- ```
39
-
40
- `DriverStartInput` supplies validated `target` and `settings`, a slot-limited secret reader, a descriptor-limited evidence sink, an invocation logger, and an abort signal. The session supplies tools, instructions, initial context, post-tool context, and one idempotent close operation.
41
-
42
- ## Tools
43
-
44
- Use `defineDriverTool()` for Zod-backed tool arguments. Tool wire names remain local names such as `database_query`; they are not prefixed with the driver ID because one scenario has one driver session.
45
-
46
- A returned `{ status: 'error', response }` is a recoverable target observation. It is sent to the model and the step continues. A thrown or rejected tool operation means the driver boundary is unsafe and terminates the step as `infra / tool-error`. Drivers cannot return assertions; only harness-owned result tools decide whether an expectation passed or failed.
47
-
48
- ## Context
49
-
50
- Driver context is provider-neutral text or image data. `ephemeral: true` marks current target state that should replace prior ephemeral state after actions. Explicit summaries may be durable. Checkmate applies policy-owned model-egress redaction, opaque-content permission, and byte limits before provider adaptation.
51
-
52
- Every awaited executable boundary is wrapped by a harness-owned absolute deadline:
53
-
54
- - Driver module import and `start`: remaining scenario deadline
55
- - Initial context, tools, and post-tool context: current step deadline
56
- - Runner teardown and session close: one shared cleanup deadline
57
-
58
- Abort signals are cooperative. The CLI parent terminates a worker that does not settle within its containment bound.
59
-
60
- ## Secrets, Logs, And Evidence
61
-
62
- Drivers read only descriptor-declared secret slots. Logger messages are exact-secret and pattern sanitized before leaving the worker. Direct writes to stdout or stderr are discarded.
63
-
64
- Drivers submit evidence by declared kind and media type, never by path. The sink validates attribution and lifecycle, enforces 10 MiB candidate and 64 MiB per-invocation accepted-buffer limits, applies redaction and retention, writes atomically, and publishes a reference only after durability confirmation.
65
-
66
- ## Built-In Web Driver
67
-
68
- `@xoxoai/checkmate/driver-web` owns Playwright browser, context, pages, snapshots, screenshots, tab/popup state, dialogs, transient DOM state, network recording, and fourteen browser tools. It accepts target `{ "baseUrl": "https://..." }` and these optional policy settings:
69
-
70
- - `headless`
71
- - `logLevel`: `debug`, `info`, `warn`, `error`, or `off` (default)
72
- - `logsAsEvidence`: persist selected logs as `web-driver-log` evidence (default `false`)
73
- - `snapshotFilter`
74
- - `snapshotTopPercent` in `(0, 100]`
75
- - `screenshotsInModelContext`
76
-
77
- The selected `logLevel` applies to web-driver, model/tool-loop, retry, and OpenAI SDK logs. The CLI writes enabled logs to stderr as sanitized `worker.log.<level>` diagnostics. With `logsAsEvidence: true`, the same enabled, sanitized messages are collected into one scenario-level `text/plain` artifact. Evidence retention and redaction policy still apply; no empty artifact is created when no messages are emitted.
78
-
79
- Importing the root contract or driver-authoring entry does not load Playwright. Only selecting and executing the web driver imports the browser runtime.
package/docs/EVIDENCE.md DELETED
@@ -1,64 +0,0 @@
1
- # Evidence And Durability
2
-
3
- Every valid run owns one invocation directory beneath the manifest's `outputDirectory`.
4
-
5
- ```text
6
- .checkmate/runs/<utc>-<scenario-slug>-<run-id>/
7
- |-- invocation.json
8
- |-- checkpoint.json
9
- |-- evidence/
10
- | |-- harness/steps/001-<step-slug>/transcript.md
11
- | `-- driver/<driver-id>/...
12
- `-- result.json
13
- ```
14
-
15
- The 16-character lowercase hexadecimal `runId` is generated from eight random bytes. It identifies one attempt and is not a request hash. Concurrent runs, including runs with the same scenario ID, receive separate directories and mutable state.
16
-
17
- ## Compact Result
18
-
19
- The final envelope always carries compact routing and diagnosis data: top-level status/category/reason, target mutation state, timing, driver and policy identity, effective limits, aggregate tokens, every step state, compact tool-call summaries, evidence completeness, references, and diagnostics.
20
-
21
- Transcripts, snapshots, screenshots, logs, and driver-specific artifacts remain outside the envelope. Follow only `evidence.references`; never infer filenames or promote `checkpoint.json` to a result.
22
-
23
- The built-in web driver's `logsAsEvidence: true` setting collects messages selected by its `logLevel` into one scenario-level `web-driver-log` artifact with media type `text/plain`. The transcript is capped at 1 MiB and ends with `[log truncated]` when the cap is reached. It is omitted when logging is off or no messages are emitted. A contained or forcibly terminated worker may be unable to flush it.
24
-
25
- ## Retention
26
-
27
- | Policy | Passed step | Failed step |
28
- | ------------------- | ------------------------------ | ------------------------------ |
29
- | `on` | Retain selected heavy evidence | Retain selected heavy evidence |
30
- | `retain-on-failure` | Discard heavy evidence | Retain selected heavy evidence |
31
- | `off` | Discard heavy evidence | Discard heavy evidence |
32
-
33
- Compact result data is retained independently of this table. Opaque evidence is discarded unless the operator also sets `allowOpaque: true`.
34
-
35
- `evidence.state: "complete"` means the selected policy was fulfilled, including when it required no heavy artifacts. `partial` means an optional capture or persistence operation failed. A driver is not required to produce every declared evidence kind on every run.
36
-
37
- ## Redaction
38
-
39
- With `redaction: "on"`, Checkmate applies exact resolved-secret replacement, credential-pattern recognition, and field-aware content redaction before data becomes durable or enters terminal IPC. JSON and YAML evidence is parsed, redacted structurally, and deterministically reserialized. Malformed structured evidence is rejected.
40
-
41
- Structural metadata is copied exactly and must not contain confidential values: IDs, status/category/reason values, diagnostic codes and paths, timestamps, effective limits, usage, evidence kinds/media types/producers/paths, and driver/tool identities.
42
-
43
- With `redaction: "off"`, raw harness-owned content and accepted evidence bytes are preserved by explicit operator choice. The API result, `result.json`, terminal IPC, and CLI stdout may therefore contain raw values. Out-of-band diagnostics remain sanitized and raw worker streams remain discarded under both settings. `web-driver-log` evidence is collected after mandatory diagnostic sanitization even when evidence redaction is off.
44
-
45
- ## Capture Limits
46
-
47
- - One candidate: at most 10 MiB before and after transformation
48
- - Accepted pending buffers: at most 64 MiB per invocation
49
- - Counters are released when candidates are committed or discarded
50
- - Concurrent in-process invocations do not share a global allowance
51
-
52
- An embedding host running `N` concurrent calls may retain approximately `N * 64 MiB` plus driver and model overhead. The caller owns admission control.
53
-
54
- ## Atomic Commitment
55
-
56
- Files are written to a restrictive same-directory temporary file, flushed, renamed, and followed by directory synchronization where supported. Evidence references become visible only after this sequence succeeds. A post-rename synchronization failure is durability-uncertain and publishes no reference even if the destination is observable.
57
-
58
- `invocation.json` is mandatory before executable driver startup. `checkpoint.json` is an atomically replaced partial diagnostic snapshot, not proof of process liveness, a resume point, or a terminal result. `result.json` is the only durable terminal marker. Parent pre-execution operational errors and containment results do not claim a durable terminal file.
59
-
60
- Optional evidence failure preserves the established verdict, marks evidence partial, and appends a diagnostic. Checkpoint failure appends a diagnostic without changing verdict or evidence completeness. Failure to commit final `result.json` changes the top-level route to `infra / result-write-failed`, preserves completed semantic state, and returns an explicitly uncommitted envelope through the API or CLI when it fits the IPC bound.
61
-
62
- ## Byte Identity
63
-
64
- Committed `result.json` uses deterministic two-space JSON with recursively sorted object keys, preserved array order, UTF-8 without a BOM, and one trailing line feed. The in-process finalized object is parsed from those bytes. The CLI verifies and writes the same bytes unchanged. Parent-authored containment has stdout bytes only and claims no durable result.
@@ -1,176 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://checkmate.dev/schemas/checkmate-config.v1.json",
4
- "title": "Checkmate configuration version 1",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "defaultPolicy", "secretBindings", "policies", "drivers"],
8
- "properties": {
9
- "schemaVersion": { "const": 1 },
10
- "outputDirectory": {
11
- "type": "string",
12
- "minLength": 1,
13
- "maxLength": 1024,
14
- "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f/]+(?:/[^\\u0000-\\u001f/]+)*$"
15
- },
16
- "defaultPolicy": { "$ref": "#/$defs/id" },
17
- "secretBindings": {
18
- "type": "object",
19
- "propertyNames": { "$ref": "#/$defs/id" },
20
- "additionalProperties": { "$ref": "#/$defs/secretBinding" }
21
- },
22
- "policies": {
23
- "type": "object",
24
- "minProperties": 1,
25
- "propertyNames": { "$ref": "#/$defs/id" },
26
- "additionalProperties": { "$ref": "#/$defs/policy" }
27
- },
28
- "drivers": {
29
- "type": "object",
30
- "minProperties": 1,
31
- "propertyNames": { "$ref": "#/$defs/id" },
32
- "additionalProperties": { "$ref": "#/$defs/driverRegistration" }
33
- }
34
- },
35
- "$defs": {
36
- "id": {
37
- "type": "string",
38
- "minLength": 1,
39
- "maxLength": 128,
40
- "pattern": "^(?!.*[\\u0000-\\u001f]).*$"
41
- },
42
- "secretBinding": {
43
- "type": "object",
44
- "additionalProperties": false,
45
- "required": ["source", "name"],
46
- "properties": {
47
- "source": { "const": "environment" },
48
- "name": {
49
- "type": "string",
50
- "minLength": 1,
51
- "maxLength": 256,
52
- "pattern": "^(?!.*[\\u0000-\\u001f]).*$"
53
- }
54
- }
55
- },
56
- "provider": {
57
- "type": "object",
58
- "additionalProperties": false,
59
- "required": ["id", "model", "apiKeyBinding"],
60
- "properties": {
61
- "id": { "const": "openai" },
62
- "model": {
63
- "type": "string",
64
- "minLength": 1,
65
- "maxLength": 256,
66
- "pattern": "^(?!.*[\\u0000-\\u001f]).*$"
67
- },
68
- "baseUrl": { "type": "string", "format": "uri" },
69
- "apiKeyBinding": { "$ref": "#/$defs/id" },
70
- "temperature": { "type": "number", "minimum": 0 },
71
- "reasoningEffort": { "enum": ["low", "medium", "high"] }
72
- }
73
- },
74
- "modelEgress": {
75
- "type": "object",
76
- "additionalProperties": false,
77
- "required": ["provider", "textRedaction", "allowOpaque", "maxStepBytes", "maxMessageBytes"],
78
- "properties": {
79
- "provider": { "$ref": "#/$defs/provider" },
80
- "textRedaction": { "enum": ["on", "off"] },
81
- "allowOpaque": { "type": "boolean" },
82
- "maxStepBytes": { "type": "integer", "minimum": 1 },
83
- "maxMessageBytes": { "type": "integer", "minimum": 1 }
84
- }
85
- },
86
- "bounds": {
87
- "type": "object",
88
- "additionalProperties": false,
89
- "required": [
90
- "scenarioTimeoutMs",
91
- "stepTimeoutMs",
92
- "turnsPerStep",
93
- "requestTimeoutMs",
94
- "maxRetries",
95
- "loopMaxRepetitions",
96
- "cleanupTimeoutMs"
97
- ],
98
- "properties": {
99
- "scenarioTimeoutMs": { "type": "integer", "minimum": 1 },
100
- "stepTimeoutMs": { "type": "integer", "minimum": 1 },
101
- "turnsPerStep": { "type": "integer", "minimum": 1 },
102
- "requestTimeoutMs": { "type": "integer", "minimum": 1 },
103
- "maxRetries": { "type": "integer", "minimum": 0 },
104
- "loopMaxRepetitions": { "type": "integer", "minimum": 1 },
105
- "cleanupTimeoutMs": { "type": "integer", "minimum": 1 },
106
- "budgetTokens": { "type": "integer", "minimum": 1 }
107
- }
108
- },
109
- "evidence": {
110
- "type": "object",
111
- "additionalProperties": false,
112
- "required": ["retention", "redaction", "allowOpaque"],
113
- "properties": {
114
- "retention": { "enum": ["on", "retain-on-failure", "off"] },
115
- "redaction": { "enum": ["on", "off"] },
116
- "allowOpaque": { "type": "boolean" }
117
- }
118
- },
119
- "toolPolicy": {
120
- "type": "object",
121
- "additionalProperties": false,
122
- "required": ["allowed"],
123
- "properties": {
124
- "allowed": {
125
- "type": "array",
126
- "minItems": 1,
127
- "uniqueItems": true,
128
- "items": { "$ref": "#/$defs/id" }
129
- }
130
- }
131
- },
132
- "policyDriver": {
133
- "type": "object",
134
- "additionalProperties": false,
135
- "required": ["settings", "tools"],
136
- "properties": {
137
- "settings": { "type": "object" },
138
- "tools": { "$ref": "#/$defs/toolPolicy" }
139
- }
140
- },
141
- "policy": {
142
- "type": "object",
143
- "additionalProperties": false,
144
- "required": ["modelEgress", "bounds", "evidence", "drivers"],
145
- "properties": {
146
- "modelEgress": { "$ref": "#/$defs/modelEgress" },
147
- "bounds": { "$ref": "#/$defs/bounds" },
148
- "evidence": { "$ref": "#/$defs/evidence" },
149
- "drivers": {
150
- "type": "object",
151
- "minProperties": 1,
152
- "propertyNames": { "$ref": "#/$defs/id" },
153
- "additionalProperties": { "$ref": "#/$defs/policyDriver" }
154
- }
155
- }
156
- },
157
- "driverRegistration": {
158
- "type": "object",
159
- "additionalProperties": false,
160
- "required": ["package", "secrets"],
161
- "properties": {
162
- "package": {
163
- "type": "string",
164
- "minLength": 1,
165
- "maxLength": 256,
166
- "pattern": "^(?!.*[\\u0000-\\u001f]).*$"
167
- },
168
- "secrets": {
169
- "type": "object",
170
- "propertyNames": { "$ref": "#/$defs/id" },
171
- "additionalProperties": { "$ref": "#/$defs/id" }
172
- }
173
- }
174
- }
175
- }
176
- }