xoonya 2.4.0 → 2.6.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 (43) hide show
  1. package/README.md +135 -7
  2. package/RELEASE_NOTES.md +27 -18
  3. package/SERVICE_CONTRACT.md +86 -0
  4. package/START_HERE.md +39 -0
  5. package/XOONYA_NATIVE_ATOM_SPEC.md +184 -0
  6. package/XOONYA_NATIVE_PROOF_FORMAT.md +502 -0
  7. package/XOONYA_NATIVE_STANDARD_GOVERNANCE.md +116 -0
  8. package/bin/xoonya-first-run.js +184 -0
  9. package/bin/xoonya.js +81 -0
  10. package/lib/artifact_distribution_lane_contract.js +54 -0
  11. package/lib/asyncapi_contract.js +135 -0
  12. package/lib/auth_interop_contract.js +69 -0
  13. package/lib/cloudevents_contract.js +79 -0
  14. package/lib/erc8004_proof_lane_contract.js +64 -0
  15. package/lib/event_system_lane_contract.js +76 -0
  16. package/lib/external_proof_import_lane_contract.js +87 -0
  17. package/lib/feature_control_lane_contract.js +54 -0
  18. package/lib/framework_lane_contract.js +76 -0
  19. package/lib/identity_interop_contract.js +83 -0
  20. package/lib/integration_matrix_contract.js +81 -0
  21. package/lib/major_rails_proof_lane_contract.js +87 -0
  22. package/lib/openapi_contract.js +227 -0
  23. package/lib/proof_bridge_lane_contract.js +82 -0
  24. package/lib/provenance_lane_contract.js +54 -0
  25. package/lib/provider_lane_contract.js +67 -0
  26. package/lib/release_history.js +32 -0
  27. package/lib/result_package_trust_lane_contract.js +74 -0
  28. package/lib/shared_signals_lane_contract.js +54 -0
  29. package/lib/telemetry_lane_contract.js +54 -0
  30. package/lib/treasury_proof_lane_contract.js +83 -0
  31. package/package.json +13 -17
  32. package/proof_sdk.js +2391 -44
  33. package/server.js +406 -2
  34. package/vectors/adversarial-vectors.json +373 -2
  35. package/vectors/conformance-vectors.json +342 -1
  36. package/vectors/native-atom-vectors.json +101 -0
  37. package/vectors/native-payload-profile-vectors.json +50 -0
  38. package/OPERATIONS_RUNBOOK.md +0 -50
  39. package/OPERATOR_START_HERE.md +0 -67
  40. package/PROGRAM_COMPLETE_RELEASE.md +0 -52
  41. package/PROGRAM_STATUS.md +0 -57
  42. package/PUBLISH_PLAN.md +0 -14
  43. package/RELEASE_CHECKLIST.md +0 -16
package/server.js CHANGED
@@ -3,6 +3,7 @@ const { URL } = require('url');
3
3
  const proofSdk = require('./index.js');
4
4
  const {
5
5
  getIntegration,
6
+ listIntegrations,
6
7
  exportIntegrationRegistrySnapshot,
7
8
  summarizeIntegrationPromotionWorkflow,
8
9
  summarizeIntegrationPromotionWorkflowList,
@@ -75,6 +76,86 @@ const {
75
76
  buildBridgeIntelligencePack,
76
77
  summarizeBridgeIntelligencePack
77
78
  } = require('./lib/bridge_intelligence');
79
+ const {
80
+ buildOpenApiDocument,
81
+ summarizeOpenApiDocument,
82
+ } = require('./lib/openapi_contract');
83
+ const {
84
+ buildAsyncApiDocument,
85
+ summarizeAsyncApiDocument,
86
+ } = require('./lib/asyncapi_contract');
87
+ const {
88
+ buildCloudEventsContract,
89
+ summarizeCloudEventsContract,
90
+ } = require('./lib/cloudevents_contract');
91
+ const {
92
+ buildAuthInteropContract,
93
+ summarizeAuthInteropContract,
94
+ } = require('./lib/auth_interop_contract');
95
+ const {
96
+ buildIdentityInteropContract,
97
+ summarizeIdentityInteropContract,
98
+ } = require('./lib/identity_interop_contract');
99
+ const {
100
+ buildProviderLanePack,
101
+ summarizeProviderLanePack,
102
+ } = require('./lib/provider_lane_contract');
103
+ const {
104
+ buildFrameworkLanePack,
105
+ summarizeFrameworkLanePack,
106
+ } = require('./lib/framework_lane_contract');
107
+ const {
108
+ buildIntegrationMatrixPack,
109
+ summarizeIntegrationMatrixPack,
110
+ } = require('./lib/integration_matrix_contract');
111
+ const {
112
+ buildMajorRailsProofLanePack,
113
+ summarizeMajorRailsProofLanePack,
114
+ } = require('./lib/major_rails_proof_lane_contract');
115
+ const {
116
+ buildTreasuryProofLanePack,
117
+ summarizeTreasuryProofLanePack,
118
+ } = require('./lib/treasury_proof_lane_contract');
119
+ const {
120
+ buildErc8004ProofLanePack,
121
+ summarizeErc8004ProofLanePack,
122
+ } = require('./lib/erc8004_proof_lane_contract');
123
+ const {
124
+ buildProofBridgeLanePack,
125
+ summarizeProofBridgeLanePack,
126
+ } = require('./lib/proof_bridge_lane_contract');
127
+ const {
128
+ buildExternalProofImportLanePack,
129
+ summarizeExternalProofImportLanePack,
130
+ } = require('./lib/external_proof_import_lane_contract');
131
+ const {
132
+ buildResultPackageTrustLanePack,
133
+ summarizeResultPackageTrustLanePack,
134
+ } = require('./lib/result_package_trust_lane_contract');
135
+ const {
136
+ buildEventSystemLanePack,
137
+ summarizeEventSystemLanePack,
138
+ } = require('./lib/event_system_lane_contract');
139
+ const {
140
+ buildTelemetryLanePack,
141
+ summarizeTelemetryLanePack,
142
+ } = require('./lib/telemetry_lane_contract');
143
+ const {
144
+ buildProvenanceLanePack,
145
+ summarizeProvenanceLanePack,
146
+ } = require('./lib/provenance_lane_contract');
147
+ const {
148
+ buildArtifactDistributionLanePack,
149
+ summarizeArtifactDistributionLanePack,
150
+ } = require('./lib/artifact_distribution_lane_contract');
151
+ const {
152
+ buildSharedSignalsLanePack,
153
+ summarizeSharedSignalsLanePack,
154
+ } = require('./lib/shared_signals_lane_contract');
155
+ const {
156
+ buildFeatureControlLanePack,
157
+ summarizeFeatureControlLanePack,
158
+ } = require('./lib/feature_control_lane_contract');
78
159
  const {
79
160
  buildRoleFreezePack,
80
161
  summarizeRoleFreezePack,
@@ -630,6 +711,206 @@ async function routeRequest(req, res) {
630
711
  return;
631
712
  }
632
713
 
714
+ if (req.method === 'GET' && (url.pathname === '/openapi.json' || url.pathname === '/v1/openapi')) {
715
+ sendJson(res, 200, buildOpenApiDocument());
716
+ return;
717
+ }
718
+
719
+ if (req.method === 'GET' && url.pathname === '/v1/openapi/summary') {
720
+ sendJson(res, 200, summarizeOpenApiDocument());
721
+ return;
722
+ }
723
+
724
+ if (req.method === 'GET' && (url.pathname === '/asyncapi.json' || url.pathname === '/v1/asyncapi')) {
725
+ sendJson(res, 200, buildAsyncApiDocument());
726
+ return;
727
+ }
728
+
729
+ if (req.method === 'GET' && url.pathname === '/v1/asyncapi/summary') {
730
+ sendJson(res, 200, summarizeAsyncApiDocument());
731
+ return;
732
+ }
733
+
734
+ if (req.method === 'GET' && (url.pathname === '/cloudevents.json' || url.pathname === '/v1/cloudevents')) {
735
+ sendJson(res, 200, buildCloudEventsContract());
736
+ return;
737
+ }
738
+
739
+ if (req.method === 'GET' && url.pathname === '/v1/cloudevents/summary') {
740
+ sendJson(res, 200, summarizeCloudEventsContract());
741
+ return;
742
+ }
743
+
744
+ if (req.method === 'GET' && (url.pathname === '/v1/auth-profiles' || url.pathname === '/v1/auth-interop')) {
745
+ sendJson(res, 200, buildAuthInteropContract());
746
+ return;
747
+ }
748
+
749
+ if (req.method === 'GET' && (url.pathname === '/v1/auth-profiles/summary' || url.pathname === '/v1/auth-interop/summary')) {
750
+ sendJson(res, 200, summarizeAuthInteropContract());
751
+ return;
752
+ }
753
+
754
+ if (req.method === 'GET' && (url.pathname === '/v1/identity-interop' || url.pathname === '/v1/credential-interop')) {
755
+ sendJson(res, 200, buildIdentityInteropContract());
756
+ return;
757
+ }
758
+
759
+ if (req.method === 'GET' && (url.pathname === '/v1/identity-interop/summary' || url.pathname === '/v1/credential-interop/summary')) {
760
+ sendJson(res, 200, summarizeIdentityInteropContract());
761
+ return;
762
+ }
763
+
764
+ if (req.method === 'GET' && url.pathname === '/v1/providers') {
765
+ sendJson(res, 200, buildProviderLanePack());
766
+ return;
767
+ }
768
+
769
+ if (req.method === 'GET' && url.pathname === '/v1/providers/summary') {
770
+ sendJson(res, 200, summarizeProviderLanePack());
771
+ return;
772
+ }
773
+
774
+ if (req.method === 'GET' && url.pathname === '/v1/frameworks') {
775
+ sendJson(res, 200, buildFrameworkLanePack());
776
+ return;
777
+ }
778
+
779
+ if (req.method === 'GET' && url.pathname === '/v1/frameworks/summary') {
780
+ sendJson(res, 200, summarizeFrameworkLanePack());
781
+ return;
782
+ }
783
+
784
+ if (req.method === 'GET' && url.pathname === '/v1/integration-matrix') {
785
+ sendJson(res, 200, buildIntegrationMatrixPack(listIntegrations()));
786
+ return;
787
+ }
788
+
789
+ if (req.method === 'GET' && url.pathname === '/v1/integration-matrix/summary') {
790
+ sendJson(res, 200, summarizeIntegrationMatrixPack(listIntegrations()));
791
+ return;
792
+ }
793
+
794
+ if (req.method === 'GET' && url.pathname === '/v1/major-rails') {
795
+ sendJson(res, 200, buildMajorRailsProofLanePack());
796
+ return;
797
+ }
798
+
799
+ if (req.method === 'GET' && url.pathname === '/v1/major-rails/summary') {
800
+ sendJson(res, 200, summarizeMajorRailsProofLanePack());
801
+ return;
802
+ }
803
+
804
+ if (req.method === 'GET' && url.pathname === '/v1/treasury') {
805
+ sendJson(res, 200, buildTreasuryProofLanePack());
806
+ return;
807
+ }
808
+
809
+ if (req.method === 'GET' && url.pathname === '/v1/treasury/summary') {
810
+ sendJson(res, 200, summarizeTreasuryProofLanePack());
811
+ return;
812
+ }
813
+
814
+ if (req.method === 'GET' && url.pathname === '/v1/erc8004') {
815
+ sendJson(res, 200, buildErc8004ProofLanePack());
816
+ return;
817
+ }
818
+
819
+ if (req.method === 'GET' && url.pathname === '/v1/erc8004/summary') {
820
+ sendJson(res, 200, summarizeErc8004ProofLanePack());
821
+ return;
822
+ }
823
+
824
+ if (req.method === 'GET' && url.pathname === '/v1/proof-bridge') {
825
+ sendJson(res, 200, buildProofBridgeLanePack());
826
+ return;
827
+ }
828
+
829
+ if (req.method === 'GET' && url.pathname === '/v1/proof-bridge/summary') {
830
+ sendJson(res, 200, summarizeProofBridgeLanePack());
831
+ return;
832
+ }
833
+
834
+ if (req.method === 'GET' && url.pathname === '/v1/external-proof-import') {
835
+ sendJson(res, 200, buildExternalProofImportLanePack());
836
+ return;
837
+ }
838
+
839
+ if (req.method === 'GET' && url.pathname === '/v1/external-proof-import/summary') {
840
+ sendJson(res, 200, summarizeExternalProofImportLanePack());
841
+ return;
842
+ }
843
+
844
+ if (req.method === 'GET' && url.pathname === '/v1/result-package-trust') {
845
+ sendJson(res, 200, buildResultPackageTrustLanePack());
846
+ return;
847
+ }
848
+
849
+ if (req.method === 'GET' && url.pathname === '/v1/result-package-trust/summary') {
850
+ sendJson(res, 200, summarizeResultPackageTrustLanePack());
851
+ return;
852
+ }
853
+
854
+ if (req.method === 'GET' && url.pathname === '/v1/event-systems') {
855
+ sendJson(res, 200, buildEventSystemLanePack());
856
+ return;
857
+ }
858
+
859
+ if (req.method === 'GET' && url.pathname === '/v1/event-systems/summary') {
860
+ sendJson(res, 200, summarizeEventSystemLanePack());
861
+ return;
862
+ }
863
+
864
+ if (req.method === 'GET' && url.pathname === '/v1/telemetry') {
865
+ sendJson(res, 200, buildTelemetryLanePack());
866
+ return;
867
+ }
868
+
869
+ if (req.method === 'GET' && url.pathname === '/v1/telemetry/summary') {
870
+ sendJson(res, 200, summarizeTelemetryLanePack());
871
+ return;
872
+ }
873
+
874
+ if (req.method === 'GET' && url.pathname === '/v1/provenance') {
875
+ sendJson(res, 200, buildProvenanceLanePack());
876
+ return;
877
+ }
878
+
879
+ if (req.method === 'GET' && url.pathname === '/v1/provenance/summary') {
880
+ sendJson(res, 200, summarizeProvenanceLanePack());
881
+ return;
882
+ }
883
+
884
+ if (req.method === 'GET' && url.pathname === '/v1/artifact-distribution') {
885
+ sendJson(res, 200, buildArtifactDistributionLanePack());
886
+ return;
887
+ }
888
+
889
+ if (req.method === 'GET' && url.pathname === '/v1/artifact-distribution/summary') {
890
+ sendJson(res, 200, summarizeArtifactDistributionLanePack());
891
+ return;
892
+ }
893
+
894
+ if (req.method === 'GET' && url.pathname === '/v1/shared-signals') {
895
+ sendJson(res, 200, buildSharedSignalsLanePack());
896
+ return;
897
+ }
898
+
899
+ if (req.method === 'GET' && url.pathname === '/v1/shared-signals/summary') {
900
+ sendJson(res, 200, summarizeSharedSignalsLanePack());
901
+ return;
902
+ }
903
+
904
+ if (req.method === 'GET' && url.pathname === '/v1/feature-control') {
905
+ sendJson(res, 200, buildFeatureControlLanePack());
906
+ return;
907
+ }
908
+
909
+ if (req.method === 'GET' && url.pathname === '/v1/feature-control/summary') {
910
+ sendJson(res, 200, summarizeFeatureControlLanePack());
911
+ return;
912
+ }
913
+
633
914
  if (req.method === 'GET' && url.pathname === '/v1/release-pack') {
634
915
  sendJson(res, 200, buildReleasePack());
635
916
  return;
@@ -2075,6 +2356,96 @@ async function routeRequest(req, res) {
2075
2356
  return;
2076
2357
  }
2077
2358
 
2359
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standard') {
2360
+ sendJson(res, 200, proofSdk.buildXoonyaNativeProofStandard());
2361
+ return;
2362
+ }
2363
+
2364
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standard/summary') {
2365
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativeProofStandard());
2366
+ return;
2367
+ }
2368
+
2369
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-hybrid-readiness') {
2370
+ sendJson(res, 200, proofSdk.buildXoonyaNativeHybridReadinessPack());
2371
+ return;
2372
+ }
2373
+
2374
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-hybrid-readiness/summary') {
2375
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativeHybridReadinessPack());
2376
+ return;
2377
+ }
2378
+
2379
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standardization') {
2380
+ sendJson(res, 200, proofSdk.buildXoonyaNativeStandardizationPack());
2381
+ return;
2382
+ }
2383
+
2384
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standardization/summary') {
2385
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativeStandardizationPack());
2386
+ return;
2387
+ }
2388
+
2389
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-payload-profile') {
2390
+ sendJson(res, 200, proofSdk.buildXoonyaNativePayloadProfilePack());
2391
+ return;
2392
+ }
2393
+
2394
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-payload-profile/summary') {
2395
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativePayloadProfilePack());
2396
+ return;
2397
+ }
2398
+
2399
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-line-rate-frame') {
2400
+ sendJson(res, 200, proofSdk.buildXoonyaNativeLineRateFramePack());
2401
+ return;
2402
+ }
2403
+
2404
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-line-rate-frame/summary') {
2405
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativeLineRateFramePack());
2406
+ return;
2407
+ }
2408
+
2409
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-spec') {
2410
+ sendJson(res, 200, proofSdk.buildXoonyaNativeAtomSpec());
2411
+ return;
2412
+ }
2413
+
2414
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-spec/summary') {
2415
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativeAtomSpec());
2416
+ return;
2417
+ }
2418
+
2419
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-conformance') {
2420
+ sendJson(res, 200, proofSdk.buildXoonyaNativeAtomConformancePack());
2421
+ return;
2422
+ }
2423
+
2424
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-conformance/summary') {
2425
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativeAtomConformancePack());
2426
+ return;
2427
+ }
2428
+
2429
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-anchor-profile') {
2430
+ sendJson(res, 200, proofSdk.buildXoonyaNativeAnchorProfile());
2431
+ return;
2432
+ }
2433
+
2434
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-anchor-profile/summary') {
2435
+ sendJson(res, 200, proofSdk.summarizeXoonyaNativeAnchorProfile());
2436
+ return;
2437
+ }
2438
+
2439
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/import-adapter') {
2440
+ sendJson(res, 200, proofSdk.buildExternalProofImportAdapterPack());
2441
+ return;
2442
+ }
2443
+
2444
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/import-adapter/summary') {
2445
+ sendJson(res, 200, proofSdk.summarizeExternalProofImportAdapterPack());
2446
+ return;
2447
+ }
2448
+
2078
2449
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/default-loops') {
2079
2450
  sendJson(res, 200, proofSdk.buildDefaultProofLoopCatalog());
2080
2451
  return;
@@ -2162,6 +2533,39 @@ async function routeRequest(req, res) {
2162
2533
  return;
2163
2534
  }
2164
2535
 
2536
+ if (req.method === 'POST' && url.pathname === '/v1/proof-center/import-adapter/review') {
2537
+ try {
2538
+ const body = await readJsonBody(req);
2539
+ const result = proofSdk.reviewExternalProofImport(body);
2540
+ sendJson(res, 200, result);
2541
+ } catch (error) {
2542
+ sendJson(res, 400, { ok: false, reason: error.message });
2543
+ }
2544
+ return;
2545
+ }
2546
+
2547
+ if (req.method === 'POST' && url.pathname === '/v1/proof-center/import-adapter/review/summary') {
2548
+ try {
2549
+ const body = await readJsonBody(req);
2550
+ const result = proofSdk.summarizeExternalProofImportReview(body);
2551
+ sendJson(res, 200, result);
2552
+ } catch (error) {
2553
+ sendJson(res, 400, { ok: false, reason: error.message });
2554
+ }
2555
+ return;
2556
+ }
2557
+
2558
+ if (req.method === 'POST' && url.pathname === '/v1/proof-center/import-adapter/run') {
2559
+ try {
2560
+ const body = await readJsonBody(req);
2561
+ const result = proofSdk.runExternalProofImport(body);
2562
+ sendJson(res, 200, result);
2563
+ } catch (error) {
2564
+ sendJson(res, 400, { ok: false, reason: error.message });
2565
+ }
2566
+ return;
2567
+ }
2568
+
2165
2569
  if (req.method === 'POST' && url.pathname === '/v1/proof-center/transaction-handoff/run') {
2166
2570
  try {
2167
2571
  const body = await readJsonBody(req);
@@ -3406,8 +3810,8 @@ function createServer() {
3406
3810
  }
3407
3811
 
3408
3812
  if (require.main === module) {
3409
- const port = Number(process.env.XOONYA_PORT || 4310);
3410
- const host = process.env.XOONYA_HOST || '127.0.0.1';
3813
+ const port = Number(process.env.PORT || process.env.XOONYA_PORT || 4310);
3814
+ const host = process.env.XOONYA_HOST || (process.env.RENDER ? '0.0.0.0' : '127.0.0.1');
3411
3815
  const server = createServer();
3412
3816
  server.listen(port, host, () => {
3413
3817
  console.log(`xoonya listening on http://${host}:${port}`);