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,322 +0,0 @@
1
- "use strict";
2
-
3
- const { createCommandArtifacts } = require("./commerce_artifacts");
4
- const { createQuote, hydrateQuoteStates, markQuoteExecuted } = require("./commerce_quotes");
5
- const { listRecords } = require("./record_queries");
6
- const { createBsvSettlementRecord } = require("./settlement_bsv_live");
7
- const {
8
- actOnDispute,
9
- actOnRefund,
10
- actOnRemediationTicket,
11
- createDispute,
12
- createRefund,
13
- createRemediationTicket,
14
- settleRefundAsCredit
15
- } = require("./commerce_cases");
16
-
17
- function createRuntimeState() {
18
- return {
19
- quotes: new Map(),
20
- checkoutPurchaseIntents: new Map(),
21
- checkoutSessions: new Map(),
22
- checkoutEvents: new Map(),
23
- externalCreditGrants: new Map(),
24
- accountAuthorityBindings: new Map(),
25
- accountSpendCredentials: new Map(),
26
- accountSpendCredentialsByToken: new Map(),
27
- machineIdentityBindings: new Map(),
28
- operatorParticipants: new Map(),
29
- networkParticipants: new Map(),
30
- runtimeBridgeDispatches: new Map(),
31
- agentAccounts: new Map(),
32
- transactions: new Map(),
33
- receipts: new Map(),
34
- paymentLedger: [],
35
- bsvSettlementRecords: new Map(),
36
- providerRegistry: new Map(),
37
- providerSettlementLedger: [],
38
- providerPayouts: [],
39
- acceptedPaymentNonces: new Set(),
40
- acceptedAgentSignatures: new Map(),
41
- inFlightPaymentAuthorizations: new Map(),
42
- economicsBudgets: new Map(),
43
- economicsAgents: new Map(),
44
- economicsReceipts: new Map(),
45
- economicsAllocations: [],
46
- economicsRailCredits: [],
47
- economicsEntitlements: new Map(),
48
- economicsCreditSpends: [],
49
- economicsUsageMeters: new Map(),
50
- economicsInterpretationHandoffs: [],
51
- economicsJobActions: [],
52
- coordinationHandoffs: [],
53
- zoneAdmissionCases: [],
54
- deliveries: new Map(),
55
- pendingExecutions: new Map(),
56
- disputes: new Map(),
57
- refunds: new Map(),
58
- remediationTickets: new Map()
59
- };
60
- }
61
-
62
- function buildDeliveryEvent(event, delivery, atIso, extra) {
63
- return {
64
- event,
65
- at_iso: atIso,
66
- status: delivery.status,
67
- callback_url: delivery.callback_url || null,
68
- output_ref: delivery.output_ref || null,
69
- proof_ref: delivery.proof_ref || null,
70
- ...(extra || {})
71
- };
72
- }
73
-
74
- function buildCallbackDeliveryState(callbackUrl, deliveredAtIso, options = {}) {
75
- if (!callbackUrl) return null;
76
- const opts = options || {};
77
- const initialStatus = opts.initial_status || (deliveredAtIso ? "queued" : "pending_execution");
78
- return {
79
- status: initialStatus,
80
- attempt_count: 0,
81
- max_attempts: null,
82
- last_attempt_at_iso: null,
83
- next_attempt_at_iso: deliveredAtIso || null,
84
- delivered_at_iso: null,
85
- failed_at_iso: null,
86
- last_error: null,
87
- last_response_status: null,
88
- signature_mode: "hmac_sha256"
89
- };
90
- }
91
-
92
- function completePendingExecution(state, transactionId) {
93
- if (!transactionId || !state.pendingExecutions.has(transactionId) || !state.transactions.has(transactionId)) {
94
- return state.transactions.get(transactionId) || null;
95
- }
96
- const pending = state.pendingExecutions.get(transactionId);
97
- const current = state.transactions.get(transactionId);
98
- if (!pending || !current || Date.now() < pending.readyAtMs) {
99
- return current;
100
- }
101
-
102
- const completedAtIso = new Date(pending.readyAtMs).toISOString();
103
- const next = {
104
- transaction: {
105
- ...current.transaction,
106
- status: "completed",
107
- completed_at_iso: completedAtIso,
108
- timing: {
109
- ...current.transaction.timing,
110
- completed_at_iso: completedAtIso,
111
- duration_ms: pending.durationMs,
112
- observed_latency_class: pending.observedLatencyClass,
113
- assessment: pending.assessment
114
- },
115
- execution: {
116
- ...current.transaction.execution,
117
- status: "completed"
118
- },
119
- remediation: {
120
- ...current.transaction.remediation,
121
- updated_at_iso: completedAtIso
122
- }
123
- },
124
- receipt: {
125
- ...current.receipt,
126
- status: "completed",
127
- created_at_iso: completedAtIso,
128
- timing: {
129
- ...current.receipt.timing,
130
- completed_at_iso: completedAtIso,
131
- duration_ms: pending.durationMs,
132
- observed_latency_class: pending.observedLatencyClass,
133
- assessment: pending.assessment
134
- },
135
- remediation: {
136
- ...current.receipt.remediation,
137
- updated_at_iso: completedAtIso
138
- }
139
- },
140
- command: current.command
141
- };
142
-
143
- state.transactions.set(transactionId, next);
144
- state.receipts.set(next.receipt.receipt_id, next);
145
- if (pending.quoteId && state.quotes.has(pending.quoteId)) {
146
- const quote = state.quotes.get(pending.quoteId);
147
- state.quotes.set(pending.quoteId, {
148
- ...quote,
149
- status: "executed",
150
- payment_recorded_at_iso: completedAtIso,
151
- executed_at_iso: completedAtIso
152
- });
153
- }
154
- if (pending.deliveryId && state.deliveries.has(pending.deliveryId)) {
155
- const delivery = state.deliveries.get(pending.deliveryId);
156
- const nextDelivery = {
157
- ...delivery,
158
- status: "delivered",
159
- delivered_at_iso: completedAtIso,
160
- receipt_id: next.receipt.receipt_id,
161
- proof_ref: next.receipt.proof_ref,
162
- attempt_count: (delivery.attempt_count || 0) + 1,
163
- last_attempt_at_iso: completedAtIso,
164
- history: [
165
- ...(Array.isArray(delivery.history) ? delivery.history : []),
166
- buildDeliveryEvent("delivered", { ...delivery, status: "delivered", proof_ref: next.receipt.proof_ref }, completedAtIso, {
167
- attempt_number: (delivery.attempt_count || 0) + 1
168
- })
169
- ],
170
- callback_delivery: delivery.callback_url
171
- ? {
172
- ...(delivery.callback_delivery || buildCallbackDeliveryState(delivery.callback_url, completedAtIso)),
173
- status: "queued",
174
- next_attempt_at_iso: completedAtIso,
175
- last_error: null,
176
- failed_at_iso: null
177
- }
178
- : null
179
- };
180
- state.deliveries.set(pending.deliveryId, nextDelivery);
181
- }
182
- state.pendingExecutions.delete(transactionId);
183
- return next;
184
- }
185
-
186
- function hydratePendingExecutions(state) {
187
- for (const transactionId of Array.from(state.pendingExecutions.keys())) {
188
- completePendingExecution(state, transactionId);
189
- }
190
- }
191
-
192
- function createCommandResult(state, payload, quote, options) {
193
- const opts = options || {};
194
- const deferredCompletion = payload && payload.defer_completion === true;
195
- const { transaction, receipt, command } = createCommandArtifacts(payload, quote, {
196
- deferredCompletion,
197
- paymentVerification: opts.paymentVerification || null,
198
- externalExecution: opts.externalExecution || null
199
- });
200
- const result = { transaction, receipt, command };
201
- state.transactions.set(transaction.transaction_id, result);
202
- state.receipts.set(receipt.receipt_id, result);
203
- let paymentRecord = null;
204
- if (!opts.skipPaymentLedger) {
205
- paymentRecord = {
206
- payment_id: `pay_${quote.quote_id}`,
207
- quote_id: quote.quote_id,
208
- transaction_id: transaction.transaction_id,
209
- receipt_id: receipt.receipt_id,
210
- account_id: quote.account_id,
211
- amount_minor: quote.amount_minor,
212
- currency: quote.currency,
213
- settlement_adapter: quote.settlement_adapter,
214
- settlement_integration_id: quote.settlement_integration_id || null,
215
- recorded_at_iso: receipt.created_at_iso,
216
- payment: transaction.payment,
217
- settlement: transaction.settlement,
218
- treasury: transaction.treasury,
219
- default_path: transaction.default_path,
220
- payment_verification: opts.paymentVerification
221
- ? {
222
- verification_mode: opts.paymentVerification.verification_mode || null,
223
- wallet_id: opts.paymentVerification.wallet_id || null,
224
- age_seconds: Number.isFinite(Number(opts.paymentVerification.age_seconds))
225
- ? Number(opts.paymentVerification.age_seconds)
226
- : null
227
- }
228
- : null
229
- };
230
- state.paymentLedger = [
231
- paymentRecord,
232
- ...(Array.isArray(state.paymentLedger) ? state.paymentLedger : [])
233
- ].slice(0, 100);
234
- const liveSettlement = createBsvSettlementRecord(state, transaction, receipt, paymentRecord);
235
- if (liveSettlement) {
236
- paymentRecord.live_settlement = {
237
- settlement_id: liveSettlement.settlement_id,
238
- status: liveSettlement.status,
239
- finality_status: liveSettlement.finality_status,
240
- txid: liveSettlement.txid,
241
- rail: liveSettlement.rail
242
- };
243
- transaction.settlement.live = paymentRecord.live_settlement;
244
- receipt.settlement.live = paymentRecord.live_settlement;
245
- }
246
- }
247
- if (opts.creditSpend) {
248
- transaction.credit_spend = opts.creditSpend;
249
- receipt.credit_spend = opts.creditSpend;
250
- }
251
- const deliveryRecord = {
252
- delivery_id: `delivery_${transaction.transaction_id}`,
253
- transaction_id: transaction.transaction_id,
254
- receipt_id: receipt.receipt_id,
255
- quote_id: quote.quote_id,
256
- account_id: quote.account_id,
257
- callback_url: transaction.callback_url,
258
- output_ref: transaction.output_ref,
259
- proof_ref: receipt.proof_ref,
260
- payment_id: paymentRecord ? paymentRecord.payment_id : null,
261
- delivery_target_kind: transaction.callback_url ? "callback" : "direct",
262
- status: deferredCompletion ? "pending_delivery" : "delivered",
263
- created_at_iso: transaction.created_at_iso,
264
- delivered_at_iso: deferredCompletion ? null : receipt.created_at_iso,
265
- attempt_count: deferredCompletion ? 0 : 1,
266
- last_attempt_at_iso: deferredCompletion ? null : receipt.created_at_iso,
267
- callback_delivery: buildCallbackDeliveryState(
268
- transaction.callback_url,
269
- deferredCompletion ? null : receipt.created_at_iso,
270
- {
271
- initial_status: deferredCompletion ? "pending_execution" : "queued"
272
- }
273
- ),
274
- history: [
275
- buildDeliveryEvent("created", {
276
- callback_url: transaction.callback_url,
277
- output_ref: transaction.output_ref,
278
- proof_ref: receipt.proof_ref,
279
- status: deferredCompletion ? "pending_delivery" : "delivered"
280
- }, transaction.created_at_iso),
281
- ...(!deferredCompletion ? [
282
- buildDeliveryEvent("delivered", {
283
- callback_url: transaction.callback_url,
284
- output_ref: transaction.output_ref,
285
- proof_ref: receipt.proof_ref,
286
- status: "delivered"
287
- }, receipt.created_at_iso, { attempt_number: 1 })
288
- ] : [])
289
- ]
290
- };
291
- state.deliveries.set(deliveryRecord.delivery_id, deliveryRecord);
292
- markQuoteExecuted(state, quote, result, paymentRecord, { deferredCompletion });
293
- if (deferredCompletion) {
294
- state.pendingExecutions.set(transaction.transaction_id, {
295
- readyAtMs: Date.now() + 300,
296
- quoteId: quote.quote_id,
297
- deliveryId: deliveryRecord.delivery_id,
298
- durationMs: 250,
299
- observedLatencyClass: "instant",
300
- assessment: "within_posture"
301
- });
302
- }
303
- return result;
304
- }
305
-
306
- module.exports = {
307
- buildCallbackDeliveryState,
308
- completePendingExecution,
309
- createCommandResult,
310
- createDispute,
311
- createQuote,
312
- createRefund,
313
- createRemediationTicket,
314
- createRuntimeState,
315
- hydrateQuoteStates,
316
- hydratePendingExecutions,
317
- actOnDispute,
318
- actOnRefund,
319
- actOnRemediationTicket,
320
- settleRefundAsCredit,
321
- listRecords
322
- };
@@ -1,257 +0,0 @@
1
- "use strict";
2
-
3
- const crypto = require("crypto");
4
-
5
- function normalizeString(value) {
6
- return String(value == null ? "" : value).trim();
7
- }
8
-
9
- function shellHash(seed) {
10
- return crypto.createHash("sha256").update(seed).digest("hex");
11
- }
12
-
13
- function buildShellRef(prefix, seed) {
14
- return `${prefix}.${shellHash(JSON.stringify(seed)).slice(0, 16)}`;
15
- }
16
-
17
- function buildAgentAccountPublicView(payload, includeOnboarding = false) {
18
- const item = payload && typeof payload === "object" ? payload : {};
19
- const view = {
20
- ok: item.ok === true,
21
- account: item.account && typeof item.account === "object" ? item.account : null
22
- };
23
- if (includeOnboarding) {
24
- view.onboarding = item.onboarding && typeof item.onboarding === "object" ? item.onboarding : null;
25
- }
26
- return view;
27
- }
28
-
29
- function createAgentAccount(state, body) {
30
- const input = body && typeof body === "object" && !Array.isArray(body) ? body : {};
31
- const requestedLabel = normalizeString(input.label || input.name || input.account_label || "");
32
- const settlementMode = normalizeString(input.settlement_mode || "ethereum_evm");
33
- const protocol = normalizeString(input.protocol || "mcp");
34
- const adapterProfile = normalizeString(input.adapter_profile || "default");
35
- const seed = shellHash(JSON.stringify({
36
- requestedLabel,
37
- settlementMode,
38
- protocol,
39
- adapterProfile,
40
- createdAt: new Date().toISOString()
41
- }));
42
- const accountId = `acct_${seed.slice(0, 12)}`;
43
- const walletId = `wallet_${seed.slice(12, 24)}`;
44
- const apiKey = `xytara_live_${seed.slice(24, 48)}`;
45
- const walletSecret = `xytara_wallet_${seed.slice(0, 32)}`;
46
- const account = {
47
- account_id: accountId,
48
- wallet_id: walletId,
49
- label: requestedLabel || accountId,
50
- settlement_mode: settlementMode,
51
- protocol,
52
- adapter_profile: adapterProfile,
53
- status: "active",
54
- created_at_iso: new Date().toISOString()
55
- };
56
- const payload = {
57
- ok: true,
58
- account,
59
- onboarding: {
60
- api_key: apiKey,
61
- wallet_secret: walletSecret,
62
- default_headers: {
63
- authorization: `Bearer ${apiKey}`,
64
- "x-xytara-wallet-id": walletId
65
- },
66
- default_context: {
67
- account_id: accountId,
68
- settlement_mode: settlementMode,
69
- protocol
70
- },
71
- next_surfaces: {
72
- transaction_center: "/v1/transaction-center",
73
- operations_dashboard: `/v1/operations/dashboard?account_id=${encodeURIComponent(accountId)}`,
74
- operator_shell_summary: "/v1/operator-shell/summary"
75
- }
76
- }
77
- };
78
- state.agentAccounts.set(accountId, payload);
79
- return payload;
80
- }
81
-
82
- function listAgentAccounts(state) {
83
- const accounts = Array.from(state.agentAccounts.values()).map((entry) => entry.account);
84
- return {
85
- ok: true,
86
- count: accounts.length,
87
- accounts
88
- };
89
- }
90
-
91
- function getAgentAccount(state, accountId) {
92
- const payload = state.agentAccounts.get(accountId) || null;
93
- return payload ? buildAgentAccountPublicView(payload, false) : null;
94
- }
95
-
96
- function buildOperatorShellCenter() {
97
- return {
98
- center_ref: "operator-shell.center",
99
- account_issue_surface: "/v1/agent-accounts",
100
- summary_surface: "/v1/operator-shell/summary",
101
- workflow_pack_surface: "/v1/operator-shell/workflow-pack",
102
- admin_pack_surface: "/v1/operator-shell/admin-pack",
103
- supported_capabilities: [
104
- "agent_account_onboarding",
105
- "operator_shell_summary",
106
- "workflow_packaging",
107
- "admin_packaging",
108
- "cross_layer_visibility",
109
- "hosted_checkout_review_visibility"
110
- ]
111
- };
112
- }
113
-
114
- function summarizeOperatorShellCenter() {
115
- const center = buildOperatorShellCenter();
116
- return {
117
- center_ref: center.center_ref,
118
- capability_count: center.supported_capabilities.length,
119
- account_issue_surface: center.account_issue_surface,
120
- workflow_pack_surface: center.workflow_pack_surface
121
- };
122
- }
123
-
124
- function buildOperatorShellSummary(input) {
125
- const body = input && typeof input === "object" && !Array.isArray(input) ? input : {};
126
- const accountId = normalizeString(body.account_id || "acct_demo");
127
- const operationsDashboard = body.operations_dashboard || {};
128
- const operatorExportPack = body.operator_export_pack || {};
129
- const economicsOperatorView = body.economics_operator_view || {};
130
- const economicsOperatorDashboard = body.economics_operator_dashboard || {};
131
- const coordinationOperatorView = body.coordination_operator_view || {};
132
- const coordinationAdminView = body.coordination_admin_view || {};
133
- const hostedCheckoutOperatorSummary = body.hosted_checkout_operator_summary || {};
134
- const entitlementReplenishmentSummary = body.entitlement_replenishment_summary || {};
135
- const runtimeDurability = body.runtime_durability || {};
136
- const nativeSettlementReadiness = body.native_settlement_readiness || {};
137
-
138
- return {
139
- ok: true,
140
- shell_summary_ref: buildShellRef("operator-shell.summary", {
141
- account_id: accountId,
142
- attention_count: operationsDashboard.attention_count || 0,
143
- export_version: operatorExportPack.export_version || null
144
- }),
145
- account_id: accountId,
146
- shell_surfaces: {
147
- operations_dashboard: "/v1/operations/dashboard",
148
- operator_export_pack: "/v1/operator-export-pack",
149
- economics_operator_view: `/v1/economics/accounts/${encodeURIComponent(accountId)}/operator-view`,
150
- economics_operator_dashboard: `/v1/economics/accounts/${encodeURIComponent(accountId)}/operator-dashboard`,
151
- coordination_operator_view: "/v1/coordination-center/operator-view",
152
- coordination_admin_view: "/v1/coordination-center/admin-view",
153
- hosted_checkout_purchase_intents: `/v1/checkout/purchase-intents?account_id=${encodeURIComponent(accountId)}`,
154
- hosted_checkout_runtime_bridge_dispatches: `/v1/runtime-bridge/dispatches?account_id=${encodeURIComponent(accountId)}`,
155
- runtime_durability: "/v1/runtime/durability",
156
- native_settlement_readiness: "/v1/settlement/bsv-teranode/readiness",
157
- proof_governance_dashboard: "/v1/proof-center/governance/dashboard",
158
- proof_bridge_admin_pack: "/v1/proof-center/bridge/admin-pack"
159
- },
160
- shell_state: {
161
- attention_count: Number(operationsDashboard.attention_count || 0),
162
- open_issue_count: Number(operationsDashboard.open_issue_count || 0),
163
- export_generated_at_iso: operatorExportPack.generated_at_iso || null,
164
- economics_receipt_count: Number(
165
- economicsOperatorDashboard.receipt_summary && economicsOperatorDashboard.receipt_summary.receipt_count || 0
166
- ),
167
- coordination_zone_count: Number(coordinationAdminView.zone_count || coordinationOperatorView.zone_count || 0),
168
- hosted_checkout_purchase_intent_count: Number(hostedCheckoutOperatorSummary.purchase_intent_count || 0),
169
- hosted_checkout_refund_review_required_count: Number(hostedCheckoutOperatorSummary.refund_review_required_count || 0),
170
- hosted_checkout_execution_dispatched_count: Number(hostedCheckoutOperatorSummary.execution_dispatched_count || 0),
171
- hosted_checkout_auto_compensated_count: Number(hostedCheckoutOperatorSummary.auto_compensated_count || 0),
172
- hosted_checkout_compensation_review_required_count: Number(hostedCheckoutOperatorSummary.compensation_review_required_count || 0),
173
- hosted_checkout_compensation_failed_count: Number(hostedCheckoutOperatorSummary.compensation_failed_count || 0),
174
- low_balance_entitlement_count: Number(entitlementReplenishmentSummary.low_balance_count || 0),
175
- depleted_entitlement_count: Number(entitlementReplenishmentSummary.depleted_count || 0),
176
- runtime_snapshot_enabled: runtimeDurability.enabled === true,
177
- runtime_snapshot_exists: runtimeDurability.snapshot_exists === true,
178
- runtime_recovery_posture: runtimeDurability.recovery_posture || null,
179
- native_settlement_runtime_mode: runtimeDurability.enabled === true || nativeSettlementReadiness.runtime_mode
180
- ? nativeSettlementReadiness.runtime_mode || null
181
- : null,
182
- native_settlement_ready: nativeSettlementReadiness.ready === true,
183
- native_settlement_blocker_count: Array.isArray(nativeSettlementReadiness.blockers)
184
- ? nativeSettlementReadiness.blockers.length
185
- : 0
186
- },
187
- linked_refs: {
188
- operations_dashboard_ref: buildShellRef("operator-shell.operations-dashboard", {
189
- account_id: accountId,
190
- attention_count: operationsDashboard.attention_count || 0,
191
- attention_signal_count: operationsDashboard.attention_signal_count || 0
192
- }),
193
- economics_operator_view_ref: economicsOperatorView.operator_view_ref || null,
194
- economics_operator_dashboard_ref: economicsOperatorDashboard.operator_dashboard_ref || null,
195
- coordination_operator_view_ref: coordinationOperatorView.operator_view_ref || null,
196
- coordination_admin_view_ref: coordinationAdminView.admin_view_ref || null,
197
- hosted_checkout_operator_summary_ref: hostedCheckoutOperatorSummary.operator_summary_ref || null
198
- ,
199
- entitlement_replenishment_summary_ref: entitlementReplenishmentSummary.entitlement_count != null
200
- ? `/v1/economics/accounts/${encodeURIComponent(accountId)}/entitlements/replenishment-summary`
201
- : null,
202
- runtime_durability_ref: runtimeDurability.inspect_ref || "/v1/runtime/durability",
203
- native_settlement_readiness_ref: nativeSettlementReadiness.readiness_ref || "/v1/settlement/bsv-teranode/readiness"
204
- }
205
- };
206
- }
207
-
208
- function buildOperatorShellWorkflowPack(summary) {
209
- const shellSummary = buildOperatorShellSummary(summary);
210
- return {
211
- ok: true,
212
- workflow_pack_ref: buildShellRef("operator-shell.workflow-pack", shellSummary),
213
- shell_summary_ref: shellSummary.shell_summary_ref,
214
- account_id: shellSummary.account_id,
215
- workflow_steps: [
216
- "issue_or_select_agent_account",
217
- "start_or_review_governed_transaction",
218
- "review_hosted_checkout_purchase_and_refund_queue",
219
- "inspect_economics_and_coordination",
220
- "export_operator_pack",
221
- "handoff_to_proof_review_when_needed"
222
- ],
223
- linked_surfaces: shellSummary.shell_surfaces
224
- };
225
- }
226
-
227
- function buildOperatorShellAdminPack(summary) {
228
- const shellSummary = buildOperatorShellSummary(summary);
229
- const workflowPack = buildOperatorShellWorkflowPack(summary);
230
- return {
231
- ok: true,
232
- admin_pack_ref: buildShellRef("operator-shell.admin-pack", {
233
- shell_summary_ref: shellSummary.shell_summary_ref,
234
- workflow_pack_ref: workflowPack.workflow_pack_ref
235
- }),
236
- shell_summary_ref: shellSummary.shell_summary_ref,
237
- workflow_pack_ref: workflowPack.workflow_pack_ref,
238
- operator_refs: shellSummary.linked_refs,
239
- export_surface: "/v1/operator-export-pack",
240
- guidance: [
241
- "operator_shell_is_a_public_control_surface_inside_xytara",
242
- "operator_shell_does_not_create_a_separate_product_identity"
243
- ]
244
- };
245
- }
246
-
247
- module.exports = {
248
- buildAgentAccountPublicView,
249
- createAgentAccount,
250
- listAgentAccounts,
251
- getAgentAccount,
252
- buildOperatorShellCenter,
253
- summarizeOperatorShellCenter,
254
- buildOperatorShellSummary,
255
- buildOperatorShellWorkflowPack,
256
- buildOperatorShellAdminPack
257
- };
@@ -1,125 +0,0 @@
1
- "use strict";
2
-
3
- const packageJson = require("../package.json");
4
-
5
- function buildCryptoAgilityMatrixPack() {
6
- return {
7
- ok: true,
8
- product: packageJson.name,
9
- category: "naxytra-crypto-agility-matrix",
10
- pack_version: "naxytra-crypto-agility-matrix-v1",
11
- doctrine: "xytara_consumes_crypto_agility_rules_without_claiming_unverified_future_algorithms_as_core_truth",
12
- model_state: "core_now",
13
- core_claim: "the stack must be explicit about which algorithms are core today, supported today, future lane, blocked, or never core",
14
- lane_classes: [
15
- {
16
- lane_class: "core_today",
17
- description: "verified and claimable today",
18
- items: [
19
- "sha256_domain_separated_commitments",
20
- "ed25519",
21
- "secp256k1",
22
- "p256",
23
- "native_anchor_binding",
24
- "line_rate_transport_frame"
25
- ]
26
- },
27
- {
28
- lane_class: "supported_today",
29
- description: "supported as interop or external verification lanes today",
30
- items: [
31
- "jwt",
32
- "jws",
33
- "jwk",
34
- "did",
35
- "vc",
36
- "sd_jwt_vc",
37
- "webauthn_cose_when_verifier_present"
38
- ]
39
- },
40
- {
41
- lane_class: "future_lane",
42
- description: "explicit future cryptographic direction, not claimable as the current core",
43
- items: [
44
- "ml_dsa",
45
- "slh_dsa",
46
- "xoonya_native_hybrid_v1",
47
- "xoonya_native_atom_v2"
48
- ]
49
- },
50
- {
51
- lane_class: "blocked_until_vectors",
52
- description: "not claimable until validators and vectors exist",
53
- items: [
54
- "webauthn_cose",
55
- "dilithium",
56
- "falcon",
57
- "sphincs_plus"
58
- ]
59
- },
60
- {
61
- lane_class: "never_core",
62
- description: "must never become implicit or silent core behavior",
63
- items: [
64
- "silent_algorithm_negotiation",
65
- "implicit_downgrade",
66
- "unversioned_signature_assumptions",
67
- "hidden_verifier_boundaries"
68
- ]
69
- }
70
- ],
71
- signature_suites: [
72
- { suite_id: "ed25519", state: "core_today" },
73
- { suite_id: "secp256k1", state: "core_today" },
74
- { suite_id: "p256", state: "core_today" },
75
- { suite_id: "webauthn-cose", state: "blocked_until_vectors" },
76
- { suite_id: "dilithium", state: "blocked_until_vectors" },
77
- { suite_id: "falcon", state: "blocked_until_vectors" },
78
- { suite_id: "sphincs-plus", state: "blocked_until_vectors" },
79
- { suite_id: "ml-dsa", state: "future_lane" },
80
- { suite_id: "slh-dsa", state: "future_lane" }
81
- ],
82
- proof_envelope_rules: [
83
- "signature_suite_must_be_explicit",
84
- "unsupported_suites_must_not_be_claimed_as_verified",
85
- "native_proof_methods_remain_optional",
86
- "envelopes_must_not_redefine_receipt_validity",
87
- "envelope_claims_must_stay_bounded_to_verified_behavior"
88
- ],
89
- linked_surfaces: {
90
- native_standard_ref: "/v1/proof-center/native-standard",
91
- native_standard_summary_ref: "/v1/proof-center/native-standard/summary",
92
- native_atom_spec_ref: "/v1/proof-center/native-atom-spec",
93
- native_payload_profile_ref: "/v1/proof-center/native-payload-profile",
94
- native_anchor_profile_ref: "/v1/proof-center/native-anchor-profile"
95
- },
96
- claim_boundary: "claim_the_crypto_agility_policy_for_xytara_only_without_claiming_unverified_future_algorithms_as_current_core_truth"
97
- };
98
- }
99
-
100
- function summarizeCryptoAgilityMatrixPack() {
101
- const pack = buildCryptoAgilityMatrixPack();
102
- return {
103
- ok: true,
104
- product: pack.product,
105
- category: pack.category,
106
- summary_version: "naxytra-crypto-agility-matrix-summary-v1",
107
- pack_version: pack.pack_version,
108
- model_state: pack.model_state,
109
- lane_class_count: pack.lane_classes.length,
110
- signature_suite_count: pack.signature_suites.length,
111
- rule_count: pack.proof_envelope_rules.length,
112
- linked_surfaces: pack.linked_surfaces
113
- };
114
- }
115
-
116
- function getCryptoAgilitySuiteDetail(suiteId) {
117
- const normalized = String(suiteId || "").trim().toLowerCase();
118
- return (buildCryptoAgilityMatrixPack().signature_suites || []).find((entry) => entry.suite_id === normalized) || null;
119
- }
120
-
121
- module.exports = {
122
- buildCryptoAgilityMatrixPack,
123
- summarizeCryptoAgilityMatrixPack,
124
- getCryptoAgilitySuiteDetail
125
- };