@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pome-sh/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Twin engine for Pome digital twins — defineTwin() + serve(): HTTP mounting, bearer auth, trace recorder, MCP dispatch, SQLite-backed state.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -14,6 +14,10 @@
14
14
  "./server": {
15
15
  "types": "./dist/server.d.ts",
16
16
  "default": "./dist/server.js"
17
+ },
18
+ "./parity": {
19
+ "types": "./dist/parity.d.ts",
20
+ "default": "./dist/parity.js"
17
21
  }
18
22
  },
19
23
  "publishConfig": {
@@ -32,7 +36,7 @@
32
36
  "dist"
33
37
  ],
34
38
  "dependencies": {
35
- "@pome-sh/shared-types": "0.6.0",
39
+ "@pome-sh/shared-types": "0.6.1",
36
40
  "hono": "^4.12.27",
37
41
  "zod": "^4.1.13"
38
42
  },
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ export declare const apiErrorTypeSchema: z.ZodEnum<{
3
+ invalid_auth: "invalid_auth";
4
+ revoked_key: "revoked_key";
5
+ forbidden: "forbidden";
6
+ quota_exceeded: "quota_exceeded";
7
+ validation_failed: "validation_failed";
8
+ not_found: "not_found";
9
+ session_expired: "session_expired";
10
+ conflict: "conflict";
11
+ rate_limited: "rate_limited";
12
+ internal_error: "internal_error";
13
+ endpoint_not_implemented: "endpoint_not_implemented";
14
+ downstream_unavailable: "downstream_unavailable";
15
+ }>;
16
+ export type ApiErrorType = z.infer<typeof apiErrorTypeSchema>;
17
+ export declare const apiErrorSchema: z.ZodObject<{
18
+ error: z.ZodObject<{
19
+ type: z.ZodEnum<{
20
+ invalid_auth: "invalid_auth";
21
+ revoked_key: "revoked_key";
22
+ forbidden: "forbidden";
23
+ quota_exceeded: "quota_exceeded";
24
+ validation_failed: "validation_failed";
25
+ not_found: "not_found";
26
+ session_expired: "session_expired";
27
+ conflict: "conflict";
28
+ rate_limited: "rate_limited";
29
+ internal_error: "internal_error";
30
+ endpoint_not_implemented: "endpoint_not_implemented";
31
+ downstream_unavailable: "downstream_unavailable";
32
+ }>;
33
+ message: z.ZodString;
34
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ documentation_url: z.ZodOptional<z.ZodString>;
36
+ request_id: z.ZodString;
37
+ }, z.core.$strip>;
38
+ }, z.core.$strip>;
39
+ export type ApiError = z.infer<typeof apiErrorSchema>;
@@ -0,0 +1,33 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // shared-types §5 — ERROR ENVELOPE (public REST). The `error.type` enum and the
4
+ // wrapping envelope shape. Re-exported through the `@pome-sh/shared-types`
5
+ // barrel (index.ts).
6
+ import { z } from "zod";
7
+ // ─────────────────────────────────────────────────────────────────────────────
8
+ // 5. ERROR ENVELOPE (public REST)
9
+ // ─────────────────────────────────────────────────────────────────────────────
10
+ export const apiErrorTypeSchema = z.enum([
11
+ "invalid_auth",
12
+ "revoked_key",
13
+ "forbidden", // 403 non-auth permission denial
14
+ "quota_exceeded",
15
+ "validation_failed",
16
+ "not_found",
17
+ "session_expired", // distinct from not_found for CLI UX
18
+ "conflict", // 409 (uniqueness, etc.)
19
+ "rate_limited",
20
+ "internal_error",
21
+ "endpoint_not_implemented",
22
+ "downstream_unavailable",
23
+ ]);
24
+ export const apiErrorSchema = z.object({
25
+ error: z.object({
26
+ type: apiErrorTypeSchema,
27
+ message: z.string(),
28
+ details: z.record(z.string(), z.unknown()).optional(),
29
+ documentation_url: z.string().url().optional(),
30
+ request_id: z.string(),
31
+ }),
32
+ });
33
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,qBAAqB;AAErB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAChF,kCAAkC;AAClC,gFAAgF;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,cAAc;IACd,aAAa;IACb,WAAW,EAAkC,iCAAiC;IAC9E,gBAAgB;IAChB,mBAAmB;IACnB,WAAW;IACX,iBAAiB,EAA4B,qCAAqC;IAClF,UAAU,EAAmC,yBAAyB;IACtE,cAAc;IACd,gBAAgB;IAChB,0BAA0B;IAC1B,wBAAwB;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;QACrD,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;KACvB,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,252 @@
1
+ import { z } from "zod";
2
+ export declare const finalizeRequestSchema: z.ZodObject<{
3
+ stop_reason: z.ZodString;
4
+ exit_code: z.ZodNumber;
5
+ duration_ms: z.ZodNumber;
6
+ agent_model: z.ZodString;
7
+ agent_sdk: z.ZodNullable<z.ZodString>;
8
+ criteria: z.ZodArray<z.ZodObject<{
9
+ id: z.ZodString;
10
+ text: z.ZodString;
11
+ kind: z.ZodEnum<{
12
+ D: "D";
13
+ P: "P";
14
+ }>;
15
+ twin: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>>;
17
+ scenario_name: z.ZodString;
18
+ scenario_hash: z.ZodString;
19
+ scenario_prompt: z.ZodString;
20
+ expected_behavior: z.ZodString;
21
+ trace_storage_key: z.ZodOptional<z.ZodString>;
22
+ state_initial_storage_key: z.ZodOptional<z.ZodString>;
23
+ state_final_storage_key: z.ZodOptional<z.ZodString>;
24
+ signals_storage_key: z.ZodOptional<z.ZodString>;
25
+ per_twin_state_keys: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
26
+ state_initial_key: z.ZodOptional<z.ZodString>;
27
+ state_final_key: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strip>>>;
29
+ }, z.core.$strip>;
30
+ export type FinalizeRequest = z.infer<typeof finalizeRequestSchema>;
31
+ export declare const finalizeResponseSchema: z.ZodObject<{
32
+ run_id: z.ZodString;
33
+ score: z.ZodNumber;
34
+ judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ dashboard_url: z.ZodString;
36
+ criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
37
+ criterion: z.ZodObject<{
38
+ type: z.ZodPipe<z.ZodEnum<{
39
+ model: "model";
40
+ code: "code";
41
+ D: "D";
42
+ P: "P";
43
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
44
+ text: z.ZodString;
45
+ twin: z.ZodOptional<z.ZodString>;
46
+ }, z.core.$strip>;
47
+ passed: z.ZodBoolean;
48
+ skipped: z.ZodBoolean;
49
+ reason: z.ZodString;
50
+ confidence: z.ZodNumber;
51
+ judge_model: z.ZodString;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ criterion: z.ZodObject<{
54
+ type: z.ZodPipe<z.ZodEnum<{
55
+ model: "model";
56
+ code: "code";
57
+ D: "D";
58
+ P: "P";
59
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
60
+ text: z.ZodString;
61
+ twin: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strip>;
63
+ passed: z.ZodBoolean;
64
+ skipped: z.ZodBoolean;
65
+ reason: z.ZodString;
66
+ }, z.core.$strip>]>>>;
67
+ }, z.core.$strip>;
68
+ export type FinalizeResponse = z.infer<typeof finalizeResponseSchema>;
69
+ export declare const finalizeStatusUrlSchema: z.ZodString;
70
+ export type FinalizeStatusUrl = z.infer<typeof finalizeStatusUrlSchema>;
71
+ export declare const finalizeAcceptedResponseSchema: z.ZodObject<{
72
+ evaluation_id: z.ZodString;
73
+ run_id: z.ZodString;
74
+ status: z.ZodLiteral<"queued">;
75
+ status_url: z.ZodString;
76
+ }, z.core.$strict>;
77
+ export type FinalizeAcceptedResponse = z.infer<typeof finalizeAcceptedResponseSchema>;
78
+ export declare const finalizeQueuedStatusResponseSchema: z.ZodObject<{
79
+ status: z.ZodLiteral<"queued">;
80
+ evaluation_id: z.ZodString;
81
+ run_id: z.ZodString;
82
+ }, z.core.$strict>;
83
+ export type FinalizeQueuedStatusResponse = z.infer<typeof finalizeQueuedStatusResponseSchema>;
84
+ export declare const finalizeRunningStatusResponseSchema: z.ZodObject<{
85
+ status: z.ZodLiteral<"running">;
86
+ evaluation_id: z.ZodString;
87
+ run_id: z.ZodString;
88
+ }, z.core.$strict>;
89
+ export type FinalizeRunningStatusResponse = z.infer<typeof finalizeRunningStatusResponseSchema>;
90
+ export declare const finalizeFailureErrorSchema: z.ZodObject<{
91
+ type: z.ZodString;
92
+ message: z.ZodString;
93
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
94
+ }, z.core.$strict>;
95
+ export type FinalizeFailureError = z.infer<typeof finalizeFailureErrorSchema>;
96
+ export declare const finalizeFailedStatusResponseSchema: z.ZodObject<{
97
+ status: z.ZodLiteral<"failed">;
98
+ error: z.ZodObject<{
99
+ type: z.ZodString;
100
+ message: z.ZodString;
101
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
102
+ }, z.core.$strict>;
103
+ evaluation_id: z.ZodString;
104
+ run_id: z.ZodString;
105
+ }, z.core.$strict>;
106
+ export type FinalizeFailedStatusResponse = z.infer<typeof finalizeFailedStatusResponseSchema>;
107
+ export declare const finalizeCompletedStatusResponseSchema: z.ZodObject<{
108
+ status: z.ZodLiteral<"completed">;
109
+ result: z.ZodObject<{
110
+ run_id: z.ZodString;
111
+ score: z.ZodNumber;
112
+ judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ dashboard_url: z.ZodString;
114
+ criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
115
+ criterion: z.ZodObject<{
116
+ type: z.ZodPipe<z.ZodEnum<{
117
+ model: "model";
118
+ code: "code";
119
+ D: "D";
120
+ P: "P";
121
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
122
+ text: z.ZodString;
123
+ twin: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strip>;
125
+ passed: z.ZodBoolean;
126
+ skipped: z.ZodBoolean;
127
+ reason: z.ZodString;
128
+ confidence: z.ZodNumber;
129
+ judge_model: z.ZodString;
130
+ }, z.core.$strip>, z.ZodObject<{
131
+ criterion: z.ZodObject<{
132
+ type: z.ZodPipe<z.ZodEnum<{
133
+ model: "model";
134
+ code: "code";
135
+ D: "D";
136
+ P: "P";
137
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
138
+ text: z.ZodString;
139
+ twin: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$strip>;
141
+ passed: z.ZodBoolean;
142
+ skipped: z.ZodBoolean;
143
+ reason: z.ZodString;
144
+ }, z.core.$strip>]>>>;
145
+ }, z.core.$strip>;
146
+ evaluation_id: z.ZodString;
147
+ run_id: z.ZodString;
148
+ }, z.core.$strict>;
149
+ export type FinalizeCompletedStatusResponse = z.infer<typeof finalizeCompletedStatusResponseSchema>;
150
+ export declare const finalizeStatusResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
151
+ status: z.ZodLiteral<"queued">;
152
+ evaluation_id: z.ZodString;
153
+ run_id: z.ZodString;
154
+ }, z.core.$strict>, z.ZodObject<{
155
+ status: z.ZodLiteral<"running">;
156
+ evaluation_id: z.ZodString;
157
+ run_id: z.ZodString;
158
+ }, z.core.$strict>, z.ZodObject<{
159
+ status: z.ZodLiteral<"failed">;
160
+ error: z.ZodObject<{
161
+ type: z.ZodString;
162
+ message: z.ZodString;
163
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
164
+ }, z.core.$strict>;
165
+ evaluation_id: z.ZodString;
166
+ run_id: z.ZodString;
167
+ }, z.core.$strict>, z.ZodObject<{
168
+ status: z.ZodLiteral<"completed">;
169
+ result: z.ZodObject<{
170
+ run_id: z.ZodString;
171
+ score: z.ZodNumber;
172
+ judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ dashboard_url: z.ZodString;
174
+ criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
175
+ criterion: z.ZodObject<{
176
+ type: z.ZodPipe<z.ZodEnum<{
177
+ model: "model";
178
+ code: "code";
179
+ D: "D";
180
+ P: "P";
181
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
182
+ text: z.ZodString;
183
+ twin: z.ZodOptional<z.ZodString>;
184
+ }, z.core.$strip>;
185
+ passed: z.ZodBoolean;
186
+ skipped: z.ZodBoolean;
187
+ reason: z.ZodString;
188
+ confidence: z.ZodNumber;
189
+ judge_model: z.ZodString;
190
+ }, z.core.$strip>, z.ZodObject<{
191
+ criterion: z.ZodObject<{
192
+ type: z.ZodPipe<z.ZodEnum<{
193
+ model: "model";
194
+ code: "code";
195
+ D: "D";
196
+ P: "P";
197
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
198
+ text: z.ZodString;
199
+ twin: z.ZodOptional<z.ZodString>;
200
+ }, z.core.$strip>;
201
+ passed: z.ZodBoolean;
202
+ skipped: z.ZodBoolean;
203
+ reason: z.ZodString;
204
+ }, z.core.$strip>]>>>;
205
+ }, z.core.$strip>;
206
+ evaluation_id: z.ZodString;
207
+ run_id: z.ZodString;
208
+ }, z.core.$strict>], "status">;
209
+ export type FinalizeStatusResponse = z.infer<typeof finalizeStatusResponseSchema>;
210
+ export declare const finalizeInitialResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
211
+ run_id: z.ZodString;
212
+ score: z.ZodNumber;
213
+ judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ dashboard_url: z.ZodString;
215
+ criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
216
+ criterion: z.ZodObject<{
217
+ type: z.ZodPipe<z.ZodEnum<{
218
+ model: "model";
219
+ code: "code";
220
+ D: "D";
221
+ P: "P";
222
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
223
+ text: z.ZodString;
224
+ twin: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strip>;
226
+ passed: z.ZodBoolean;
227
+ skipped: z.ZodBoolean;
228
+ reason: z.ZodString;
229
+ confidence: z.ZodNumber;
230
+ judge_model: z.ZodString;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ criterion: z.ZodObject<{
233
+ type: z.ZodPipe<z.ZodEnum<{
234
+ model: "model";
235
+ code: "code";
236
+ D: "D";
237
+ P: "P";
238
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
239
+ text: z.ZodString;
240
+ twin: z.ZodOptional<z.ZodString>;
241
+ }, z.core.$strip>;
242
+ passed: z.ZodBoolean;
243
+ skipped: z.ZodBoolean;
244
+ reason: z.ZodString;
245
+ }, z.core.$strip>]>>>;
246
+ }, z.core.$strip>, z.ZodObject<{
247
+ evaluation_id: z.ZodString;
248
+ run_id: z.ZodString;
249
+ status: z.ZodLiteral<"queued">;
250
+ status_url: z.ZodString;
251
+ }, z.core.$strict>]>;
252
+ export type FinalizeInitialResponse = z.infer<typeof finalizeInitialResponseSchema>;
@@ -0,0 +1,122 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // shared-types — /v1/sessions/:id/finalize response family (part of §4 PUBLIC
4
+ // REST API). ADR-013 managed-judge synchronous result plus the F-700 async
5
+ // `Prefer: respond-async` accepted/status/union shapes. Re-exported through the
6
+ // `@pome-sh/shared-types` barrel (index.ts).
7
+ import { z } from "zod";
8
+ import { criterionResultSchema } from "./run.js";
9
+ import { criterionDefSchema, perTwinStateKeysSchema } from "./rest.js";
10
+ // POST /v1/sessions/:id/finalize — ADR-013 managed-judge REQUEST. This is the
11
+ // LIVE scoring wire: the CLI (cli/src/hosted/client.ts `finalize`) uploads trace
12
+ // / state / signals blobs via the presigned upload-url routes, then POSTs the
13
+ // criterion *definitions* plus the storage KEYS here; the cloud runs the managed
14
+ // judge and returns `finalizeInitialResponseSchema`. (The sibling
15
+ // `submitResultRequestSchema` in rest.ts is the DEPRECATED BYOK shim that scores
16
+ // CLI-side and uploads inline state_*_json_b64.)
17
+ //
18
+ // Not `.strict()`: a tolerant reader that strips unknown additive keys, matching
19
+ // the rest of the §4 request/response family. Field set mirrors the CLI body
20
+ // exactly — `scenario_*` vocab (finalize does not take the W3 `task_*` aliases),
21
+ // storage keys optional (cloud falls back to conventional paths when omitted).
22
+ export const finalizeRequestSchema = z.object({
23
+ stop_reason: z.string(), // "completed" | "timeout" | "preflight_failed" | …
24
+ exit_code: z.number().int(),
25
+ duration_ms: z.number().int(),
26
+ agent_model: z.string(),
27
+ agent_sdk: z.string().nullable(), // normalizeAgentSdk() output: trimmed string or null
28
+ // Criterion DEFINITIONS (not results): cloud judges these against the recorded
29
+ // trace/state and returns the authoritative score. Carries optional per-criterion
30
+ // twin attribution (multi-twin M3).
31
+ criteria: z.array(criterionDefSchema),
32
+ scenario_name: z.string(),
33
+ scenario_hash: z.string(),
34
+ scenario_prompt: z.string(),
35
+ expected_behavior: z.string(),
36
+ // Optional storage-key overrides; omitted keys fall back to the conventional
37
+ // team-<>/session-<>/<filename> paths written by the *-upload-url routes.
38
+ trace_storage_key: z.string().optional(),
39
+ state_initial_storage_key: z.string().optional(),
40
+ state_final_storage_key: z.string().optional(),
41
+ signals_storage_key: z.string().optional(),
42
+ // Multi-twin (M3): additive per-twin state storage keys, keyed by twin id.
43
+ // Absent on single-twin sessions, which use the flat state_*_storage_key fields
44
+ // above. Unknown to an older cloud, which strips it and scores the primary twin
45
+ // unchanged (new CLI × old cloud degrades gracefully).
46
+ per_twin_state_keys: perTwinStateKeysSchema.optional(),
47
+ });
48
+ // /v1/sessions/:id/finalize — ADR-013 managed-judge response.
49
+ // Not `.strict()`: cloud may emit additive M7 keys (`evaluator_version`,
50
+ // `criteria_breakdown`, `all_skipped`, `provenance`) that older/newer CLIs
51
+ // strip rather than reject.
52
+ export const finalizeResponseSchema = z.object({
53
+ run_id: z.string(),
54
+ score: z.number().int().min(0).max(100),
55
+ judge_model: z.string().nullable().optional(),
56
+ dashboard_url: z.string().url(),
57
+ criteria_results: z.array(criterionResultSchema).optional(),
58
+ });
59
+ // F-700: `status_url` is a same-origin absolute URL *or* an absolute-path
60
+ // relative URL (cloud returns `/v1/sessions/:id/evaluation`).
61
+ export const finalizeStatusUrlSchema = z
62
+ .string()
63
+ .min(1)
64
+ .refine((value) => {
65
+ if (value.startsWith("/") && !value.startsWith("//"))
66
+ return true;
67
+ try {
68
+ new URL(value);
69
+ return true;
70
+ }
71
+ catch {
72
+ return false;
73
+ }
74
+ }, { message: "Invalid status_url" });
75
+ // POST /v1/sessions/:id/finalize with `Prefer: respond-async`.
76
+ // The legacy scored response remains in the initial-response union for the
77
+ // synchronous N-1 compatibility window.
78
+ export const finalizeAcceptedResponseSchema = z.object({
79
+ evaluation_id: z.string().min(1),
80
+ run_id: z.string().min(1),
81
+ status: z.literal("queued"),
82
+ status_url: finalizeStatusUrlSchema,
83
+ }).strict();
84
+ const finalizeStatusIdentitySchema = {
85
+ evaluation_id: z.string().min(1),
86
+ run_id: z.string().min(1),
87
+ };
88
+ export const finalizeQueuedStatusResponseSchema = z.object({
89
+ ...finalizeStatusIdentitySchema,
90
+ status: z.literal("queued"),
91
+ }).strict();
92
+ export const finalizeRunningStatusResponseSchema = z.object({
93
+ ...finalizeStatusIdentitySchema,
94
+ status: z.literal("running"),
95
+ }).strict();
96
+ // F-700 wire error on GET .../evaluation failed status.
97
+ export const finalizeFailureErrorSchema = z.object({
98
+ type: z.string().min(1),
99
+ message: z.string().min(1),
100
+ details: z.record(z.string(), z.unknown()).optional(),
101
+ }).strict();
102
+ export const finalizeFailedStatusResponseSchema = z.object({
103
+ ...finalizeStatusIdentitySchema,
104
+ status: z.literal("failed"),
105
+ error: finalizeFailureErrorSchema,
106
+ }).strict();
107
+ export const finalizeCompletedStatusResponseSchema = z.object({
108
+ ...finalizeStatusIdentitySchema,
109
+ status: z.literal("completed"),
110
+ result: finalizeResponseSchema,
111
+ }).strict();
112
+ export const finalizeStatusResponseSchema = z.discriminatedUnion("status", [
113
+ finalizeQueuedStatusResponseSchema,
114
+ finalizeRunningStatusResponseSchema,
115
+ finalizeFailedStatusResponseSchema,
116
+ finalizeCompletedStatusResponseSchema,
117
+ ]);
118
+ export const finalizeInitialResponseSchema = z.union([
119
+ finalizeResponseSchema,
120
+ finalizeAcceptedResponseSchema,
121
+ ]);
122
+ //# sourceMappingURL=finalize-shapes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finalize-shapes.js","sourceRoot":"","sources":["../src/finalize-shapes.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,gFAAgF;AAChF,6CAA6C;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAEvE,8EAA8E;AAC9E,iFAAiF;AACjF,8EAA8E;AAC9E,iFAAiF;AACjF,kEAAkE;AAClE,iFAAiF;AACjF,iDAAiD;AACjD,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAC7E,iFAAiF;AACjF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAwB,mDAAmD;IAClG,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAe,qDAAqD;IACpG,+EAA+E;IAC/E,kFAAkF;IAClF,oCAAoC;IACpC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACrC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,aAAa,E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,wDAAwD;AACxD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC,MAAM,EAAE,CAAC;AAKZ,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,GAAG,4BAA4B;IAC/B,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC3B,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAC,MAAM,EAAE,CAAC;AAKZ,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,GAAG,4BAA4B;IAC/B,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC9B,MAAM,EAAE,sBAAsB;CAC/B,CAAC,CAAC,MAAM,EAAE,CAAC;AAKZ,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACzE,kCAAkC;IAClC,mCAAmC;IACnC,kCAAkC;IAClC,qCAAqC;CACtC,CAAC,CAAC;AAKH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC;IACnD,sBAAsB;IACtB,8BAA8B;CAC/B,CAAC,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { z } from "zod";
2
+ export declare const userSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ clerk_user_id: z.ZodString;
5
+ email: z.ZodString;
6
+ display_name: z.ZodNullable<z.ZodString>;
7
+ created_at: z.ZodString;
8
+ updated_at: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export type User = z.infer<typeof userSchema>;
11
+ export declare const planTierSchema: z.ZodEnum<{
12
+ free: "free";
13
+ hobby: "hobby";
14
+ pro: "pro";
15
+ team: "team";
16
+ self_host_annual: "self_host_annual";
17
+ enterprise: "enterprise";
18
+ }>;
19
+ export type PlanTier = z.infer<typeof planTierSchema>;
20
+ export declare const teamSchema: z.ZodObject<{
21
+ id: z.ZodString;
22
+ slug: z.ZodString;
23
+ name: z.ZodString;
24
+ plan_tier: z.ZodEnum<{
25
+ free: "free";
26
+ hobby: "hobby";
27
+ pro: "pro";
28
+ team: "team";
29
+ self_host_annual: "self_host_annual";
30
+ enterprise: "enterprise";
31
+ }>;
32
+ stripe_customer_id: z.ZodNullable<z.ZodString>;
33
+ created_at: z.ZodString;
34
+ updated_at: z.ZodString;
35
+ }, z.core.$strip>;
36
+ export type Team = z.infer<typeof teamSchema>;
37
+ export declare const teamRoleSchema: z.ZodEnum<{
38
+ owner: "owner";
39
+ admin: "admin";
40
+ member: "member";
41
+ }>;
42
+ export type TeamRole = z.infer<typeof teamRoleSchema>;
43
+ export declare const teamMemberSchema: z.ZodObject<{
44
+ team_id: z.ZodString;
45
+ user_id: z.ZodString;
46
+ role: z.ZodEnum<{
47
+ owner: "owner";
48
+ admin: "admin";
49
+ member: "member";
50
+ }>;
51
+ invited_at: z.ZodString;
52
+ accepted_at: z.ZodNullable<z.ZodString>;
53
+ }, z.core.$strip>;
54
+ export type TeamMember = z.infer<typeof teamMemberSchema>;
55
+ export declare const teamInviteSchema: z.ZodObject<{
56
+ id: z.ZodString;
57
+ team_id: z.ZodString;
58
+ email: z.ZodString;
59
+ role: z.ZodEnum<{
60
+ owner: "owner";
61
+ admin: "admin";
62
+ member: "member";
63
+ }>;
64
+ invited_by: z.ZodString;
65
+ expires_at: z.ZodString;
66
+ accepted_at: z.ZodNullable<z.ZodString>;
67
+ created_at: z.ZodString;
68
+ }, z.core.$strip>;
69
+ export type TeamInvite = z.infer<typeof teamInviteSchema>;
70
+ export declare const apiKeySchema: z.ZodObject<{
71
+ id: z.ZodString;
72
+ team_id: z.ZodString;
73
+ name: z.ZodString;
74
+ created_by: z.ZodString;
75
+ last_used_at: z.ZodNullable<z.ZodString>;
76
+ created_at: z.ZodString;
77
+ revoked_at: z.ZodNullable<z.ZodString>;
78
+ }, z.core.$strip>;
79
+ export type ApiKey = z.infer<typeof apiKeySchema>;
80
+ export declare const apiKeyCreatedSchema: z.ZodObject<{
81
+ id: z.ZodString;
82
+ team_id: z.ZodString;
83
+ name: z.ZodString;
84
+ created_by: z.ZodString;
85
+ last_used_at: z.ZodNullable<z.ZodString>;
86
+ created_at: z.ZodString;
87
+ revoked_at: z.ZodNullable<z.ZodString>;
88
+ full_key: z.ZodString;
89
+ }, z.core.$strip>;
90
+ export type ApiKeyCreated = z.infer<typeof apiKeyCreatedSchema>;
@@ -0,0 +1,72 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // shared-types §1 — IDENTITY. Users, teams, memberships, invites, API keys.
4
+ // Re-exported through the `@pome-sh/shared-types` barrel (index.ts).
5
+ import { z } from "zod";
6
+ // ─────────────────────────────────────────────────────────────────────────────
7
+ // 1. IDENTITY
8
+ // ─────────────────────────────────────────────────────────────────────────────
9
+ export const userSchema = z.object({
10
+ id: z.string(), // usr_<nanoid> (text, not uuid; per /plan-eng-review L7)
11
+ clerk_user_id: z.string(), // Clerk user ID (`user_*`)
12
+ email: z.string().email(),
13
+ display_name: z.string().nullable(),
14
+ created_at: z.string().datetime(),
15
+ updated_at: z.string().datetime(),
16
+ });
17
+ // FDRS-613: reconciled to pome-cloud /v1 wire truth — `hobby` and `team` were
18
+ // added cloud-side for the launch pricing tiers; adopted here so a cloud-issued
19
+ // MeResponse / UsageResponse (plan_tier) parses under the twins schema.
20
+ export const planTierSchema = z.enum([
21
+ "free",
22
+ "hobby",
23
+ "pro",
24
+ "team",
25
+ "self_host_annual",
26
+ "enterprise",
27
+ ]);
28
+ export const teamSchema = z.object({
29
+ id: z.string(), // tm_<nanoid>
30
+ slug: z.string(), // /dashboard/[teamSlug]/...
31
+ name: z.string(),
32
+ plan_tier: planTierSchema,
33
+ stripe_customer_id: z.string().nullable(),
34
+ created_at: z.string().datetime(),
35
+ updated_at: z.string().datetime(),
36
+ });
37
+ export const teamRoleSchema = z.enum(["owner", "admin", "member"]);
38
+ export const teamMemberSchema = z.object({
39
+ team_id: z.string(),
40
+ user_id: z.string(),
41
+ role: teamRoleSchema,
42
+ invited_at: z.string().datetime(),
43
+ accepted_at: z.string().datetime().nullable(),
44
+ });
45
+ // Public invite shape — token is NEVER returned in API responses. The plaintext
46
+ // token is delivered exactly once via `createInviteResponseSchema.invite_url`
47
+ // (which embeds it as a path segment). Server stores only sha256(token) in
48
+ // `team_invites.token_hash`.
49
+ export const teamInviteSchema = z.object({
50
+ id: z.string(), // inv_<nanoid>
51
+ team_id: z.string(),
52
+ email: z.string().email(),
53
+ role: teamRoleSchema,
54
+ invited_by: z.string(), // user_id
55
+ expires_at: z.string().datetime(),
56
+ accepted_at: z.string().datetime().nullable(),
57
+ created_at: z.string().datetime(),
58
+ });
59
+ export const apiKeySchema = z.object({
60
+ id: z.string(), // pme_<short> public prefix; hashed_key NEVER appears in API responses (kept server-side only)
61
+ team_id: z.string(),
62
+ name: z.string(),
63
+ created_by: z.string(), // user_id
64
+ last_used_at: z.string().datetime().nullable(),
65
+ created_at: z.string().datetime(),
66
+ revoked_at: z.string().datetime().nullable(),
67
+ });
68
+ // One-time response shape — full key string is only in the create-response, never persisted.
69
+ export const apiKeyCreatedSchema = apiKeySchema.extend({
70
+ full_key: z.string(), // pme_<full> — show once, then redact
71
+ });
72
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,4EAA4E;AAC5E,qEAAqE;AAErE,OAAO,EAAE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