xytara 2.0.0 → 2.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 (176) hide show
  1. package/.env.example +6 -0
  2. package/ADAPTER_START_HERE.md +56 -0
  3. package/BSV_TERANODE_SETUP.md +30 -1
  4. package/CARRIED_HANDOFF_DEMO.md +60 -0
  5. package/EXAMPLE_PATHS.md +53 -0
  6. package/FINAL_CONTRACT.md +6 -6
  7. package/OPERATIONS_RUNBOOK.md +65 -0
  8. package/OPERATOR_START_HERE.md +63 -0
  9. package/PARTNER_READY_PATH.md +71 -0
  10. package/PROGRAM_COMPLETE_RELEASE.md +63 -0
  11. package/PROGRAM_STATUS.md +57 -0
  12. package/PUBLIC_DEMO_SCRIPT.md +78 -0
  13. package/PUBLISH_PLAN.md +14 -0
  14. package/README.md +142 -6
  15. package/RELEASE_CHECKLIST.md +16 -0
  16. package/RELEASE_NOTES.md +28 -0
  17. package/SERVICE_CONTRACT.md +4 -4
  18. package/START_HERE.md +32 -0
  19. package/SUPABASE_RUNTIME_STATE_SETUP.md +61 -0
  20. package/WHY_XYTARA_XOONYA.md +63 -0
  21. package/adapters/examples/minimal-third-party-execution-adapter.js +61 -0
  22. package/adapters/examples/minimal-third-party-execution-adapter.manifest.json +79 -0
  23. package/adapters/examples/minimal-third-party-execution-registration.record.json +26 -0
  24. package/adapters/examples/minimal-third-party-execution.certification-pack.json +22 -0
  25. package/adapters/examples/minimal-third-party-execution.submission-bundle.json +126 -0
  26. package/bin/xytara-release.js +1419 -0
  27. package/bin/xytara-run.js +186 -0
  28. package/examples/adapter_review_walkthrough.js +53 -0
  29. package/examples/export_carried_handoff.js +80 -0
  30. package/examples/funded_runtime_walkthrough.js +70 -0
  31. package/examples/partner_launch_walkthrough.js +43 -0
  32. package/examples/quickstart.js +3255 -0
  33. package/index.js +87 -1
  34. package/lib/adapter_pack.js +118 -0
  35. package/lib/adapter_partner_pack.js +89 -0
  36. package/lib/adapter_promotion_pack.js +89 -0
  37. package/lib/announcement_pack.js +61 -0
  38. package/lib/commerce_artifacts.js +3 -0
  39. package/lib/commerce_economics.js +14 -0
  40. package/lib/commerce_reports.js +26 -1
  41. package/lib/commerce_shell.js +18 -2
  42. package/lib/ecosystem_entry.js +64 -0
  43. package/lib/launch_narrative.js +53 -0
  44. package/lib/outreach_copy_pack.js +51 -0
  45. package/lib/outreach_message_pack.js +71 -0
  46. package/lib/outreach_proof.js +71 -0
  47. package/lib/outreach_target_pack.js +60 -0
  48. package/lib/phase_10_closeout_pack.js +45 -0
  49. package/lib/phase_10_completion_pack.js +76 -0
  50. package/lib/phase_10_decision_record_pack.js +54 -0
  51. package/lib/phase_10_decision_resolution_pack.js +53 -0
  52. package/lib/phase_10_demand_signal_adapters_runtime_pack.js +74 -0
  53. package/lib/phase_10_ecosystem_backlog_triage_runtime_pack.js +74 -0
  54. package/lib/phase_10_freeze_baseline_pack.js +67 -0
  55. package/lib/phase_10_freeze_review_pack.js +64 -0
  56. package/lib/phase_10_gate_pack.js +57 -0
  57. package/lib/phase_10_long_tail_continuity_pack.js +80 -0
  58. package/lib/phase_10_long_tail_ecosystem_pack.js +66 -0
  59. package/lib/phase_10_niche_extension_registry_runtime_pack.js +74 -0
  60. package/lib/phase_1_claude_mcp_pack.js +60 -0
  61. package/lib/phase_1_claude_mcp_runtime_pack.js +52 -0
  62. package/lib/phase_1_ecosystem_pack.js +67 -0
  63. package/lib/phase_1_openai_codex_pack.js +60 -0
  64. package/lib/phase_1_openai_codex_runtime_pack.js +52 -0
  65. package/lib/phase_2_base_runtime_pack.js +71 -0
  66. package/lib/phase_2_base_usdc_runtime_pack.js +72 -0
  67. package/lib/phase_2_closeout_pack.js +65 -0
  68. package/lib/phase_2_completion_pack.js +113 -0
  69. package/lib/phase_2_decision_record_pack.js +66 -0
  70. package/lib/phase_2_decision_resolution_pack.js +69 -0
  71. package/lib/phase_2_eth_runtime_pack.js +70 -0
  72. package/lib/phase_2_evm_base_runtime_pack.js +73 -0
  73. package/lib/phase_2_evm_runtime_pack.js +71 -0
  74. package/lib/phase_2_flip_preview_pack.js +60 -0
  75. package/lib/phase_2_freeze_review_pack.js +99 -0
  76. package/lib/phase_2_gate_pack.js +77 -0
  77. package/lib/phase_2_payment_rails_pack.js +71 -0
  78. package/lib/phase_2_usdc_runtime_pack.js +71 -0
  79. package/lib/phase_3_brc_runtime_pack.js +81 -0
  80. package/lib/phase_3_bsv_teranode_runtime_pack.js +83 -0
  81. package/lib/phase_3_closeout_pack.js +62 -0
  82. package/lib/phase_3_completion_pack.js +94 -0
  83. package/lib/phase_3_decision_record_pack.js +64 -0
  84. package/lib/phase_3_decision_resolution_pack.js +69 -0
  85. package/lib/phase_3_freeze_baseline_pack.js +67 -0
  86. package/lib/phase_3_freeze_review_pack.js +80 -0
  87. package/lib/phase_3_gate_pack.js +76 -0
  88. package/lib/phase_3_metanet_runtime_pack.js +81 -0
  89. package/lib/phase_3_native_bsv_pack.js +91 -0
  90. package/lib/phase_3_native_continuity_pack.js +82 -0
  91. package/lib/phase_4_attestation_runtime_pack.js +75 -0
  92. package/lib/phase_4_closeout_pack.js +45 -0
  93. package/lib/phase_4_completion_pack.js +94 -0
  94. package/lib/phase_4_decision_record_pack.js +54 -0
  95. package/lib/phase_4_decision_resolution_pack.js +45 -0
  96. package/lib/phase_4_erc8004_runtime_pack.js +76 -0
  97. package/lib/phase_4_freeze_baseline_pack.js +67 -0
  98. package/lib/phase_4_freeze_review_pack.js +68 -0
  99. package/lib/phase_4_gate_pack.js +58 -0
  100. package/lib/phase_4_identity_registry_runtime_pack.js +75 -0
  101. package/lib/phase_4_identity_trust_pack.js +73 -0
  102. package/lib/phase_4_trust_continuity_pack.js +86 -0
  103. package/lib/phase_5_antelope_runtime_pack.js +76 -0
  104. package/lib/phase_5_closeout_pack.js +44 -0
  105. package/lib/phase_5_completion_pack.js +82 -0
  106. package/lib/phase_5_decision_record_pack.js +54 -0
  107. package/lib/phase_5_decision_resolution_pack.js +45 -0
  108. package/lib/phase_5_freeze_baseline_pack.js +67 -0
  109. package/lib/phase_5_freeze_review_pack.js +68 -0
  110. package/lib/phase_5_gate_pack.js +58 -0
  111. package/lib/phase_5_major_rails_continuity_pack.js +86 -0
  112. package/lib/phase_5_major_rails_pack.js +74 -0
  113. package/lib/phase_5_proton_xpr_runtime_pack.js +76 -0
  114. package/lib/phase_5_solana_runtime_pack.js +76 -0
  115. package/lib/phase_6_autogen_runtime_pack.js +72 -0
  116. package/lib/phase_6_closeout_pack.js +46 -0
  117. package/lib/phase_6_completion_pack.js +77 -0
  118. package/lib/phase_6_decision_record_pack.js +54 -0
  119. package/lib/phase_6_decision_resolution_pack.js +53 -0
  120. package/lib/phase_6_framework_continuity_pack.js +81 -0
  121. package/lib/phase_6_framework_runtime_pack.js +68 -0
  122. package/lib/phase_6_freeze_baseline_pack.js +68 -0
  123. package/lib/phase_6_freeze_review_pack.js +65 -0
  124. package/lib/phase_6_gate_pack.js +59 -0
  125. package/lib/phase_6_langchain_runtime_pack.js +72 -0
  126. package/lib/phase_6_langgraph_runtime_pack.js +72 -0
  127. package/lib/phase_6_semantic_kernel_runtime_pack.js +72 -0
  128. package/lib/phase_7_closeout_pack.js +45 -0
  129. package/lib/phase_7_completion_pack.js +85 -0
  130. package/lib/phase_7_decision_record_pack.js +53 -0
  131. package/lib/phase_7_decision_resolution_pack.js +53 -0
  132. package/lib/phase_7_event_system_continuity_pack.js +89 -0
  133. package/lib/phase_7_event_system_pack.js +76 -0
  134. package/lib/phase_7_freeze_baseline_pack.js +74 -0
  135. package/lib/phase_7_freeze_review_pack.js +65 -0
  136. package/lib/phase_7_gate_pack.js +58 -0
  137. package/lib/phase_7_kafka_runtime_pack.js +74 -0
  138. package/lib/phase_7_mqtt_runtime_pack.js +74 -0
  139. package/lib/phase_7_nats_runtime_pack.js +74 -0
  140. package/lib/phase_7_webhook_event_bus_runtime_pack.js +74 -0
  141. package/lib/phase_8_closeout_pack.js +46 -0
  142. package/lib/phase_8_completion_pack.js +82 -0
  143. package/lib/phase_8_decision_record_pack.js +54 -0
  144. package/lib/phase_8_decision_resolution_pack.js +53 -0
  145. package/lib/phase_8_external_receipt_import_runtime_pack.js +74 -0
  146. package/lib/phase_8_external_result_import_runtime_pack.js +74 -0
  147. package/lib/phase_8_freeze_baseline_pack.js +71 -0
  148. package/lib/phase_8_freeze_review_pack.js +64 -0
  149. package/lib/phase_8_gate_pack.js +58 -0
  150. package/lib/phase_8_proof_bridge_continuity_pack.js +86 -0
  151. package/lib/phase_8_proof_bridges_pack.js +72 -0
  152. package/lib/phase_8_proof_bundle_normalization_runtime_pack.js +74 -0
  153. package/lib/phase_9_closeout_pack.js +46 -0
  154. package/lib/phase_9_completion_pack.js +82 -0
  155. package/lib/phase_9_custody_refs_runtime_pack.js +74 -0
  156. package/lib/phase_9_decision_record_pack.js +54 -0
  157. package/lib/phase_9_decision_resolution_pack.js +53 -0
  158. package/lib/phase_9_freeze_baseline_pack.js +71 -0
  159. package/lib/phase_9_freeze_review_pack.js +64 -0
  160. package/lib/phase_9_gate_pack.js +58 -0
  161. package/lib/phase_9_operator_accounting_bridges_runtime_pack.js +74 -0
  162. package/lib/phase_9_treasury_connectivity_pack.js +72 -0
  163. package/lib/phase_9_treasury_continuity_pack.js +86 -0
  164. package/lib/phase_9_treasury_destinations_runtime_pack.js +74 -0
  165. package/lib/phase_program_pack.js +120 -0
  166. package/lib/publish_plan.js +51 -0
  167. package/lib/release_candidate.js +50 -0
  168. package/lib/release_center.js +1085 -0
  169. package/lib/release_history.js +72 -0
  170. package/lib/release_manifest.js +114 -0
  171. package/lib/release_pack.js +454 -0
  172. package/lib/runtime_state_store.js +354 -0
  173. package/lib/settlement_bsv_live.js +262 -13
  174. package/lib/soft_launch_pack.js +78 -0
  175. package/package.json +24 -2
  176. package/server.js +2562 -220
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ const packageJson = require("../package.json");
4
+
5
+ function buildReleaseHistory() {
6
+ return {
7
+ ok: true,
8
+ product: packageJson.name,
9
+ category: "machine-commerce-release-history",
10
+ current_version: packageJson.version,
11
+ release_track: "public_release",
12
+ history: [
13
+ {
14
+ version: "2.2.0",
15
+ channel: "public_release",
16
+ maturity_posture: "launch_ready",
17
+ headline: "public machine-commerce release-candidate with release-center, announcement, and candidate rehearsal surfaces",
18
+ milestone_refs: [
19
+ "runtime_and_economics_spine",
20
+ "native_settlement_observe_path",
21
+ "operator_pack_surfaces",
22
+ "release_pack_surfaces",
23
+ "release_center_surfaces",
24
+ "announcement_pack_surfaces",
25
+ "release_candidate_surfaces"
26
+ ]
27
+ },
28
+ {
29
+ version: "2.0.0",
30
+ channel: "public_release",
31
+ maturity_posture: "launch_ready",
32
+ headline: "public machine-commerce release with direct run, launch packaging, and release center surfaces",
33
+ milestone_refs: [
34
+ "runtime_and_economics_spine",
35
+ "native_settlement_observe_path",
36
+ "operator_pack_surfaces",
37
+ "release_pack_surfaces",
38
+ "release_center_surfaces"
39
+ ]
40
+ },
41
+ {
42
+ version: "1.x",
43
+ channel: "pre_public_foundation",
44
+ maturity_posture: "foundation_building",
45
+ headline: "pre-public commerce runtime, catalog, and settlement groundwork",
46
+ milestone_refs: [
47
+ "catalog_contract_growth",
48
+ "integration_registry_growth",
49
+ "commerce_runtime_foundations"
50
+ ]
51
+ }
52
+ ]
53
+ };
54
+ }
55
+
56
+ function summarizeReleaseHistory() {
57
+ const history = buildReleaseHistory();
58
+ return {
59
+ ok: true,
60
+ product: history.product,
61
+ category: history.category,
62
+ current_version: history.current_version,
63
+ release_count: history.history.length,
64
+ latest_channel: history.history[0].channel,
65
+ latest_maturity_posture: history.history[0].maturity_posture
66
+ };
67
+ }
68
+
69
+ module.exports = {
70
+ buildReleaseHistory,
71
+ summarizeReleaseHistory
72
+ };
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ const packageJson = require("../package.json");
4
+
5
+ function buildReleaseManifest() {
6
+ return {
7
+ ok: true,
8
+ product: packageJson.name,
9
+ version: packageJson.version,
10
+ release_track: "public_release",
11
+ package: {
12
+ name: packageJson.name,
13
+ version: packageJson.version,
14
+ description: packageJson.description,
15
+ license: packageJson.license,
16
+ homepage: packageJson.homepage,
17
+ repository: packageJson.repository && packageJson.repository.url ? packageJson.repository.url : null
18
+ },
19
+ install: {
20
+ install_command: "npm install xytara",
21
+ engine: packageJson.engines && packageJson.engines.node ? packageJson.engines.node : null,
22
+ start_command: "npm start",
23
+ verify_command: "npm run verify:all"
24
+ },
25
+ package_entrypoints: {
26
+ main: packageJson.main,
27
+ bin: packageJson.bin || {}
28
+ },
29
+ published_files: Array.isArray(packageJson.files) ? packageJson.files.slice() : [],
30
+ verification_surfaces: [
31
+ "verify:package",
32
+ "verify:integrations",
33
+ "verify:adapters",
34
+ "verify:tooling",
35
+ "verify:examples",
36
+ "verify:service"
37
+ ],
38
+ public_contract_docs: [
39
+ "README.md",
40
+ "START_HERE.md",
41
+ "RELEASE_CHECKLIST.md",
42
+ "FINAL_CONTRACT.md",
43
+ "SERVICE_CONTRACT.md",
44
+ "BSV_TERANODE_SETUP.md",
45
+ "REAL_PAYMENT_SETUP.md"
46
+ ]
47
+ };
48
+ }
49
+
50
+ function summarizeReleaseManifest() {
51
+ const manifest = buildReleaseManifest();
52
+ return {
53
+ ok: true,
54
+ product: manifest.product,
55
+ version: manifest.version,
56
+ release_track: manifest.release_track,
57
+ published_file_count: manifest.published_files.length,
58
+ verification_surface_count: manifest.verification_surfaces.length,
59
+ doc_count: manifest.public_contract_docs.length,
60
+ bin_count: Object.keys(manifest.package_entrypoints.bin || {}).length
61
+ };
62
+ }
63
+
64
+ function buildLaunchNotes() {
65
+ return {
66
+ ok: true,
67
+ product: packageJson.name,
68
+ version: packageJson.version,
69
+ release_notes: {
70
+ release_theme: "machine-commerce stack with direct run, release-candidate rehearsal, and operator-facing launch surfaces",
71
+ headline_capabilities: [
72
+ "one-line direct run cli",
73
+ "release, comparison, adoption, scenario, and launch packs",
74
+ "announcement, release-center, and release-candidate surfaces",
75
+ "credits-first machine spend posture",
76
+ "native settlement-aware runtime inspection",
77
+ "proof-compatible result handoff into xoonya"
78
+ ],
79
+ strongest_public_claims: [
80
+ "quote pay execute prove in one machine flow",
81
+ "governed execution for weak-trust agent interactions",
82
+ "settlement and metering continuity on the runtime side",
83
+ "clear proof followthrough instead of dead-end machine output"
84
+ ],
85
+ operator_checks_before_launch: [
86
+ "verify all package checks pass",
87
+ "verify release-candidate rehearsal passes",
88
+ "verify release-pack launch summary is reachable",
89
+ "verify runtime durability summary is healthy",
90
+ "verify native settlement readiness is healthy",
91
+ "verify first-run scenarios remain accurate"
92
+ ]
93
+ }
94
+ };
95
+ }
96
+
97
+ function summarizeLaunchNotes() {
98
+ const notes = buildLaunchNotes();
99
+ return {
100
+ ok: true,
101
+ product: notes.product,
102
+ version: notes.version,
103
+ headline_capability_count: notes.release_notes.headline_capabilities.length,
104
+ claim_count: notes.release_notes.strongest_public_claims.length,
105
+ operator_check_count: notes.release_notes.operator_checks_before_launch.length
106
+ };
107
+ }
108
+
109
+ module.exports = {
110
+ buildReleaseManifest,
111
+ summarizeReleaseManifest,
112
+ buildLaunchNotes,
113
+ summarizeLaunchNotes
114
+ };
@@ -0,0 +1,454 @@
1
+ "use strict";
2
+
3
+ const packageJson = require("../package.json");
4
+ const {
5
+ buildDefaultTransactionCenter,
6
+ summarizeCatalog,
7
+ summarizeCreditPacks,
8
+ summarizeDefaultTransactionEconomics,
9
+ summarizeDefaultTransactionGuidedLoops,
10
+ summarizeDefaultTransactionTaskPacks,
11
+ summarizeInteractionResultPackages,
12
+ summarizeInteractionSpinePaths,
13
+ summarizePrecommitInteractionPacks,
14
+ summarizeTransactionClassPacks
15
+ } = require("./catalog_contract");
16
+ const {
17
+ summarizeIntegrationProtocols,
18
+ summarizeIntegrationSettlementModes,
19
+ summarizeIntegrations
20
+ } = require("../integrations/registry");
21
+
22
+ function buildComparisonPack() {
23
+ return {
24
+ ok: true,
25
+ product: packageJson.name,
26
+ category: "machine-commerce-comparison",
27
+ comparisons: [
28
+ {
29
+ alternative: "runtime_only_stack",
30
+ missing_capabilities: [
31
+ "priced_quote_before_execution",
32
+ "native_payment_admission",
33
+ "reusable_credit_balance",
34
+ "settlement_aware_runtime_records",
35
+ "proof_ready_result_handoff"
36
+ ],
37
+ xytara_advantage: "one spine for discovery, pricing, payment or credit spend, execution, inspection, and proof-compatible handoff"
38
+ },
39
+ {
40
+ alternative: "payment_only_stack",
41
+ missing_capabilities: [
42
+ "task_catalog_and_workflow_classes",
43
+ "deterministic_usage_metering",
44
+ "runtime_result_packages",
45
+ "operator_payment_to_execution_linkage",
46
+ "post_payment_proof_followthrough"
47
+ ],
48
+ xytara_advantage: "payments remain attached to actual machine work, settlement state, treasury state, and result delivery"
49
+ },
50
+ {
51
+ alternative: "ad_hoc_agent_glue",
52
+ missing_capabilities: [
53
+ "stable_default_transaction_center",
54
+ "typed_task_pack_catalog",
55
+ "credit_and_entitlement_posture",
56
+ "operator_pack_surfaces",
57
+ "consistent_machine_contracts"
58
+ ],
59
+ xytara_advantage: "direct machine-commerce defaults reduce custom glue while preserving adapter breadth"
60
+ }
61
+ ],
62
+ strongest_reasons_to_try: [
63
+ "one-line direct run with payment-aware retry posture",
64
+ "credits-first repeat execution without changing the public runtime surface",
65
+ "operator-facing payment and settlement inspection surfaces",
66
+ "proof-compatible handoff into xoonya instead of dead-end runtime output"
67
+ ]
68
+ };
69
+ }
70
+
71
+ function summarizeComparisonPack() {
72
+ const pack = buildComparisonPack();
73
+ return {
74
+ ok: true,
75
+ product: pack.product,
76
+ comparison_count: pack.comparisons.length,
77
+ strongest_reason_count: pack.strongest_reasons_to_try.length,
78
+ alternatives: pack.comparisons.map((entry) => entry.alternative)
79
+ };
80
+ }
81
+
82
+ function buildAdoptionPack() {
83
+ return {
84
+ ok: true,
85
+ product: packageJson.name,
86
+ category: "machine-commerce-adoption",
87
+ positioning_line: "neutral machine transaction spine for agents that need governed execution, payment, proof, and replayability",
88
+ best_initial_wedge: "paid machine capability execution where trust is weak and proof matters",
89
+ initial_adoption_targets: [
90
+ {
91
+ target: "paid_agent_tools_and_services",
92
+ why_now: "builders already need quote, pay, execute, and inspect behavior around premium machine capabilities"
93
+ },
94
+ {
95
+ target: "cross_organization_agent_workflows",
96
+ why_now: "weak-trust interactions make payment and proof linkage materially more valuable than plain orchestration"
97
+ },
98
+ {
99
+ target: "high_frequency_microtask_systems",
100
+ why_now: "credits-first spend, deterministic metering, and reusable runtime posture reduce friction for repeated machine work"
101
+ },
102
+ {
103
+ target: "adapter_rich_execution_environments",
104
+ why_now: "protocol and settlement neutrality matters when teams do not want to lock into one runtime or one rail"
105
+ }
106
+ ],
107
+ target_ecosystems: [
108
+ "agent_builders",
109
+ "mcp_tool_authors",
110
+ "agent_marketplaces",
111
+ "x402_and_machine_payment_builders",
112
+ "weak_trust_multi_org_automation_teams"
113
+ ],
114
+ first_success_paths: [
115
+ {
116
+ path: "direct_pay_single_run",
117
+ start_with: "xytara-run",
118
+ success_condition: "agent discovers one capability, quotes it, pays, executes, and receives inspectable result records"
119
+ },
120
+ {
121
+ path: "credits_first_repeat_run",
122
+ start_with: "credit_pack_and_balance_surfaces",
123
+ success_condition: "funded agent reuses credits across repeated tasks without changing the public execution surface"
124
+ },
125
+ {
126
+ path: "runtime_to_proof_followthrough",
127
+ start_with: "result_package_export",
128
+ success_condition: "runtime output continues directly into xoonya proof review without ad hoc glue"
129
+ }
130
+ ],
131
+ what_to_say_publicly: [
132
+ "quote pay execute prove in one machine flow",
133
+ "governed execution for weak-trust agent interactions",
134
+ "payment, settlement, metering, and proof continuity in one stack",
135
+ "adapter-first machine commerce instead of one-off glue"
136
+ ],
137
+ what_not_to_lead_with: [
138
+ "just another agent framework",
139
+ "generic ai infrastructure",
140
+ "wallet-first branding",
141
+ "provider-specific lock-in language"
142
+ ]
143
+ };
144
+ }
145
+
146
+ function summarizeAdoptionPack() {
147
+ const pack = buildAdoptionPack();
148
+ return {
149
+ ok: true,
150
+ product: pack.product,
151
+ wedge: pack.best_initial_wedge,
152
+ target_count: pack.initial_adoption_targets.length,
153
+ ecosystem_count: pack.target_ecosystems.length,
154
+ first_success_path_count: pack.first_success_paths.length,
155
+ lead_message_count: pack.what_to_say_publicly.length
156
+ };
157
+ }
158
+
159
+ function buildScenarioPack() {
160
+ return {
161
+ ok: true,
162
+ product: packageJson.name,
163
+ category: "machine-commerce-scenarios",
164
+ scenarios: [
165
+ {
166
+ scenario_ref: "scenario.direct_pay.trust_verify",
167
+ title: "Direct Pay Trust Verify",
168
+ intended_for: "first_paid_machine_call",
169
+ why_it_matters: "shows the full quote pay execute inspect loop with the smallest strong-signal task",
170
+ steps: [
171
+ "inspect /v1/catalog/summary",
172
+ "run xytara-run for trust.verify",
173
+ "inspect transaction, payment, and settlement records"
174
+ ],
175
+ entrypoint: "xytara-run --url https://xytara.onrender.com --account acct_demo --command \"cli-run\" --task trust.verify --body-json '{\"subject_id\":\"subject-1\"}' --wallet-id merchant_wallet_main --wallet-secret YOUR_LOCAL_SIGNED_SECRET --txid YOUR_BSV_TXID",
176
+ surfaces: [
177
+ "/v1/catalog/summary",
178
+ "/x402/commands/execute",
179
+ "/v1/payment-ledger",
180
+ "/v1/settlement/bsv-teranode"
181
+ ],
182
+ success_signals: [
183
+ "transaction recorded",
184
+ "payment admitted",
185
+ "settlement record created",
186
+ "deliverable available"
187
+ ]
188
+ },
189
+ {
190
+ scenario_ref: "scenario.credits_first.repeat_run",
191
+ title: "Credits-First Repeat Run",
192
+ intended_for: "reusable_machine_balance",
193
+ why_it_matters: "shows repeat machine execution without reintroducing pay-in friction for each call",
194
+ steps: [
195
+ "fund credits through credit packs or external grant",
196
+ "inspect credit balance",
197
+ "execute with payment_preference credits_first",
198
+ "inspect usage meters and entitlements"
199
+ ],
200
+ entrypoint: "POST /v1/commands/execute with payment_preference=credits_first",
201
+ surfaces: [
202
+ "/v1/credit-packs/summary",
203
+ "/v1/economics/accounts/:account_id/credit-balance",
204
+ "/v1/economics/accounts/:account_id/usage-meters",
205
+ "/v1/economics/accounts/:account_id/entitlements"
206
+ ],
207
+ success_signals: [
208
+ "available units decrease",
209
+ "usage meter recorded",
210
+ "same execution surface reused",
211
+ "no extra payment challenge required"
212
+ ]
213
+ },
214
+ {
215
+ scenario_ref: "scenario.runtime_to_proof.followthrough",
216
+ title: "Runtime To Proof Followthrough",
217
+ intended_for: "proof_aware_machine_execution",
218
+ why_it_matters: "shows that runtime output is not a dead end and can continue into proof review directly",
219
+ steps: [
220
+ "execute one transaction-class or default loop",
221
+ "export result package or economic consequence handoff",
222
+ "continue into xoonya review"
223
+ ],
224
+ entrypoint: "POST /v1/transaction-center/result-packages/export or xytara result-package surfaces",
225
+ surfaces: [
226
+ "/v1/transaction-center/result-packages",
227
+ "/v1/transaction-center/result-package/export-template",
228
+ "/v1/economics/handoff-bundles/economic-consequence"
229
+ ],
230
+ success_signals: [
231
+ "result package produced",
232
+ "handoff bundle emitted",
233
+ "proof-side review path clear"
234
+ ]
235
+ }
236
+ ]
237
+ };
238
+ }
239
+
240
+ function summarizeScenarioPack() {
241
+ const pack = buildScenarioPack();
242
+ return {
243
+ ok: true,
244
+ product: pack.product,
245
+ scenario_count: pack.scenarios.length,
246
+ scenario_refs: pack.scenarios.map((entry) => entry.scenario_ref),
247
+ first_entrypoint: pack.scenarios[0] ? pack.scenarios[0].entrypoint : null
248
+ };
249
+ }
250
+
251
+ function buildLaunchPack(options = {}) {
252
+ const releaseSummary = summarizeReleasePack();
253
+ const comparisonSummary = summarizeComparisonPack();
254
+ const adoptionSummary = summarizeAdoptionPack();
255
+ const scenarioSummary = summarizeScenarioPack();
256
+ return {
257
+ ok: true,
258
+ product: packageJson.name,
259
+ category: "machine-commerce-launch-pack",
260
+ launch_readiness: {
261
+ release_summary: releaseSummary,
262
+ comparison_summary: comparisonSummary,
263
+ adoption_summary: adoptionSummary,
264
+ scenario_summary: scenarioSummary,
265
+ live_readiness: options.liveReadiness || null,
266
+ operator_posture: {
267
+ payment_ledger_surface: "/v1/payment-ledger",
268
+ settlement_surface: "/v1/settlement/bsv-teranode",
269
+ durability_surface: "/v1/runtime/durability"
270
+ }
271
+ },
272
+ launch_operator_checks: [
273
+ "release summary is reachable",
274
+ "comparison summary is reachable",
275
+ "adoption summary is reachable",
276
+ "scenario summary is reachable",
277
+ "runtime durability is inspectable",
278
+ "native settlement readiness is inspectable"
279
+ ],
280
+ first_public_pointer: "/v1/release-pack/launch/summary"
281
+ };
282
+ }
283
+
284
+ function summarizeLaunchPack(options = {}) {
285
+ const pack = buildLaunchPack(options);
286
+ return {
287
+ ok: true,
288
+ product: pack.product,
289
+ category: pack.category,
290
+ task_count: pack.launch_readiness.release_summary.task_count,
291
+ integration_count: pack.launch_readiness.release_summary.integration_count,
292
+ comparison_count: pack.launch_readiness.comparison_summary.comparison_count,
293
+ target_count: pack.launch_readiness.adoption_summary.target_count,
294
+ scenario_count: pack.launch_readiness.scenario_summary.scenario_count,
295
+ operator_check_count: pack.launch_operator_checks.length,
296
+ live_ready: pack.launch_readiness.live_readiness ? pack.launch_readiness.live_readiness.ready : null
297
+ };
298
+ }
299
+
300
+ function buildReleasePack() {
301
+ const transactionCenter = buildDefaultTransactionCenter();
302
+ const catalogSummary = summarizeCatalog();
303
+ const transactionEconomics = summarizeDefaultTransactionEconomics();
304
+ const taskPackSummary = summarizeDefaultTransactionTaskPacks();
305
+ const guidedLoopSummary = summarizeDefaultTransactionGuidedLoops();
306
+ const transactionClassSummary = summarizeTransactionClassPacks();
307
+ const precommitSummary = summarizePrecommitInteractionPacks();
308
+ const spineSummary = summarizeInteractionSpinePaths();
309
+ const resultPackageSummary = summarizeInteractionResultPackages();
310
+ const creditPackSummary = summarizeCreditPacks();
311
+ const integrationSummary = summarizeIntegrations();
312
+ const protocolSummary = summarizeIntegrationProtocols();
313
+ const settlementModeSummary = summarizeIntegrationSettlementModes();
314
+ const defaultProtocol = transactionCenter && transactionCenter.default_protocol
315
+ ? transactionCenter.default_protocol.protocol
316
+ : null;
317
+ const defaultPaymentProtocol = transactionCenter && transactionCenter.default_payment
318
+ ? transactionCenter.default_payment.protocol
319
+ : null;
320
+ const defaultSettlementMode = transactionCenter && transactionCenter.default_settlement
321
+ ? transactionCenter.default_settlement.settlement_mode
322
+ : null;
323
+
324
+ return {
325
+ ok: true,
326
+ product: {
327
+ name: packageJson.name,
328
+ version: packageJson.version,
329
+ description: packageJson.description,
330
+ homepage: packageJson.homepage,
331
+ repository: packageJson.repository && packageJson.repository.url ? packageJson.repository.url : null,
332
+ license: packageJson.license
333
+ },
334
+ positioning: {
335
+ category: "machine-commerce-spine",
336
+ primary_audiences: [
337
+ "agent_builders",
338
+ "machine_economy_developers",
339
+ "adapter_authors",
340
+ "settlement_aware_runtime_operators"
341
+ ],
342
+ core_claims: [
343
+ "discover_quote_pay_execute_inspect_handoff",
344
+ "credits_first_or_direct_payment",
345
+ "deterministic_usage_metering",
346
+ "settlement_aware_runtime_records",
347
+ "proof_compatible_handoff_into_xoonya"
348
+ ]
349
+ },
350
+ first_contact: {
351
+ install: "npm install xytara",
352
+ direct_run_cli: "xytara-run --url https://xytara.onrender.com --account acct_demo --command \"cli-run\" --task trust.verify --body-json '{\"subject_id\":\"subject-1\"}' --wallet-id merchant_wallet_main --wallet-secret YOUR_LOCAL_SIGNED_SECRET --txid YOUR_BSV_TXID",
353
+ discovery_surface: "/v1/catalog/summary",
354
+ transaction_center_surface: "/v1/transaction-center/summary",
355
+ economics_surface: "/v1/transaction-center/economics/summary",
356
+ handoff_expectation: "transaction result packages should continue into xoonya proof review and proof-native completion"
357
+ },
358
+ package_usage: {
359
+ install_command: "npm install xytara",
360
+ verify_command: "npm run verify:all",
361
+ local_service_command: "npm start",
362
+ release_cli: "xytara-release --summary",
363
+ docs: [
364
+ "README.md",
365
+ "START_HERE.md",
366
+ "FINAL_CONTRACT.md",
367
+ "SERVICE_CONTRACT.md",
368
+ "BSV_TERANODE_SETUP.md",
369
+ "REAL_PAYMENT_SETUP.md"
370
+ ]
371
+ },
372
+ default_path: {
373
+ protocol: defaultProtocol,
374
+ payment_protocol: defaultPaymentProtocol,
375
+ settlement_mode: defaultSettlementMode,
376
+ suggested_paths: Array.isArray(transactionCenter && transactionCenter.suggested_paths)
377
+ ? transactionCenter.suggested_paths
378
+ : []
379
+ },
380
+ commerce_loop: {
381
+ stages: ["discover", "quote", "pay_or_spend", "execute", "deliver", "inspect", "prove"],
382
+ spend_postures: ["direct_payment", "credits_first", "bounded_spend_credential"],
383
+ operator_surfaces: [
384
+ "/v1/operator-shell/summary",
385
+ "/v1/payment-ledger",
386
+ "/v1/settlement/bsv-teranode",
387
+ "/v1/runtime/durability"
388
+ ]
389
+ },
390
+ catalog_summary: catalogSummary,
391
+ transaction_economics_summary: transactionEconomics,
392
+ task_pack_summary: taskPackSummary,
393
+ guided_loop_summary: guidedLoopSummary,
394
+ transaction_class_summary: transactionClassSummary,
395
+ precommit_summary: precommitSummary,
396
+ spine_summary: spineSummary,
397
+ result_package_summary: resultPackageSummary,
398
+ credit_pack_summary: creditPackSummary,
399
+ integration_summary: integrationSummary,
400
+ protocol_summary: protocolSummary,
401
+ settlement_mode_summary: settlementModeSummary
402
+ };
403
+ }
404
+
405
+ function summarizeReleasePack() {
406
+ const pack = buildReleasePack();
407
+ return {
408
+ ok: true,
409
+ product: pack.product.name,
410
+ version: pack.product.version,
411
+ category: pack.positioning.category,
412
+ primary_audience_count: pack.positioning.primary_audiences.length,
413
+ core_claim_count: pack.positioning.core_claims.length,
414
+ default_protocol: pack.default_path.protocol,
415
+ default_payment_protocol: pack.default_path.payment_protocol,
416
+ default_settlement_mode: pack.default_path.settlement_mode,
417
+ suggested_path_count: Array.isArray(pack.default_path.suggested_paths) ? pack.default_path.suggested_paths.length : 0,
418
+ task_count: pack.catalog_summary.task_count,
419
+ workflow_count: pack.catalog_summary.workflow_count,
420
+ credit_pack_count: pack.credit_pack_summary.credit_pack_count,
421
+ integration_count: pack.integration_summary.integration_count,
422
+ production_default_integration_count: pack.integration_summary.production_default_count,
423
+ protocol_count: pack.protocol_summary.protocol_count,
424
+ settlement_mode_count: pack.settlement_mode_summary.settlement_mode_count,
425
+ transaction_class_count: pack.transaction_class_summary.class_pack_count,
426
+ result_package_count: pack.result_package_summary.result_package_count,
427
+ first_contact_cli: pack.first_contact.direct_run_cli,
428
+ install_command: pack.package_usage.install_command,
429
+ verify_command: pack.package_usage.verify_command,
430
+ release_cli: pack.package_usage.release_cli,
431
+ doc_count: pack.package_usage.docs.length,
432
+ comparison_surface: "/v1/release-pack/comparison",
433
+ comparison_cli: "xytara-release --comparison",
434
+ adoption_surface: "/v1/release-pack/adoption",
435
+ adoption_cli: "xytara-release --adoption",
436
+ scenario_surface: "/v1/release-pack/scenarios",
437
+ scenario_cli: "xytara-release --scenarios",
438
+ launch_surface: "/v1/release-pack/launch",
439
+ launch_cli: "xytara-release --launch"
440
+ };
441
+ }
442
+
443
+ module.exports = {
444
+ buildReleasePack,
445
+ summarizeReleasePack,
446
+ buildComparisonPack,
447
+ summarizeComparisonPack,
448
+ buildAdoptionPack,
449
+ summarizeAdoptionPack,
450
+ buildScenarioPack,
451
+ summarizeScenarioPack,
452
+ buildLaunchPack,
453
+ summarizeLaunchPack
454
+ };