xoonya 3.0.1 → 3.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.
Files changed (246) hide show
  1. package/.env.example +2 -2
  2. package/CARRIED_HANDOFF_DEMO.md +60 -60
  3. package/COMPATIBILITY_NOTE.md +27 -27
  4. package/CROSS_RUNTIME_POSTURE.md +77 -77
  5. package/EXAMPLE_PATHS.md +53 -53
  6. package/FINAL_CONTRACT.md +445 -445
  7. package/LICENSE +201 -201
  8. package/NOTICE +3 -3
  9. package/OPERATIONS_RUNBOOK.md +50 -0
  10. package/OPERATOR_START_HERE.md +67 -0
  11. package/PARTNER_READY_PATH.md +67 -67
  12. package/PROGRAM_COMPLETE_RELEASE.md +52 -0
  13. package/PROGRAM_STATUS.md +57 -0
  14. package/PUBLIC_DEMO_SCRIPT.md +79 -79
  15. package/PUBLISH_PLAN.md +25 -0
  16. package/README.md +807 -732
  17. package/RELEASE_CHECKLIST.md +16 -0
  18. package/RELEASE_NOTES.md +15 -15
  19. package/SERVICE_CONTRACT.md +207 -195
  20. package/START_HERE.md +159 -150
  21. package/TERMINOLOGY.md +55 -55
  22. package/WHY_XYTARA_XOONYA.md +43 -43
  23. package/XNYA_CONFORMANCE_MARK.md +78 -78
  24. package/XNYA_REFERENCE_IMPLEMENTATIONS.md +157 -157
  25. package/XOONYA_DEFAULT_PATH_MODEL.md +63 -63
  26. package/XOONYA_FOLLOWTHROUGH_TRUTH_MODEL.md +63 -63
  27. package/XOONYA_NATIVE_ATOM_SPEC.md +184 -184
  28. package/XOONYA_NATIVE_PROOF_FORMAT.md +527 -527
  29. package/XOONYA_NATIVE_STANDARD_GOVERNANCE.md +119 -119
  30. package/XOONYA_PROOF_TRUTH_MODEL.md +58 -58
  31. package/bin/xoonya-first-run.js +184 -184
  32. package/bin/xoonya-release.js +1367 -1367
  33. package/bin/xoonya-review.js +70 -70
  34. package/bin/xoonya.js +82 -82
  35. package/examples/integration_boundary_walkthrough.js +37 -37
  36. package/examples/package_quickstart.js +1007 -1007
  37. package/examples/partner_proof_walkthrough.js +68 -68
  38. package/examples/proof_review_walkthrough.js +66 -66
  39. package/examples/review_carried_handoff.js +72 -72
  40. package/index.js +31 -22
  41. package/integrations/PROOF_INTEGRATION_PROCESS.md +45 -45
  42. package/integrations/examples/example-third-party-verifier-registration.record.json +22 -22
  43. package/integrations/registration-record.schema.json +99 -99
  44. package/integrations/registry-snapshot.schema.json +36 -36
  45. package/integrations/registry.js +636 -636
  46. package/integrations/views.js +36 -36
  47. package/lib/adapter_certification_contract.js +90 -0
  48. package/lib/announcement_pack.js +61 -61
  49. package/lib/artifact_distribution_lane_contract.js +54 -54
  50. package/lib/asyncapi_contract.js +135 -135
  51. package/lib/auth_interop_contract.js +69 -69
  52. package/lib/authority_binding_lifecycle_contract.js +182 -0
  53. package/lib/bridge_intelligence.js +102 -102
  54. package/lib/cloudevents_contract.js +79 -79
  55. package/lib/crypto_agility_matrix.js +125 -0
  56. package/lib/default_path_contract.js +380 -380
  57. package/lib/ecosystem_entry.js +64 -64
  58. package/lib/erc8004_proof_lane_contract.js +64 -64
  59. package/lib/event_system_lane_contract.js +76 -76
  60. package/lib/external_proof_import_lane_contract.js +87 -87
  61. package/lib/feature_control_lane_contract.js +54 -54
  62. package/lib/followthrough_truth_contract.js +214 -214
  63. package/lib/framework_lane_contract.js +76 -76
  64. package/lib/governance_disputes_summary.js +36 -36
  65. package/lib/governance_intelligence.js +108 -108
  66. package/lib/identity_interop_contract.js +83 -83
  67. package/lib/integration_matrix_contract.js +81 -81
  68. package/lib/launch_narrative.js +53 -53
  69. package/lib/machine_identity_registry_contract.js +199 -0
  70. package/lib/major_rails_proof_lane_contract.js +87 -87
  71. package/lib/offline_verifiability_recovery_contract.js +155 -0
  72. package/lib/openapi_contract.js +227 -227
  73. package/lib/operational_receipt_contract.js +165 -0
  74. package/lib/outreach_proof.js +71 -71
  75. package/lib/phase_10_closeout_pack.js +45 -45
  76. package/lib/phase_10_completion_pack.js +76 -76
  77. package/lib/phase_10_decision_record_pack.js +54 -54
  78. package/lib/phase_10_decision_resolution_pack.js +53 -53
  79. package/lib/phase_10_demand_signal_adapters_proof_pack.js +74 -74
  80. package/lib/phase_10_ecosystem_backlog_triage_proof_pack.js +74 -74
  81. package/lib/phase_10_freeze_baseline_pack.js +67 -67
  82. package/lib/phase_10_freeze_review_pack.js +64 -64
  83. package/lib/phase_10_gate_pack.js +57 -57
  84. package/lib/phase_10_long_tail_continuity_pack.js +80 -80
  85. package/lib/phase_10_long_tail_ecosystem_pack.js +68 -68
  86. package/lib/phase_10_niche_extension_registry_proof_pack.js +74 -74
  87. package/lib/phase_1_claude_mcp_pack.js +60 -60
  88. package/lib/phase_1_claude_mcp_proof_pack.js +57 -57
  89. package/lib/phase_1_ecosystem_pack.js +51 -51
  90. package/lib/phase_1_openai_codex_pack.js +60 -60
  91. package/lib/phase_1_openai_codex_proof_pack.js +57 -57
  92. package/lib/phase_2_base_proof_pack.js +71 -71
  93. package/lib/phase_2_base_usdc_proof_pack.js +72 -72
  94. package/lib/phase_2_closeout_pack.js +65 -65
  95. package/lib/phase_2_completion_pack.js +113 -113
  96. package/lib/phase_2_decision_record_pack.js +66 -66
  97. package/lib/phase_2_decision_resolution_pack.js +69 -69
  98. package/lib/phase_2_eth_proof_pack.js +70 -70
  99. package/lib/phase_2_evm_base_proof_pack.js +73 -73
  100. package/lib/phase_2_evm_proof_pack.js +71 -71
  101. package/lib/phase_2_flip_preview_pack.js +60 -60
  102. package/lib/phase_2_freeze_review_pack.js +99 -99
  103. package/lib/phase_2_gate_pack.js +77 -77
  104. package/lib/phase_2_payment_rails_pack.js +71 -71
  105. package/lib/phase_2_usdc_proof_pack.js +71 -71
  106. package/lib/phase_3_brc_proof_pack.js +81 -81
  107. package/lib/phase_3_bsv_teranode_proof_pack.js +81 -81
  108. package/lib/phase_3_closeout_pack.js +62 -62
  109. package/lib/phase_3_completion_pack.js +92 -92
  110. package/lib/phase_3_decision_record_pack.js +64 -64
  111. package/lib/phase_3_decision_resolution_pack.js +69 -69
  112. package/lib/phase_3_freeze_baseline_pack.js +67 -67
  113. package/lib/phase_3_freeze_review_pack.js +80 -80
  114. package/lib/phase_3_gate_pack.js +76 -76
  115. package/lib/phase_3_metanet_proof_pack.js +81 -81
  116. package/lib/phase_3_native_bsv_pack.js +89 -89
  117. package/lib/phase_3_native_continuity_pack.js +82 -82
  118. package/lib/phase_4_attestation_proof_pack.js +75 -75
  119. package/lib/phase_4_closeout_pack.js +45 -45
  120. package/lib/phase_4_completion_pack.js +82 -82
  121. package/lib/phase_4_decision_record_pack.js +54 -54
  122. package/lib/phase_4_decision_resolution_pack.js +45 -45
  123. package/lib/phase_4_erc8004_proof_pack.js +76 -76
  124. package/lib/phase_4_freeze_baseline_pack.js +67 -67
  125. package/lib/phase_4_freeze_review_pack.js +68 -68
  126. package/lib/phase_4_gate_pack.js +58 -58
  127. package/lib/phase_4_identity_registry_proof_pack.js +75 -75
  128. package/lib/phase_4_identity_trust_pack.js +73 -73
  129. package/lib/phase_4_trust_continuity_pack.js +86 -86
  130. package/lib/phase_5_antelope_proof_pack.js +76 -76
  131. package/lib/phase_5_closeout_pack.js +44 -44
  132. package/lib/phase_5_completion_pack.js +82 -82
  133. package/lib/phase_5_decision_record_pack.js +54 -54
  134. package/lib/phase_5_decision_resolution_pack.js +45 -45
  135. package/lib/phase_5_freeze_baseline_pack.js +67 -67
  136. package/lib/phase_5_freeze_review_pack.js +68 -68
  137. package/lib/phase_5_gate_pack.js +58 -58
  138. package/lib/phase_5_major_rails_continuity_pack.js +86 -86
  139. package/lib/phase_5_major_rails_pack.js +74 -74
  140. package/lib/phase_5_proton_xpr_proof_pack.js +76 -76
  141. package/lib/phase_5_solana_proof_pack.js +76 -76
  142. package/lib/phase_6_autogen_proof_pack.js +74 -74
  143. package/lib/phase_6_closeout_pack.js +46 -46
  144. package/lib/phase_6_completion_pack.js +77 -77
  145. package/lib/phase_6_decision_record_pack.js +54 -54
  146. package/lib/phase_6_decision_resolution_pack.js +53 -53
  147. package/lib/phase_6_framework_continuity_pack.js +81 -81
  148. package/lib/phase_6_framework_runtime_pack.js +68 -68
  149. package/lib/phase_6_freeze_baseline_pack.js +68 -68
  150. package/lib/phase_6_freeze_review_pack.js +65 -65
  151. package/lib/phase_6_gate_pack.js +59 -59
  152. package/lib/phase_6_langchain_proof_pack.js +74 -74
  153. package/lib/phase_6_langgraph_proof_pack.js +74 -74
  154. package/lib/phase_6_semantic_kernel_proof_pack.js +74 -74
  155. package/lib/phase_7_closeout_pack.js +45 -45
  156. package/lib/phase_7_completion_pack.js +85 -85
  157. package/lib/phase_7_decision_record_pack.js +53 -53
  158. package/lib/phase_7_decision_resolution_pack.js +53 -53
  159. package/lib/phase_7_event_system_continuity_pack.js +89 -89
  160. package/lib/phase_7_event_system_pack.js +76 -76
  161. package/lib/phase_7_freeze_baseline_pack.js +74 -74
  162. package/lib/phase_7_freeze_review_pack.js +65 -65
  163. package/lib/phase_7_gate_pack.js +58 -58
  164. package/lib/phase_7_kafka_proof_pack.js +76 -76
  165. package/lib/phase_7_mqtt_proof_pack.js +76 -76
  166. package/lib/phase_7_nats_proof_pack.js +76 -76
  167. package/lib/phase_7_webhook_event_bus_proof_pack.js +76 -76
  168. package/lib/phase_8_closeout_pack.js +46 -46
  169. package/lib/phase_8_completion_pack.js +82 -82
  170. package/lib/phase_8_decision_record_pack.js +54 -54
  171. package/lib/phase_8_decision_resolution_pack.js +53 -53
  172. package/lib/phase_8_external_receipt_import_proof_pack.js +74 -74
  173. package/lib/phase_8_external_result_import_proof_pack.js +74 -74
  174. package/lib/phase_8_freeze_baseline_pack.js +71 -71
  175. package/lib/phase_8_freeze_review_pack.js +64 -64
  176. package/lib/phase_8_gate_pack.js +58 -58
  177. package/lib/phase_8_proof_bridge_continuity_pack.js +86 -86
  178. package/lib/phase_8_proof_bridges_pack.js +72 -72
  179. package/lib/phase_8_proof_bundle_normalization_proof_pack.js +74 -74
  180. package/lib/phase_9_closeout_pack.js +46 -46
  181. package/lib/phase_9_completion_pack.js +82 -82
  182. package/lib/phase_9_custody_refs_proof_pack.js +74 -74
  183. package/lib/phase_9_decision_record_pack.js +54 -54
  184. package/lib/phase_9_decision_resolution_pack.js +53 -53
  185. package/lib/phase_9_freeze_baseline_pack.js +71 -71
  186. package/lib/phase_9_freeze_review_pack.js +64 -64
  187. package/lib/phase_9_gate_pack.js +58 -58
  188. package/lib/phase_9_operator_accounting_bridges_proof_pack.js +74 -74
  189. package/lib/phase_9_treasury_connectivity_pack.js +72 -72
  190. package/lib/phase_9_treasury_continuity_pack.js +86 -86
  191. package/lib/phase_9_treasury_destinations_proof_pack.js +74 -74
  192. package/lib/phase_program_pack.js +47 -47
  193. package/lib/proof_bridge_lane_contract.js +82 -82
  194. package/lib/proof_truth_contract.js +224 -224
  195. package/lib/provenance_lane_contract.js +54 -54
  196. package/lib/provider_lane_contract.js +67 -67
  197. package/lib/public_surface_policy_contract.js +111 -0
  198. package/lib/publish_plan.js +51 -51
  199. package/lib/release_candidate.js +50 -50
  200. package/lib/release_center.js +1037 -1037
  201. package/lib/release_history.js +206 -206
  202. package/lib/release_manifest.js +114 -114
  203. package/lib/release_pack.js +391 -391
  204. package/lib/result_package_trust_lane_contract.js +74 -74
  205. package/lib/review_intelligence.js +100 -100
  206. package/lib/role_freeze.js +436 -436
  207. package/lib/shared_signals_lane_contract.js +54 -54
  208. package/lib/signed_audit_provenance_contract.js +93 -0
  209. package/lib/telemetry_lane_contract.js +54 -54
  210. package/lib/treasury_proof_lane_contract.js +83 -83
  211. package/lib/trust_intelligence.js +106 -106
  212. package/lib/trust_portability_boundary_contract.js +66 -0
  213. package/lib/trust_portability_pack.js +224 -224
  214. package/lib/verification_service_pack.js +149 -149
  215. package/package.json +97 -95
  216. package/proof_sdk.js +6265 -6265
  217. package/reference/python/README.md +35 -35
  218. package/reference/python/requirements-optional.txt +1 -1
  219. package/reference/python/verify_vectors.py +223 -223
  220. package/reference/python/xnya_reference.py +810 -810
  221. package/reference/rust/Cargo.toml +11 -11
  222. package/reference/rust/README.md +28 -28
  223. package/reference/rust/src/lib.rs +87 -87
  224. package/scripts/registry_cli.js +157 -157
  225. package/scripts/verify_all.js +603 -603
  226. package/scripts/verify_control_plane_contracts.js +34 -0
  227. package/scripts/verify_control_plane_routes.js +70 -0
  228. package/scripts/verify_examples.js +19 -19
  229. package/scripts/verify_external_proof_import_gate.js +84 -84
  230. package/scripts/verify_integrations.js +170 -170
  231. package/scripts/verify_native_hybrid_design_gate.js +114 -114
  232. package/scripts/verify_reference_promotion_gate.js +74 -74
  233. package/scripts/verify_reference_python.js +49 -49
  234. package/scripts/verify_reference_python_crypto.js +87 -87
  235. package/scripts/verify_reference_rust_scaffold.js +50 -50
  236. package/scripts/verify_release_candidate.js +131 -131
  237. package/scripts/verify_service.js +2940 -2940
  238. package/scripts/verify_tooling.js +1251 -1251
  239. package/scripts/verify_trust_portability.js +56 -56
  240. package/scripts/verify_vectors.js +192 -192
  241. package/scripts/verify_verification_services.js +56 -56
  242. package/server.js +4099 -3997
  243. package/vectors/adversarial-vectors.json +552 -552
  244. package/vectors/conformance-vectors.json +446 -446
  245. package/vectors/native-atom-vectors.json +101 -101
  246. package/vectors/native-payload-profile-vectors.json +50 -50
@@ -1,636 +1,636 @@
1
- "use strict";
2
-
3
- const stagedPartnerVerifierRegistrationRecord = require("./examples/example-third-party-verifier-registration.record.json");
4
-
5
- function clone(value) {
6
- return JSON.parse(JSON.stringify(value));
7
- }
8
-
9
- function sortStrings(values) {
10
- return Array.from(new Set((Array.isArray(values) ? values : []).filter(Boolean))).sort();
11
- }
12
-
13
- function summarizeCounts(values, fieldName) {
14
- return sortStrings(values).map((value) => ({
15
- [fieldName]: value,
16
- count: values.filter((entry) => entry === value).length
17
- }));
18
- }
19
-
20
- function createIntegrationDescriptor(descriptor, extras = {}) {
21
- return {
22
- integration_id: descriptor.integration_id,
23
- integration_class: descriptor.integration_class,
24
- display_name: descriptor.display_name,
25
- description: descriptor.description,
26
- proof_scope: descriptor.proof_scope,
27
- source: extras.source || descriptor.source || "builtin",
28
- bundled: extras.bundled !== false,
29
- status: extras.status || descriptor.status || "available",
30
- certification_state: extras.certification_state || descriptor.certification_state || "reference_example",
31
- certification_scope: sortStrings(extras.certification_scope || descriptor.certification_scope),
32
- integration_maturity: extras.integration_maturity || descriptor.integration_maturity || "reference_example",
33
- operational_readiness: extras.operational_readiness || descriptor.operational_readiness || "reference",
34
- capabilities: sortStrings(descriptor.capabilities),
35
- public_surfaces: sortStrings(descriptor.public_surfaces),
36
- compatibility: clone(descriptor.compatibility || {}),
37
- required_inputs: sortStrings(descriptor.required_inputs),
38
- emitted_artifacts: sortStrings(descriptor.emitted_artifacts),
39
- verification_targets: sortStrings(descriptor.verification_targets),
40
- selection_hints: {
41
- default_for_proof_scopes: sortStrings(
42
- extras.default_for_proof_scopes || descriptor.default_for_proof_scopes || [descriptor.proof_scope]
43
- )
44
- }
45
- };
46
- }
47
-
48
- function buildIntegrationRegistrationView(integration, registrationRecord) {
49
- const integrationEntry = integration || {};
50
- const record = registrationRecord && typeof registrationRecord === "object" ? registrationRecord : null;
51
- return {
52
- registration_state: record ? record.registration_state : "production_registered",
53
- bundled: record ? record.bundled : integrationEntry.bundled === true,
54
- default_selection_enabled: record ? record.default_selection_enabled === true : integrationEntry.bundled === true,
55
- requires_explicit_selection: record ? record.requires_explicit_selection === true : integrationEntry.bundled !== true,
56
- registered_at: record ? record.registered_at : null,
57
- registered_by: record ? record.registered_by || null : null,
58
- verified_with: sortStrings(record && record.verified_with),
59
- notes: record ? record.notes || null : null
60
- };
61
- }
62
-
63
- function buildIntegrationView(integration, registrationRecord) {
64
- const entry = clone(integration);
65
- entry.registration = buildIntegrationRegistrationView(entry, registrationRecord);
66
- entry.registration_state = entry.registration.registration_state;
67
- return entry;
68
- }
69
-
70
- function validateIntegrationRegistration(descriptor, registrationRecord) {
71
- const errors = [];
72
- const integrationDescriptor = descriptor && typeof descriptor === "object" ? descriptor : {};
73
- const record = registrationRecord && typeof registrationRecord === "object" ? registrationRecord : {};
74
-
75
- if (!integrationDescriptor.integration_id) errors.push("descriptor.integration_id is required");
76
- if (!record.integration_id) errors.push("registration_record.integration_id is required");
77
- if (!integrationDescriptor.integration_class) errors.push("descriptor.integration_class is required");
78
- if (!record.integration_class) errors.push("registration_record.integration_class is required");
79
- if (!integrationDescriptor.proof_scope) errors.push("descriptor.proof_scope is required");
80
- if (!record.proof_scope) errors.push("registration_record.proof_scope is required");
81
- if (integrationDescriptor.integration_id && record.integration_id && integrationDescriptor.integration_id !== record.integration_id) {
82
- errors.push("descriptor.integration_id must match registration_record.integration_id");
83
- }
84
- if (integrationDescriptor.integration_class && record.integration_class && integrationDescriptor.integration_class !== record.integration_class) {
85
- errors.push("descriptor.integration_class must match registration_record.integration_class");
86
- }
87
- if (integrationDescriptor.proof_scope && record.proof_scope && integrationDescriptor.proof_scope !== record.proof_scope) {
88
- errors.push("descriptor.proof_scope must match registration_record.proof_scope");
89
- }
90
-
91
- return {
92
- ok: errors.length === 0,
93
- errors
94
- };
95
- }
96
-
97
- function importRegisteredIntegration(descriptor, registrationRecord, extras = {}) {
98
- const validation = validateIntegrationRegistration(descriptor, registrationRecord);
99
- if (!validation.ok) {
100
- const error = new Error(`invalid proof integration registration:\n${validation.errors.join("\n")}`);
101
- error.code = "invalid_proof_integration_registration";
102
- error.validation = validation;
103
- throw error;
104
- }
105
- const record = registrationRecord || {};
106
- const integration = createIntegrationDescriptor(descriptor, {
107
- ...extras,
108
- bundled: Object.prototype.hasOwnProperty.call(record, "bundled") ? record.bundled : extras.bundled,
109
- certification_state: record.certification_state || extras.certification_state,
110
- certification_scope: record.certification_scope || extras.certification_scope,
111
- integration_maturity: record.integration_maturity || extras.integration_maturity,
112
- operational_readiness: record.operational_readiness || extras.operational_readiness,
113
- default_for_proof_scopes: record.default_selection_enabled === true
114
- ? (extras.default_for_proof_scopes || [descriptor.proof_scope])
115
- : []
116
- });
117
- return buildIntegrationView(integration, record);
118
- }
119
-
120
- function createIntegrationRegistrySnapshot(integrations, filters = {}) {
121
- const rows = Array.isArray(integrations) ? integrations.map(clone) : [];
122
- return {
123
- snapshot_version: "xoonya/integration-registry-snapshot/v1",
124
- generated_at: new Date().toISOString(),
125
- integration_count: rows.length,
126
- filters: clone(filters || {}),
127
- integrations: rows
128
- };
129
- }
130
-
131
- function exportIntegrationRegistrySnapshot(filters = {}) {
132
- return createIntegrationRegistrySnapshot(listIntegrations(filters), filters);
133
- }
134
-
135
- function validateIntegrationRegistrySnapshot(snapshot) {
136
- const entry = snapshot && typeof snapshot === "object" ? snapshot : {};
137
- const errors = [];
138
- if (!entry.snapshot_version) errors.push("snapshot.snapshot_version is required");
139
- if (!entry.generated_at) errors.push("snapshot.generated_at is required");
140
- if (!Number.isInteger(entry.integration_count) || entry.integration_count < 0) {
141
- errors.push("snapshot.integration_count must be a non-negative integer");
142
- }
143
- if (!Array.isArray(entry.integrations)) {
144
- errors.push("snapshot.integrations must be an array");
145
- } else if (entry.integrations.length !== entry.integration_count) {
146
- errors.push("snapshot.integration_count must match snapshot.integrations.length");
147
- }
148
- return {
149
- ok: errors.length === 0,
150
- errors
151
- };
152
- }
153
-
154
- function buildProofPromotionReadinessSummary(input = {}) {
155
- const registration = input.registration && typeof input.registration === "object" ? input.registration : {};
156
- const integration = input.integration && typeof input.integration === "object" ? input.integration : {};
157
- const blockers = [];
158
- const registrationState = registration.registration_state || null;
159
- const certificationState = integration.certification_state || null;
160
- const maturity = integration.integration_maturity || null;
161
- const defaultSelectionEnabled = registration.default_selection_enabled === true;
162
- const requiresExplicitSelection = registration.requires_explicit_selection === true;
163
- const bundled = registration.bundled === true;
164
-
165
- if (!registrationState) blockers.push("registration_state_missing");
166
- if (!certificationState) blockers.push("certification_state_missing");
167
- if (!maturity) blockers.push("integration_maturity_missing");
168
- if (certificationState !== "certified") blockers.push("not_certified");
169
- if (maturity !== "production_default") blockers.push("not_marked_production_default");
170
- if (!defaultSelectionEnabled) blockers.push("default_selection_disabled");
171
- if (requiresExplicitSelection) blockers.push("still_requires_explicit_selection");
172
- if (!bundled) blockers.push("not_bundled_for_default_rollout");
173
-
174
- const reviewReady = registrationState === "staging_registered";
175
- const productionDefaultReady = blockers.length === 0;
176
-
177
- let posture = "unknown";
178
- if (productionDefaultReady) {
179
- posture = "production_default_ready";
180
- } else if (reviewReady && certificationState === "certified") {
181
- posture = "promotion_candidate";
182
- } else if (reviewReady) {
183
- posture = "staged_review";
184
- } else if (defaultSelectionEnabled) {
185
- posture = "production_registered";
186
- }
187
-
188
- return {
189
- registration_state: registrationState,
190
- certification_state: certificationState,
191
- integration_maturity: maturity,
192
- review_ready: reviewReady,
193
- default_eligible: defaultSelectionEnabled,
194
- production_default_ready: productionDefaultReady,
195
- posture,
196
- blockers
197
- };
198
- }
199
-
200
- function summarizeProofPromotionBlockerCategories(blockers = []) {
201
- const values = Array.isArray(blockers) ? blockers : [];
202
- const categories = [];
203
- if (values.some((entry) => entry === "registration_state_missing")) categories.push("registration");
204
- if (values.some((entry) => entry === "certification_state_missing" || entry === "not_certified")) categories.push("certification");
205
- if (values.some((entry) => entry === "integration_maturity_missing" || entry === "not_marked_production_default")) categories.push("maturity");
206
- if (values.some((entry) => entry === "default_selection_disabled" || entry === "still_requires_explicit_selection")) categories.push("selection");
207
- if (values.some((entry) => entry === "not_bundled_for_default_rollout")) categories.push("rollout");
208
- return summarizeCounts(categories, "category");
209
- }
210
-
211
- function buildProofCertificationGapSummary(readiness = {}, integration = {}) {
212
- const blockers = Array.isArray(readiness.blockers) ? readiness.blockers : [];
213
- const certificationScope = Array.isArray(integration.certification_scope) ? integration.certification_scope.filter(Boolean) : [];
214
- const verifiedWith = integration.registration && Array.isArray(integration.registration.verified_with)
215
- ? integration.registration.verified_with.filter(Boolean)
216
- : [];
217
- const missingRequirements = [];
218
- const productionReady = readiness.production_default_ready === true;
219
-
220
- if (blockers.includes("certification_state_missing") || blockers.includes("not_certified")) {
221
- missingRequirements.push("certification_state");
222
- }
223
- if (!productionReady && certificationScope.length < 1) {
224
- missingRequirements.push("certification_scope");
225
- }
226
- if (!productionReady && verifiedWith.length < 1) {
227
- missingRequirements.push("verified_with");
228
- }
229
-
230
- return {
231
- certification_state: readiness.certification_state || null,
232
- certification_scope_count: certificationScope.length,
233
- verified_with_count: verifiedWith.length,
234
- missing_requirements: missingRequirements,
235
- certifiable: missingRequirements.length === 0
236
- };
237
- }
238
-
239
- function buildProofNextTransitionSummary(readiness = {}) {
240
- const blockers = Array.isArray(readiness.blockers) ? readiness.blockers : [];
241
- if (readiness.production_default_ready === true) {
242
- return {
243
- action: "maintain_production_default",
244
- reason: "integration already satisfies proof-side production-default posture",
245
- requirements: [],
246
- later_actions: []
247
- };
248
- }
249
- if (blockers.includes("registration_state_missing")) {
250
- return {
251
- action: "register_integration",
252
- reason: "proof integration is missing a registration state",
253
- requirements: ["registration_state"],
254
- later_actions: ["complete_certification", "promote_maturity", "enable_default_selection", "bundle_for_default_rollout"]
255
- };
256
- }
257
- if (blockers.includes("not_certified") || blockers.includes("certification_state_missing")) {
258
- return {
259
- action: "complete_certification",
260
- reason: "proof integration is not yet certified",
261
- requirements: ["certification_state"],
262
- later_actions: ["promote_maturity", "enable_default_selection", "bundle_for_default_rollout"]
263
- };
264
- }
265
- if (blockers.includes("not_marked_production_default") || blockers.includes("integration_maturity_missing")) {
266
- return {
267
- action: "promote_maturity",
268
- reason: "proof integration maturity is not yet aligned with production-default posture",
269
- requirements: ["integration_maturity"],
270
- later_actions: ["enable_default_selection", "bundle_for_default_rollout"]
271
- };
272
- }
273
- if (blockers.includes("default_selection_disabled") || blockers.includes("still_requires_explicit_selection")) {
274
- return {
275
- action: "enable_default_selection",
276
- reason: "proof integration remains explicit-selection only",
277
- requirements: ["default_selection_enabled", "requires_explicit_selection=false"],
278
- later_actions: blockers.includes("not_bundled_for_default_rollout") ? ["bundle_for_default_rollout"] : []
279
- };
280
- }
281
- if (blockers.includes("not_bundled_for_default_rollout")) {
282
- return {
283
- action: "bundle_for_default_rollout",
284
- reason: "proof integration is not yet bundled for production-default rollout",
285
- requirements: ["bundled=true"],
286
- later_actions: []
287
- };
288
- }
289
- return {
290
- action: "review_manually",
291
- reason: "proof integration posture needs review",
292
- requirements: [],
293
- later_actions: []
294
- };
295
- }
296
-
297
- function buildProofPromotionRecommendationSummary(readiness = {}) {
298
- const nextTransition = buildProofNextTransitionSummary(readiness);
299
- if (readiness.production_default_ready === true) {
300
- return {
301
- recommendation: "eligible_for_production_default",
302
- rationale: "proof integration is ready for production-default posture"
303
- };
304
- }
305
- if (readiness.review_ready === true && readiness.default_eligible === false) {
306
- return {
307
- recommendation: "keep_staged_until_requirements_clear",
308
- rationale: nextTransition.reason
309
- };
310
- }
311
- if (readiness.review_ready === true) {
312
- return {
313
- recommendation: "review_for_promotion",
314
- rationale: nextTransition.reason
315
- };
316
- }
317
- return {
318
- recommendation: "complete_prerequisites_first",
319
- rationale: nextTransition.reason
320
- };
321
- }
322
-
323
- function summarizeIntegrationPromotionReadiness(integrationOrId) {
324
- const integration = typeof integrationOrId === "string"
325
- ? getIntegration(integrationOrId)
326
- : clone(integrationOrId || null);
327
- if (!integration) {
328
- return {
329
- ok: false,
330
- reason: "integration_not_found"
331
- };
332
- }
333
- return {
334
- ok: true,
335
- integration_id: integration.integration_id,
336
- display_name: integration.display_name,
337
- integration_class: integration.integration_class,
338
- proof_scope: integration.proof_scope,
339
- source: integration.source,
340
- registration: clone(integration.registration || {}),
341
- certification_state: integration.certification_state || null,
342
- integration_maturity: integration.integration_maturity || null,
343
- promotion_readiness: buildProofPromotionReadinessSummary({
344
- registration: integration.registration,
345
- integration
346
- })
347
- };
348
- }
349
-
350
- function summarizeIntegrationPromotionWorkflow(integrationOrId) {
351
- const summary = summarizeIntegrationPromotionReadiness(integrationOrId);
352
- if (!summary.ok) {
353
- return summary;
354
- }
355
- const readiness = clone(summary.promotion_readiness || {});
356
- return {
357
- ...summary,
358
- certification_gaps: buildProofCertificationGapSummary(readiness, summary),
359
- blocker_categories: summarizeProofPromotionBlockerCategories(readiness.blockers),
360
- next_transition: buildProofNextTransitionSummary(readiness),
361
- promotion_recommendation: buildProofPromotionRecommendationSummary(readiness)
362
- };
363
- }
364
-
365
- function summarizeIntegrationPromotionWorkflowList(filters = {}) {
366
- const integrations = listIntegrations(filters).map((integration) => summarizeIntegrationPromotionWorkflow(integration));
367
- return {
368
- ok: true,
369
- integration_count: integrations.length,
370
- review_ready_count: integrations.filter((entry) => entry.promotion_readiness.review_ready).length,
371
- production_default_ready_count: integrations.filter((entry) => entry.promotion_readiness.production_default_ready).length,
372
- certifiable_count: integrations.filter((entry) => entry.certification_gaps.certifiable).length,
373
- next_actions: summarizeCounts(
374
- integrations.map((entry) => entry.next_transition.action).filter(Boolean),
375
- "action"
376
- ),
377
- recommendations: summarizeCounts(
378
- integrations.map((entry) => entry.promotion_recommendation.recommendation).filter(Boolean),
379
- "recommendation"
380
- ),
381
- blocker_categories: summarizeCounts(
382
- integrations.flatMap((entry) => (entry.blocker_categories || []).map((item) => item.category)).filter(Boolean),
383
- "category"
384
- ),
385
- integrations
386
- };
387
- }
388
-
389
- const BUILTIN_INTEGRATIONS = [
390
- createIntegrationDescriptor({
391
- integration_id: "builtin.identity.legacy_material",
392
- integration_class: "identity_material_provider",
393
- display_name: "Legacy Identity Material Provider",
394
- description: "Provides legacy identity material compatibility for receipt emission and verification bridges.",
395
- certification_scope: ["compatibility_surface", "receipt_emission"],
396
- capabilities: ["identity.material", "legacy.receipt.compatibility"],
397
- public_surfaces: ["sdk", "service"],
398
- proof_scope: "receipt_emission",
399
- operational_readiness: "production",
400
- integration_maturity: "production_default",
401
- certification_state: "certified",
402
- compatibility: {
403
- proof_contract: "xoonya/v1"
404
- },
405
- required_inputs: ["legacy_identity_material_hex"],
406
- emitted_artifacts: ["receipt"],
407
- verification_targets: ["legacy_receipt"]
408
- }, {
409
- source: "builtin",
410
- status: "available",
411
- certification_state: "certified",
412
- certification_scope: ["compatibility_surface", "receipt_emission"],
413
- integration_maturity: "production_default",
414
- operational_readiness: "production",
415
- default_for_proof_scopes: ["receipt_emission"]
416
- }),
417
- createIntegrationDescriptor({
418
- integration_id: "builtin.reference.evidence",
419
- integration_class: "attestation_reference_adapter",
420
- display_name: "Evidence Reference Adapter",
421
- description: "Admits external evidence references into proof bundles without changing proof validity semantics.",
422
- certification_scope: ["proof_bundle_shape"],
423
- capabilities: ["proof_bundle.evidence_refs"],
424
- public_surfaces: ["sdk", "service"],
425
- proof_scope: "proof_bundle",
426
- operational_readiness: "production",
427
- integration_maturity: "production_default",
428
- certification_state: "certified",
429
- compatibility: {
430
- proof_contract: "xoonya/v1"
431
- },
432
- required_inputs: ["evidence_refs"],
433
- emitted_artifacts: ["proof_bundle"],
434
- verification_targets: ["proof_bundle_shape"]
435
- }, {
436
- source: "builtin",
437
- status: "available",
438
- certification_state: "certified",
439
- certification_scope: ["proof_bundle_shape"],
440
- integration_maturity: "production_default",
441
- operational_readiness: "production",
442
- default_for_proof_scopes: ["proof_bundle"]
443
- }),
444
- createIntegrationDescriptor({
445
- integration_id: "builtin.reference.anchor",
446
- integration_class: "anchor_reference_adapter",
447
- display_name: "Anchor Reference Adapter",
448
- description: "Carries additive anchor references inside proof bundles while keeping proof semantics fixed.",
449
- certification_scope: ["proof_bundle_shape"],
450
- capabilities: ["proof_bundle.anchors"],
451
- public_surfaces: ["sdk"],
452
- proof_scope: "proof_bundle",
453
- operational_readiness: "production",
454
- integration_maturity: "production_default",
455
- certification_state: "certified",
456
- compatibility: {
457
- proof_contract: "xoonya/v1"
458
- },
459
- required_inputs: ["anchor_refs"],
460
- emitted_artifacts: ["proof_bundle"],
461
- verification_targets: ["proof_bundle_shape"]
462
- }, {
463
- source: "builtin",
464
- status: "available",
465
- certification_state: "certified",
466
- certification_scope: ["proof_bundle_shape"],
467
- integration_maturity: "production_default",
468
- operational_readiness: "production",
469
- default_for_proof_scopes: ["proof_bundle"]
470
- }),
471
- createIntegrationDescriptor({
472
- integration_id: "builtin.verifier.registry_profile",
473
- integration_class: "verification_helper_adapter",
474
- display_name: "Registry Profile Verifier",
475
- description: "Verifies additive registry lifecycle profiles without redefining receipt or bundle validity.",
476
- certification_scope: ["profile_verification"],
477
- capabilities: ["registry_profile.verify"],
478
- public_surfaces: ["sdk", "service"],
479
- proof_scope: "profile_verification",
480
- operational_readiness: "production",
481
- integration_maturity: "production_default",
482
- certification_state: "certified",
483
- compatibility: {
484
- proof_contract: "xoonya/v1"
485
- },
486
- required_inputs: ["profile"],
487
- emitted_artifacts: [],
488
- verification_targets: ["registry_profile"]
489
- }, {
490
- source: "builtin",
491
- status: "available",
492
- certification_state: "certified",
493
- certification_scope: ["profile_verification"],
494
- integration_maturity: "production_default",
495
- operational_readiness: "production",
496
- default_for_proof_scopes: ["profile_verification"]
497
- }),
498
- createIntegrationDescriptor({
499
- integration_id: "builtin.verifier.economic_profile",
500
- integration_class: "verification_helper_adapter",
501
- display_name: "Economic Profile Verifier",
502
- description: "Verifies additive economic profiles while keeping the proof kernel neutral.",
503
- certification_scope: ["profile_verification"],
504
- capabilities: ["economic_profile.verify"],
505
- public_surfaces: ["sdk", "service"],
506
- proof_scope: "profile_verification",
507
- operational_readiness: "production",
508
- integration_maturity: "production_default",
509
- certification_state: "certified",
510
- compatibility: {
511
- proof_contract: "xoonya/v1"
512
- },
513
- required_inputs: ["profile"],
514
- emitted_artifacts: [],
515
- verification_targets: ["economic_profile"]
516
- }, {
517
- source: "builtin",
518
- status: "available",
519
- certification_state: "certified",
520
- certification_scope: ["profile_verification"],
521
- integration_maturity: "production_default",
522
- operational_readiness: "production",
523
- default_for_proof_scopes: ["profile_verification"]
524
- })
525
- ];
526
-
527
- const STAGED_PARTNER_VERIFIER_DESCRIPTOR = {
528
- integration_id: stagedPartnerVerifierRegistrationRecord.integration_id,
529
- integration_class: stagedPartnerVerifierRegistrationRecord.integration_class,
530
- display_name: "Lattice Notary Verifier",
531
- description: "Reference third-party proof verifier showing how staged additive profile verification integrations can appear in discovery without changing proof validity semantics.",
532
- proof_scope: stagedPartnerVerifierRegistrationRecord.proof_scope,
533
- capabilities: ["notary_profile.verify", "evidence_reference.verify"],
534
- public_surfaces: ["sdk", "service"],
535
- compatibility: {
536
- proof_contract: "xoonya/v1"
537
- },
538
- required_inputs: ["profile", "evidence_refs"],
539
- emitted_artifacts: [],
540
- verification_targets: ["notary_profile", "evidence_reference"]
541
- };
542
-
543
- const EXAMPLE_INTEGRATIONS = [
544
- importRegisteredIntegration(STAGED_PARTNER_VERIFIER_DESCRIPTOR, stagedPartnerVerifierRegistrationRecord, {
545
- source: "third_party_example",
546
- status: "available",
547
- certification_scope: ["self_attested_contract_shape", "staging_profile_smoke"],
548
- operational_readiness: "staging",
549
- default_for_proof_scopes: []
550
- })
551
- ];
552
-
553
- const INTEGRATIONS = BUILTIN_INTEGRATIONS.concat(EXAMPLE_INTEGRATIONS).map(clone);
554
-
555
- const INTEGRATION_REGISTRATION_RECORDS = {
556
- [stagedPartnerVerifierRegistrationRecord.integration_id]: clone(stagedPartnerVerifierRegistrationRecord)
557
- };
558
-
559
- function listIntegrations(filters = {}) {
560
- const normalized = {
561
- integration_class: String(filters.integration_class || filters.class || "").trim(),
562
- capability: String(filters.capability || "").trim(),
563
- surface: String(filters.surface || "").trim(),
564
- source: String(filters.source || "").trim(),
565
- certification_state: String(filters.certification_state || "").trim(),
566
- integration_maturity: String(filters.integration_maturity || filters.maturity || "").trim(),
567
- registration_state: String(filters.registration_state || "").trim(),
568
- proof_scope: String(filters.proof_scope || "").trim(),
569
- bundled: String(filters.bundled || "").trim().toLowerCase()
570
- };
571
- return INTEGRATIONS.filter((integration) => {
572
- if (normalized.integration_class && integration.integration_class !== normalized.integration_class) return false;
573
- if (normalized.capability && !integration.capabilities.includes(normalized.capability)) return false;
574
- if (normalized.surface && !integration.public_surfaces.includes(normalized.surface)) return false;
575
- if (normalized.source && integration.source !== normalized.source) return false;
576
- if (normalized.certification_state && integration.certification_state !== normalized.certification_state) return false;
577
- if (normalized.integration_maturity && integration.integration_maturity !== normalized.integration_maturity) return false;
578
- if (normalized.proof_scope && integration.proof_scope !== normalized.proof_scope) return false;
579
- const registrationState = INTEGRATION_REGISTRATION_RECORDS[integration.integration_id]
580
- ? INTEGRATION_REGISTRATION_RECORDS[integration.integration_id].registration_state
581
- : "production_registered";
582
- if (normalized.registration_state && registrationState !== normalized.registration_state) return false;
583
- if (normalized.bundled === "true" && integration.bundled !== true) return false;
584
- if (normalized.bundled === "false" && integration.bundled !== false) return false;
585
- return true;
586
- }).map((integration) => buildIntegrationView(integration, INTEGRATION_REGISTRATION_RECORDS[integration.integration_id]));
587
- }
588
-
589
- function getIntegration(integrationId) {
590
- const lookup = String(integrationId || "").trim();
591
- const found = INTEGRATIONS.find((integration) => integration.integration_id === lookup);
592
- return found ? buildIntegrationView(found, INTEGRATION_REGISTRATION_RECORDS[found.integration_id]) : null;
593
- }
594
-
595
- function summarizeIntegrations(filters = {}) {
596
- const integrations = listIntegrations(filters);
597
- return {
598
- ok: true,
599
- integration_count: integrations.length,
600
- certified_integration_count: integrations.filter((integration) => integration.certification_state === "certified").length,
601
- production_default_count: integrations.filter((integration) => integration.integration_maturity === "production_default").length,
602
- staged_registration_count: integrations.filter((integration) => integration.registration.registration_state === "staging_registered").length,
603
- integration_ids: integrations.map((integration) => integration.integration_id),
604
- integration_class_count: Array.from(new Set(integrations.map((integration) => integration.integration_class))).length,
605
- proof_scope_count: Array.from(new Set(integrations.map((integration) => integration.proof_scope))).length,
606
- integrations: integrations.map((integration) => ({
607
- integration_id: integration.integration_id,
608
- integration_class: integration.integration_class,
609
- display_name: integration.display_name,
610
- source: integration.source,
611
- proof_scope: integration.proof_scope,
612
- certification_state: integration.certification_state,
613
- integration_maturity: integration.integration_maturity,
614
- registration_state: integration.registration.registration_state,
615
- bundled: integration.registration.bundled,
616
- capability_count: integration.capabilities.length
617
- }))
618
- };
619
- }
620
-
621
- module.exports = {
622
- getIntegration,
623
- listIntegrations,
624
- summarizeIntegrations,
625
- summarizeIntegrationPromotionReadiness,
626
- summarizeIntegrationPromotionWorkflow,
627
- summarizeIntegrationPromotionWorkflowList,
628
- validateIntegrationRegistration,
629
- importRegisteredIntegration,
630
- createIntegrationRegistrySnapshot,
631
- exportIntegrationRegistrySnapshot,
632
- validateIntegrationRegistrySnapshot,
633
- createIntegrationDescriptor,
634
- buildIntegrationRegistrationView,
635
- buildIntegrationView
636
- };
1
+ "use strict";
2
+
3
+ const stagedPartnerVerifierRegistrationRecord = require("./examples/example-third-party-verifier-registration.record.json");
4
+
5
+ function clone(value) {
6
+ return JSON.parse(JSON.stringify(value));
7
+ }
8
+
9
+ function sortStrings(values) {
10
+ return Array.from(new Set((Array.isArray(values) ? values : []).filter(Boolean))).sort();
11
+ }
12
+
13
+ function summarizeCounts(values, fieldName) {
14
+ return sortStrings(values).map((value) => ({
15
+ [fieldName]: value,
16
+ count: values.filter((entry) => entry === value).length
17
+ }));
18
+ }
19
+
20
+ function createIntegrationDescriptor(descriptor, extras = {}) {
21
+ return {
22
+ integration_id: descriptor.integration_id,
23
+ integration_class: descriptor.integration_class,
24
+ display_name: descriptor.display_name,
25
+ description: descriptor.description,
26
+ proof_scope: descriptor.proof_scope,
27
+ source: extras.source || descriptor.source || "builtin",
28
+ bundled: extras.bundled !== false,
29
+ status: extras.status || descriptor.status || "available",
30
+ certification_state: extras.certification_state || descriptor.certification_state || "reference_example",
31
+ certification_scope: sortStrings(extras.certification_scope || descriptor.certification_scope),
32
+ integration_maturity: extras.integration_maturity || descriptor.integration_maturity || "reference_example",
33
+ operational_readiness: extras.operational_readiness || descriptor.operational_readiness || "reference",
34
+ capabilities: sortStrings(descriptor.capabilities),
35
+ public_surfaces: sortStrings(descriptor.public_surfaces),
36
+ compatibility: clone(descriptor.compatibility || {}),
37
+ required_inputs: sortStrings(descriptor.required_inputs),
38
+ emitted_artifacts: sortStrings(descriptor.emitted_artifacts),
39
+ verification_targets: sortStrings(descriptor.verification_targets),
40
+ selection_hints: {
41
+ default_for_proof_scopes: sortStrings(
42
+ extras.default_for_proof_scopes || descriptor.default_for_proof_scopes || [descriptor.proof_scope]
43
+ )
44
+ }
45
+ };
46
+ }
47
+
48
+ function buildIntegrationRegistrationView(integration, registrationRecord) {
49
+ const integrationEntry = integration || {};
50
+ const record = registrationRecord && typeof registrationRecord === "object" ? registrationRecord : null;
51
+ return {
52
+ registration_state: record ? record.registration_state : "production_registered",
53
+ bundled: record ? record.bundled : integrationEntry.bundled === true,
54
+ default_selection_enabled: record ? record.default_selection_enabled === true : integrationEntry.bundled === true,
55
+ requires_explicit_selection: record ? record.requires_explicit_selection === true : integrationEntry.bundled !== true,
56
+ registered_at: record ? record.registered_at : null,
57
+ registered_by: record ? record.registered_by || null : null,
58
+ verified_with: sortStrings(record && record.verified_with),
59
+ notes: record ? record.notes || null : null
60
+ };
61
+ }
62
+
63
+ function buildIntegrationView(integration, registrationRecord) {
64
+ const entry = clone(integration);
65
+ entry.registration = buildIntegrationRegistrationView(entry, registrationRecord);
66
+ entry.registration_state = entry.registration.registration_state;
67
+ return entry;
68
+ }
69
+
70
+ function validateIntegrationRegistration(descriptor, registrationRecord) {
71
+ const errors = [];
72
+ const integrationDescriptor = descriptor && typeof descriptor === "object" ? descriptor : {};
73
+ const record = registrationRecord && typeof registrationRecord === "object" ? registrationRecord : {};
74
+
75
+ if (!integrationDescriptor.integration_id) errors.push("descriptor.integration_id is required");
76
+ if (!record.integration_id) errors.push("registration_record.integration_id is required");
77
+ if (!integrationDescriptor.integration_class) errors.push("descriptor.integration_class is required");
78
+ if (!record.integration_class) errors.push("registration_record.integration_class is required");
79
+ if (!integrationDescriptor.proof_scope) errors.push("descriptor.proof_scope is required");
80
+ if (!record.proof_scope) errors.push("registration_record.proof_scope is required");
81
+ if (integrationDescriptor.integration_id && record.integration_id && integrationDescriptor.integration_id !== record.integration_id) {
82
+ errors.push("descriptor.integration_id must match registration_record.integration_id");
83
+ }
84
+ if (integrationDescriptor.integration_class && record.integration_class && integrationDescriptor.integration_class !== record.integration_class) {
85
+ errors.push("descriptor.integration_class must match registration_record.integration_class");
86
+ }
87
+ if (integrationDescriptor.proof_scope && record.proof_scope && integrationDescriptor.proof_scope !== record.proof_scope) {
88
+ errors.push("descriptor.proof_scope must match registration_record.proof_scope");
89
+ }
90
+
91
+ return {
92
+ ok: errors.length === 0,
93
+ errors
94
+ };
95
+ }
96
+
97
+ function importRegisteredIntegration(descriptor, registrationRecord, extras = {}) {
98
+ const validation = validateIntegrationRegistration(descriptor, registrationRecord);
99
+ if (!validation.ok) {
100
+ const error = new Error(`invalid proof integration registration:\n${validation.errors.join("\n")}`);
101
+ error.code = "invalid_proof_integration_registration";
102
+ error.validation = validation;
103
+ throw error;
104
+ }
105
+ const record = registrationRecord || {};
106
+ const integration = createIntegrationDescriptor(descriptor, {
107
+ ...extras,
108
+ bundled: Object.prototype.hasOwnProperty.call(record, "bundled") ? record.bundled : extras.bundled,
109
+ certification_state: record.certification_state || extras.certification_state,
110
+ certification_scope: record.certification_scope || extras.certification_scope,
111
+ integration_maturity: record.integration_maturity || extras.integration_maturity,
112
+ operational_readiness: record.operational_readiness || extras.operational_readiness,
113
+ default_for_proof_scopes: record.default_selection_enabled === true
114
+ ? (extras.default_for_proof_scopes || [descriptor.proof_scope])
115
+ : []
116
+ });
117
+ return buildIntegrationView(integration, record);
118
+ }
119
+
120
+ function createIntegrationRegistrySnapshot(integrations, filters = {}) {
121
+ const rows = Array.isArray(integrations) ? integrations.map(clone) : [];
122
+ return {
123
+ snapshot_version: "xoonya/integration-registry-snapshot/v1",
124
+ generated_at: new Date().toISOString(),
125
+ integration_count: rows.length,
126
+ filters: clone(filters || {}),
127
+ integrations: rows
128
+ };
129
+ }
130
+
131
+ function exportIntegrationRegistrySnapshot(filters = {}) {
132
+ return createIntegrationRegistrySnapshot(listIntegrations(filters), filters);
133
+ }
134
+
135
+ function validateIntegrationRegistrySnapshot(snapshot) {
136
+ const entry = snapshot && typeof snapshot === "object" ? snapshot : {};
137
+ const errors = [];
138
+ if (!entry.snapshot_version) errors.push("snapshot.snapshot_version is required");
139
+ if (!entry.generated_at) errors.push("snapshot.generated_at is required");
140
+ if (!Number.isInteger(entry.integration_count) || entry.integration_count < 0) {
141
+ errors.push("snapshot.integration_count must be a non-negative integer");
142
+ }
143
+ if (!Array.isArray(entry.integrations)) {
144
+ errors.push("snapshot.integrations must be an array");
145
+ } else if (entry.integrations.length !== entry.integration_count) {
146
+ errors.push("snapshot.integration_count must match snapshot.integrations.length");
147
+ }
148
+ return {
149
+ ok: errors.length === 0,
150
+ errors
151
+ };
152
+ }
153
+
154
+ function buildProofPromotionReadinessSummary(input = {}) {
155
+ const registration = input.registration && typeof input.registration === "object" ? input.registration : {};
156
+ const integration = input.integration && typeof input.integration === "object" ? input.integration : {};
157
+ const blockers = [];
158
+ const registrationState = registration.registration_state || null;
159
+ const certificationState = integration.certification_state || null;
160
+ const maturity = integration.integration_maturity || null;
161
+ const defaultSelectionEnabled = registration.default_selection_enabled === true;
162
+ const requiresExplicitSelection = registration.requires_explicit_selection === true;
163
+ const bundled = registration.bundled === true;
164
+
165
+ if (!registrationState) blockers.push("registration_state_missing");
166
+ if (!certificationState) blockers.push("certification_state_missing");
167
+ if (!maturity) blockers.push("integration_maturity_missing");
168
+ if (certificationState !== "certified") blockers.push("not_certified");
169
+ if (maturity !== "production_default") blockers.push("not_marked_production_default");
170
+ if (!defaultSelectionEnabled) blockers.push("default_selection_disabled");
171
+ if (requiresExplicitSelection) blockers.push("still_requires_explicit_selection");
172
+ if (!bundled) blockers.push("not_bundled_for_default_rollout");
173
+
174
+ const reviewReady = registrationState === "staging_registered";
175
+ const productionDefaultReady = blockers.length === 0;
176
+
177
+ let posture = "unknown";
178
+ if (productionDefaultReady) {
179
+ posture = "production_default_ready";
180
+ } else if (reviewReady && certificationState === "certified") {
181
+ posture = "promotion_candidate";
182
+ } else if (reviewReady) {
183
+ posture = "staged_review";
184
+ } else if (defaultSelectionEnabled) {
185
+ posture = "production_registered";
186
+ }
187
+
188
+ return {
189
+ registration_state: registrationState,
190
+ certification_state: certificationState,
191
+ integration_maturity: maturity,
192
+ review_ready: reviewReady,
193
+ default_eligible: defaultSelectionEnabled,
194
+ production_default_ready: productionDefaultReady,
195
+ posture,
196
+ blockers
197
+ };
198
+ }
199
+
200
+ function summarizeProofPromotionBlockerCategories(blockers = []) {
201
+ const values = Array.isArray(blockers) ? blockers : [];
202
+ const categories = [];
203
+ if (values.some((entry) => entry === "registration_state_missing")) categories.push("registration");
204
+ if (values.some((entry) => entry === "certification_state_missing" || entry === "not_certified")) categories.push("certification");
205
+ if (values.some((entry) => entry === "integration_maturity_missing" || entry === "not_marked_production_default")) categories.push("maturity");
206
+ if (values.some((entry) => entry === "default_selection_disabled" || entry === "still_requires_explicit_selection")) categories.push("selection");
207
+ if (values.some((entry) => entry === "not_bundled_for_default_rollout")) categories.push("rollout");
208
+ return summarizeCounts(categories, "category");
209
+ }
210
+
211
+ function buildProofCertificationGapSummary(readiness = {}, integration = {}) {
212
+ const blockers = Array.isArray(readiness.blockers) ? readiness.blockers : [];
213
+ const certificationScope = Array.isArray(integration.certification_scope) ? integration.certification_scope.filter(Boolean) : [];
214
+ const verifiedWith = integration.registration && Array.isArray(integration.registration.verified_with)
215
+ ? integration.registration.verified_with.filter(Boolean)
216
+ : [];
217
+ const missingRequirements = [];
218
+ const productionReady = readiness.production_default_ready === true;
219
+
220
+ if (blockers.includes("certification_state_missing") || blockers.includes("not_certified")) {
221
+ missingRequirements.push("certification_state");
222
+ }
223
+ if (!productionReady && certificationScope.length < 1) {
224
+ missingRequirements.push("certification_scope");
225
+ }
226
+ if (!productionReady && verifiedWith.length < 1) {
227
+ missingRequirements.push("verified_with");
228
+ }
229
+
230
+ return {
231
+ certification_state: readiness.certification_state || null,
232
+ certification_scope_count: certificationScope.length,
233
+ verified_with_count: verifiedWith.length,
234
+ missing_requirements: missingRequirements,
235
+ certifiable: missingRequirements.length === 0
236
+ };
237
+ }
238
+
239
+ function buildProofNextTransitionSummary(readiness = {}) {
240
+ const blockers = Array.isArray(readiness.blockers) ? readiness.blockers : [];
241
+ if (readiness.production_default_ready === true) {
242
+ return {
243
+ action: "maintain_production_default",
244
+ reason: "integration already satisfies proof-side production-default posture",
245
+ requirements: [],
246
+ later_actions: []
247
+ };
248
+ }
249
+ if (blockers.includes("registration_state_missing")) {
250
+ return {
251
+ action: "register_integration",
252
+ reason: "proof integration is missing a registration state",
253
+ requirements: ["registration_state"],
254
+ later_actions: ["complete_certification", "promote_maturity", "enable_default_selection", "bundle_for_default_rollout"]
255
+ };
256
+ }
257
+ if (blockers.includes("not_certified") || blockers.includes("certification_state_missing")) {
258
+ return {
259
+ action: "complete_certification",
260
+ reason: "proof integration is not yet certified",
261
+ requirements: ["certification_state"],
262
+ later_actions: ["promote_maturity", "enable_default_selection", "bundle_for_default_rollout"]
263
+ };
264
+ }
265
+ if (blockers.includes("not_marked_production_default") || blockers.includes("integration_maturity_missing")) {
266
+ return {
267
+ action: "promote_maturity",
268
+ reason: "proof integration maturity is not yet aligned with production-default posture",
269
+ requirements: ["integration_maturity"],
270
+ later_actions: ["enable_default_selection", "bundle_for_default_rollout"]
271
+ };
272
+ }
273
+ if (blockers.includes("default_selection_disabled") || blockers.includes("still_requires_explicit_selection")) {
274
+ return {
275
+ action: "enable_default_selection",
276
+ reason: "proof integration remains explicit-selection only",
277
+ requirements: ["default_selection_enabled", "requires_explicit_selection=false"],
278
+ later_actions: blockers.includes("not_bundled_for_default_rollout") ? ["bundle_for_default_rollout"] : []
279
+ };
280
+ }
281
+ if (blockers.includes("not_bundled_for_default_rollout")) {
282
+ return {
283
+ action: "bundle_for_default_rollout",
284
+ reason: "proof integration is not yet bundled for production-default rollout",
285
+ requirements: ["bundled=true"],
286
+ later_actions: []
287
+ };
288
+ }
289
+ return {
290
+ action: "review_manually",
291
+ reason: "proof integration posture needs review",
292
+ requirements: [],
293
+ later_actions: []
294
+ };
295
+ }
296
+
297
+ function buildProofPromotionRecommendationSummary(readiness = {}) {
298
+ const nextTransition = buildProofNextTransitionSummary(readiness);
299
+ if (readiness.production_default_ready === true) {
300
+ return {
301
+ recommendation: "eligible_for_production_default",
302
+ rationale: "proof integration is ready for production-default posture"
303
+ };
304
+ }
305
+ if (readiness.review_ready === true && readiness.default_eligible === false) {
306
+ return {
307
+ recommendation: "keep_staged_until_requirements_clear",
308
+ rationale: nextTransition.reason
309
+ };
310
+ }
311
+ if (readiness.review_ready === true) {
312
+ return {
313
+ recommendation: "review_for_promotion",
314
+ rationale: nextTransition.reason
315
+ };
316
+ }
317
+ return {
318
+ recommendation: "complete_prerequisites_first",
319
+ rationale: nextTransition.reason
320
+ };
321
+ }
322
+
323
+ function summarizeIntegrationPromotionReadiness(integrationOrId) {
324
+ const integration = typeof integrationOrId === "string"
325
+ ? getIntegration(integrationOrId)
326
+ : clone(integrationOrId || null);
327
+ if (!integration) {
328
+ return {
329
+ ok: false,
330
+ reason: "integration_not_found"
331
+ };
332
+ }
333
+ return {
334
+ ok: true,
335
+ integration_id: integration.integration_id,
336
+ display_name: integration.display_name,
337
+ integration_class: integration.integration_class,
338
+ proof_scope: integration.proof_scope,
339
+ source: integration.source,
340
+ registration: clone(integration.registration || {}),
341
+ certification_state: integration.certification_state || null,
342
+ integration_maturity: integration.integration_maturity || null,
343
+ promotion_readiness: buildProofPromotionReadinessSummary({
344
+ registration: integration.registration,
345
+ integration
346
+ })
347
+ };
348
+ }
349
+
350
+ function summarizeIntegrationPromotionWorkflow(integrationOrId) {
351
+ const summary = summarizeIntegrationPromotionReadiness(integrationOrId);
352
+ if (!summary.ok) {
353
+ return summary;
354
+ }
355
+ const readiness = clone(summary.promotion_readiness || {});
356
+ return {
357
+ ...summary,
358
+ certification_gaps: buildProofCertificationGapSummary(readiness, summary),
359
+ blocker_categories: summarizeProofPromotionBlockerCategories(readiness.blockers),
360
+ next_transition: buildProofNextTransitionSummary(readiness),
361
+ promotion_recommendation: buildProofPromotionRecommendationSummary(readiness)
362
+ };
363
+ }
364
+
365
+ function summarizeIntegrationPromotionWorkflowList(filters = {}) {
366
+ const integrations = listIntegrations(filters).map((integration) => summarizeIntegrationPromotionWorkflow(integration));
367
+ return {
368
+ ok: true,
369
+ integration_count: integrations.length,
370
+ review_ready_count: integrations.filter((entry) => entry.promotion_readiness.review_ready).length,
371
+ production_default_ready_count: integrations.filter((entry) => entry.promotion_readiness.production_default_ready).length,
372
+ certifiable_count: integrations.filter((entry) => entry.certification_gaps.certifiable).length,
373
+ next_actions: summarizeCounts(
374
+ integrations.map((entry) => entry.next_transition.action).filter(Boolean),
375
+ "action"
376
+ ),
377
+ recommendations: summarizeCounts(
378
+ integrations.map((entry) => entry.promotion_recommendation.recommendation).filter(Boolean),
379
+ "recommendation"
380
+ ),
381
+ blocker_categories: summarizeCounts(
382
+ integrations.flatMap((entry) => (entry.blocker_categories || []).map((item) => item.category)).filter(Boolean),
383
+ "category"
384
+ ),
385
+ integrations
386
+ };
387
+ }
388
+
389
+ const BUILTIN_INTEGRATIONS = [
390
+ createIntegrationDescriptor({
391
+ integration_id: "builtin.identity.legacy_material",
392
+ integration_class: "identity_material_provider",
393
+ display_name: "Legacy Identity Material Provider",
394
+ description: "Provides legacy identity material compatibility for receipt emission and verification bridges.",
395
+ certification_scope: ["compatibility_surface", "receipt_emission"],
396
+ capabilities: ["identity.material", "legacy.receipt.compatibility"],
397
+ public_surfaces: ["sdk", "service"],
398
+ proof_scope: "receipt_emission",
399
+ operational_readiness: "production",
400
+ integration_maturity: "production_default",
401
+ certification_state: "certified",
402
+ compatibility: {
403
+ proof_contract: "xoonya/v1"
404
+ },
405
+ required_inputs: ["legacy_identity_material_hex"],
406
+ emitted_artifacts: ["receipt"],
407
+ verification_targets: ["legacy_receipt"]
408
+ }, {
409
+ source: "builtin",
410
+ status: "available",
411
+ certification_state: "certified",
412
+ certification_scope: ["compatibility_surface", "receipt_emission"],
413
+ integration_maturity: "production_default",
414
+ operational_readiness: "production",
415
+ default_for_proof_scopes: ["receipt_emission"]
416
+ }),
417
+ createIntegrationDescriptor({
418
+ integration_id: "builtin.reference.evidence",
419
+ integration_class: "attestation_reference_adapter",
420
+ display_name: "Evidence Reference Adapter",
421
+ description: "Admits external evidence references into proof bundles without changing proof validity semantics.",
422
+ certification_scope: ["proof_bundle_shape"],
423
+ capabilities: ["proof_bundle.evidence_refs"],
424
+ public_surfaces: ["sdk", "service"],
425
+ proof_scope: "proof_bundle",
426
+ operational_readiness: "production",
427
+ integration_maturity: "production_default",
428
+ certification_state: "certified",
429
+ compatibility: {
430
+ proof_contract: "xoonya/v1"
431
+ },
432
+ required_inputs: ["evidence_refs"],
433
+ emitted_artifacts: ["proof_bundle"],
434
+ verification_targets: ["proof_bundle_shape"]
435
+ }, {
436
+ source: "builtin",
437
+ status: "available",
438
+ certification_state: "certified",
439
+ certification_scope: ["proof_bundle_shape"],
440
+ integration_maturity: "production_default",
441
+ operational_readiness: "production",
442
+ default_for_proof_scopes: ["proof_bundle"]
443
+ }),
444
+ createIntegrationDescriptor({
445
+ integration_id: "builtin.reference.anchor",
446
+ integration_class: "anchor_reference_adapter",
447
+ display_name: "Anchor Reference Adapter",
448
+ description: "Carries additive anchor references inside proof bundles while keeping proof semantics fixed.",
449
+ certification_scope: ["proof_bundle_shape"],
450
+ capabilities: ["proof_bundle.anchors"],
451
+ public_surfaces: ["sdk"],
452
+ proof_scope: "proof_bundle",
453
+ operational_readiness: "production",
454
+ integration_maturity: "production_default",
455
+ certification_state: "certified",
456
+ compatibility: {
457
+ proof_contract: "xoonya/v1"
458
+ },
459
+ required_inputs: ["anchor_refs"],
460
+ emitted_artifacts: ["proof_bundle"],
461
+ verification_targets: ["proof_bundle_shape"]
462
+ }, {
463
+ source: "builtin",
464
+ status: "available",
465
+ certification_state: "certified",
466
+ certification_scope: ["proof_bundle_shape"],
467
+ integration_maturity: "production_default",
468
+ operational_readiness: "production",
469
+ default_for_proof_scopes: ["proof_bundle"]
470
+ }),
471
+ createIntegrationDescriptor({
472
+ integration_id: "builtin.verifier.registry_profile",
473
+ integration_class: "verification_helper_adapter",
474
+ display_name: "Registry Profile Verifier",
475
+ description: "Verifies additive registry lifecycle profiles without redefining receipt or bundle validity.",
476
+ certification_scope: ["profile_verification"],
477
+ capabilities: ["registry_profile.verify"],
478
+ public_surfaces: ["sdk", "service"],
479
+ proof_scope: "profile_verification",
480
+ operational_readiness: "production",
481
+ integration_maturity: "production_default",
482
+ certification_state: "certified",
483
+ compatibility: {
484
+ proof_contract: "xoonya/v1"
485
+ },
486
+ required_inputs: ["profile"],
487
+ emitted_artifacts: [],
488
+ verification_targets: ["registry_profile"]
489
+ }, {
490
+ source: "builtin",
491
+ status: "available",
492
+ certification_state: "certified",
493
+ certification_scope: ["profile_verification"],
494
+ integration_maturity: "production_default",
495
+ operational_readiness: "production",
496
+ default_for_proof_scopes: ["profile_verification"]
497
+ }),
498
+ createIntegrationDescriptor({
499
+ integration_id: "builtin.verifier.economic_profile",
500
+ integration_class: "verification_helper_adapter",
501
+ display_name: "Economic Profile Verifier",
502
+ description: "Verifies additive economic profiles while keeping the proof kernel neutral.",
503
+ certification_scope: ["profile_verification"],
504
+ capabilities: ["economic_profile.verify"],
505
+ public_surfaces: ["sdk", "service"],
506
+ proof_scope: "profile_verification",
507
+ operational_readiness: "production",
508
+ integration_maturity: "production_default",
509
+ certification_state: "certified",
510
+ compatibility: {
511
+ proof_contract: "xoonya/v1"
512
+ },
513
+ required_inputs: ["profile"],
514
+ emitted_artifacts: [],
515
+ verification_targets: ["economic_profile"]
516
+ }, {
517
+ source: "builtin",
518
+ status: "available",
519
+ certification_state: "certified",
520
+ certification_scope: ["profile_verification"],
521
+ integration_maturity: "production_default",
522
+ operational_readiness: "production",
523
+ default_for_proof_scopes: ["profile_verification"]
524
+ })
525
+ ];
526
+
527
+ const STAGED_PARTNER_VERIFIER_DESCRIPTOR = {
528
+ integration_id: stagedPartnerVerifierRegistrationRecord.integration_id,
529
+ integration_class: stagedPartnerVerifierRegistrationRecord.integration_class,
530
+ display_name: "Lattice Notary Verifier",
531
+ description: "Reference third-party proof verifier showing how staged additive profile verification integrations can appear in discovery without changing proof validity semantics.",
532
+ proof_scope: stagedPartnerVerifierRegistrationRecord.proof_scope,
533
+ capabilities: ["notary_profile.verify", "evidence_reference.verify"],
534
+ public_surfaces: ["sdk", "service"],
535
+ compatibility: {
536
+ proof_contract: "xoonya/v1"
537
+ },
538
+ required_inputs: ["profile", "evidence_refs"],
539
+ emitted_artifacts: [],
540
+ verification_targets: ["notary_profile", "evidence_reference"]
541
+ };
542
+
543
+ const EXAMPLE_INTEGRATIONS = [
544
+ importRegisteredIntegration(STAGED_PARTNER_VERIFIER_DESCRIPTOR, stagedPartnerVerifierRegistrationRecord, {
545
+ source: "third_party_example",
546
+ status: "available",
547
+ certification_scope: ["self_attested_contract_shape", "staging_profile_smoke"],
548
+ operational_readiness: "staging",
549
+ default_for_proof_scopes: []
550
+ })
551
+ ];
552
+
553
+ const INTEGRATIONS = BUILTIN_INTEGRATIONS.concat(EXAMPLE_INTEGRATIONS).map(clone);
554
+
555
+ const INTEGRATION_REGISTRATION_RECORDS = {
556
+ [stagedPartnerVerifierRegistrationRecord.integration_id]: clone(stagedPartnerVerifierRegistrationRecord)
557
+ };
558
+
559
+ function listIntegrations(filters = {}) {
560
+ const normalized = {
561
+ integration_class: String(filters.integration_class || filters.class || "").trim(),
562
+ capability: String(filters.capability || "").trim(),
563
+ surface: String(filters.surface || "").trim(),
564
+ source: String(filters.source || "").trim(),
565
+ certification_state: String(filters.certification_state || "").trim(),
566
+ integration_maturity: String(filters.integration_maturity || filters.maturity || "").trim(),
567
+ registration_state: String(filters.registration_state || "").trim(),
568
+ proof_scope: String(filters.proof_scope || "").trim(),
569
+ bundled: String(filters.bundled || "").trim().toLowerCase()
570
+ };
571
+ return INTEGRATIONS.filter((integration) => {
572
+ if (normalized.integration_class && integration.integration_class !== normalized.integration_class) return false;
573
+ if (normalized.capability && !integration.capabilities.includes(normalized.capability)) return false;
574
+ if (normalized.surface && !integration.public_surfaces.includes(normalized.surface)) return false;
575
+ if (normalized.source && integration.source !== normalized.source) return false;
576
+ if (normalized.certification_state && integration.certification_state !== normalized.certification_state) return false;
577
+ if (normalized.integration_maturity && integration.integration_maturity !== normalized.integration_maturity) return false;
578
+ if (normalized.proof_scope && integration.proof_scope !== normalized.proof_scope) return false;
579
+ const registrationState = INTEGRATION_REGISTRATION_RECORDS[integration.integration_id]
580
+ ? INTEGRATION_REGISTRATION_RECORDS[integration.integration_id].registration_state
581
+ : "production_registered";
582
+ if (normalized.registration_state && registrationState !== normalized.registration_state) return false;
583
+ if (normalized.bundled === "true" && integration.bundled !== true) return false;
584
+ if (normalized.bundled === "false" && integration.bundled !== false) return false;
585
+ return true;
586
+ }).map((integration) => buildIntegrationView(integration, INTEGRATION_REGISTRATION_RECORDS[integration.integration_id]));
587
+ }
588
+
589
+ function getIntegration(integrationId) {
590
+ const lookup = String(integrationId || "").trim();
591
+ const found = INTEGRATIONS.find((integration) => integration.integration_id === lookup);
592
+ return found ? buildIntegrationView(found, INTEGRATION_REGISTRATION_RECORDS[found.integration_id]) : null;
593
+ }
594
+
595
+ function summarizeIntegrations(filters = {}) {
596
+ const integrations = listIntegrations(filters);
597
+ return {
598
+ ok: true,
599
+ integration_count: integrations.length,
600
+ certified_integration_count: integrations.filter((integration) => integration.certification_state === "certified").length,
601
+ production_default_count: integrations.filter((integration) => integration.integration_maturity === "production_default").length,
602
+ staged_registration_count: integrations.filter((integration) => integration.registration.registration_state === "staging_registered").length,
603
+ integration_ids: integrations.map((integration) => integration.integration_id),
604
+ integration_class_count: Array.from(new Set(integrations.map((integration) => integration.integration_class))).length,
605
+ proof_scope_count: Array.from(new Set(integrations.map((integration) => integration.proof_scope))).length,
606
+ integrations: integrations.map((integration) => ({
607
+ integration_id: integration.integration_id,
608
+ integration_class: integration.integration_class,
609
+ display_name: integration.display_name,
610
+ source: integration.source,
611
+ proof_scope: integration.proof_scope,
612
+ certification_state: integration.certification_state,
613
+ integration_maturity: integration.integration_maturity,
614
+ registration_state: integration.registration.registration_state,
615
+ bundled: integration.registration.bundled,
616
+ capability_count: integration.capabilities.length
617
+ }))
618
+ };
619
+ }
620
+
621
+ module.exports = {
622
+ getIntegration,
623
+ listIntegrations,
624
+ summarizeIntegrations,
625
+ summarizeIntegrationPromotionReadiness,
626
+ summarizeIntegrationPromotionWorkflow,
627
+ summarizeIntegrationPromotionWorkflowList,
628
+ validateIntegrationRegistration,
629
+ importRegisteredIntegration,
630
+ createIntegrationRegistrySnapshot,
631
+ exportIntegrationRegistrySnapshot,
632
+ validateIntegrationRegistrySnapshot,
633
+ createIntegrationDescriptor,
634
+ buildIntegrationRegistrationView,
635
+ buildIntegrationView
636
+ };