xoonya 3.1.17 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -74
- package/RELEASE_NOTES.md +1 -1
- package/START_HERE.md +38 -134
- package/bin/xoonya-first-run.js +22 -10
- package/bin/xoonya.js +61 -29
- package/lib/native_verify.js +1918 -0
- package/package.json +19 -42
- package/scripts/verify_release_candidate.js +243 -116
- package/scripts/verify_vectors.js +351 -104
- package/verify.js +95 -0
- package/.env.example +0 -10
- package/CARRIED_HANDOFF_DEMO.md +0 -60
- package/COMPATIBILITY_NOTE.md +0 -27
- package/CROSS_RUNTIME_POSTURE.md +0 -77
- package/EXAMPLE_PATHS.md +0 -53
- package/FINAL_CONTRACT.md +0 -445
- package/PARTNER_READY_PATH.md +0 -67
- package/PUBLIC_DEMO_SCRIPT.md +0 -79
- package/SERVICE_CONTRACT.md +0 -207
- package/TERMINOLOGY.md +0 -55
- package/WHY_XYTARA_XOONYA.md +0 -43
- package/XNYA_CONFORMANCE_MARK.md +0 -78
- package/XNYA_REFERENCE_IMPLEMENTATIONS.md +0 -157
- package/XOONYA_DEFAULT_PATH_MODEL.md +0 -63
- package/XOONYA_FOLLOWTHROUGH_TRUTH_MODEL.md +0 -63
- package/XOONYA_NATIVE_ATOM_SPEC.md +0 -184
- package/XOONYA_NATIVE_PROOF_FORMAT.md +0 -570
- package/XOONYA_NATIVE_STANDARD_GOVERNANCE.md +0 -119
- package/XOONYA_PROOF_TRUTH_MODEL.md +0 -58
- package/bin/xoonya-release.js +0 -1367
- package/bin/xoonya-review.js +0 -70
- package/examples/integration_boundary_walkthrough.js +0 -37
- package/examples/package_quickstart.js +0 -1007
- package/examples/partner_proof_walkthrough.js +0 -68
- package/examples/proof_review_walkthrough.js +0 -66
- package/examples/review_carried_handoff.js +0 -72
- package/index.js +0 -31
- package/integrations/PROOF_INTEGRATION_PROCESS.md +0 -45
- package/integrations/examples/example-third-party-verifier-registration.record.json +0 -22
- package/integrations/registration-record.schema.json +0 -99
- package/integrations/registry-snapshot.schema.json +0 -36
- package/integrations/registry.js +0 -636
- package/integrations/views.js +0 -36
- package/lib/adapter_certification_contract.js +0 -90
- package/lib/announcement_pack.js +0 -61
- package/lib/artifact_distribution_lane_contract.js +0 -54
- package/lib/asyncapi_contract.js +0 -135
- package/lib/auth_interop_contract.js +0 -69
- package/lib/authority_binding_lifecycle_contract.js +0 -182
- package/lib/bridge_intelligence.js +0 -102
- package/lib/cloudevents_contract.js +0 -79
- package/lib/crypto_agility_matrix.js +0 -131
- package/lib/default_path_contract.js +0 -380
- package/lib/ecosystem_entry.js +0 -64
- package/lib/erc8004_proof_lane_contract.js +0 -64
- package/lib/event_system_lane_contract.js +0 -76
- package/lib/external_proof_import_lane_contract.js +0 -87
- package/lib/feature_control_lane_contract.js +0 -54
- package/lib/followthrough_truth_contract.js +0 -214
- package/lib/framework_lane_contract.js +0 -76
- package/lib/governance_disputes_summary.js +0 -36
- package/lib/governance_intelligence.js +0 -108
- package/lib/identity_interop_contract.js +0 -83
- package/lib/integration_matrix_contract.js +0 -81
- package/lib/launch_narrative.js +0 -53
- package/lib/machine_identity_registry_contract.js +0 -199
- package/lib/major_rails_proof_lane_contract.js +0 -87
- package/lib/offline_verifiability_recovery_contract.js +0 -155
- package/lib/openapi_contract.js +0 -227
- package/lib/operational_receipt_contract.js +0 -165
- package/lib/outreach_proof.js +0 -71
- package/lib/phase_10_closeout_pack.js +0 -45
- package/lib/phase_10_completion_pack.js +0 -76
- package/lib/phase_10_decision_record_pack.js +0 -54
- package/lib/phase_10_decision_resolution_pack.js +0 -53
- package/lib/phase_10_demand_signal_adapters_proof_pack.js +0 -74
- package/lib/phase_10_ecosystem_backlog_triage_proof_pack.js +0 -74
- package/lib/phase_10_freeze_baseline_pack.js +0 -67
- package/lib/phase_10_freeze_review_pack.js +0 -64
- package/lib/phase_10_gate_pack.js +0 -57
- package/lib/phase_10_long_tail_continuity_pack.js +0 -80
- package/lib/phase_10_long_tail_ecosystem_pack.js +0 -68
- package/lib/phase_10_niche_extension_registry_proof_pack.js +0 -74
- package/lib/phase_1_claude_mcp_pack.js +0 -60
- package/lib/phase_1_claude_mcp_proof_pack.js +0 -57
- package/lib/phase_1_ecosystem_pack.js +0 -51
- package/lib/phase_1_openai_codex_pack.js +0 -60
- package/lib/phase_1_openai_codex_proof_pack.js +0 -57
- package/lib/phase_2_base_proof_pack.js +0 -71
- package/lib/phase_2_base_usdc_proof_pack.js +0 -72
- package/lib/phase_2_closeout_pack.js +0 -65
- package/lib/phase_2_completion_pack.js +0 -113
- package/lib/phase_2_decision_record_pack.js +0 -66
- package/lib/phase_2_decision_resolution_pack.js +0 -69
- package/lib/phase_2_eth_proof_pack.js +0 -70
- package/lib/phase_2_evm_base_proof_pack.js +0 -73
- package/lib/phase_2_evm_proof_pack.js +0 -71
- package/lib/phase_2_flip_preview_pack.js +0 -60
- package/lib/phase_2_freeze_review_pack.js +0 -99
- package/lib/phase_2_gate_pack.js +0 -77
- package/lib/phase_2_payment_rails_pack.js +0 -71
- package/lib/phase_2_usdc_proof_pack.js +0 -71
- package/lib/phase_3_brc_proof_pack.js +0 -81
- package/lib/phase_3_bsv_teranode_proof_pack.js +0 -81
- package/lib/phase_3_closeout_pack.js +0 -62
- package/lib/phase_3_completion_pack.js +0 -92
- package/lib/phase_3_decision_record_pack.js +0 -64
- package/lib/phase_3_decision_resolution_pack.js +0 -69
- package/lib/phase_3_freeze_baseline_pack.js +0 -67
- package/lib/phase_3_freeze_review_pack.js +0 -80
- package/lib/phase_3_gate_pack.js +0 -76
- package/lib/phase_3_metanet_proof_pack.js +0 -81
- package/lib/phase_3_native_bsv_pack.js +0 -89
- package/lib/phase_3_native_continuity_pack.js +0 -82
- package/lib/phase_4_attestation_proof_pack.js +0 -75
- package/lib/phase_4_closeout_pack.js +0 -45
- package/lib/phase_4_completion_pack.js +0 -82
- package/lib/phase_4_decision_record_pack.js +0 -54
- package/lib/phase_4_decision_resolution_pack.js +0 -45
- package/lib/phase_4_erc8004_proof_pack.js +0 -76
- package/lib/phase_4_freeze_baseline_pack.js +0 -67
- package/lib/phase_4_freeze_review_pack.js +0 -68
- package/lib/phase_4_gate_pack.js +0 -58
- package/lib/phase_4_identity_registry_proof_pack.js +0 -75
- package/lib/phase_4_identity_trust_pack.js +0 -73
- package/lib/phase_4_trust_continuity_pack.js +0 -86
- package/lib/phase_5_antelope_proof_pack.js +0 -76
- package/lib/phase_5_closeout_pack.js +0 -44
- package/lib/phase_5_completion_pack.js +0 -82
- package/lib/phase_5_decision_record_pack.js +0 -54
- package/lib/phase_5_decision_resolution_pack.js +0 -45
- package/lib/phase_5_freeze_baseline_pack.js +0 -67
- package/lib/phase_5_freeze_review_pack.js +0 -68
- package/lib/phase_5_gate_pack.js +0 -58
- package/lib/phase_5_major_rails_continuity_pack.js +0 -86
- package/lib/phase_5_major_rails_pack.js +0 -74
- package/lib/phase_5_proton_xpr_proof_pack.js +0 -76
- package/lib/phase_5_solana_proof_pack.js +0 -76
- package/lib/phase_6_autogen_proof_pack.js +0 -74
- package/lib/phase_6_closeout_pack.js +0 -46
- package/lib/phase_6_completion_pack.js +0 -77
- package/lib/phase_6_decision_record_pack.js +0 -54
- package/lib/phase_6_decision_resolution_pack.js +0 -53
- package/lib/phase_6_framework_continuity_pack.js +0 -81
- package/lib/phase_6_framework_runtime_pack.js +0 -68
- package/lib/phase_6_freeze_baseline_pack.js +0 -68
- package/lib/phase_6_freeze_review_pack.js +0 -65
- package/lib/phase_6_gate_pack.js +0 -59
- package/lib/phase_6_langchain_proof_pack.js +0 -74
- package/lib/phase_6_langgraph_proof_pack.js +0 -74
- package/lib/phase_6_semantic_kernel_proof_pack.js +0 -74
- package/lib/phase_7_closeout_pack.js +0 -45
- package/lib/phase_7_completion_pack.js +0 -85
- package/lib/phase_7_decision_record_pack.js +0 -53
- package/lib/phase_7_decision_resolution_pack.js +0 -53
- package/lib/phase_7_event_system_continuity_pack.js +0 -89
- package/lib/phase_7_event_system_pack.js +0 -76
- package/lib/phase_7_freeze_baseline_pack.js +0 -74
- package/lib/phase_7_freeze_review_pack.js +0 -65
- package/lib/phase_7_gate_pack.js +0 -58
- package/lib/phase_7_kafka_proof_pack.js +0 -76
- package/lib/phase_7_mqtt_proof_pack.js +0 -76
- package/lib/phase_7_nats_proof_pack.js +0 -76
- package/lib/phase_7_webhook_event_bus_proof_pack.js +0 -76
- package/lib/phase_8_closeout_pack.js +0 -46
- package/lib/phase_8_completion_pack.js +0 -82
- package/lib/phase_8_decision_record_pack.js +0 -54
- package/lib/phase_8_decision_resolution_pack.js +0 -53
- package/lib/phase_8_external_receipt_import_proof_pack.js +0 -74
- package/lib/phase_8_external_result_import_proof_pack.js +0 -74
- package/lib/phase_8_freeze_baseline_pack.js +0 -71
- package/lib/phase_8_freeze_review_pack.js +0 -64
- package/lib/phase_8_gate_pack.js +0 -58
- package/lib/phase_8_proof_bridge_continuity_pack.js +0 -86
- package/lib/phase_8_proof_bridges_pack.js +0 -72
- package/lib/phase_8_proof_bundle_normalization_proof_pack.js +0 -74
- package/lib/phase_9_closeout_pack.js +0 -46
- package/lib/phase_9_completion_pack.js +0 -82
- package/lib/phase_9_custody_refs_proof_pack.js +0 -74
- package/lib/phase_9_decision_record_pack.js +0 -54
- package/lib/phase_9_decision_resolution_pack.js +0 -53
- package/lib/phase_9_freeze_baseline_pack.js +0 -71
- package/lib/phase_9_freeze_review_pack.js +0 -64
- package/lib/phase_9_gate_pack.js +0 -58
- package/lib/phase_9_operator_accounting_bridges_proof_pack.js +0 -74
- package/lib/phase_9_treasury_connectivity_pack.js +0 -72
- package/lib/phase_9_treasury_continuity_pack.js +0 -86
- package/lib/phase_9_treasury_destinations_proof_pack.js +0 -74
- package/lib/phase_program_pack.js +0 -47
- package/lib/proof_bridge_lane_contract.js +0 -82
- package/lib/proof_truth_contract.js +0 -224
- package/lib/provenance_lane_contract.js +0 -54
- package/lib/provider_lane_contract.js +0 -67
- package/lib/public_surface_policy_contract.js +0 -111
- package/lib/publish_plan.js +0 -51
- package/lib/release_candidate.js +0 -50
- package/lib/release_center.js +0 -1037
- package/lib/release_history.js +0 -206
- package/lib/release_manifest.js +0 -114
- package/lib/release_pack.js +0 -391
- package/lib/result_package_trust_lane_contract.js +0 -74
- package/lib/review_intelligence.js +0 -100
- package/lib/role_freeze.js +0 -436
- package/lib/shared_signals_lane_contract.js +0 -54
- package/lib/signed_audit_provenance_contract.js +0 -93
- package/lib/telemetry_lane_contract.js +0 -54
- package/lib/treasury_proof_lane_contract.js +0 -83
- package/lib/trust_intelligence.js +0 -106
- package/lib/trust_portability_boundary_contract.js +0 -66
- package/lib/trust_portability_pack.js +0 -224
- package/lib/verification_service_pack.js +0 -149
- package/proof_sdk.js +0 -6692
- package/reference/python/README.md +0 -35
- package/reference/python/requirements-optional.txt +0 -1
- package/reference/python/verify_vectors.py +0 -223
- package/reference/python/xnya_reference.py +0 -810
- package/reference/rust/Cargo.toml +0 -11
- package/reference/rust/README.md +0 -28
- package/reference/rust/src/lib.rs +0 -87
- package/scripts/registry_cli.js +0 -157
- package/scripts/verify_all.js +0 -603
- package/scripts/verify_control_plane_contracts.js +0 -34
- package/scripts/verify_control_plane_routes.js +0 -70
- package/scripts/verify_examples.js +0 -19
- package/scripts/verify_external_proof_import_gate.js +0 -84
- package/scripts/verify_external_proof_signature.js +0 -142
- package/scripts/verify_forgery_resistance.js +0 -281
- package/scripts/verify_integrations.js +0 -170
- package/scripts/verify_native_hybrid_design_gate.js +0 -114
- package/scripts/verify_paid_execute.js +0 -133
- package/scripts/verify_paywall_flag.js +0 -86
- package/scripts/verify_reference_promotion_gate.js +0 -74
- package/scripts/verify_reference_python.js +0 -49
- package/scripts/verify_reference_python_crypto.js +0 -87
- package/scripts/verify_reference_rust_scaffold.js +0 -50
- package/scripts/verify_service.js +0 -3038
- package/scripts/verify_tooling.js +0 -1251
- package/scripts/verify_trust_portability.js +0 -56
- package/scripts/verify_verification_services.js +0 -56
- package/server.js +0 -4430
package/integrations/registry.js
DELETED
|
@@ -1,636 +0,0 @@
|
|
|
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
|
-
};
|
package/integrations/views.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function buildMissingResponse(reason) {
|
|
4
|
-
return {
|
|
5
|
-
status: 404,
|
|
6
|
-
payload: {
|
|
7
|
-
status: "not_found",
|
|
8
|
-
reason
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function buildIntegrationListResponse(payload) {
|
|
14
|
-
return {
|
|
15
|
-
status: 200,
|
|
16
|
-
payload
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function buildIntegrationDetailResponse(integration) {
|
|
21
|
-
if (!integration) {
|
|
22
|
-
return buildMissingResponse("integration_not_found");
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
status: 200,
|
|
26
|
-
payload: {
|
|
27
|
-
ok: true,
|
|
28
|
-
integration
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
module.exports = {
|
|
34
|
-
buildIntegrationDetailResponse,
|
|
35
|
-
buildIntegrationListResponse
|
|
36
|
-
};
|