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.
- package/README.md +120 -92
- package/RELEASE_NOTES.md +7 -3
- package/START_HERE.md +56 -224
- package/bin/xytara.js +21 -8
- package/client.js +79 -1
- package/lib/{delivery_receipt.js → delivery_receipt_verify.js} +14 -100
- package/package.json +25 -35
- package/scripts/verify_client.js +418 -0
- package/scripts/verify_release_candidate.js +146 -45
- package/.env.example +0 -173
- package/ADAPTER_START_HERE.md +0 -56
- package/BSV_TERANODE_PLATFORM_DISCONTINUITY_RUNBOOK.md +0 -126
- package/CARRIED_HANDOFF_DEMO.md +0 -60
- package/EXAMPLE_PATHS.md +0 -53
- package/FINAL_CONTRACT.md +0 -498
- package/PARTNER_READY_PATH.md +0 -71
- package/PUBLIC_DEMO_SCRIPT.md +0 -78
- package/REAL_PAYMENT_SETUP.md +0 -320
- package/SERVICE_CONTRACT.md +0 -419
- package/SUPABASE_RUNTIME_STATE_SETUP.md +0 -61
- package/TERMINOLOGY.md +0 -50
- package/WHY_XYTARA_XOONYA.md +0 -63
- package/XT1_EXECUTION_TRUTH_STANDARD.md +0 -78
- package/XYTARA_ADAPTER_PROTOCOL_TRUTH_MODEL.md +0 -75
- package/XYTARA_AUTONOMOUS_ENTRY_MODEL.md +0 -124
- package/XYTARA_DEFAULT_PATH_MODEL.md +0 -84
- package/XYTARA_EXECUTION_TRUTH_MODEL.md +0 -171
- package/XYTARA_PAYMENT_RAIL_TRUTH_MODEL.md +0 -68
- package/adapters/AUTHORING_GUIDE.md +0 -244
- package/adapters/ONBOARDING_POSTURE.md +0 -61
- package/adapters/THIRD_PARTY_SUBMISSION_PROCESS.md +0 -84
- package/adapters/adapter-manifest.schema.json +0 -283
- package/adapters/examples/example-execution-adapter.js +0 -61
- package/adapters/examples/example-execution-adapter.manifest.json +0 -81
- package/adapters/examples/example-settlement-adapter.js +0 -55
- package/adapters/examples/example-settlement-adapter.manifest.json +0 -78
- package/adapters/examples/example-third-party-acp-registration.submission-bundle.json +0 -124
- package/adapters/examples/example-third-party-erc8004-registration.submission-bundle.json +0 -121
- package/adapters/examples/example-third-party-identity-registration.certification-pack.json +0 -22
- package/adapters/examples/example-third-party-identity-registration.record.json +0 -26
- package/adapters/examples/example-third-party-identity-registration.submission-bundle.json +0 -126
- package/adapters/examples/example-third-party-langchain-registration.submission-bundle.json +0 -124
- package/adapters/examples/example-third-party-mpp-registration.submission-bundle.json +0 -120
- package/adapters/examples/example-third-party-registration.certification-pack.json +0 -22
- package/adapters/examples/example-third-party-registration.record.json +0 -28
- package/adapters/examples/example-third-party-registration.submission-bundle.json +0 -126
- package/adapters/examples/example-third-party-settlement-registration.certification-pack.json +0 -22
- package/adapters/examples/example-third-party-settlement-registration.record.json +0 -26
- package/adapters/examples/example-third-party-settlement-registration.submission-bundle.json +0 -127
- package/adapters/examples/langchain-reference-execution-adapter.js +0 -81
- package/adapters/examples/langchain-reference-execution-adapter.manifest.json +0 -79
- package/adapters/examples/langgraph-reference-execution-adapter.js +0 -81
- package/adapters/examples/langgraph-reference-execution-adapter.manifest.json +0 -79
- package/adapters/examples/minimal-third-party-execution-adapter.js +0 -61
- package/adapters/examples/minimal-third-party-execution-adapter.manifest.json +0 -79
- package/adapters/examples/minimal-third-party-execution-registration.record.json +0 -26
- package/adapters/examples/minimal-third-party-execution.certification-pack.json +0 -22
- package/adapters/examples/minimal-third-party-execution.submission-bundle.json +0 -126
- package/adapters/integration-certification-pack.schema.json +0 -82
- package/adapters/integration-registration-record.schema.json +0 -114
- package/adapters/integration-submission-bundle-set.schema.json +0 -39
- package/adapters/integration-submission-bundle.schema.json +0 -34
- package/adapters/interfaces.js +0 -56
- package/bin/xytara-release.js +0 -1429
- package/examples/_demo_env.js +0 -40
- package/examples/adapter_review_walkthrough.js +0 -54
- package/examples/export_carried_handoff.js +0 -81
- package/examples/funded_runtime_walkthrough.js +0 -71
- package/examples/partner_launch_walkthrough.js +0 -44
- package/examples/quickstart.js +0 -3256
- package/fixtures/catalog.js +0 -1156
- package/index.js +0 -395
- package/integrations/dispatch.js +0 -276
- package/integrations/registry-snapshot.schema.json +0 -36
- package/integrations/registry.js +0 -2261
- package/integrations/views.js +0 -28
- package/lib/a2a_lane_contract.js +0 -104
- package/lib/a2a_rpc.js +0 -287
- package/lib/a2c_lane_contract.js +0 -111
- package/lib/account_auth.js +0 -585
- package/lib/acp_lane_contract.js +0 -54
- package/lib/activity_audit_contract.js +0 -322
- package/lib/adapter_certification_contract.js +0 -130
- package/lib/adapter_depth_contract.js +0 -218
- package/lib/adapter_pack.js +0 -118
- package/lib/adapter_partner_pack.js +0 -89
- package/lib/adapter_promotion_pack.js +0 -89
- package/lib/adapter_protocol_truth_contract.js +0 -229
- package/lib/agent_identity.js +0 -162
- package/lib/announcement_pack.js +0 -61
- package/lib/artifact_distribution_lane_contract.js +0 -54
- package/lib/asyncapi_contract.js +0 -150
- package/lib/auth_interop_contract.js +0 -80
- package/lib/authority_binding_lifecycle_contract.js +0 -182
- package/lib/autonomous_entry_contract.js +0 -409
- package/lib/bolt_adapter.js +0 -187
- package/lib/bolt_lane_contract.js +0 -55
- package/lib/bolt_payment_front.js +0 -224
- package/lib/business_cockpit.js +0 -378
- package/lib/buyer_event_log.js +0 -230
- package/lib/buyer_safety_policy.js +0 -132
- package/lib/capability_execution_truth.js +0 -276
- package/lib/capability_registry.js +0 -633
- package/lib/catalog_contract.js +0 -966
- package/lib/catalog_family_model.js +0 -193
- package/lib/catalog_views.js +0 -55
- package/lib/cdp_jwt.js +0 -57
- package/lib/checkout_event_security.js +0 -142
- package/lib/checkout_processor_adapter.js +0 -217
- package/lib/cloudevents_contract.js +0 -80
- package/lib/command_flow.js +0 -911
- package/lib/commerce_artifacts.js +0 -591
- package/lib/commerce_authority.js +0 -449
- package/lib/commerce_bridge.js +0 -274
- package/lib/commerce_cases.js +0 -399
- package/lib/commerce_checkout.js +0 -509
- package/lib/commerce_coordination.js +0 -346
- package/lib/commerce_economics.js +0 -4017
- package/lib/commerce_identity.js +0 -578
- package/lib/commerce_quotes.js +0 -266
- package/lib/commerce_reports.js +0 -14461
- package/lib/commerce_runtime.js +0 -322
- package/lib/commerce_shell.js +0 -257
- package/lib/crypto_agility_matrix.js +0 -125
- package/lib/default_path_contract.js +0 -412
- package/lib/delivery_summary_contract.js +0 -95
- package/lib/ecosystem_entry.js +0 -64
- package/lib/erc8004_lane_contract.js +0 -65
- package/lib/event_system_lane_contract.js +0 -75
- package/lib/execution_dedupe.js +0 -86
- package/lib/execution_truth_contract.js +0 -234
- package/lib/external_credit_bridge.js +0 -142
- package/lib/external_execution_policy.js +0 -143
- package/lib/external_execution_runtime.js +0 -238
- package/lib/feature_control_lane_contract.js +0 -54
- package/lib/first_run_conversion_contract.js +0 -290
- package/lib/framework_lane_contract.js +0 -89
- package/lib/framework_provider_promotion.js +0 -235
- package/lib/full_catalog_contract.js +0 -525
- package/lib/go_live_operator_pack.js +0 -391
- package/lib/http_transport.js +0 -99
- package/lib/identity_auth.js +0 -175
- package/lib/identity_interop_contract.js +0 -82
- package/lib/integration_matrix_contract.js +0 -102
- package/lib/l402_adapter.js +0 -241
- package/lib/l402_lane_contract.js +0 -55
- package/lib/l402_payment_front.js +0 -265
- package/lib/launch_narrative.js +0 -53
- package/lib/lifecycle_continuity_contract.js +0 -115
- package/lib/machine_identity_registry_contract.js +0 -199
- package/lib/major_rails_lane_contract.js +0 -150
- package/lib/market_lane_contract.js +0 -467
- package/lib/market_lane_depth_contract.js +0 -182
- package/lib/market_lane_promotion_contract.js +0 -210
- package/lib/market_lane_trace_contract.js +0 -278
- package/lib/mcp_lane_contract.js +0 -137
- package/lib/mpp_adapter.js +0 -237
- package/lib/network_transport.js +0 -110
- package/lib/offline_verifiability_recovery_contract.js +0 -155
- package/lib/openapi_contract.js +0 -300
- package/lib/operational_receipt_contract.js +0 -165
- package/lib/operator_intelligence.js +0 -407
- package/lib/outreach_copy_pack.js +0 -51
- package/lib/outreach_message_pack.js +0 -71
- package/lib/outreach_proof.js +0 -71
- package/lib/outreach_target_pack.js +0 -60
- package/lib/partner_intelligence.js +0 -105
- package/lib/payment_config.js +0 -257
- package/lib/payment_front_registry.js +0 -53
- package/lib/payment_protocol_contract.js +0 -165
- package/lib/payment_rail_truth_contract.js +0 -324
- package/lib/payment_verification.js +0 -357
- package/lib/phase_10_closeout_pack.js +0 -45
- package/lib/phase_10_completion_pack.js +0 -76
- package/lib/phase_10_decision_record_pack.js +0 -54
- package/lib/phase_10_decision_resolution_pack.js +0 -53
- package/lib/phase_10_demand_signal_adapters_runtime_pack.js +0 -74
- package/lib/phase_10_ecosystem_backlog_triage_runtime_pack.js +0 -74
- package/lib/phase_10_freeze_baseline_pack.js +0 -67
- package/lib/phase_10_freeze_review_pack.js +0 -64
- package/lib/phase_10_gate_pack.js +0 -57
- package/lib/phase_10_long_tail_continuity_pack.js +0 -80
- package/lib/phase_10_long_tail_ecosystem_pack.js +0 -66
- package/lib/phase_10_niche_extension_registry_runtime_pack.js +0 -74
- package/lib/phase_1_claude_mcp_pack.js +0 -60
- package/lib/phase_1_claude_mcp_runtime_pack.js +0 -52
- package/lib/phase_1_ecosystem_pack.js +0 -67
- package/lib/phase_1_openai_codex_pack.js +0 -60
- package/lib/phase_1_openai_codex_runtime_pack.js +0 -52
- package/lib/phase_2_base_runtime_pack.js +0 -71
- package/lib/phase_2_base_usdc_runtime_pack.js +0 -72
- package/lib/phase_2_closeout_pack.js +0 -65
- package/lib/phase_2_completion_pack.js +0 -113
- package/lib/phase_2_decision_record_pack.js +0 -66
- package/lib/phase_2_decision_resolution_pack.js +0 -69
- package/lib/phase_2_eth_runtime_pack.js +0 -70
- package/lib/phase_2_evm_base_runtime_pack.js +0 -73
- package/lib/phase_2_evm_runtime_pack.js +0 -71
- package/lib/phase_2_flip_preview_pack.js +0 -60
- package/lib/phase_2_freeze_review_pack.js +0 -99
- package/lib/phase_2_gate_pack.js +0 -77
- package/lib/phase_2_payment_rails_pack.js +0 -71
- package/lib/phase_2_usdc_runtime_pack.js +0 -71
- package/lib/phase_3_brc_runtime_pack.js +0 -81
- package/lib/phase_3_bsv_teranode_runtime_pack.js +0 -83
- package/lib/phase_3_closeout_pack.js +0 -62
- package/lib/phase_3_completion_pack.js +0 -94
- package/lib/phase_3_decision_record_pack.js +0 -64
- package/lib/phase_3_decision_resolution_pack.js +0 -69
- package/lib/phase_3_freeze_baseline_pack.js +0 -67
- package/lib/phase_3_freeze_review_pack.js +0 -80
- package/lib/phase_3_gate_pack.js +0 -76
- package/lib/phase_3_metanet_runtime_pack.js +0 -81
- package/lib/phase_3_native_bsv_pack.js +0 -91
- package/lib/phase_3_native_continuity_pack.js +0 -82
- package/lib/phase_4_attestation_runtime_pack.js +0 -75
- package/lib/phase_4_closeout_pack.js +0 -45
- package/lib/phase_4_completion_pack.js +0 -94
- package/lib/phase_4_decision_record_pack.js +0 -54
- package/lib/phase_4_decision_resolution_pack.js +0 -45
- package/lib/phase_4_erc8004_runtime_pack.js +0 -76
- package/lib/phase_4_freeze_baseline_pack.js +0 -67
- package/lib/phase_4_freeze_review_pack.js +0 -68
- package/lib/phase_4_gate_pack.js +0 -58
- package/lib/phase_4_identity_registry_runtime_pack.js +0 -75
- package/lib/phase_4_identity_trust_pack.js +0 -73
- package/lib/phase_4_trust_continuity_pack.js +0 -86
- package/lib/phase_5_antelope_runtime_pack.js +0 -76
- package/lib/phase_5_closeout_pack.js +0 -44
- package/lib/phase_5_completion_pack.js +0 -82
- package/lib/phase_5_constellation_dag_runtime_pack.js +0 -76
- package/lib/phase_5_decision_record_pack.js +0 -54
- package/lib/phase_5_decision_resolution_pack.js +0 -45
- package/lib/phase_5_digibyte_dgb_runtime_pack.js +0 -76
- package/lib/phase_5_freeze_baseline_pack.js +0 -67
- package/lib/phase_5_freeze_review_pack.js +0 -68
- package/lib/phase_5_gate_pack.js +0 -58
- package/lib/phase_5_hedera_hbar_runtime_pack.js +0 -76
- package/lib/phase_5_kaspa_kas_runtime_pack.js +0 -76
- package/lib/phase_5_major_rails_continuity_pack.js +0 -86
- package/lib/phase_5_major_rails_pack.js +0 -110
- package/lib/phase_5_metal_runtime_pack.js +0 -76
- package/lib/phase_5_polkadot_dot_runtime_pack.js +0 -76
- package/lib/phase_5_proton_xpr_runtime_pack.js +0 -76
- package/lib/phase_5_solana_runtime_pack.js +0 -76
- package/lib/phase_6_autogen_runtime_pack.js +0 -72
- package/lib/phase_6_closeout_pack.js +0 -46
- package/lib/phase_6_completion_pack.js +0 -77
- package/lib/phase_6_decision_record_pack.js +0 -54
- package/lib/phase_6_decision_resolution_pack.js +0 -53
- package/lib/phase_6_framework_continuity_pack.js +0 -81
- package/lib/phase_6_framework_runtime_pack.js +0 -68
- package/lib/phase_6_freeze_baseline_pack.js +0 -68
- package/lib/phase_6_freeze_review_pack.js +0 -65
- package/lib/phase_6_gate_pack.js +0 -59
- package/lib/phase_6_langchain_runtime_pack.js +0 -72
- package/lib/phase_6_langgraph_runtime_pack.js +0 -72
- package/lib/phase_6_semantic_kernel_runtime_pack.js +0 -72
- package/lib/phase_7_closeout_pack.js +0 -45
- package/lib/phase_7_completion_pack.js +0 -85
- package/lib/phase_7_decision_record_pack.js +0 -53
- package/lib/phase_7_decision_resolution_pack.js +0 -53
- package/lib/phase_7_event_system_continuity_pack.js +0 -89
- package/lib/phase_7_event_system_pack.js +0 -76
- package/lib/phase_7_freeze_baseline_pack.js +0 -74
- package/lib/phase_7_freeze_review_pack.js +0 -65
- package/lib/phase_7_gate_pack.js +0 -58
- package/lib/phase_7_kafka_runtime_pack.js +0 -74
- package/lib/phase_7_mqtt_runtime_pack.js +0 -74
- package/lib/phase_7_nats_runtime_pack.js +0 -74
- package/lib/phase_7_webhook_event_bus_runtime_pack.js +0 -74
- package/lib/phase_8_closeout_pack.js +0 -46
- package/lib/phase_8_completion_pack.js +0 -82
- package/lib/phase_8_decision_record_pack.js +0 -54
- package/lib/phase_8_decision_resolution_pack.js +0 -53
- package/lib/phase_8_external_receipt_import_runtime_pack.js +0 -74
- package/lib/phase_8_external_result_import_runtime_pack.js +0 -74
- package/lib/phase_8_freeze_baseline_pack.js +0 -71
- package/lib/phase_8_freeze_review_pack.js +0 -64
- package/lib/phase_8_gate_pack.js +0 -58
- package/lib/phase_8_proof_bridge_continuity_pack.js +0 -86
- package/lib/phase_8_proof_bridges_pack.js +0 -72
- package/lib/phase_8_proof_bundle_normalization_runtime_pack.js +0 -74
- package/lib/phase_9_closeout_pack.js +0 -46
- package/lib/phase_9_completion_pack.js +0 -82
- package/lib/phase_9_custody_refs_runtime_pack.js +0 -74
- package/lib/phase_9_decision_record_pack.js +0 -54
- package/lib/phase_9_decision_resolution_pack.js +0 -53
- package/lib/phase_9_freeze_baseline_pack.js +0 -71
- package/lib/phase_9_freeze_review_pack.js +0 -64
- package/lib/phase_9_gate_pack.js +0 -58
- package/lib/phase_9_operator_accounting_bridges_runtime_pack.js +0 -74
- package/lib/phase_9_treasury_connectivity_pack.js +0 -72
- package/lib/phase_9_treasury_continuity_pack.js +0 -86
- package/lib/phase_9_treasury_destinations_runtime_pack.js +0 -74
- package/lib/phase_program_pack.js +0 -120
- package/lib/pricing_optimization_contract.js +0 -775
- package/lib/protocol_lane_contract.js +0 -117
- package/lib/provenance_lane_contract.js +0 -54
- package/lib/provider_lane_contract.js +0 -240
- package/lib/provider_network_contract.js +0 -149
- package/lib/provider_payout_execution.js +0 -155
- package/lib/provider_registry.js +0 -852
- package/lib/provider_runtime_journey_contract.js +0 -183
- package/lib/public_surface_policy_contract.js +0 -111
- package/lib/publish_plan.js +0 -51
- package/lib/rate_limiter.js +0 -81
- package/lib/record_queries.js +0 -48
- package/lib/release_candidate.js +0 -50
- package/lib/release_center.js +0 -1093
- package/lib/release_history.js +0 -205
- package/lib/release_manifest.js +0 -113
- package/lib/release_pack.js +0 -453
- package/lib/request_rate_limit.js +0 -144
- package/lib/resource_views.js +0 -31
- package/lib/revenue_launch_path_contract.js +0 -326
- package/lib/route_matchers.js +0 -34
- package/lib/route_params.js +0 -19
- package/lib/runtime_bridge.js +0 -124
- package/lib/runtime_operations_worker.js +0 -282
- package/lib/runtime_state_store.js +0 -495
- package/lib/settlement_bsv_live.js +0 -600
- package/lib/settlement_bsv_teranode.js +0 -117
- package/lib/settlement_lane_contract.js +0 -111
- package/lib/shared_signals_lane_contract.js +0 -54
- package/lib/signed_audit_provenance_contract.js +0 -83
- package/lib/soft_launch_pack.js +0 -78
- package/lib/stablecoin_lane_contract.js +0 -76
- package/lib/stripe_mpp_lane_contract.js +0 -96
- package/lib/stripe_mpp_payment_front.js +0 -258
- package/lib/telemetry_lane_contract.js +0 -54
- package/lib/treasury_destinations_contract.js +0 -764
- package/lib/treasury_egress_policy_contract.js +0 -91
- package/lib/treasury_lane_contract.js +0 -84
- package/lib/trust_portability_boundary_contract.js +0 -72
- package/lib/x402_facilitator.js +0 -198
- package/lib/x402_lane_contract.js +0 -136
- package/lib/x402_settlement_recovery.js +0 -175
- package/scripts/buyer_events_daily_report.js +0 -79
- package/scripts/registry_cli.js +0 -275
- package/scripts/state_backup_offsite.js +0 -196
- package/scripts/verify_a2a_rpc.js +0 -131
- package/scripts/verify_adapters.js +0 -554
- package/scripts/verify_agent_identity.js +0 -153
- package/scripts/verify_all.js +0 -4963
- package/scripts/verify_bolt_adapter.js +0 -128
- package/scripts/verify_buyer_event_log.js +0 -128
- package/scripts/verify_buyer_safety.js +0 -141
- package/scripts/verify_cdp_facilitator.js +0 -110
- package/scripts/verify_checkout_processor.js +0 -109
- package/scripts/verify_commerce_bridge.js +0 -177
- package/scripts/verify_control_plane_contracts.js +0 -34
- package/scripts/verify_control_plane_routes.js +0 -70
- package/scripts/verify_delivery_summary.js +0 -112
- package/scripts/verify_examples.js +0 -19
- package/scripts/verify_execution_dedupe.js +0 -189
- package/scripts/verify_execution_surfacing.js +0 -76
- package/scripts/verify_external_execution_retry.js +0 -140
- package/scripts/verify_final_activation.js +0 -191
- package/scripts/verify_first_run_conversions.js +0 -81
- package/scripts/verify_framework_provider_promotion.js +0 -152
- package/scripts/verify_full_catalog.js +0 -174
- package/scripts/verify_integrations.js +0 -620
- package/scripts/verify_l402_adapter.js +0 -86
- package/scripts/verify_lifecycle_continuity.js +0 -96
- package/scripts/verify_lifecycle_spend_binding.js +0 -88
- package/scripts/verify_market_lane_depth.js +0 -94
- package/scripts/verify_market_lane_promotion.js +0 -103
- package/scripts/verify_market_lane_traces.js +0 -98
- package/scripts/verify_market_lanes.js +0 -102
- package/scripts/verify_mpp_adapter.js +0 -128
- package/scripts/verify_operator_observability_boundary.js +0 -83
- package/scripts/verify_pricing_experiment_plan.js +0 -124
- package/scripts/verify_production_readiness.js +0 -268
- package/scripts/verify_provider_network.js +0 -819
- package/scripts/verify_provider_runtime_breadth.js +0 -109
- package/scripts/verify_provider_runtime_journeys.js +0 -111
- package/scripts/verify_rate_limiter.js +0 -52
- package/scripts/verify_refund_credit.js +0 -106
- package/scripts/verify_revenue_launch_paths.js +0 -105
- package/scripts/verify_runtime_durability.js +0 -52
- package/scripts/verify_runtime_state_guard.js +0 -117
- package/scripts/verify_service.js +0 -15421
- package/scripts/verify_settlement.js +0 -116
- package/scripts/verify_tooling.js +0 -1412
- package/scripts/verify_treasury_public_boundary.js +0 -97
- package/scripts/verify_verify_execute_settle.js +0 -209
- package/scripts/verify_x402_facilitator.js +0 -307
- package/scripts/verify_x402_settlement_recovery.js +0 -153
- package/server.js +0 -12245
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const {
|
|
4
|
-
buildPhase1OpenaiCodexRuntimePack
|
|
5
|
-
} = require("./phase_1_openai_codex_runtime_pack");
|
|
6
|
-
const {
|
|
7
|
-
buildPhase1ClaudeMcpRuntimePack
|
|
8
|
-
} = require("./phase_1_claude_mcp_runtime_pack");
|
|
9
|
-
const {
|
|
10
|
-
buildProviderLanePack,
|
|
11
|
-
getProviderProfileDetail
|
|
12
|
-
} = require("./provider_lane_contract");
|
|
13
|
-
const { summarizeMarketLaneTracePack } = require("./market_lane_trace_contract");
|
|
14
|
-
const { summarizeMarketLanePromotionPack } = require("./market_lane_promotion_contract");
|
|
15
|
-
|
|
16
|
-
function uniqueSorted(values) {
|
|
17
|
-
return Array.from(new Set((Array.isArray(values) ? values : []).filter(Boolean))).sort();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function buildJourneyStages(providerId, profile, runtimePack) {
|
|
21
|
-
const firstPath = runtimePack.first_path || {};
|
|
22
|
-
const executeSurface = Array.isArray(profile.primary_call_surfaces) && profile.primary_call_surfaces.length
|
|
23
|
-
? profile.primary_call_surfaces[0]
|
|
24
|
-
: null;
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
stage_index: 1,
|
|
28
|
-
stage_id: "discover",
|
|
29
|
-
posture: "inspect_named_provider_entry",
|
|
30
|
-
surface_ref: "/v1/providers/summary",
|
|
31
|
-
expected_outcome: `discover the bounded ${providerId} entry posture before quoting or execution`
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
stage_index: 2,
|
|
35
|
-
stage_id: "quote",
|
|
36
|
-
posture: "secretless_first_contact_quote",
|
|
37
|
-
surface_ref: "xytara first-run --run-quote --account ACCOUNT_REF --pretty",
|
|
38
|
-
expected_outcome: "produce a quote or payment-required challenge without spending funds or requiring wallet secrets"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
stage_index: 3,
|
|
42
|
-
stage_id: "fund",
|
|
43
|
-
posture: "credits_or_direct_payment_after_quote",
|
|
44
|
-
surface_ref: providerId === "openai_codex" ? "/v1/x402" : "/v1/commands/execute",
|
|
45
|
-
expected_outcome: "move from quoted intent into a bounded paid path through credits-first or approved payment proof"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
stage_index: 4,
|
|
49
|
-
stage_id: "execute",
|
|
50
|
-
posture: "provider_bounded_runtime_execution",
|
|
51
|
-
surface_ref: executeSurface,
|
|
52
|
-
expected_outcome: "run the listed provider entry through the governed runtime without implying unbounded provider control-plane ownership"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
stage_index: 5,
|
|
56
|
-
stage_id: "prove",
|
|
57
|
-
posture: "proof_followthrough",
|
|
58
|
-
surface_ref: firstPath.followthrough_ref || null,
|
|
59
|
-
expected_outcome: "continue the execution result into xoonya proof followthrough and verification review surfaces"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
stage_index: 6,
|
|
63
|
-
stage_id: "inspect",
|
|
64
|
-
posture: "public_runtime_and_proof_inspection",
|
|
65
|
-
surface_ref: "/v1/full-catalog/market-lanes/traces/summary",
|
|
66
|
-
expected_outcome: "inspect the bounded runtime trace and promotion posture that supports the named provider journey"
|
|
67
|
-
}
|
|
68
|
-
].filter((entry) => Boolean(entry.surface_ref));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function buildJourney(providerId, profile, runtimePack) {
|
|
72
|
-
const firstPath = runtimePack.first_path || {};
|
|
73
|
-
const traceSummary = summarizeMarketLaneTracePack();
|
|
74
|
-
const promotionSummary = summarizeMarketLanePromotionPack();
|
|
75
|
-
const stages = buildJourneyStages(providerId, profile, runtimePack);
|
|
76
|
-
const firstRunReady = stages.some((entry) => entry.stage_id === "quote")
|
|
77
|
-
&& stages.some((entry) => entry.stage_id === "execute");
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
journey_id: `${providerId}.runtime_journey`,
|
|
81
|
-
provider_id: profile.provider_id,
|
|
82
|
-
provider_label: profile.provider_label,
|
|
83
|
-
journey_posture: profile.posture,
|
|
84
|
-
claim_status: profile.claim_status,
|
|
85
|
-
first_run_ready: firstRunReady,
|
|
86
|
-
quote_ready: stages.some((entry) => entry.stage_id === "quote"),
|
|
87
|
-
funded_execution_ready: Boolean(profile.revenue_ready),
|
|
88
|
-
proof_followthrough_ready: Boolean(profile.proof_followthrough_ready),
|
|
89
|
-
provider_live_anchor_ready: Boolean(profile.provider_live_anchor_ready),
|
|
90
|
-
first_party_callable_ready: Boolean(profile.first_party_callable_ready),
|
|
91
|
-
stage_count: stages.length,
|
|
92
|
-
stages,
|
|
93
|
-
primary_http_sequence: Array.isArray(firstPath.first_http_sequence) ? firstPath.first_http_sequence.slice() : [],
|
|
94
|
-
primary_cli_sequence: Array.isArray(firstPath.first_cli_sequence) ? firstPath.first_cli_sequence.slice() : [],
|
|
95
|
-
call_surfaces: uniqueSorted(profile.primary_call_surfaces),
|
|
96
|
-
supporting_surfaces: uniqueSorted([
|
|
97
|
-
...(profile.supporting_surfaces || []),
|
|
98
|
-
"/v1/providers/summary",
|
|
99
|
-
"/v1/full-catalog/market-lanes/traces/summary",
|
|
100
|
-
"/v1/full-catalog/market-lanes/promotion/summary"
|
|
101
|
-
]),
|
|
102
|
-
readiness_gates: {
|
|
103
|
-
first_run_ready: firstRunReady,
|
|
104
|
-
provider_live_anchor_ready: Boolean(profile.provider_live_anchor_ready),
|
|
105
|
-
funded_execution_ready: Boolean(profile.revenue_ready),
|
|
106
|
-
proof_followthrough_ready: Boolean(profile.proof_followthrough_ready),
|
|
107
|
-
trace_ready: Number(traceSummary.market_lane_trace_count || 0) >= 3,
|
|
108
|
-
promotion_ready: Number(promotionSummary.market_lane_promotion_count || 0) >= 3
|
|
109
|
-
},
|
|
110
|
-
claim_boundary: providerId === "openai_codex"
|
|
111
|
-
? "claim_openai_codex_journey_only_for_the_listed_quote_fund_execute_prove_path_inside_xytara_not_as_external_provider_platform_control"
|
|
112
|
-
: "claim_claude_mcp_journey_only_for_the_listed_mcp_quote_fund_execute_prove_path_inside_xytara_not_as_unbounded_provider_or_framework_depth"
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function buildProviderRuntimeJourneyPack() {
|
|
117
|
-
const providerPack = buildProviderLanePack();
|
|
118
|
-
const openaiProfile = getProviderProfileDetail("openai_codex");
|
|
119
|
-
const claudeProfile = getProviderProfileDetail("claude_mcp");
|
|
120
|
-
const openaiRuntimePack = buildPhase1OpenaiCodexRuntimePack();
|
|
121
|
-
const claudeRuntimePack = buildPhase1ClaudeMcpRuntimePack();
|
|
122
|
-
const journeys = [
|
|
123
|
-
buildJourney("openai_codex", openaiProfile, openaiRuntimePack),
|
|
124
|
-
buildJourney("claude_mcp", claudeProfile, claudeRuntimePack)
|
|
125
|
-
];
|
|
126
|
-
|
|
127
|
-
return {
|
|
128
|
-
ok: true,
|
|
129
|
-
product: "xytara",
|
|
130
|
-
category: "machine-commerce-provider-runtime-journey-pack",
|
|
131
|
-
pack_version: "xytara-provider-runtime-journey-pack-v1",
|
|
132
|
-
posture: "named_provider_quote_fund_execute_prove_paths",
|
|
133
|
-
doctrine: "provider_journeys_make_first_run_and_revenue_paths_publicly_inspectable_without_overclaiming_unbounded_vendor_breadth",
|
|
134
|
-
journey_count: journeys.length,
|
|
135
|
-
first_run_ready_journey_count: journeys.filter((entry) => entry.first_run_ready).length,
|
|
136
|
-
revenue_ready_journey_count: journeys.filter((entry) => entry.funded_execution_ready).length,
|
|
137
|
-
proof_followthrough_journey_count: journeys.filter((entry) => entry.proof_followthrough_ready).length,
|
|
138
|
-
provider_live_anchor_journey_count: journeys.filter((entry) => entry.provider_live_anchor_ready).length,
|
|
139
|
-
stage_total_count: journeys.reduce((total, entry) => total + Number(entry.stage_count || 0), 0),
|
|
140
|
-
provider_profiles_summary: {
|
|
141
|
-
provider_profile_count: providerPack.provider_profile_count,
|
|
142
|
-
revenue_ready_profile_count: providerPack.revenue_ready_profile_count,
|
|
143
|
-
proof_followthrough_profile_count: providerPack.proof_followthrough_profile_count
|
|
144
|
-
},
|
|
145
|
-
journeys,
|
|
146
|
-
linked_surfaces: {
|
|
147
|
-
providers_ref: "/v1/providers",
|
|
148
|
-
providers_summary_ref: "/v1/providers/summary",
|
|
149
|
-
market_lane_trace_summary_ref: "/v1/full-catalog/market-lanes/traces/summary",
|
|
150
|
-
market_lane_promotion_summary_ref: "/v1/full-catalog/market-lanes/promotion/summary",
|
|
151
|
-
openai_codex_runtime_ref: "/v1/phases/phase-1/openai-codex/runtime/summary",
|
|
152
|
-
claude_mcp_runtime_ref: "/v1/phases/phase-1/claude-mcp/runtime/summary"
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function summarizeProviderRuntimeJourneyPack() {
|
|
158
|
-
const pack = buildProviderRuntimeJourneyPack();
|
|
159
|
-
return {
|
|
160
|
-
ok: true,
|
|
161
|
-
product: pack.product,
|
|
162
|
-
category: "machine-commerce-provider-runtime-journey-summary",
|
|
163
|
-
summary_version: "xytara-provider-runtime-journey-summary-v1",
|
|
164
|
-
journey_count: pack.journey_count,
|
|
165
|
-
first_run_ready_journey_count: pack.first_run_ready_journey_count,
|
|
166
|
-
revenue_ready_journey_count: pack.revenue_ready_journey_count,
|
|
167
|
-
proof_followthrough_journey_count: pack.proof_followthrough_journey_count,
|
|
168
|
-
provider_live_anchor_journey_count: pack.provider_live_anchor_journey_count,
|
|
169
|
-
stage_total_count: pack.stage_total_count,
|
|
170
|
-
linked_surfaces: pack.linked_surfaces
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function getProviderRuntimeJourneyDetail(providerId) {
|
|
175
|
-
const normalized = String(providerId || "").trim().toLowerCase();
|
|
176
|
-
return (buildProviderRuntimeJourneyPack().journeys || []).find((entry) => entry.provider_id === normalized) || null;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
module.exports = {
|
|
180
|
-
buildProviderRuntimeJourneyPack,
|
|
181
|
-
summarizeProviderRuntimeJourneyPack,
|
|
182
|
-
getProviderRuntimeJourneyDetail
|
|
183
|
-
};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const packageJson = require("../package.json");
|
|
4
|
-
|
|
5
|
-
function buildPublicSurfacePolicyContractPack() {
|
|
6
|
-
return {
|
|
7
|
-
ok: true,
|
|
8
|
-
product: packageJson.name,
|
|
9
|
-
category: "naxytra-public-surface-policy-contract",
|
|
10
|
-
pack_version: "naxytra-public-surface-policy-contract-v1",
|
|
11
|
-
doctrine: "xytara_classifies_public_surfaces_before_listing_or_widening_them",
|
|
12
|
-
model_state: "core_now",
|
|
13
|
-
core_claim: "every public surface must declare discovery paid proof_review or operator_only policy before it is treated as part of the public stack",
|
|
14
|
-
surface_classes: [
|
|
15
|
-
{
|
|
16
|
-
surface_class: "discovery_only",
|
|
17
|
-
description: "public informational and machine-discoverable surfaces",
|
|
18
|
-
examples: [
|
|
19
|
-
"/health",
|
|
20
|
-
"/server.json",
|
|
21
|
-
"/.well-known/mcp-server.json",
|
|
22
|
-
"/.well-known/glama.json",
|
|
23
|
-
"/v1/agent-discovery-index",
|
|
24
|
-
"/v1/agent-discovery-index/summary"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
surface_class: "paid",
|
|
29
|
-
description: "machine work or runtime invocation surfaces",
|
|
30
|
-
examples: [
|
|
31
|
-
"POST /v1/commands/execute",
|
|
32
|
-
"POST /x402/commands/execute",
|
|
33
|
-
"POST /v1/mcp/tools/invoke",
|
|
34
|
-
"POST /x402/mcp/tools/invoke"
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
surface_class: "proof_review",
|
|
39
|
-
description: "proof and evidence review surfaces",
|
|
40
|
-
examples: [
|
|
41
|
-
"/v1/proof-truth",
|
|
42
|
-
"/v1/proof-truth/summary",
|
|
43
|
-
"/v1/followthrough-truth",
|
|
44
|
-
"/v1/followthrough-truth/summary",
|
|
45
|
-
"/v1/receipts",
|
|
46
|
-
"/v1/receipts/:receipt_id"
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
surface_class: "operator_only",
|
|
51
|
-
description: "internal control or mutable operator surfaces",
|
|
52
|
-
examples: [
|
|
53
|
-
"/v1/business-cockpit",
|
|
54
|
-
"/business-cockpit",
|
|
55
|
-
"/v1/operator-shell",
|
|
56
|
-
"/v1/agent-accounts"
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
enforcement_rules: [
|
|
61
|
-
"discovery_only_surfaces_must_not_require_payment",
|
|
62
|
-
"paid_surfaces_must_carry_payment_or_challenge_metadata_when_public",
|
|
63
|
-
"proof_review_surfaces_must_not_mutate_runtime_or_treasury_truth",
|
|
64
|
-
"operator_only_surfaces_must_not_be_listed_as_public_discovery",
|
|
65
|
-
"every_new_surface_must_choose_a_class_before_release"
|
|
66
|
-
],
|
|
67
|
-
route_fields: [
|
|
68
|
-
"surface_path",
|
|
69
|
-
"surface_class",
|
|
70
|
-
"requires_payment",
|
|
71
|
-
"requires_operator_auth",
|
|
72
|
-
"proof_boundary",
|
|
73
|
-
"claim_boundary"
|
|
74
|
-
],
|
|
75
|
-
linked_surfaces: {
|
|
76
|
-
discovery_index_ref: "/v1/agent-discovery-index",
|
|
77
|
-
discovery_index_summary_ref: "/v1/agent-discovery-index/summary",
|
|
78
|
-
proof_truth_ref: "/v1/proof-truth",
|
|
79
|
-
followthrough_truth_ref: "/v1/followthrough-truth",
|
|
80
|
-
operator_cockpit_ref: "/v1/business-cockpit"
|
|
81
|
-
},
|
|
82
|
-
claim_boundary: "claim_the_public_surface_policy_for_xytara_only_without_claiming_runtime_payment_or_proof_truth_beyond_the_listed_surfaces"
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function summarizePublicSurfacePolicyContractPack() {
|
|
87
|
-
const pack = buildPublicSurfacePolicyContractPack();
|
|
88
|
-
return {
|
|
89
|
-
ok: true,
|
|
90
|
-
product: pack.product,
|
|
91
|
-
category: pack.category,
|
|
92
|
-
summary_version: "naxytra-public-surface-policy-contract-summary-v1",
|
|
93
|
-
pack_version: pack.pack_version,
|
|
94
|
-
model_state: pack.model_state,
|
|
95
|
-
surface_class_count: pack.surface_classes.length,
|
|
96
|
-
rule_count: pack.enforcement_rules.length,
|
|
97
|
-
route_field_count: pack.route_fields.length,
|
|
98
|
-
linked_surfaces: pack.linked_surfaces
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function getPublicSurfaceClassDetail(surfaceClass) {
|
|
103
|
-
const normalized = String(surfaceClass || "").trim().toLowerCase();
|
|
104
|
-
return (buildPublicSurfacePolicyContractPack().surface_classes || []).find((entry) => entry.surface_class === normalized) || null;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
module.exports = {
|
|
108
|
-
buildPublicSurfacePolicyContractPack,
|
|
109
|
-
summarizePublicSurfacePolicyContractPack,
|
|
110
|
-
getPublicSurfaceClassDetail
|
|
111
|
-
};
|
package/lib/publish_plan.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const packageJson = require("../package.json");
|
|
4
|
-
|
|
5
|
-
function buildPublishPlan() {
|
|
6
|
-
return {
|
|
7
|
-
ok: true,
|
|
8
|
-
product: packageJson.name,
|
|
9
|
-
category: "machine-commerce-publish-plan",
|
|
10
|
-
version: packageJson.version,
|
|
11
|
-
commands: {
|
|
12
|
-
verify_release_candidate: "npm run verify:release-candidate",
|
|
13
|
-
pack_dry_run: "npm pack --dry-run --json",
|
|
14
|
-
publish: "npm publish --access public",
|
|
15
|
-
release_cli_check: "xytara-release --candidate --summary"
|
|
16
|
-
},
|
|
17
|
-
live_checks: [
|
|
18
|
-
"/v1/release-candidate/summary",
|
|
19
|
-
"/v1/release-center/summary",
|
|
20
|
-
"/v1/announcement-pack/summary",
|
|
21
|
-
"/v1/outreach-proof/summary"
|
|
22
|
-
],
|
|
23
|
-
publish_sequence: [
|
|
24
|
-
"run the release-candidate verification",
|
|
25
|
-
"confirm the dry-run package contents",
|
|
26
|
-
"publish the npm package at public access",
|
|
27
|
-
"redeploy the live service surfaces",
|
|
28
|
-
"verify the release-candidate and release-center summaries live",
|
|
29
|
-
"run the first public machine proof path"
|
|
30
|
-
]
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function summarizePublishPlan() {
|
|
35
|
-
const plan = buildPublishPlan();
|
|
36
|
-
return {
|
|
37
|
-
ok: true,
|
|
38
|
-
product: plan.product,
|
|
39
|
-
category: plan.category,
|
|
40
|
-
version: plan.version,
|
|
41
|
-
command_count: Object.keys(plan.commands).length,
|
|
42
|
-
live_check_count: plan.live_checks.length,
|
|
43
|
-
publish_step_count: plan.publish_sequence.length,
|
|
44
|
-
publish_command: plan.commands.publish
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
module.exports = {
|
|
49
|
-
buildPublishPlan,
|
|
50
|
-
summarizePublishPlan
|
|
51
|
-
};
|
package/lib/rate_limiter.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// Minimal in-memory fixed-window rate limiter. Dependency-free.
|
|
4
|
-
//
|
|
5
|
-
// Used to gate expensive unauthenticated work (e.g. L402 invoice creation, which
|
|
6
|
-
// makes an outbound call to a Lightning provider on every UNPAID request) so a
|
|
7
|
-
// flood cannot amplify into unbounded cost. Two independent ceilings apply:
|
|
8
|
-
// - per key (typically client IP): `max` hits per `windowMs`
|
|
9
|
-
// - global (all keys combined): `maxGlobal` hits per `windowMs`
|
|
10
|
-
// A hit counts against both; exceeding either denies the request.
|
|
11
|
-
//
|
|
12
|
-
// Scope: single process. Horizontally-scaled deployments should front this with a
|
|
13
|
-
// shared store (Redis) or an edge/proxy limiter; this module is the in-process
|
|
14
|
-
// floor, not a distributed guarantee. Callers should still deploy behind the
|
|
15
|
-
// platform's own rate limiting for defense in depth.
|
|
16
|
-
|
|
17
|
-
function now() {
|
|
18
|
-
return Date.now();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function createRateLimiter(options) {
|
|
22
|
-
const opts = options || {};
|
|
23
|
-
const windowMs = Math.max(1000, Number(opts.windowMs) || 60000);
|
|
24
|
-
const max = Math.max(1, Number(opts.max) || 30);
|
|
25
|
-
const maxGlobal = Math.max(max, Number(opts.maxGlobal) || max * 20);
|
|
26
|
-
// Map<key, { count, resetAt }>
|
|
27
|
-
const buckets = new Map();
|
|
28
|
-
let global = { count: 0, resetAt: now() + windowMs };
|
|
29
|
-
let lastSweep = now();
|
|
30
|
-
|
|
31
|
-
function sweep(t) {
|
|
32
|
-
// Opportunistic cleanup so the Map cannot grow without bound.
|
|
33
|
-
if (t - lastSweep < windowMs) return;
|
|
34
|
-
lastSweep = t;
|
|
35
|
-
for (const [key, bucket] of buckets) {
|
|
36
|
-
if (bucket.resetAt <= t) buckets.delete(key);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function rollGlobal(t) {
|
|
41
|
-
if (global.resetAt <= t) global = { count: 0, resetAt: t + windowMs };
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Record one hit for `key` and report whether it is allowed. The hit is only
|
|
45
|
-
// counted when allowed, so a denied caller does not push its own reset further
|
|
46
|
-
// out (no self-inflicted lockout extension).
|
|
47
|
-
function check(key) {
|
|
48
|
-
const t = now();
|
|
49
|
-
sweep(t);
|
|
50
|
-
rollGlobal(t);
|
|
51
|
-
const k = String(key == null ? "" : key);
|
|
52
|
-
let bucket = buckets.get(k);
|
|
53
|
-
if (!bucket || bucket.resetAt <= t) {
|
|
54
|
-
bucket = { count: 0, resetAt: t + windowMs };
|
|
55
|
-
buckets.set(k, bucket);
|
|
56
|
-
}
|
|
57
|
-
if (global.count >= maxGlobal) {
|
|
58
|
-
return { allowed: false, scope: "global", remaining: 0, retryAfterMs: Math.max(0, global.resetAt - t) };
|
|
59
|
-
}
|
|
60
|
-
if (bucket.count >= max) {
|
|
61
|
-
return { allowed: false, scope: "key", remaining: 0, retryAfterMs: Math.max(0, bucket.resetAt - t) };
|
|
62
|
-
}
|
|
63
|
-
bucket.count += 1;
|
|
64
|
-
global.count += 1;
|
|
65
|
-
return {
|
|
66
|
-
allowed: true,
|
|
67
|
-
scope: null,
|
|
68
|
-
remaining: Math.max(0, max - bucket.count),
|
|
69
|
-
retryAfterMs: Math.max(0, bucket.resetAt - t)
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function reset() {
|
|
74
|
-
buckets.clear();
|
|
75
|
-
global = { count: 0, resetAt: now() + windowMs };
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return { check, reset, config: { windowMs, max, maxGlobal } };
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
module.exports = { createRateLimiter };
|
package/lib/record_queries.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function listRecords(map, filters) {
|
|
4
|
-
const entries = Array.from(map.values());
|
|
5
|
-
const opts = filters || {};
|
|
6
|
-
let items = entries;
|
|
7
|
-
if (opts.status) items = items.filter((item) => item.status === opts.status);
|
|
8
|
-
if (opts.account_id) items = items.filter((item) => item.account_id === opts.account_id);
|
|
9
|
-
if (opts.quote_id) items = items.filter((item) => item.quote_id === opts.quote_id);
|
|
10
|
-
if (opts.transaction_id) items = items.filter((item) => item.transaction_id === opts.transaction_id);
|
|
11
|
-
if (opts.receipt_id) items = items.filter((item) => item.receipt_id === opts.receipt_id);
|
|
12
|
-
if (opts.settlement_id) items = items.filter((item) => item.settlement_id === opts.settlement_id);
|
|
13
|
-
if (opts.intent) items = items.filter((item) => item.intent === opts.intent);
|
|
14
|
-
if (opts.callback_url) items = items.filter((item) => item.callback_url === opts.callback_url);
|
|
15
|
-
if (opts.proof_ref) items = items.filter((item) => item.proof_ref === opts.proof_ref);
|
|
16
|
-
if (opts.payment_id) items = items.filter((item) => item.payment_id === opts.payment_id);
|
|
17
|
-
if (opts.currency) items = items.filter((item) => item.currency === opts.currency);
|
|
18
|
-
if (opts.settlement_adapter) {
|
|
19
|
-
items = items.filter((item) => item.settlement_adapter === opts.settlement_adapter || item.settlement_mode === opts.settlement_adapter);
|
|
20
|
-
}
|
|
21
|
-
if (opts.reason_code) items = items.filter((item) => item.reason_code === opts.reason_code);
|
|
22
|
-
if (opts.action_code) items = items.filter((item) => item.action_code === opts.action_code);
|
|
23
|
-
if (opts.assigned_owner) items = items.filter((item) => item.assigned_owner === opts.assigned_owner);
|
|
24
|
-
if (opts.actor_role) {
|
|
25
|
-
items = items.filter((item) => {
|
|
26
|
-
if (item && item.created_actor && item.created_actor.role === opts.actor_role) {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
const history = Array.isArray(item && item.history) ? item.history : [];
|
|
30
|
-
return history.some((event) => event && event.actor && event.actor.role === opts.actor_role);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
if (opts.context_source) {
|
|
34
|
-
items = items.filter((item) => {
|
|
35
|
-
if (item && item.created_context && item.created_context.source === opts.context_source) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
const history = Array.isArray(item && item.history) ? item.history : [];
|
|
39
|
-
return history.some((event) => event && event.context && event.context.source === opts.context_source);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const limit = Math.max(1, Math.min(Number(opts.limit || 20), 100));
|
|
43
|
-
return items.slice(0, limit);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
module.exports = {
|
|
47
|
-
listRecords
|
|
48
|
-
};
|
package/lib/release_candidate.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const packageJson = require("../package.json");
|
|
4
|
-
|
|
5
|
-
function buildReleaseCandidatePack() {
|
|
6
|
-
return {
|
|
7
|
-
ok: true,
|
|
8
|
-
product: packageJson.name,
|
|
9
|
-
category: "machine-commerce-release-candidate",
|
|
10
|
-
version: packageJson.version,
|
|
11
|
-
package_posture: {
|
|
12
|
-
publish_access: packageJson.publishConfig && packageJson.publishConfig.access ? packageJson.publishConfig.access : null,
|
|
13
|
-
engine: packageJson.engines && packageJson.engines.node ? packageJson.engines.node : null,
|
|
14
|
-
bin_count: Object.keys(packageJson.bin || {}).length,
|
|
15
|
-
published_file_count: Array.isArray(packageJson.files) ? packageJson.files.length : 0
|
|
16
|
-
},
|
|
17
|
-
rehearsal: {
|
|
18
|
-
clean_install_command: "npm install xytara",
|
|
19
|
-
dry_run_pack_command: "npm pack --dry-run --json",
|
|
20
|
-
release_check_command: "npm run verify:release-candidate",
|
|
21
|
-
first_release_view: "xytara-release --candidate --summary"
|
|
22
|
-
},
|
|
23
|
-
checklist: [
|
|
24
|
-
"run npm run verify:release-candidate",
|
|
25
|
-
"confirm npm pack --dry-run includes public docs and bin entrypoints",
|
|
26
|
-
"confirm release-center and announcement-pack summaries are live after deploy",
|
|
27
|
-
"confirm the first public proof path still succeeds",
|
|
28
|
-
"only then proceed to npm publish"
|
|
29
|
-
]
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function summarizeReleaseCandidatePack() {
|
|
34
|
-
const pack = buildReleaseCandidatePack();
|
|
35
|
-
return {
|
|
36
|
-
ok: true,
|
|
37
|
-
product: pack.product,
|
|
38
|
-
category: pack.category,
|
|
39
|
-
version: pack.version,
|
|
40
|
-
publish_access: pack.package_posture.publish_access,
|
|
41
|
-
bin_count: pack.package_posture.bin_count,
|
|
42
|
-
published_file_count: pack.package_posture.published_file_count,
|
|
43
|
-
checklist_count: pack.checklist.length
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = {
|
|
48
|
-
buildReleaseCandidatePack,
|
|
49
|
-
summarizeReleaseCandidatePack
|
|
50
|
-
};
|