orizu 0.5.20 → 0.5.22

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 (269) hide show
  1. package/README.md +9 -6
  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 +3 -0
  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 +67 -2
  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-paths.d.ts +6 -0
  45. package/dist/gepa-python-paths.d.ts.map +1 -0
  46. package/dist/gepa-python-paths.js +26 -4
  47. package/dist/git-credential.d.ts +69 -0
  48. package/dist/git-credential.d.ts.map +1 -0
  49. package/dist/git-recovery-environment.d.ts +31 -0
  50. package/dist/git-recovery-environment.d.ts.map +1 -0
  51. package/dist/github-setup.d.ts +122 -0
  52. package/dist/github-setup.d.ts.map +1 -0
  53. package/dist/global-flags.d.ts +12 -0
  54. package/dist/global-flags.d.ts.map +1 -0
  55. package/dist/help.d.ts +46 -0
  56. package/dist/help.d.ts.map +1 -0
  57. package/dist/help.js +125 -35
  58. package/dist/hosted-boot.d.ts +273 -0
  59. package/dist/hosted-boot.d.ts.map +1 -0
  60. package/dist/hosted-bootstrap-rehearsal.d.ts +86 -0
  61. package/dist/hosted-bootstrap-rehearsal.d.ts.map +1 -0
  62. package/dist/hosted-bootstrap.d.ts +188 -0
  63. package/dist/hosted-bootstrap.d.ts.map +1 -0
  64. package/dist/hosted-broker-server.d.ts +50 -0
  65. package/dist/hosted-broker-server.d.ts.map +1 -0
  66. package/dist/hosted-git-http-server.d.ts +36 -0
  67. package/dist/hosted-git-http-server.d.ts.map +1 -0
  68. package/dist/hosted-harness-claude.d.ts +195 -0
  69. package/dist/hosted-harness-claude.d.ts.map +1 -0
  70. package/dist/hosted-harness-opencode.d.ts +227 -0
  71. package/dist/hosted-harness-opencode.d.ts.map +1 -0
  72. package/dist/hosted-harness.d.ts +118 -0
  73. package/dist/hosted-harness.d.ts.map +1 -0
  74. package/dist/hosted-harvest.d.ts +68 -0
  75. package/dist/hosted-harvest.d.ts.map +1 -0
  76. package/dist/hosted-headless.d.ts +72 -0
  77. package/dist/hosted-headless.d.ts.map +1 -0
  78. package/dist/hosted-loop-lifecycle.d.ts +206 -0
  79. package/dist/hosted-loop-lifecycle.d.ts.map +1 -0
  80. package/dist/hosted-loop.d.ts +170 -0
  81. package/dist/hosted-loop.d.ts.map +1 -0
  82. package/dist/hosted-run-event-sink.d.ts +222 -0
  83. package/dist/hosted-run-event-sink.d.ts.map +1 -0
  84. package/dist/hosted-runtime-assets.d.ts +186 -0
  85. package/dist/hosted-runtime-assets.d.ts.map +1 -0
  86. package/dist/hosted-session-cli.d.ts +258 -0
  87. package/dist/hosted-session-cli.d.ts.map +1 -0
  88. package/dist/hosted-skill-staging.d.ts +73 -0
  89. package/dist/hosted-skill-staging.d.ts.map +1 -0
  90. package/dist/http.d.ts +8 -0
  91. package/dist/http.d.ts.map +1 -0
  92. package/dist/index.d.ts +22 -0
  93. package/dist/index.d.ts.map +1 -0
  94. package/dist/index.js +86 -125
  95. package/dist/instruction-set-gepa-launch.d.ts +3 -0
  96. package/dist/instruction-set-gepa-launch.d.ts.map +1 -0
  97. package/dist/instruction-set-gepa-launch.js +15 -0
  98. package/dist/instruction-set-loader.d.ts +6 -0
  99. package/dist/instruction-set-loader.d.ts.map +1 -0
  100. package/dist/instruction-set-loader.js +111 -0
  101. package/dist/instruction-set-manifest.d.ts +14 -0
  102. package/dist/instruction-set-manifest.d.ts.map +1 -0
  103. package/dist/instruction-set-manifest.js +162 -0
  104. package/dist/instruction-sets-cli.d.ts +43 -0
  105. package/dist/instruction-sets-cli.d.ts.map +1 -0
  106. package/dist/instruction-sets-cli.js +471 -0
  107. package/dist/json-response.d.ts +4 -0
  108. package/dist/json-response.d.ts.map +1 -0
  109. package/dist/jsonl-stream.d.ts +8 -0
  110. package/dist/jsonl-stream.d.ts.map +1 -0
  111. package/dist/kill-switch-cli.d.ts +30 -0
  112. package/dist/kill-switch-cli.d.ts.map +1 -0
  113. package/dist/loopback-serve.d.ts +25 -0
  114. package/dist/loopback-serve.d.ts.map +1 -0
  115. package/dist/manifests-cli.d.ts +22 -0
  116. package/dist/manifests-cli.d.ts.map +1 -0
  117. package/dist/markdown-report-input.d.ts +7 -0
  118. package/dist/markdown-report-input.d.ts.map +1 -0
  119. package/dist/merge-job.d.ts +155 -0
  120. package/dist/merge-job.d.ts.map +1 -0
  121. package/dist/model-configs-cli.d.ts +19 -0
  122. package/dist/model-configs-cli.d.ts.map +1 -0
  123. package/dist/model-configs-cli.js +104 -0
  124. package/dist/optimization-export-cli.d.ts +19 -0
  125. package/dist/optimization-export-cli.d.ts.map +1 -0
  126. package/dist/optimizations-list-cli.d.ts +20 -0
  127. package/dist/optimizations-list-cli.d.ts.map +1 -0
  128. package/dist/optimizations-promote-cli.d.ts +8 -0
  129. package/dist/optimizations-promote-cli.d.ts.map +1 -0
  130. package/dist/optimizations-promote-cli.js +34 -0
  131. package/dist/option-validation.d.ts +15 -0
  132. package/dist/option-validation.d.ts.map +1 -0
  133. package/dist/preview-runtime.d.ts +63 -0
  134. package/dist/preview-runtime.d.ts.map +1 -0
  135. package/dist/prompt-draft-push.d.ts +60 -0
  136. package/dist/prompt-draft-push.d.ts.map +1 -0
  137. package/dist/prompt-label-cli.d.ts +11 -0
  138. package/dist/prompt-label-cli.d.ts.map +1 -0
  139. package/dist/prompt-label-cli.js +29 -0
  140. package/dist/prompt-length-wire.d.ts +28 -0
  141. package/dist/prompt-length-wire.d.ts.map +1 -0
  142. package/dist/prompt-report-cli.d.ts +10 -0
  143. package/dist/prompt-report-cli.d.ts.map +1 -0
  144. package/dist/prompt-summary-table.d.ts +15 -0
  145. package/dist/prompt-summary-table.d.ts.map +1 -0
  146. package/dist/prompt-summary-table.js +6 -0
  147. package/dist/registration-tag-warning.d.ts +32 -0
  148. package/dist/registration-tag-warning.d.ts.map +1 -0
  149. package/dist/report-comments-cli.d.ts +16 -0
  150. package/dist/report-comments-cli.d.ts.map +1 -0
  151. package/dist/report-markdown-blankness.d.ts +2 -0
  152. package/dist/report-markdown-blankness.d.ts.map +1 -0
  153. package/dist/report-replacement-warning.d.ts +17 -0
  154. package/dist/report-replacement-warning.d.ts.map +1 -0
  155. package/dist/repository-backup-core.d.ts +225 -0
  156. package/dist/repository-backup-core.d.ts.map +1 -0
  157. package/dist/repository-recovery-manifest.d.ts +83 -0
  158. package/dist/repository-recovery-manifest.d.ts.map +1 -0
  159. package/dist/run-event-digest.d.ts +74 -0
  160. package/dist/run-event-digest.d.ts.map +1 -0
  161. package/dist/runner-dir-verify.d.ts +66 -0
  162. package/dist/runner-dir-verify.d.ts.map +1 -0
  163. package/dist/runner-instruction-set-contract.d.ts +24 -0
  164. package/dist/runner-instruction-set-contract.d.ts.map +1 -0
  165. package/dist/runner-instruction-set-contract.js +50 -0
  166. package/dist/sandbox-hygiene.d.ts +45 -0
  167. package/dist/sandbox-hygiene.d.ts.map +1 -0
  168. package/dist/sandbox-provider.d.ts +193 -0
  169. package/dist/sandbox-provider.d.ts.map +1 -0
  170. package/dist/scorer-draft-push.d.ts +50 -0
  171. package/dist/scorer-draft-push.d.ts.map +1 -0
  172. package/dist/scorers-cli.d.ts +20 -0
  173. package/dist/scorers-cli.d.ts.map +1 -0
  174. package/dist/scorers-cli.js +22 -0
  175. package/dist/scorers-verify-parity-bridge.d.ts +16 -0
  176. package/dist/scorers-verify-parity-bridge.d.ts.map +1 -0
  177. package/dist/scorers-verify-parity-bridge.js +90 -0
  178. package/dist/scorers-verify-parity.d.ts +81 -0
  179. package/dist/scorers-verify-parity.d.ts.map +1 -0
  180. package/dist/scorers-verify-parity.js +502 -0
  181. package/dist/scores-accept-cli.d.ts +21 -0
  182. package/dist/scores-accept-cli.d.ts.map +1 -0
  183. package/dist/secret-redaction.d.ts +47 -0
  184. package/dist/secret-redaction.d.ts.map +1 -0
  185. package/dist/session-timeline.d.ts +54 -0
  186. package/dist/session-timeline.d.ts.map +1 -0
  187. package/dist/setup-prompt.d.ts +5 -0
  188. package/dist/setup-prompt.d.ts.map +1 -0
  189. package/dist/skill-installer.d.ts +68 -0
  190. package/dist/skill-installer.d.ts.map +1 -0
  191. package/dist/skilled-proposer-config.d.ts +2 -0
  192. package/dist/skilled-proposer-config.d.ts.map +1 -0
  193. package/dist/skilled-proposer-config.js +212 -0
  194. package/dist/skilled-proposer-launch.d.ts +11 -0
  195. package/dist/skilled-proposer-launch.d.ts.map +1 -0
  196. package/dist/skilled-proposer-launch.js +124 -0
  197. package/dist/smoke.d.ts +102 -0
  198. package/dist/smoke.d.ts.map +1 -0
  199. package/dist/start-intent.d.ts +12 -0
  200. package/dist/start-intent.d.ts.map +1 -0
  201. package/dist/task-assignment-manifest.d.ts +15 -0
  202. package/dist/task-assignment-manifest.d.ts.map +1 -0
  203. package/dist/task-create-error.d.ts +18 -0
  204. package/dist/task-create-error.d.ts.map +1 -0
  205. package/dist/team-connectors-cli.d.ts +29 -0
  206. package/dist/team-connectors-cli.d.ts.map +1 -0
  207. package/dist/types.d.ts +39 -0
  208. package/dist/types.d.ts.map +1 -0
  209. package/dist/vercel-sandbox-provider.d.ts +156 -0
  210. package/dist/vercel-sandbox-provider.d.ts.map +1 -0
  211. package/dist/workbench-cli.d.ts +233 -0
  212. package/dist/workbench-cli.d.ts.map +1 -0
  213. package/dist/workspace-sync.d.ts +207 -0
  214. package/dist/workspace-sync.d.ts.map +1 -0
  215. package/dist/workspace.d.ts +92 -0
  216. package/dist/workspace.d.ts.map +1 -0
  217. package/dist/zip-draft-push.d.ts +55 -0
  218. package/dist/zip-draft-push.d.ts.map +1 -0
  219. package/package.json +14 -1
  220. package/requirements/README.md +138 -0
  221. package/requirements/skilled-proposer.in +66 -0
  222. package/requirements/skilled-proposer.lock +265 -0
  223. package/scripts/ensure-skilled-proposer-venv.mjs +5 -0
  224. package/scripts/refresh-skilled-proposer-lock.mjs +256 -0
  225. package/src/diff-comments-cli.ts +4 -0
  226. package/src/gepa-engine-dispatch.ts +62 -2
  227. package/src/gepa-python-paths.ts +25 -4
  228. package/src/help.ts +127 -35
  229. package/src/index.ts +90 -164
  230. package/src/instruction-set-gepa-launch.ts +28 -0
  231. package/src/instruction-set-loader.ts +87 -0
  232. package/src/instruction-set-manifest.ts +120 -0
  233. package/src/instruction-sets-cli.ts +460 -0
  234. package/src/model-configs-cli.ts +119 -0
  235. package/src/optimizations-promote-cli.ts +41 -0
  236. package/src/prompt-label-cli.ts +55 -0
  237. package/src/prompt-summary-table.ts +12 -0
  238. package/src/runner-instruction-set-contract.ts +64 -0
  239. package/src/scorers-cli.ts +40 -0
  240. package/src/scorers-verify-parity-bridge.ts +90 -0
  241. package/src/scorers-verify-parity.ts +564 -0
  242. package/src/skilled-proposer-config.ts +191 -0
  243. package/src/skilled-proposer-launch.ts +147 -0
  244. package/src/skilled-proposer-venv-manager.mjs +757 -0
  245. package/tsconfig.json +2 -0
  246. package/vendor/orizu-gepa/src/orizu_gepa_connector/__init__.py +2 -1
  247. package/vendor/orizu-gepa/src/orizu_gepa_connector/adapter.py +8 -2
  248. package/vendor/orizu-gepa/src/orizu_gepa_connector/callbacks.py +17 -3
  249. package/vendor/orizu-gepa/src/orizu_gepa_connector/engine.py +133 -8
  250. package/vendor/orizu-gepa/src/orizu_gepa_connector/instruction_set_loader.py +80 -0
  251. package/vendor/orizu-gepa/src/orizu_gepa_connector/reflection.py +92 -12
  252. package/vendor/orizu-gepa/src/orizu_gepa_connector/runtime.py +100 -22
  253. package/vendor/orizu-gepa/src/orizu_gepa_connector/skilled_proposer_bridge.py +730 -0
  254. package/vendor/orizu-gepa/src/orizu_gepa_connector/stop_conditions.py +17 -0
  255. package/vendor/orizu-gepa/src/orizu_gepa_connector/translator.py +2 -1
  256. package/vendor/orizu-gepa-python/src/orizu_gepa/client.py +52 -7
  257. package/vendor/orizu-gepa-python/src/orizu_gepa/local_log.py +4 -1
  258. package/vendor/orizu-gepa-python/src/orizu_gepa/optimizer.py +10 -5
  259. package/vendor/orizu-gepa-python/src/orizu_gepa/reflection.py +323 -68
  260. package/vendor/orizu-gepa-python/src/orizu_gepa/runner.py +207 -13
  261. package/vendor/skills/orizu-cli/SKILL.md +51 -15
  262. package/vendor/skills/orizu-cli/references/building-judges.md +2 -2
  263. package/vendor/skills/orizu-cli/references/cli-reference.md +116 -3
  264. package/vendor/skills/orizu-cli/references/instructions-after-prompts.md +120 -0
  265. package/vendor/skills/orizu-cli/references/migrate-existing-gepa-setup.md +363 -0
  266. package/vendor/skills/orizu-cli/references/optimization-reports.md +16 -11
  267. package/vendor/skills/orizu-cli/references/optimization-with-gepa.md +50 -24
  268. package/vendor/skills/orizu-cli/references/primer.md +21 -5
  269. package/vendor/skills/orizu-cli/references/prompt-control-plane.md +208 -61
package/README.md CHANGED
@@ -9,7 +9,7 @@ Orizu is a platform that helps you build continually learning agents and other L
9
9
  There are 3 key pillars to Orizu:
10
10
  1. **Human evaluation:** We consider human evaluation to be the gold standard, particularly when the humans involved are people with deep context and understanding of the output being evaluated. This is often the cross-functional team behind a product (product managers, engineers, designers, content writers, researchers, etc) or external experts (lawyers, engineers, writers, etc). Any good evaluation system relies on the presence of such high quality judgment to compare to. We provide tools that simplify the process of collecting the feedback from this audience.
11
11
  2. **Auto evaluation:** Ultimately, human experts can only review so much. As your data scales, you need to encode their knowledge, their opinions, their taste and judgment into auto-evaluations. We automate this for you using the data we help you collect above.
12
- 3. **Optimization:** We turn your evals into an asset for you by building an automated hill-climbing workflow. We've started with prompt optimization because multiple studies and our own experience with our customers has shown strong measurable lifts with even relatively small datasets. Over time, we'll introduce additional capabilities, including optimizing your skills and other contextual information, and even model weights if your model provider allows finetuning.
12
+ 3. **Optimization:** We turn your evals into an asset for you by building an automated hill-climbing workflow. We've started with instruction optimization because multiple studies and our own experience with our customers has shown strong measurable lifts with even relatively small datasets. Over time, we'll introduce additional capabilities, including optimizing your skills and other contextual information, and even model weights if your model provider allows finetuning.
13
13
 
14
14
  ## CLI and Agent Skills
15
15
 
@@ -109,6 +109,9 @@ Agents are first-class users of this CLI: **every command supports `--json`**
109
109
  (as a prefix, `orizu --json teams list`, or a trailing flag) and emits a single
110
110
  machine-readable JSON document instead of formatted text. Discover the full
111
111
  command surface, including global options, with `orizu capabilities --json`.
112
+ Hosted agents may read and sync instruction sets and prepare complete manifests,
113
+ but a human curator using the local CLI with a user token must run instruction
114
+ create, push, shape, archive, restore, and production/default pointer mutations.
112
115
 
113
116
  ## Authentication
114
117
 
@@ -186,19 +189,19 @@ orizu logout
186
189
  <td><code>orizu projects create --name "Support QA" --team ops-eval</code></td>
187
190
  </tr>
188
191
  <tr>
189
- <td colspan="2"><strong>Prompts</strong></td>
192
+ <td colspan="2"><strong>Instruction sets and prompt reads</strong></td>
190
193
  </tr>
191
194
  <tr>
192
195
  <td>List prompts</td>
193
196
  <td><code>orizu prompts list --project ops-eval/support-qa [--status active|archived|all]</code></td>
194
197
  </tr>
195
198
  <tr>
196
- <td>Archive or restore a prompt</td>
197
- <td><code>orizu prompts archive &lt;promptIdOrName&gt; --project ops-eval/support-qa</code><br><code>orizu prompts restore &lt;promptIdOrName&gt; --project ops-eval/support-qa</code></td>
199
+ <td>Archive or restore an instruction set (human/local CLI only)</td>
200
+ <td><code>orizu instructions archive &lt;slug-or-exact-name&gt; --project ops-eval/support-qa</code><br><code>orizu instructions restore &lt;slug-or-exact-name&gt; --project ops-eval/support-qa</code></td>
198
201
  </tr>
199
202
  <tr>
200
- <td>Push a prompt with a report</td>
201
- <td><code>orizu prompts push ./prompts/support --project ops-eval/support-qa --report-file ./prompt-report.md</code></td>
203
+ <td>Push an instruction-set manifest (human/local CLI only)</td>
204
+ <td><code>orizu instructions push ./orizu.instruction-set.json --project ops-eval/support-qa --set &lt;slug-or-exact-name&gt;</code></td>
202
205
  </tr>
203
206
  <tr>
204
207
  <td>Upload a report for an existing prompt version</td>
@@ -0,0 +1,50 @@
1
+ /**
2
+ * ALI-1199 archive/restore commands and assignment inventory.
3
+ *
4
+ * Kept outside index.ts per the CLI line ratchet. The server owns
5
+ * authorization and idempotency; this module validates the CLI grammar and
6
+ * renders the canonical response without inventing client-side state.
7
+ */
8
+ export interface ArchiveArtifactsIo {
9
+ json: boolean;
10
+ print: (line: string) => void;
11
+ resolveProjectSlug: (projectArg: string | null) => Promise<string>;
12
+ fetcher?: (path: string, init?: RequestInit) => Promise<Response>;
13
+ }
14
+ interface TaskSummary {
15
+ id: string;
16
+ title: string;
17
+ status: string;
18
+ archiveStatus?: string;
19
+ teamSlug?: string;
20
+ projectSlug?: string;
21
+ }
22
+ interface AppSummary {
23
+ id: string;
24
+ name: string;
25
+ currentVersionNum?: number;
26
+ status?: string;
27
+ }
28
+ interface DatasetSummary {
29
+ id: string;
30
+ name: string;
31
+ rowCount: number | string;
32
+ status?: string;
33
+ }
34
+ interface ScorerSummary {
35
+ id: string;
36
+ name: string;
37
+ mode: string;
38
+ metricLabel: string;
39
+ implementationKind: string;
40
+ status?: string;
41
+ }
42
+ type PrintLine = (line: string) => void;
43
+ export declare function printTaskSummaries(items: TaskSummary[], print: PrintLine): void;
44
+ export declare function printAppSummaries(items: AppSummary[], print: PrintLine): void;
45
+ export declare function printDatasetSummaries(items: DatasetSummary[], print: PrintLine): void;
46
+ export declare function printScorerSummaries(items: ScorerSummary[], print: PrintLine): void;
47
+ export declare function archiveArtifactCommand(args: string[], io: ArchiveArtifactsIo): Promise<void>;
48
+ export declare function listAssignmentsCommand(args: string[], io: ArchiveArtifactsIo): Promise<void>;
49
+ export {};
50
+ //# sourceMappingURL=archive-artifacts-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive-artifacts-cli.d.ts","sourceRoot":"","sources":["../src/archive-artifacts-cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM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QAajB;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EAAE,EACtB,KAAK,EAAE,SAAS,QAejB;AAyCD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,kBAAkB,GACrB,OAAO,CAAC,IAAI,CAAC,CA8Df;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,kBAAkB,GACrB,OAAO,CAAC,IAAI,CAAC,CAwEf"}
@@ -0,0 +1,48 @@
1
+ export interface StoredZipEntry {
2
+ path: string;
3
+ data: Buffer;
4
+ /**
5
+ * Original file mode (ALI-1159, codex round 7): NOT part of the archive or
6
+ * the content hash (the deterministic zip stores fixed attributes), but the
7
+ * verified-snapshot materialization carries it over so an executable
8
+ * `./run.sh` runner keeps its +x bit when executed from the snapshot.
9
+ */
10
+ mode?: number;
11
+ }
12
+ export interface ArtifactArchive {
13
+ zipBase64: string;
14
+ contentSha256: string;
15
+ }
16
+ /** Exported for runner-dir-verify (ALI-1159): the pre-exec scan must resolve
17
+ * the same directory this module hashes and the runner later executes. */
18
+ export declare function expandHomePath(path: string): string;
19
+ /**
20
+ * Archives must be byte-identical for identical logical content across machines
21
+ * because content-addressed deduplication depends on deterministic inputs.
22
+ *
23
+ * Tradeoff: runner artifacts are downloaded, unzipped, and executed directly
24
+ * (there is no install step), so vendored dependency trees such as
25
+ * node_modules, .venv/venv, and build outputs are legitimate runtime payload
26
+ * and are deliberately NOT excluded — hash reproducibility therefore depends
27
+ * on the author shipping identical vendored trees across machines. Only true
28
+ * junk (.git, .DS_Store, __pycache__, .pytest_cache, .orizu) and secrets
29
+ * (.env, .env.*) are stripped: secrets must never ship, because runners
30
+ * receive their configuration at exec time.
31
+ */
32
+ export declare function shouldExcludeArtifactPath(relativePath: string): boolean;
33
+ export declare function collectArtifactFiles(sourceDir: string, relativeDir?: string): string[];
34
+ export declare const ZIP_GENERAL_PURPOSE_UTF8 = 2048;
35
+ export declare const ZIP_DOS_TIME_2000_01_01 = 0;
36
+ export declare const ZIP_DOS_DATE_2000_01_01: number;
37
+ export declare function createStoredZip(entries: StoredZipEntry[]): Buffer;
38
+ /**
39
+ * Read the exact entry set the deterministic archive covers (sorted relative
40
+ * paths + bytes). Exported for runner-dir-verify (ALI-1159): the verified
41
+ * snapshot must be materialized from the SAME in-memory bytes that were
42
+ * hashed, so a post-hash mutation of the directory cannot change what runs.
43
+ */
44
+ export declare function readArtifactEntries(dirArg: string): StoredZipEntry[];
45
+ /** Deterministic archive of an already-read entry set. */
46
+ export declare function archiveArtifactEntries(entries: StoredZipEntry[]): ArtifactArchive;
47
+ export declare function zipDirectoryToBase64(dirArg: string): ArtifactArchive;
48
+ //# sourceMappingURL=artifact-archive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-archive.d.ts","sourceRoot":"","sources":["../src/artifact-archive.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;CACtB;AAcD;0EAC0E;AAC1E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAOvE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,SAAK,GAAG,MAAM,EAAE,CAclF;AAED,eAAO,MAAM,wBAAwB,OAAS,CAAA;AAC9C,eAAO,MAAM,uBAAuB,IAAI,CAAA;AACxC,eAAO,MAAM,uBAAuB,QAAsC,CAAA;AAkB1E,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CA2DjE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,CAwBpE;AAED,0DAA0D;AAC1D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,eAAe,CAMjF;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAEpE"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Runner/optimizer artifact commands: list (discover names, version ids, and
3
+ * labels) and pull (symmetric with `runners push` / `optimizers push` —
4
+ * resolve by id or name, download the content-addressed zip from storage,
5
+ * and extract it into --out). Pull writes version metadata to
6
+ * .orizu/pull.json — .orizu/ is excluded from artifact zips (see
7
+ * artifact-archive.ts), so a pulled directory re-pushes with an identical
8
+ * content hash.
9
+ *
10
+ * Lives outside index.ts per the CLI index line ratchet (ALI-976): this module
11
+ * owns its own argument parsing and printing via injected io.
12
+ */
13
+ export type PullableArtifactKind = 'runner' | 'optimizer';
14
+ export interface PullArtifactIo {
15
+ json: boolean;
16
+ print: (line: string) => void;
17
+ resolveProjectSlug: (projectArg: string | null) => Promise<string>;
18
+ fetcher?: (path: string, init?: RequestInit) => Promise<Response>;
19
+ }
20
+ export declare const ARTIFACT_MAX_BYTES: number;
21
+ export declare function runnerOptimizerCommand(args: string[], io: PullArtifactIo): Promise<void>;
22
+ //# sourceMappingURL=artifact-pull.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-pull.d.ts","sourceRoot":"","sources":["../src/artifact-pull.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAWH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,WAAW,CAAA;AAEzD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAClE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAClE;AAGD,eAAO,MAAM,kBAAkB,QAAmB,CAAA;AA8DlD,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,cAAc,iBAM9E"}
@@ -0,0 +1,3 @@
1
+ export declare const ORIZU_BANNER = " \u2584\u2584\n \u2584\u259C\u259B \u2588\u2588\u2599\n \u259F\u2580 \u25E5\u2588\u2588\u259B\n \u2580\u259C\u2584\n \u2584\u259F\u2588\n \u2584\u2588\u2588\u2588\n \u2584\u2588\u2588\u2588\u2588\u25E4 \u2584\u2584\u2584\u2588\u259B\n \u259F\u2588\u2588\u2588\u2588\u2588\u25E4 \u2584\u2584\u2588\u2588\u2588\u2588\u2588\u259B\n \u2584\u2580\u2588\u2588\u2588\u25E4 \u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B\n \u25E5\u2588\u2584\u2580\u259B\u2590\u2588\u2584\u25E5\u259C\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B \u2588\u2588\u2588\u2580\n \u259C\u2588\u2588 \u2588\u2588\u2588\u2588\u2584\u25E5\u259C\u2588\u2588\u2588\u2588\u259B \u2588\u2588\u2580\n \u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u259C\u2588\u259B \u2588\u2580\n \u2590\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u25E3 \u2580";
2
+ export declare function renderBanner(): string;
3
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../src/banner.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,m4BAYN,CAAA;AAEnB,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Connector readiness CLI (ALI-903). Thin, read-only consumer of the
3
+ * project-scoped `/api/cli/connectors` endpoint. Pure command logic with an
4
+ * injected fetcher and project resolver; the entry point owns argument parsing
5
+ * and human/JSON output. Secret material is never printed (the endpoint already
6
+ * redacts config and surfaces credentials only as a boolean).
7
+ */
8
+ export type CliFetcher = (path: string, init?: RequestInit) => Promise<Response>;
9
+ export interface ConnectorReadiness {
10
+ type: string;
11
+ status: string;
12
+ hasCredentials: boolean;
13
+ updatedAt: string | null;
14
+ config: Record<string, unknown>;
15
+ }
16
+ export interface ConnectorsResult {
17
+ connectors: ConnectorReadiness[];
18
+ }
19
+ export interface FetchConnectorsOptions {
20
+ fetcher?: CliFetcher;
21
+ projectSlug: string;
22
+ }
23
+ export interface ConnectorsCommandIo {
24
+ json: boolean;
25
+ print: (line: string) => void;
26
+ fetcher?: CliFetcher;
27
+ resolveProjectSlug?: (arg: string | null) => Promise<string>;
28
+ }
29
+ export declare function fetchConnectors(opts: FetchConnectorsOptions): Promise<ConnectorsResult>;
30
+ export declare function connectorsCommand(args: string[], io: ConnectorsCommandIo): Promise<number>;
31
+ //# sourceMappingURL=connectors-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectors-cli.d.ts","sourceRoot":"","sources":["../src/connectors-cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEhF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,kBAAkB,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC7D;AAaD,wBAAsB,eAAe,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAQ7F;AAgCD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BhG"}
@@ -0,0 +1,46 @@
1
+ import { ServerCredentials, StoredCredentialsV2, StoredCredentialsV3 } from './types.js';
2
+ export declare function loadCredentialsConfig(): StoredCredentialsV2 | StoredCredentialsV3 | null;
3
+ export declare function getServerCredentials(baseUrl: string): ServerCredentials | null;
4
+ export declare function saveServerCredentials(baseUrl: string, credentials: ServerCredentials): void;
5
+ export declare function updateServerCredentials(baseUrl: string, credentials: ServerCredentials): void;
6
+ export declare function getActiveBaseUrl(): string | null;
7
+ /**
8
+ * In-sandbox bearer resolution (ALI-1044). Resolves a bearer supplied out-of-band
9
+ * to the hosted agent, WITHOUT consulting credentials.json:
10
+ * 1. `ORIZU_TOKEN` — an explicit bearer in the environment (wins if present).
11
+ * 2. `ORIZU_TOKEN_FILE` — an absolute path to a 0600 file whose TRIMMED contents
12
+ * are the bearer.
13
+ * Returns null when neither is set, so callers fall through to credentials.json.
14
+ *
15
+ * The token file is read FRESH on EVERY call and never cached: the hosted loop
16
+ * ROTATES the file underneath a long-lived agent process, so caching the value
17
+ * would pin a stale (soon-expired) bearer. The token is never logged, echoed, or
18
+ * passed via argv — only returned to the caller for a single request's header.
19
+ *
20
+ * A set-but-unreadable/empty `ORIZU_TOKEN_FILE` throws a clear error rather than
21
+ * returning null, so a misconfigured sandbox fails loudly instead of silently
22
+ * falling back to (absent) credentials.json and emitting a confusing "not logged
23
+ * in" message.
24
+ */
25
+ export declare function resolveEnvBearerToken(): string | null;
26
+ /**
27
+ * THE uniform bearer resolution for every CLI command (ALI-1090). Exactly the
28
+ * order `authedFetch` uses: `ORIZU_TOKEN` env → `ORIZU_TOKEN_FILE` (both via
29
+ * resolveEnvBearerToken, read FRESH per call — never cached, so hosted token
30
+ * rotations are picked up) → stored credentials.json. Commands that need a raw
31
+ * bearer (`orizu env`, the run-gepa wrapper) MUST use this instead of reading
32
+ * credentials.json directly, or they break in hosted sandboxes that are
33
+ * pre-authenticated via ORIZU_TOKEN_FILE and never ran `orizu login`.
34
+ */
35
+ export declare function resolveAuthTokenForBaseUrl(baseUrl: string): string;
36
+ /**
37
+ * Non-throwing "is any auth available?" check (login --no-prompt-if-logged-in,
38
+ * setup status). Mirrors resolveAuthTokenForBaseUrl's order so an env bearer
39
+ * counts as signed in. A misconfigured ORIZU_TOKEN_FILE reports false here —
40
+ * actual requests still fail loudly via resolveEnvBearerToken.
41
+ */
42
+ export declare function hasResolvableAuth(baseUrl: string): boolean;
43
+ export declare function setActiveBaseUrl(baseUrl: string | null): void;
44
+ export declare function clearServerCredentials(baseUrl: string): boolean;
45
+ export declare function clearCredentialsFile(): void;
46
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAkHnB,wBAAgB,qBAAqB,IAAI,mBAAmB,GAAG,mBAAmB,GAAG,IAAI,CA8BxF;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAW9E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,QAapF;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,QAWtF;AAED,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAGhD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CA0BrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAYlE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAS1D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,QAItD;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAY/D;AAED,wBAAgB,oBAAoB,SAKnC"}
package/dist/csv.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ /**
2
+ * CSV parsing utilities with RFC 4180 compliance.
3
+ *
4
+ * This is the single canonical implementation shared by the web app and the
5
+ * published CLI: lib/csv-utils.ts re-exports from here. It lives inside
6
+ * packages/cli because the CLI is published standalone to npm and cannot
7
+ * import files outside its package root, while the app can import anything.
8
+ *
9
+ * Resource limits are enforced while parsing so a hostile CSV cannot exhaust
10
+ * memory. The numeric defaults are inlined here (this package cannot import
11
+ * @/lib/resource-limits) and mirror RESOURCE_LIMITS.CSV_* in that module —
12
+ * keep the two in sync.
13
+ */
14
+ export declare class CSVResourceLimitError extends Error {
15
+ constructor(message: string);
16
+ }
17
+ export interface CSVParseOptions {
18
+ maxBytes?: number;
19
+ maxRows?: number;
20
+ maxFields?: number;
21
+ maxFieldBytes?: number;
22
+ }
23
+ /**
24
+ * Parses CSV text into a 2D array of strings, handling quoted fields, escaped
25
+ * quotes, multiline fields, and different line endings (CRLF, LF, CR).
26
+ * Completely empty rows are skipped.
27
+ *
28
+ * Resource limits (size, rows, fields, field size) are enforced during
29
+ * parsing; pass `options` to override the defaults. A violation throws
30
+ * {@link CSVResourceLimitError}.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * const csv = 'name,age,city\nJohn,25,"New York"'
35
+ * parseCSV(csv) // [['name', 'age', 'city'], ['John', '25', 'New York']]
36
+ * ```
37
+ */
38
+ export declare function parseCSV(csvText: string, options?: CSVParseOptions): string[][];
39
+ /**
40
+ * Parses CSV data into an array of objects using the first row as headers.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const csv = 'name,age\nJohn,25'
45
+ * parseCSVToObjects(csv) // [{ name: 'John', age: '25' }]
46
+ * ```
47
+ */
48
+ export declare function parseCSVToObjects(csvText: string, options?: CSVParseOptions): Record<string, string>[];
49
+ //# sourceMappingURL=csv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../src/csv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AA6ED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,MAAM,EAAE,EAAE,CA+DnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,eAAoB,GAC5B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAiB1B"}
@@ -0,0 +1,6 @@
1
+ export interface ParsedDatasetReference {
2
+ datasetId: string;
3
+ project?: string;
4
+ }
5
+ export declare function parseDatasetReference(input: string): ParsedDatasetReference;
6
+ //# sourceMappingURL=dataset-download.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset-download.d.ts","sourceRoot":"","sources":["../src/dataset-download.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAID,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,sBAAsB,CA4B3E"}
@@ -0,0 +1,10 @@
1
+ export interface DatasetEditRowsOptions {
2
+ datasetId: string;
3
+ file: string;
4
+ json: boolean;
5
+ printJson: (value: Record<string, unknown>) => void;
6
+ printLine: (value: string) => void;
7
+ sanitize: (value: string) => string;
8
+ }
9
+ export declare function editDatasetRows(options: DatasetEditRowsOptions): Promise<void>;
10
+ //# sourceMappingURL=dataset-edit-rows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset-edit-rows.d.ts","sourceRoot":"","sources":["../src/dataset-edit-rows.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,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,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACpC;AAsDD,wBAAsB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CpF"}
@@ -0,0 +1,13 @@
1
+ interface UploadedDatasetIdentity {
2
+ id: string;
3
+ name: string;
4
+ rowCount: number;
5
+ }
6
+ interface DatasetVersionSnapshot {
7
+ datasetVersion: {
8
+ id: string;
9
+ };
10
+ }
11
+ export declare function ensureDatasetUploadSnapshot<T extends DatasetVersionSnapshot>(dataset: UploadedDatasetIdentity, jsonOutput: boolean, createSnapshot: (datasetId: string) => Promise<T>): Promise<T>;
12
+ export {};
13
+ //# sourceMappingURL=dataset-upload-snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset-upload-snapshot.d.ts","sourceRoot":"","sources":["../src/dataset-upload-snapshot.ts"],"names":[],"mappings":"AAAA,UAAU,uBAAuB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,UAAU,sBAAsB;IAC9B,cAAc,EAAE;QACd,EAAE,EAAE,MAAM,CAAA;KACX,CAAA;CACF;AAED,wBAAsB,2BAA2B,CAAC,CAAC,SAAS,sBAAsB,EAChF,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,OAAO,EACnB,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAChD,OAAO,CAAC,CAAC,CAAC,CAwBZ"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Self-contained rehearsal harness for the Daytona slice (ALI-973 / WS-F).
3
+ *
4
+ * Extends the smoke test's in-memory fake-server technique to the WS-F broker /
5
+ * session-branch / finish-branch / apply contracts, and backs it with a REAL
6
+ * local bare git repo so the whole flow (clone → commit → push → merge) runs
7
+ * against genuine git. Consumed by BOTH the unit test and the local-sim
8
+ * rehearsal in `scripts/daytona-workbench-slice.mjs`, so the two never drift.
9
+ *
10
+ * This is the piece that makes `--provider local-sim` a rehearsal, not a mock:
11
+ * `finish-branch` and `apply` shell out to git on the bare repo (rev-list /
12
+ * update-ref), so a session branch really is merged into `main`.
13
+ */
14
+ import type { SliceConfig, SliceFetcher } from './daytona-slice.js';
15
+ import type { SandboxProvider } from './sandbox-provider.js';
16
+ export interface SeededBareRepo {
17
+ gitDir: string;
18
+ repoFullName: string;
19
+ defaultBranch: string;
20
+ }
21
+ /**
22
+ * Create a bare git repo seeded with the Phase-1 workbench contract (matching
23
+ * `lib/workbench-repo-contract.ts`) on a `main` branch: root manifests, a
24
+ * `.gitignore` that ignores `.orizu/`, and a project stub.
25
+ */
26
+ export declare function seedLocalBareRepo(baseDir: string, config: SliceConfig): SeededBareRepo;
27
+ interface StoredSession {
28
+ id: string;
29
+ workspaceId: string;
30
+ branch: string | null;
31
+ headSha: string | null;
32
+ projectSlug: string | null;
33
+ }
34
+ interface StoredMint {
35
+ id: string;
36
+ workspaceId: string;
37
+ purpose: string;
38
+ revoked: boolean;
39
+ }
40
+ interface StoredManifest {
41
+ id: string;
42
+ status: string;
43
+ branch: string;
44
+ headSha: string;
45
+ outcome: Record<string, unknown>;
46
+ }
47
+ /**
48
+ * In-memory WS-F control plane over a real bare repo. Session-start cuts a real
49
+ * branch; finish-branch diffs it; apply fast-forwards `main`. Tracks token mints
50
+ * so revocation is observable and asserts tokens never leak into stored state.
51
+ */
52
+ export declare class FakeWorkbenchApi {
53
+ private readonly repo;
54
+ workspaces: Map<string, {
55
+ id: string;
56
+ teamSlug: string;
57
+ slug: string;
58
+ }>;
59
+ sessions: Map<string, StoredSession>;
60
+ mints: Map<string, StoredMint>;
61
+ manifests: Map<string, StoredManifest>;
62
+ tokensIssued: string[];
63
+ private counter;
64
+ constructor(repo: SeededBareRepo);
65
+ private id;
66
+ private branchHead;
67
+ newFetcher(): SliceFetcher;
68
+ }
69
+ export interface SliceRehearsal {
70
+ config: SliceConfig;
71
+ api: FakeWorkbenchApi;
72
+ provider: SandboxProvider;
73
+ makeFetcher: () => SliceFetcher;
74
+ resolveCloneUrl: (repo: string) => string;
75
+ bareRepoDir: string;
76
+ defaultBranch: () => string;
77
+ cleanup: () => void;
78
+ }
79
+ /**
80
+ * Wire a full self-contained rehearsal: seed a bare repo, stand up the fake
81
+ * control plane, and hand back a local-sim provider + resolveCloneUrl that maps
82
+ * the broker's repo name to the bare repo path.
83
+ */
84
+ export declare function createSliceRehearsal(options?: {
85
+ config?: Partial<SliceConfig>;
86
+ keep?: boolean;
87
+ }): SliceRehearsal;
88
+ export {};
89
+ //# sourceMappingURL=daytona-slice-rehearsal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daytona-slice-rehearsal.d.ts","sourceRoot":"","sources":["../src/daytona-slice-rehearsal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AA2B5D,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,cAAc,CAmCtF;AAED,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAMD;;;;GAIG;AACH,qBAAa,gBAAgB;IAQf,OAAO,CAAC,QAAQ,CAAC,IAAI;IAPjC,UAAU;YAAyB,MAAM;kBAAY,MAAM;cAAQ,MAAM;OAAK;IAC9E,QAAQ,6BAAmC;IAC3C,KAAK,0BAAgC;IACrC,SAAS,8BAAoC;IAC7C,YAAY,EAAE,MAAM,EAAE,CAAK;IAC3B,OAAO,CAAC,OAAO,CAAI;gBAEU,IAAI,EAAE,cAAc;IAEjD,OAAO,CAAC,EAAE;IAKV,OAAO,CAAC,UAAU;IAIlB,UAAU,IAAI,YAAY;CAkI3B;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,WAAW,CAAA;IACnB,GAAG,EAAE,gBAAgB,CAAA;IACrB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,MAAM,YAAY,CAAA;IAC/B,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACzC,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,MAAM,CAAA;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,cAAc,CAuBpH"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Daytona thin-slice load path — pure step logic (ALI-973 / WS-F).
3
+ *
4
+ * smoke.ts-style: an importable eight-step workflow with an injected fetcher
5
+ * factory + an injected `SandboxProvider` (ADR-003 seam). The `scripts/daytona-
6
+ * workbench-slice.mjs` driver supplies a live-server fetcher + a real provider;
7
+ * the unit test and the local-sim rehearsal supply an in-memory API fake + the
8
+ * local-sim provider. No process/argv/print here.
9
+ *
10
+ * The slice proves the full hosted-agent load path against the GitHub-hosted
11
+ * repo, deliberately thin — its purpose is to pin the token-broker API shape
12
+ * before Phase 3:
13
+ * 1. resolve workspace + start a session on its own repo branch,
14
+ * 2. create a sandbox via the provider,
15
+ * 3. mint a READ token and clone the session branch INSIDE the sandbox,
16
+ * 4. read + parse the root manifests (orizu.team.json, schemaVersion),
17
+ * 5. resolve one object ref WITHOUT committing bytes (falls back to proving
18
+ * `.orizu/` is the git-ignored materialization target when the exemplar
19
+ * workspace carries no object refs),
20
+ * 6. write a small generated file + commit inside the sandbox,
21
+ * 7. mint a WRITE token, push the session branch, revoke BOTH tokens,
22
+ * 8. token-hygiene sweep (no token residue on the sandbox fs), then finish-
23
+ * branch → approve → apply via the API, then destroy the sandbox.
24
+ */
25
+ import type { SandboxProvider, SandboxProviderKind, SandboxSession } from './sandbox-provider.js';
26
+ import { type HygieneFinding } from './sandbox-hygiene.js';
27
+ export type SliceFetcher = (path: string, init?: RequestInit) => Promise<Response>;
28
+ export interface SliceConfig {
29
+ teamSlug: string;
30
+ projectSlug: string;
31
+ workspaceSlug: string;
32
+ }
33
+ export interface SliceStepPlan {
34
+ index: number;
35
+ key: string;
36
+ title: string;
37
+ plan: string;
38
+ }
39
+ export interface SliceStepReport {
40
+ index: number;
41
+ key: string;
42
+ title: string;
43
+ ok: boolean;
44
+ detail: string;
45
+ durationMs: number;
46
+ }
47
+ export interface SliceReport {
48
+ ok: boolean;
49
+ provider: SandboxProviderKind;
50
+ steps: SliceStepReport[];
51
+ failedStep: SliceStepReport | null;
52
+ totalMs: number;
53
+ hygiene: {
54
+ clean: boolean;
55
+ findings: HygieneFinding[];
56
+ } | null;
57
+ ids: {
58
+ workspaceId?: string;
59
+ sessionId?: string;
60
+ branch?: string;
61
+ repo?: string;
62
+ sandboxId?: string;
63
+ readMintId?: string;
64
+ writeMintId?: string;
65
+ manifestId?: string;
66
+ commitSha?: string;
67
+ mergeOutcome?: string;
68
+ /** Set on the error path when a session branch was pushed but the run did
69
+ * not reach the merge — names the branch left on the remote for cleanup. */
70
+ orphanedBranch?: string;
71
+ };
72
+ }
73
+ export interface SliceHooks {
74
+ /** Test seam: run after commit/push, immediately BEFORE the hygiene sweep.
75
+ * Used to plant a credential so the sweep's detection power is provable. */
76
+ beforeHygiene?: (session: SandboxSession, ctx: {
77
+ repoPath: string;
78
+ }) => Promise<void> | void;
79
+ }
80
+ export interface RunSliceOptions {
81
+ config: SliceConfig;
82
+ makeFetcher: () => SliceFetcher;
83
+ provider: SandboxProvider;
84
+ /** Map the broker's repo full-name to a clone URL the provider understands.
85
+ * Live: `https://github.com/<repo>.git`. Local-sim: the bare repo path. */
86
+ resolveCloneUrl: (repo: string) => string;
87
+ now?: () => number;
88
+ onStep?: (step: SliceStepReport) => void;
89
+ keep?: boolean;
90
+ generatedFileName?: string;
91
+ generatedFileBody?: string;
92
+ hooks?: SliceHooks;
93
+ }
94
+ export declare function planSliceSteps(): SliceStepPlan[];
95
+ export interface ProviderSelectionInput {
96
+ providerFlag?: string | null;
97
+ hasDaytonaKey: boolean;
98
+ }
99
+ /**
100
+ * Resolve the provider kind. An explicit `--provider` flag always wins; with no
101
+ * flag the default is `local-sim` when DAYTONA_API_KEY is absent, and `daytona`
102
+ * when it is present (the live run is founder-gated by that key).
103
+ */
104
+ export declare function selectProviderKind(input: ProviderSelectionInput): SandboxProviderKind;
105
+ export declare function runDaytonaSlice(opts: RunSliceOptions): Promise<SliceReport>;
106
+ //# sourceMappingURL=daytona-slice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daytona-slice.d.ts","sourceRoot":"","sources":["../src/daytona-slice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACjG,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,s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