@pome-sh/cli 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/README.md +5 -6
  2. package/dist/build-info.json +3 -3
  3. package/dist/src/cli/eval.js +26 -8
  4. package/dist/src/cli/init-sdk.d.ts +0 -3
  5. package/dist/src/cli/init-sdk.js +117 -24
  6. package/dist/src/cli/main.js +23 -69
  7. package/dist/src/cli/register.d.ts +9 -0
  8. package/dist/src/cli/register.js +51 -5
  9. package/dist/src/cli/session.d.ts +7 -1
  10. package/dist/src/cli/session.js +87 -27
  11. package/dist/src/demo/runDemo.js +3 -2
  12. package/dist/src/hosted/client.d.ts +41 -5
  13. package/dist/src/hosted/client.js +333 -19
  14. package/dist/src/hosted/errors.d.ts +11 -1
  15. package/dist/src/hosted/errors.js +8 -1
  16. package/dist/src/hosted/evalResultView.d.ts +2 -0
  17. package/dist/src/hosted/evalResultView.js +22 -0
  18. package/dist/src/hosted/uploadAndFinalize.d.ts +18 -1
  19. package/dist/src/hosted/uploadAndFinalize.js +51 -3
  20. package/dist/src/recorder/inspect.js +20 -2
  21. package/dist/src/runner/mergeAdapterSignals.js +2 -2
  22. package/dist/src/runner/ports.js +3 -0
  23. package/dist/src/runner/runScenario.d.ts +79 -2
  24. package/dist/src/runner/runScenario.js +94 -36
  25. package/dist/src/runner/runScenarioHosted.d.ts +37 -0
  26. package/dist/src/runner/runScenarioHosted.js +257 -58
  27. package/dist/src/runner/runTrialGroup.d.ts +1 -3
  28. package/dist/src/runner/runTrialGroup.js +1 -3
  29. package/dist/src/scenario/parseScenario.d.ts +5 -0
  30. package/dist/src/scenario/parseScenario.js +135 -8
  31. package/dist/src/scenario/scenarioSchema.d.ts +200 -3
  32. package/dist/src/scenario/scenarioSchema.js +12 -1
  33. package/dist/src/twin/twinHarness.d.ts +10 -0
  34. package/dist/src/twin/twinHarness.js +6 -2
  35. package/dist/src/twin/twinStart.d.ts +19 -0
  36. package/dist/src/twin/twinStart.js +156 -0
  37. package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +121 -0
  38. package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +204 -0
  39. package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +1 -0
  40. package/node_modules/@pome-sh/sdk/dist/parity.d.ts +55 -0
  41. package/node_modules/@pome-sh/sdk/dist/parity.js +112 -0
  42. package/node_modules/@pome-sh/sdk/dist/parity.js.map +1 -0
  43. package/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +15 -0
  44. package/node_modules/@pome-sh/sdk/dist/server-helpers.js +96 -0
  45. package/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +1 -1
  46. package/node_modules/@pome-sh/sdk/dist/server.d.ts +1 -1
  47. package/node_modules/@pome-sh/sdk/dist/server.js +9 -7
  48. package/node_modules/@pome-sh/sdk/dist/server.js.map +1 -1
  49. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
  50. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
  51. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
  52. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.d.ts +13 -0
  53. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js +6 -0
  54. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js.map +1 -0
  55. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +215 -0
  56. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +83 -0
  57. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
  58. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +175 -0
  59. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js +182 -0
  60. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +1 -0
  61. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
  62. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
  63. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
  64. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.d.ts +27 -0
  65. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js +34 -0
  66. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -0
  67. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +286 -0
  68. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +33 -0
  69. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +1 -0
  70. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +65 -0
  71. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +455 -0
  72. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +1 -0
  73. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +39 -0
  74. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +47 -0
  75. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +1 -0
  76. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +25 -0
  77. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js +27 -0
  78. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +1 -0
  79. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +100 -0
  80. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +185 -0
  81. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -0
  82. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +64 -0
  83. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +112 -0
  84. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +1 -0
  85. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +26 -0
  86. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js +61 -0
  87. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +1 -0
  88. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +42 -0
  89. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js +96 -0
  90. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +1 -0
  91. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +51 -0
  92. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +74 -0
  93. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -0
  94. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +134 -0
  95. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +152 -0
  96. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +1 -0
  97. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +418 -0
  98. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js +234 -0
  99. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -0
  100. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +2 -0
  101. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js +152 -0
  102. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js.map +1 -0
  103. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.d.ts +198 -0
  104. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js +225 -0
  105. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
  106. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.d.ts +201 -0
  107. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js +166 -0
  108. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -0
  109. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
  110. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
  111. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
  112. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
  113. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
  114. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
  115. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +66 -0
  116. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js +84 -0
  117. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -0
  118. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.d.ts +483 -0
  119. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
  120. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
  121. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/package.json +54 -0
  122. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/trace-contract.json +41 -0
  123. package/node_modules/@pome-sh/sdk/package.json +6 -2
  124. package/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
  125. package/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
  126. package/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
  127. package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +252 -0
  128. package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +122 -0
  129. package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
  130. package/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
  131. package/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
  132. package/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
  133. package/node_modules/@pome-sh/shared-types/dist/index.d.ts +13 -1353
  134. package/node_modules/@pome-sh/shared-types/dist/index.js +14 -568
  135. package/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
  136. package/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +45 -0
  137. package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +8 -0
  138. package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -1
  139. package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +7 -0
  140. package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -1
  141. package/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +62 -0
  142. package/node_modules/@pome-sh/shared-types/dist/recorder-events.js +36 -0
  143. package/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -1
  144. package/node_modules/@pome-sh/shared-types/dist/rest.d.ts +245 -0
  145. package/node_modules/@pome-sh/shared-types/dist/rest.js +303 -0
  146. package/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
  147. package/node_modules/@pome-sh/shared-types/dist/run.d.ts +7 -0
  148. package/node_modules/@pome-sh/shared-types/dist/run.js +4 -0
  149. package/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -1
  150. package/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +14 -0
  151. package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +46 -0
  152. package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +1 -0
  153. package/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
  154. package/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
  155. package/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
  156. package/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
  157. package/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
  158. package/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
  159. package/node_modules/@pome-sh/shared-types/dist/task.d.ts +485 -0
  160. package/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
  161. package/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
  162. package/node_modules/@pome-sh/shared-types/package.json +2 -1
  163. package/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
  164. package/node_modules/@pome-sh/twin-github/FIDELITY.md +127 -67
  165. package/node_modules/@pome-sh/twin-github/README.md +3 -7
  166. package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js +4 -20
  167. package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js.map +1 -1
  168. package/node_modules/@pome-sh/twin-github/dist/src/access-control.d.ts +3 -3
  169. package/node_modules/@pome-sh/twin-github/dist/src/domain.d.ts +141 -3
  170. package/node_modules/@pome-sh/twin-github/dist/src/domain.js +0 -0
  171. package/node_modules/@pome-sh/twin-github/dist/src/domain.js.map +1 -1
  172. package/node_modules/@pome-sh/twin-github/dist/src/routes.js +2 -0
  173. package/node_modules/@pome-sh/twin-github/dist/src/routes.js.map +1 -1
  174. package/node_modules/@pome-sh/twin-github/dist/src/seed.d.ts +1 -1
  175. package/node_modules/@pome-sh/twin-github/dist/src/serializers.d.ts +2 -2
  176. package/node_modules/@pome-sh/twin-github/dist/src/server.js +7 -6
  177. package/node_modules/@pome-sh/twin-github/dist/src/server.js.map +1 -1
  178. package/node_modules/@pome-sh/twin-github/dist/src/tools.d.ts +168 -18
  179. package/node_modules/@pome-sh/twin-github/dist/src/tools.js +23 -0
  180. package/node_modules/@pome-sh/twin-github/dist/src/tools.js.map +1 -1
  181. package/node_modules/@pome-sh/twin-github/fidelity.inventory.json +773 -0
  182. package/node_modules/@pome-sh/twin-github/package.json +5 -4
  183. package/node_modules/@pome-sh/twin-slack/FIDELITY.md +121 -35
  184. package/node_modules/@pome-sh/twin-slack/README.md +2 -6
  185. package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.d.ts +1 -0
  186. package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js +92 -0
  187. package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js.map +1 -0
  188. package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js +3 -3
  189. package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js.map +1 -1
  190. package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js +1 -1
  191. package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js.map +1 -1
  192. package/node_modules/@pome-sh/twin-slack/dist/src/server.js +7 -6
  193. package/node_modules/@pome-sh/twin-slack/dist/src/server.js.map +1 -1
  194. package/node_modules/@pome-sh/twin-slack/dist/src/tools.d.ts +30 -4
  195. package/node_modules/@pome-sh/twin-slack/dist/src/tools.js +48 -1
  196. package/node_modules/@pome-sh/twin-slack/dist/src/tools.js.map +1 -1
  197. package/node_modules/@pome-sh/twin-slack/fidelity.inventory.json +377 -0
  198. package/node_modules/@pome-sh/twin-slack/package.json +5 -4
  199. package/node_modules/@pome-sh/twin-stripe/FIDELITY.md +151 -50
  200. package/node_modules/@pome-sh/twin-stripe/README.md +42 -45
  201. package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.d.ts +1 -0
  202. package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js +186 -0
  203. package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js.map +1 -0
  204. package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js +8 -4
  205. package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js.map +1 -1
  206. package/node_modules/@pome-sh/twin-stripe/dist/src/db.js +26 -2
  207. package/node_modules/@pome-sh/twin-stripe/dist/src/db.js.map +1 -1
  208. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.d.ts +101 -0
  209. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js +195 -0
  210. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js.map +1 -0
  211. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.d.ts +15 -1
  212. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js +17 -5
  213. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js.map +1 -1
  214. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.d.ts +47 -0
  215. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js +103 -0
  216. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js.map +1 -0
  217. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.d.ts +1 -1
  218. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.js.map +1 -1
  219. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.d.ts +6 -0
  220. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js +3 -0
  221. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js.map +1 -1
  222. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.d.ts +61 -2
  223. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js +214 -52
  224. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js.map +1 -1
  225. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.d.ts +45 -0
  226. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js +159 -0
  227. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js.map +1 -0
  228. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.d.ts +6 -0
  229. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js +16 -0
  230. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js.map +1 -1
  231. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.d.ts +1 -0
  232. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js +144 -1
  233. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js.map +1 -1
  234. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.d.ts +420 -43
  235. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js +442 -13
  236. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js.map +1 -1
  237. package/node_modules/@pome-sh/twin-stripe/dist/src/errors.d.ts +19 -0
  238. package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js +15 -1
  239. package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js.map +1 -1
  240. package/node_modules/@pome-sh/twin-stripe/dist/src/ids.d.ts +2 -0
  241. package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js +2 -0
  242. package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js.map +1 -1
  243. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.d.ts +8 -0
  244. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js +105 -1
  245. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js.map +1 -1
  246. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.d.ts +4 -0
  247. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js +117 -0
  248. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js.map +1 -0
  249. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.d.ts +4 -0
  250. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js +47 -0
  251. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js.map +1 -0
  252. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js +6 -0
  253. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js.map +1 -1
  254. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js +28 -102
  255. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js.map +1 -1
  256. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.d.ts +4 -0
  257. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js +33 -0
  258. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js.map +1 -0
  259. package/node_modules/@pome-sh/twin-stripe/dist/src/seed.d.ts +10 -8
  260. package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js +3 -2
  261. package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js.map +1 -1
  262. package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.d.ts +181 -21
  263. package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js +257 -34
  264. package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js.map +1 -1
  265. package/node_modules/@pome-sh/twin-stripe/dist/src/server.js +7 -6
  266. package/node_modules/@pome-sh/twin-stripe/dist/src/server.js.map +1 -1
  267. package/node_modules/@pome-sh/twin-stripe/dist/src/tools.d.ts +107 -5
  268. package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js +139 -6
  269. package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js.map +1 -1
  270. package/node_modules/@pome-sh/twin-stripe/dist/src/types.d.ts +73 -0
  271. package/node_modules/@pome-sh/twin-stripe/dist/src/upstream-types.d.ts +8 -0
  272. package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js +6 -1
  273. package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js.map +1 -1
  274. package/node_modules/@pome-sh/twin-stripe/fidelity.inventory.json +425 -0
  275. package/node_modules/@pome-sh/twin-stripe/package.json +5 -4
  276. package/package.json +8 -8
  277. package/skills/pome-setup/SKILL.md +1 -1
@@ -0,0 +1,201 @@
1
+ /**
2
+ * run — completed-run shape, criterion result, lane/step correlator output
3
+ *
4
+ * Consumed by:
5
+ * - `@pome-sh/evaluator` — produces CriterionResult, satisfaction_score
6
+ * - `pome-cloud` correlator — produces `{ lanes, steps }` from RecorderEvent[]
7
+ * - `pome-cloud` `runs` table writer — persists the full Run row
8
+ * - dashboard `/runs/:id` — renders lane-timeline + state-inspector + handoff card
9
+ *
10
+ * Lane/Step are flat parallel arrays on Run (not nested), aligning with the
11
+ * `runs.lanes jsonb` + `runs.steps jsonb` two-column DB shape from FDRS-327.
12
+ * Cross-reference: `Lane.step_id` → `Step.id`; `Lane.request_ids[]` →
13
+ * `RecorderEvent.request_id`.
14
+ */
15
+ import { z } from "zod";
16
+ export declare const judgeModelSchema: z.ZodString;
17
+ export type JudgeModel = z.infer<typeof judgeModelSchema>;
18
+ export declare const correlatorKindSchema: z.ZodEnum<{
19
+ heuristic: "heuristic";
20
+ adapter_rich: "adapter_rich";
21
+ span_context: "span_context";
22
+ }>;
23
+ export type CorrelatorKind = z.infer<typeof correlatorKindSchema>;
24
+ export declare const CRITERION_KINDS: readonly ["code", "model"];
25
+ export declare const criterionKindSchema: z.ZodEnum<{
26
+ model: "model";
27
+ code: "code";
28
+ }>;
29
+ export type CriterionKind = z.infer<typeof criterionKindSchema>;
30
+ export declare const criterionSchema: z.ZodObject<{
31
+ type: z.ZodPipe<z.ZodEnum<{
32
+ model: "model";
33
+ code: "code";
34
+ D: "D";
35
+ P: "P";
36
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
37
+ text: z.ZodString;
38
+ }, z.core.$strip>;
39
+ export type Criterion = z.infer<typeof criterionSchema>;
40
+ export declare const deterministicCriterionResultSchema: z.ZodObject<{
41
+ criterion: z.ZodObject<{
42
+ type: z.ZodPipe<z.ZodEnum<{
43
+ model: "model";
44
+ code: "code";
45
+ D: "D";
46
+ P: "P";
47
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
48
+ text: z.ZodString;
49
+ }, z.core.$strip>;
50
+ passed: z.ZodBoolean;
51
+ skipped: z.ZodBoolean;
52
+ reason: z.ZodString;
53
+ }, z.core.$strip>;
54
+ export type DeterministicCriterionResult = z.infer<typeof deterministicCriterionResultSchema>;
55
+ export declare const probabilisticCriterionResultSchema: z.ZodObject<{
56
+ criterion: z.ZodObject<{
57
+ type: z.ZodPipe<z.ZodEnum<{
58
+ model: "model";
59
+ code: "code";
60
+ D: "D";
61
+ P: "P";
62
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
63
+ text: z.ZodString;
64
+ }, z.core.$strip>;
65
+ passed: z.ZodBoolean;
66
+ skipped: z.ZodBoolean;
67
+ reason: z.ZodString;
68
+ confidence: z.ZodNumber;
69
+ judge_model: z.ZodString;
70
+ }, z.core.$strip>;
71
+ export type ProbabilisticCriterionResult = z.infer<typeof probabilisticCriterionResultSchema>;
72
+ export declare const criterionResultSchema: z.ZodUnion<readonly [z.ZodObject<{
73
+ criterion: z.ZodObject<{
74
+ type: z.ZodPipe<z.ZodEnum<{
75
+ model: "model";
76
+ code: "code";
77
+ D: "D";
78
+ P: "P";
79
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
80
+ text: z.ZodString;
81
+ }, z.core.$strip>;
82
+ passed: z.ZodBoolean;
83
+ skipped: z.ZodBoolean;
84
+ reason: z.ZodString;
85
+ confidence: z.ZodNumber;
86
+ judge_model: z.ZodString;
87
+ }, z.core.$strip>, z.ZodObject<{
88
+ criterion: z.ZodObject<{
89
+ type: z.ZodPipe<z.ZodEnum<{
90
+ model: "model";
91
+ code: "code";
92
+ D: "D";
93
+ P: "P";
94
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
95
+ text: z.ZodString;
96
+ }, z.core.$strip>;
97
+ passed: z.ZodBoolean;
98
+ skipped: z.ZodBoolean;
99
+ reason: z.ZodString;
100
+ }, z.core.$strip>]>;
101
+ export type CriterionResult = z.infer<typeof criterionResultSchema>;
102
+ export declare const stepSchema: z.ZodObject<{
103
+ id: z.ZodString;
104
+ started_at: z.ZodString;
105
+ ended_at: z.ZodString;
106
+ label: z.ZodNullable<z.ZodString>;
107
+ lane_ids: z.ZodArray<z.ZodString>;
108
+ }, z.core.$strip>;
109
+ export type Step = z.infer<typeof stepSchema>;
110
+ export declare const laneSchema: z.ZodObject<{
111
+ id: z.ZodString;
112
+ step_id: z.ZodString;
113
+ twin: z.ZodString;
114
+ label: z.ZodNullable<z.ZodString>;
115
+ request_ids: z.ZodArray<z.ZodString>;
116
+ }, z.core.$strip>;
117
+ export type Lane = z.infer<typeof laneSchema>;
118
+ export declare const runSchema: z.ZodPreprocess<z.ZodObject<{
119
+ id: z.ZodString;
120
+ session_id: z.ZodString;
121
+ team_id: z.ZodString;
122
+ task_name: z.ZodString;
123
+ task_hash: z.ZodString;
124
+ satisfaction_score: z.ZodNumber;
125
+ criteria_results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
126
+ criterion: z.ZodObject<{
127
+ type: z.ZodPipe<z.ZodEnum<{
128
+ model: "model";
129
+ code: "code";
130
+ D: "D";
131
+ P: "P";
132
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
133
+ text: z.ZodString;
134
+ }, z.core.$strip>;
135
+ passed: z.ZodBoolean;
136
+ skipped: z.ZodBoolean;
137
+ reason: z.ZodString;
138
+ confidence: z.ZodNumber;
139
+ judge_model: z.ZodString;
140
+ }, z.core.$strip>, z.ZodObject<{
141
+ criterion: z.ZodObject<{
142
+ type: z.ZodPipe<z.ZodEnum<{
143
+ model: "model";
144
+ code: "code";
145
+ D: "D";
146
+ P: "P";
147
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
148
+ text: z.ZodString;
149
+ }, z.core.$strip>;
150
+ passed: z.ZodBoolean;
151
+ skipped: z.ZodBoolean;
152
+ reason: z.ZodString;
153
+ }, z.core.$strip>]>>;
154
+ trace_s3_key: z.ZodNullable<z.ZodString>;
155
+ state_s3_key: z.ZodNullable<z.ZodString>;
156
+ meta_s3_key: z.ZodNullable<z.ZodString>;
157
+ duration_ms: z.ZodNumber;
158
+ agent_model: z.ZodString;
159
+ judge_model: z.ZodString;
160
+ judge_tokens_in: z.ZodNullable<z.ZodNumber>;
161
+ judge_tokens_out: z.ZodNullable<z.ZodNumber>;
162
+ agent_tokens_in: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
163
+ agent_tokens_out: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
164
+ agent_latency_p50_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
165
+ agent_latency_p95_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
166
+ agent_latency_max_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
167
+ agent_error_count: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
168
+ agent_telemetry_span_count: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
169
+ correlator_kind: z.ZodDefault<z.ZodEnum<{
170
+ heuristic: "heuristic";
171
+ adapter_rich: "adapter_rich";
172
+ span_context: "span_context";
173
+ }>>;
174
+ environment: z.ZodDefault<z.ZodEnum<{
175
+ production: "production";
176
+ simulation: "simulation";
177
+ }>>;
178
+ promoted_task_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
179
+ replay_run_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
180
+ state_archive_s3_key: z.ZodDefault<z.ZodNullable<z.ZodString>>;
181
+ lanes: z.ZodDefault<z.ZodArray<z.ZodObject<{
182
+ id: z.ZodString;
183
+ step_id: z.ZodString;
184
+ twin: z.ZodString;
185
+ label: z.ZodNullable<z.ZodString>;
186
+ request_ids: z.ZodArray<z.ZodString>;
187
+ }, z.core.$strip>>>;
188
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
189
+ id: z.ZodString;
190
+ started_at: z.ZodString;
191
+ ended_at: z.ZodString;
192
+ label: z.ZodNullable<z.ZodString>;
193
+ lane_ids: z.ZodArray<z.ZodString>;
194
+ }, z.core.$strip>>>;
195
+ summary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
196
+ fix_prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
197
+ events_jsonl_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
198
+ created_at: z.ZodString;
199
+ finished_at: z.ZodNullable<z.ZodString>;
200
+ }, z.core.$strip>>;
201
+ export type Run = z.infer<typeof runSchema>;
@@ -0,0 +1,166 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * run — completed-run shape, criterion result, lane/step correlator output
4
+ *
5
+ * Consumed by:
6
+ * - `@pome-sh/evaluator` — produces CriterionResult, satisfaction_score
7
+ * - `pome-cloud` correlator — produces `{ lanes, steps }` from RecorderEvent[]
8
+ * - `pome-cloud` `runs` table writer — persists the full Run row
9
+ * - dashboard `/runs/:id` — renders lane-timeline + state-inspector + handoff card
10
+ *
11
+ * Lane/Step are flat parallel arrays on Run (not nested), aligning with the
12
+ * `runs.lanes jsonb` + `runs.steps jsonb` two-column DB shape from FDRS-327.
13
+ * Cross-reference: `Lane.step_id` → `Step.id`; `Lane.request_ids[]` →
14
+ * `RecorderEvent.request_id`.
15
+ */
16
+ import { z } from "zod";
17
+ import { twinIdSchema } from "./recorder-events.js";
18
+ import { LEGACY_CRITERION_KIND_MAP, normalizeTaskVocabKeys } from "./task-vocab.js";
19
+ // Judge model is a free-form string (BYOK Flavor #1, OpenAI-compatible endpoint
20
+ // passes through); not constrained at the schema level because the customer's
21
+ // gateway decides what model identifiers it accepts.
22
+ export const judgeModelSchema = z.string().min(1);
23
+ // Which server-side correlator produced a run's lanes/steps. Reconciled from
24
+ // pome-cloud /v1 (FDRS-613): OTEL M4/M6 clients distinguish heuristic legacy
25
+ // timelines from exact span-context timelines.
26
+ export const correlatorKindSchema = z.enum([
27
+ "heuristic",
28
+ "adapter_rich",
29
+ "span_context",
30
+ ]);
31
+ // Criterion kind — W3 vocab (FDRS-653): `code` = deterministic/code-checked
32
+ // predicate (formerly `D`), `model` = LLM-judged (formerly `P`). The canonical
33
+ // enum is `code | model`; the INPUT schema below additionally accepts the
34
+ // 0.3.0-era `D` / `P` spellings and normalizes them at parse time (tolerant
35
+ // reader — shipped CLIs vendor 0.3.0 and keep sending D/P).
36
+ export const CRITERION_KINDS = ["code", "model"];
37
+ export const criterionKindSchema = z.enum(CRITERION_KINDS);
38
+ // Single source of truth for the D/P→code/model rename is
39
+ // LEGACY_CRITERION_KIND_MAP in ./task-vocab.ts.
40
+ const criterionKindInputSchema = z
41
+ .enum(["D", "P", "code", "model"])
42
+ .transform((kind) => kind === "D" || kind === "P" ? LEGACY_CRITERION_KIND_MAP[kind] : kind);
43
+ export const criterionSchema = z.object({
44
+ // Accepts D | P | code | model; parsed output is always code | model.
45
+ type: criterionKindInputSchema,
46
+ text: z.string().min(1),
47
+ });
48
+ // CriterionResult shape matches OSS evaluator's emit. The full Criterion is
49
+ // included by reference (not just text) so consumers render type-aware UI
50
+ // without rejoining. Discriminate on `criterion.type` (no separate `kind`
51
+ // field) — normalized to `code` / `model` (0.3.0 artifacts carrying `D` / `P`
52
+ // parse and normalize).
53
+ const baseCriterionResultSchema = z.object({
54
+ criterion: criterionSchema, // full {type, text} object
55
+ passed: z.boolean(),
56
+ skipped: z.boolean(), // true if [code] fell back to [model] but the judge was unreachable, etc.
57
+ reason: z.string(), // human-readable evidence
58
+ });
59
+ export const deterministicCriterionResultSchema = baseCriterionResultSchema.extend({
60
+ // [code] adds nothing further; criterion.type === "code" identifies it.
61
+ });
62
+ export const probabilisticCriterionResultSchema = baseCriterionResultSchema.extend({
63
+ confidence: z.number().min(0).max(1),
64
+ judge_model: judgeModelSchema,
65
+ });
66
+ // Probabilistic FIRST: it's the strict superset (requires confidence +
67
+ // judge_model). z.union tries branches in order and picks the first match.
68
+ // If deterministic were first, [model] payloads would parse cleanly but
69
+ // .extend({}) would silently strip the [model]-only fields — we'd persist them
70
+ // as null in runs.criteria_results JSON, breaking dashboard rendering of
71
+ // confidence + per-criterion judge_model. [code] payloads (no confidence /
72
+ // judge_model) fail probabilistic on the required fields and fall through.
73
+ export const criterionResultSchema = z.union([
74
+ probabilisticCriterionResultSchema,
75
+ deterministicCriterionResultSchema,
76
+ ]);
77
+ // Step is the correlator's top-level grouping: one Step per agent assistant
78
+ // turn (adapter-rich path) or per heuristic-clustered HTTP burst (heuristic
79
+ // path). started_at/ended_at bound the contained events. label is null when
80
+ // heuristic-only (no assistant message to seed it from).
81
+ export const stepSchema = z.object({
82
+ id: z.string(), // matches RecorderEvent.step_id
83
+ started_at: z.string().datetime(),
84
+ ended_at: z.string().datetime(),
85
+ label: z.string().nullable(),
86
+ lane_ids: z.array(z.string()), // child lanes, render order
87
+ });
88
+ // Lane is the correlator's per-step sub-grouping by twin + endpoint pattern.
89
+ // One lane = one horizontal track in lane-timeline UI. request_ids reference
90
+ // RecorderEvent.request_id back into events.jsonl (events are the source of
91
+ // truth; Lane just records which events belong here, time-ordered).
92
+ export const laneSchema = z.object({
93
+ id: z.string(),
94
+ step_id: z.string(), // parent Step.id
95
+ twin: twinIdSchema, // matches RecorderEvent.twin
96
+ label: z.string().nullable(), // e.g. "POST /v1/refunds (3 calls)"
97
+ request_ids: z.array(z.string()), // RecorderEvent.request_id, time-ordered
98
+ });
99
+ // Canonical Run row. W3 vocab (FDRS-653): `task_name` / `task_hash` /
100
+ // `promoted_task_id` are the canonical wire keys (cloud DB: `tasks` table,
101
+ // `runs.task_name`). The exported `runSchema` below wraps this object in the
102
+ // tolerant-reader preprocess so 0.3.0-era rows carrying `scenario_name` /
103
+ // `scenario_hash` / `promoted_scenario_id` parse and normalize.
104
+ const runObjectSchema = z.object({
105
+ id: z.string(), // run_<nanoid>
106
+ session_id: z.string(),
107
+ team_id: z.string(),
108
+ task_name: z.string(), // 0.3.0 alias: scenario_name
109
+ task_hash: z.string(), // sha256 of source markdown; 0.3.0 alias: scenario_hash
110
+ satisfaction_score: z.number().int().min(0).max(100), // CLI-computed (BYOK Flavor #1)
111
+ criteria_results: z.array(criterionResultSchema),
112
+ trace_s3_key: z.string().nullable(), // s3 key for events.jsonl (hosted only; F-689 deleted tool_calls.jsonl)
113
+ state_s3_key: z.string().nullable(), // s3 key for state_final.json
114
+ meta_s3_key: z.string().nullable(),
115
+ duration_ms: z.number().int(),
116
+ agent_model: z.string(), // which model the agent used (informational)
117
+ judge_model: judgeModelSchema, // which model judged [P] (free-form)
118
+ judge_tokens_in: z.number().int().min(0).nullable(),
119
+ judge_tokens_out: z.number().int().min(0).nullable(),
120
+ // ── FDRS-613: reconciled from pome-cloud /v1 wire truth (all additive with
121
+ // defaults so pre-existing Run constructors stay valid) ────────────────────
122
+ // Sim deep-telemetry — per-run agent telemetry rollup, computed at finalize
123
+ // from the agent's independently-correlated `gen_ai` span tree. Null = no
124
+ // instrumentation / legacy / twin-only sim (dashboard renders `·`, never `0`).
125
+ agent_tokens_in: z.number().int().min(0).nullable().default(null),
126
+ agent_tokens_out: z.number().int().min(0).nullable().default(null),
127
+ agent_latency_p50_ms: z.number().int().min(0).nullable().default(null),
128
+ agent_latency_p95_ms: z.number().int().min(0).nullable().default(null),
129
+ agent_latency_max_ms: z.number().int().min(0).nullable().default(null),
130
+ agent_error_count: z.number().int().min(0).nullable().default(null),
131
+ agent_telemetry_span_count: z.number().int().min(0).nullable().default(null),
132
+ // Which server-side correlator produced lanes/steps.
133
+ correlator_kind: correlatorKindSchema.default("heuristic"),
134
+ // M0.2 (FDRS-509) — which surface this run belongs to. 'simulation' =
135
+ // CLI/staging scenario run (default for every legacy row); 'production' = an
136
+ // ingested OTLP production trace (M2).
137
+ environment: z.enum(["production", "simulation"]).default("simulation"),
138
+ // M0.5 (FDRS-512) — replay loop linkage (prod-run → task → replay-run).
139
+ // W3 vocab: canonical key; 0.3.0 alias: promoted_scenario_id.
140
+ promoted_task_id: z.string().nullable().default(null),
141
+ replay_run_id: z.string().nullable().default(null),
142
+ // Storage key for the tar-and-upload state archive the replay engine seeds a
143
+ // sandbox from. Null when no archive was captured.
144
+ state_archive_s3_key: z.string().nullable().default(null),
145
+ // Correlator output. Empty arrays for legacy runs (pre-M3i / pre-M4-1).
146
+ lanes: z.array(laneSchema).default([]),
147
+ steps: z.array(stepSchema).default([]),
148
+ // Server-generated by the managed judge (ADR-013). 1-2 sentence concise
149
+ // narrative of the run. Null for pre-ADR-013 rows / legacy /result runs.
150
+ summary: z.string().nullable().default(null),
151
+ // Originally CLI-generated (BYOK Flavor #1). Null on --no-fix-prompt opt-out,
152
+ // LLM endpoint failure, or legacy pre-M4-1 runs.
153
+ fix_prompt: z.string().nullable().default(null),
154
+ // Storage KEY (path) of the raw events.jsonl blob — NOT a URL (dashboard mints
155
+ // a signed GET URL on read). FDRS-613: relaxed from `.url()` to match the
156
+ // pome-cloud shape, since persisted storage keys are not URLs. Null in
157
+ // self-host mode, on upload failure, --no-upload opt-out, or legacy runs.
158
+ events_jsonl_url: z.string().nullable().default(null),
159
+ created_at: z.string().datetime(),
160
+ finished_at: z.string().datetime().nullable(),
161
+ });
162
+ // Tolerant reader (FDRS-653): accepts both the 0.3.0 `scenario_*` and the
163
+ // canonical `task_*` keys and normalizes to the new vocabulary. When both are
164
+ // present, the canonical key wins. The parsed output carries `task_*` only.
165
+ export const runSchema = z.preprocess(normalizeTaskVocabKeys, runObjectSchema);
166
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEpF,gFAAgF;AAChF,8EAA8E;AAC9E,qDAAqD;AACrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAGlD,6EAA6E;AAC7E,6EAA6E;AAC7E,+CAA+C;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IACzC,WAAW;IACX,cAAc;IACd,cAAc;CACf,CAAC,CAAC;AAGH,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,4EAA4E;AAC5E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAG3D,0DAA0D;AAC1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