@pome-sh/cli 0.1.0 → 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 (738) 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/doctor/checks.js +2 -2
  13. package/dist/src/hosted/client.d.ts +41 -5
  14. package/dist/src/hosted/client.js +333 -19
  15. package/dist/src/hosted/errors.d.ts +11 -1
  16. package/dist/src/hosted/errors.js +8 -1
  17. package/dist/src/hosted/evalResultView.d.ts +2 -0
  18. package/dist/src/hosted/evalResultView.js +22 -0
  19. package/dist/src/hosted/uploadAndFinalize.d.ts +18 -1
  20. package/dist/src/hosted/uploadAndFinalize.js +51 -3
  21. package/dist/src/recorder/inspect.js +20 -2
  22. package/dist/src/runner/mergeAdapterSignals.js +2 -2
  23. package/dist/src/runner/ports.js +3 -0
  24. package/dist/src/runner/runScenario.d.ts +79 -2
  25. package/dist/src/runner/runScenario.js +94 -36
  26. package/dist/src/runner/runScenarioHosted.d.ts +37 -0
  27. package/dist/src/runner/runScenarioHosted.js +257 -58
  28. package/dist/src/runner/runTrialGroup.d.ts +1 -3
  29. package/dist/src/runner/runTrialGroup.js +1 -3
  30. package/dist/src/scenario/parseScenario.d.ts +5 -0
  31. package/dist/src/scenario/parseScenario.js +135 -8
  32. package/dist/src/scenario/scenarioSchema.d.ts +200 -3
  33. package/dist/src/scenario/scenarioSchema.js +12 -1
  34. package/dist/src/twin/twinHarness.d.ts +10 -0
  35. package/dist/src/twin/twinHarness.js +6 -2
  36. package/dist/src/twin/twinStart.d.ts +19 -0
  37. package/dist/src/twin/twinStart.js +156 -0
  38. package/node_modules/@pome-sh/sdk/dist/db.d.ts +4 -4
  39. package/node_modules/@pome-sh/sdk/dist/db.js +93 -25
  40. package/node_modules/@pome-sh/sdk/dist/db.js.map +1 -1
  41. package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +121 -0
  42. package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +204 -0
  43. package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +1 -0
  44. package/node_modules/@pome-sh/sdk/dist/parity.d.ts +55 -0
  45. package/node_modules/@pome-sh/sdk/dist/parity.js +112 -0
  46. package/node_modules/@pome-sh/sdk/dist/parity.js.map +1 -0
  47. package/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +15 -0
  48. package/node_modules/@pome-sh/sdk/dist/server-helpers.js +96 -0
  49. package/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +1 -1
  50. package/node_modules/@pome-sh/sdk/dist/server.d.ts +1 -1
  51. package/node_modules/@pome-sh/sdk/dist/server.js +9 -7
  52. package/node_modules/@pome-sh/sdk/dist/server.js.map +1 -1
  53. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
  54. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
  55. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
  56. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.d.ts +13 -0
  57. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js +6 -0
  58. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js.map +1 -0
  59. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +215 -0
  60. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +83 -0
  61. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
  62. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +175 -0
  63. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js +182 -0
  64. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +1 -0
  65. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
  66. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
  67. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
  68. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.d.ts +27 -0
  69. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js +34 -0
  70. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -0
  71. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +286 -0
  72. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +33 -0
  73. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +1 -0
  74. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +65 -0
  75. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +455 -0
  76. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +1 -0
  77. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +39 -0
  78. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +47 -0
  79. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +1 -0
  80. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +25 -0
  81. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js +27 -0
  82. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +1 -0
  83. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +100 -0
  84. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +185 -0
  85. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -0
  86. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +64 -0
  87. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +112 -0
  88. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +1 -0
  89. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +26 -0
  90. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js +61 -0
  91. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +1 -0
  92. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +42 -0
  93. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js +96 -0
  94. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +1 -0
  95. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +51 -0
  96. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +74 -0
  97. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -0
  98. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +134 -0
  99. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +152 -0
  100. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +1 -0
  101. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +418 -0
  102. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js +234 -0
  103. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -0
  104. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +2 -0
  105. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js +152 -0
  106. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js.map +1 -0
  107. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.d.ts +198 -0
  108. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js +225 -0
  109. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
  110. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.d.ts +201 -0
  111. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js +166 -0
  112. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -0
  113. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
  114. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
  115. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
  116. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
  117. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
  118. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
  119. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +66 -0
  120. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js +84 -0
  121. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -0
  122. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.d.ts +483 -0
  123. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
  124. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
  125. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/package.json +54 -0
  126. package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/trace-contract.json +41 -0
  127. package/node_modules/@pome-sh/sdk/package.json +7 -7
  128. package/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
  129. package/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
  130. package/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
  131. package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +252 -0
  132. package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +122 -0
  133. package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
  134. package/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
  135. package/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
  136. package/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
  137. package/node_modules/@pome-sh/shared-types/dist/index.d.ts +13 -1353
  138. package/node_modules/@pome-sh/shared-types/dist/index.js +14 -568
  139. package/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
  140. package/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +45 -0
  141. package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +8 -0
  142. package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -1
  143. package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +7 -0
  144. package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -1
  145. package/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +62 -0
  146. package/node_modules/@pome-sh/shared-types/dist/recorder-events.js +36 -0
  147. package/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -1
  148. package/node_modules/@pome-sh/shared-types/dist/rest.d.ts +245 -0
  149. package/node_modules/@pome-sh/shared-types/dist/rest.js +303 -0
  150. package/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
  151. package/node_modules/@pome-sh/shared-types/dist/run.d.ts +7 -0
  152. package/node_modules/@pome-sh/shared-types/dist/run.js +4 -0
  153. package/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -1
  154. package/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +14 -0
  155. package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +46 -0
  156. package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +1 -0
  157. package/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
  158. package/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
  159. package/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
  160. package/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
  161. package/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
  162. package/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
  163. package/node_modules/@pome-sh/shared-types/dist/task.d.ts +485 -0
  164. package/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
  165. package/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
  166. package/node_modules/@pome-sh/shared-types/package.json +2 -1
  167. package/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
  168. package/node_modules/@pome-sh/twin-github/FIDELITY.md +127 -67
  169. package/node_modules/@pome-sh/twin-github/README.md +5 -8
  170. package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js +4 -20
  171. package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js.map +1 -1
  172. package/node_modules/@pome-sh/twin-github/dist/src/access-control.d.ts +3 -3
  173. package/node_modules/@pome-sh/twin-github/dist/src/domain.d.ts +141 -3
  174. package/node_modules/@pome-sh/twin-github/dist/src/domain.js +0 -0
  175. package/node_modules/@pome-sh/twin-github/dist/src/domain.js.map +1 -1
  176. package/node_modules/@pome-sh/twin-github/dist/src/routes.js +2 -0
  177. package/node_modules/@pome-sh/twin-github/dist/src/routes.js.map +1 -1
  178. package/node_modules/@pome-sh/twin-github/dist/src/seed.d.ts +1 -1
  179. package/node_modules/@pome-sh/twin-github/dist/src/serializers.d.ts +2 -2
  180. package/node_modules/@pome-sh/twin-github/dist/src/server.js +7 -6
  181. package/node_modules/@pome-sh/twin-github/dist/src/server.js.map +1 -1
  182. package/node_modules/@pome-sh/twin-github/dist/src/tools.d.ts +168 -18
  183. package/node_modules/@pome-sh/twin-github/dist/src/tools.js +23 -0
  184. package/node_modules/@pome-sh/twin-github/dist/src/tools.js.map +1 -1
  185. package/node_modules/@pome-sh/twin-github/fidelity.inventory.json +773 -0
  186. package/node_modules/@pome-sh/twin-github/package.json +5 -5
  187. package/node_modules/@pome-sh/twin-slack/FIDELITY.md +121 -35
  188. package/node_modules/@pome-sh/twin-slack/README.md +2 -6
  189. package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js +92 -0
  190. package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js.map +1 -0
  191. package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js +3 -3
  192. package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js.map +1 -1
  193. package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js +1 -1
  194. package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js.map +1 -1
  195. package/node_modules/@pome-sh/twin-slack/dist/src/server.js +7 -6
  196. package/node_modules/@pome-sh/twin-slack/dist/src/server.js.map +1 -1
  197. package/node_modules/@pome-sh/twin-slack/dist/src/tools.d.ts +30 -4
  198. package/node_modules/@pome-sh/twin-slack/dist/src/tools.js +48 -1
  199. package/node_modules/@pome-sh/twin-slack/dist/src/tools.js.map +1 -1
  200. package/node_modules/@pome-sh/twin-slack/fidelity.inventory.json +377 -0
  201. package/node_modules/@pome-sh/twin-slack/package.json +5 -5
  202. package/node_modules/@pome-sh/twin-stripe/FIDELITY.md +151 -50
  203. package/node_modules/@pome-sh/twin-stripe/README.md +44 -47
  204. package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js +186 -0
  205. package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js.map +1 -0
  206. package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js +8 -4
  207. package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js.map +1 -1
  208. package/node_modules/@pome-sh/twin-stripe/dist/src/db.js +26 -2
  209. package/node_modules/@pome-sh/twin-stripe/dist/src/db.js.map +1 -1
  210. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.d.ts +101 -0
  211. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js +195 -0
  212. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js.map +1 -0
  213. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.d.ts +15 -1
  214. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js +17 -5
  215. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js.map +1 -1
  216. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.d.ts +47 -0
  217. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js +103 -0
  218. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js.map +1 -0
  219. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.d.ts +1 -1
  220. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.js.map +1 -1
  221. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.d.ts +6 -0
  222. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js +3 -0
  223. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js.map +1 -1
  224. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.d.ts +61 -2
  225. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js +214 -52
  226. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js.map +1 -1
  227. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.d.ts +45 -0
  228. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js +159 -0
  229. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js.map +1 -0
  230. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.d.ts +6 -0
  231. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js +16 -0
  232. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js.map +1 -1
  233. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.d.ts +1 -0
  234. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js +144 -1
  235. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js.map +1 -1
  236. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.d.ts +420 -43
  237. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js +442 -13
  238. package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js.map +1 -1
  239. package/node_modules/@pome-sh/twin-stripe/dist/src/errors.d.ts +19 -0
  240. package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js +15 -1
  241. package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js.map +1 -1
  242. package/node_modules/@pome-sh/twin-stripe/dist/src/ids.d.ts +2 -0
  243. package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js +2 -0
  244. package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js.map +1 -1
  245. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.d.ts +8 -0
  246. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js +105 -1
  247. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js.map +1 -1
  248. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.d.ts +4 -0
  249. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js +117 -0
  250. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js.map +1 -0
  251. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.d.ts +4 -0
  252. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js +47 -0
  253. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js.map +1 -0
  254. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js +6 -0
  255. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js.map +1 -1
  256. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js +28 -102
  257. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js.map +1 -1
  258. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.d.ts +4 -0
  259. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js +33 -0
  260. package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js.map +1 -0
  261. package/node_modules/@pome-sh/twin-stripe/dist/src/seed.d.ts +10 -8
  262. package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js +3 -2
  263. package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js.map +1 -1
  264. package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.d.ts +181 -21
  265. package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js +257 -34
  266. package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js.map +1 -1
  267. package/node_modules/@pome-sh/twin-stripe/dist/src/server.js +7 -6
  268. package/node_modules/@pome-sh/twin-stripe/dist/src/server.js.map +1 -1
  269. package/node_modules/@pome-sh/twin-stripe/dist/src/tools.d.ts +107 -5
  270. package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js +139 -6
  271. package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js.map +1 -1
  272. package/node_modules/@pome-sh/twin-stripe/dist/src/types.d.ts +73 -0
  273. package/node_modules/@pome-sh/twin-stripe/dist/src/upstream-types.d.ts +8 -0
  274. package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js +6 -1
  275. package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js.map +1 -1
  276. package/node_modules/@pome-sh/twin-stripe/fidelity.inventory.json +425 -0
  277. package/node_modules/@pome-sh/twin-stripe/package.json +5 -5
  278. package/package.json +9 -10
  279. package/skills/pome-setup/SKILL.md +1 -1
  280. package/dist/src/recorder/verdictArtifact.d.ts +0 -71
  281. package/dist/src/recorder/verdictArtifact.js +0 -207
  282. package/dist/src/score/view.d.ts +0 -38
  283. package/dist/src/score/view.js +0 -59
  284. package/dist/src/twin/github/app.d.ts +0 -10
  285. package/dist/src/twin/github/app.js +0 -316
  286. package/dist/src/twin/github/db/migrations.d.ts +0 -2
  287. package/dist/src/twin/github/db/migrations.js +0 -64
  288. package/dist/src/twin/github/db/openDatabase.d.ts +0 -2
  289. package/dist/src/twin/github/db/openDatabase.js +0 -13
  290. package/dist/src/twin/github/db/queries.d.ts +0 -77
  291. package/dist/src/twin/github/db/queries.js +0 -93
  292. package/dist/src/twin/github/domain/seed.d.ts +0 -74
  293. package/dist/src/twin/github/domain/seed.js +0 -104
  294. package/dist/src/twin/github/domain/serializers.d.ts +0 -113
  295. package/dist/src/twin/github/domain/serializers.js +0 -76
  296. package/dist/src/twin/github/types.d.ts +0 -66
  297. package/dist/src/twin/github/types.js +0 -1
  298. package/dist/src/twin-github/app.d.ts +0 -9
  299. package/dist/src/twin-github/app.js +0 -327
  300. package/dist/src/twin-github/auth.d.ts +0 -16
  301. package/dist/src/twin-github/auth.js +0 -142
  302. package/dist/src/twin-github/build-info.d.ts +0 -7
  303. package/dist/src/twin-github/build-info.js +0 -52
  304. package/dist/src/twin-github/db.d.ts +0 -4
  305. package/dist/src/twin-github/db.js +0 -362
  306. package/dist/src/twin-github/domain.d.ts +0 -1649
  307. package/dist/src/twin-github/domain.js +0 -957
  308. package/dist/src/twin-github/errors.d.ts +0 -14
  309. package/dist/src/twin-github/errors.js +0 -34
  310. package/dist/src/twin-github/index.d.ts +0 -9
  311. package/dist/src/twin-github/index.js +0 -7
  312. package/dist/src/twin-github/mcp.d.ts +0 -17
  313. package/dist/src/twin-github/mcp.js +0 -281
  314. package/dist/src/twin-github/recorder.d.ts +0 -2
  315. package/dist/src/twin-github/recorder.js +0 -29
  316. package/dist/src/twin-github/seed.d.ts +0 -74
  317. package/dist/src/twin-github/seed.js +0 -107
  318. package/dist/src/twin-github/serializers.d.ts +0 -449
  319. package/dist/src/twin-github/serializers.js +0 -429
  320. package/dist/src/twin-github/server.js +0 -34
  321. package/dist/src/twin-github/tools.d.ts +0 -1545
  322. package/dist/src/twin-github/tools.js +0 -347
  323. package/dist/src/twin-github/types.d.ts +0 -198
  324. package/dist/src/twin-github/unsupported-envelope.d.ts +0 -10
  325. package/dist/src/twin-github/unsupported-envelope.js +0 -29
  326. package/dist/src/twin-github/util.d.ts +0 -13
  327. package/dist/src/twin-github/util.js +0 -61
  328. package/dist/src/twin-slack/app.d.ts +0 -17
  329. package/dist/src/twin-slack/app.js +0 -683
  330. package/dist/src/twin-slack/auth.d.ts +0 -38
  331. package/dist/src/twin-slack/auth.js +0 -219
  332. package/dist/src/twin-slack/build-info.d.ts +0 -7
  333. package/dist/src/twin-slack/build-info.js +0 -9
  334. package/dist/src/twin-slack/db.d.ts +0 -4
  335. package/dist/src/twin-slack/db.js +0 -213
  336. package/dist/src/twin-slack/domain.d.ts +0 -236
  337. package/dist/src/twin-slack/domain.js +0 -1293
  338. package/dist/src/twin-slack/errors.d.ts +0 -16
  339. package/dist/src/twin-slack/errors.js +0 -60
  340. package/dist/src/twin-slack/index.d.ts +0 -8
  341. package/dist/src/twin-slack/index.js +0 -8
  342. package/dist/src/twin-slack/mcp.d.ts +0 -17
  343. package/dist/src/twin-slack/mcp.js +0 -226
  344. package/dist/src/twin-slack/recorder.d.ts +0 -2
  345. package/dist/src/twin-slack/recorder.js +0 -15
  346. package/dist/src/twin-slack/seed.d.ts +0 -49
  347. package/dist/src/twin-slack/seed.js +0 -139
  348. package/dist/src/twin-slack/serializers.d.ts +0 -141
  349. package/dist/src/twin-slack/serializers.js +0 -377
  350. package/dist/src/twin-slack/tools.d.ts +0 -97
  351. package/dist/src/twin-slack/tools.js +0 -171
  352. package/dist/src/twin-slack/types.d.ts +0 -164
  353. package/dist/src/twin-slack/types.js +0 -1
  354. package/dist/src/twin-slack/unsupported-envelope.d.ts +0 -12
  355. package/dist/src/twin-slack/unsupported-envelope.js +0 -61
  356. package/dist/src/twin-slack/upstream-types.d.ts +0 -19
  357. package/dist/src/twin-slack/upstream-types.js +0 -1
  358. package/dist/src/twin-slack/util.d.ts +0 -31
  359. package/dist/src/twin-slack/util.js +0 -136
  360. package/node_modules/base64-js/LICENSE +0 -21
  361. package/node_modules/base64-js/README.md +0 -34
  362. package/node_modules/base64-js/base64js.min.js +0 -1
  363. package/node_modules/base64-js/index.d.ts +0 -3
  364. package/node_modules/base64-js/index.js +0 -150
  365. package/node_modules/base64-js/package.json +0 -47
  366. package/node_modules/better-sqlite3/LICENSE +0 -21
  367. package/node_modules/better-sqlite3/README.md +0 -99
  368. package/node_modules/better-sqlite3/binding.gyp +0 -38
  369. package/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  370. package/node_modules/better-sqlite3/deps/common.gypi +0 -68
  371. package/node_modules/better-sqlite3/deps/copy.js +0 -31
  372. package/node_modules/better-sqlite3/deps/defines.gypi +0 -42
  373. package/node_modules/better-sqlite3/deps/download.sh +0 -123
  374. package/node_modules/better-sqlite3/deps/patches/1208.patch +0 -15
  375. package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +0 -269395
  376. package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +0 -14347
  377. package/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +0 -739
  378. package/node_modules/better-sqlite3/deps/sqlite3.gyp +0 -80
  379. package/node_modules/better-sqlite3/deps/test_extension.c +0 -21
  380. package/node_modules/better-sqlite3/lib/database.js +0 -90
  381. package/node_modules/better-sqlite3/lib/index.js +0 -3
  382. package/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
  383. package/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
  384. package/node_modules/better-sqlite3/lib/methods/function.js +0 -31
  385. package/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
  386. package/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
  387. package/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
  388. package/node_modules/better-sqlite3/lib/methods/table.js +0 -189
  389. package/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
  390. package/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
  391. package/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
  392. package/node_modules/better-sqlite3/lib/util.js +0 -12
  393. package/node_modules/better-sqlite3/package.json +0 -59
  394. package/node_modules/better-sqlite3/src/addon.cpp +0 -47
  395. package/node_modules/better-sqlite3/src/better_sqlite3.cpp +0 -74
  396. package/node_modules/better-sqlite3/src/objects/backup.cpp +0 -120
  397. package/node_modules/better-sqlite3/src/objects/backup.hpp +0 -36
  398. package/node_modules/better-sqlite3/src/objects/database.cpp +0 -417
  399. package/node_modules/better-sqlite3/src/objects/database.hpp +0 -103
  400. package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +0 -113
  401. package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +0 -50
  402. package/node_modules/better-sqlite3/src/objects/statement.cpp +0 -383
  403. package/node_modules/better-sqlite3/src/objects/statement.hpp +0 -58
  404. package/node_modules/better-sqlite3/src/util/bind-map.cpp +0 -73
  405. package/node_modules/better-sqlite3/src/util/binder.cpp +0 -193
  406. package/node_modules/better-sqlite3/src/util/constants.cpp +0 -172
  407. package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +0 -121
  408. package/node_modules/better-sqlite3/src/util/custom-function.cpp +0 -59
  409. package/node_modules/better-sqlite3/src/util/custom-table.cpp +0 -409
  410. package/node_modules/better-sqlite3/src/util/data-converter.cpp +0 -17
  411. package/node_modules/better-sqlite3/src/util/data.cpp +0 -194
  412. package/node_modules/better-sqlite3/src/util/helpers.cpp +0 -109
  413. package/node_modules/better-sqlite3/src/util/macros.cpp +0 -90
  414. package/node_modules/better-sqlite3/src/util/query-macros.cpp +0 -71
  415. package/node_modules/better-sqlite3/src/util/row-builder.cpp +0 -49
  416. package/node_modules/bindings/LICENSE.md +0 -22
  417. package/node_modules/bindings/README.md +0 -98
  418. package/node_modules/bindings/bindings.js +0 -221
  419. package/node_modules/bindings/package.json +0 -28
  420. package/node_modules/bl/.travis.yml +0 -17
  421. package/node_modules/bl/BufferList.js +0 -396
  422. package/node_modules/bl/LICENSE.md +0 -13
  423. package/node_modules/bl/README.md +0 -247
  424. package/node_modules/bl/bl.js +0 -84
  425. package/node_modules/bl/package.json +0 -37
  426. package/node_modules/bl/test/convert.js +0 -21
  427. package/node_modules/bl/test/indexOf.js +0 -492
  428. package/node_modules/bl/test/isBufferList.js +0 -32
  429. package/node_modules/bl/test/test.js +0 -869
  430. package/node_modules/buffer/AUTHORS.md +0 -70
  431. package/node_modules/buffer/LICENSE +0 -21
  432. package/node_modules/buffer/README.md +0 -410
  433. package/node_modules/buffer/index.d.ts +0 -186
  434. package/node_modules/buffer/index.js +0 -1817
  435. package/node_modules/buffer/package.json +0 -96
  436. package/node_modules/chownr/LICENSE +0 -15
  437. package/node_modules/chownr/README.md +0 -3
  438. package/node_modules/chownr/chownr.js +0 -167
  439. package/node_modules/chownr/package.json +0 -29
  440. package/node_modules/decompress-response/index.d.ts +0 -22
  441. package/node_modules/decompress-response/index.js +0 -58
  442. package/node_modules/decompress-response/license +0 -9
  443. package/node_modules/decompress-response/package.json +0 -56
  444. package/node_modules/decompress-response/readme.md +0 -48
  445. package/node_modules/deep-extend/CHANGELOG.md +0 -46
  446. package/node_modules/deep-extend/LICENSE +0 -20
  447. package/node_modules/deep-extend/README.md +0 -91
  448. package/node_modules/deep-extend/index.js +0 -1
  449. package/node_modules/deep-extend/lib/deep-extend.js +0 -150
  450. package/node_modules/deep-extend/package.json +0 -62
  451. package/node_modules/detect-libc/LICENSE +0 -201
  452. package/node_modules/detect-libc/README.md +0 -163
  453. package/node_modules/detect-libc/index.d.ts +0 -14
  454. package/node_modules/detect-libc/lib/detect-libc.js +0 -313
  455. package/node_modules/detect-libc/lib/elf.js +0 -39
  456. package/node_modules/detect-libc/lib/filesystem.js +0 -51
  457. package/node_modules/detect-libc/lib/process.js +0 -24
  458. package/node_modules/detect-libc/package.json +0 -44
  459. package/node_modules/end-of-stream/LICENSE +0 -21
  460. package/node_modules/end-of-stream/README.md +0 -54
  461. package/node_modules/end-of-stream/index.js +0 -96
  462. package/node_modules/end-of-stream/package.json +0 -37
  463. package/node_modules/expand-template/.travis.yml +0 -6
  464. package/node_modules/expand-template/LICENSE +0 -21
  465. package/node_modules/expand-template/README.md +0 -43
  466. package/node_modules/expand-template/index.js +0 -26
  467. package/node_modules/expand-template/package.json +0 -29
  468. package/node_modules/expand-template/test.js +0 -67
  469. package/node_modules/file-uri-to-path/.npmignore +0 -1
  470. package/node_modules/file-uri-to-path/.travis.yml +0 -30
  471. package/node_modules/file-uri-to-path/History.md +0 -21
  472. package/node_modules/file-uri-to-path/LICENSE +0 -20
  473. package/node_modules/file-uri-to-path/README.md +0 -74
  474. package/node_modules/file-uri-to-path/index.d.ts +0 -2
  475. package/node_modules/file-uri-to-path/index.js +0 -66
  476. package/node_modules/file-uri-to-path/package.json +0 -32
  477. package/node_modules/file-uri-to-path/test/test.js +0 -24
  478. package/node_modules/file-uri-to-path/test/tests.json +0 -13
  479. package/node_modules/fs-constants/LICENSE +0 -21
  480. package/node_modules/fs-constants/README.md +0 -26
  481. package/node_modules/fs-constants/browser.js +0 -1
  482. package/node_modules/fs-constants/index.js +0 -1
  483. package/node_modules/fs-constants/package.json +0 -19
  484. package/node_modules/github-from-package/.travis.yml +0 -4
  485. package/node_modules/github-from-package/LICENSE +0 -18
  486. package/node_modules/github-from-package/example/package.json +0 -8
  487. package/node_modules/github-from-package/example/url.js +0 -3
  488. package/node_modules/github-from-package/index.js +0 -17
  489. package/node_modules/github-from-package/package.json +0 -30
  490. package/node_modules/github-from-package/readme.markdown +0 -53
  491. package/node_modules/github-from-package/test/a.json +0 -8
  492. package/node_modules/github-from-package/test/b.json +0 -5
  493. package/node_modules/github-from-package/test/c.json +0 -5
  494. package/node_modules/github-from-package/test/d.json +0 -7
  495. package/node_modules/github-from-package/test/e.json +0 -5
  496. package/node_modules/github-from-package/test/url.js +0 -19
  497. package/node_modules/ieee754/LICENSE +0 -11
  498. package/node_modules/ieee754/README.md +0 -51
  499. package/node_modules/ieee754/index.d.ts +0 -10
  500. package/node_modules/ieee754/index.js +0 -85
  501. package/node_modules/ieee754/package.json +0 -52
  502. package/node_modules/inherits/LICENSE +0 -16
  503. package/node_modules/inherits/README.md +0 -42
  504. package/node_modules/inherits/inherits.js +0 -9
  505. package/node_modules/inherits/inherits_browser.js +0 -27
  506. package/node_modules/inherits/package.json +0 -29
  507. package/node_modules/ini/LICENSE +0 -15
  508. package/node_modules/ini/README.md +0 -102
  509. package/node_modules/ini/ini.js +0 -206
  510. package/node_modules/ini/package.json +0 -33
  511. package/node_modules/mimic-response/index.d.ts +0 -17
  512. package/node_modules/mimic-response/index.js +0 -77
  513. package/node_modules/mimic-response/license +0 -9
  514. package/node_modules/mimic-response/package.json +0 -42
  515. package/node_modules/mimic-response/readme.md +0 -78
  516. package/node_modules/minimist/.eslintrc +0 -29
  517. package/node_modules/minimist/.github/FUNDING.yml +0 -12
  518. package/node_modules/minimist/.nycrc +0 -14
  519. package/node_modules/minimist/CHANGELOG.md +0 -298
  520. package/node_modules/minimist/LICENSE +0 -18
  521. package/node_modules/minimist/README.md +0 -121
  522. package/node_modules/minimist/example/parse.js +0 -4
  523. package/node_modules/minimist/index.js +0 -263
  524. package/node_modules/minimist/package.json +0 -75
  525. package/node_modules/minimist/test/all_bool.js +0 -34
  526. package/node_modules/minimist/test/bool.js +0 -177
  527. package/node_modules/minimist/test/dash.js +0 -43
  528. package/node_modules/minimist/test/default_bool.js +0 -37
  529. package/node_modules/minimist/test/dotted.js +0 -24
  530. package/node_modules/minimist/test/kv_short.js +0 -32
  531. package/node_modules/minimist/test/long.js +0 -33
  532. package/node_modules/minimist/test/num.js +0 -38
  533. package/node_modules/minimist/test/parse.js +0 -209
  534. package/node_modules/minimist/test/parse_modified.js +0 -11
  535. package/node_modules/minimist/test/proto.js +0 -64
  536. package/node_modules/minimist/test/short.js +0 -69
  537. package/node_modules/minimist/test/stop_early.js +0 -17
  538. package/node_modules/minimist/test/unknown.js +0 -104
  539. package/node_modules/minimist/test/whitespace.js +0 -10
  540. package/node_modules/mkdirp-classic/LICENSE +0 -21
  541. package/node_modules/mkdirp-classic/README.md +0 -18
  542. package/node_modules/mkdirp-classic/index.js +0 -98
  543. package/node_modules/mkdirp-classic/package.json +0 -18
  544. package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +0 -31
  545. package/node_modules/napi-build-utils/LICENSE +0 -21
  546. package/node_modules/napi-build-utils/README.md +0 -52
  547. package/node_modules/napi-build-utils/index.js +0 -214
  548. package/node_modules/napi-build-utils/index.md +0 -0
  549. package/node_modules/napi-build-utils/package.json +0 -42
  550. package/node_modules/node-abi/LICENSE +0 -21
  551. package/node_modules/node-abi/README.md +0 -54
  552. package/node_modules/node-abi/abi_registry.json +0 -453
  553. package/node_modules/node-abi/index.js +0 -179
  554. package/node_modules/node-abi/package.json +0 -45
  555. package/node_modules/once/LICENSE +0 -15
  556. package/node_modules/once/README.md +0 -79
  557. package/node_modules/once/once.js +0 -42
  558. package/node_modules/once/package.json +0 -33
  559. package/node_modules/prebuild-install/CHANGELOG.md +0 -131
  560. package/node_modules/prebuild-install/CONTRIBUTING.md +0 -6
  561. package/node_modules/prebuild-install/LICENSE +0 -21
  562. package/node_modules/prebuild-install/README.md +0 -163
  563. package/node_modules/prebuild-install/asset.js +0 -44
  564. package/node_modules/prebuild-install/bin.js +0 -78
  565. package/node_modules/prebuild-install/download.js +0 -142
  566. package/node_modules/prebuild-install/error.js +0 -14
  567. package/node_modules/prebuild-install/help.txt +0 -16
  568. package/node_modules/prebuild-install/index.js +0 -1
  569. package/node_modules/prebuild-install/log.js +0 -33
  570. package/node_modules/prebuild-install/package.json +0 -67
  571. package/node_modules/prebuild-install/proxy.js +0 -35
  572. package/node_modules/prebuild-install/rc.js +0 -64
  573. package/node_modules/prebuild-install/util.js +0 -143
  574. package/node_modules/pump/.github/FUNDING.yml +0 -2
  575. package/node_modules/pump/.travis.yml +0 -5
  576. package/node_modules/pump/LICENSE +0 -21
  577. package/node_modules/pump/README.md +0 -74
  578. package/node_modules/pump/SECURITY.md +0 -5
  579. package/node_modules/pump/empty.js +0 -1
  580. package/node_modules/pump/index.js +0 -86
  581. package/node_modules/pump/package.json +0 -30
  582. package/node_modules/pump/test-browser.js +0 -66
  583. package/node_modules/pump/test-node.js +0 -53
  584. package/node_modules/rc/LICENSE.APACHE2 +0 -15
  585. package/node_modules/rc/LICENSE.BSD +0 -26
  586. package/node_modules/rc/LICENSE.MIT +0 -24
  587. package/node_modules/rc/README.md +0 -227
  588. package/node_modules/rc/browser.js +0 -7
  589. package/node_modules/rc/cli.js +0 -4
  590. package/node_modules/rc/index.js +0 -53
  591. package/node_modules/rc/lib/utils.js +0 -104
  592. package/node_modules/rc/package.json +0 -29
  593. package/node_modules/rc/test/ini.js +0 -16
  594. package/node_modules/rc/test/nested-env-vars.js +0 -50
  595. package/node_modules/rc/test/test.js +0 -59
  596. package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  597. package/node_modules/readable-stream/GOVERNANCE.md +0 -136
  598. package/node_modules/readable-stream/LICENSE +0 -47
  599. package/node_modules/readable-stream/README.md +0 -106
  600. package/node_modules/readable-stream/errors-browser.js +0 -127
  601. package/node_modules/readable-stream/errors.js +0 -116
  602. package/node_modules/readable-stream/experimentalWarning.js +0 -17
  603. package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
  604. package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
  605. package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
  606. package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
  607. package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
  608. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
  609. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
  610. package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
  611. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
  612. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
  613. package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
  614. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
  615. package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
  616. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  617. package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  618. package/node_modules/readable-stream/package.json +0 -68
  619. package/node_modules/readable-stream/readable-browser.js +0 -9
  620. package/node_modules/readable-stream/readable.js +0 -16
  621. package/node_modules/safe-buffer/LICENSE +0 -21
  622. package/node_modules/safe-buffer/README.md +0 -584
  623. package/node_modules/safe-buffer/index.d.ts +0 -187
  624. package/node_modules/safe-buffer/index.js +0 -65
  625. package/node_modules/safe-buffer/package.json +0 -51
  626. package/node_modules/semver/LICENSE +0 -15
  627. package/node_modules/semver/README.md +0 -680
  628. package/node_modules/semver/bin/semver.js +0 -195
  629. package/node_modules/semver/classes/comparator.js +0 -143
  630. package/node_modules/semver/classes/index.js +0 -7
  631. package/node_modules/semver/classes/range.js +0 -577
  632. package/node_modules/semver/classes/semver.js +0 -350
  633. package/node_modules/semver/functions/clean.js +0 -8
  634. package/node_modules/semver/functions/cmp.js +0 -54
  635. package/node_modules/semver/functions/coerce.js +0 -62
  636. package/node_modules/semver/functions/compare-build.js +0 -9
  637. package/node_modules/semver/functions/compare-loose.js +0 -5
  638. package/node_modules/semver/functions/compare.js +0 -7
  639. package/node_modules/semver/functions/diff.js +0 -60
  640. package/node_modules/semver/functions/eq.js +0 -5
  641. package/node_modules/semver/functions/gt.js +0 -5
  642. package/node_modules/semver/functions/gte.js +0 -5
  643. package/node_modules/semver/functions/inc.js +0 -21
  644. package/node_modules/semver/functions/lt.js +0 -5
  645. package/node_modules/semver/functions/lte.js +0 -5
  646. package/node_modules/semver/functions/major.js +0 -5
  647. package/node_modules/semver/functions/minor.js +0 -5
  648. package/node_modules/semver/functions/neq.js +0 -5
  649. package/node_modules/semver/functions/parse.js +0 -18
  650. package/node_modules/semver/functions/patch.js +0 -5
  651. package/node_modules/semver/functions/prerelease.js +0 -8
  652. package/node_modules/semver/functions/rcompare.js +0 -5
  653. package/node_modules/semver/functions/rsort.js +0 -5
  654. package/node_modules/semver/functions/satisfies.js +0 -12
  655. package/node_modules/semver/functions/sort.js +0 -5
  656. package/node_modules/semver/functions/truncate.js +0 -48
  657. package/node_modules/semver/functions/valid.js +0 -8
  658. package/node_modules/semver/index.js +0 -93
  659. package/node_modules/semver/internal/constants.js +0 -37
  660. package/node_modules/semver/internal/debug.js +0 -11
  661. package/node_modules/semver/internal/identifiers.js +0 -29
  662. package/node_modules/semver/internal/lrucache.js +0 -42
  663. package/node_modules/semver/internal/parse-options.js +0 -17
  664. package/node_modules/semver/internal/re.js +0 -223
  665. package/node_modules/semver/package.json +0 -78
  666. package/node_modules/semver/preload.js +0 -4
  667. package/node_modules/semver/range.bnf +0 -17
  668. package/node_modules/semver/ranges/gtr.js +0 -6
  669. package/node_modules/semver/ranges/intersects.js +0 -9
  670. package/node_modules/semver/ranges/ltr.js +0 -6
  671. package/node_modules/semver/ranges/max-satisfying.js +0 -27
  672. package/node_modules/semver/ranges/min-satisfying.js +0 -26
  673. package/node_modules/semver/ranges/min-version.js +0 -63
  674. package/node_modules/semver/ranges/outside.js +0 -82
  675. package/node_modules/semver/ranges/simplify.js +0 -49
  676. package/node_modules/semver/ranges/subset.js +0 -249
  677. package/node_modules/semver/ranges/to-comparators.js +0 -10
  678. package/node_modules/semver/ranges/valid.js +0 -13
  679. package/node_modules/simple-concat/.travis.yml +0 -3
  680. package/node_modules/simple-concat/LICENSE +0 -20
  681. package/node_modules/simple-concat/README.md +0 -44
  682. package/node_modules/simple-concat/index.js +0 -15
  683. package/node_modules/simple-concat/package.json +0 -47
  684. package/node_modules/simple-concat/test/basic.js +0 -41
  685. package/node_modules/simple-get/.github/dependabot.yml +0 -15
  686. package/node_modules/simple-get/.github/workflows/ci.yml +0 -23
  687. package/node_modules/simple-get/LICENSE +0 -20
  688. package/node_modules/simple-get/README.md +0 -333
  689. package/node_modules/simple-get/index.js +0 -108
  690. package/node_modules/simple-get/package.json +0 -67
  691. package/node_modules/string_decoder/LICENSE +0 -48
  692. package/node_modules/string_decoder/README.md +0 -47
  693. package/node_modules/string_decoder/lib/string_decoder.js +0 -296
  694. package/node_modules/string_decoder/package.json +0 -34
  695. package/node_modules/strip-json-comments/index.js +0 -70
  696. package/node_modules/strip-json-comments/license +0 -21
  697. package/node_modules/strip-json-comments/package.json +0 -42
  698. package/node_modules/strip-json-comments/readme.md +0 -64
  699. package/node_modules/tar-fs/.travis.yml +0 -6
  700. package/node_modules/tar-fs/LICENSE +0 -21
  701. package/node_modules/tar-fs/README.md +0 -165
  702. package/node_modules/tar-fs/index.js +0 -392
  703. package/node_modules/tar-fs/package.json +0 -46
  704. package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
  705. package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
  706. package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
  707. package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
  708. package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
  709. package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
  710. package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
  711. package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
  712. package/node_modules/tar-fs/test/fixtures/e/file +0 -0
  713. package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
  714. package/node_modules/tar-fs/test/index.js +0 -457
  715. package/node_modules/tar-stream/LICENSE +0 -21
  716. package/node_modules/tar-stream/README.md +0 -168
  717. package/node_modules/tar-stream/extract.js +0 -257
  718. package/node_modules/tar-stream/headers.js +0 -295
  719. package/node_modules/tar-stream/index.js +0 -2
  720. package/node_modules/tar-stream/pack.js +0 -255
  721. package/node_modules/tar-stream/package.json +0 -58
  722. package/node_modules/tar-stream/sandbox.js +0 -11
  723. package/node_modules/tunnel-agent/LICENSE +0 -55
  724. package/node_modules/tunnel-agent/README.md +0 -4
  725. package/node_modules/tunnel-agent/index.js +0 -244
  726. package/node_modules/tunnel-agent/package.json +0 -22
  727. package/node_modules/util-deprecate/History.md +0 -16
  728. package/node_modules/util-deprecate/LICENSE +0 -24
  729. package/node_modules/util-deprecate/README.md +0 -53
  730. package/node_modules/util-deprecate/browser.js +0 -67
  731. package/node_modules/util-deprecate/node.js +0 -6
  732. package/node_modules/util-deprecate/package.json +0 -27
  733. package/node_modules/wrappy/LICENSE +0 -15
  734. package/node_modules/wrappy/README.md +0 -36
  735. package/node_modules/wrappy/package.json +0 -29
  736. package/node_modules/wrappy/wrappy.js +0 -33
  737. /package/{dist/src/twin-github/server.d.ts → node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.d.ts} +0 -0
  738. /package/{dist/src/twin-github/types.js → node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.d.ts} +0 -0
@@ -0,0 +1,303 @@
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
+ // Multi-twin (M3): multi-twin arrays are now honored — the cloud provisions
29
+ // one isolated sandbox per twin. Max 3 twins per session; the cap is
30
+ // enforced cloud-side, so we deliberately do NOT add a `.max()` here (the
31
+ // boundary stays permissive and the cloud owns the quota rule). `twins[0]`
32
+ // is the session's primary twin — the default attribution for criteria and
33
+ // state that omit an explicit twin.
34
+ //
35
+ // Back-compat (the whole M3 contract): a single-twin `twins` array plus none
36
+ // of the new optional fields below is byte-identical to pre-M3 behavior, so
37
+ // (old CLI × new cloud) is unchanged. (new CLI × old cloud) with >1 twin is
38
+ // rejected by the cloud with 422 `multi_twin_unsupported`; a single-twin
39
+ // request degrades gracefully because every new field is optional and
40
+ // non-strict readers strip unknown keys rather than erroring.
41
+ twins: z.array(z.string()).min(1).default(["github"]),
42
+ task_source: z.string().optional(), // base64-encoded UTF-8 markdown; 0.3.0 alias: scenario_source
43
+ task_id: z.string().optional(), // alternative: stored task; 0.3.0 alias: scenario_id
44
+ // FDRS-580 / ADR-015 (adopted from pome-cloud, FDRS-613): the seed override
45
+ // is a PERMISSIVE, shape-blind boundary. The twin pod's own `parseSeed` is
46
+ // the sole authority on the seed's domain shape; the cloud forwards it
47
+ // verbatim. `z.record` keeps the one invariant that is the boundary's
48
+ // business — "the seed is a JSON object" — while forwarding every domain
49
+ // field, known or not, untouched. Do NOT re-narrow to `seedStateSchema`
50
+ // here: a narrow `.object()` strips unknown keys, which is how PR-based
51
+ // scenarios lost their `users` / `pull_requests` / `files`.
52
+ seed: z.record(z.string(), z.unknown()).optional(), // optional override
53
+ // M3: client-supplied UUID v4 used for 30s server-side dedupe of
54
+ // POST /v1/sessions. The dashboard generates one per Start-button click;
55
+ // legacy clients work without it.
56
+ idempotency_key: z.string().uuid().optional(),
57
+ // M3 / FDRS-636: client-minted trial-group identity — `pome run -n k`
58
+ // (and `pome demo`) stamp one id per invocation, shared by all k trial
59
+ // sessions. The cloud copies it onto sessions.group_id at mint and onto
60
+ // runs.group_id at finalize; the demo/eval mints already accept the same
61
+ // field. Format mirrors the cloud's GROUP_ID_RE. Legacy clients omit it.
62
+ group_id: z.string().regex(/^[A-Za-z0-9_-]{6,64}$/).optional(),
63
+ })
64
+ .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)" });
65
+ // Tolerant reader (FDRS-653): accepts both vocabularies, normalizes to task_*.
66
+ export const createSessionRequestSchema = z.preprocess(normalizeTaskVocabKeys, createSessionRequestObjectSchema);
67
+ function normalizeCreateSessionResponse(value) {
68
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
69
+ return value;
70
+ }
71
+ const record = value;
72
+ if (typeof record.session_id !== "string" ||
73
+ typeof record.twin_url !== "string" ||
74
+ typeof record.openapi_url !== "string") {
75
+ return value;
76
+ }
77
+ let twin = "github";
78
+ try {
79
+ const [, parsedTwin] = new URL(record.twin_url).pathname.split("/");
80
+ if (parsedTwin !== undefined && parsedTwin.length > 0)
81
+ twin = parsedTwin;
82
+ }
83
+ catch {
84
+ // Schema validation below will report the invalid URL.
85
+ }
86
+ const apiUrl = record.twin_url;
87
+ const mcpUrl = typeof apiUrl === "string" && apiUrl.startsWith("https://api.pome.sh/")
88
+ ? apiUrl.replace("https://api.pome.sh/", "https://mcp.pome.sh/")
89
+ : apiUrl;
90
+ return {
91
+ ...record,
92
+ session_token: record.session_token ?? record.session_id,
93
+ per_twin: record.per_twin ??
94
+ {
95
+ [twin]: {
96
+ api_url: apiUrl,
97
+ mcp_url: mcpUrl,
98
+ openapi_url: record.openapi_url,
99
+ },
100
+ },
101
+ };
102
+ }
103
+ // M3 response shape: one session, N twins, one set of URLs per twin under
104
+ // `per_twin{}`. Legacy single-twin fields `twin_url` + `openapi_url` continue
105
+ // to be populated as `per_twin[twins[0]].api_url` / `.openapi_url` for ≥1 OSS
106
+ // CLI release. `session_token` is the public token used in URLs — same value as
107
+ // `session_id` in V1, but named separately so URL-shaped consumers stop reading
108
+ // internal-id-shaped fields. Both `session_token` and `per_twin` reconciled
109
+ // from pome-cloud /v1 wire truth (FDRS-613).
110
+ export const createSessionResponseSchema = z.preprocess(normalizeCreateSessionResponse, z.object({
111
+ session_id: z.string(),
112
+ session_token: z.string(), // = session_id in V1; public URL token
113
+ twin_url: z.string().url(), // legacy: = per_twin[twins[0]].api_url
114
+ expires_at: z.string().datetime(),
115
+ agent_token: z.string(), // edt_<jwt>; SENSITIVE — never log; CLI memory only; bearer scoped to session TTL
116
+ provider_credentials: z
117
+ .object({
118
+ github: z
119
+ .object({
120
+ token: z.string(),
121
+ header: z.literal("Authorization"),
122
+ scheme: z.literal("Bearer"),
123
+ })
124
+ .optional(),
125
+ stripe: z
126
+ .object({
127
+ api_key: z.string(),
128
+ header: z.literal("Authorization"),
129
+ scheme: z.literal("Bearer"),
130
+ })
131
+ .optional(),
132
+ slack: z
133
+ .object({
134
+ token: z.string(),
135
+ header: z.literal("Authorization"),
136
+ scheme: z.literal("Bearer"),
137
+ })
138
+ .optional(),
139
+ })
140
+ .default({}),
141
+ openapi_url: z.string().url(), // legacy: = per_twin[twins[0]].openapi_url
142
+ per_twin: z.record(z.string(), z.object({
143
+ api_url: z.string().url(), // api.pome.sh/<twin>/<session_token>
144
+ mcp_url: z.string().url(), // mcp.pome.sh/<twin>/<session_token> (501 stub in V1)
145
+ openapi_url: z.string().url(),
146
+ })),
147
+ }));
148
+ // POST /v1/sessions/{id}/result — SYNCHRONOUS. CLI scores locally (BYOK Flavor #1) then POSTs.
149
+ //
150
+ // Cloud never sees the customer's LLM key, never invokes any LLM provider,
151
+ // never holds `agent_stdout` (which would contain the agent's prompts and
152
+ // completions). Trace blobs (twin's HTTP request/response captures) ARE
153
+ // uploaded — those are the agent's tool calls against the twin, not LLM data.
154
+ //
155
+ // (Cloud-side note: cloud V1 treats /result as a legacy shim — new CLIs upload
156
+ // blobs via presigned URLs and call /finalize with ADR-013's managed judge.
157
+ // The shape below stays the wire contract either way.)
158
+ //
159
+ // Multi-twin (M3): per-twin state storage keys, keyed by twin id. Each entry
160
+ // carries the storage KEYS (not URLs) the CLI uploaded that twin's initial /
161
+ // final state blobs to. One entry per twin the session provisioned. Single-twin
162
+ // sessions omit this and keep using the flat top-level state fields. Additive:
163
+ // an older cloud that does not read this field strips it and scores the primary
164
+ // twin unchanged. Consumed by `finalizeRequestSchema` (finalize-shapes.ts) — the
165
+ // LIVE scoring wire — as the optional `per_twin_state_keys` field; defined here
166
+ // alongside the other §4 state-storage-key shapes.
167
+ export const perTwinStateKeysSchema = z.record(z.string(), z
168
+ .object({
169
+ state_initial_key: z.string().min(1).optional(),
170
+ state_final_key: z.string().min(1).optional(),
171
+ })
172
+ // A twin entry must carry AT LEAST ONE storage key — an empty `{}` conveys
173
+ // nothing and is almost always a serialization bug. Both keys stay
174
+ // individually optional: final-only is legal (initial state is optional in
175
+ // the single-twin contract too — `state_initial_json_b64` can be an empty
176
+ // snapshot), and initial-only is legal symmetrically.
177
+ .refine((v) => v.state_initial_key !== undefined || v.state_final_key !== undefined, { message: "Each twin entry must carry at least one of state_initial_key or state_final_key" }));
178
+ // W3 vocab (FDRS-653): `task_name` / `task_hash` canonical; the exported
179
+ // schema accepts 0.3.0 CLIs' `scenario_name` / `scenario_hash` and criterion
180
+ // kinds D/P inside `criteria_results`, normalizing both.
181
+ const submitResultRequestObjectSchema = z.object({
182
+ task_name: z.string(), // 0.3.0 alias: scenario_name
183
+ task_hash: z.string(), // 0.3.0 alias: scenario_hash
184
+ duration_ms: z.number().int(),
185
+ agent_model: z.string(),
186
+ // CLI-computed scoring fields (server-trusted; under BYOK there's nothing
187
+ // billing-sensitive to spoof — we don't bill on judge cost):
188
+ satisfaction_score: z.number().int().min(0).max(100),
189
+ criteria_results: z.array(criterionResultSchema),
190
+ judge_model: judgeModelSchema,
191
+ judge_tokens_in: z.number().int().min(0).nullable(),
192
+ judge_tokens_out: z.number().int().min(0).nullable(),
193
+ // Correlator output + fix-prompt from CLI (post-M3i). Defaults supplied for
194
+ // backward compat during the M3i rollout — older CLIs that omit these still
195
+ // submit successfully and the run lands as a "legacy" row (empty lanes/steps,
196
+ // null fix_prompt). When all CLIs are M3i+, tighten by removing defaults.
197
+ lanes: z.array(laneSchema).default([]),
198
+ steps: z.array(stepSchema).default([]),
199
+ fix_prompt: z.string().nullable().default(null),
200
+ // FDRS-357 (adopted from pome-cloud, FDRS-613): storage key (NOT URL) returned
201
+ // by POST /v1/sessions/:id/result-upload-url. Null on upload failure
202
+ // (best-effort), --no-upload opt-out, or pre-FDRS-357 CLI.
203
+ events_jsonl_url: z.string().nullable().default(null),
204
+ // Trace blobs — safe to upload (HTTP between agent and twin, not LLM prompts):
205
+ trace_jsonl_b64: z.string(),
206
+ state_initial_json_b64: z.string(),
207
+ state_final_json_b64: z.string(),
208
+ // NOTE: agent_stdout is intentionally NOT in this request. Cloud never
209
+ // receives the agent's prompts or completions. The CLI uses agent_stdout
210
+ // locally for the [model] judge then discards it.
211
+ });
212
+ // Tolerant reader (FDRS-653): accepts both vocabularies, normalizes to task_*.
213
+ export const submitResultRequestSchema = z.preprocess(normalizeTaskVocabKeys, submitResultRequestObjectSchema);
214
+ export const submitResultResponseSchema = z.object({
215
+ run_id: z.string(),
216
+ dashboard_url: z.string().url(),
217
+ });
218
+ // POST /v1/eval-sessions — mints a twin-less session for `pome eval <run-dir>`.
219
+ export const createEvalSessionResponseSchema = z.object({
220
+ session_id: z.string(),
221
+ expires_at: z.string(),
222
+ });
223
+ export const criterionDefSchema = z.object({
224
+ id: z.string().min(1),
225
+ text: z.string().min(1),
226
+ kind: z.enum(["D", "P"]),
227
+ // Multi-twin (M3): the twin a [D:<twin>]/[P:<twin>] scenario criterion
228
+ // attributes to. Absent = the session's primary twin (twins[0]). Additive —
229
+ // single-twin scenarios omit it and score against the sole twin as before.
230
+ twin: z.string().min(1).optional(),
231
+ });
232
+ // POST /v1/agents — register an agent (vercel-link shape). The server is
233
+ // canonical for the slug; the CLI persists whatever id/slug it returns.
234
+ export const createAgentRequestSchema = z.object({
235
+ name: z.string().min(1),
236
+ // Multi-twin (M3): the twins this agent is allowed to exercise. Absent = the
237
+ // server's default enablement. The cloud intersects a session's requested
238
+ // twins with the agent's enabled services. Additive; older clients omit it.
239
+ twins: z.array(z.string()).min(1).optional(),
240
+ });
241
+ // POST /v1/agents response. Not `.strict()`: the cloud may emit additive fields
242
+ // that older/newer CLIs strip rather than reject (tolerant reader).
243
+ export const agentResponseSchema = z.object({
244
+ id: z.string(), // agt_<nanoid>
245
+ slug: z.string(),
246
+ display_name: z.string(),
247
+ judge_model: z.string(),
248
+ // Multi-twin (M3): the services (twins) this agent may exercise. Absent on an
249
+ // older cloud; new CLIs treat absence as "unconstrained / server default".
250
+ enabled_services: z.array(z.string()).optional(),
251
+ });
252
+ // POST /v1/sessions/:id/state-upload-url response — a presigned PUT URL + the
253
+ // storage KEY (not a URL) for each of the initial and final state blobs. Mirrors
254
+ // the sibling *-upload-url routes' `{ url, key }` entry, but returns the
255
+ // initial/final pair in a single call.
256
+ export const stateUploadUrlEntrySchema = z.object({
257
+ url: z.string().url(),
258
+ key: z.string().min(1),
259
+ });
260
+ export const stateUploadUrlResponseSchema = z.object({
261
+ state_initial: stateUploadUrlEntrySchema,
262
+ state_final: stateUploadUrlEntrySchema,
263
+ // Multi-twin (M3): one initial/final URL+key pair per twin, keyed by twin id,
264
+ // so each twin's state blobs land under its own storage prefix. Absent on
265
+ // single-twin sessions and on an older cloud, where the top-level pair is
266
+ // authoritative (new CLI × old cloud degrades gracefully).
267
+ per_twin: z
268
+ .record(z.string(), z.object({
269
+ state_initial: stateUploadUrlEntrySchema,
270
+ state_final: stateUploadUrlEntrySchema,
271
+ }))
272
+ .optional(),
273
+ });
274
+ // GET /v1/usage — live concurrent-session quota snapshot.
275
+ // FDRS-613: `sessions_remaining` tightened to `.int().min(0)` to match the
276
+ // pome-cloud /v1 wire truth (cloud clamps remaining at 0 rather than exposing
277
+ // negative overage on this live snapshot).
278
+ export const usageResponseSchema = z.object({
279
+ period_start: z.string().datetime(),
280
+ period_end: z.string().datetime(),
281
+ sessions_used: z.number().int().min(0),
282
+ sessions_quota: z.number().int().min(0),
283
+ sessions_remaining: z.number().int().min(0),
284
+ plan_tier: planTierSchema,
285
+ });
286
+ // POST /v1/teams/{id}/invites
287
+ export const createInviteRequestSchema = z.object({
288
+ email: z.string().email(),
289
+ role: teamRoleSchema.default("member"),
290
+ });
291
+ export const createInviteResponseSchema = z.object({
292
+ invite: teamInviteSchema,
293
+ invite_url: z.string().url(), // "https://pome.sh/invites/<token>"
294
+ });
295
+ // POST /v1/invites/{token}/accept (cloud surface: dashboard tRPC invites.accept)
296
+ export const acceptInviteRequestSchema = z.object({
297
+ token: z.string().min(16),
298
+ });
299
+ export const acceptInviteResponseSchema = z.object({
300
+ team_id: z.string(),
301
+ role: teamRoleSchema,
302
+ });
303
+ //# 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,IAAI,EAAE,CAAC;IAChD,IAAI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,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACzB,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC;CACvC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,gBAAgB;IACxB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAiB,oCAAoC;CAClF,CAAC,CAAC;AAGH,iFAAiF;AACjF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;CAC1B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,cAAc;CACrB,CAAC,CAAC"}
@@ -35,6 +35,7 @@ export declare const criterionSchema: z.ZodObject<{
35
35
  P: "P";
36
36
  }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
37
37
  text: z.ZodString;
38
+ twin: z.ZodOptional<z.ZodString>;
38
39
  }, z.core.$strip>;
39
40
  export type Criterion = z.infer<typeof criterionSchema>;
40
41
  export declare const deterministicCriterionResultSchema: z.ZodObject<{
@@ -46,6 +47,7 @@ export declare const deterministicCriterionResultSchema: z.ZodObject<{
46
47
  P: "P";
47
48
  }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
48
49
  text: z.ZodString;
50
+ twin: z.ZodOptional<z.ZodString>;
49
51
  }, z.core.$strip>;
50
52
  passed: z.ZodBoolean;
51
53
  skipped: z.ZodBoolean;
@@ -61,6 +63,7 @@ export declare const probabilisticCriterionResultSchema: z.ZodObject<{
61
63
  P: "P";
62
64
  }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
63
65
  text: z.ZodString;
66
+ twin: z.ZodOptional<z.ZodString>;
64
67
  }, z.core.$strip>;
65
68
  passed: z.ZodBoolean;
66
69
  skipped: z.ZodBoolean;
@@ -78,6 +81,7 @@ export declare const criterionResultSchema: z.ZodUnion<readonly [z.ZodObject<{
78
81
  P: "P";
79
82
  }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
80
83
  text: z.ZodString;
84
+ twin: z.ZodOptional<z.ZodString>;
81
85
  }, z.core.$strip>;
82
86
  passed: z.ZodBoolean;
83
87
  skipped: z.ZodBoolean;
@@ -93,6 +97,7 @@ export declare const criterionResultSchema: z.ZodUnion<readonly [z.ZodObject<{
93
97
  P: "P";
94
98
  }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
95
99
  text: z.ZodString;
100
+ twin: z.ZodOptional<z.ZodString>;
96
101
  }, z.core.$strip>;
97
102
  passed: z.ZodBoolean;
98
103
  skipped: z.ZodBoolean;
@@ -131,6 +136,7 @@ export declare const runSchema: z.ZodPreprocess<z.ZodObject<{
131
136
  P: "P";
132
137
  }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
133
138
  text: z.ZodString;
139
+ twin: z.ZodOptional<z.ZodString>;
134
140
  }, z.core.$strip>;
135
141
  passed: z.ZodBoolean;
136
142
  skipped: z.ZodBoolean;
@@ -146,6 +152,7 @@ export declare const runSchema: z.ZodPreprocess<z.ZodObject<{
146
152
  P: "P";
147
153
  }>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
148
154
  text: z.ZodString;
155
+ twin: z.ZodOptional<z.ZodString>;
149
156
  }, z.core.$strip>;
150
157
  passed: z.ZodBoolean;
151
158
  skipped: z.ZodBoolean;
@@ -44,6 +44,10 @@ export const criterionSchema = z.object({
44
44
  // Accepts D | P | code | model; parsed output is always code | model.
45
45
  type: criterionKindInputSchema,
46
46
  text: z.string().min(1),
47
+ // Multi-twin (M3): the twin this criterion attributes to. Rides through the
48
+ // D/P→code/model transform above untouched. Absent = the run's primary twin
49
+ // (the session's twins[0]). Additive — single-twin runs omit it.
50
+ twin: z.string().min(1).optional(),
47
51
  });
48
52
  // CriterionResult shape matches OSS evaluator's emit. The full Criterion is
49
53
  // included by reference (not just text) so consumers render type-aware UI
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEpF,gFAAgF;AAChF,8EAA8E;AAC9E,qDAAqD;AACrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAGlD,6EAA6E;AAC7E,6EAA6E;AAC7E,+CAA+C;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IACzC,WAAW;IACX,cAAc;IACd,cAAc;CACf,CAAC,CAAC;AAGH,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,4EAA4E;AAC5E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAG3D,0DAA0D;AAC1D,gDAAgD;AAChD,MAAM,wBAAwB,GAAG,CAAC;KAC/B,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KACjC,SAAS,CAAC,CAAC,IAAI,EAAiB,EAAE,C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IAC1E,uEAAuE;IACvE,0EAA0E;IAC1E,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACrD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEH,0EAA0E;AAC1E,8EAA8E;AAC9E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,UAAU,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ export declare const seedEnvelopeSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3
+ export type SeedEnvelope = z.infer<typeof seedEnvelopeSchema>;
4
+ /**
5
+ * THE RULE, in code: a session's `seed` is a per-twin envelope iff the session
6
+ * has more than one twin. Decide from the `twins` array alone — never by
7
+ * sniffing the seed's shape.
8
+ *
9
+ * This is the shared PREDICATE, not the enforcement point. The actual
10
+ * envelope-iff-multi-twin check runs at the edges that know `twins`: the cloud
11
+ * at session create and the CLI at scenario parse time (follow-up PRs). The
12
+ * create-session request schema stays a shape-blind pass-through by design.
13
+ */
14
+ export declare function isMultiTwinSeedEnvelope(twins: string[]): boolean;
@@ -0,0 +1,46 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // shared-types §3 — multi-twin seed envelope. Re-exported through the
4
+ // `@pome-sh/shared-types` barrel (index.ts).
5
+ //
6
+ // THE RULE (no shape-sniffing anywhere): the create-session `seed` override is a
7
+ // per-twin envelope `{ <twin>: <flat seed> }` IF AND ONLY IF the session has
8
+ // more than one twin. Single-twin sessions ALWAYS use the flat single-twin seed
9
+ // shape (the domain seed object the twin's own `parseSeed` owns — see
10
+ // createSessionRequestSchema.seed). Callers decide which shape to send from the
11
+ // session's `twins` array alone (`isMultiTwinSeedEnvelope`), never by inspecting
12
+ // the seed's contents. This keeps the boundary shape-blind: a flat seed and an
13
+ // envelope are both JSON objects, so sniffing would be ambiguous and brittle.
14
+ import { z } from "zod";
15
+ // Multi-twin (M3) seed envelope: twin id → that twin's flat domain seed. Like
16
+ // createSessionRequestSchema.seed, each per-twin seed is a permissive,
17
+ // shape-blind JSON object — the twin pod's `parseSeed` is the sole authority on
18
+ // its domain shape. The envelope keeps only the two invariants that are the
19
+ // boundary's business: the envelope is a JSON object, and each value is a JSON
20
+ // object.
21
+ //
22
+ // WHERE THE ENVELOPE-IFF-MULTI-TWIN RULE IS ENFORCED (not here): this schema and
23
+ // createSessionRequestSchema.seed are deliberately shape-blind — the request
24
+ // boundary accepts any JSON-object `seed` for both single- and multi-twin
25
+ // sessions and forwards it verbatim. The correlation between the `seed` shape and
26
+ // `twins.length` is validated at the EDGES, where the `twins` array is known:
27
+ // - the cloud validates envelope-iff-multi-twin at session create; and
28
+ // - the CLI validates it at scenario parse time
29
+ // (both landing in follow-up PRs). Do NOT add that cross-field check to the
30
+ // request schema — the twin owns its seed shape, and sniffing here would be the
31
+ // ambiguous, brittle coupling THE RULE exists to avoid.
32
+ export const seedEnvelopeSchema = z.record(z.string(), z.record(z.string(), z.unknown()));
33
+ /**
34
+ * THE RULE, in code: a session's `seed` is a per-twin envelope iff the session
35
+ * has more than one twin. Decide from the `twins` array alone — never by
36
+ * sniffing the seed's shape.
37
+ *
38
+ * This is the shared PREDICATE, not the enforcement point. The actual
39
+ * envelope-iff-multi-twin check runs at the edges that know `twins`: the cloud
40
+ * at session create and the CLI at scenario parse time (follow-up PRs). The
41
+ * create-session request schema stays a shape-blind pass-through by design.
42
+ */
43
+ export function isMultiTwinSeedEnvelope(twins) {
44
+ return twins.length > 1;
45
+ }
46
+ //# sourceMappingURL=seed-envelope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed-envelope.js","sourceRoot":"","sources":["../src/seed-envelope.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,6CAA6C;AAC7C,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAC7E,gFAAgF;AAChF,sEAAsE;AACtE,gFAAgF;AAChF,iFAAiF;AACjF,+EAA+E;AAC/E,8EAA8E;AAE9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,uEAAuE;AACvE,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,UAAU;AACV,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAC7E,0EAA0E;AAC1E,kFAAkF;AAClF,8EAA8E;AAC9E,yEAAyE;AACzE,kDAAkD;AAClD,4EAA4E;AAC5E,gFAAgF;AAChF,wDAAwD;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CACxC,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAClC,CAAC;AAGF;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAe;IACrD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAC1B,CAAC"}