@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,152 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // Shared trace redaction. This is the one implementation used by the CLI,
4
+ // adapter, SDK, and first-party twins before trace/state data is persisted,
5
+ // uploaded, or rendered in prompts.
6
+ const REDACTED = "[REDACTED]";
7
+ const HARD_REDACT_KEYS = new Set([
8
+ "authorization",
9
+ "x-api-key",
10
+ "cookie",
11
+ "api_key",
12
+ "client_secret",
13
+ "webhook_secret",
14
+ "password",
15
+ "secret",
16
+ "token",
17
+ "access_token",
18
+ "refresh_token",
19
+ "session_token",
20
+ "agent_token",
21
+ "anthropic_api_key",
22
+ ]);
23
+ function base64UrlRunEnd(value, from) {
24
+ let i = from;
25
+ while (i < value.length) {
26
+ const code = value.charCodeAt(i);
27
+ const isBase64Url = (code >= 48 && code <= 57) ||
28
+ (code >= 65 && code <= 90) ||
29
+ (code >= 97 && code <= 122) ||
30
+ code === 45 ||
31
+ code === 95;
32
+ if (!isBase64Url)
33
+ break;
34
+ i += 1;
35
+ }
36
+ return i;
37
+ }
38
+ function scrubJwts(value) {
39
+ let out = "";
40
+ let copied = 0;
41
+ let search = 0;
42
+ while (true) {
43
+ const start = value.indexOf("eyJ", search);
44
+ if (start === -1)
45
+ break;
46
+ const header = base64UrlRunEnd(value, start + 3);
47
+ if (header === start + 3) {
48
+ search = start + 1;
49
+ continue;
50
+ }
51
+ if (value.charCodeAt(header) !== 46) {
52
+ search = header;
53
+ continue;
54
+ }
55
+ const payload = base64UrlRunEnd(value, header + 1);
56
+ if (payload === header + 1 || value.charCodeAt(payload) !== 46) {
57
+ search = header;
58
+ continue;
59
+ }
60
+ const end = base64UrlRunEnd(value, payload + 1);
61
+ out += value.slice(copied, start) + REDACTED;
62
+ copied = end;
63
+ search = end;
64
+ }
65
+ return copied === 0 ? value : out + value.slice(copied);
66
+ }
67
+ function pemHeaderEnd(value, at, keyword) {
68
+ const labelStart = at + keyword.length;
69
+ let labelEnd = labelStart;
70
+ while (labelEnd < value.length) {
71
+ const code = value.charCodeAt(labelEnd);
72
+ if (!((code >= 65 && code <= 90) || code === 32))
73
+ break;
74
+ labelEnd += 1;
75
+ }
76
+ if (labelEnd === labelStart)
77
+ return -1;
78
+ if (!value.startsWith("-----", labelEnd))
79
+ return -1;
80
+ return labelEnd + 5;
81
+ }
82
+ function scrubPemBlocks(value) {
83
+ let out = "";
84
+ let copied = 0;
85
+ let search = 0;
86
+ while (true) {
87
+ const begin = value.indexOf("-----BEGIN ", search);
88
+ if (begin === -1)
89
+ break;
90
+ const bodyStart = pemHeaderEnd(value, begin, "-----BEGIN ");
91
+ if (bodyStart === -1) {
92
+ search = begin + 1;
93
+ continue;
94
+ }
95
+ let endSearch = bodyStart;
96
+ let blockEnd = -1;
97
+ while (true) {
98
+ const end = value.indexOf("-----END ", endSearch);
99
+ if (end === -1)
100
+ break;
101
+ blockEnd = pemHeaderEnd(value, end, "-----END ");
102
+ if (blockEnd !== -1)
103
+ break;
104
+ endSearch = end + 1;
105
+ }
106
+ if (blockEnd === -1)
107
+ break;
108
+ out += value.slice(copied, begin) + REDACTED;
109
+ copied = blockEnd;
110
+ search = blockEnd;
111
+ }
112
+ return copied === 0 ? value : out + value.slice(copied);
113
+ }
114
+ const SCRUB_STEPS = [
115
+ /redaction_fixture_secret_[A-Za-z0-9_-]{8,}/g,
116
+ /\bsk-[A-Za-z0-9_-]{20,}/g,
117
+ /\b[rs]k_(?:test|live)_[A-Za-z0-9_]{4,}/g,
118
+ /ghp_[A-Za-z0-9]{36}/g,
119
+ /github_pat_[A-Za-z0-9_]{20,}/g,
120
+ /xox[aboprs]-[A-Za-z0-9-]{20,}/g,
121
+ /xapp-[A-Za-z0-9-]{10,}/g,
122
+ /(?:pme|pk|rk)_[A-Za-z0-9_-]{20,}/g,
123
+ /AIza[0-9A-Za-z_-]{20,}/g,
124
+ /AKIA[0-9A-Z]{16}/g,
125
+ scrubJwts,
126
+ scrubPemBlocks,
127
+ /-----BEGIN [A-Z ]+-----/g,
128
+ ];
129
+ function scrubString(value) {
130
+ let out = value;
131
+ for (const step of SCRUB_STEPS) {
132
+ out = typeof step === "function" ? step(out) : out.replace(step, REDACTED);
133
+ }
134
+ return out;
135
+ }
136
+ export function redactSecrets(value) {
137
+ if (typeof value === "string")
138
+ return scrubString(value);
139
+ if (Array.isArray(value))
140
+ return value.map(redactSecrets);
141
+ if (value && typeof value === "object") {
142
+ return Object.fromEntries(Object.entries(value).map(([key, nested]) => [
143
+ key,
144
+ HARD_REDACT_KEYS.has(key.toLowerCase()) ? REDACTED : redactSecrets(nested),
145
+ ]));
146
+ }
147
+ return value;
148
+ }
149
+ export function redactEvent(event) {
150
+ return redactSecrets(event);
151
+ }
152
+ //# sourceMappingURL=redaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"red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AAC,OAAO,CAAC,KAAgC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;YACtE,GAAG;YACH,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC;SAC3E,CAAC,CACH,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,KAAQ;IACrC,OAAO,aAAa,CAAC,KAAK,CAAM,CAAC;AACnC,CAAC"}
@@ -0,0 +1,198 @@
1
+ import { z } from "zod";
2
+ export declare const meResponseSchema: z.ZodObject<{
3
+ user: z.ZodObject<{
4
+ id: z.ZodString;
5
+ email: z.ZodString;
6
+ }, z.core.$strip>;
7
+ team: z.ZodObject<{
8
+ id: z.ZodString;
9
+ plan_tier: z.ZodEnum<{
10
+ free: "free";
11
+ hobby: "hobby";
12
+ pro: "pro";
13
+ team: "team";
14
+ self_host_annual: "self_host_annual";
15
+ enterprise: "enterprise";
16
+ }>;
17
+ slug: z.ZodString;
18
+ }, z.core.$strip>;
19
+ api_key: z.ZodObject<{
20
+ id: z.ZodString;
21
+ name: z.ZodString;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>;
24
+ export type MeResponse = z.infer<typeof meResponseSchema>;
25
+ export declare const createSessionRequestSchema: z.ZodPreprocess<z.ZodObject<{
26
+ twins: z.ZodDefault<z.ZodArray<z.ZodString>>;
27
+ task_source: z.ZodOptional<z.ZodString>;
28
+ task_id: z.ZodOptional<z.ZodString>;
29
+ seed: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
+ idempotency_key: z.ZodOptional<z.ZodString>;
31
+ group_id: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>>;
33
+ export type CreateSessionRequest = z.infer<typeof createSessionRequestSchema>;
34
+ export declare const createSessionResponseSchema: z.ZodPreprocess<z.ZodObject<{
35
+ session_id: z.ZodString;
36
+ session_token: z.ZodString;
37
+ twin_url: z.ZodString;
38
+ expires_at: z.ZodString;
39
+ agent_token: z.ZodString;
40
+ provider_credentials: z.ZodDefault<z.ZodObject<{
41
+ github: z.ZodOptional<z.ZodObject<{
42
+ token: z.ZodString;
43
+ header: z.ZodLiteral<"Authorization">;
44
+ scheme: z.ZodLiteral<"Bearer">;
45
+ }, z.core.$strip>>;
46
+ stripe: z.ZodOptional<z.ZodObject<{
47
+ api_key: z.ZodString;
48
+ header: z.ZodLiteral<"Authorization">;
49
+ scheme: z.ZodLiteral<"Bearer">;
50
+ }, z.core.$strip>>;
51
+ slack: z.ZodOptional<z.ZodObject<{
52
+ token: z.ZodString;
53
+ header: z.ZodLiteral<"Authorization">;
54
+ scheme: z.ZodLiteral<"Bearer">;
55
+ }, z.core.$strip>>;
56
+ }, z.core.$strip>>;
57
+ openapi_url: z.ZodString;
58
+ per_twin: z.ZodRecord<z.ZodString, z.ZodObject<{
59
+ api_url: z.ZodString;
60
+ mcp_url: z.ZodString;
61
+ openapi_url: z.ZodString;
62
+ }, z.core.$strip>>;
63
+ }, z.core.$strip>>;
64
+ export type CreateSessionResponse = z.infer<typeof createSessionResponseSchema>;
65
+ export declare const submitResultRequestSchema: z.ZodPreprocess<z.ZodObject<{
66
+ task_name: z.ZodString;
67
+ task_hash: z.ZodString;
68
+ duration_ms: z.ZodNumber;
69
+ agent_model: z.ZodString;
70
+ satisfaction_score: z.ZodNumber;
71
+ criteria_results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
72
+ criterion: z.ZodObject<{
73
+ type: z.ZodPipe<z.ZodEnum<{
74
+ model: "model";
75
+ code: "code";
76
+ D: "D";
77
+ P: "P";
78
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
79
+ text: z.ZodString;
80
+ }, z.core.$strip>;
81
+ passed: z.ZodBoolean;
82
+ skipped: z.ZodBoolean;
83
+ reason: z.ZodString;
84
+ confidence: z.ZodNumber;
85
+ judge_model: z.ZodString;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ criterion: z.ZodObject<{
88
+ type: z.ZodPipe<z.ZodEnum<{
89
+ model: "model";
90
+ code: "code";
91
+ D: "D";
92
+ P: "P";
93
+ }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
94
+ text: z.ZodString;
95
+ }, z.core.$strip>;
96
+ passed: z.ZodBoolean;
97
+ skipped: z.ZodBoolean;
98
+ reason: z.ZodString;
99
+ }, z.core.$strip>]>>;
100
+ judge_model: z.ZodString;
101
+ judge_tokens_in: z.ZodNullable<z.ZodNumber>;
102
+ judge_tokens_out: z.ZodNullable<z.ZodNumber>;
103
+ lanes: z.ZodDefault<z.ZodArray<z.ZodObject<{
104
+ id: z.ZodString;
105
+ step_id: z.ZodString;
106
+ twin: z.ZodString;
107
+ label: z.ZodNullable<z.ZodString>;
108
+ request_ids: z.ZodArray<z.ZodString>;
109
+ }, z.core.$strip>>>;
110
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
111
+ id: z.ZodString;
112
+ started_at: z.ZodString;
113
+ ended_at: z.ZodString;
114
+ label: z.ZodNullable<z.ZodString>;
115
+ lane_ids: z.ZodArray<z.ZodString>;
116
+ }, z.core.$strip>>>;
117
+ fix_prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
118
+ events_jsonl_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
119
+ trace_jsonl_b64: z.ZodString;
120
+ state_initial_json_b64: z.ZodString;
121
+ state_final_json_b64: z.ZodString;
122
+ }, z.core.$strip>>;
123
+ export type SubmitResultRequest = z.infer<typeof submitResultRequestSchema>;
124
+ export declare const submitResultResponseSchema: z.ZodObject<{
125
+ run_id: z.ZodString;
126
+ dashboard_url: z.ZodString;
127
+ }, z.core.$strip>;
128
+ export type SubmitResultResponse = z.infer<typeof submitResultResponseSchema>;
129
+ export declare const createEvalSessionResponseSchema: z.ZodObject<{
130
+ session_id: z.ZodString;
131
+ expires_at: z.ZodString;
132
+ }, z.core.$strip>;
133
+ export type CreateEvalSessionResponse = z.infer<typeof createEvalSessionResponseSchema>;
134
+ export declare const criterionDefSchema: z.ZodObject<{
135
+ id: z.ZodString;
136
+ text: z.ZodString;
137
+ kind: z.ZodEnum<{
138
+ D: "D";
139
+ P: "P";
140
+ }>;
141
+ }, z.core.$strip>;
142
+ export type CriterionDef = z.infer<typeof criterionDefSchema>;
143
+ export declare const usageResponseSchema: z.ZodObject<{
144
+ period_start: z.ZodString;
145
+ period_end: z.ZodString;
146
+ sessions_used: z.ZodNumber;
147
+ sessions_quota: z.ZodNumber;
148
+ sessions_remaining: z.ZodNumber;
149
+ plan_tier: z.ZodEnum<{
150
+ free: "free";
151
+ hobby: "hobby";
152
+ pro: "pro";
153
+ team: "team";
154
+ self_host_annual: "self_host_annual";
155
+ enterprise: "enterprise";
156
+ }>;
157
+ }, z.core.$strip>;
158
+ export type UsageResponse = z.infer<typeof usageResponseSchema>;
159
+ export declare const createInviteRequestSchema: z.ZodObject<{
160
+ email: z.ZodString;
161
+ role: z.ZodDefault<z.ZodEnum<{
162
+ owner: "owner";
163
+ admin: "admin";
164
+ member: "member";
165
+ }>>;
166
+ }, z.core.$strip>;
167
+ export type CreateInviteRequest = z.infer<typeof createInviteRequestSchema>;
168
+ export declare const createInviteResponseSchema: z.ZodObject<{
169
+ invite: z.ZodObject<{
170
+ id: z.ZodString;
171
+ team_id: z.ZodString;
172
+ email: z.ZodString;
173
+ role: z.ZodEnum<{
174
+ owner: "owner";
175
+ admin: "admin";
176
+ member: "member";
177
+ }>;
178
+ invited_by: z.ZodString;
179
+ expires_at: z.ZodString;
180
+ accepted_at: z.ZodNullable<z.ZodString>;
181
+ created_at: z.ZodString;
182
+ }, z.core.$strip>;
183
+ invite_url: z.ZodString;
184
+ }, z.core.$strip>;
185
+ export type CreateInviteResponse = z.infer<typeof createInviteResponseSchema>;
186
+ export declare const acceptInviteRequestSchema: z.ZodObject<{
187
+ token: z.ZodString;
188
+ }, z.core.$strip>;
189
+ export type AcceptInviteRequest = z.infer<typeof acceptInviteRequestSchema>;
190
+ export declare const acceptInviteResponseSchema: z.ZodObject<{
191
+ team_id: z.ZodString;
192
+ role: z.ZodEnum<{
193
+ owner: "owner";
194
+ admin: "admin";
195
+ member: "member";
196
+ }>;
197
+ }, z.core.$strip>;
198
+ export type AcceptInviteResponse = z.infer<typeof acceptInviteResponseSchema>;
@@ -0,0 +1,225 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // shared-types §4 — PUBLIC REST API (api.pome.sh/v1) request/response shapes,
4
+ // excluding the /finalize response family (see `./finalize-shapes.ts`). The two
5
+ // module-private helpers (`normalizeCreateSessionResponse` and the
6
+ // `*ObjectSchema` consts wrapped by z.preprocess) stay co-located with their
7
+ // exported consumers here. Re-exported through the `@pome-sh/shared-types` barrel.
8
+ import { z } from "zod";
9
+ import { apiKeySchema, planTierSchema, teamInviteSchema, teamRoleSchema, teamSchema, userSchema, } from "./identity.js";
10
+ import { criterionResultSchema, judgeModelSchema, laneSchema, stepSchema } from "./run.js";
11
+ import { normalizeTaskVocabKeys } from "./task-vocab.js";
12
+ // ─────────────────────────────────────────────────────────────────────────────
13
+ // 4. PUBLIC REST API (api.pome.sh/v1) request/response shapes
14
+ // ─────────────────────────────────────────────────────────────────────────────
15
+ // GET /v1/me
16
+ export const meResponseSchema = z.object({
17
+ user: userSchema.pick({ id: true, email: true }),
18
+ team: teamSchema.pick({ id: true, slug: true, plan_tier: true }),
19
+ api_key: apiKeySchema.pick({ id: true, name: true }),
20
+ });
21
+ // POST /v1/sessions
22
+ //
23
+ // W3 vocab (FDRS-653): `task_source` / `task_id` are canonical; the exported
24
+ // schema wraps this object in the tolerant-reader preprocess so 0.3.0 CLIs
25
+ // sending `scenario_source` / `scenario_id` keep working unchanged.
26
+ const createSessionRequestObjectSchema = z
27
+ .object({
28
+ twins: z.array(z.string()).min(1).default(["github"]),
29
+ task_source: z.string().optional(), // base64-encoded UTF-8 markdown; 0.3.0 alias: scenario_source
30
+ task_id: z.string().optional(), // alternative: stored task; 0.3.0 alias: scenario_id
31
+ // FDRS-580 / ADR-015 (adopted from pome-cloud, FDRS-613): the seed override
32
+ // is a PERMISSIVE, shape-blind boundary. The twin pod's own `parseSeed` is
33
+ // the sole authority on the seed's domain shape; the cloud forwards it
34
+ // verbatim. `z.record` keeps the one invariant that is the boundary's
35
+ // business — "the seed is a JSON object" — while forwarding every domain
36
+ // field, known or not, untouched. Do NOT re-narrow to `seedStateSchema`
37
+ // here: a narrow `.object()` strips unknown keys, which is how PR-based
38
+ // scenarios lost their `users` / `pull_requests` / `files`.
39
+ seed: z.record(z.string(), z.unknown()).optional(), // optional override
40
+ // M3: client-supplied UUID v4 used for 30s server-side dedupe of
41
+ // POST /v1/sessions. The dashboard generates one per Start-button click;
42
+ // legacy clients work without it.
43
+ idempotency_key: z.string().uuid().optional(),
44
+ // M3 / FDRS-636: client-minted trial-group identity — `pome run -n k`
45
+ // (and `pome demo`) stamp one id per invocation, shared by all k trial
46
+ // sessions. The cloud copies it onto sessions.group_id at mint and onto
47
+ // runs.group_id at finalize; the demo/eval mints already accept the same
48
+ // field. Format mirrors the cloud's GROUP_ID_RE. Legacy clients omit it.
49
+ group_id: z.string().regex(/^[A-Za-z0-9_-]{6,64}$/).optional(),
50
+ })
51
+ .refine((v) => Boolean(v.task_source) !== Boolean(v.task_id), { message: "Provide exactly one of task_source or task_id (scenario_source / scenario_id are accepted 0.3.0 aliases)" });
52
+ // Tolerant reader (FDRS-653): accepts both vocabularies, normalizes to task_*.
53
+ export const createSessionRequestSchema = z.preprocess(normalizeTaskVocabKeys, createSessionRequestObjectSchema);
54
+ function normalizeCreateSessionResponse(value) {
55
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
56
+ return value;
57
+ }
58
+ const record = value;
59
+ if (typeof record.session_id !== "string" ||
60
+ typeof record.twin_url !== "string" ||
61
+ typeof record.openapi_url !== "string") {
62
+ return value;
63
+ }
64
+ let twin = "github";
65
+ try {
66
+ const [, parsedTwin] = new URL(record.twin_url).pathname.split("/");
67
+ if (parsedTwin !== undefined && parsedTwin.length > 0)
68
+ twin = parsedTwin;
69
+ }
70
+ catch {
71
+ // Schema validation below will report the invalid URL.
72
+ }
73
+ const apiUrl = record.twin_url;
74
+ const mcpUrl = typeof apiUrl === "string" && apiUrl.startsWith("https://api.pome.sh/")
75
+ ? apiUrl.replace("https://api.pome.sh/", "https://mcp.pome.sh/")
76
+ : apiUrl;
77
+ return {
78
+ ...record,
79
+ session_token: record.session_token ?? record.session_id,
80
+ per_twin: record.per_twin ??
81
+ {
82
+ [twin]: {
83
+ api_url: apiUrl,
84
+ mcp_url: mcpUrl,
85
+ openapi_url: record.openapi_url,
86
+ },
87
+ },
88
+ };
89
+ }
90
+ // M3 response shape: one session, N twins, one set of URLs per twin under
91
+ // `per_twin{}`. Legacy single-twin fields `twin_url` + `openapi_url` continue
92
+ // to be populated as `per_twin[twins[0]].api_url` / `.openapi_url` for ≥1 OSS
93
+ // CLI release. `session_token` is the public token used in URLs — same value as
94
+ // `session_id` in V1, but named separately so URL-shaped consumers stop reading
95
+ // internal-id-shaped fields. Both `session_token` and `per_twin` reconciled
96
+ // from pome-cloud /v1 wire truth (FDRS-613).
97
+ export const createSessionResponseSchema = z.preprocess(normalizeCreateSessionResponse, z.object({
98
+ session_id: z.string(),
99
+ session_token: z.string(), // = session_id in V1; public URL token
100
+ twin_url: z.string().url(), // legacy: = per_twin[twins[0]].api_url
101
+ expires_at: z.string().datetime(),
102
+ agent_token: z.string(), // edt_<jwt>; SENSITIVE — never log; CLI memory only; bearer scoped to session TTL
103
+ provider_credentials: z
104
+ .object({
105
+ github: z
106
+ .object({
107
+ token: z.string(),
108
+ header: z.literal("Authorization"),
109
+ scheme: z.literal("Bearer"),
110
+ })
111
+ .optional(),
112
+ stripe: z
113
+ .object({
114
+ api_key: z.string(),
115
+ header: z.literal("Authorization"),
116
+ scheme: z.literal("Bearer"),
117
+ })
118
+ .optional(),
119
+ slack: z
120
+ .object({
121
+ token: z.string(),
122
+ header: z.literal("Authorization"),
123
+ scheme: z.literal("Bearer"),
124
+ })
125
+ .optional(),
126
+ })
127
+ .default({}),
128
+ openapi_url: z.string().url(), // legacy: = per_twin[twins[0]].openapi_url
129
+ per_twin: z.record(z.string(), z.object({
130
+ api_url: z.string().url(), // api.pome.sh/<twin>/<session_token>
131
+ mcp_url: z.string().url(), // mcp.pome.sh/<twin>/<session_token> (501 stub in V1)
132
+ openapi_url: z.string().url(),
133
+ })),
134
+ }));
135
+ // POST /v1/sessions/{id}/result — SYNCHRONOUS. CLI scores locally (BYOK Flavor #1) then POSTs.
136
+ //
137
+ // Cloud never sees the customer's LLM key, never invokes any LLM provider,
138
+ // never holds `agent_stdout` (which would contain the agent's prompts and
139
+ // completions). Trace blobs (twin's HTTP request/response captures) ARE
140
+ // uploaded — those are the agent's tool calls against the twin, not LLM data.
141
+ //
142
+ // (Cloud-side note: cloud V1 treats /result as a legacy shim — new CLIs upload
143
+ // blobs via presigned URLs and call /finalize with ADR-013's managed judge.
144
+ // The shape below stays the wire contract either way.)
145
+ //
146
+ // W3 vocab (FDRS-653): `task_name` / `task_hash` canonical; the exported
147
+ // schema accepts 0.3.0 CLIs' `scenario_name` / `scenario_hash` and criterion
148
+ // kinds D/P inside `criteria_results`, normalizing both.
149
+ const submitResultRequestObjectSchema = z.object({
150
+ task_name: z.string(), // 0.3.0 alias: scenario_name
151
+ task_hash: z.string(), // 0.3.0 alias: scenario_hash
152
+ duration_ms: z.number().int(),
153
+ agent_model: z.string(),
154
+ // CLI-computed scoring fields (server-trusted; under BYOK there's nothing
155
+ // billing-sensitive to spoof — we don't bill on judge cost):
156
+ satisfaction_score: z.number().int().min(0).max(100),
157
+ criteria_results: z.array(criterionResultSchema),
158
+ judge_model: judgeModelSchema,
159
+ judge_tokens_in: z.number().int().min(0).nullable(),
160
+ judge_tokens_out: z.number().int().min(0).nullable(),
161
+ // Correlator output + fix-prompt from CLI (post-M3i). Defaults supplied for
162
+ // backward compat during the M3i rollout — older CLIs that omit these still
163
+ // submit successfully and the run lands as a "legacy" row (empty lanes/steps,
164
+ // null fix_prompt). When all CLIs are M3i+, tighten by removing defaults.
165
+ lanes: z.array(laneSchema).default([]),
166
+ steps: z.array(stepSchema).default([]),
167
+ fix_prompt: z.string().nullable().default(null),
168
+ // FDRS-357 (adopted from pome-cloud, FDRS-613): storage key (NOT URL) returned
169
+ // by POST /v1/sessions/:id/result-upload-url. Null on upload failure
170
+ // (best-effort), --no-upload opt-out, or pre-FDRS-357 CLI.
171
+ events_jsonl_url: z.string().nullable().default(null),
172
+ // Trace blobs — safe to upload (HTTP between agent and twin, not LLM prompts):
173
+ trace_jsonl_b64: z.string(),
174
+ state_initial_json_b64: z.string(),
175
+ state_final_json_b64: z.string(),
176
+ // NOTE: agent_stdout is intentionally NOT in this request. Cloud never
177
+ // receives the agent's prompts or completions. The CLI uses agent_stdout
178
+ // locally for the [model] judge then discards it.
179
+ });
180
+ // Tolerant reader (FDRS-653): accepts both vocabularies, normalizes to task_*.
181
+ export const submitResultRequestSchema = z.preprocess(normalizeTaskVocabKeys, submitResultRequestObjectSchema);
182
+ export const submitResultResponseSchema = z.object({
183
+ run_id: z.string(),
184
+ dashboard_url: z.string().url(),
185
+ });
186
+ // POST /v1/eval-sessions — mints a twin-less session for `pome eval <run-dir>`.
187
+ export const createEvalSessionResponseSchema = z.object({
188
+ session_id: z.string(),
189
+ expires_at: z.string(),
190
+ });
191
+ export const criterionDefSchema = z.object({
192
+ id: z.string().min(1),
193
+ text: z.string().min(1),
194
+ kind: z.enum(["D", "P"]),
195
+ });
196
+ // GET /v1/usage — live concurrent-session quota snapshot.
197
+ // FDRS-613: `sessions_remaining` tightened to `.int().min(0)` to match the
198
+ // pome-cloud /v1 wire truth (cloud clamps remaining at 0 rather than exposing
199
+ // negative overage on this live snapshot).
200
+ export const usageResponseSchema = z.object({
201
+ period_start: z.string().datetime(),
202
+ period_end: z.string().datetime(),
203
+ sessions_used: z.number().int().min(0),
204
+ sessions_quota: z.number().int().min(0),
205
+ sessions_remaining: z.number().int().min(0),
206
+ plan_tier: planTierSchema,
207
+ });
208
+ // POST /v1/teams/{id}/invites
209
+ export const createInviteRequestSchema = z.object({
210
+ email: z.string().email(),
211
+ role: teamRoleSchema.default("member"),
212
+ });
213
+ export const createInviteResponseSchema = z.object({
214
+ invite: teamInviteSchema,
215
+ invite_url: z.string().url(), // "https://pome.sh/invites/<token>"
216
+ });
217
+ // POST /v1/invites/{token}/accept (cloud surface: dashboard tRPC invites.accept)
218
+ export const acceptInviteRequestSchema = z.object({
219
+ token: z.string().min(16),
220
+ });
221
+ export const acceptInviteResponseSchema = z.object({
222
+ team_id: z.string(),
223
+ role: teamRoleSchema,
224
+ });
225
+ //# sourceMappingURL=rest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rest.js","sourceRoot":"","sources":["../src/rest.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,mEAAmE;AACnE,6EAA6E;AAC7E,mFAAmF;AAEnF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,gFAAgF;AAChF,8DAA8D;AAC9D,gFAAgF;AAEhF,aAAa;AACb,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAA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