xytara 2.3.0 → 2.5.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 (44) hide show
  1. package/OPERATIONS_RUNBOOK.md +1 -0
  2. package/README.md +16 -0
  3. package/RELEASE_NOTES.md +18 -14
  4. package/SERVICE_CONTRACT.md +75 -0
  5. package/START_HERE.md +40 -0
  6. package/bin/xytara.js +55 -0
  7. package/index.js +1 -1
  8. package/lib/a2a_lane_contract.js +104 -0
  9. package/lib/a2c_lane_contract.js +111 -0
  10. package/lib/account_auth.js +347 -1
  11. package/lib/artifact_distribution_lane_contract.js +54 -0
  12. package/lib/asyncapi_contract.js +150 -0
  13. package/lib/auth_interop_contract.js +80 -0
  14. package/lib/capability_registry.js +572 -0
  15. package/lib/cloudevents_contract.js +80 -0
  16. package/lib/command_flow.js +20 -1
  17. package/lib/commerce_authority.js +449 -0
  18. package/lib/commerce_client.js +32 -0
  19. package/lib/commerce_economics.js +2168 -2
  20. package/lib/commerce_identity.js +578 -0
  21. package/lib/commerce_runtime.js +4 -0
  22. package/lib/erc8004_lane_contract.js +65 -0
  23. package/lib/event_system_lane_contract.js +75 -0
  24. package/lib/feature_control_lane_contract.js +54 -0
  25. package/lib/framework_lane_contract.js +89 -0
  26. package/lib/identity_auth.js +175 -0
  27. package/lib/identity_interop_contract.js +82 -0
  28. package/lib/integration_matrix_contract.js +93 -0
  29. package/lib/major_rails_lane_contract.js +90 -0
  30. package/lib/mcp_lane_contract.js +110 -0
  31. package/lib/openapi_contract.js +296 -0
  32. package/lib/protocol_lane_contract.js +114 -0
  33. package/lib/provenance_lane_contract.js +54 -0
  34. package/lib/provider_lane_contract.js +72 -0
  35. package/lib/release_history.js +16 -0
  36. package/lib/settlement_lane_contract.js +111 -0
  37. package/lib/shared_signals_lane_contract.js +54 -0
  38. package/lib/stablecoin_lane_contract.js +76 -0
  39. package/lib/stripe_mpp_lane_contract.js +93 -0
  40. package/lib/telemetry_lane_contract.js +54 -0
  41. package/lib/treasury_lane_contract.js +84 -0
  42. package/lib/x402_lane_contract.js +118 -0
  43. package/package.json +5 -3
  44. package/server.js +1544 -0
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ const {
4
+ summarizeDefaultTransactionCenter
5
+ } = require("./catalog_contract");
6
+ const {
7
+ buildPhase2PaymentRailsPack,
8
+ summarizePhase2PaymentRailsPack
9
+ } = require("./phase_2_payment_rails_pack");
10
+ const {
11
+ buildPhase3NativeBsvPack,
12
+ summarizePhase3NativeBsvPack
13
+ } = require("./phase_3_native_bsv_pack");
14
+ const {
15
+ buildPhase5MajorRailsPack,
16
+ summarizePhase5MajorRailsPack
17
+ } = require("./phase_5_major_rails_pack");
18
+
19
+ function buildSettlementLanePack() {
20
+ const centerSummary = summarizeDefaultTransactionCenter();
21
+ const phase2Pack = buildPhase2PaymentRailsPack();
22
+ const phase3Pack = buildPhase3NativeBsvPack();
23
+ const phase5Pack = buildPhase5MajorRailsPack();
24
+ const settlementFamilies = [
25
+ {
26
+ family_ref: "native_bsv_family",
27
+ settlement_modes: phase3Pack.native_shape.settlement_modes,
28
+ lane_refs: phase3Pack.lane_refs,
29
+ continuity_refs: phase3Pack.continuity_refs,
30
+ operator_surfaces: phase3Pack.native_shape.operator_surfaces
31
+ },
32
+ {
33
+ family_ref: "evm_and_stable_family",
34
+ settlement_modes: phase2Pack.rail_shape.settlement_modes,
35
+ lane_refs: phase2Pack.lane_refs,
36
+ continuity_refs: ["/v1/phases/phase-2/summary"],
37
+ operator_surfaces: phase2Pack.rail_shape.operator_surfaces
38
+ },
39
+ {
40
+ family_ref: "major_alternative_rails_family",
41
+ settlement_modes: phase5Pack.rail_shape.settlement_modes,
42
+ lane_refs: phase5Pack.lane_refs,
43
+ continuity_refs: ["/v1/phases/phase-5/major-rails-continuity/summary"],
44
+ operator_surfaces: phase5Pack.rail_shape.operator_surfaces
45
+ }
46
+ ];
47
+
48
+ return {
49
+ product: "xytara",
50
+ category: "machine-commerce-settlement-lane-pack",
51
+ pack_version: "xytara-settlement-lane-pack-v1",
52
+ lane_state: "multi_family_settlement_present",
53
+ default_settlement_mode: centerSummary.default_settlement_mode,
54
+ default_native_lane: "bsv_teranode",
55
+ supported_surfaces: {
56
+ settlement_list_ref: "/v1/settlement/bsv-teranode",
57
+ settlement_readiness_ref: "/v1/settlement/bsv-teranode/readiness",
58
+ phase_2_summary_ref: "/v1/phases/phase-2/summary",
59
+ phase_3_summary_ref: "/v1/phases/phase-3/summary",
60
+ phase_5_summary_ref: "/v1/phases/phase-5/summary",
61
+ release_center_ref: "/v1/release-center/summary",
62
+ payment_lane_ref: "/v1/x402"
63
+ },
64
+ settlement_families: settlementFamilies,
65
+ phase_alignment: {
66
+ phase_2_payment_rails: {
67
+ pack: phase2Pack,
68
+ summary: summarizePhase2PaymentRailsPack()
69
+ },
70
+ phase_3_native_bsv: {
71
+ pack: phase3Pack,
72
+ summary: summarizePhase3NativeBsvPack()
73
+ },
74
+ phase_5_major_rails: {
75
+ pack: phase5Pack,
76
+ summary: summarizePhase5MajorRailsPack()
77
+ }
78
+ },
79
+ recommended_sequence: [
80
+ "inspect_default_native_settlement_readiness",
81
+ "choose_settlement_family_for_the_runtime_path",
82
+ "follow_family_summary_into_lane_summary",
83
+ "execute_paid_or_funded_runtime_flow",
84
+ "inspect_payment_and_settlement_operator_records"
85
+ ]
86
+ };
87
+ }
88
+
89
+ function summarizeSettlementLanePack() {
90
+ const pack = buildSettlementLanePack();
91
+ const familyCount = Array.isArray(pack.settlement_families) ? pack.settlement_families.length : 0;
92
+ const totalLaneCount = (pack.settlement_families || []).reduce((sum, family) => {
93
+ return sum + (Array.isArray(family.lane_refs) ? family.lane_refs.length : 0);
94
+ }, 0);
95
+
96
+ return {
97
+ product: "xytara",
98
+ category: "machine-commerce-settlement-lane-pack-summary",
99
+ summary_version: "xytara-settlement-lane-pack-summary-v1",
100
+ lane_state: pack.lane_state,
101
+ default_settlement_mode: pack.default_settlement_mode,
102
+ settlement_family_count: familyCount,
103
+ total_lane_count: totalLaneCount,
104
+ linked_surfaces: pack.supported_surfaces
105
+ };
106
+ }
107
+
108
+ module.exports = {
109
+ buildSettlementLanePack,
110
+ summarizeSettlementLanePack
111
+ };
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ function buildSharedSignalsLanePack() {
4
+ return {
5
+ product: "xytara",
6
+ category: "machine-commerce-shared-signals-lane-pack",
7
+ pack_version: "xytara-shared-signals-lane-pack-v1",
8
+ lane_state: "first_party_shared_signals_lane_present",
9
+ posture: "real_time_risk_and_identity_event_exchange_lane",
10
+ standards: ["openid_shared_signals", "caep"],
11
+ signal_families: ["authority_events", "identity_binding_events", "trust_attention_events", "network_participation_events"],
12
+ supported_surfaces: {
13
+ auth_profiles_ref: "/v1/auth-profiles",
14
+ identity_interop_ref: "/v1/identity-interop",
15
+ trust_layer_ref: "/v1/economics/accounts/:account_id/trust-layer-summary",
16
+ authority_attention_ref: "/v1/economics/accounts/:account_id/authority-attention-summary",
17
+ network_participation_ref: "/v1/economics/accounts/:account_id/network-participation-attention-summary"
18
+ },
19
+ first_run_flows: [
20
+ {
21
+ flow_ref: "real_time_risk_signal_alignment",
22
+ recommended_reason: "best path when partner systems need near-real-time signals about authority, trust, or machine-identity state changes",
23
+ sequence: [
24
+ "inspect_shared_signals_lane_summary",
25
+ "map_native authority and identity events to shared signal posture",
26
+ "connect trust and participation attention states to external signal exchange",
27
+ "keep native authority decisions canonical inside xytara"
28
+ ]
29
+ }
30
+ ],
31
+ guardrails: [
32
+ "shared signals should export state changes, not replace native decision logic",
33
+ "risk and identity event exchange should remain bounded and reviewable"
34
+ ]
35
+ };
36
+ }
37
+
38
+ function summarizeSharedSignalsLanePack() {
39
+ const pack = buildSharedSignalsLanePack();
40
+ return {
41
+ product: "xytara",
42
+ category: "machine-commerce-shared-signals-lane-pack-summary",
43
+ summary_version: "xytara-shared-signals-lane-pack-summary-v1",
44
+ lane_state: pack.lane_state,
45
+ standard_count: pack.standards.length,
46
+ signal_family_count: pack.signal_families.length,
47
+ linked_surfaces: pack.supported_surfaces
48
+ };
49
+ }
50
+
51
+ module.exports = {
52
+ buildSharedSignalsLanePack,
53
+ summarizeSharedSignalsLanePack
54
+ };
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ const {
4
+ buildPhase2UsdcRuntimePack,
5
+ summarizePhase2UsdcRuntimePack
6
+ } = require("./phase_2_usdc_runtime_pack");
7
+ const {
8
+ buildPhase2BaseUsdcRuntimePack,
9
+ summarizePhase2BaseUsdcRuntimePack
10
+ } = require("./phase_2_base_usdc_runtime_pack");
11
+
12
+ function buildStablecoinLanePack() {
13
+ const usdcPack = buildPhase2UsdcRuntimePack();
14
+ const baseUsdcPack = buildPhase2BaseUsdcRuntimePack();
15
+
16
+ return {
17
+ product: "xytara",
18
+ category: "machine-commerce-stablecoin-lane-pack",
19
+ pack_version: "xytara-stablecoin-lane-pack-v1",
20
+ lane_state: "first_party_usdc_present_with_adapter_ready_mobility_extensions",
21
+ primary_asset_family: "usdc_and_stable_value_runtime_paths",
22
+ first_party_runtime_lanes: {
23
+ usdc: {
24
+ pack: usdcPack,
25
+ summary: summarizePhase2UsdcRuntimePack()
26
+ },
27
+ base_usdc: {
28
+ pack: baseUsdcPack,
29
+ summary: summarizePhase2BaseUsdcRuntimePack()
30
+ }
31
+ },
32
+ adapter_ready_extensions: [
33
+ {
34
+ extension_id: "circle_nanopayments",
35
+ state: "adapter_ready_next",
36
+ why_it_matters: "high-frequency stable-value collection can complement credits-first repeat usage"
37
+ },
38
+ {
39
+ extension_id: "circle_cctp",
40
+ state: "adapter_ready_next",
41
+ why_it_matters: "stable-value treasury mobility can complement the public runtime settlement family without redefining core execution"
42
+ }
43
+ ],
44
+ supported_surfaces: {
45
+ usdc_runtime_summary_ref: "/v1/phases/phase-2/usdc/summary",
46
+ base_usdc_runtime_summary_ref: "/v1/phases/phase-2/base-usdc/summary",
47
+ phase_2_summary_ref: "/v1/phases/phase-2/summary",
48
+ settlement_family_ref: "/v1/settlement",
49
+ payment_lane_ref: "/v1/x402"
50
+ },
51
+ recommended_sequence: [
52
+ "inspect_usdc_runtime_summary",
53
+ "inspect_base_plus_usdc_runtime_summary",
54
+ "choose_stablecoin_or_native_lane_for_the_current_path",
55
+ "use_adapter_ready_mobility_extensions_only_when_the_operating_need_is_real"
56
+ ]
57
+ };
58
+ }
59
+
60
+ function summarizeStablecoinLanePack() {
61
+ const pack = buildStablecoinLanePack();
62
+ return {
63
+ product: "xytara",
64
+ category: "machine-commerce-stablecoin-lane-pack-summary",
65
+ summary_version: "xytara-stablecoin-lane-pack-summary-v1",
66
+ lane_state: pack.lane_state,
67
+ extension_count: Array.isArray(pack.adapter_ready_extensions) ? pack.adapter_ready_extensions.length : 0,
68
+ surface_count: Object.keys(pack.supported_surfaces).length,
69
+ linked_surfaces: pack.supported_surfaces
70
+ };
71
+ }
72
+
73
+ module.exports = {
74
+ buildStablecoinLanePack,
75
+ summarizeStablecoinLanePack
76
+ };
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ function buildStripeMppLanePack() {
4
+ return {
5
+ product: "xytara",
6
+ category: "machine-commerce-stripe-mpp-lane-pack",
7
+ pack_version: "xytara-stripe-mpp-lane-pack-v1",
8
+ lane_state: "first_party_checkout_present",
9
+ posture: "hosted_checkout_and_external_funding_entry",
10
+ provider_family: "stripe_mpp_compatible_checkout",
11
+ supported_surfaces: {
12
+ purchase_intents_ref: "/v1/checkout/purchase-intents",
13
+ purchase_intent_detail_ref_template: "/v1/checkout/purchase-intents/:purchase_intent_id",
14
+ checkout_session_create_ref_template: "/v1/checkout/purchase-intents/:purchase_intent_id/session",
15
+ checkout_session_detail_ref_template: "/v1/checkout/sessions/:checkout_session_id",
16
+ checkout_event_normalize_ref: "/v1/checkout/events/normalize",
17
+ checkout_event_detail_ref_template: "/v1/checkout/events/:event_id",
18
+ hosted_checkout_operator_surface_ref: "/v1/operator-shell/summary",
19
+ external_credit_grants_ref: "/v1/credit-bridge/grants"
20
+ },
21
+ first_run_flows: [
22
+ {
23
+ flow_ref: "stripe_mpp.credits_topup",
24
+ recommended_reason: "best first public checkout path for turning external payment into reusable machine credits",
25
+ sequence: [
26
+ "create_purchase_intent",
27
+ "create_checkout_session",
28
+ "normalize_paid_event",
29
+ "issue_runtime_credits",
30
+ "continue_with_credits_first_execution"
31
+ ],
32
+ example_surfaces: {
33
+ purchase_intents_ref: "/v1/checkout/purchase-intents",
34
+ checkout_event_normalize_ref: "/v1/checkout/events/normalize",
35
+ credit_balance_ref_template: "/v1/economics/accounts/:account_id/credit-balance"
36
+ }
37
+ },
38
+ {
39
+ flow_ref: "stripe_mpp.single_task_execution",
40
+ recommended_reason: "best first public hosted-pay path for one task without building a separate provider-specific runtime",
41
+ sequence: [
42
+ "create_purchase_intent",
43
+ "create_checkout_session",
44
+ "normalize_paid_event",
45
+ "dispatch_runtime_execution",
46
+ "inspect_transaction_and_followthrough"
47
+ ],
48
+ example_surfaces: {
49
+ purchase_intents_ref: "/v1/checkout/purchase-intents",
50
+ runtime_bridge_dispatches_ref: "/v1/runtime-bridge/dispatches",
51
+ operator_shell_ref: "/v1/operator-shell/summary"
52
+ }
53
+ }
54
+ ],
55
+ provider_boundary: {
56
+ public_story: "hosted checkout funding and authorization enter through a narrow interoperable lane",
57
+ not_claimed_as_core: [
58
+ "provider-specific checkout semantics as the center of the stack",
59
+ "checkout-provider lock-in as the primary runtime identity"
60
+ ],
61
+ operator_posture: [
62
+ "refund review remains explicit and bounded",
63
+ "operator shell keeps hosted checkout purchase and refund visibility"
64
+ ]
65
+ },
66
+ recommended_sequence: [
67
+ "inspect_stripe_mpp_lane_summary",
68
+ "create_purchase_intent",
69
+ "create_checkout_session",
70
+ "normalize_provider_event",
71
+ "continue_into_credits_or_single_task_execution"
72
+ ]
73
+ };
74
+ }
75
+
76
+ function summarizeStripeMppLanePack() {
77
+ const pack = buildStripeMppLanePack();
78
+ return {
79
+ product: "xytara",
80
+ category: "machine-commerce-stripe-mpp-lane-pack-summary",
81
+ summary_version: "xytara-stripe-mpp-lane-pack-summary-v1",
82
+ lane_state: pack.lane_state,
83
+ posture: pack.posture,
84
+ first_run_flow_count: Array.isArray(pack.first_run_flows) ? pack.first_run_flows.length : 0,
85
+ surface_count: Object.keys(pack.supported_surfaces).length,
86
+ linked_surfaces: pack.supported_surfaces
87
+ };
88
+ }
89
+
90
+ module.exports = {
91
+ buildStripeMppLanePack,
92
+ summarizeStripeMppLanePack
93
+ };
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ function buildTelemetryLanePack() {
4
+ return {
5
+ product: "xytara",
6
+ category: "machine-commerce-telemetry-lane-pack",
7
+ pack_version: "xytara-telemetry-lane-pack-v1",
8
+ lane_state: "first_party_observability_lane_present",
9
+ posture: "runtime_observability_and_scale_signal_lane",
10
+ standards: ["opentelemetry"],
11
+ core_signals: ["traces", "metrics", "logs", "events"],
12
+ supported_surfaces: {
13
+ cloudevents_ref: "/cloudevents.json",
14
+ asyncapi_ref: "/asyncapi.json",
15
+ integration_matrix_ref: "/v1/integration-matrix",
16
+ trust_layer_ref: "/v1/economics/accounts/:account_id/trust-layer-summary",
17
+ operator_intelligence_ref: "/v1/operator-intelligence"
18
+ },
19
+ first_run_flows: [
20
+ {
21
+ flow_ref: "runtime_observability_alignment",
22
+ recommended_reason: "best path for operators who need scalable traces and machine-visible runtime signals before wider external adoption",
23
+ sequence: [
24
+ "inspect_telemetry_lane_summary",
25
+ "align_runtime_events_to_cloudevents_and_asyncapi",
26
+ "map_runtime_traces_and_metrics_to_operator_intelligence",
27
+ "carry_relevant_execution_signals_into_proof_followthrough"
28
+ ]
29
+ }
30
+ ],
31
+ guardrails: [
32
+ "telemetry should improve observability without becoming the canonical runtime truth",
33
+ "operator visibility and scale diagnostics should remain aligned to runtime and proof boundaries rather than flattening them"
34
+ ]
35
+ };
36
+ }
37
+
38
+ function summarizeTelemetryLanePack() {
39
+ const pack = buildTelemetryLanePack();
40
+ return {
41
+ product: "xytara",
42
+ category: "machine-commerce-telemetry-lane-pack-summary",
43
+ summary_version: "xytara-telemetry-lane-pack-summary-v1",
44
+ lane_state: pack.lane_state,
45
+ standard_count: pack.standards.length,
46
+ signal_count: pack.core_signals.length,
47
+ linked_surfaces: pack.supported_surfaces
48
+ };
49
+ }
50
+
51
+ module.exports = {
52
+ buildTelemetryLanePack,
53
+ summarizeTelemetryLanePack
54
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ const {
4
+ buildPhase9TreasuryConnectivityPack,
5
+ summarizePhase9TreasuryConnectivityPack
6
+ } = require("./phase_9_treasury_connectivity_pack");
7
+ const {
8
+ buildPhase9TreasuryContinuityPack,
9
+ summarizePhase9TreasuryContinuityPack
10
+ } = require("./phase_9_treasury_continuity_pack");
11
+
12
+ function buildTreasuryLanePack() {
13
+ return {
14
+ product: "xytara",
15
+ category: "machine-commerce-treasury-lane-pack",
16
+ pack_version: "xytara-treasury-lane-pack-v1",
17
+ lane_state: "first_party_treasury_connectivity_present",
18
+ posture: "native_treasury_connectivity_with_internal_reserve_doctrine",
19
+ phase_alignment: {
20
+ connectivity: {
21
+ pack: buildPhase9TreasuryConnectivityPack(),
22
+ summary: summarizePhase9TreasuryConnectivityPack()
23
+ },
24
+ continuity: {
25
+ pack: buildPhase9TreasuryContinuityPack(),
26
+ summary: summarizePhase9TreasuryContinuityPack()
27
+ }
28
+ },
29
+ reserve_doctrine: {
30
+ strategic_native_treasury: "bsv_teranode",
31
+ stable_operating_reserves: ["dai", "usdc"],
32
+ optional_hidden_privacy_reserve: "monero",
33
+ privacy_guardrails: [
34
+ "monero_is_never_the_public_treasury_identity",
35
+ "monero_is_never_required_for_normal_settlement_or_reporting",
36
+ "monero_remains_an_internal_optional_reserve_technique_only_where_policy_explicitly_allows_it"
37
+ ]
38
+ },
39
+ supported_surfaces: {
40
+ treasury_connectivity_summary_ref: "/v1/phases/phase-9/summary",
41
+ treasury_continuity_summary_ref: "/v1/phases/phase-9/treasury-continuity/summary",
42
+ treasury_destinations_summary_ref: "/v1/phases/phase-9/treasury-destinations/summary",
43
+ custody_refs_summary_ref: "/v1/phases/phase-9/custody-refs/summary",
44
+ operator_accounting_bridges_summary_ref: "/v1/phases/phase-9/operator-accounting-bridges/summary",
45
+ stablecoin_lane_ref: "/v1/stablecoins",
46
+ settlement_family_ref: "/v1/settlement"
47
+ },
48
+ first_run_flows: [
49
+ {
50
+ flow_ref: "treasury_connectivity_posture",
51
+ recommended_reason: "best first path for understanding how received funds can route through native, stable, and accounting-aware treasury posture",
52
+ sequence: [
53
+ "inspect_treasury_lane_summary",
54
+ "inspect_phase_9_connectivity_summary",
55
+ "inspect_treasury_destinations_and_custody_refs",
56
+ "align_native_and_stable_reserve_posture_to_operator_policy"
57
+ ]
58
+ }
59
+ ],
60
+ guardrails: [
61
+ "treasury posture should stay subordinate to compliant reporting and operator accounting surfaces",
62
+ "internal reserve doctrine should never distort the public runtime or settlement identity"
63
+ ]
64
+ };
65
+ }
66
+
67
+ function summarizeTreasuryLanePack() {
68
+ const pack = buildTreasuryLanePack();
69
+ return {
70
+ product: "xytara",
71
+ category: "machine-commerce-treasury-lane-pack-summary",
72
+ summary_version: "xytara-treasury-lane-pack-summary-v1",
73
+ lane_state: pack.lane_state,
74
+ strategic_native_treasury: pack.reserve_doctrine.strategic_native_treasury,
75
+ stable_reserve_count: pack.reserve_doctrine.stable_operating_reserves.length,
76
+ first_run_flow_count: pack.first_run_flows.length,
77
+ linked_surfaces: pack.supported_surfaces
78
+ };
79
+ }
80
+
81
+ module.exports = {
82
+ buildTreasuryLanePack,
83
+ summarizeTreasuryLanePack
84
+ };
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+
3
+ const {
4
+ buildDefaultTransactionCenter,
5
+ summarizeDefaultTransactionCenter
6
+ } = require("./catalog_contract");
7
+ const {
8
+ buildReleasePack,
9
+ buildScenarioPack
10
+ } = require("./release_pack");
11
+
12
+ function buildX402LanePack() {
13
+ const center = buildDefaultTransactionCenter();
14
+ const centerSummary = summarizeDefaultTransactionCenter();
15
+ const releasePack = buildReleasePack();
16
+ const scenarioPack = buildScenarioPack();
17
+ const suggestedPaths = Array.isArray(center && center.suggested_paths) ? center.suggested_paths : [];
18
+ const defaultX402Path = suggestedPaths.find((entry) => entry && entry.payment_protocol === "x402") || null;
19
+ const scenarios = Array.isArray(scenarioPack.scenarios) ? scenarioPack.scenarios : [];
20
+ const directPayScenario = scenarios.find((entry) => entry && entry.scenario_ref === "scenario.direct_pay.trust_verify") || null;
21
+
22
+ return {
23
+ product: "xytara",
24
+ category: "machine-commerce-x402-lane-pack",
25
+ pack_version: "xytara-x402-lane-pack-v1",
26
+ lane_state: "first_party_x402_present",
27
+ default_protocol: centerSummary.default_protocol,
28
+ default_payment_protocol: "x402",
29
+ default_settlement_mode: centerSummary.default_settlement_mode,
30
+ default_transaction_center: center,
31
+ default_path: defaultX402Path,
32
+ release_default_path: releasePack.default_path,
33
+ supported_surfaces: {
34
+ quote_create_ref: "/v1/payment-quotes",
35
+ quote_list_ref: "/v1/payment-quotes",
36
+ quote_detail_ref_template: "/v1/payment-quotes/:quote_id",
37
+ command_execute_ref: "/x402/commands/execute",
38
+ mcp_paid_invoke_ref: "/x402/mcp/tools/invoke",
39
+ payment_ledger_ref: "/v1/payment-ledger",
40
+ native_settlement_ref: "/v1/settlement/bsv-teranode",
41
+ native_settlement_readiness_ref: "/v1/settlement/bsv-teranode/readiness",
42
+ auth_profile_ref: "/v1/auth-profiles",
43
+ mcp_lane_ref: "/v1/mcp"
44
+ },
45
+ first_run_flows: [
46
+ {
47
+ flow_ref: "x402.direct_command_execution",
48
+ recommended_reason: "best first direct machine payment path for quote to paid execution",
49
+ sequence: [
50
+ "create_quote",
51
+ "receive_x402_challenge",
52
+ "pay_quote",
53
+ "replay_paid_request",
54
+ "inspect_payment_and_settlement_records"
55
+ ],
56
+ example_surfaces: {
57
+ quote_ref: "/v1/payment-quotes",
58
+ execute_ref: "/x402/commands/execute",
59
+ payment_ledger_ref: "/v1/payment-ledger"
60
+ }
61
+ },
62
+ {
63
+ flow_ref: "x402.mcp_paid_tooling",
64
+ recommended_reason: "best first builder path for paid MCP tool invocation",
65
+ sequence: [
66
+ "discover_mcp_tool",
67
+ "attempt_paid_invoke",
68
+ "receive_x402_challenge",
69
+ "replay_paid_invoke",
70
+ "inspect_runtime_and_settlement_followthrough"
71
+ ],
72
+ example_surfaces: {
73
+ mcp_lane_ref: "/v1/mcp",
74
+ paid_invoke_ref: "/x402/mcp/tools/invoke",
75
+ settlement_ref: "/v1/settlement/bsv-teranode"
76
+ }
77
+ }
78
+ ],
79
+ settlement_posture: {
80
+ default_mode: centerSummary.default_settlement_mode,
81
+ current_native_lane: "bsv_teranode",
82
+ native_readiness_surface: "/v1/settlement/bsv-teranode/readiness",
83
+ challenge_quote_hints: [
84
+ "payment quotes carry settlement-aware runtime linkage",
85
+ "native bsv-teranode hints remain attached when that default mode is active"
86
+ ]
87
+ },
88
+ scenario_alignment: directPayScenario,
89
+ recommended_sequence: [
90
+ "inspect_x402_lane_summary",
91
+ "create_or_preview_quote",
92
+ "attempt_x402_execution",
93
+ "replay_with_payment_signature",
94
+ "inspect_payment_ledger_and_native_settlement"
95
+ ]
96
+ };
97
+ }
98
+
99
+ function summarizeX402LanePack() {
100
+ const pack = buildX402LanePack();
101
+ return {
102
+ product: "xytara",
103
+ category: "machine-commerce-x402-lane-pack-summary",
104
+ summary_version: "xytara-x402-lane-pack-summary-v1",
105
+ lane_state: pack.lane_state,
106
+ default_protocol: pack.default_protocol,
107
+ default_payment_protocol: pack.default_payment_protocol,
108
+ default_settlement_mode: pack.default_settlement_mode,
109
+ first_run_flow_count: Array.isArray(pack.first_run_flows) ? pack.first_run_flows.length : 0,
110
+ payment_surface_count: Object.keys(pack.supported_surfaces).length,
111
+ linked_surfaces: pack.supported_surfaces
112
+ };
113
+ }
114
+
115
+ module.exports = {
116
+ buildX402LanePack,
117
+ summarizeX402LanePack
118
+ };
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "xytara",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Machine commerce SDK for discovery, quoting, execution, lifecycle inspection, and adapters.",
5
5
  "main": "index.js",
6
6
  "bin": {
7
- "xytara-run": "./bin/xytara-run.js",
8
- "xytara-release": "./bin/xytara-release.js"
7
+ "xytara": "bin/xytara.js",
8
+ "xytara-run": "bin/xytara-run.js",
9
+ "xytara-release": "bin/xytara-release.js"
9
10
  },
10
11
  "type": "commonjs",
11
12
  "license": "Apache-2.0",
@@ -81,6 +82,7 @@
81
82
  "verify:examples": "node scripts/verify_examples.js",
82
83
  "verify:service": "node scripts/verify_service.js",
83
84
  "verify:release-candidate": "node scripts/verify_release_candidate.js",
85
+ "verify:production-readiness": "node scripts/verify_production_readiness.js",
84
86
  "verify:all": "node scripts/verify_all.js && node scripts/verify_integrations.js && node scripts/verify_adapters.js && node scripts/verify_tooling.js && node scripts/verify_examples.js && node scripts/verify_service.js",
85
87
  "prepublishOnly": "npm run verify:release-candidate"
86
88
  }