orizu 0.5.19 → 0.5.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +23 -0
  2. package/dist/archive-artifacts-cli.d.ts +50 -0
  3. package/dist/archive-artifacts-cli.d.ts.map +1 -0
  4. package/dist/artifact-archive.d.ts +48 -0
  5. package/dist/artifact-archive.d.ts.map +1 -0
  6. package/dist/artifact-pull.d.ts +22 -0
  7. package/dist/artifact-pull.d.ts.map +1 -0
  8. package/dist/banner.d.ts +3 -0
  9. package/dist/banner.d.ts.map +1 -0
  10. package/dist/connectors-cli.d.ts +31 -0
  11. package/dist/connectors-cli.d.ts.map +1 -0
  12. package/dist/credentials.d.ts +46 -0
  13. package/dist/credentials.d.ts.map +1 -0
  14. package/dist/csv.d.ts +49 -0
  15. package/dist/csv.d.ts.map +1 -0
  16. package/dist/dataset-download.d.ts +6 -0
  17. package/dist/dataset-download.d.ts.map +1 -0
  18. package/dist/dataset-edit-rows.d.ts +10 -0
  19. package/dist/dataset-edit-rows.d.ts.map +1 -0
  20. package/dist/dataset-upload-snapshot.d.ts +13 -0
  21. package/dist/dataset-upload-snapshot.d.ts.map +1 -0
  22. package/dist/daytona-slice-rehearsal.d.ts +89 -0
  23. package/dist/daytona-slice-rehearsal.d.ts.map +1 -0
  24. package/dist/daytona-slice.d.ts +106 -0
  25. package/dist/daytona-slice.d.ts.map +1 -0
  26. package/dist/deploy-key-merge-core.d.ts +121 -0
  27. package/dist/deploy-key-merge-core.d.ts.map +1 -0
  28. package/dist/diff-comments-cli.d.ts +12 -0
  29. package/dist/diff-comments-cli.d.ts.map +1 -0
  30. package/dist/diff-comments-cli.js +21 -2
  31. package/dist/egress-allowlist-cli.d.ts +23 -0
  32. package/dist/egress-allowlist-cli.d.ts.map +1 -0
  33. package/dist/egress-policy.d.ts +108 -0
  34. package/dist/egress-policy.d.ts.map +1 -0
  35. package/dist/error-response.d.ts +9 -0
  36. package/dist/error-response.d.ts.map +1 -0
  37. package/dist/file-parser.d.ts +5 -0
  38. package/dist/file-parser.d.ts.map +1 -0
  39. package/dist/gepa-engine-dispatch.d.ts +9 -0
  40. package/dist/gepa-engine-dispatch.d.ts.map +1 -0
  41. package/dist/gepa-engine-dispatch.js +307 -0
  42. package/dist/gepa-python-command.d.ts +6 -0
  43. package/dist/gepa-python-command.d.ts.map +1 -0
  44. package/dist/gepa-python-command.js +26 -0
  45. package/dist/gepa-python-paths.d.ts +6 -0
  46. package/dist/gepa-python-paths.d.ts.map +1 -0
  47. package/dist/gepa-python-paths.js +42 -0
  48. package/dist/git-credential.d.ts +69 -0
  49. package/dist/git-credential.d.ts.map +1 -0
  50. package/dist/git-recovery-environment.d.ts +31 -0
  51. package/dist/git-recovery-environment.d.ts.map +1 -0
  52. package/dist/github-setup.d.ts +122 -0
  53. package/dist/github-setup.d.ts.map +1 -0
  54. package/dist/global-flags.d.ts +12 -0
  55. package/dist/global-flags.d.ts.map +1 -0
  56. package/dist/help.d.ts +46 -0
  57. package/dist/help.d.ts.map +1 -0
  58. package/dist/help.js +93 -25
  59. package/dist/hosted-boot.d.ts +273 -0
  60. package/dist/hosted-boot.d.ts.map +1 -0
  61. package/dist/hosted-bootstrap-rehearsal.d.ts +86 -0
  62. package/dist/hosted-bootstrap-rehearsal.d.ts.map +1 -0
  63. package/dist/hosted-bootstrap.d.ts +188 -0
  64. package/dist/hosted-bootstrap.d.ts.map +1 -0
  65. package/dist/hosted-broker-server.d.ts +50 -0
  66. package/dist/hosted-broker-server.d.ts.map +1 -0
  67. package/dist/hosted-git-http-server.d.ts +36 -0
  68. package/dist/hosted-git-http-server.d.ts.map +1 -0
  69. package/dist/hosted-harness-claude.d.ts +195 -0
  70. package/dist/hosted-harness-claude.d.ts.map +1 -0
  71. package/dist/hosted-harness-opencode.d.ts +227 -0
  72. package/dist/hosted-harness-opencode.d.ts.map +1 -0
  73. package/dist/hosted-harness.d.ts +118 -0
  74. package/dist/hosted-harness.d.ts.map +1 -0
  75. package/dist/hosted-harvest.d.ts +68 -0
  76. package/dist/hosted-harvest.d.ts.map +1 -0
  77. package/dist/hosted-headless.d.ts +72 -0
  78. package/dist/hosted-headless.d.ts.map +1 -0
  79. package/dist/hosted-loop-lifecycle.d.ts +206 -0
  80. package/dist/hosted-loop-lifecycle.d.ts.map +1 -0
  81. package/dist/hosted-loop.d.ts +170 -0
  82. package/dist/hosted-loop.d.ts.map +1 -0
  83. package/dist/hosted-run-event-sink.d.ts +222 -0
  84. package/dist/hosted-run-event-sink.d.ts.map +1 -0
  85. package/dist/hosted-runtime-assets.d.ts +186 -0
  86. package/dist/hosted-runtime-assets.d.ts.map +1 -0
  87. package/dist/hosted-session-cli.d.ts +258 -0
  88. package/dist/hosted-session-cli.d.ts.map +1 -0
  89. package/dist/hosted-skill-staging.d.ts +73 -0
  90. package/dist/hosted-skill-staging.d.ts.map +1 -0
  91. package/dist/http.d.ts +8 -0
  92. package/dist/http.d.ts.map +1 -0
  93. package/dist/index.d.ts +22 -0
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/index.js +119 -129
  96. package/dist/instruction-set-gepa-launch.d.ts +3 -0
  97. package/dist/instruction-set-gepa-launch.d.ts.map +1 -0
  98. package/dist/instruction-set-gepa-launch.js +15 -0
  99. package/dist/instruction-set-loader.d.ts +6 -0
  100. package/dist/instruction-set-loader.d.ts.map +1 -0
  101. package/dist/instruction-set-loader.js +59 -0
  102. package/dist/instruction-set-manifest.d.ts +14 -0
  103. package/dist/instruction-set-manifest.d.ts.map +1 -0
  104. package/dist/instruction-set-manifest.js +162 -0
  105. package/dist/instruction-sets-cli.d.ts +40 -0
  106. package/dist/instruction-sets-cli.d.ts.map +1 -0
  107. package/dist/instruction-sets-cli.js +361 -0
  108. package/dist/json-response.d.ts +4 -0
  109. package/dist/json-response.d.ts.map +1 -0
  110. package/dist/jsonl-stream.d.ts +8 -0
  111. package/dist/jsonl-stream.d.ts.map +1 -0
  112. package/dist/kill-switch-cli.d.ts +30 -0
  113. package/dist/kill-switch-cli.d.ts.map +1 -0
  114. package/dist/loopback-serve.d.ts +25 -0
  115. package/dist/loopback-serve.d.ts.map +1 -0
  116. package/dist/manifests-cli.d.ts +22 -0
  117. package/dist/manifests-cli.d.ts.map +1 -0
  118. package/dist/markdown-report-input.d.ts +7 -0
  119. package/dist/markdown-report-input.d.ts.map +1 -0
  120. package/dist/markdown-report-input.js +15 -1
  121. package/dist/merge-job.d.ts +155 -0
  122. package/dist/merge-job.d.ts.map +1 -0
  123. package/dist/model-configs-cli.d.ts +19 -0
  124. package/dist/model-configs-cli.d.ts.map +1 -0
  125. package/dist/model-configs-cli.js +104 -0
  126. package/dist/optimization-export-cli.d.ts +19 -0
  127. package/dist/optimization-export-cli.d.ts.map +1 -0
  128. package/dist/optimizations-list-cli.d.ts +20 -0
  129. package/dist/optimizations-list-cli.d.ts.map +1 -0
  130. package/dist/optimizations-promote-cli.d.ts +8 -0
  131. package/dist/optimizations-promote-cli.d.ts.map +1 -0
  132. package/dist/optimizations-promote-cli.js +34 -0
  133. package/dist/option-validation.d.ts +15 -0
  134. package/dist/option-validation.d.ts.map +1 -0
  135. package/dist/preview-runtime.d.ts +63 -0
  136. package/dist/preview-runtime.d.ts.map +1 -0
  137. package/dist/prompt-draft-push.d.ts +60 -0
  138. package/dist/prompt-draft-push.d.ts.map +1 -0
  139. package/dist/prompt-label-cli.d.ts +11 -0
  140. package/dist/prompt-label-cli.d.ts.map +1 -0
  141. package/dist/prompt-label-cli.js +29 -0
  142. package/dist/prompt-length-wire.d.ts +28 -0
  143. package/dist/prompt-length-wire.d.ts.map +1 -0
  144. package/dist/prompt-length-wire.js +2 -2
  145. package/dist/prompt-report-cli.d.ts +10 -0
  146. package/dist/prompt-report-cli.d.ts.map +1 -0
  147. package/dist/prompt-report-cli.js +2 -2
  148. package/dist/prompt-summary-table.d.ts +15 -0
  149. package/dist/prompt-summary-table.d.ts.map +1 -0
  150. package/dist/prompt-summary-table.js +6 -0
  151. package/dist/registration-tag-warning.d.ts +32 -0
  152. package/dist/registration-tag-warning.d.ts.map +1 -0
  153. package/dist/report-comments-cli.d.ts +16 -0
  154. package/dist/report-comments-cli.d.ts.map +1 -0
  155. package/dist/report-markdown-blankness.d.ts +2 -0
  156. package/dist/report-markdown-blankness.d.ts.map +1 -0
  157. package/dist/report-markdown-blankness.js +6 -0
  158. package/dist/report-replacement-warning.d.ts +17 -0
  159. package/dist/report-replacement-warning.d.ts.map +1 -0
  160. package/dist/report-replacement-warning.js +31 -0
  161. package/dist/repository-backup-core.d.ts +225 -0
  162. package/dist/repository-backup-core.d.ts.map +1 -0
  163. package/dist/repository-recovery-manifest.d.ts +83 -0
  164. package/dist/repository-recovery-manifest.d.ts.map +1 -0
  165. package/dist/run-event-digest.d.ts +74 -0
  166. package/dist/run-event-digest.d.ts.map +1 -0
  167. package/dist/runner-dir-verify.d.ts +66 -0
  168. package/dist/runner-dir-verify.d.ts.map +1 -0
  169. package/dist/runner-instruction-set-contract.d.ts +24 -0
  170. package/dist/runner-instruction-set-contract.d.ts.map +1 -0
  171. package/dist/runner-instruction-set-contract.js +50 -0
  172. package/dist/sandbox-hygiene.d.ts +45 -0
  173. package/dist/sandbox-hygiene.d.ts.map +1 -0
  174. package/dist/sandbox-provider.d.ts +193 -0
  175. package/dist/sandbox-provider.d.ts.map +1 -0
  176. package/dist/scorer-draft-push.d.ts +50 -0
  177. package/dist/scorer-draft-push.d.ts.map +1 -0
  178. package/dist/scorers-cli.d.ts +20 -0
  179. package/dist/scorers-cli.d.ts.map +1 -0
  180. package/dist/scorers-cli.js +22 -0
  181. package/dist/scorers-verify-parity-bridge.d.ts +16 -0
  182. package/dist/scorers-verify-parity-bridge.d.ts.map +1 -0
  183. package/dist/scorers-verify-parity-bridge.js +90 -0
  184. package/dist/scorers-verify-parity.d.ts +81 -0
  185. package/dist/scorers-verify-parity.d.ts.map +1 -0
  186. package/dist/scorers-verify-parity.js +502 -0
  187. package/dist/scores-accept-cli.d.ts +21 -0
  188. package/dist/scores-accept-cli.d.ts.map +1 -0
  189. package/dist/secret-redaction.d.ts +47 -0
  190. package/dist/secret-redaction.d.ts.map +1 -0
  191. package/dist/session-timeline.d.ts +54 -0
  192. package/dist/session-timeline.d.ts.map +1 -0
  193. package/dist/setup-prompt.d.ts +5 -0
  194. package/dist/setup-prompt.d.ts.map +1 -0
  195. package/dist/skill-installer.d.ts +68 -0
  196. package/dist/skill-installer.d.ts.map +1 -0
  197. package/dist/skilled-proposer-launch.d.ts +7 -0
  198. package/dist/skilled-proposer-launch.d.ts.map +1 -0
  199. package/dist/skilled-proposer-launch.js +60 -0
  200. package/dist/smoke.d.ts +102 -0
  201. package/dist/smoke.d.ts.map +1 -0
  202. package/dist/start-intent.d.ts +12 -0
  203. package/dist/start-intent.d.ts.map +1 -0
  204. package/dist/task-assignment-manifest.d.ts +15 -0
  205. package/dist/task-assignment-manifest.d.ts.map +1 -0
  206. package/dist/task-create-error.d.ts +18 -0
  207. package/dist/task-create-error.d.ts.map +1 -0
  208. package/dist/team-connectors-cli.d.ts +29 -0
  209. package/dist/team-connectors-cli.d.ts.map +1 -0
  210. package/dist/types.d.ts +39 -0
  211. package/dist/types.d.ts.map +1 -0
  212. package/dist/vercel-sandbox-provider.d.ts +156 -0
  213. package/dist/vercel-sandbox-provider.d.ts.map +1 -0
  214. package/dist/workbench-cli.d.ts +233 -0
  215. package/dist/workbench-cli.d.ts.map +1 -0
  216. package/dist/workspace-sync.d.ts +207 -0
  217. package/dist/workspace-sync.d.ts.map +1 -0
  218. package/dist/workspace.d.ts +92 -0
  219. package/dist/workspace.d.ts.map +1 -0
  220. package/dist/zip-draft-push.d.ts +55 -0
  221. package/dist/zip-draft-push.d.ts.map +1 -0
  222. package/package.json +15 -2
  223. package/requirements/README.md +138 -0
  224. package/requirements/skilled-proposer.in +66 -0
  225. package/requirements/skilled-proposer.lock +265 -0
  226. package/scripts/build-cli-dist.mjs +30 -0
  227. package/scripts/ensure-skilled-proposer-venv.mjs +5 -0
  228. package/scripts/orizu-source-checkout.d.mts +1 -0
  229. package/scripts/orizu-source-checkout.mjs +10 -0
  230. package/scripts/refresh-skilled-proposer-lock.mjs +256 -0
  231. package/scripts/vendor-gepa-python.mjs +187 -4
  232. package/src/diff-comments-cli.ts +41 -3
  233. package/src/gepa-engine-dispatch.ts +340 -0
  234. package/src/gepa-python-command.ts +31 -0
  235. package/src/gepa-python-paths.ts +56 -0
  236. package/src/help.ts +95 -25
  237. package/src/index.ts +131 -166
  238. package/src/instruction-set-gepa-launch.ts +28 -0
  239. package/src/instruction-set-loader.ts +37 -0
  240. package/src/instruction-set-manifest.ts +120 -0
  241. package/src/instruction-sets-cli.ts +306 -0
  242. package/src/markdown-report-input.ts +19 -1
  243. package/src/model-configs-cli.ts +119 -0
  244. package/src/optimizations-promote-cli.ts +41 -0
  245. package/src/prompt-label-cli.ts +55 -0
  246. package/src/prompt-length-wire.ts +1 -1
  247. package/src/prompt-report-cli.ts +2 -2
  248. package/src/prompt-summary-table.ts +12 -0
  249. package/src/report-markdown-blankness.ts +6 -0
  250. package/src/report-replacement-warning.ts +35 -0
  251. package/src/runner-instruction-set-contract.ts +64 -0
  252. package/src/scorers-cli.ts +40 -0
  253. package/src/scorers-verify-parity-bridge.ts +90 -0
  254. package/src/scorers-verify-parity.ts +564 -0
  255. package/src/skilled-proposer-launch.ts +89 -0
  256. package/src/skilled-proposer-venv-manager.mjs +757 -0
  257. package/tsconfig.json +2 -0
  258. package/vendor/gepa-python/LICENSE +7 -0
  259. package/vendor/gepa-python/manifest.json +107 -0
  260. package/vendor/gepa-python/src/gepa/__init__.py +22 -0
  261. package/vendor/gepa-python/src/gepa/adapters/__init__.py +0 -0
  262. package/vendor/gepa-python/src/gepa/adapters/anymaths_adapter/__init__.py +1 -0
  263. package/vendor/gepa-python/src/gepa/adapters/anymaths_adapter/anymaths_adapter.py +174 -0
  264. package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/__init__.py +26 -0
  265. package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/confidence_adapter.py +618 -0
  266. package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/scoring.py +206 -0
  267. package/vendor/gepa-python/src/gepa/adapters/default_adapter/__init__.py +0 -0
  268. package/vendor/gepa-python/src/gepa/adapters/default_adapter/default_adapter.py +206 -0
  269. package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/__init__.py +0 -0
  270. package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/dspy_adapter.py +525 -0
  271. package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/instruction_proposal.py +500 -0
  272. package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/__init__.py +6 -0
  273. package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/dspy_program_proposal_signature.py +137 -0
  274. package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/full_program_adapter.py +269 -0
  275. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/__init__.py +56 -0
  276. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/evaluation_metrics.py +226 -0
  277. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/generic_rag_adapter.py +496 -0
  278. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/rag_pipeline.py +238 -0
  279. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_store_interface.py +212 -0
  280. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/__init__.py +2 -0
  281. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/chroma_store.py +196 -0
  282. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/lancedb_store.py +422 -0
  283. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/milvus_store.py +409 -0
  284. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/qdrant_store.py +368 -0
  285. package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/weaviate_store.py +418 -0
  286. package/vendor/gepa-python/src/gepa/adapters/langchain_adapter/__init__.py +11 -0
  287. package/vendor/gepa-python/src/gepa/adapters/langchain_adapter/langchain_adapter.py +261 -0
  288. package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/__init__.py +37 -0
  289. package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/mcp_adapter.py +693 -0
  290. package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/mcp_client.py +364 -0
  291. package/vendor/gepa-python/src/gepa/adapters/optimize_anything_adapter/optimize_anything_adapter.py +879 -0
  292. package/vendor/gepa-python/src/gepa/adapters/terminal_bench_adapter/__init__.py +0 -0
  293. package/vendor/gepa-python/src/gepa/adapters/terminal_bench_adapter/terminal_bench_adapter.py +217 -0
  294. package/vendor/gepa-python/src/gepa/api.py +468 -0
  295. package/vendor/gepa-python/src/gepa/core/__init__.py +0 -0
  296. package/vendor/gepa-python/src/gepa/core/adapter.py +227 -0
  297. package/vendor/gepa-python/src/gepa/core/callbacks.py +551 -0
  298. package/vendor/gepa-python/src/gepa/core/data_loader.py +74 -0
  299. package/vendor/gepa-python/src/gepa/core/engine.py +1025 -0
  300. package/vendor/gepa-python/src/gepa/core/result.py +271 -0
  301. package/vendor/gepa-python/src/gepa/core/state.py +706 -0
  302. package/vendor/gepa-python/src/gepa/examples/__init__.py +0 -0
  303. package/vendor/gepa-python/src/gepa/examples/aime.py +24 -0
  304. package/vendor/gepa-python/src/gepa/examples/anymaths-bench/eval_default.py +111 -0
  305. package/vendor/gepa-python/src/gepa/examples/anymaths-bench/train_anymaths.py +177 -0
  306. package/vendor/gepa-python/src/gepa/examples/mcp_adapter/__init__.py +4 -0
  307. package/vendor/gepa-python/src/gepa/examples/mcp_adapter/mcp_optimization_example.py +456 -0
  308. package/vendor/gepa-python/src/gepa/examples/rag_adapter/__init__.py +9 -0
  309. package/vendor/gepa-python/src/gepa/examples/rag_adapter/rag_optimization.py +824 -0
  310. package/vendor/gepa-python/src/gepa/examples/terminal-bench/train_terminus.py +161 -0
  311. package/vendor/gepa-python/src/gepa/gepa_utils.py +117 -0
  312. package/vendor/gepa-python/src/gepa/gskill/__init__.py +1 -0
  313. package/vendor/gepa-python/src/gepa/gskill/gskill/__init__.py +0 -0
  314. package/vendor/gepa-python/src/gepa/gskill/gskill/cost_tracker.py +194 -0
  315. package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/__init__.py +0 -0
  316. package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/claude_code.py +1117 -0
  317. package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/claude_code_skills.py +613 -0
  318. package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/mini_swe_agent.py +440 -0
  319. package/vendor/gepa-python/src/gepa/gskill/gskill/experiment_logger.py +367 -0
  320. package/vendor/gepa-python/src/gepa/gskill/gskill/swe_fitness_fn.py +209 -0
  321. package/vendor/gepa-python/src/gepa/gskill/gskill/swe_harness.py +352 -0
  322. package/vendor/gepa-python/src/gepa/gskill/gskill/train_optimize_anything.py +830 -0
  323. package/vendor/gepa-python/src/gepa/image.py +104 -0
  324. package/vendor/gepa-python/src/gepa/lm.py +261 -0
  325. package/vendor/gepa-python/src/gepa/logging/__init__.py +0 -0
  326. package/vendor/gepa-python/src/gepa/logging/experiment_tracker.py +457 -0
  327. package/vendor/gepa-python/src/gepa/logging/logger.py +75 -0
  328. package/vendor/gepa-python/src/gepa/logging/utils.py +130 -0
  329. package/vendor/gepa-python/src/gepa/optimize_anything.py +1701 -0
  330. package/vendor/gepa-python/src/gepa/proposer/__init__.py +0 -0
  331. package/vendor/gepa-python/src/gepa/proposer/base.py +53 -0
  332. package/vendor/gepa-python/src/gepa/proposer/merge.py +403 -0
  333. package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/__init__.py +0 -0
  334. package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/base.py +64 -0
  335. package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/reflection_lm.py +178 -0
  336. package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/reflective_mutation.py +641 -0
  337. package/vendor/gepa-python/src/gepa/py.typed +0 -0
  338. package/vendor/gepa-python/src/gepa/strategies/__init__.py +0 -0
  339. package/vendor/gepa-python/src/gepa/strategies/acceptance.py +66 -0
  340. package/vendor/gepa-python/src/gepa/strategies/batch_sampler.py +103 -0
  341. package/vendor/gepa-python/src/gepa/strategies/candidate_selector.py +82 -0
  342. package/vendor/gepa-python/src/gepa/strategies/component_selector.py +36 -0
  343. package/vendor/gepa-python/src/gepa/strategies/eval_policy.py +64 -0
  344. package/vendor/gepa-python/src/gepa/strategies/instruction_proposal.py +153 -0
  345. package/vendor/gepa-python/src/gepa/strategies/proposal_sampling.py +128 -0
  346. package/vendor/gepa-python/src/gepa/strategies/proposal_selection.py +84 -0
  347. package/vendor/gepa-python/src/gepa/utils/__init__.py +63 -0
  348. package/vendor/gepa-python/src/gepa/utils/code_execution.py +626 -0
  349. package/vendor/gepa-python/src/gepa/utils/stdio_capture.py +145 -0
  350. package/vendor/gepa-python/src/gepa/utils/stop_condition.py +230 -0
  351. package/vendor/gepa-python/src/gepa/visualization.py +359 -0
  352. package/vendor/orizu-gepa/pyproject.toml +18 -0
  353. package/vendor/orizu-gepa/src/orizu_gepa_connector/__init__.py +9 -0
  354. package/vendor/orizu-gepa/src/orizu_gepa_connector/__main__.py +5 -0
  355. package/vendor/orizu-gepa/src/orizu_gepa_connector/adapter.py +138 -0
  356. package/vendor/orizu-gepa/src/orizu_gepa_connector/callbacks.py +666 -0
  357. package/vendor/orizu-gepa/src/orizu_gepa_connector/cli.py +7 -0
  358. package/vendor/orizu-gepa/src/orizu_gepa_connector/engine.py +269 -0
  359. package/vendor/orizu-gepa/src/orizu_gepa_connector/instruction_set_loader.py +52 -0
  360. package/vendor/orizu-gepa/src/orizu_gepa_connector/preflight.py +64 -0
  361. package/vendor/orizu-gepa/src/orizu_gepa_connector/reflection.py +186 -0
  362. package/vendor/orizu-gepa/src/orizu_gepa_connector/runtime.py +721 -0
  363. package/vendor/orizu-gepa/src/orizu_gepa_connector/skilled_proposer_bridge.py +381 -0
  364. package/vendor/orizu-gepa/src/orizu_gepa_connector/stop_conditions.py +55 -0
  365. package/vendor/orizu-gepa/src/orizu_gepa_connector/translator.py +203 -0
  366. package/vendor/orizu-gepa-python/pyproject.toml +1 -1
  367. package/vendor/orizu-gepa-python/src/orizu_gepa/cli.py +1 -0
  368. package/vendor/orizu-gepa-python/src/orizu_gepa/client.py +52 -7
  369. package/vendor/orizu-gepa-python/src/orizu_gepa/local_log.py +52 -0
  370. package/vendor/orizu-gepa-python/src/orizu_gepa/optimizer.py +10 -5
  371. package/vendor/orizu-gepa-python/src/orizu_gepa/reflection.py +323 -68
  372. package/vendor/orizu-gepa-python/src/orizu_gepa/runner.py +207 -13
  373. package/vendor/skills/orizu-cli/SKILL.md +3 -1
  374. package/vendor/skills/orizu-cli/references/cli-reference.md +85 -1
  375. package/vendor/skills/orizu-cli/references/migrate-existing-gepa-setup.md +303 -0
  376. package/vendor/skills/orizu-cli/references/optimization-reports.md +1 -1
  377. package/vendor/skills/orizu-cli/references/optimization-with-gepa.md +26 -1
  378. package/vendor/skills/orizu-cli/references/prompt-control-plane.md +113 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-label-cli.d.ts","sourceRoot":"","sources":["../src/prompt-label-cli.ts"],"names":[],"mappings":"AAGA,UAAU,qBAAqB;IAC7B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IACvC,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClD,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACnD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAChE;AAYD,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgClF"}
@@ -0,0 +1,29 @@
1
+ import { authedFetch } from './http.js';
2
+ import { parseJsonResponse, sanitizeTerminalText } from './json-response.js';
3
+ export async function setPromptLabel(context) {
4
+ const promptName = context.getPositionalArg(3);
5
+ const label = context.getPositionalArg(4);
6
+ const project = context.getArg('--project') || await context.resolveProjectSlug(null);
7
+ const promptVersionId = context.getArg('--version');
8
+ if (!promptName || !label || !promptVersionId) {
9
+ throw new Error('Usage: orizu prompts labels set <prompt-name> <label> --version <prompt-version-id> [--project <team/project>] [--json]');
10
+ }
11
+ const response = await authedFetch(`/api/cli/prompts/labels?project=${encodeURIComponent(project)}`, {
12
+ method: 'POST',
13
+ headers: { 'Content-Type': 'application/json' },
14
+ body: JSON.stringify({ promptName, label, promptVersionId }),
15
+ });
16
+ if (!response.ok) {
17
+ throw new Error(`Failed to set prompt label: ${await response.text()}`);
18
+ }
19
+ const data = await parseJsonResponse(response, 'Prompt label set');
20
+ if (context.json) {
21
+ context.printJson(data);
22
+ return;
23
+ }
24
+ context.printLine(`Moved ${sanitizeTerminalText(label)} to ${sanitizeTerminalText(promptVersionId)}`);
25
+ if (data.owner) {
26
+ context.printLine(`Owner: ${sanitizeTerminalText(promptName)} (${sanitizeTerminalText(data.prompt_id)}) -> ` +
27
+ `${sanitizeTerminalText(data.owner.instructionSetSlug)} / ${sanitizeTerminalText(data.owner.componentKey)}`);
28
+ }
29
+ }
@@ -0,0 +1,28 @@
1
+ export declare const CLI_LENGTH_STATS_FIELDS: readonly ["tokens", "lines", "chars", "words"];
2
+ export declare const CLI_LENGTH_DELTA_SPLIT_UNAVAILABLE_REASONS: readonly ["diff_degraded_size_limit", "diff_degraded_cell_limit"];
3
+ export declare const CLI_LENGTH_MEASUREMENT_UNAVAILABLE_REASONS: readonly ["length_measurement_size_limit", "length_measurement_failed", "body_resolution_failed", "measurement_cap_exceeded", "enrichment_failed", "bodies_unavailable_event_cap"];
4
+ export type CliLengthStatsField = typeof CLI_LENGTH_STATS_FIELDS[number];
5
+ export type CliLengthDeltaSplitUnavailableReason = typeof CLI_LENGTH_DELTA_SPLIT_UNAVAILABLE_REASONS[number];
6
+ export type CliLengthMeasurementUnavailableReason = typeof CLI_LENGTH_MEASUREMENT_UNAVAILABLE_REASONS[number];
7
+ export interface CliLengthStats {
8
+ tokens: number;
9
+ lines: number;
10
+ chars: number;
11
+ words: number;
12
+ }
13
+ export interface CliLengthStatsPair {
14
+ from: CliLengthStats | null;
15
+ to: CliLengthStats | null;
16
+ fromUnavailableReason?: CliLengthMeasurementUnavailableReason;
17
+ toUnavailableReason?: CliLengthMeasurementUnavailableReason;
18
+ }
19
+ export interface CliLengthMetricDelta {
20
+ removed: number | null;
21
+ added: number | null;
22
+ net: number;
23
+ }
24
+ export interface CliLengthDelta extends Record<CliLengthStatsField, CliLengthMetricDelta> {
25
+ splitUnavailableReason: CliLengthDeltaSplitUnavailableReason | null;
26
+ }
27
+ export declare function formatFiniteLengthCount(value: unknown, signed?: boolean): string | null;
28
+ //# sourceMappingURL=prompt-length-wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-length-wire.d.ts","sourceRoot":"","sources":["../src/prompt-length-wire.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,gDAK1B,CAAA;AAEV,eAAO,MAAM,0CAA0C,mEAG7C,CAAA;AACV,eAAO,MAAM,0CAA0C,oLAO7C,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAA;AACxE,MAAM,MAAM,oCAAoC,GAC9C,OAAO,0CAA0C,CAAC,MAAM,CAAC,CAAA;AAC3D,MAAM,MAAM,qCAAqC,GAC/C,OAAO,0CAA0C,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;IAC3B,EAAE,EAAE,cAAc,GAAG,IAAI,CAAA;IACzB,qBAAqB,CAAC,EAAE,qCAAqC,CAAA;IAC7D,mBAAmB,CAAC,EAAE,qCAAqC,CAAA;CAC5D;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,cAAe,SAAQ,MAAM,CAC5C,mBAAmB,EACnB,oBAAoB,CACrB;IACC,sBAAsB,EAAE,oCAAoC,GAAG,IAAI,CAAA;CACpE;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,EACd,MAAM,UAAQ,GACb,MAAM,GAAG,IAAI,CAQf"}
@@ -19,9 +19,9 @@ export const CLI_LENGTH_MEASUREMENT_UNAVAILABLE_REASONS = [
19
19
  export function formatFiniteLengthCount(value, signed = false) {
20
20
  if (typeof value !== 'number' || !Number.isFinite(value))
21
21
  return null;
22
- const formatted = Math.abs(value).toLocaleString('en-US');
23
22
  if (!signed)
24
- return formatted;
23
+ return value.toLocaleString('en-US');
24
+ const formatted = Math.abs(value).toLocaleString('en-US');
25
25
  if (value > 0)
26
26
  return `+${formatted}`;
27
27
  if (value < 0)
@@ -0,0 +1,10 @@
1
+ export interface PromptReportCliContext {
2
+ resolveProjectSlug: (project: string | null) => Promise<string>;
3
+ json: boolean;
4
+ printJson: (payload: Record<string, unknown>) => void;
5
+ printLine: (message?: string) => void;
6
+ fetcher?: (path: string, init?: RequestInit) => Promise<Response>;
7
+ }
8
+ export declare function promptReportCommand(args: readonly string[], context: PromptReportCliContext): Promise<void>;
9
+ export declare function promptPushErrorMessage(response: Response, kind: 'prompt' | 'judge', hasReport: boolean): Promise<string>;
10
+ //# sourceMappingURL=prompt-report-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-report-cli.d.ts","sourceRoot":"","sources":["../src/prompt-report-cli.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,sBAAsB;IACrC,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC/D,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACrD,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAClE;AAiBD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,sBAAsB,iBA0EhC;AAED,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,QAAQ,GAAG,OAAO,EACxB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,MAAM,CAAC,CASjB"}
@@ -27,7 +27,7 @@ export async function promptReportCommand(args, context) {
27
27
  rejectDashPrefixedOptionValue(name, value);
28
28
  }
29
29
  if (!prompt) {
30
- throw new Error('Usage: orizu prompts report set --prompt <id-or-name> --project <team/project> ' +
30
+ throw new Error('Usage: orizu prompts report set --prompt <id-or-name> [--project <team/project>] ' +
31
31
  '(--version <n> | --version-id <id>) ' +
32
32
  '(--report <markdown|@file> | --report-file <path>) [--json]');
33
33
  }
@@ -39,7 +39,7 @@ export async function promptReportCommand(args, context) {
39
39
  }
40
40
  const report = readMarkdownReportInput(args, 'Prompt');
41
41
  if (!report) {
42
- throw new Error('Usage: orizu prompts report set --prompt <id-or-name> --project <team/project> ' +
42
+ throw new Error('Usage: orizu prompts report set --prompt <id-or-name> [--project <team/project>] ' +
43
43
  '(--version <n> | --version-id <id>) ' +
44
44
  '(--report <markdown|@file> | --report-file <path>) [--json]');
45
45
  }
@@ -0,0 +1,15 @@
1
+ import { type CliLengthStats } from './prompt-length-wire.js';
2
+ interface PromptSummaryRow {
3
+ id: string;
4
+ name: string;
5
+ role: string;
6
+ status?: string;
7
+ lengthStats?: CliLengthStats | null;
8
+ owner?: {
9
+ instructionSetSlug: string;
10
+ componentKey: string;
11
+ } | null;
12
+ }
13
+ export declare function printPromptSummaryTable(items: PromptSummaryRow[], emptyMessage: string, printLine: (line: string) => void): void;
14
+ export {};
15
+ //# sourceMappingURL=prompt-summary-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-summary-table.d.ts","sourceRoot":"","sources":["../src/prompt-summary-table.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAEhC,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACnC,KAAK,CAAC,EAAE;QACN,kBAAkB,EAAE,MAAM,CAAA;QAC1B,YAAY,EAAE,MAAM,CAAA;KACrB,GAAG,IAAI,CAAA;CACT;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,gBAAgB,EAAE,EACzB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QA+ClC"}
@@ -34,4 +34,10 @@ export function printPromptSummaryTable(items, emptyMessage, printLine) {
34
34
  rows.forEach(row => {
35
35
  printLine(keys.map((key, index) => row[key].padEnd(widths[index])).join(' '));
36
36
  });
37
+ items.forEach(item => {
38
+ if (item.owner) {
39
+ printLine(`Owner: ${sanitizeTerminalText(item.name)} (${sanitizeTerminalText(item.id)}) -> ` +
40
+ `${sanitizeTerminalText(item.owner.instructionSetSlug)} / ${sanitizeTerminalText(item.owner.componentKey)}`);
41
+ }
42
+ });
37
43
  }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * ADR-009 amendment / ALI-1157 (Codex P2 finding 5): a shared, human-readable
3
+ * warning for a registration-tag failure on a draft push.
4
+ *
5
+ * "Registration is publication": every draft writer plants a permanent
6
+ * `orizu/registered/<kind>/<versionId>` tag at the row's pinned commit. That
7
+ * tag is BEST-EFFORT — the row + commit pin are already durable, so a tag that
8
+ * fails to plant never fails the push (exit stays 0). But the failure used to
9
+ * be visible only under `--json`; normal output printed unconditional success.
10
+ * This surfaces it as a one-line warning the push commands append to their
11
+ * success message.
12
+ *
13
+ * Codex round-2 finding 4: the warning must NOT promise automatic retry — no
14
+ * reconciler exists yet (it is a tracked follow-up). It states the version is
15
+ * registered and the tag can be re-planted on the next registration or by hand.
16
+ *
17
+ * A tag "failed to plant" when `registration_tag.planted === false` (the tag
18
+ * already exists at a DIFFERENT commit — never moved — or the transport/pin
19
+ * lookup failed). `planted === true` (freshly created OR idempotent replay)
20
+ * and a missing field (older server / no tag attempted) produce no warning.
21
+ */
22
+ /**
23
+ * A one-line warning for a failed registration tag on a draft-push response
24
+ * body, or null when the tag planted (or none was attempted).
25
+ */
26
+ export declare function registrationTagWarning(data: Record<string, unknown>): string | null;
27
+ /**
28
+ * Append the registration-tag warning (if any) to a push success message,
29
+ * keeping it a single trailing line. Exit stays 0 — registration succeeded.
30
+ */
31
+ export declare function appendRegistrationTagWarning(message: string, data: Record<string, unknown>): string;
32
+ //# sourceMappingURL=registration-tag-warning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registration-tag-warning.d.ts","sourceRoot":"","sources":["../src/registration-tag-warning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAYH;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAYnF;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAGnG"}
@@ -0,0 +1,16 @@
1
+ export interface ReportCommentsCliContext {
2
+ getArg: (name: string) => string | null;
3
+ getPositionalArg: (index: number) => string | null;
4
+ rejectDashPrefixedOptionValue: (name: string, value: string | null) => void;
5
+ resolveProjectSlug: (preferredProject: string | null) => Promise<string>;
6
+ readSourceFile: (pathArg: string) => string;
7
+ authedFetch: (path: string, init?: RequestInit) => Promise<Response>;
8
+ parseJsonResponse: <T>(response: Response, context: string) => Promise<T>;
9
+ hasJsonFlag: () => boolean;
10
+ printJson: (value: Record<string, unknown>) => void;
11
+ printLine: (message?: string) => void;
12
+ sanitizeTerminalText: (value: unknown) => string;
13
+ }
14
+ export declare function reportCommentsCommand(action: string | undefined, ctx: ReportCommentsCliContext): Promise<void>;
15
+ export declare function throwDeprecatedPromptCommentsCommand(): never;
16
+ //# sourceMappingURL=report-comments-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-comments-cli.d.ts","sourceRoot":"","sources":["../src/report-comments-cli.ts"],"names":[],"mappings":"AA6FA,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IACvC,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClD,6BAA6B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC3E,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACxE,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;IAC3C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IACpE,iBAAiB,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IACzE,WAAW,EAAE,MAAM,OAAO,CAAA;IAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACnD,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;CACjD;AA6YD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,wBAAwB,iBAqB9B;AAED,wBAAgB,oCAAoC,IAAI,KAAK,CAI5D"}
@@ -0,0 +1,2 @@
1
+ export declare function hasCanonicalReportMarkdownContent(markdown: string): boolean;
2
+ //# sourceMappingURL=report-markdown-blankness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-markdown-blankness.d.ts","sourceRoot":"","sources":["../src/report-markdown-blankness.ts"],"names":[],"mappings":"AAGA,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3E"}
@@ -0,0 +1,6 @@
1
+ // JavaScript's \s is broader than the database locale's POSIX [:space:]
2
+ // predicate. These four code points are content in the measured PostgreSQL
3
+ // boundary, so retain them explicitly when validating CLI report input.
4
+ export function hasCanonicalReportMarkdownContent(markdown) {
5
+ return /(?:[^\s]|[\u00a0\u2007\u202f\ufeff])/u.test(markdown);
6
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ALI-1452: a shared, human-readable warning for a replaced prompt-version
3
+ * report on a push/draft response.
4
+ *
5
+ * Re-pushing an unchanged prompt with a report deliberately replaces the
6
+ * version's existing report (reports are correctable; versions are immutable).
7
+ * The server discloses that replacement as `report_replaced:
8
+ * { source_name, updated_at } | null`; this turns a non-null disclosure into
9
+ * the stderr warning line the push commands print. JSON mode prints nothing —
10
+ * the payload already carries `report_replaced`.
11
+ */
12
+ /**
13
+ * A one-line warning when a push response discloses that it replaced an
14
+ * existing report, or null when nothing was replaced (or no report was sent).
15
+ */
16
+ export declare function reportReplacementWarning(data: Record<string, unknown>): string | null;
17
+ //# sourceMappingURL=report-replacement-warning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-replacement-warning.d.ts","sourceRoot":"","sources":["../src/report-replacement-warning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAcrF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * ALI-1452: a shared, human-readable warning for a replaced prompt-version
3
+ * report on a push/draft response.
4
+ *
5
+ * Re-pushing an unchanged prompt with a report deliberately replaces the
6
+ * version's existing report (reports are correctable; versions are immutable).
7
+ * The server discloses that replacement as `report_replaced:
8
+ * { source_name, updated_at } | null`; this turns a non-null disclosure into
9
+ * the stderr warning line the push commands print. JSON mode prints nothing —
10
+ * the payload already carries `report_replaced`.
11
+ */
12
+ function isRecord(value) {
13
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
14
+ }
15
+ /**
16
+ * A one-line warning when a push response discloses that it replaced an
17
+ * existing report, or null when nothing was replaced (or no report was sent).
18
+ */
19
+ export function reportReplacementWarning(data) {
20
+ const replaced = data.report_replaced;
21
+ if (!isRecord(replaced))
22
+ return null;
23
+ const sourceName = typeof replaced.source_name === 'string'
24
+ ? replaced.source_name
25
+ : 'unknown source';
26
+ const updatedAt = typeof replaced.updated_at === 'string'
27
+ ? replaced.updated_at
28
+ : 'unknown time';
29
+ return ('Warning: replaced the existing report for this version ' +
30
+ `(${sourceName}, last updated ${updatedAt})`);
31
+ }
@@ -0,0 +1,225 @@
1
+ import { type ReadStream } from 'node:fs';
2
+ import { type RecoveryCredentialHelperInvocation } from './git-recovery-environment.js';
3
+ import { type FrozenRepositoryDatabasePin, type RepositoryBackupAdmissionEnvelopeVersion, type RepositoryRecoveryManifest, type RepositoryRecoveryRef, type RepositoryRefBindingMode } from './repository-recovery-manifest.js';
4
+ export interface RepositoryBackupLimits {
5
+ maxRefs: number;
6
+ maxObjects: number;
7
+ maxObjectBytes: number;
8
+ maxSingleObjectBytes: number;
9
+ maxCommits: number;
10
+ maxTreeEntries: number;
11
+ maxDatabasePins: number;
12
+ maxQuarantineBytes: number;
13
+ maxManifestBytes: number;
14
+ maxBundleBytes: number;
15
+ maxGitOutputBytes: number;
16
+ maxGitInputBytes: number;
17
+ /**
18
+ * Hard memory ceiling requested for the complete isolated job, not merely
19
+ * the Node.js heap or one Git child.
20
+ */
21
+ maxMemoryBytes: number;
22
+ /**
23
+ * Hard task ceiling requested for the complete job process tree. Production
24
+ * boundaries count threads as tasks so Git cannot bypass it with workers.
25
+ */
26
+ maxProcessCount: number;
27
+ commandTimeoutMs: number;
28
+ overallTimeoutMs: number;
29
+ }
30
+ export declare const MAX_REPOSITORY_BACKUP_MEMORY_BYTES: number;
31
+ export declare const MAX_REPOSITORY_BACKUP_PROCESS_COUNT = 64;
32
+ export declare const DEFAULT_REPOSITORY_BACKUP_LIMITS: Readonly<RepositoryBackupLimits>;
33
+ export interface RepositoryRefAdvertisement {
34
+ headTarget: string | null;
35
+ headObjectId: string | null;
36
+ refs: RepositoryRecoveryRef[];
37
+ peeledRefs: RepositoryRecoveryRef[];
38
+ }
39
+ export interface CloudflareArtifactsRepositoryTarget {
40
+ accountId: string;
41
+ namespace: string;
42
+ repository: string;
43
+ }
44
+ export interface RepositoryBackupExecutionBoundaryRequest {
45
+ /**
46
+ * The hard quota that must apply to the complete job filesystem, including
47
+ * source quarantine, bundle, manifest, and independent restore quarantine.
48
+ */
49
+ quotaBytes: number;
50
+ /**
51
+ * Hard total-memory ceiling for the job and all descendants. This must be
52
+ * independently enforced by the execution platform, not by a heap flag.
53
+ */
54
+ maxMemoryBytes: number;
55
+ /**
56
+ * Hard process/thread-task ceiling for the job and all descendants.
57
+ */
58
+ maxProcessCount: number;
59
+ purpose: 'create-and-verify' | 'verify-existing';
60
+ /**
61
+ * Hard wall for the complete filesystem-scoped operation. Production
62
+ * boundaries must terminate the job process and all descendants when this
63
+ * expires; an in-process AbortSignal alone is not an isolation boundary.
64
+ */
65
+ timeoutMs: number;
66
+ }
67
+ export interface RepositoryBackupExecutionFilesystem {
68
+ /** Empty, absolute filesystem root dedicated to exactly this job. */
69
+ rootPath: string;
70
+ quotaBytes: number;
71
+ maxMemoryBytes: number;
72
+ maxProcessCount: number;
73
+ isolation: 'per-job';
74
+ /**
75
+ * `hard` means the execution platform enforces quota independently of this
76
+ * process (for example, a sandbox volume/filesystem quota). The test-only
77
+ * mode is accepted only for explicit local fixtures.
78
+ */
79
+ quotaEnforcement: 'hard' | 'test-only-unenforced';
80
+ /**
81
+ * These attest that the boundary applied the requested limits to the whole
82
+ * job process tree before invoking the operation.
83
+ */
84
+ memoryEnforcement: 'hard' | 'test-only-unenforced';
85
+ processCountEnforcement: 'hard' | 'test-only-unenforced';
86
+ }
87
+ /**
88
+ * Production execution boundary. Implementations must provision a new,
89
+ * isolated filesystem with the exact requested hard quota, invoke `operation`
90
+ * exactly once, wait for it to settle, then destroy the filesystem. Merely
91
+ * pointing at a shared host temp directory does not satisfy this contract.
92
+ */
93
+ export interface RepositoryBackupExecutionBoundary {
94
+ withJobFilesystem<T>(request: RepositoryBackupExecutionBoundaryRequest, operation: (filesystem: RepositoryBackupExecutionFilesystem) => Promise<T>): Promise<T>;
95
+ }
96
+ export interface PathBackedRepositoryBackupArtifact {
97
+ /**
98
+ * Valid only for the duration of consumeVerifiedArtifacts. Callers should
99
+ * stream it and must not retain the path after the callback resolves.
100
+ */
101
+ path: string;
102
+ byteCount: number;
103
+ sha256: string;
104
+ openStream(): ReadStream;
105
+ }
106
+ export interface VerifiedRepositoryBackupArtifacts {
107
+ manifest: PathBackedRepositoryBackupArtifact;
108
+ bundle: PathBackedRepositoryBackupArtifact;
109
+ }
110
+ export interface RepositoryBackupDeadline {
111
+ /**
112
+ * Aborts at the same absolute deadline as the complete backup operation.
113
+ * Streaming implementations must pass this signal to every provider read,
114
+ * upload, and checksum/readback request.
115
+ */
116
+ signal: AbortSignal;
117
+ deadlineMs: number;
118
+ }
119
+ /**
120
+ * Deterministic scheduler seam for local recovery fixtures. Production
121
+ * callers always use the platform timer and cannot override the overall wall.
122
+ */
123
+ export interface RepositoryBackupTestDeadlineScheduler {
124
+ schedule(callback: () => void, delayMs: number): unknown;
125
+ cancel(handle: unknown): void;
126
+ }
127
+ export interface RepositoryBackupArtifactDestinations {
128
+ /**
129
+ * Create both files without following links and finish all writes before
130
+ * returning. Production implementations stream downloads into these paths.
131
+ */
132
+ manifestPath: string;
133
+ bundlePath: string;
134
+ }
135
+ export interface CreateVerifiedRepositoryBackupInput<TArtifactResult = unknown> {
136
+ /**
137
+ * Immutable admission policy frozen by the backup job. A new limit set
138
+ * receives a new version; an existing version is never reinterpreted.
139
+ */
140
+ admissionEnvelopeVersion: RepositoryBackupAdmissionEnvelopeVersion;
141
+ /**
142
+ * Secret-free remote locator. Production authentication is supplied only by
143
+ * the trusted backup worker's command-scoped exact-path helper below.
144
+ */
145
+ remoteUrl: string;
146
+ /**
147
+ * Exact provider identity frozen by the backup job. Every production remote
148
+ * is reconstructed from this tuple and compared byte-for-byte before Git is
149
+ * spawned, so an attacker-controlled locator cannot redirect the
150
+ * operation-scoped credential helper to another origin or repository.
151
+ */
152
+ cloudflareArtifactsTarget?: CloudflareArtifactsRepositoryTarget;
153
+ /**
154
+ * Test-only/local-rehearsal escape hatch. Production callers accept HTTPS
155
+ * only. `file://` is never inferred from an ambient Git config.
156
+ */
157
+ allowLocalRemote?: boolean;
158
+ /**
159
+ * Optional trusted executable invocation; arguments may identify an opaque
160
+ * operation but must never contain a token/password. The helper obtains a
161
+ * one-use credential when Git asks and store/erase remain no-ops.
162
+ */
163
+ credentialHelper?: RecoveryCredentialHelperInvocation;
164
+ requiredRef: string;
165
+ /**
166
+ * Exact is required for immutable publication/bootstrap/recovery refs.
167
+ * Reachability keeps a frozen historical merge/scheduled commit executable
168
+ * after its provenance branch advances.
169
+ */
170
+ requiredRefBindingMode?: RepositoryRefBindingMode;
171
+ requiredCommitSha: string;
172
+ databasePins: readonly FrozenRepositoryDatabasePin[];
173
+ limits?: Partial<RepositoryBackupLimits>;
174
+ executionBoundary: RepositoryBackupExecutionBoundary;
175
+ /**
176
+ * Test-only scheduler for deterministic deadline tests. It is rejected
177
+ * unless the remote is an explicit local fixture and the execution boundary
178
+ * attests that every resource limit is test-only and unenforced.
179
+ */
180
+ testDeadlineScheduler?: RepositoryBackupTestDeadlineScheduler;
181
+ /**
182
+ * Runs only after source-side and independent restore verification. Stream
183
+ * both path-backed artifacts to durable storage before returning; the
184
+ * execution boundary destroys every path after this callback settles.
185
+ */
186
+ consumeVerifiedArtifacts: (artifacts: VerifiedRepositoryBackupArtifacts, deadline: RepositoryBackupDeadline) => Promise<TArtifactResult>;
187
+ }
188
+ export interface VerifiedRepositoryBackup<TArtifactResult = unknown> {
189
+ manifest: RepositoryRecoveryManifest;
190
+ /**
191
+ * Plaintext artifact hashes. Storage code must verify the uploaded
192
+ * FULL_OBJECT checksum and separately record exact object version, KMS key,
193
+ * and retention evidence. Neither value is a ciphertext hash.
194
+ */
195
+ manifestSha256: string;
196
+ bundleSha256: string;
197
+ manifestByteCount: number;
198
+ bundleByteCount: number;
199
+ artifactResult: TArtifactResult;
200
+ advertisementBefore: RepositoryRefAdvertisement;
201
+ advertisementAfter: RepositoryRefAdvertisement;
202
+ }
203
+ export interface VerifyRepositoryBackupBundleInput {
204
+ /**
205
+ * Exact version frozen by the backup attempt. It must match the persisted
206
+ * manifest before any restored evidence is accepted.
207
+ */
208
+ admissionEnvelopeVersion: RepositoryBackupAdmissionEnvelopeVersion;
209
+ limits?: Partial<RepositoryBackupLimits> | RepositoryBackupLimits;
210
+ executionBoundary: RepositoryBackupExecutionBoundary;
211
+ /**
212
+ * Stream existing artifacts into the exact fresh paths supplied by the
213
+ * verifier. This avoids accepting or copying a multi-gigabyte Buffer.
214
+ */
215
+ stageArtifacts: (destinations: RepositoryBackupArtifactDestinations, deadline: RepositoryBackupDeadline) => Promise<void>;
216
+ }
217
+ export interface RepositoryBackupVerificationReceipt {
218
+ refsVerified: number;
219
+ objectsVerified: number;
220
+ databasePinsVerified: number;
221
+ }
222
+ export declare function assertStableRepositoryRefAdvertisement(before: RepositoryRefAdvertisement, after: RepositoryRefAdvertisement): void;
223
+ export declare function verifyRepositoryBackupBundle(input: VerifyRepositoryBackupBundleInput): Promise<RepositoryBackupVerificationReceipt>;
224
+ export declare function createVerifiedRepositoryBackup<TArtifactResult>(input: CreateVerifiedRepositoryBackupInput<TArtifactResult>): Promise<VerifiedRepositoryBackup<TArtifactResult>>;
225
+ //# sourceMappingURL=repository-backup-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-backup-core.d.ts","sourceRoot":"","sources":["../src/repository-backup-core.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAY3D,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAML,KAAK,2BAA2B,EAEhC,KAAK,wCAAwC,EAC7C,KAAK,0BAA0B,EAE/B,KAAK,qBAAqB,EAC1B,KA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C,CAAA;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAA;IACjE,iBAAiB,EAAE,iCAAiC,CAAA;IACpD;;;OAGG;IACH,cAAc,EAAE,CACd,YAAY,EAAE,oCAAoC,EAClD,QAAQ,EAAE,wBAAwB,KAC/B,OAAO,CAAC,IAAI,CAAC,CAAA;CACnB;AAED,MAAM,WAAW,mCAAmC;IAClD,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,oBAAoB,EAAE,MAAM,CAAA;CAC7B;AAw1BD,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,0BAA0B,GAChC,IAAI,CAIN;AAu8BD,wBAAsB,4BAA4B,CAChD,KAAK,EAAE,iCAAiC,GACvC,OAAO,CAAC,mCAAmC,CAAC,CA8C9C;AAED,wBAAsB,8BAA8B,CAAC,eAAe,EAClE,KAAK,EAAE,mCAAmC,CAAC,eAAe,CAAC,GAC1D,OAAO,CAAC,wBAAwB,CAAC,eAAe,CAAC,CAAC,CA+VpD"}
@@ -0,0 +1,83 @@
1
+ export declare const REPOSITORY_RECOVERY_MANIFEST_KIND: "orizu.repository-recovery-manifest";
2
+ export declare const REPOSITORY_RECOVERY_MANIFEST_VERSION: 1;
3
+ export declare const REPOSITORY_BACKUP_ADMISSION_ENVELOPE_VERSION: 1;
4
+ export type RepositoryBackupAdmissionEnvelopeVersion = typeof REPOSITORY_BACKUP_ADMISSION_ENVELOPE_VERSION;
5
+ export type GitObjectType = 'blob' | 'commit' | 'tag' | 'tree';
6
+ export interface RepositoryRecoveryRef {
7
+ name: string;
8
+ objectId: string;
9
+ }
10
+ export interface RepositoryRecoveryObject {
11
+ objectId: string;
12
+ type: GitObjectType;
13
+ size: number;
14
+ }
15
+ export type RepositoryRefBindingMode = 'exact' | 'reachability';
16
+ export type RepositoryDatabasePinRefBindingMode = RepositoryRefBindingMode;
17
+ export type RepositoryDatabasePinPathObjectType = 'blob' | 'tree';
18
+ export interface FrozenRepositoryDatabasePin {
19
+ pinId: string;
20
+ kind: string;
21
+ commitSha: string;
22
+ /** Frozen provenance ref. Reachability mode does not imply it is still at commitSha. */
23
+ ref: string;
24
+ /** Whether the provenance ref tip itself is frozen or only commit reachability is. */
25
+ refBindingMode: RepositoryDatabasePinRefBindingMode;
26
+ path?: string;
27
+ pathObjectType?: RepositoryDatabasePinPathObjectType;
28
+ pathObjectId?: string;
29
+ /** Optional byte-level proof for blob pins; tree identity is the Git object ID. */
30
+ contentSha256?: string;
31
+ }
32
+ export interface RepositoryRecoveryManifestInput {
33
+ admissionEnvelopeVersion: RepositoryBackupAdmissionEnvelopeVersion;
34
+ objectFormat: 'sha1';
35
+ headTarget: string | null;
36
+ headObjectId: string | null;
37
+ requiredRef: string;
38
+ requiredRefBindingMode: RepositoryRefBindingMode;
39
+ requiredCommitSha: string;
40
+ refs: readonly RepositoryRecoveryRef[];
41
+ objects: readonly RepositoryRecoveryObject[];
42
+ databasePins: readonly FrozenRepositoryDatabasePin[];
43
+ }
44
+ export interface RepositoryRecoveryManifest {
45
+ kind: typeof REPOSITORY_RECOVERY_MANIFEST_KIND;
46
+ version: typeof REPOSITORY_RECOVERY_MANIFEST_VERSION;
47
+ admissionEnvelopeVersion: RepositoryBackupAdmissionEnvelopeVersion;
48
+ objectFormat: 'sha1';
49
+ headTarget: string | null;
50
+ headObjectId: string | null;
51
+ requiredRef: string;
52
+ requiredRefBindingMode: RepositoryRefBindingMode;
53
+ requiredCommitSha: string;
54
+ refs: RepositoryRecoveryRef[];
55
+ objects: RepositoryRecoveryObject[];
56
+ databasePins: FrozenRepositoryDatabasePin[];
57
+ totals: {
58
+ refCount: number;
59
+ objectCount: number;
60
+ objectBytes: number;
61
+ databasePinCount: number;
62
+ };
63
+ }
64
+ export declare function assertSha1ObjectId(value: string, label?: string): void;
65
+ export declare function assertSha256(value: string, label?: string): void;
66
+ /**
67
+ * A deliberately explicit subset of `git check-ref-format`. Recovery accepts
68
+ * every ordinary `refs/*` namespace, but never pseudo refs or replace refs:
69
+ * importing `refs/replace/*` would change object resolution during verification.
70
+ */
71
+ export declare function assertRecoveryRefName(value: string, label?: string): void;
72
+ export declare function assertSafeRecoveryPath(value: string, label?: string): void;
73
+ export declare function canonicalizeRepositoryRecoveryManifest(input: RepositoryRecoveryManifestInput): RepositoryRecoveryManifest;
74
+ export declare function serializeRepositoryRecoveryManifest(manifest: RepositoryRecoveryManifest): Buffer;
75
+ /**
76
+ * Parse persisted evidence without silently upgrading, normalizing, or
77
+ * discarding fields. The byte comparison rejects duplicate JSON keys,
78
+ * unexpected fields, changed totals, non-canonical ordering/whitespace, and
79
+ * any future manifest version this runtime does not explicitly understand.
80
+ */
81
+ export declare function parseRepositoryRecoveryManifestBytes(bytes: Uint8Array): RepositoryRecoveryManifest;
82
+ export declare function sha256Hex(bytes: Uint8Array): string;
83
+ //# sourceMappingURL=repository-recovery-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-recovery-manifest.d.ts","sourceRoot":"","sources":["../src/repository-recovery-manifest.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,EAC5C,oCAA6C,CAAA;AAC/C,eAAO,MAAM,oCAAoC,EAAG,CAAU,CAAA;AAC9D,eAAO,MAAM,4CAA4C,EAAG,CAAU,CAAA;AAEtE,MAAM,MAAM,wCAAwC,GAClD,OAAO,4CAA4C,CAAA;AAErD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAA;AAE9D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,wBAAwB,GAChC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