@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,96 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * otel/project — the single attribute→projection function (M1.1 / FDRS-480).
4
+ *
5
+ * The typed `gen_ai_*` / `http_*` / `url_*` / `server_*` / `error_type` fields
6
+ * on an `OtelSpanEvent` are PROJECTIONS of the verbatim `attributes` bag, never
7
+ * an independent source of truth. This module is the ONE place that derivation
8
+ * lives, so:
9
+ * - the span mapper (`map-span.ts`) builds projections from `attributes`,
10
+ * - the legacy shim (`legacy-shim.ts`) builds them the same way, and
11
+ * - the schema (`span-event.ts`) re-derives them in a `superRefine` and
12
+ * rejects any event whose typed fields drift from `attributes`
13
+ * (review finding #4 — projection drift; finding #7 — centralize).
14
+ *
15
+ * Pure and deterministic. Reads only the pinned attribute names from `semconv`.
16
+ */
17
+ import { z } from "zod";
18
+ import { ERROR_TYPE, GEN_AI_AGENT_ID, GEN_AI_AGENT_NAME, GEN_AI_OPERATION_NAME, GEN_AI_PROVIDER_NAME, GEN_AI_REQUEST_MODEL, GEN_AI_SYSTEM_DEPRECATED, GEN_AI_TOOL_NAME, GEN_AI_USAGE_COMPLETION_TOKENS_LEGACY, GEN_AI_USAGE_INPUT_TOKENS, GEN_AI_USAGE_OUTPUT_TOKENS, GEN_AI_USAGE_PROMPT_TOKENS_LEGACY, HTTP_REQUEST_METHOD, HTTP_RESPONSE_STATUS_CODE, SERVER_ADDRESS, SERVER_PORT, URL_FULL, URL_PATH, } from "./semconv.js";
19
+ // A flattened OTLP attribute value. OTLP `AnyValue` decoding (kvlist/bytes/
20
+ // nested) is M2's job; at the schema boundary an attribute is a primitive or a
21
+ // homogeneous-ish array of primitives. Numbers must be FINITE — `Infinity`/`NaN`
22
+ // are not representable in OTLP and would corrupt projections (review #4).
23
+ const finiteNumber = z.number().finite();
24
+ export const otelAttributeValueSchema = z.union([
25
+ z.string(),
26
+ finiteNumber,
27
+ z.boolean(),
28
+ z.array(z.union([z.string(), finiteNumber, z.boolean()])),
29
+ ]);
30
+ // The full set of projection field names, in on-disk order. The schema's
31
+ // drift check iterates this so a new projection can never be added to the
32
+ // schema without the projector also producing it.
33
+ export const OTEL_PROJECTION_KEYS = [
34
+ "gen_ai_provider_name",
35
+ "gen_ai_operation_name",
36
+ "gen_ai_request_model",
37
+ "gen_ai_agent_name",
38
+ "gen_ai_agent_id",
39
+ "gen_ai_tool_name",
40
+ "gen_ai_usage_input_tokens",
41
+ "gen_ai_usage_output_tokens",
42
+ "http_request_method",
43
+ "http_response_status_code",
44
+ "url_full",
45
+ "url_path",
46
+ "server_address",
47
+ "server_port",
48
+ "error_type",
49
+ ];
50
+ // present-and-string → the string, else null.
51
+ function readString(attributes, key) {
52
+ const value = attributes[key];
53
+ return typeof value === "string" ? value : null;
54
+ }
55
+ // present-and-finite-int → the number, else null. (Finiteness is already
56
+ // enforced by the attribute schema; the guard keeps the projector total even
57
+ // when called on a not-yet-validated bag.)
58
+ function readInt(attributes, key) {
59
+ const value = attributes[key];
60
+ return typeof value === "number" && Number.isInteger(value) ? value : null;
61
+ }
62
+ // present-and-int≥0 → the number, else null. Token counts and ports are
63
+ // non-negative.
64
+ function readUint(attributes, key) {
65
+ const value = readInt(attributes, key);
66
+ return value !== null && value >= 0 ? value : null;
67
+ }
68
+ /**
69
+ * Derive the flat typed projections from a verbatim attribute bag. Canonical
70
+ * names win; deprecated/pre-1.27 aliases are accepted as fallbacks.
71
+ */
72
+ export function projectAttributes(attributes) {
73
+ return {
74
+ gen_ai_provider_name: readString(attributes, GEN_AI_PROVIDER_NAME) ??
75
+ readString(attributes, GEN_AI_SYSTEM_DEPRECATED),
76
+ gen_ai_operation_name: readString(attributes, GEN_AI_OPERATION_NAME),
77
+ gen_ai_request_model: readString(attributes, GEN_AI_REQUEST_MODEL),
78
+ gen_ai_agent_name: readString(attributes, GEN_AI_AGENT_NAME),
79
+ gen_ai_agent_id: readString(attributes, GEN_AI_AGENT_ID),
80
+ gen_ai_tool_name: readString(attributes, GEN_AI_TOOL_NAME),
81
+ gen_ai_usage_input_tokens: readUint(attributes, GEN_AI_USAGE_INPUT_TOKENS) ??
82
+ readUint(attributes, GEN_AI_USAGE_PROMPT_TOKENS_LEGACY),
83
+ gen_ai_usage_output_tokens: readUint(attributes, GEN_AI_USAGE_OUTPUT_TOKENS) ??
84
+ readUint(attributes, GEN_AI_USAGE_COMPLETION_TOKENS_LEGACY),
85
+ http_request_method: readString(attributes, HTTP_REQUEST_METHOD),
86
+ // HTTP status codes are non-negative (100–599); `readUint` drops a bogus
87
+ // negative value rather than projecting it as a valid code.
88
+ http_response_status_code: readUint(attributes, HTTP_RESPONSE_STATUS_CODE),
89
+ url_full: readString(attributes, URL_FULL),
90
+ url_path: readString(attributes, URL_PATH),
91
+ server_address: readString(attributes, SERVER_ADDRESS),
92
+ server_port: readUint(attributes, SERVER_PORT),
93
+ error_type: readString(attributes, ERROR_TYPE),
94
+ };
95
+ }
96
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/otel/project.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,qCAAqC,EACrC,yBAAyB,EACzB,0BAA0B,EAC1B,iCAAiC,E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AAE,QAAQ,CAAC;QAC1C,QAAQ,EAAE,UAAU,CAAC,UAAU,EAAE,QAAQ,CAAC;QAC1C,cAAc,EAAE,UAAU,CAAC,UAAU,EAAE,cAAc,CAAC;QACtD,WAAW,EAAE,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;QAC9C,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC;KAC/C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * otel/semconv — pinned OpenTelemetry semantic-convention surface (M1.1 / FDRS-480).
3
+ *
4
+ * The ONE place an upstream spec change is absorbed. Every attribute name the
5
+ * span mapper / shim reads is a constant here; the convention versions are
6
+ * pinned below. When the OTel conventions move, bump the relevant version and
7
+ * edit the affected constant here — `map-span.ts`, `project.ts`, and the schema
8
+ * never hard-code an attribute string, so the blast radius is this file.
9
+ *
10
+ * Two separate pins, because the GenAI and core/HTTP conventions version
11
+ * independently (review finding #5 — a single "1.30.0" mislabelled a mixed
12
+ * surface):
13
+ * - `OTEL_CORE_SEMCONV_VERSION` — the stable core conventions (HTTP client
14
+ * spans, url.*, server.*, error.type) we project. Pinned to the v1.41.1
15
+ * core release.
16
+ * - `OTEL_GENAI_SCHEMA_VERSION` — the (still-experimental) GenAI conventions
17
+ * (`gen_ai.*`). Pinned to the GenAI schema 1.42.0, which introduces
18
+ * `gen_ai.provider.name` and deprecates `gen_ai.system`.
19
+ *
20
+ * Provenance for the pins:
21
+ * - core: https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.41.1
22
+ * - genai: https://github.com/open-telemetry/semantic-conventions/tree/main/docs/gen-ai
23
+ * - http: https://opentelemetry.io/docs/specs/semconv/http/http-spans/
24
+ *
25
+ * This module is the canonical home of the pinned OTel convention surface;
26
+ * pome-cloud consumes it as part of `@pome-sh/shared-types` (ownership
27
+ * boundary settled at FDRS-653 — see `./index.ts`).
28
+ */
29
+ export declare const OTEL_CORE_SEMCONV_VERSION: "1.41.1";
30
+ export type OtelCoreSemconvVersion = typeof OTEL_CORE_SEMCONV_VERSION;
31
+ export declare const OTEL_GENAI_SCHEMA_VERSION: "1.42.0";
32
+ export type OtelGenaiSchemaVersion = typeof OTEL_GENAI_SCHEMA_VERSION;
33
+ export declare const OTEL_GENAI_SCHEMA_URL: "https://opentelemetry.io/schemas/1.42.0";
34
+ export declare const GEN_AI_PROVIDER_NAME = "gen_ai.provider.name";
35
+ export declare const GEN_AI_SYSTEM_DEPRECATED = "gen_ai.system";
36
+ export declare const GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
37
+ export declare const GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
38
+ export declare const GEN_AI_AGENT_NAME = "gen_ai.agent.name";
39
+ export declare const GEN_AI_AGENT_ID = "gen_ai.agent.id";
40
+ export declare const GEN_AI_TOOL_NAME = "gen_ai.tool.name";
41
+ export declare const GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
42
+ export declare const GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
43
+ export declare const GEN_AI_USAGE_PROMPT_TOKENS_LEGACY = "gen_ai.usage.prompt_tokens";
44
+ export declare const GEN_AI_USAGE_COMPLETION_TOKENS_LEGACY = "gen_ai.usage.completion_tokens";
45
+ export declare const HTTP_REQUEST_METHOD = "http.request.method";
46
+ export declare const HTTP_RESPONSE_STATUS_CODE = "http.response.status_code";
47
+ export declare const URL_FULL = "url.full";
48
+ export declare const URL_PATH = "url.path";
49
+ export declare const SERVER_ADDRESS = "server.address";
50
+ export declare const SERVER_PORT = "server.port";
51
+ export declare const ERROR_TYPE = "error.type";
@@ -0,0 +1,74 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * otel/semconv — pinned OpenTelemetry semantic-convention surface (M1.1 / FDRS-480).
4
+ *
5
+ * The ONE place an upstream spec change is absorbed. Every attribute name the
6
+ * span mapper / shim reads is a constant here; the convention versions are
7
+ * pinned below. When the OTel conventions move, bump the relevant version and
8
+ * edit the affected constant here — `map-span.ts`, `project.ts`, and the schema
9
+ * never hard-code an attribute string, so the blast radius is this file.
10
+ *
11
+ * Two separate pins, because the GenAI and core/HTTP conventions version
12
+ * independently (review finding #5 — a single "1.30.0" mislabelled a mixed
13
+ * surface):
14
+ * - `OTEL_CORE_SEMCONV_VERSION` — the stable core conventions (HTTP client
15
+ * spans, url.*, server.*, error.type) we project. Pinned to the v1.41.1
16
+ * core release.
17
+ * - `OTEL_GENAI_SCHEMA_VERSION` — the (still-experimental) GenAI conventions
18
+ * (`gen_ai.*`). Pinned to the GenAI schema 1.42.0, which introduces
19
+ * `gen_ai.provider.name` and deprecates `gen_ai.system`.
20
+ *
21
+ * Provenance for the pins:
22
+ * - core: https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.41.1
23
+ * - genai: https://github.com/open-telemetry/semantic-conventions/tree/main/docs/gen-ai
24
+ * - http: https://opentelemetry.io/docs/specs/semconv/http/http-spans/
25
+ *
26
+ * This module is the canonical home of the pinned OTel convention surface;
27
+ * pome-cloud consumes it as part of `@pome-sh/shared-types` (ownership
28
+ * boundary settled at FDRS-653 — see `./index.ts`).
29
+ */
30
+ // Pinned core (HTTP / url / server / error) convention version.
31
+ export const OTEL_CORE_SEMCONV_VERSION = "1.41.1";
32
+ // Pinned GenAI convention/schema version. The GenAI surface is experimental and
33
+ // versions ahead of core; `gen_ai.provider.name` is canonical at this version.
34
+ export const OTEL_GENAI_SCHEMA_VERSION = "1.42.0";
35
+ // The GenAI schema URL emitters stamp on their resource/scope. Recorded so M2's
36
+ // raw-OTLP ingestion can assert the producer's declared schema against our pin.
37
+ export const OTEL_GENAI_SCHEMA_URL = "https://opentelemetry.io/schemas/1.42.0";
38
+ // ── GenAI semantic conventions ───────────────────────────────────────────────
39
+ // Emitted by Traceloop/OpenLLMetry, the Vercel AI SDK, Pydantic Logfire, and
40
+ // Pome's own runtimes.
41
+ // Canonical provider attribute at the pinned GenAI version (replaces
42
+ // `gen_ai.system`, which is accepted as a deprecated ingestion alias below).
43
+ export const GEN_AI_PROVIDER_NAME = "gen_ai.provider.name";
44
+ // Deprecated alias for the provider. Still emitted by Traceloop and older AI-SDK
45
+ // builds in the wild, so the projector accepts it and normalizes onto
46
+ // `gen_ai_provider_name`. Remove when the pinned version drops the alias.
47
+ export const GEN_AI_SYSTEM_DEPRECATED = "gen_ai.system";
48
+ export const GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
49
+ export const GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
50
+ export const GEN_AI_AGENT_NAME = "gen_ai.agent.name";
51
+ export const GEN_AI_AGENT_ID = "gen_ai.agent.id";
52
+ export const GEN_AI_TOOL_NAME = "gen_ai.tool.name";
53
+ export const GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
54
+ export const GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
55
+ // Pre-1.27 token attribute names. Still emitted by older Traceloop/OpenLLMetry
56
+ // builds, so the projector accepts them as a fallback and normalizes onto the
57
+ // canonical `input_tokens` / `output_tokens` fields.
58
+ export const GEN_AI_USAGE_PROMPT_TOKENS_LEGACY = "gen_ai.usage.prompt_tokens";
59
+ export const GEN_AI_USAGE_COMPLETION_TOKENS_LEGACY = "gen_ai.usage.completion_tokens";
60
+ // ── HTTP / core semantic conventions ─────────────────────────────────────────
61
+ // External-API (twin-relevant) spans. Stable HTTP client conventions at the
62
+ // pinned core version (`http.request.method`, not the deprecated `http.method`).
63
+ export const HTTP_REQUEST_METHOD = "http.request.method";
64
+ export const HTTP_RESPONSE_STATUS_CODE = "http.response.status_code";
65
+ export const URL_FULL = "url.full";
66
+ // `url.path` is the low-cardinality path component; safe to project even when
67
+ // `url.full` carries query params we would not want in a span name.
68
+ export const URL_PATH = "url.path";
69
+ export const SERVER_ADDRESS = "server.address";
70
+ export const SERVER_PORT = "server.port";
71
+ // `error.type` is set on failed spans (status ERROR). For HTTP it is typically
72
+ // the status-code class or an exception/connection-error identifier.
73
+ export const ERROR_TYPE = "error.type";
74
+ //# sourceMappingURL=semconv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semconv.js","sourceRoot":"","sources":["../../src/otel/semconv.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAAG,QAAiB,CAAC;AAG3D,gFAAgF;AAChF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,QAAiB,CAAC;AAG3D,gFAAgF;AAChF,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAChC,yCAAkD,CAAC;AAErD,gFAAgF;AAChF,6EAA6E;AAC7E,uBAAuB;AAEvB,qEAAqE;AACrE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAC3D,iFAAiF;AACjF,sEAAsE;AACtE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AACnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AACrE,MAAM,CAAC,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AAEvE,+EAA+E;AAC/E,8EAA8E;AAC9E,qDAAqD;AACrD,MAAM,CAAC,MAAM,iCAAiC,GAAG,4BAA4B,CAAC;AAC9E,MAAM,CAAC,MAAM,qCAAqC,GAAG,gCAAgC,CAAC;AAEtF,gFAAgF;AAChF,4EAA4E;AAC5E,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AACzD,MAAM,CAAC,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AACrE,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,8EAA8E;AAC9E,oEAAoE;AACpE,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,+EAA+E;AAC/E,qEAAqE;AACrE,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC"}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * otel/span-event — the `OtelSpanEvent` Zod schema (M1.1 / FDRS-480).
3
+ *
4
+ * The canonical internal representation of a single OpenTelemetry span, mapped
5
+ * onto Pome's event union. From M1 on, OTel spans are the canonical model;
6
+ * legacy `TwinHttpEvent` / `LlmCallEvent` / `ToolUseEvent` rows are shimmed *up*
7
+ * into this shape (M1.2). `OtelSpanEvent` is a non-breaking `kind` extension of
8
+ * the event union (composed in `./event-schema.ts`, cloud-only).
9
+ *
10
+ * Invariants enforced (review finding #4 — the schema was too weak):
11
+ * - `*_unix_nano` are uint64 decimal strings WITHIN range (no overflow that
12
+ * could throw a RangeError downstream).
13
+ * - IDs are real W3C trace context (32-/16-char lowercase hex, non-zero) OR
14
+ * an explicit `legacy:<source-id>` (the shim's namespace). Nothing else.
15
+ * - `end_time_unix_nano >= start_time_unix_nano` (no reversed spans).
16
+ * - `event_id === span_id` and `parent_id === parent_span_id` (the base
17
+ * event-union chain mirrors span context).
18
+ * - `ts` is exactly `nanosToIso(start_time_unix_nano)`.
19
+ * - the typed `gen_ai_*` / `http_*` / `url_*` / `server_*` / `error_type`
20
+ * fields EQUAL `projectAttributes(attributes)` — they are projections of
21
+ * the verbatim bag and cannot drift from it.
22
+ *
23
+ * Field conventions: snake_case, flat. `attributes` holds the FULL verbatim
24
+ * attribute bag; the typed fields above are projections of it (see `project.ts`).
25
+ */
26
+ import { z } from "zod";
27
+ export declare const OTEL_SPAN_KINDS: readonly ["UNSPECIFIED", "INTERNAL", "SERVER", "CLIENT", "PRODUCER", "CONSUMER"];
28
+ export declare const otelSpanKindSchema: z.ZodEnum<{
29
+ UNSPECIFIED: "UNSPECIFIED";
30
+ INTERNAL: "INTERNAL";
31
+ SERVER: "SERVER";
32
+ CLIENT: "CLIENT";
33
+ PRODUCER: "PRODUCER";
34
+ CONSUMER: "CONSUMER";
35
+ }>;
36
+ export type OtelSpanKind = z.infer<typeof otelSpanKindSchema>;
37
+ export declare const OTEL_STATUS_CODES: readonly ["UNSET", "OK", "ERROR"];
38
+ export declare const otelStatusCodeSchema: z.ZodEnum<{
39
+ UNSET: "UNSET";
40
+ OK: "OK";
41
+ ERROR: "ERROR";
42
+ }>;
43
+ export type OtelStatusCode = z.infer<typeof otelStatusCodeSchema>;
44
+ export declare const unixNanoSchema: z.ZodString;
45
+ export declare const w3cTraceIdSchema: z.ZodString;
46
+ export declare const w3cSpanIdSchema: z.ZodString;
47
+ export declare const canonicalTraceIdSchema: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
48
+ export declare const canonicalSpanIdSchema: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
49
+ declare const otelSpanEventObjectSchema: z.ZodObject<{
50
+ ts: z.ZodString;
51
+ event_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
52
+ parent_id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
53
+ kind: z.ZodLiteral<"OtelSpanEvent">;
54
+ trace_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
55
+ span_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
56
+ parent_span_id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
57
+ name: z.ZodString;
58
+ span_kind: z.ZodEnum<{
59
+ UNSPECIFIED: "UNSPECIFIED";
60
+ INTERNAL: "INTERNAL";
61
+ SERVER: "SERVER";
62
+ CLIENT: "CLIENT";
63
+ PRODUCER: "PRODUCER";
64
+ CONSUMER: "CONSUMER";
65
+ }>;
66
+ start_time_unix_nano: z.ZodString;
67
+ end_time_unix_nano: z.ZodNullable<z.ZodString>;
68
+ status_code: z.ZodEnum<{
69
+ UNSET: "UNSET";
70
+ OK: "OK";
71
+ ERROR: "ERROR";
72
+ }>;
73
+ status_message: z.ZodNullable<z.ZodString>;
74
+ gen_ai_provider_name: z.ZodNullable<z.ZodString>;
75
+ gen_ai_operation_name: z.ZodNullable<z.ZodString>;
76
+ gen_ai_request_model: z.ZodNullable<z.ZodString>;
77
+ gen_ai_agent_name: z.ZodNullable<z.ZodString>;
78
+ gen_ai_agent_id: z.ZodNullable<z.ZodString>;
79
+ gen_ai_tool_name: z.ZodNullable<z.ZodString>;
80
+ gen_ai_usage_input_tokens: z.ZodNullable<z.ZodNumber>;
81
+ gen_ai_usage_output_tokens: z.ZodNullable<z.ZodNumber>;
82
+ http_request_method: z.ZodNullable<z.ZodString>;
83
+ http_response_status_code: z.ZodNullable<z.ZodNumber>;
84
+ url_full: z.ZodNullable<z.ZodString>;
85
+ url_path: z.ZodNullable<z.ZodString>;
86
+ server_address: z.ZodNullable<z.ZodString>;
87
+ server_port: z.ZodNullable<z.ZodNumber>;
88
+ error_type: z.ZodNullable<z.ZodString>;
89
+ 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]>>]>>;
90
+ }, z.core.$strip>;
91
+ export declare const otelSpanEventSchema: z.ZodObject<{
92
+ ts: z.ZodString;
93
+ event_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
94
+ parent_id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
95
+ kind: z.ZodLiteral<"OtelSpanEvent">;
96
+ trace_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
97
+ span_id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
98
+ parent_span_id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
99
+ name: z.ZodString;
100
+ span_kind: z.ZodEnum<{
101
+ UNSPECIFIED: "UNSPECIFIED";
102
+ INTERNAL: "INTERNAL";
103
+ SERVER: "SERVER";
104
+ CLIENT: "CLIENT";
105
+ PRODUCER: "PRODUCER";
106
+ CONSUMER: "CONSUMER";
107
+ }>;
108
+ start_time_unix_nano: z.ZodString;
109
+ end_time_unix_nano: z.ZodNullable<z.ZodString>;
110
+ status_code: z.ZodEnum<{
111
+ UNSET: "UNSET";
112
+ OK: "OK";
113
+ ERROR: "ERROR";
114
+ }>;
115
+ status_message: z.ZodNullable<z.ZodString>;
116
+ gen_ai_provider_name: z.ZodNullable<z.ZodString>;
117
+ gen_ai_operation_name: z.ZodNullable<z.ZodString>;
118
+ gen_ai_request_model: z.ZodNullable<z.ZodString>;
119
+ gen_ai_agent_name: z.ZodNullable<z.ZodString>;
120
+ gen_ai_agent_id: z.ZodNullable<z.ZodString>;
121
+ gen_ai_tool_name: z.ZodNullable<z.ZodString>;
122
+ gen_ai_usage_input_tokens: z.ZodNullable<z.ZodNumber>;
123
+ gen_ai_usage_output_tokens: z.ZodNullable<z.ZodNumber>;
124
+ http_request_method: z.ZodNullable<z.ZodString>;
125
+ http_response_status_code: z.ZodNullable<z.ZodNumber>;
126
+ url_full: z.ZodNullable<z.ZodString>;
127
+ url_path: z.ZodNullable<z.ZodString>;
128
+ server_address: z.ZodNullable<z.ZodString>;
129
+ server_port: z.ZodNullable<z.ZodNumber>;
130
+ error_type: z.ZodNullable<z.ZodString>;
131
+ 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]>>]>>;
132
+ }, z.core.$strip>;
133
+ export type OtelSpanEvent = z.infer<typeof otelSpanEventObjectSchema>;
134
+ export {};
@@ -0,0 +1,152 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * otel/span-event — the `OtelSpanEvent` Zod schema (M1.1 / FDRS-480).
4
+ *
5
+ * The canonical internal representation of a single OpenTelemetry span, mapped
6
+ * onto Pome's event union. From M1 on, OTel spans are the canonical model;
7
+ * legacy `TwinHttpEvent` / `LlmCallEvent` / `ToolUseEvent` rows are shimmed *up*
8
+ * into this shape (M1.2). `OtelSpanEvent` is a non-breaking `kind` extension of
9
+ * the event union (composed in `./event-schema.ts`, cloud-only).
10
+ *
11
+ * Invariants enforced (review finding #4 — the schema was too weak):
12
+ * - `*_unix_nano` are uint64 decimal strings WITHIN range (no overflow that
13
+ * could throw a RangeError downstream).
14
+ * - IDs are real W3C trace context (32-/16-char lowercase hex, non-zero) OR
15
+ * an explicit `legacy:<source-id>` (the shim's namespace). Nothing else.
16
+ * - `end_time_unix_nano >= start_time_unix_nano` (no reversed spans).
17
+ * - `event_id === span_id` and `parent_id === parent_span_id` (the base
18
+ * event-union chain mirrors span context).
19
+ * - `ts` is exactly `nanosToIso(start_time_unix_nano)`.
20
+ * - the typed `gen_ai_*` / `http_*` / `url_*` / `server_*` / `error_type`
21
+ * fields EQUAL `projectAttributes(attributes)` — they are projections of
22
+ * the verbatim bag and cannot drift from it.
23
+ *
24
+ * Field conventions: snake_case, flat. `attributes` holds the FULL verbatim
25
+ * attribute bag; the typed fields above are projections of it (see `project.ts`).
26
+ */
27
+ import { z } from "zod";
28
+ import { compareUint64, isUint64, nanosToIso } from "./nano.js";
29
+ import { OTEL_PROJECTION_KEYS, otelAttributeValueSchema, projectAttributes, } from "./project.js";
30
+ // OTel SpanKind, by name. OTLP encodes these as ints 0–5; the mapper normalizes
31
+ // numeric input onto these names. Order matches the OTLP enum (index == int).
32
+ export const OTEL_SPAN_KINDS = [
33
+ "UNSPECIFIED",
34
+ "INTERNAL",
35
+ "SERVER",
36
+ "CLIENT",
37
+ "PRODUCER",
38
+ "CONSUMER",
39
+ ];
40
+ export const otelSpanKindSchema = z.enum(OTEL_SPAN_KINDS);
41
+ // OTel status code, by name. OTLP encodes these as ints 0–2 (index == int).
42
+ export const OTEL_STATUS_CODES = ["UNSET", "OK", "ERROR"];
43
+ export const otelStatusCodeSchema = z.enum(OTEL_STATUS_CODES);
44
+ // uint64 nanoseconds-since-epoch as a decimal string, WITHIN the uint64 range.
45
+ export const unixNanoSchema = z
46
+ .string()
47
+ .refine(isUint64, "expected a uint64 decimal string (unix nanoseconds) within range");
48
+ // ── W3C trace-context identifiers ────────────────────────────────────────────
49
+ // Real OTel IDs are lowercase hex, fixed-width, and never all-zero (the
50
+ // all-zero id is the "invalid" sentinel). The shim namespaces non-OTel legacy
51
+ // ids as `legacy:<source-id>` so a stored span always declares its provenance.
52
+ const NON_ZERO = (hex) => /[1-9a-f]/.test(hex);
53
+ export const w3cTraceIdSchema = z
54
+ .string()
55
+ .regex(/^[0-9a-f]{32}$/, "expected a 32-char lowercase-hex W3C trace id")
56
+ .refine(NON_ZERO, "trace id must not be all-zero");
57
+ export const w3cSpanIdSchema = z
58
+ .string()
59
+ .regex(/^[0-9a-f]{16}$/, "expected a 16-char lowercase-hex W3C span id")
60
+ .refine(NON_ZERO, "span id must not be all-zero");
61
+ const legacyIdSchema = z
62
+ .string()
63
+ .regex(/^legacy:.+$/, "expected a `legacy:<source-id>` namespaced id");
64
+ // A canonical stored id: either real W3C trace context or an explicit
65
+ // `legacy:` id. Used for the `OtelSpanEvent` (which may originate from the shim).
66
+ export const canonicalTraceIdSchema = z.union([w3cTraceIdSchema, legacyIdSchema]);
67
+ export const canonicalSpanIdSchema = z.union([w3cSpanIdSchema, legacyIdSchema]);
68
+ const otelSpanEventObjectSchema = z.object({
69
+ // ── shared event-union base (mirrors `eventBaseShape` in recorder-events.ts) ─
70
+ ts: z.string().datetime(),
71
+ event_id: canonicalSpanIdSchema,
72
+ parent_id: canonicalSpanIdSchema.nullable(),
73
+ kind: z.literal("OtelSpanEvent"),
74
+ // ── W3C trace context — real span parentage (M3 correlation reads these) ────
75
+ trace_id: canonicalTraceIdSchema,
76
+ span_id: canonicalSpanIdSchema,
77
+ parent_span_id: canonicalSpanIdSchema.nullable(),
78
+ // ── span identity / timing / status ────────────────────────────────────────
79
+ name: z.string().min(1),
80
+ span_kind: otelSpanKindSchema,
81
+ start_time_unix_nano: unixNanoSchema,
82
+ end_time_unix_nano: unixNanoSchema.nullable(),
83
+ status_code: otelStatusCodeSchema,
84
+ status_message: z.string().nullable(),
85
+ // ── GenAI projections (flat; null when the span lacks the attribute) ────────
86
+ gen_ai_provider_name: z.string().nullable(),
87
+ gen_ai_operation_name: z.string().nullable(),
88
+ gen_ai_request_model: z.string().nullable(),
89
+ gen_ai_agent_name: z.string().nullable(),
90
+ gen_ai_agent_id: z.string().nullable(),
91
+ gen_ai_tool_name: z.string().nullable(),
92
+ gen_ai_usage_input_tokens: z.number().int().min(0).nullable(),
93
+ gen_ai_usage_output_tokens: z.number().int().min(0).nullable(),
94
+ // ── HTTP / core projections (flat; null when the span lacks the attribute) ──
95
+ http_request_method: z.string().nullable(),
96
+ http_response_status_code: z.number().int().nullable(),
97
+ url_full: z.string().nullable(),
98
+ url_path: z.string().nullable(),
99
+ server_address: z.string().nullable(),
100
+ server_port: z.number().int().min(0).nullable(),
101
+ error_type: z.string().nullable(),
102
+ // ── full, verbatim attribute bag (lossless; typed fields project from this) ─
103
+ attributes: z.record(z.string(), otelAttributeValueSchema),
104
+ });
105
+ export const otelSpanEventSchema = otelSpanEventObjectSchema.superRefine((event, ctx) => {
106
+ // Base-union chain mirrors span context.
107
+ if (event.event_id !== event.span_id) {
108
+ ctx.addIssue({
109
+ code: "custom",
110
+ path: ["event_id"],
111
+ message: "event_id must equal span_id",
112
+ });
113
+ }
114
+ if (event.parent_id !== event.parent_span_id) {
115
+ ctx.addIssue({
116
+ code: "custom",
117
+ path: ["parent_id"],
118
+ message: "parent_id must equal parent_span_id",
119
+ });
120
+ }
121
+ // `ts` is the human-sortable mirror of the span start time.
122
+ if (event.ts !== nanosToIso(event.start_time_unix_nano)) {
123
+ ctx.addIssue({
124
+ code: "custom",
125
+ path: ["ts"],
126
+ message: "ts must equal nanosToIso(start_time_unix_nano)",
127
+ });
128
+ }
129
+ // No reversed spans.
130
+ if (event.end_time_unix_nano !== null &&
131
+ compareUint64(event.end_time_unix_nano, event.start_time_unix_nano) < 0) {
132
+ ctx.addIssue({
133
+ code: "custom",
134
+ path: ["end_time_unix_nano"],
135
+ message: "end_time_unix_nano must be >= start_time_unix_nano",
136
+ });
137
+ }
138
+ // Projection-drift guard: typed fields must equal the attribute bag's
139
+ // projection. The mapper and shim both build them via `projectAttributes`,
140
+ // so a mismatch means a hand-constructed (or corrupted) event.
141
+ const projected = projectAttributes(event.attributes);
142
+ for (const key of OTEL_PROJECTION_KEYS) {
143
+ if (event[key] !== projected[key]) {
144
+ ctx.addIssue({
145
+ code: "custom",
146
+ path: [key],
147
+ message: `${key} must equal projectAttributes(attributes).${key}`,
148
+ });
149
+ }
150
+ }
151
+ });
152
+ //# sourceMappingURL=span-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"span-event.js","sourceRoot":"","sources":["../../src/otel/span-event.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAEtB,gFAAgF;AAChF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa;IACb,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;CACF,CAAC;AACX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