xytara 2.0.0 → 2.1.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/.env.example +2 -0
- package/BSV_TERANODE_SETUP.md +30 -1
- package/FINAL_CONTRACT.md +6 -6
- package/PUBLISH_PLAN.md +12 -0
- package/README.md +76 -6
- package/RELEASE_CHECKLIST.md +10 -0
- package/RELEASE_NOTES.md +19 -0
- package/SERVICE_CONTRACT.md +4 -4
- package/bin/xytara-release.js +169 -0
- package/bin/xytara-run.js +186 -0
- package/index.js +81 -1
- package/lib/announcement_pack.js +61 -0
- package/lib/commerce_artifacts.js +3 -0
- package/lib/commerce_economics.js +14 -0
- package/lib/commerce_reports.js +26 -1
- package/lib/commerce_shell.js +18 -2
- package/lib/ecosystem_entry.js +64 -0
- package/lib/launch_narrative.js +53 -0
- package/lib/outreach_proof.js +71 -0
- package/lib/publish_plan.js +51 -0
- package/lib/release_candidate.js +50 -0
- package/lib/release_center.js +115 -0
- package/lib/release_history.js +72 -0
- package/lib/release_manifest.js +114 -0
- package/lib/release_pack.js +454 -0
- package/lib/runtime_state_store.js +169 -0
- package/lib/settlement_bsv_live.js +262 -13
- package/package.json +12 -2
- package/server.js +547 -8
package/.env.example
CHANGED
package/BSV_TERANODE_SETUP.md
CHANGED
|
@@ -26,12 +26,29 @@ XYTARA_BSV_TERANODE_MERCHANT_LABEL=naxytra-runtime
|
|
|
26
26
|
XYTARA_BSV_TERANODE_USE_METANET=false
|
|
27
27
|
XYTARA_BSV_TERANODE_SATS_PER_USD_CENT=100
|
|
28
28
|
XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE=mock
|
|
29
|
+
XYTARA_BSV_TERANODE_RPC_URL=
|
|
30
|
+
XYTARA_BSV_TERANODE_RPC_API_KEY=
|
|
31
|
+
XYTARA_BSV_TERANODE_RPC_AUTH_HEADER=authorization
|
|
32
|
+
XYTARA_BSV_TERANODE_RPC_AUTH_SCHEME=
|
|
33
|
+
XYTARA_BSV_TERANODE_OBSERVER_URL=
|
|
29
34
|
```
|
|
30
35
|
|
|
31
36
|
Optional:
|
|
32
37
|
|
|
38
|
+
- `XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE`
|
|
39
|
+
- `mock` keeps the old simulated submit/refresh loop
|
|
40
|
+
- `observe` accepts a payment-provided `txid` and performs real live confirmation refresh
|
|
41
|
+
- `arc` submits `raw_tx` through ARC and then performs real live confirmation refresh
|
|
33
42
|
- `XYTARA_BSV_TERANODE_RPC_URL`
|
|
34
|
-
-
|
|
43
|
+
- use your ARC submit endpoint, for example `https://arc.taal.com/v1/tx`
|
|
44
|
+
- `XYTARA_BSV_TERANODE_RPC_API_KEY`
|
|
45
|
+
- required when your ARC provider expects authenticated submission
|
|
46
|
+
- `XYTARA_BSV_TERANODE_RPC_AUTH_HEADER`
|
|
47
|
+
- defaults to `authorization`
|
|
48
|
+
- `XYTARA_BSV_TERANODE_RPC_AUTH_SCHEME`
|
|
49
|
+
- leave blank for TAAL-style raw API-key auth, or set `Bearer` if your provider expects it
|
|
50
|
+
- `XYTARA_BSV_TERANODE_OBSERVER_URL`
|
|
51
|
+
- optional transaction observer base; defaults to `https://api.whatsonchain.com/v1/bsv/<network>`
|
|
35
52
|
|
|
36
53
|
## Merchant Destination Routing
|
|
37
54
|
|
|
@@ -70,6 +87,18 @@ For live settlement follow-through after payment acceptance, use:
|
|
|
70
87
|
- `POST /v1/settlement/bsv-teranode/:settlement_id/submit`
|
|
71
88
|
- `POST /v1/settlement/bsv-teranode/:settlement_id/refresh`
|
|
72
89
|
|
|
90
|
+
If the signed payment payload already carries:
|
|
91
|
+
|
|
92
|
+
- `bsv_teranode.txid`
|
|
93
|
+
|
|
94
|
+
then `observe` mode is enough to turn `xytara` into a live confirmation tracker.
|
|
95
|
+
|
|
96
|
+
If the signed payment payload also carries:
|
|
97
|
+
|
|
98
|
+
- `bsv_teranode.raw_tx`
|
|
99
|
+
|
|
100
|
+
then `arc` mode can submit the raw transaction through ARC before refresh.
|
|
101
|
+
|
|
73
102
|
## Notes
|
|
74
103
|
|
|
75
104
|
- `bsv_teranode` is the canonical public settlement name
|
package/FINAL_CONTRACT.md
CHANGED
|
@@ -20,13 +20,13 @@ It consumes and emits proof-compatible facts, but its primary job is machine com
|
|
|
20
20
|
|
|
21
21
|
## Public Release Stance
|
|
22
22
|
|
|
23
|
-
This product is being prepared as a first public release
|
|
23
|
+
This product is being prepared as a first public release.
|
|
24
24
|
|
|
25
25
|
That means:
|
|
26
26
|
|
|
27
|
-
- prior
|
|
27
|
+
- prior SDK and service experiments are design history, not public obligations
|
|
28
28
|
- useful capability should be preserved where it strengthens the final product
|
|
29
|
-
-
|
|
29
|
+
- older helper sprawl does not automatically define the public contract
|
|
30
30
|
|
|
31
31
|
The public baseline should therefore be chosen for product quality, clarity, extensibility, and end-to-end usefulness, not for backward compatibility with prior private repos.
|
|
32
32
|
|
|
@@ -464,9 +464,9 @@ The final commerce product must maintain conformance across:
|
|
|
464
464
|
- proof integration
|
|
465
465
|
- adapter certification
|
|
466
466
|
|
|
467
|
-
## What Must Survive
|
|
467
|
+
## What Must Survive Across Earlier Product Iterations
|
|
468
468
|
|
|
469
|
-
From
|
|
469
|
+
From earlier product iterations, the following semantic wins should survive:
|
|
470
470
|
|
|
471
471
|
- clean separation of execution and proof
|
|
472
472
|
- clean separation of execution and settlement
|
|
@@ -476,7 +476,7 @@ From the internal stack, the following semantic wins should survive:
|
|
|
476
476
|
- proof-backed lifecycle state
|
|
477
477
|
- operator-grade visibility
|
|
478
478
|
|
|
479
|
-
Historical
|
|
479
|
+
Historical implementation labels and temporary names should not survive publicly.
|
|
480
480
|
|
|
481
481
|
## Final Product Position
|
|
482
482
|
|
package/PUBLISH_PLAN.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# xytara Publish Plan
|
|
2
|
+
|
|
3
|
+
1. Run `npm run verify:release-candidate`.
|
|
4
|
+
2. Run `npm pack --dry-run --json` and confirm the package contents.
|
|
5
|
+
3. Publish with `npm publish --access public`.
|
|
6
|
+
4. Redeploy the live service surfaces.
|
|
7
|
+
5. Verify:
|
|
8
|
+
- `/v1/release-candidate/summary`
|
|
9
|
+
- `/v1/release-center/summary`
|
|
10
|
+
- `/v1/announcement-pack/summary`
|
|
11
|
+
- `/v1/outreach-proof/summary`
|
|
12
|
+
6. Run the first public machine proof path.
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ If you are wiring the native BSV settlement base, continue with:
|
|
|
36
36
|
- [BSV_TERANODE_SETUP.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/BSV_TERANODE_SETUP.md)
|
|
37
37
|
- [REAL_PAYMENT_SETUP.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/REAL_PAYMENT_SETUP.md)
|
|
38
38
|
|
|
39
|
-
If you are wiring
|
|
39
|
+
If you are wiring external checkout or hosted funding paths, continue with:
|
|
40
40
|
|
|
41
41
|
- [HUMAN_CHECKOUT_AND_RUNTIME_BRIDGE_PATTERN.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/HUMAN_CHECKOUT_AND_RUNTIME_BRIDGE_PATTERN.md)
|
|
42
42
|
- [RUNTIME_BRIDGE_CONTRACT.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/RUNTIME_BRIDGE_CONTRACT.md)
|
|
@@ -120,23 +120,23 @@ This keeps one-off usage and repeat usage on the same public spine:
|
|
|
120
120
|
- credit balance when the caller is already funded and wants low-friction repeat execution
|
|
121
121
|
- optional agent and budget controls can still bound that spend without changing the execution surface
|
|
122
122
|
|
|
123
|
-
It also keeps the
|
|
123
|
+
It also keeps the external funding boundary clean:
|
|
124
124
|
|
|
125
125
|
- an external merchant-facing system can verify a purchase and issue a bounded credit grant into `xytara`
|
|
126
126
|
- `xytara` records the granted value and consumes it during later runtime operations
|
|
127
127
|
- the runtime does not need to absorb provider-specific checkout semantics to support repeat usage
|
|
128
128
|
- in production, `POST /v1/credit-bridge/grants` should normally be protected with `XYTARA_CREDIT_BRIDGE_BEARER_TOKEN`
|
|
129
129
|
|
|
130
|
-
The first
|
|
130
|
+
The first external checkout convenience path now follows a parallel narrow route:
|
|
131
131
|
|
|
132
132
|
1. create hosted purchase intent
|
|
133
133
|
2. create checkout session
|
|
134
134
|
3. normalize payment success
|
|
135
135
|
4. issue credits or entitlement
|
|
136
|
-
5. dispatch through the runtime
|
|
136
|
+
5. dispatch through the runtime path when needed
|
|
137
137
|
6. converge back into the same `xytara` and `xoonya` spine
|
|
138
138
|
|
|
139
|
-
The first direct hosted execution path now also has a public runtime
|
|
139
|
+
The first direct hosted execution path now also has a public runtime dispatch surface:
|
|
140
140
|
|
|
141
141
|
- `POST /v1/runtime-bridge/dispatch`
|
|
142
142
|
- `GET /v1/runtime-bridge/dispatches`
|
|
@@ -153,6 +153,55 @@ The operator shell now also carries hosted checkout visibility so purchase, disp
|
|
|
153
153
|
|
|
154
154
|
The rest of this README explains the full surface area and milestone trail, but the public starting posture should now be understandable from that one default path.
|
|
155
155
|
|
|
156
|
+
For release-grade adoption posture, inspect:
|
|
157
|
+
|
|
158
|
+
- `GET /v1/release-pack`
|
|
159
|
+
- `GET /v1/release-pack/summary`
|
|
160
|
+
- `GET /v1/release-pack/comparison`
|
|
161
|
+
- `GET /v1/release-pack/comparison/summary`
|
|
162
|
+
- `GET /v1/release-pack/adoption`
|
|
163
|
+
- `GET /v1/release-pack/adoption/summary`
|
|
164
|
+
- `GET /v1/release-pack/scenarios`
|
|
165
|
+
- `GET /v1/release-pack/scenarios/summary`
|
|
166
|
+
- `GET /v1/release-pack/launch`
|
|
167
|
+
- `GET /v1/release-pack/launch/summary`
|
|
168
|
+
- `GET /v1/release-manifest`
|
|
169
|
+
- `GET /v1/release-manifest/summary`
|
|
170
|
+
- `GET /v1/release-notes`
|
|
171
|
+
- `GET /v1/release-notes/summary`
|
|
172
|
+
- `GET /v1/release-center`
|
|
173
|
+
- `GET /v1/release-center/summary`
|
|
174
|
+
- `GET /v1/release-history`
|
|
175
|
+
- `GET /v1/release-history/summary`
|
|
176
|
+
- `GET /v1/publish-plan`
|
|
177
|
+
- `GET /v1/publish-plan/summary`
|
|
178
|
+
- `GET /v1/ecosystem-entry`
|
|
179
|
+
- `GET /v1/ecosystem-entry/summary`
|
|
180
|
+
- `GET /v1/launch-narrative`
|
|
181
|
+
- `GET /v1/launch-narrative/summary`
|
|
182
|
+
- `GET /v1/outreach-proof`
|
|
183
|
+
- `GET /v1/outreach-proof/summary`
|
|
184
|
+
- `GET /v1/announcement-pack`
|
|
185
|
+
- `GET /v1/announcement-pack/summary`
|
|
186
|
+
- `GET /v1/release-candidate`
|
|
187
|
+
- `GET /v1/release-candidate/summary`
|
|
188
|
+
- `xytara-release --summary`
|
|
189
|
+
- `xytara-release --comparison --summary`
|
|
190
|
+
- `xytara-release --adoption --summary`
|
|
191
|
+
- `xytara-release --scenarios --summary`
|
|
192
|
+
- `xytara-release --launch --summary`
|
|
193
|
+
- `xytara-release --manifest --summary`
|
|
194
|
+
- `xytara-release --notes --summary`
|
|
195
|
+
- `xytara-release --center --summary`
|
|
196
|
+
- `xytara-release --history --summary`
|
|
197
|
+
- `xytara-release --ecosystem --summary`
|
|
198
|
+
- `xytara-release --narrative --summary`
|
|
199
|
+
- `xytara-release --outreach-proof --summary`
|
|
200
|
+
- `xytara-release --announcement --summary`
|
|
201
|
+
- `xytara-release --candidate --summary`
|
|
202
|
+
|
|
203
|
+
These surfaces package the current machine-commerce value story, first-contact CLI path, default transaction posture, catalog/task-pack coverage, credit-pack posture, and integration/settlement breadth into one machine-readable launch boundary.
|
|
204
|
+
|
|
156
205
|
## Commerce Loop
|
|
157
206
|
|
|
158
207
|
The public product loop is:
|
|
@@ -589,6 +638,12 @@ Run:
|
|
|
589
638
|
node examples/quickstart.js
|
|
590
639
|
```
|
|
591
640
|
|
|
641
|
+
For a direct one-line machine run against a live service, use the bundled CLI:
|
|
642
|
+
|
|
643
|
+
```bash
|
|
644
|
+
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
|
|
645
|
+
```
|
|
646
|
+
|
|
592
647
|
The quickstart exercises:
|
|
593
648
|
|
|
594
649
|
- health and catalog
|
|
@@ -675,6 +730,9 @@ Production payment note:
|
|
|
675
730
|
- provide buyer wallet verification material through `XYTARA_WALLET_REGISTRY_JSON` or `XYTARA_WALLET_REGISTRY_PATH`
|
|
676
731
|
- set `XYTARA_TREASURY_DESTINATION_ID` and related treasury env vars so accepted payments land in your merchant treasury posture instead of the default local account placeholder
|
|
677
732
|
- built-in `x402` is the admission lane; real external payout/custody still depends on the payment rail and treasury destination you configure behind that lane
|
|
733
|
+
- for native BSV/Teranode live follow-through, set `XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE` to `observe` or `arc`
|
|
734
|
+
- use `XYTARA_BSV_TERANODE_RPC_URL` plus optional ARC auth envs when the live runtime needs ARC submission
|
|
735
|
+
- use `XYTARA_BSV_TERANODE_OBSERVER_URL` if you want to override the default live observer base
|
|
678
736
|
|
|
679
737
|
Primary service routes:
|
|
680
738
|
|
|
@@ -752,6 +810,7 @@ Primary service routes:
|
|
|
752
810
|
- `GET /v1/receipts/:receipt_id`
|
|
753
811
|
- `GET /v1/payment-ledger`
|
|
754
812
|
- `GET /v1/payment-ledger/:payment_id`
|
|
813
|
+
- `GET /v1/payment-ledger/:payment_id/operator-pack`
|
|
755
814
|
- `GET /v1/deliveries`
|
|
756
815
|
- `GET /v1/deliveries/:delivery_id`
|
|
757
816
|
- `GET /v1/disputes`
|
|
@@ -770,6 +829,7 @@ Primary service routes:
|
|
|
770
829
|
- `GET /v1/operator-export-pack`
|
|
771
830
|
- `GET /v1/operations/dashboard`
|
|
772
831
|
- `GET /v1/operations/attention-records`
|
|
832
|
+
- `GET /v1/runtime/durability`
|
|
773
833
|
- `GET /v1/operator-shell`
|
|
774
834
|
- `GET /v1/operator-shell/summary`
|
|
775
835
|
- `POST /v1/operator-shell/summary`
|
|
@@ -815,6 +875,8 @@ Primary service routes:
|
|
|
815
875
|
- `GET /v1/economics/evidence/receipts/:receipt_ref`
|
|
816
876
|
- `GET /v1/economics/evidence/jobs/:job_id`
|
|
817
877
|
- `GET /v1/economics/integration/jobs/:job_id`
|
|
878
|
+
- `GET /v1/settlement/bsv-teranode/readiness`
|
|
879
|
+
- `GET /v1/settlement/bsv-teranode/:settlement_id/operator-pack`
|
|
818
880
|
|
|
819
881
|
The Wave C coordination carry-over line adds a bounded coordination center on top of the public transaction spine:
|
|
820
882
|
|
|
@@ -834,9 +896,17 @@ The Wave F shell carry-over line adds a bounded operator shell inside public `xy
|
|
|
834
896
|
|
|
835
897
|
- self-serve agent account issuance for the public runtime path
|
|
836
898
|
- a unified operator shell summary across operations, economics, and coordination
|
|
899
|
+
- explicit runtime durability visibility for snapshot-backed recovery posture
|
|
900
|
+
- explicit native BSV/Teranode readiness visibility for merchant identity, transport, and verification posture
|
|
837
901
|
- compact workflow/admin shell exports that point cleanly into proof-side follow-through when needed
|
|
838
902
|
|
|
839
|
-
This keeps the public product centered on `naxytra` while
|
|
903
|
+
This keeps the public product centered on `naxytra` while preserving the useful operator-shell capability directly inside `xytara` instead of splitting it into a separate surface.
|
|
904
|
+
|
|
905
|
+
The durability and native-settlement readiness surfaces are also intended to make the remaining production boundary explicit:
|
|
906
|
+
|
|
907
|
+
- `/v1/runtime/durability` exposes whether runtime snapshots are enabled, whether a recoverable snapshot exists yet, and any current durability blockers
|
|
908
|
+
- `/v1/settlement/bsv-teranode/readiness` exposes whether merchant identity, transport, verification mode, and runtime mode are production-ready, plus the next manual inputs still required
|
|
909
|
+
- `/v1/payment-ledger/:payment_id/operator-pack` and `/v1/settlement/bsv-teranode/:settlement_id/operator-pack` collapse payment, settlement, treasury, proof, and economic-consequence carry into one operator-facing pack so direct-pay and funded-runtime paths are easier to inspect without stitching raw records together
|
|
840
910
|
|
|
841
911
|
## Verification
|
|
842
912
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# xytara Release Checklist
|
|
2
|
+
|
|
3
|
+
1. Run `npm run verify:release-candidate`.
|
|
4
|
+
2. Confirm `npm pack --dry-run --json` includes the public docs and both CLI entrypoints.
|
|
5
|
+
3. Redeploy the service and verify:
|
|
6
|
+
- `/v1/release-center/summary`
|
|
7
|
+
- `/v1/announcement-pack/summary`
|
|
8
|
+
- `/v1/outreach-proof/summary`
|
|
9
|
+
4. Run the first public proof path.
|
|
10
|
+
5. Only then publish the npm package.
|
package/RELEASE_NOTES.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# xytara 2.1.0 Release Notes
|
|
2
|
+
|
|
3
|
+
`xytara` 2.1.0 is the public machine-commerce release-candidate line.
|
|
4
|
+
|
|
5
|
+
Highlights:
|
|
6
|
+
|
|
7
|
+
- direct one-line machine execution with `xytara-run`
|
|
8
|
+
- release, comparison, adoption, scenario, and launch packs over HTTP and CLI
|
|
9
|
+
- release-center, announcement-pack, and release-candidate surfaces for public launch readiness
|
|
10
|
+
- credits-first reusable spend posture
|
|
11
|
+
- native settlement-aware runtime inspection
|
|
12
|
+
- proof-compatible handoff into `xoonya`
|
|
13
|
+
|
|
14
|
+
Recommended first checks:
|
|
15
|
+
|
|
16
|
+
1. `npm install xytara`
|
|
17
|
+
2. `xytara-release --candidate --summary`
|
|
18
|
+
3. `npm run verify:release-candidate`
|
|
19
|
+
4. inspect `/v1/release-candidate/summary` on the deployed service
|
package/SERVICE_CONTRACT.md
CHANGED
|
@@ -237,7 +237,7 @@ Deterministic usage metering should use:
|
|
|
237
237
|
|
|
238
238
|
External top-up and pack issuance should use:
|
|
239
239
|
|
|
240
|
-
1. verify the
|
|
240
|
+
1. verify the purchase outside the runtime
|
|
241
241
|
2. issue a bounded grant through `POST /v1/credit-bridge/grants`
|
|
242
242
|
3. inspect grants through `GET /v1/credit-bridge/grants`
|
|
243
243
|
4. rely on the same account credit balance and credit-first execution path afterward
|
|
@@ -257,7 +257,7 @@ Delegated spend should use:
|
|
|
257
257
|
5. use `payment_preference: "credits_first"` for the repeat-use path
|
|
258
258
|
6. revoke the credential without affecting account ownership or payout posture
|
|
259
259
|
|
|
260
|
-
The first
|
|
260
|
+
The first hosted purchase path now follows:
|
|
261
261
|
|
|
262
262
|
1. create purchase intent
|
|
263
263
|
2. create checkout session
|
|
@@ -269,7 +269,7 @@ Direct single-task hosted execution should use:
|
|
|
269
269
|
|
|
270
270
|
1. hosted checkout purchase intent
|
|
271
271
|
2. normalized `paid` event
|
|
272
|
-
3. runtime
|
|
272
|
+
3. runtime dispatch
|
|
273
273
|
4. normal transaction, receipt, treasury, and proof follow-through
|
|
274
274
|
|
|
275
275
|
Hosted checkout payout posture should use:
|
|
@@ -284,7 +284,7 @@ Provider or customer refund-shaped signals may be recorded, but they should not
|
|
|
284
284
|
Operator-shell posture should now also expose hosted checkout visibility:
|
|
285
285
|
|
|
286
286
|
- purchase intent counts
|
|
287
|
-
- runtime
|
|
287
|
+
- runtime dispatch counts
|
|
288
288
|
- refund review queue counts
|
|
289
289
|
|
|
290
290
|
so the human payment path remains operationally visible without introducing a second control plane.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
buildReleasePack,
|
|
6
|
+
summarizeReleasePack,
|
|
7
|
+
buildComparisonPack,
|
|
8
|
+
summarizeComparisonPack,
|
|
9
|
+
buildAdoptionPack,
|
|
10
|
+
summarizeAdoptionPack,
|
|
11
|
+
buildScenarioPack,
|
|
12
|
+
summarizeScenarioPack,
|
|
13
|
+
buildLaunchPack,
|
|
14
|
+
summarizeLaunchPack
|
|
15
|
+
} = require("../lib/release_pack");
|
|
16
|
+
const {
|
|
17
|
+
buildReleaseManifest,
|
|
18
|
+
summarizeReleaseManifest,
|
|
19
|
+
buildLaunchNotes,
|
|
20
|
+
summarizeLaunchNotes
|
|
21
|
+
} = require("../lib/release_manifest");
|
|
22
|
+
const {
|
|
23
|
+
buildReleaseCenter,
|
|
24
|
+
summarizeReleaseCenter
|
|
25
|
+
} = require("../lib/release_center");
|
|
26
|
+
const {
|
|
27
|
+
buildReleaseHistory,
|
|
28
|
+
summarizeReleaseHistory
|
|
29
|
+
} = require("../lib/release_history");
|
|
30
|
+
const {
|
|
31
|
+
buildPublishPlan,
|
|
32
|
+
summarizePublishPlan
|
|
33
|
+
} = require("../lib/publish_plan");
|
|
34
|
+
const {
|
|
35
|
+
buildEcosystemEntryPack,
|
|
36
|
+
summarizeEcosystemEntryPack
|
|
37
|
+
} = require("../lib/ecosystem_entry");
|
|
38
|
+
const {
|
|
39
|
+
buildLaunchNarrativePack,
|
|
40
|
+
summarizeLaunchNarrativePack
|
|
41
|
+
} = require("../lib/launch_narrative");
|
|
42
|
+
const {
|
|
43
|
+
buildOutreachProofPack,
|
|
44
|
+
summarizeOutreachProofPack
|
|
45
|
+
} = require("../lib/outreach_proof");
|
|
46
|
+
const {
|
|
47
|
+
buildAnnouncementPack,
|
|
48
|
+
summarizeAnnouncementPack
|
|
49
|
+
} = require("../lib/announcement_pack");
|
|
50
|
+
const {
|
|
51
|
+
buildReleaseCandidatePack,
|
|
52
|
+
summarizeReleaseCandidatePack
|
|
53
|
+
} = require("../lib/release_candidate");
|
|
54
|
+
|
|
55
|
+
function printUsage() {
|
|
56
|
+
process.stderr.write(
|
|
57
|
+
[
|
|
58
|
+
"Usage:",
|
|
59
|
+
" xytara-release [--summary] [--comparison] [--adoption] [--scenarios] [--launch] [--manifest] [--notes] [--center] [--history] [--publish-plan] [--ecosystem] [--narrative] [--outreach-proof] [--announcement] [--candidate] [--pretty]",
|
|
60
|
+
"",
|
|
61
|
+
"Options:",
|
|
62
|
+
" --summary Emit the compact release-pack summary",
|
|
63
|
+
" --comparison Emit the launch comparison pack",
|
|
64
|
+
" --adoption Emit the machine-world adoption pack",
|
|
65
|
+
" --scenarios Emit the first-run scenario pack",
|
|
66
|
+
" --launch Emit the compact launch/operator pack",
|
|
67
|
+
" --manifest Emit the release manifest",
|
|
68
|
+
" --notes Emit the release notes artifact",
|
|
69
|
+
" --center Emit the canonical release center artifact",
|
|
70
|
+
" --history Emit the release history artifact",
|
|
71
|
+
" --publish-plan Emit the publish-day command artifact",
|
|
72
|
+
" --ecosystem Emit the ecosystem entry artifact",
|
|
73
|
+
" --narrative Emit the launch narrative artifact",
|
|
74
|
+
" --outreach-proof Emit the outreach proof artifact",
|
|
75
|
+
" --announcement Emit the announcement artifact",
|
|
76
|
+
" --candidate Emit the release candidate artifact",
|
|
77
|
+
" --pretty Pretty-print JSON output"
|
|
78
|
+
].join("\n")
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function main() {
|
|
83
|
+
const args = process.argv.slice(2);
|
|
84
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
85
|
+
printUsage();
|
|
86
|
+
process.stderr.write("\n");
|
|
87
|
+
process.exit(0);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const summary = args.includes("--summary");
|
|
91
|
+
const comparison = args.includes("--comparison");
|
|
92
|
+
const adoption = args.includes("--adoption");
|
|
93
|
+
const scenarios = args.includes("--scenarios");
|
|
94
|
+
const launch = args.includes("--launch");
|
|
95
|
+
const manifest = args.includes("--manifest");
|
|
96
|
+
const notes = args.includes("--notes");
|
|
97
|
+
const center = args.includes("--center");
|
|
98
|
+
const history = args.includes("--history");
|
|
99
|
+
const publishPlan = args.includes("--publish-plan");
|
|
100
|
+
const ecosystem = args.includes("--ecosystem");
|
|
101
|
+
const narrative = args.includes("--narrative");
|
|
102
|
+
const outreachProof = args.includes("--outreach-proof");
|
|
103
|
+
const announcement = args.includes("--announcement");
|
|
104
|
+
const candidate = args.includes("--candidate");
|
|
105
|
+
const pretty = args.includes("--pretty") || summary;
|
|
106
|
+
let payload;
|
|
107
|
+
if (comparison && summary) {
|
|
108
|
+
payload = summarizeComparisonPack();
|
|
109
|
+
} else if (comparison) {
|
|
110
|
+
payload = buildComparisonPack();
|
|
111
|
+
} else if (adoption && summary) {
|
|
112
|
+
payload = summarizeAdoptionPack();
|
|
113
|
+
} else if (adoption) {
|
|
114
|
+
payload = buildAdoptionPack();
|
|
115
|
+
} else if (scenarios && summary) {
|
|
116
|
+
payload = summarizeScenarioPack();
|
|
117
|
+
} else if (scenarios) {
|
|
118
|
+
payload = buildScenarioPack();
|
|
119
|
+
} else if (launch && summary) {
|
|
120
|
+
payload = summarizeLaunchPack();
|
|
121
|
+
} else if (launch) {
|
|
122
|
+
payload = buildLaunchPack();
|
|
123
|
+
} else if (manifest && summary) {
|
|
124
|
+
payload = summarizeReleaseManifest();
|
|
125
|
+
} else if (manifest) {
|
|
126
|
+
payload = buildReleaseManifest();
|
|
127
|
+
} else if (notes && summary) {
|
|
128
|
+
payload = summarizeLaunchNotes();
|
|
129
|
+
} else if (notes) {
|
|
130
|
+
payload = buildLaunchNotes();
|
|
131
|
+
} else if (center && summary) {
|
|
132
|
+
payload = summarizeReleaseCenter();
|
|
133
|
+
} else if (center) {
|
|
134
|
+
payload = buildReleaseCenter();
|
|
135
|
+
} else if (history && summary) {
|
|
136
|
+
payload = summarizeReleaseHistory();
|
|
137
|
+
} else if (history) {
|
|
138
|
+
payload = buildReleaseHistory();
|
|
139
|
+
} else if (publishPlan && summary) {
|
|
140
|
+
payload = summarizePublishPlan();
|
|
141
|
+
} else if (publishPlan) {
|
|
142
|
+
payload = buildPublishPlan();
|
|
143
|
+
} else if (ecosystem && summary) {
|
|
144
|
+
payload = summarizeEcosystemEntryPack();
|
|
145
|
+
} else if (ecosystem) {
|
|
146
|
+
payload = buildEcosystemEntryPack();
|
|
147
|
+
} else if (narrative && summary) {
|
|
148
|
+
payload = summarizeLaunchNarrativePack();
|
|
149
|
+
} else if (narrative) {
|
|
150
|
+
payload = buildLaunchNarrativePack();
|
|
151
|
+
} else if (outreachProof && summary) {
|
|
152
|
+
payload = summarizeOutreachProofPack();
|
|
153
|
+
} else if (outreachProof) {
|
|
154
|
+
payload = buildOutreachProofPack();
|
|
155
|
+
} else if (announcement && summary) {
|
|
156
|
+
payload = summarizeAnnouncementPack();
|
|
157
|
+
} else if (announcement) {
|
|
158
|
+
payload = buildAnnouncementPack();
|
|
159
|
+
} else if (candidate && summary) {
|
|
160
|
+
payload = summarizeReleaseCandidatePack();
|
|
161
|
+
} else if (candidate) {
|
|
162
|
+
payload = buildReleaseCandidatePack();
|
|
163
|
+
} else {
|
|
164
|
+
payload = summary ? summarizeReleasePack() : buildReleasePack();
|
|
165
|
+
}
|
|
166
|
+
process.stdout.write(JSON.stringify(payload, null, pretty ? 2 : 0));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
main();
|