@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,286 @@
1
+ /**
2
+ * otel/event-schema — the OTel-inclusive event union (M1.1 / FDRS-480).
3
+ *
4
+ * `eventSchema` in `recorder-events.ts` is the FROZEN v1 legacy union (the
5
+ * recording-spec contract under the repo's change-lock policy). Rather than
6
+ * mutate that frozen union, this file composes the OTel-extended union
7
+ * ADDITIVELY — a non-breaking superset:
8
+ *
9
+ * - `eventSchema` (recorder-events.ts) — the v1 legacy-only union.
10
+ * - `otelEventSchema` (this file) — legacy variants PLUS `OtelSpanEvent`.
11
+ *
12
+ * OTel-aware consumers (M3 correlation, the native trace renderer) import
13
+ * `otelEventSchema`; readers that only handle the v1 legacy shapes keep using
14
+ * `eventSchema` and recognize `OtelSpanEvent` separately.
15
+ *
16
+ * This union is FORMAT surface and canonical HERE (ownership boundary settled
17
+ * at FDRS-653 — see `./index.ts`). pome-cloud consumes it; its earlier
18
+ * cloud-local composition of the same union collapses into this one at the
19
+ * FDRS-654 consumer swap.
20
+ */
21
+ import { z } from "zod";
22
+ export declare const otelEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
23
+ ts: z.ZodString;
24
+ run_id: z.ZodString;
25
+ twin: z.ZodString;
26
+ request_id: z.ZodString;
27
+ correlation_id: z.ZodOptional<z.ZodString>;
28
+ task_step_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ scenario_step_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ step_id: z.ZodNullable<z.ZodString>;
31
+ tool_call_id: z.ZodNullable<z.ZodString>;
32
+ method: z.ZodString;
33
+ path: z.ZodString;
34
+ request_body: z.ZodUnknown;
35
+ status: z.ZodNumber;
36
+ response_body: z.ZodUnknown;
37
+ latency_ms: z.ZodNumber;
38
+ fidelity: z.ZodEnum<{
39
+ semantic: "semantic";
40
+ unsupported: "unsupported";
41
+ }>;
42
+ state_mutation: z.ZodBoolean;
43
+ state_delta: z.ZodNullable<z.ZodObject<{
44
+ before: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
45
+ after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
46
+ }, z.core.$strip>>;
47
+ idempotency_dedupe: z.ZodOptional<z.ZodBoolean>;
48
+ error: z.ZodNullable<z.ZodString>;
49
+ kind: z.ZodLiteral<"TwinHttpEvent">;
50
+ event_id: z.ZodString;
51
+ parent_id: z.ZodNullable<z.ZodString>;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ kind: z.ZodLiteral<"LlmCallEvent">;
54
+ host: z.ZodString;
55
+ port: z.ZodNumber;
56
+ latency_ms: z.ZodNumber;
57
+ bytes_in: z.ZodNumber;
58
+ bytes_out: z.ZodNumber;
59
+ url: z.ZodNullable<z.ZodString>;
60
+ method: z.ZodNullable<z.ZodString>;
61
+ status: z.ZodNullable<z.ZodNumber>;
62
+ model: z.ZodNullable<z.ZodString>;
63
+ prompt_tokens: z.ZodNullable<z.ZodNumber>;
64
+ completion_tokens: z.ZodNullable<z.ZodNumber>;
65
+ cost_usd: z.ZodNullable<z.ZodNumber>;
66
+ ts: z.ZodString;
67
+ event_id: z.ZodString;
68
+ parent_id: z.ZodNullable<z.ZodString>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ kind: z.ZodLiteral<"ToolUseEvent">;
71
+ tool_use_id: z.ZodString;
72
+ tool_name: z.ZodString;
73
+ input: z.ZodUnknown;
74
+ ts: z.ZodString;
75
+ event_id: z.ZodString;
76
+ parent_id: z.ZodNullable<z.ZodString>;
77
+ }, z.core.$strip>, z.ZodObject<{
78
+ kind: z.ZodLiteral<"ToolResultEvent">;
79
+ tool_use_id: z.ZodString;
80
+ output: z.ZodUnknown;
81
+ is_error: z.ZodBoolean;
82
+ ts: z.ZodString;
83
+ event_id: z.ZodString;
84
+ parent_id: z.ZodNullable<z.ZodString>;
85
+ }, z.core.$strip>, z.ZodObject<{
86
+ kind: z.ZodLiteral<"SubagentSpawnEvent">;
87
+ parent_tool_use_id: z.ZodString;
88
+ ts: z.ZodString;
89
+ event_id: z.ZodString;
90
+ parent_id: z.ZodNullable<z.ZodString>;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ kind: z.ZodLiteral<"HookEvent">;
93
+ hook_name: z.ZodString;
94
+ tool_name: z.ZodNullable<z.ZodString>;
95
+ ts: z.ZodString;
96
+ event_id: z.ZodString;
97
+ parent_id: z.ZodNullable<z.ZodString>;
98
+ }, z.core.$strip>], "kind">, z.ZodTransform<{
99
+ ts: string;
100
+ run_id: string;
101
+ twin: string;
102
+ request_id: string;
103
+ step_id: string | null;
104
+ tool_call_id: string | null;
105
+ method: string;
106
+ path: string;
107
+ request_body: unknown;
108
+ status: number;
109
+ response_body: unknown;
110
+ latency_ms: number;
111
+ fidelity: "semantic" | "unsupported";
112
+ state_mutation: boolean;
113
+ state_delta: {
114
+ before: Record<string, unknown> | null;
115
+ after: Record<string, unknown> | null;
116
+ } | null;
117
+ error: string | null;
118
+ kind: "TwinHttpEvent";
119
+ event_id: string;
120
+ parent_id: string | null;
121
+ correlation_id?: string | undefined;
122
+ task_step_id?: string | null | undefined;
123
+ scenario_step_id?: string | null | undefined;
124
+ idempotency_dedupe?: boolean | undefined;
125
+ } | {
126
+ kind: "LlmCallEvent";
127
+ host: string;
128
+ port: number;
129
+ latency_ms: number;
130
+ bytes_in: number;
131
+ bytes_out: number;
132
+ url: string | null;
133
+ method: string | null;
134
+ status: number | null;
135
+ model: string | null;
136
+ prompt_tokens: number | null;
137
+ completion_tokens: number | null;
138
+ cost_usd: number | null;
139
+ ts: string;
140
+ event_id: string;
141
+ parent_id: string | null;
142
+ } | {
143
+ kind: "ToolUseEvent";
144
+ tool_use_id: string;
145
+ tool_name: string;
146
+ input: unknown;
147
+ ts: string;
148
+ event_id: string;
149
+ parent_id: string | null;
150
+ } | {
151
+ kind: "ToolResultEvent";
152
+ tool_use_id: string;
153
+ output: unknown;
154
+ is_error: boolean;
155
+ ts: string;
156
+ event_id: string;
157
+ parent_id: string | null;
158
+ } | {
159
+ kind: "SubagentSpawnEvent";
160
+ parent_tool_use_id: string;
161
+ ts: string;
162
+ event_id: string;
163
+ parent_id: string | null;
164
+ } | {
165
+ kind: "HookEvent";
166
+ hook_name: string;
167
+ tool_name: string | null;
168
+ ts: string;
169
+ event_id: string;
170
+ parent_id: string | null;
171
+ }, {
172
+ ts: string;
173
+ run_id: string;
174
+ twin: string;
175
+ request_id: string;
176
+ step_id: string | null;
177
+ tool_call_id: string | null;
178
+ method: string;
179
+ path: string;
180
+ request_body: unknown;
181
+ status: number;
182
+ response_body: unknown;
183
+ latency_ms: number;
184
+ fidelity: "semantic" | "unsupported";
185
+ state_mutation: boolean;
186
+ state_delta: {
187
+ before: Record<string, unknown> | null;
188
+ after: Record<string, unknown> | null;
189
+ } | null;
190
+ error: string | null;
191
+ kind: "TwinHttpEvent";
192
+ event_id: string;
193
+ parent_id: string | null;
194
+ correlation_id?: string | undefined;
195
+ task_step_id?: string | null | undefined;
196
+ scenario_step_id?: string | null | undefined;
197
+ idempotency_dedupe?: boolean | undefined;
198
+ } | {
199
+ kind: "LlmCallEvent";
200
+ host: string;
201
+ port: number;
202
+ latency_ms: number;
203
+ bytes_in: number;
204
+ bytes_out: number;
205
+ url: string | null;
206
+ method: string | null;
207
+ status: number | null;
208
+ model: string | null;
209
+ prompt_tokens: number | null;
210
+ completion_tokens: number | null;
211
+ cost_usd: number | null;
212
+ ts: string;
213
+ event_id: string;
214
+ parent_id: string | null;
215
+ } | {
216
+ kind: "ToolUseEvent";
217
+ tool_use_id: string;
218
+ tool_name: string;
219
+ input: unknown;
220
+ ts: string;
221
+ event_id: string;
222
+ parent_id: string | null;
223
+ } | {
224
+ kind: "ToolResultEvent";
225
+ tool_use_id: string;
226
+ output: unknown;
227
+ is_error: boolean;
228
+ ts: string;
229
+ event_id: string;
230
+ parent_id: string | null;
231
+ } | {
232
+ kind: "SubagentSpawnEvent";
233
+ parent_tool_use_id: string;
234
+ ts: string;
235
+ event_id: string;
236
+ parent_id: string | null;
237
+ } | {
238
+ kind: "HookEvent";
239
+ hook_name: string;
240
+ tool_name: string | null;
241
+ ts: string;
242
+ event_id: string;
243
+ parent_id: string | null;
244
+ }>>, z.ZodObject<{
245
+ ts: z.ZodString;
246
+ event_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
247
+ parent_id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
248
+ kind: z.ZodLiteral<"OtelSpanEvent">;
249
+ trace_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
250
+ span_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
251
+ parent_span_id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
252
+ name: z.ZodString;
253
+ span_kind: z.ZodEnum<{
254
+ UNSPECIFIED: "UNSPECIFIED";
255
+ INTERNAL: "INTERNAL";
256
+ SERVER: "SERVER";
257
+ CLIENT: "CLIENT";
258
+ PRODUCER: "PRODUCER";
259
+ CONSUMER: "CONSUMER";
260
+ }>;
261
+ start_time_unix_nano: z.ZodString;
262
+ end_time_unix_nano: z.ZodNullable<z.ZodString>;
263
+ status_code: z.ZodEnum<{
264
+ UNSET: "UNSET";
265
+ OK: "OK";
266
+ ERROR: "ERROR";
267
+ }>;
268
+ status_message: z.ZodNullable<z.ZodString>;
269
+ gen_ai_provider_name: z.ZodNullable<z.ZodString>;
270
+ gen_ai_operation_name: z.ZodNullable<z.ZodString>;
271
+ gen_ai_request_model: z.ZodNullable<z.ZodString>;
272
+ gen_ai_agent_name: z.ZodNullable<z.ZodString>;
273
+ gen_ai_agent_id: z.ZodNullable<z.ZodString>;
274
+ gen_ai_tool_name: z.ZodNullable<z.ZodString>;
275
+ gen_ai_usage_input_tokens: z.ZodNullable<z.ZodNumber>;
276
+ gen_ai_usage_output_tokens: z.ZodNullable<z.ZodNumber>;
277
+ http_request_method: z.ZodNullable<z.ZodString>;
278
+ http_response_status_code: z.ZodNullable<z.ZodNumber>;
279
+ url_full: z.ZodNullable<z.ZodString>;
280
+ url_path: z.ZodNullable<z.ZodString>;
281
+ server_address: z.ZodNullable<z.ZodString>;
282
+ server_port: z.ZodNullable<z.ZodNumber>;
283
+ error_type: z.ZodNullable<z.ZodString>;
284
+ attributes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
285
+ }, z.core.$strip>]>;
286
+ export type OtelEvent = z.infer<typeof otelEventSchema>;
@@ -0,0 +1,33 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * otel/event-schema — the OTel-inclusive event union (M1.1 / FDRS-480).
4
+ *
5
+ * `eventSchema` in `recorder-events.ts` is the FROZEN v1 legacy union (the
6
+ * recording-spec contract under the repo's change-lock policy). Rather than
7
+ * mutate that frozen union, this file composes the OTel-extended union
8
+ * ADDITIVELY — a non-breaking superset:
9
+ *
10
+ * - `eventSchema` (recorder-events.ts) — the v1 legacy-only union.
11
+ * - `otelEventSchema` (this file) — legacy variants PLUS `OtelSpanEvent`.
12
+ *
13
+ * OTel-aware consumers (M3 correlation, the native trace renderer) import
14
+ * `otelEventSchema`; readers that only handle the v1 legacy shapes keep using
15
+ * `eventSchema` and recognize `OtelSpanEvent` separately.
16
+ *
17
+ * This union is FORMAT surface and canonical HERE (ownership boundary settled
18
+ * at FDRS-653 — see `./index.ts`). pome-cloud consumes it; its earlier
19
+ * cloud-local composition of the same union collapses into this one at the
20
+ * FDRS-654 consumer swap.
21
+ */
22
+ import { z } from "zod";
23
+ import { eventSchema } from "../recorder-events.js";
24
+ import { otelSpanEventSchema } from "./span-event.js";
25
+ // The OTel-inclusive event row: the legacy `eventSchema` (a discriminated union
26
+ // over `kind`, with the FDRS-653 task-vocab normalization applied) OR an
27
+ // `OtelSpanEvent`. A plain `z.union` is used rather than extending the
28
+ // discriminated union because `otelSpanEventSchema` carries cross-field
29
+ // `superRefine` invariants (it is not a bare `ZodObject`, so it cannot be a
30
+ // discriminated-union member). For a 2-arm union this is a non-breaking
31
+ // superset: legacy rows match the first arm, OtelSpanEvent rows the second.
32
+ export const otelEventSchema = z.union([eventSchema, otelSpanEventSchema]);
33
+ //# sourceMappingURL=event-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-schema.js","sourceRoot":"","sources":["../../src/otel/event-schema.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,gFAAgF;AAChF,yEAAyE;AACzE,uEAAuE;AACvE,wEAAwE;AACxE,4EAA4E;AAC5E,wEAAwE;AACxE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * otel/fixtures/data — frozen golden-fixture corpus (M1.3 / FDRS-482).
3
+ *
4
+ * The single source of truth for trace fixtures across M1.2 and M2–M6. Static
5
+ * data, deterministic by construction, and DEEP-FROZEN on export (review
6
+ * finding #6 — exported fixtures were runtime-mutable shared state). Four
7
+ * families:
8
+ *
9
+ * - LEGACY_FIXTURES — (legacy record → expected OtelSpanEvent) pairs.
10
+ * `expected` is the FROZEN output of the M1.2 shim;
11
+ * M1.2's golden test asserts the shim reproduces it.
12
+ * - EMITTER_FIXTURES — real-emitter spans (Traceloop / Vercel AI SDK /
13
+ * Pydantic Logfire), normalized to `OtelSpanInput`
14
+ * with provenance + version metadata. M1.1 parses them.
15
+ * - TRACE_FIXTURES — multi-span sub-agent traces (parent_span_id trees).
16
+ * - EXTERNAL_API_FIXTURES — twin-relevant external-API (HTTP) spans (M4 drift).
17
+ *
18
+ * PROVENANCE NOTE (honest sourcing — `derivedFrom: "documentation-derived"`):
19
+ * the emitter fixtures are NORMALIZED `OtelSpanInput` records whose ATTRIBUTE
20
+ * KEYS are taken verbatim from each emitter's published span output (URLs +
21
+ * `sourceVersion` below); attribute VALUES are representative. They are derived
22
+ * from the emitters' documented conventions, NOT captured from a live export —
23
+ * raw OTLP-envelope capture + the AnyValue decoder are M2's scope. Each fixture
24
+ * records its source so M2 can swap in a live capture without changing keys.
25
+ */
26
+ import type { LlmCallEvent, ToolUseEvent, TwinHttpEvent } from "../../recorder-events.js";
27
+ import type { OtelSpanEvent } from "../span-event.js";
28
+ import type { OtelSpanInput } from "../map-span.js";
29
+ export type LegacyEventRecord = TwinHttpEvent | LlmCallEvent | ToolUseEvent;
30
+ export type FixtureDerivedFrom = "documentation-derived" | "pome-internal" | "otel-spec" | "live-capture";
31
+ export interface LegacyFixtureShimOptions {
32
+ run_id?: string;
33
+ }
34
+ export interface LegacyFixture {
35
+ name: string;
36
+ provenance: string;
37
+ derivedFrom: FixtureDerivedFrom;
38
+ legacy: LegacyEventRecord;
39
+ options: LegacyFixtureShimOptions;
40
+ expected: OtelSpanEvent;
41
+ }
42
+ export interface EmitterFixture {
43
+ name: string;
44
+ emitter: "traceloop" | "vercel-ai-sdk" | "pydantic-logfire";
45
+ provenance: string;
46
+ sourceVersion: string;
47
+ derivedFrom: FixtureDerivedFrom;
48
+ span: OtelSpanInput;
49
+ }
50
+ export interface TraceFixture {
51
+ name: string;
52
+ provenance: string;
53
+ derivedFrom: FixtureDerivedFrom;
54
+ spans: OtelSpanInput[];
55
+ }
56
+ export interface ExternalApiFixture {
57
+ name: string;
58
+ provenance: string;
59
+ derivedFrom: FixtureDerivedFrom;
60
+ span: OtelSpanInput;
61
+ }
62
+ export declare const LEGACY_FIXTURES: readonly LegacyFixture[];
63
+ export declare const EMITTER_FIXTURES: readonly EmitterFixture[];
64
+ export declare const TRACE_FIXTURES: readonly TraceFixture[];
65
+ export declare const EXTERNAL_API_FIXTURES: readonly ExternalApiFixture[];