xytara 3.1.16 → 3.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 (390) hide show
  1. package/README.md +120 -92
  2. package/RELEASE_NOTES.md +7 -3
  3. package/START_HERE.md +56 -224
  4. package/bin/xytara.js +21 -8
  5. package/client.js +79 -1
  6. package/lib/{delivery_receipt.js → delivery_receipt_verify.js} +14 -100
  7. package/package.json +25 -35
  8. package/scripts/verify_client.js +418 -0
  9. package/scripts/verify_release_candidate.js +146 -45
  10. package/.env.example +0 -173
  11. package/ADAPTER_START_HERE.md +0 -56
  12. package/BSV_TERANODE_PLATFORM_DISCONTINUITY_RUNBOOK.md +0 -126
  13. package/CARRIED_HANDOFF_DEMO.md +0 -60
  14. package/EXAMPLE_PATHS.md +0 -53
  15. package/FINAL_CONTRACT.md +0 -498
  16. package/PARTNER_READY_PATH.md +0 -71
  17. package/PUBLIC_DEMO_SCRIPT.md +0 -78
  18. package/REAL_PAYMENT_SETUP.md +0 -320
  19. package/SERVICE_CONTRACT.md +0 -419
  20. package/SUPABASE_RUNTIME_STATE_SETUP.md +0 -61
  21. package/TERMINOLOGY.md +0 -50
  22. package/WHY_XYTARA_XOONYA.md +0 -63
  23. package/XT1_EXECUTION_TRUTH_STANDARD.md +0 -78
  24. package/XYTARA_ADAPTER_PROTOCOL_TRUTH_MODEL.md +0 -75
  25. package/XYTARA_AUTONOMOUS_ENTRY_MODEL.md +0 -124
  26. package/XYTARA_DEFAULT_PATH_MODEL.md +0 -84
  27. package/XYTARA_EXECUTION_TRUTH_MODEL.md +0 -171
  28. package/XYTARA_PAYMENT_RAIL_TRUTH_MODEL.md +0 -68
  29. package/adapters/AUTHORING_GUIDE.md +0 -244
  30. package/adapters/ONBOARDING_POSTURE.md +0 -61
  31. package/adapters/THIRD_PARTY_SUBMISSION_PROCESS.md +0 -84
  32. package/adapters/adapter-manifest.schema.json +0 -283
  33. package/adapters/examples/example-execution-adapter.js +0 -61
  34. package/adapters/examples/example-execution-adapter.manifest.json +0 -81
  35. package/adapters/examples/example-settlement-adapter.js +0 -55
  36. package/adapters/examples/example-settlement-adapter.manifest.json +0 -78
  37. package/adapters/examples/example-third-party-acp-registration.submission-bundle.json +0 -124
  38. package/adapters/examples/example-third-party-erc8004-registration.submission-bundle.json +0 -121
  39. package/adapters/examples/example-third-party-identity-registration.certification-pack.json +0 -22
  40. package/adapters/examples/example-third-party-identity-registration.record.json +0 -26
  41. package/adapters/examples/example-third-party-identity-registration.submission-bundle.json +0 -126
  42. package/adapters/examples/example-third-party-langchain-registration.submission-bundle.json +0 -124
  43. package/adapters/examples/example-third-party-mpp-registration.submission-bundle.json +0 -120
  44. package/adapters/examples/example-third-party-registration.certification-pack.json +0 -22
  45. package/adapters/examples/example-third-party-registration.record.json +0 -28
  46. package/adapters/examples/example-third-party-registration.submission-bundle.json +0 -126
  47. package/adapters/examples/example-third-party-settlement-registration.certification-pack.json +0 -22
  48. package/adapters/examples/example-third-party-settlement-registration.record.json +0 -26
  49. package/adapters/examples/example-third-party-settlement-registration.submission-bundle.json +0 -127
  50. package/adapters/examples/langchain-reference-execution-adapter.js +0 -81
  51. package/adapters/examples/langchain-reference-execution-adapter.manifest.json +0 -79
  52. package/adapters/examples/langgraph-reference-execution-adapter.js +0 -81
  53. package/adapters/examples/langgraph-reference-execution-adapter.manifest.json +0 -79
  54. package/adapters/examples/minimal-third-party-execution-adapter.js +0 -61
  55. package/adapters/examples/minimal-third-party-execution-adapter.manifest.json +0 -79
  56. package/adapters/examples/minimal-third-party-execution-registration.record.json +0 -26
  57. package/adapters/examples/minimal-third-party-execution.certification-pack.json +0 -22
  58. package/adapters/examples/minimal-third-party-execution.submission-bundle.json +0 -126
  59. package/adapters/integration-certification-pack.schema.json +0 -82
  60. package/adapters/integration-registration-record.schema.json +0 -114
  61. package/adapters/integration-submission-bundle-set.schema.json +0 -39
  62. package/adapters/integration-submission-bundle.schema.json +0 -34
  63. package/adapters/interfaces.js +0 -56
  64. package/bin/xytara-release.js +0 -1429
  65. package/examples/_demo_env.js +0 -40
  66. package/examples/adapter_review_walkthrough.js +0 -54
  67. package/examples/export_carried_handoff.js +0 -81
  68. package/examples/funded_runtime_walkthrough.js +0 -71
  69. package/examples/partner_launch_walkthrough.js +0 -44
  70. package/examples/quickstart.js +0 -3256
  71. package/fixtures/catalog.js +0 -1156
  72. package/index.js +0 -395
  73. package/integrations/dispatch.js +0 -276
  74. package/integrations/registry-snapshot.schema.json +0 -36
  75. package/integrations/registry.js +0 -2261
  76. package/integrations/views.js +0 -28
  77. package/lib/a2a_lane_contract.js +0 -104
  78. package/lib/a2a_rpc.js +0 -287
  79. package/lib/a2c_lane_contract.js +0 -111
  80. package/lib/account_auth.js +0 -585
  81. package/lib/acp_lane_contract.js +0 -54
  82. package/lib/activity_audit_contract.js +0 -322
  83. package/lib/adapter_certification_contract.js +0 -130
  84. package/lib/adapter_depth_contract.js +0 -218
  85. package/lib/adapter_pack.js +0 -118
  86. package/lib/adapter_partner_pack.js +0 -89
  87. package/lib/adapter_promotion_pack.js +0 -89
  88. package/lib/adapter_protocol_truth_contract.js +0 -229
  89. package/lib/agent_identity.js +0 -162
  90. package/lib/announcement_pack.js +0 -61
  91. package/lib/artifact_distribution_lane_contract.js +0 -54
  92. package/lib/asyncapi_contract.js +0 -150
  93. package/lib/auth_interop_contract.js +0 -80
  94. package/lib/authority_binding_lifecycle_contract.js +0 -182
  95. package/lib/autonomous_entry_contract.js +0 -409
  96. package/lib/bolt_adapter.js +0 -187
  97. package/lib/bolt_lane_contract.js +0 -55
  98. package/lib/bolt_payment_front.js +0 -224
  99. package/lib/business_cockpit.js +0 -378
  100. package/lib/buyer_event_log.js +0 -230
  101. package/lib/buyer_safety_policy.js +0 -132
  102. package/lib/capability_execution_truth.js +0 -276
  103. package/lib/capability_registry.js +0 -633
  104. package/lib/catalog_contract.js +0 -966
  105. package/lib/catalog_family_model.js +0 -193
  106. package/lib/catalog_views.js +0 -55
  107. package/lib/cdp_jwt.js +0 -57
  108. package/lib/checkout_event_security.js +0 -142
  109. package/lib/checkout_processor_adapter.js +0 -217
  110. package/lib/cloudevents_contract.js +0 -80
  111. package/lib/command_flow.js +0 -911
  112. package/lib/commerce_artifacts.js +0 -591
  113. package/lib/commerce_authority.js +0 -449
  114. package/lib/commerce_bridge.js +0 -274
  115. package/lib/commerce_cases.js +0 -399
  116. package/lib/commerce_checkout.js +0 -509
  117. package/lib/commerce_coordination.js +0 -346
  118. package/lib/commerce_economics.js +0 -4017
  119. package/lib/commerce_identity.js +0 -578
  120. package/lib/commerce_quotes.js +0 -266
  121. package/lib/commerce_reports.js +0 -14461
  122. package/lib/commerce_runtime.js +0 -322
  123. package/lib/commerce_shell.js +0 -257
  124. package/lib/crypto_agility_matrix.js +0 -125
  125. package/lib/default_path_contract.js +0 -412
  126. package/lib/delivery_summary_contract.js +0 -95
  127. package/lib/ecosystem_entry.js +0 -64
  128. package/lib/erc8004_lane_contract.js +0 -65
  129. package/lib/event_system_lane_contract.js +0 -75
  130. package/lib/execution_dedupe.js +0 -86
  131. package/lib/execution_truth_contract.js +0 -234
  132. package/lib/external_credit_bridge.js +0 -142
  133. package/lib/external_execution_policy.js +0 -143
  134. package/lib/external_execution_runtime.js +0 -238
  135. package/lib/feature_control_lane_contract.js +0 -54
  136. package/lib/first_run_conversion_contract.js +0 -290
  137. package/lib/framework_lane_contract.js +0 -89
  138. package/lib/framework_provider_promotion.js +0 -235
  139. package/lib/full_catalog_contract.js +0 -525
  140. package/lib/go_live_operator_pack.js +0 -391
  141. package/lib/http_transport.js +0 -99
  142. package/lib/identity_auth.js +0 -175
  143. package/lib/identity_interop_contract.js +0 -82
  144. package/lib/integration_matrix_contract.js +0 -102
  145. package/lib/l402_adapter.js +0 -241
  146. package/lib/l402_lane_contract.js +0 -55
  147. package/lib/l402_payment_front.js +0 -265
  148. package/lib/launch_narrative.js +0 -53
  149. package/lib/lifecycle_continuity_contract.js +0 -115
  150. package/lib/machine_identity_registry_contract.js +0 -199
  151. package/lib/major_rails_lane_contract.js +0 -150
  152. package/lib/market_lane_contract.js +0 -467
  153. package/lib/market_lane_depth_contract.js +0 -182
  154. package/lib/market_lane_promotion_contract.js +0 -210
  155. package/lib/market_lane_trace_contract.js +0 -278
  156. package/lib/mcp_lane_contract.js +0 -137
  157. package/lib/mpp_adapter.js +0 -237
  158. package/lib/network_transport.js +0 -110
  159. package/lib/offline_verifiability_recovery_contract.js +0 -155
  160. package/lib/openapi_contract.js +0 -300
  161. package/lib/operational_receipt_contract.js +0 -165
  162. package/lib/operator_intelligence.js +0 -407
  163. package/lib/outreach_copy_pack.js +0 -51
  164. package/lib/outreach_message_pack.js +0 -71
  165. package/lib/outreach_proof.js +0 -71
  166. package/lib/outreach_target_pack.js +0 -60
  167. package/lib/partner_intelligence.js +0 -105
  168. package/lib/payment_config.js +0 -257
  169. package/lib/payment_front_registry.js +0 -53
  170. package/lib/payment_protocol_contract.js +0 -165
  171. package/lib/payment_rail_truth_contract.js +0 -324
  172. package/lib/payment_verification.js +0 -357
  173. package/lib/phase_10_closeout_pack.js +0 -45
  174. package/lib/phase_10_completion_pack.js +0 -76
  175. package/lib/phase_10_decision_record_pack.js +0 -54
  176. package/lib/phase_10_decision_resolution_pack.js +0 -53
  177. package/lib/phase_10_demand_signal_adapters_runtime_pack.js +0 -74
  178. package/lib/phase_10_ecosystem_backlog_triage_runtime_pack.js +0 -74
  179. package/lib/phase_10_freeze_baseline_pack.js +0 -67
  180. package/lib/phase_10_freeze_review_pack.js +0 -64
  181. package/lib/phase_10_gate_pack.js +0 -57
  182. package/lib/phase_10_long_tail_continuity_pack.js +0 -80
  183. package/lib/phase_10_long_tail_ecosystem_pack.js +0 -66
  184. package/lib/phase_10_niche_extension_registry_runtime_pack.js +0 -74
  185. package/lib/phase_1_claude_mcp_pack.js +0 -60
  186. package/lib/phase_1_claude_mcp_runtime_pack.js +0 -52
  187. package/lib/phase_1_ecosystem_pack.js +0 -67
  188. package/lib/phase_1_openai_codex_pack.js +0 -60
  189. package/lib/phase_1_openai_codex_runtime_pack.js +0 -52
  190. package/lib/phase_2_base_runtime_pack.js +0 -71
  191. package/lib/phase_2_base_usdc_runtime_pack.js +0 -72
  192. package/lib/phase_2_closeout_pack.js +0 -65
  193. package/lib/phase_2_completion_pack.js +0 -113
  194. package/lib/phase_2_decision_record_pack.js +0 -66
  195. package/lib/phase_2_decision_resolution_pack.js +0 -69
  196. package/lib/phase_2_eth_runtime_pack.js +0 -70
  197. package/lib/phase_2_evm_base_runtime_pack.js +0 -73
  198. package/lib/phase_2_evm_runtime_pack.js +0 -71
  199. package/lib/phase_2_flip_preview_pack.js +0 -60
  200. package/lib/phase_2_freeze_review_pack.js +0 -99
  201. package/lib/phase_2_gate_pack.js +0 -77
  202. package/lib/phase_2_payment_rails_pack.js +0 -71
  203. package/lib/phase_2_usdc_runtime_pack.js +0 -71
  204. package/lib/phase_3_brc_runtime_pack.js +0 -81
  205. package/lib/phase_3_bsv_teranode_runtime_pack.js +0 -83
  206. package/lib/phase_3_closeout_pack.js +0 -62
  207. package/lib/phase_3_completion_pack.js +0 -94
  208. package/lib/phase_3_decision_record_pack.js +0 -64
  209. package/lib/phase_3_decision_resolution_pack.js +0 -69
  210. package/lib/phase_3_freeze_baseline_pack.js +0 -67
  211. package/lib/phase_3_freeze_review_pack.js +0 -80
  212. package/lib/phase_3_gate_pack.js +0 -76
  213. package/lib/phase_3_metanet_runtime_pack.js +0 -81
  214. package/lib/phase_3_native_bsv_pack.js +0 -91
  215. package/lib/phase_3_native_continuity_pack.js +0 -82
  216. package/lib/phase_4_attestation_runtime_pack.js +0 -75
  217. package/lib/phase_4_closeout_pack.js +0 -45
  218. package/lib/phase_4_completion_pack.js +0 -94
  219. package/lib/phase_4_decision_record_pack.js +0 -54
  220. package/lib/phase_4_decision_resolution_pack.js +0 -45
  221. package/lib/phase_4_erc8004_runtime_pack.js +0 -76
  222. package/lib/phase_4_freeze_baseline_pack.js +0 -67
  223. package/lib/phase_4_freeze_review_pack.js +0 -68
  224. package/lib/phase_4_gate_pack.js +0 -58
  225. package/lib/phase_4_identity_registry_runtime_pack.js +0 -75
  226. package/lib/phase_4_identity_trust_pack.js +0 -73
  227. package/lib/phase_4_trust_continuity_pack.js +0 -86
  228. package/lib/phase_5_antelope_runtime_pack.js +0 -76
  229. package/lib/phase_5_closeout_pack.js +0 -44
  230. package/lib/phase_5_completion_pack.js +0 -82
  231. package/lib/phase_5_constellation_dag_runtime_pack.js +0 -76
  232. package/lib/phase_5_decision_record_pack.js +0 -54
  233. package/lib/phase_5_decision_resolution_pack.js +0 -45
  234. package/lib/phase_5_digibyte_dgb_runtime_pack.js +0 -76
  235. package/lib/phase_5_freeze_baseline_pack.js +0 -67
  236. package/lib/phase_5_freeze_review_pack.js +0 -68
  237. package/lib/phase_5_gate_pack.js +0 -58
  238. package/lib/phase_5_hedera_hbar_runtime_pack.js +0 -76
  239. package/lib/phase_5_kaspa_kas_runtime_pack.js +0 -76
  240. package/lib/phase_5_major_rails_continuity_pack.js +0 -86
  241. package/lib/phase_5_major_rails_pack.js +0 -110
  242. package/lib/phase_5_metal_runtime_pack.js +0 -76
  243. package/lib/phase_5_polkadot_dot_runtime_pack.js +0 -76
  244. package/lib/phase_5_proton_xpr_runtime_pack.js +0 -76
  245. package/lib/phase_5_solana_runtime_pack.js +0 -76
  246. package/lib/phase_6_autogen_runtime_pack.js +0 -72
  247. package/lib/phase_6_closeout_pack.js +0 -46
  248. package/lib/phase_6_completion_pack.js +0 -77
  249. package/lib/phase_6_decision_record_pack.js +0 -54
  250. package/lib/phase_6_decision_resolution_pack.js +0 -53
  251. package/lib/phase_6_framework_continuity_pack.js +0 -81
  252. package/lib/phase_6_framework_runtime_pack.js +0 -68
  253. package/lib/phase_6_freeze_baseline_pack.js +0 -68
  254. package/lib/phase_6_freeze_review_pack.js +0 -65
  255. package/lib/phase_6_gate_pack.js +0 -59
  256. package/lib/phase_6_langchain_runtime_pack.js +0 -72
  257. package/lib/phase_6_langgraph_runtime_pack.js +0 -72
  258. package/lib/phase_6_semantic_kernel_runtime_pack.js +0 -72
  259. package/lib/phase_7_closeout_pack.js +0 -45
  260. package/lib/phase_7_completion_pack.js +0 -85
  261. package/lib/phase_7_decision_record_pack.js +0 -53
  262. package/lib/phase_7_decision_resolution_pack.js +0 -53
  263. package/lib/phase_7_event_system_continuity_pack.js +0 -89
  264. package/lib/phase_7_event_system_pack.js +0 -76
  265. package/lib/phase_7_freeze_baseline_pack.js +0 -74
  266. package/lib/phase_7_freeze_review_pack.js +0 -65
  267. package/lib/phase_7_gate_pack.js +0 -58
  268. package/lib/phase_7_kafka_runtime_pack.js +0 -74
  269. package/lib/phase_7_mqtt_runtime_pack.js +0 -74
  270. package/lib/phase_7_nats_runtime_pack.js +0 -74
  271. package/lib/phase_7_webhook_event_bus_runtime_pack.js +0 -74
  272. package/lib/phase_8_closeout_pack.js +0 -46
  273. package/lib/phase_8_completion_pack.js +0 -82
  274. package/lib/phase_8_decision_record_pack.js +0 -54
  275. package/lib/phase_8_decision_resolution_pack.js +0 -53
  276. package/lib/phase_8_external_receipt_import_runtime_pack.js +0 -74
  277. package/lib/phase_8_external_result_import_runtime_pack.js +0 -74
  278. package/lib/phase_8_freeze_baseline_pack.js +0 -71
  279. package/lib/phase_8_freeze_review_pack.js +0 -64
  280. package/lib/phase_8_gate_pack.js +0 -58
  281. package/lib/phase_8_proof_bridge_continuity_pack.js +0 -86
  282. package/lib/phase_8_proof_bridges_pack.js +0 -72
  283. package/lib/phase_8_proof_bundle_normalization_runtime_pack.js +0 -74
  284. package/lib/phase_9_closeout_pack.js +0 -46
  285. package/lib/phase_9_completion_pack.js +0 -82
  286. package/lib/phase_9_custody_refs_runtime_pack.js +0 -74
  287. package/lib/phase_9_decision_record_pack.js +0 -54
  288. package/lib/phase_9_decision_resolution_pack.js +0 -53
  289. package/lib/phase_9_freeze_baseline_pack.js +0 -71
  290. package/lib/phase_9_freeze_review_pack.js +0 -64
  291. package/lib/phase_9_gate_pack.js +0 -58
  292. package/lib/phase_9_operator_accounting_bridges_runtime_pack.js +0 -74
  293. package/lib/phase_9_treasury_connectivity_pack.js +0 -72
  294. package/lib/phase_9_treasury_continuity_pack.js +0 -86
  295. package/lib/phase_9_treasury_destinations_runtime_pack.js +0 -74
  296. package/lib/phase_program_pack.js +0 -120
  297. package/lib/pricing_optimization_contract.js +0 -775
  298. package/lib/protocol_lane_contract.js +0 -117
  299. package/lib/provenance_lane_contract.js +0 -54
  300. package/lib/provider_lane_contract.js +0 -240
  301. package/lib/provider_network_contract.js +0 -149
  302. package/lib/provider_payout_execution.js +0 -155
  303. package/lib/provider_registry.js +0 -852
  304. package/lib/provider_runtime_journey_contract.js +0 -183
  305. package/lib/public_surface_policy_contract.js +0 -111
  306. package/lib/publish_plan.js +0 -51
  307. package/lib/rate_limiter.js +0 -81
  308. package/lib/record_queries.js +0 -48
  309. package/lib/release_candidate.js +0 -50
  310. package/lib/release_center.js +0 -1093
  311. package/lib/release_history.js +0 -205
  312. package/lib/release_manifest.js +0 -113
  313. package/lib/release_pack.js +0 -453
  314. package/lib/request_rate_limit.js +0 -144
  315. package/lib/resource_views.js +0 -31
  316. package/lib/revenue_launch_path_contract.js +0 -326
  317. package/lib/route_matchers.js +0 -34
  318. package/lib/route_params.js +0 -19
  319. package/lib/runtime_bridge.js +0 -124
  320. package/lib/runtime_operations_worker.js +0 -282
  321. package/lib/runtime_state_store.js +0 -495
  322. package/lib/settlement_bsv_live.js +0 -600
  323. package/lib/settlement_bsv_teranode.js +0 -117
  324. package/lib/settlement_lane_contract.js +0 -111
  325. package/lib/shared_signals_lane_contract.js +0 -54
  326. package/lib/signed_audit_provenance_contract.js +0 -83
  327. package/lib/soft_launch_pack.js +0 -78
  328. package/lib/stablecoin_lane_contract.js +0 -76
  329. package/lib/stripe_mpp_lane_contract.js +0 -96
  330. package/lib/stripe_mpp_payment_front.js +0 -258
  331. package/lib/telemetry_lane_contract.js +0 -54
  332. package/lib/treasury_destinations_contract.js +0 -764
  333. package/lib/treasury_egress_policy_contract.js +0 -91
  334. package/lib/treasury_lane_contract.js +0 -84
  335. package/lib/trust_portability_boundary_contract.js +0 -72
  336. package/lib/x402_facilitator.js +0 -198
  337. package/lib/x402_lane_contract.js +0 -136
  338. package/lib/x402_settlement_recovery.js +0 -175
  339. package/scripts/buyer_events_daily_report.js +0 -79
  340. package/scripts/registry_cli.js +0 -275
  341. package/scripts/state_backup_offsite.js +0 -196
  342. package/scripts/verify_a2a_rpc.js +0 -131
  343. package/scripts/verify_adapters.js +0 -554
  344. package/scripts/verify_agent_identity.js +0 -153
  345. package/scripts/verify_all.js +0 -4963
  346. package/scripts/verify_bolt_adapter.js +0 -128
  347. package/scripts/verify_buyer_event_log.js +0 -128
  348. package/scripts/verify_buyer_safety.js +0 -141
  349. package/scripts/verify_cdp_facilitator.js +0 -110
  350. package/scripts/verify_checkout_processor.js +0 -109
  351. package/scripts/verify_commerce_bridge.js +0 -177
  352. package/scripts/verify_control_plane_contracts.js +0 -34
  353. package/scripts/verify_control_plane_routes.js +0 -70
  354. package/scripts/verify_delivery_summary.js +0 -112
  355. package/scripts/verify_examples.js +0 -19
  356. package/scripts/verify_execution_dedupe.js +0 -189
  357. package/scripts/verify_execution_surfacing.js +0 -76
  358. package/scripts/verify_external_execution_retry.js +0 -140
  359. package/scripts/verify_final_activation.js +0 -191
  360. package/scripts/verify_first_run_conversions.js +0 -81
  361. package/scripts/verify_framework_provider_promotion.js +0 -152
  362. package/scripts/verify_full_catalog.js +0 -174
  363. package/scripts/verify_integrations.js +0 -620
  364. package/scripts/verify_l402_adapter.js +0 -86
  365. package/scripts/verify_lifecycle_continuity.js +0 -96
  366. package/scripts/verify_lifecycle_spend_binding.js +0 -88
  367. package/scripts/verify_market_lane_depth.js +0 -94
  368. package/scripts/verify_market_lane_promotion.js +0 -103
  369. package/scripts/verify_market_lane_traces.js +0 -98
  370. package/scripts/verify_market_lanes.js +0 -102
  371. package/scripts/verify_mpp_adapter.js +0 -128
  372. package/scripts/verify_operator_observability_boundary.js +0 -83
  373. package/scripts/verify_pricing_experiment_plan.js +0 -124
  374. package/scripts/verify_production_readiness.js +0 -268
  375. package/scripts/verify_provider_network.js +0 -819
  376. package/scripts/verify_provider_runtime_breadth.js +0 -109
  377. package/scripts/verify_provider_runtime_journeys.js +0 -111
  378. package/scripts/verify_rate_limiter.js +0 -52
  379. package/scripts/verify_refund_credit.js +0 -106
  380. package/scripts/verify_revenue_launch_paths.js +0 -105
  381. package/scripts/verify_runtime_durability.js +0 -52
  382. package/scripts/verify_runtime_state_guard.js +0 -117
  383. package/scripts/verify_service.js +0 -15421
  384. package/scripts/verify_settlement.js +0 -116
  385. package/scripts/verify_tooling.js +0 -1412
  386. package/scripts/verify_treasury_public_boundary.js +0 -97
  387. package/scripts/verify_verify_execute_settle.js +0 -209
  388. package/scripts/verify_x402_facilitator.js +0 -307
  389. package/scripts/verify_x402_settlement_recovery.js +0 -153
  390. package/server.js +0 -12245
@@ -1,453 +0,0 @@
1
- "use strict";
2
-
3
- const packageJson = require("../package.json");
4
- const {
5
- buildDefaultTransactionCenter,
6
- summarizeCatalog,
7
- summarizeCreditPacks,
8
- summarizeDefaultTransactionEconomics,
9
- summarizeDefaultTransactionGuidedLoops,
10
- summarizeDefaultTransactionTaskPacks,
11
- summarizeInteractionResultPackages,
12
- summarizeInteractionSpinePaths,
13
- summarizePrecommitInteractionPacks,
14
- summarizeTransactionClassPacks
15
- } = require("./catalog_contract");
16
- const {
17
- summarizeIntegrationProtocols,
18
- summarizeIntegrationSettlementModes,
19
- summarizeIntegrations
20
- } = require("../integrations/registry");
21
-
22
- function buildComparisonPack() {
23
- return {
24
- ok: true,
25
- product: packageJson.name,
26
- category: "machine-commerce-comparison",
27
- comparisons: [
28
- {
29
- alternative: "runtime_only_stack",
30
- missing_capabilities: [
31
- "priced_quote_before_execution",
32
- "native_payment_admission",
33
- "reusable_credit_balance",
34
- "settlement_aware_runtime_records",
35
- "proof_ready_result_handoff"
36
- ],
37
- xytara_advantage: "one spine for discovery, pricing, payment or credit spend, execution, inspection, and proof-compatible handoff"
38
- },
39
- {
40
- alternative: "payment_only_stack",
41
- missing_capabilities: [
42
- "task_catalog_and_workflow_classes",
43
- "deterministic_usage_metering",
44
- "runtime_result_packages",
45
- "operator_payment_to_execution_linkage",
46
- "post_payment_proof_followthrough"
47
- ],
48
- xytara_advantage: "payments remain attached to actual machine work, settlement state, treasury state, and result delivery"
49
- },
50
- {
51
- alternative: "ad_hoc_agent_glue",
52
- missing_capabilities: [
53
- "stable_default_transaction_center",
54
- "typed_task_pack_catalog",
55
- "credit_and_entitlement_posture",
56
- "operator_pack_surfaces",
57
- "consistent_machine_contracts"
58
- ],
59
- xytara_advantage: "direct machine-commerce defaults reduce custom glue while preserving adapter breadth"
60
- }
61
- ],
62
- strongest_reasons_to_try: [
63
- "one-line direct run with payment-aware retry posture",
64
- "credits-first repeat execution without changing the public runtime surface",
65
- "operator-facing payment and settlement inspection surfaces",
66
- "proof-compatible handoff into xoonya instead of dead-end runtime output"
67
- ]
68
- };
69
- }
70
-
71
- function summarizeComparisonPack() {
72
- const pack = buildComparisonPack();
73
- return {
74
- ok: true,
75
- product: pack.product,
76
- comparison_count: pack.comparisons.length,
77
- strongest_reason_count: pack.strongest_reasons_to_try.length,
78
- alternatives: pack.comparisons.map((entry) => entry.alternative)
79
- };
80
- }
81
-
82
- function buildAdoptionPack() {
83
- return {
84
- ok: true,
85
- product: packageJson.name,
86
- category: "machine-commerce-adoption",
87
- positioning_line: "neutral machine transaction spine for agents that need governed execution, payment, proof, and replayability",
88
- best_initial_wedge: "paid machine capability execution where trust is weak and proof matters",
89
- initial_adoption_targets: [
90
- {
91
- target: "paid_agent_tools_and_services",
92
- why_now: "builders already need quote, pay, execute, and inspect behavior around premium machine capabilities"
93
- },
94
- {
95
- target: "cross_organization_agent_workflows",
96
- why_now: "weak-trust interactions make payment and proof linkage materially more valuable than plain orchestration"
97
- },
98
- {
99
- target: "high_frequency_microtask_systems",
100
- why_now: "credits-first spend, deterministic metering, and reusable runtime posture reduce friction for repeated machine work"
101
- },
102
- {
103
- target: "adapter_rich_execution_environments",
104
- why_now: "protocol and settlement neutrality matters when teams do not want to lock into one runtime or one rail"
105
- }
106
- ],
107
- target_ecosystems: [
108
- "agent_builders",
109
- "mcp_tool_authors",
110
- "agent_marketplaces",
111
- "x402_and_machine_payment_builders",
112
- "weak_trust_multi_org_automation_teams"
113
- ],
114
- first_success_paths: [
115
- {
116
- path: "direct_pay_single_run",
117
- start_with: "xytara-run",
118
- success_condition: "agent discovers one capability, quotes it, pays, executes, and receives inspectable result records"
119
- },
120
- {
121
- path: "credits_first_repeat_run",
122
- start_with: "credit_pack_and_balance_surfaces",
123
- success_condition: "funded agent reuses credits across repeated tasks without changing the public execution surface"
124
- },
125
- {
126
- path: "runtime_to_proof_followthrough",
127
- start_with: "result_package_export",
128
- success_condition: "runtime output continues directly into xoonya proof review without ad hoc glue"
129
- }
130
- ],
131
- what_to_say_publicly: [
132
- "quote pay execute prove in one machine flow",
133
- "governed execution for weak-trust agent interactions",
134
- "payment, settlement, metering, and proof continuity in one stack",
135
- "adapter-first machine commerce instead of one-off glue"
136
- ],
137
- what_not_to_lead_with: [
138
- "just another agent framework",
139
- "generic ai infrastructure",
140
- "wallet-first branding",
141
- "provider-specific lock-in language"
142
- ]
143
- };
144
- }
145
-
146
- function summarizeAdoptionPack() {
147
- const pack = buildAdoptionPack();
148
- return {
149
- ok: true,
150
- product: pack.product,
151
- wedge: pack.best_initial_wedge,
152
- target_count: pack.initial_adoption_targets.length,
153
- ecosystem_count: pack.target_ecosystems.length,
154
- first_success_path_count: pack.first_success_paths.length,
155
- lead_message_count: pack.what_to_say_publicly.length
156
- };
157
- }
158
-
159
- function buildScenarioPack() {
160
- return {
161
- ok: true,
162
- product: packageJson.name,
163
- category: "machine-commerce-scenarios",
164
- scenarios: [
165
- {
166
- scenario_ref: "scenario.direct_pay.trust_verify",
167
- title: "Direct Pay Trust Verify",
168
- intended_for: "first_paid_machine_call",
169
- why_it_matters: "shows the full quote pay execute inspect loop with the smallest strong-signal task",
170
- steps: [
171
- "inspect /v1/catalog/summary",
172
- "run xytara-run for trust.verify",
173
- "inspect transaction, payment, and settlement records"
174
- ],
175
- entrypoint: "xytara first-run --run-quote --account ACCOUNT_REF --pretty",
176
- surfaces: [
177
- "/v1/catalog/summary",
178
- "/x402/commands/execute",
179
- "/v1/payment-ledger",
180
- "/v1/settlement/bsv-teranode"
181
- ],
182
- success_signals: [
183
- "transaction recorded",
184
- "payment admitted",
185
- "settlement record created",
186
- "deliverable available"
187
- ]
188
- },
189
- {
190
- scenario_ref: "scenario.credits_first.repeat_run",
191
- title: "Credits-First Repeat Run",
192
- intended_for: "reusable_machine_balance",
193
- why_it_matters: "shows repeat machine execution without reintroducing pay-in friction for each call",
194
- steps: [
195
- "fund credits through credit packs or external grant",
196
- "inspect credit balance",
197
- "execute with payment_preference credits_first",
198
- "inspect usage meters and entitlements"
199
- ],
200
- entrypoint: "POST /v1/commands/execute with payment_preference=credits_first",
201
- surfaces: [
202
- "/v1/credit-packs/summary",
203
- "/v1/economics/accounts/:account_id/credit-balance",
204
- "/v1/economics/accounts/:account_id/usage-meters",
205
- "/v1/economics/accounts/:account_id/entitlements"
206
- ],
207
- success_signals: [
208
- "available units decrease",
209
- "usage meter recorded",
210
- "same execution surface reused",
211
- "no extra payment challenge required"
212
- ]
213
- },
214
- {
215
- scenario_ref: "scenario.runtime_to_proof.followthrough",
216
- title: "Runtime To Proof Followthrough",
217
- intended_for: "proof_aware_machine_execution",
218
- why_it_matters: "shows that runtime output is not a dead end and can continue into proof review directly",
219
- steps: [
220
- "execute one transaction-class or default loop",
221
- "export result package or economic consequence handoff",
222
- "continue into xoonya review"
223
- ],
224
- entrypoint: "POST /v1/transaction-center/result-packages/export or xytara result-package surfaces",
225
- surfaces: [
226
- "/v1/transaction-center/result-packages",
227
- "/v1/transaction-center/result-package/export-template",
228
- "/v1/economics/handoff-bundles/economic-consequence"
229
- ],
230
- success_signals: [
231
- "result package produced",
232
- "handoff bundle emitted",
233
- "proof-side review path clear"
234
- ]
235
- }
236
- ]
237
- };
238
- }
239
-
240
- function summarizeScenarioPack() {
241
- const pack = buildScenarioPack();
242
- return {
243
- ok: true,
244
- product: pack.product,
245
- scenario_count: pack.scenarios.length,
246
- scenario_refs: pack.scenarios.map((entry) => entry.scenario_ref),
247
- first_entrypoint: pack.scenarios[0] ? pack.scenarios[0].entrypoint : null
248
- };
249
- }
250
-
251
- function buildLaunchPack(options = {}) {
252
- const releaseSummary = summarizeReleasePack();
253
- const comparisonSummary = summarizeComparisonPack();
254
- const adoptionSummary = summarizeAdoptionPack();
255
- const scenarioSummary = summarizeScenarioPack();
256
- return {
257
- ok: true,
258
- product: packageJson.name,
259
- category: "machine-commerce-launch-pack",
260
- launch_readiness: {
261
- release_summary: releaseSummary,
262
- comparison_summary: comparisonSummary,
263
- adoption_summary: adoptionSummary,
264
- scenario_summary: scenarioSummary,
265
- live_readiness: options.liveReadiness || null,
266
- operator_posture: {
267
- payment_ledger_surface: "/v1/payment-ledger",
268
- settlement_surface: "/v1/settlement/bsv-teranode",
269
- durability_surface: "/v1/runtime/durability"
270
- }
271
- },
272
- launch_operator_checks: [
273
- "release summary is reachable",
274
- "comparison summary is reachable",
275
- "adoption summary is reachable",
276
- "scenario summary is reachable",
277
- "runtime durability is inspectable",
278
- "native settlement readiness is inspectable"
279
- ],
280
- first_public_pointer: "/v1/release-pack/launch/summary"
281
- };
282
- }
283
-
284
- function summarizeLaunchPack(options = {}) {
285
- const pack = buildLaunchPack(options);
286
- return {
287
- ok: true,
288
- product: pack.product,
289
- category: pack.category,
290
- task_count: pack.launch_readiness.release_summary.task_count,
291
- integration_count: pack.launch_readiness.release_summary.integration_count,
292
- comparison_count: pack.launch_readiness.comparison_summary.comparison_count,
293
- target_count: pack.launch_readiness.adoption_summary.target_count,
294
- scenario_count: pack.launch_readiness.scenario_summary.scenario_count,
295
- operator_check_count: pack.launch_operator_checks.length,
296
- live_ready: pack.launch_readiness.live_readiness ? pack.launch_readiness.live_readiness.ready : null
297
- };
298
- }
299
-
300
- function buildReleasePack() {
301
- const transactionCenter = buildDefaultTransactionCenter();
302
- const catalogSummary = summarizeCatalog();
303
- const transactionEconomics = summarizeDefaultTransactionEconomics();
304
- const taskPackSummary = summarizeDefaultTransactionTaskPacks();
305
- const guidedLoopSummary = summarizeDefaultTransactionGuidedLoops();
306
- const transactionClassSummary = summarizeTransactionClassPacks();
307
- const precommitSummary = summarizePrecommitInteractionPacks();
308
- const spineSummary = summarizeInteractionSpinePaths();
309
- const resultPackageSummary = summarizeInteractionResultPackages();
310
- const creditPackSummary = summarizeCreditPacks();
311
- const integrationSummary = summarizeIntegrations();
312
- const protocolSummary = summarizeIntegrationProtocols();
313
- const settlementModeSummary = summarizeIntegrationSettlementModes();
314
- const defaultProtocol = transactionCenter && transactionCenter.default_protocol
315
- ? transactionCenter.default_protocol.protocol
316
- : null;
317
- const defaultPaymentProtocol = transactionCenter && transactionCenter.default_payment
318
- ? transactionCenter.default_payment.protocol
319
- : null;
320
- const defaultSettlementMode = transactionCenter && transactionCenter.default_settlement
321
- ? transactionCenter.default_settlement.settlement_mode
322
- : null;
323
-
324
- return {
325
- ok: true,
326
- product: {
327
- name: packageJson.name,
328
- version: packageJson.version,
329
- description: packageJson.description,
330
- homepage: packageJson.homepage,
331
- repository: packageJson.repository && packageJson.repository.url ? packageJson.repository.url : null,
332
- license: packageJson.license
333
- },
334
- positioning: {
335
- category: "machine-commerce-spine",
336
- primary_audiences: [
337
- "agent_builders",
338
- "machine_economy_developers",
339
- "adapter_authors",
340
- "settlement_aware_runtime_operators"
341
- ],
342
- core_claims: [
343
- "discover_quote_pay_execute_inspect_handoff",
344
- "credits_first_or_direct_payment",
345
- "deterministic_usage_metering",
346
- "settlement_aware_runtime_records",
347
- "proof_compatible_handoff_into_xoonya"
348
- ]
349
- },
350
- first_contact: {
351
- install: "npm install xytara",
352
- direct_run_cli: "xytara first-run --run-quote --account ACCOUNT_REF --pretty",
353
- discovery_surface: "/v1/catalog/summary",
354
- transaction_center_surface: "/v1/transaction-center/summary",
355
- economics_surface: "/v1/transaction-center/economics/summary",
356
- handoff_expectation: "transaction result packages should continue into xoonya proof review and proof-native completion"
357
- },
358
- package_usage: {
359
- install_command: "npm install xytara",
360
- verify_command: "npm run verify:all",
361
- local_service_command: "npm start",
362
- release_cli: "xytara-release --summary",
363
- docs: [
364
- "README.md",
365
- "START_HERE.md",
366
- "FINAL_CONTRACT.md",
367
- "SERVICE_CONTRACT.md",
368
- "REAL_PAYMENT_SETUP.md"
369
- ]
370
- },
371
- default_path: {
372
- protocol: defaultProtocol,
373
- payment_protocol: defaultPaymentProtocol,
374
- settlement_mode: defaultSettlementMode,
375
- suggested_paths: Array.isArray(transactionCenter && transactionCenter.suggested_paths)
376
- ? transactionCenter.suggested_paths
377
- : []
378
- },
379
- commerce_loop: {
380
- stages: ["discover", "quote", "pay_or_spend", "execute", "deliver", "inspect", "prove"],
381
- spend_postures: ["direct_payment", "credits_first", "bounded_spend_credential"],
382
- operator_surfaces: [
383
- "/v1/operator-shell/summary",
384
- "/v1/payment-ledger",
385
- "/v1/settlement/bsv-teranode",
386
- "/v1/runtime/durability"
387
- ]
388
- },
389
- catalog_summary: catalogSummary,
390
- transaction_economics_summary: transactionEconomics,
391
- task_pack_summary: taskPackSummary,
392
- guided_loop_summary: guidedLoopSummary,
393
- transaction_class_summary: transactionClassSummary,
394
- precommit_summary: precommitSummary,
395
- spine_summary: spineSummary,
396
- result_package_summary: resultPackageSummary,
397
- credit_pack_summary: creditPackSummary,
398
- integration_summary: integrationSummary,
399
- protocol_summary: protocolSummary,
400
- settlement_mode_summary: settlementModeSummary
401
- };
402
- }
403
-
404
- function summarizeReleasePack() {
405
- const pack = buildReleasePack();
406
- return {
407
- ok: true,
408
- product: pack.product.name,
409
- version: pack.product.version,
410
- category: pack.positioning.category,
411
- primary_audience_count: pack.positioning.primary_audiences.length,
412
- core_claim_count: pack.positioning.core_claims.length,
413
- default_protocol: pack.default_path.protocol,
414
- default_payment_protocol: pack.default_path.payment_protocol,
415
- default_settlement_mode: pack.default_path.settlement_mode,
416
- suggested_path_count: Array.isArray(pack.default_path.suggested_paths) ? pack.default_path.suggested_paths.length : 0,
417
- task_count: pack.catalog_summary.task_count,
418
- workflow_count: pack.catalog_summary.workflow_count,
419
- credit_pack_count: pack.credit_pack_summary.credit_pack_count,
420
- integration_count: pack.integration_summary.integration_count,
421
- production_default_integration_count: pack.integration_summary.production_default_count,
422
- protocol_count: pack.protocol_summary.protocol_count,
423
- settlement_mode_count: pack.settlement_mode_summary.settlement_mode_count,
424
- transaction_class_count: pack.transaction_class_summary.class_pack_count,
425
- result_package_count: pack.result_package_summary.result_package_count,
426
- first_contact_cli: pack.first_contact.direct_run_cli,
427
- install_command: pack.package_usage.install_command,
428
- verify_command: pack.package_usage.verify_command,
429
- release_cli: pack.package_usage.release_cli,
430
- doc_count: pack.package_usage.docs.length,
431
- comparison_surface: "/v1/release-pack/comparison",
432
- comparison_cli: "xytara-release --comparison",
433
- adoption_surface: "/v1/release-pack/adoption",
434
- adoption_cli: "xytara-release --adoption",
435
- scenario_surface: "/v1/release-pack/scenarios",
436
- scenario_cli: "xytara-release --scenarios",
437
- launch_surface: "/v1/release-pack/launch",
438
- launch_cli: "xytara-release --launch"
439
- };
440
- }
441
-
442
- module.exports = {
443
- buildReleasePack,
444
- summarizeReleasePack,
445
- buildComparisonPack,
446
- summarizeComparisonPack,
447
- buildAdoptionPack,
448
- summarizeAdoptionPack,
449
- buildScenarioPack,
450
- summarizeScenarioPack,
451
- buildLaunchPack,
452
- summarizeLaunchPack
453
- };
@@ -1,144 +0,0 @@
1
- "use strict";
2
-
3
- function loadRateLimitConfig() {
4
- const enabled = String(process.env.XYTARA_RATE_LIMIT_ENABLED || "true").trim().toLowerCase() !== "false";
5
- const windowMs = Math.max(1000, Number(process.env.XYTARA_RATE_LIMIT_WINDOW_MS || 60000) || 60000);
6
- const maxRequests = Math.max(1, Number(process.env.XYTARA_RATE_LIMIT_MAX_REQUESTS || 600) || 600);
7
- const routeScoped = String(process.env.XYTARA_RATE_LIMIT_ROUTE_SCOPED || "true").trim().toLowerCase() !== "false";
8
- return {
9
- enabled,
10
- window_ms: windowMs,
11
- max_requests: maxRequests,
12
- route_scoped: routeScoped
13
- };
14
- }
15
-
16
- function resolveRequestIdentity(req) {
17
- const forwarded = req && req.headers && typeof req.headers["x-forwarded-for"] === "string"
18
- ? req.headers["x-forwarded-for"].split(",")[0].trim()
19
- : "";
20
- if (forwarded) return forwarded;
21
- const socketAddress = req && req.socket && typeof req.socket.remoteAddress === "string"
22
- ? req.socket.remoteAddress.trim()
23
- : "";
24
- return socketAddress || "unknown";
25
- }
26
-
27
- function resolveRouteScope(pathname) {
28
- const path = typeof pathname === "string" && pathname.trim()
29
- ? pathname.trim()
30
- : "/";
31
- if (path === "/v1/credit-bridge/grants" || path.startsWith("/v1/credit-bridge/grants/")) {
32
- return "/v1/credit-bridge/grants";
33
- }
34
- if (path.startsWith("/v1/economics/rails/credits/")) {
35
- return "/v1/economics/rails/credits";
36
- }
37
- if (path.startsWith("/v1/economics/")) {
38
- return "/v1/economics";
39
- }
40
- if (path.startsWith("/v1/account-auth/")) {
41
- return "/v1/account-auth";
42
- }
43
- if (path.startsWith("/v1/commands/")) {
44
- return "/v1/commands";
45
- }
46
- if (path.startsWith("/v1/")) {
47
- const parts = path.split("/").filter(Boolean);
48
- return parts.length >= 2 ? `/${parts[0]}/${parts[1]}` : "/v1";
49
- }
50
- const parts = path.split("/").filter(Boolean);
51
- return parts.length ? `/${parts[0]}` : "/";
52
- }
53
-
54
- function normalizeTrustedIdentity(value) {
55
- if (typeof value !== "string") return null;
56
- const trimmed = value.trim();
57
- if (!trimmed) return null;
58
- return trimmed.replace(/[^a-zA-Z0-9_.:-]/g, "_").slice(0, 120);
59
- }
60
-
61
- function createRequestRateLimiter(config = {}) {
62
- const cfg = {
63
- ...loadRateLimitConfig(),
64
- ...(config || {})
65
- };
66
- const buckets = new Map();
67
-
68
- function sweep(nowMs) {
69
- for (const [key, bucket] of buckets.entries()) {
70
- if (!bucket || Number(bucket.reset_at_ms || 0) <= nowMs) {
71
- buckets.delete(key);
72
- }
73
- }
74
- }
75
-
76
- function check(req, options = {}) {
77
- if (!cfg.enabled) {
78
- return { ok: true, rate_limit: null };
79
- }
80
- const method = req && typeof req.method === "string" ? req.method.toUpperCase() : "GET";
81
- if (["GET", "HEAD", "OPTIONS"].includes(method)) {
82
- return { ok: true, rate_limit: null };
83
- }
84
- if (typeof cfg.skipRateLimitResolver === "function" && cfg.skipRateLimitResolver(req, options) === true) {
85
- return { ok: true, rate_limit: null, bypassed: true };
86
- }
87
-
88
- const nowMs = Date.now();
89
- sweep(nowMs);
90
- const trustedIdentity = typeof cfg.trustedIdentityResolver === "function"
91
- ? normalizeTrustedIdentity(cfg.trustedIdentityResolver(req, options))
92
- : null;
93
- const identity = trustedIdentity ? `trusted:${trustedIdentity}` : `ip:${resolveRequestIdentity(req)}`;
94
- const routeScope = cfg.route_scoped ? resolveRouteScope(options.pathname) : "*";
95
- const key = `${method}:${routeScope}:${identity}`;
96
- const current = buckets.get(key);
97
- if (!current || Number(current.reset_at_ms || 0) <= nowMs) {
98
- const next = {
99
- count: 1,
100
- reset_at_ms: nowMs + cfg.window_ms
101
- };
102
- buckets.set(key, next);
103
- return {
104
- ok: true,
105
- rate_limit: {
106
- remaining: cfg.max_requests - 1,
107
- reset_at_ms: next.reset_at_ms
108
- }
109
- };
110
- }
111
- if (current.count >= cfg.max_requests) {
112
- return {
113
- ok: false,
114
- status: 429,
115
- payload: {
116
- ok: false,
117
- reason: "rate_limit_exceeded",
118
- retry_after_ms: Math.max(0, current.reset_at_ms - nowMs)
119
- }
120
- };
121
- }
122
- current.count += 1;
123
- buckets.set(key, current);
124
- return {
125
- ok: true,
126
- rate_limit: {
127
- remaining: Math.max(0, cfg.max_requests - current.count),
128
- reset_at_ms: current.reset_at_ms
129
- }
130
- };
131
- }
132
-
133
- return {
134
- check,
135
- config: cfg
136
- };
137
- }
138
-
139
- module.exports = {
140
- createRequestRateLimiter,
141
- loadRateLimitConfig,
142
- resolveRequestIdentity,
143
- resolveRouteScope
144
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- function buildMissingResponse(reason) {
4
- return {
5
- status: 404,
6
- payload: { ok: false, reason }
7
- };
8
- }
9
-
10
- function buildNamedRecordResponse(key, record, missingReason) {
11
- if (!record) {
12
- return buildMissingResponse(missingReason);
13
- }
14
- return {
15
- status: 200,
16
- payload: { ok: true, [key]: record }
17
- };
18
- }
19
-
20
- function buildNamedRecordListResponse(key, records) {
21
- return {
22
- status: 200,
23
- payload: { ok: true, [key]: records }
24
- };
25
- }
26
-
27
- module.exports = {
28
- buildMissingResponse,
29
- buildNamedRecordListResponse,
30
- buildNamedRecordResponse
31
- };