xoonya 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -186,7 +186,7 @@ file or class name and description of purpose be included on the
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright 2026 Parth Mauria Saxena
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/NOTICE ADDED
@@ -0,0 +1,3 @@
1
+ Copyright 2026 Parth Mauria Saxena
2
+
3
+ This product is released under the Apache License, Version 2.0.
package/README.md CHANGED
@@ -56,6 +56,8 @@ node examples/package_quickstart.js
56
56
 
57
57
  The package quickstart demonstrates:
58
58
 
59
+ - proof integration discovery and certification posture
60
+ - staged proof-integration registration and snapshot export
59
61
  - legacy compact receipt verification
60
62
  - legacy proof-envelope verification
61
63
  - canonical event creation
@@ -93,6 +95,9 @@ Primary proof-model routes:
93
95
  - `POST /v1/receipts/emit`
94
96
  - `POST /v1/proof-bundles/build`
95
97
  - `POST /v1/proof-bundles/verify`
98
+ - `GET /v1/integrations`
99
+ - `GET /v1/integrations/summary`
100
+ - `GET /v1/integrations/snapshot`
96
101
 
97
102
  Preserved compatibility routes:
98
103
 
@@ -111,10 +116,13 @@ Local verification commands:
111
116
  - `npm run verify:vectors`
112
117
  - `npm run verify:examples`
113
118
  - `npm run verify:service`
119
+ - `npm run verify:tooling`
114
120
  - `npm run verify:all`
115
121
 
116
122
  The current verification covers:
117
123
 
124
+ - proof integration discovery metadata and filtering
125
+ - staged proof integration registration import and snapshot export
118
126
  - package export presence
119
127
  - deterministic event hashing
120
128
  - proof-bundle tamper detection
@@ -137,6 +145,40 @@ Published proof hardening artifacts:
137
145
  - `SERVICE_CONTRACT.md`
138
146
  - `COMPATIBILITY_NOTE.md`
139
147
 
140
- Internal program-history docs for this repo live under:
148
+ ## Proof Integration Toolkit
141
149
 
142
- - [xoonya program archive](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/_program/xoonya)
150
+ `xoonya` keeps its integration model narrower than `xytara`. The proof-side toolkit is for additive proof helpers only:
151
+
152
+ - identity-material providers
153
+ - proof-bundle reference adapters
154
+ - profile verification helpers
155
+
156
+ The package now includes:
157
+
158
+ - `validateIntegrationRegistration(...)`
159
+ - `importRegisteredIntegration(...)`
160
+ - `exportIntegrationRegistrySnapshot(...)`
161
+ - `validateIntegrationRegistrySnapshot(...)`
162
+ - `summarizeIntegrationPromotionReadiness(...)`
163
+
164
+ Those helpers are intended to normalize proof-adjacent integrations without letting pricing, workflow, or settlement logic leak into the proof kernel.
165
+
166
+ For the lightweight external-builder path, use:
167
+
168
+ - [PROOF_INTEGRATION_PROCESS.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xoonya/integrations/PROOF_INTEGRATION_PROCESS.md)
169
+
170
+ For lightweight local review flows, `xoonya` also includes a small repo-local proof-side CLI when working from a cloned `xoonya` repository:
171
+
172
+ ```bash
173
+ node scripts/registry_cli.js validate-registration --example verifier
174
+ node scripts/registry_cli.js export-snapshot --registration_state staging_registered
175
+ ```
176
+
177
+ That tooling is intentionally narrow: validate proof-integration registration posture and export filtered proof registry snapshots.
178
+
179
+ The proof-side readiness layer now also makes promotion posture explicit without expanding `xoonya` into a control plane:
180
+
181
+ - review-ready means a proof integration is staged and inspectable
182
+ - default-eligible means it can participate in the proof-side default posture
183
+ - production-default-ready means certification, maturity, bundled posture, and selection posture all line up
184
+ - blockers are returned as data instead of being left implicit
package/index.js CHANGED
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
2
 
3
- module.exports = require("./proof_sdk");
3
+ module.exports = {
4
+ ...require("./proof_sdk"),
5
+ ...require("./integrations/registry")
6
+ };
@@ -0,0 +1,45 @@
1
+ # Proof Integration Process
2
+
3
+ This note captures the lighter third-party path for `xoonya`.
4
+
5
+ `xoonya` is not a commerce registry. Its integration model is intentionally narrower.
6
+
7
+ ## Goal
8
+
9
+ Allow proof-adjacent integrations to be registered, inspected, and exported without letting pricing, workflow, or settlement logic leak into the proof kernel.
10
+
11
+ ## Typical proof-side integrations
12
+
13
+ - identity-material providers
14
+ - proof-bundle reference adapters
15
+ - profile verification helpers
16
+ - external verifier references
17
+
18
+ ## Recommended flow
19
+
20
+ 1. Define the proof-adjacent integration boundary.
21
+ 2. Create the registration record.
22
+ 3. Validate registration posture locally.
23
+ 4. Export a filtered snapshot when you need a reviewable proof-side state view.
24
+ 5. Treat promotion posture as explicit review data, not as an assumption.
25
+
26
+ ## Local commands
27
+
28
+ From a cloned `xoonya` repo:
29
+
30
+ ```bash
31
+ node scripts/registry_cli.js validate-registration --example verifier
32
+ node scripts/registry_cli.js export-snapshot --registration_state staging_registered
33
+ node scripts/registry_cli.js promotion-readiness --integration verifier.bundle.reference
34
+ ```
35
+
36
+ ## Posture rules
37
+
38
+ - staged proof integrations can be visible
39
+ - staged proof integrations can be review-ready
40
+ - staged proof integrations should not become default by accident
41
+ - blockers should be returned as data
42
+
43
+ ## Boundary rule
44
+
45
+ If a proposed proof-side integration needs workflow, pricing, payment, or settlement semantics to make sense, it probably belongs in `xytara`, not `xoonya`.
@@ -0,0 +1,22 @@
1
+ {
2
+ "integration_id": "partner.verifier.lattice_notary",
3
+ "integration_class": "verification_helper_adapter",
4
+ "proof_scope": "profile_verification",
5
+ "registration_state": "staging_registered",
6
+ "integration_maturity": "staging_candidate",
7
+ "certification_state": "self_attested",
8
+ "bundled": false,
9
+ "default_selection_enabled": false,
10
+ "requires_explicit_selection": true,
11
+ "registered_at": "2026-03-20T00:00:00Z",
12
+ "registered_by": "partner:lattice-labs",
13
+ "verified_with": [
14
+ "schema_conformance",
15
+ "profile_verification_smoke"
16
+ ],
17
+ "certification_scope": [
18
+ "self_attested_contract_shape",
19
+ "staging_profile_smoke"
20
+ ],
21
+ "notes": "Reference staged verifier registration for proof-side import and discovery validation."
22
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "xoonya/registration-record.schema.json",
4
+ "title": "xoonya Proof Integration Registration Record",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "integration_id",
9
+ "integration_class",
10
+ "proof_scope",
11
+ "registration_state",
12
+ "integration_maturity",
13
+ "certification_state",
14
+ "bundled",
15
+ "default_selection_enabled",
16
+ "registered_at"
17
+ ],
18
+ "properties": {
19
+ "integration_id": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "integration_class": {
24
+ "type": "string",
25
+ "enum": [
26
+ "identity_material_provider",
27
+ "attestation_reference_adapter",
28
+ "anchor_reference_adapter",
29
+ "verification_helper_adapter"
30
+ ]
31
+ },
32
+ "proof_scope": {
33
+ "type": "string",
34
+ "enum": [
35
+ "receipt_emission",
36
+ "proof_bundle",
37
+ "profile_verification"
38
+ ]
39
+ },
40
+ "registration_state": {
41
+ "type": "string",
42
+ "enum": [
43
+ "local_only",
44
+ "staging_registered",
45
+ "production_registered"
46
+ ]
47
+ },
48
+ "integration_maturity": {
49
+ "type": "string",
50
+ "enum": [
51
+ "reference_example",
52
+ "staging_candidate",
53
+ "production_default"
54
+ ]
55
+ },
56
+ "certification_state": {
57
+ "type": "string",
58
+ "enum": [
59
+ "reference_example",
60
+ "self_attested",
61
+ "certified"
62
+ ]
63
+ },
64
+ "bundled": {
65
+ "type": "boolean"
66
+ },
67
+ "default_selection_enabled": {
68
+ "type": "boolean"
69
+ },
70
+ "requires_explicit_selection": {
71
+ "type": "boolean"
72
+ },
73
+ "registered_at": {
74
+ "type": "string",
75
+ "minLength": 1
76
+ },
77
+ "registered_by": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "verified_with": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "string",
85
+ "minLength": 1
86
+ }
87
+ },
88
+ "certification_scope": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ }
94
+ },
95
+ "notes": {
96
+ "type": "string"
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "xoonya/registry-snapshot.schema.json",
4
+ "title": "xoonya Proof Integration Registry Snapshot",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "snapshot_version",
9
+ "generated_at",
10
+ "integration_count",
11
+ "integrations"
12
+ ],
13
+ "properties": {
14
+ "snapshot_version": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "generated_at": {
19
+ "type": "string",
20
+ "minLength": 1
21
+ },
22
+ "integration_count": {
23
+ "type": "integer",
24
+ "minimum": 0
25
+ },
26
+ "integrations": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object"
30
+ }
31
+ },
32
+ "filters": {
33
+ "type": "object"
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,465 @@
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 createIntegrationDescriptor(descriptor, extras = {}) {
14
+ return {
15
+ integration_id: descriptor.integration_id,
16
+ integration_class: descriptor.integration_class,
17
+ display_name: descriptor.display_name,
18
+ description: descriptor.description,
19
+ proof_scope: descriptor.proof_scope,
20
+ source: extras.source || descriptor.source || "builtin",
21
+ bundled: extras.bundled !== false,
22
+ status: extras.status || descriptor.status || "available",
23
+ certification_state: extras.certification_state || descriptor.certification_state || "reference_example",
24
+ certification_scope: sortStrings(extras.certification_scope || descriptor.certification_scope),
25
+ integration_maturity: extras.integration_maturity || descriptor.integration_maturity || "reference_example",
26
+ operational_readiness: extras.operational_readiness || descriptor.operational_readiness || "reference",
27
+ capabilities: sortStrings(descriptor.capabilities),
28
+ public_surfaces: sortStrings(descriptor.public_surfaces),
29
+ compatibility: clone(descriptor.compatibility || {}),
30
+ required_inputs: sortStrings(descriptor.required_inputs),
31
+ emitted_artifacts: sortStrings(descriptor.emitted_artifacts),
32
+ verification_targets: sortStrings(descriptor.verification_targets),
33
+ selection_hints: {
34
+ default_for_proof_scopes: sortStrings(
35
+ extras.default_for_proof_scopes || descriptor.default_for_proof_scopes || [descriptor.proof_scope]
36
+ )
37
+ }
38
+ };
39
+ }
40
+
41
+ function buildIntegrationRegistrationView(integration, registrationRecord) {
42
+ const integrationEntry = integration || {};
43
+ const record = registrationRecord && typeof registrationRecord === "object" ? registrationRecord : null;
44
+ return {
45
+ registration_state: record ? record.registration_state : "production_registered",
46
+ bundled: record ? record.bundled : integrationEntry.bundled === true,
47
+ default_selection_enabled: record ? record.default_selection_enabled === true : integrationEntry.bundled === true,
48
+ requires_explicit_selection: record ? record.requires_explicit_selection === true : integrationEntry.bundled !== true,
49
+ registered_at: record ? record.registered_at : null,
50
+ registered_by: record ? record.registered_by || null : null,
51
+ verified_with: sortStrings(record && record.verified_with),
52
+ notes: record ? record.notes || null : null
53
+ };
54
+ }
55
+
56
+ function buildIntegrationView(integration, registrationRecord) {
57
+ const entry = clone(integration);
58
+ entry.registration = buildIntegrationRegistrationView(entry, registrationRecord);
59
+ entry.registration_state = entry.registration.registration_state;
60
+ return entry;
61
+ }
62
+
63
+ function validateIntegrationRegistration(descriptor, registrationRecord) {
64
+ const errors = [];
65
+ const integrationDescriptor = descriptor && typeof descriptor === "object" ? descriptor : {};
66
+ const record = registrationRecord && typeof registrationRecord === "object" ? registrationRecord : {};
67
+
68
+ if (!integrationDescriptor.integration_id) errors.push("descriptor.integration_id is required");
69
+ if (!record.integration_id) errors.push("registration_record.integration_id is required");
70
+ if (!integrationDescriptor.integration_class) errors.push("descriptor.integration_class is required");
71
+ if (!record.integration_class) errors.push("registration_record.integration_class is required");
72
+ if (!integrationDescriptor.proof_scope) errors.push("descriptor.proof_scope is required");
73
+ if (!record.proof_scope) errors.push("registration_record.proof_scope is required");
74
+ if (integrationDescriptor.integration_id && record.integration_id && integrationDescriptor.integration_id !== record.integration_id) {
75
+ errors.push("descriptor.integration_id must match registration_record.integration_id");
76
+ }
77
+ if (integrationDescriptor.integration_class && record.integration_class && integrationDescriptor.integration_class !== record.integration_class) {
78
+ errors.push("descriptor.integration_class must match registration_record.integration_class");
79
+ }
80
+ if (integrationDescriptor.proof_scope && record.proof_scope && integrationDescriptor.proof_scope !== record.proof_scope) {
81
+ errors.push("descriptor.proof_scope must match registration_record.proof_scope");
82
+ }
83
+
84
+ return {
85
+ ok: errors.length === 0,
86
+ errors
87
+ };
88
+ }
89
+
90
+ function importRegisteredIntegration(descriptor, registrationRecord, extras = {}) {
91
+ const validation = validateIntegrationRegistration(descriptor, registrationRecord);
92
+ if (!validation.ok) {
93
+ const error = new Error(`invalid proof integration registration:\n${validation.errors.join("\n")}`);
94
+ error.code = "invalid_proof_integration_registration";
95
+ error.validation = validation;
96
+ throw error;
97
+ }
98
+ const record = registrationRecord || {};
99
+ const integration = createIntegrationDescriptor(descriptor, {
100
+ ...extras,
101
+ bundled: Object.prototype.hasOwnProperty.call(record, "bundled") ? record.bundled : extras.bundled,
102
+ certification_state: record.certification_state || extras.certification_state,
103
+ certification_scope: record.certification_scope || extras.certification_scope,
104
+ integration_maturity: record.integration_maturity || extras.integration_maturity,
105
+ operational_readiness: record.operational_readiness || extras.operational_readiness,
106
+ default_for_proof_scopes: record.default_selection_enabled === true
107
+ ? (extras.default_for_proof_scopes || [descriptor.proof_scope])
108
+ : []
109
+ });
110
+ return buildIntegrationView(integration, record);
111
+ }
112
+
113
+ function createIntegrationRegistrySnapshot(integrations, filters = {}) {
114
+ const rows = Array.isArray(integrations) ? integrations.map(clone) : [];
115
+ return {
116
+ snapshot_version: "xoonya/integration-registry-snapshot/v1",
117
+ generated_at: new Date().toISOString(),
118
+ integration_count: rows.length,
119
+ filters: clone(filters || {}),
120
+ integrations: rows
121
+ };
122
+ }
123
+
124
+ function exportIntegrationRegistrySnapshot(filters = {}) {
125
+ return createIntegrationRegistrySnapshot(listIntegrations(filters), filters);
126
+ }
127
+
128
+ function validateIntegrationRegistrySnapshot(snapshot) {
129
+ const entry = snapshot && typeof snapshot === "object" ? snapshot : {};
130
+ const errors = [];
131
+ if (!entry.snapshot_version) errors.push("snapshot.snapshot_version is required");
132
+ if (!entry.generated_at) errors.push("snapshot.generated_at is required");
133
+ if (!Number.isInteger(entry.integration_count) || entry.integration_count < 0) {
134
+ errors.push("snapshot.integration_count must be a non-negative integer");
135
+ }
136
+ if (!Array.isArray(entry.integrations)) {
137
+ errors.push("snapshot.integrations must be an array");
138
+ } else if (entry.integrations.length !== entry.integration_count) {
139
+ errors.push("snapshot.integration_count must match snapshot.integrations.length");
140
+ }
141
+ return {
142
+ ok: errors.length === 0,
143
+ errors
144
+ };
145
+ }
146
+
147
+ function buildProofPromotionReadinessSummary(input = {}) {
148
+ const registration = input.registration && typeof input.registration === "object" ? input.registration : {};
149
+ const integration = input.integration && typeof input.integration === "object" ? input.integration : {};
150
+ const blockers = [];
151
+ const registrationState = registration.registration_state || null;
152
+ const certificationState = integration.certification_state || null;
153
+ const maturity = integration.integration_maturity || null;
154
+ const defaultSelectionEnabled = registration.default_selection_enabled === true;
155
+ const requiresExplicitSelection = registration.requires_explicit_selection === true;
156
+ const bundled = registration.bundled === true;
157
+
158
+ if (!registrationState) blockers.push("registration_state_missing");
159
+ if (!certificationState) blockers.push("certification_state_missing");
160
+ if (!maturity) blockers.push("integration_maturity_missing");
161
+ if (certificationState !== "certified") blockers.push("not_certified");
162
+ if (maturity !== "production_default") blockers.push("not_marked_production_default");
163
+ if (!defaultSelectionEnabled) blockers.push("default_selection_disabled");
164
+ if (requiresExplicitSelection) blockers.push("still_requires_explicit_selection");
165
+ if (!bundled) blockers.push("not_bundled_for_default_rollout");
166
+
167
+ const reviewReady = registrationState === "staging_registered";
168
+ const productionDefaultReady = blockers.length === 0;
169
+
170
+ let posture = "unknown";
171
+ if (productionDefaultReady) {
172
+ posture = "production_default_ready";
173
+ } else if (reviewReady && certificationState === "certified") {
174
+ posture = "promotion_candidate";
175
+ } else if (reviewReady) {
176
+ posture = "staged_review";
177
+ } else if (defaultSelectionEnabled) {
178
+ posture = "production_registered";
179
+ }
180
+
181
+ return {
182
+ registration_state: registrationState,
183
+ certification_state: certificationState,
184
+ integration_maturity: maturity,
185
+ review_ready: reviewReady,
186
+ default_eligible: defaultSelectionEnabled,
187
+ production_default_ready: productionDefaultReady,
188
+ posture,
189
+ blockers
190
+ };
191
+ }
192
+
193
+ function summarizeIntegrationPromotionReadiness(integrationOrId) {
194
+ const integration = typeof integrationOrId === "string"
195
+ ? getIntegration(integrationOrId)
196
+ : clone(integrationOrId || null);
197
+ if (!integration) {
198
+ return {
199
+ ok: false,
200
+ reason: "integration_not_found"
201
+ };
202
+ }
203
+ return {
204
+ ok: true,
205
+ integration_id: integration.integration_id,
206
+ display_name: integration.display_name,
207
+ integration_class: integration.integration_class,
208
+ proof_scope: integration.proof_scope,
209
+ source: integration.source,
210
+ registration: clone(integration.registration || {}),
211
+ certification_state: integration.certification_state || null,
212
+ integration_maturity: integration.integration_maturity || null,
213
+ promotion_readiness: buildProofPromotionReadinessSummary({
214
+ registration: integration.registration,
215
+ integration
216
+ })
217
+ };
218
+ }
219
+
220
+ const BUILTIN_INTEGRATIONS = [
221
+ createIntegrationDescriptor({
222
+ integration_id: "builtin.identity.legacy_material",
223
+ integration_class: "identity_material_provider",
224
+ display_name: "Legacy Identity Material Provider",
225
+ description: "Provides legacy identity material compatibility for receipt emission and verification bridges.",
226
+ certification_scope: ["compatibility_surface", "receipt_emission"],
227
+ capabilities: ["identity.material", "legacy.receipt.compatibility"],
228
+ public_surfaces: ["sdk", "service"],
229
+ proof_scope: "receipt_emission",
230
+ operational_readiness: "production",
231
+ integration_maturity: "production_default",
232
+ certification_state: "certified",
233
+ compatibility: {
234
+ proof_contract: "xoonya/v1"
235
+ },
236
+ required_inputs: ["legacy_identity_material_hex"],
237
+ emitted_artifacts: ["receipt"],
238
+ verification_targets: ["legacy_receipt"]
239
+ }, {
240
+ source: "builtin",
241
+ status: "available",
242
+ certification_state: "certified",
243
+ certification_scope: ["compatibility_surface", "receipt_emission"],
244
+ integration_maturity: "production_default",
245
+ operational_readiness: "production",
246
+ default_for_proof_scopes: ["receipt_emission"]
247
+ }),
248
+ createIntegrationDescriptor({
249
+ integration_id: "builtin.reference.evidence",
250
+ integration_class: "attestation_reference_adapter",
251
+ display_name: "Evidence Reference Adapter",
252
+ description: "Admits external evidence references into proof bundles without changing proof validity semantics.",
253
+ certification_scope: ["proof_bundle_shape"],
254
+ capabilities: ["proof_bundle.evidence_refs"],
255
+ public_surfaces: ["sdk", "service"],
256
+ proof_scope: "proof_bundle",
257
+ operational_readiness: "production",
258
+ integration_maturity: "production_default",
259
+ certification_state: "certified",
260
+ compatibility: {
261
+ proof_contract: "xoonya/v1"
262
+ },
263
+ required_inputs: ["evidence_refs"],
264
+ emitted_artifacts: ["proof_bundle"],
265
+ verification_targets: ["proof_bundle_shape"]
266
+ }, {
267
+ source: "builtin",
268
+ status: "available",
269
+ certification_state: "certified",
270
+ certification_scope: ["proof_bundle_shape"],
271
+ integration_maturity: "production_default",
272
+ operational_readiness: "production",
273
+ default_for_proof_scopes: ["proof_bundle"]
274
+ }),
275
+ createIntegrationDescriptor({
276
+ integration_id: "builtin.reference.anchor",
277
+ integration_class: "anchor_reference_adapter",
278
+ display_name: "Anchor Reference Adapter",
279
+ description: "Carries additive anchor references inside proof bundles while keeping proof semantics fixed.",
280
+ certification_scope: ["proof_bundle_shape"],
281
+ capabilities: ["proof_bundle.anchors"],
282
+ public_surfaces: ["sdk"],
283
+ proof_scope: "proof_bundle",
284
+ operational_readiness: "production",
285
+ integration_maturity: "production_default",
286
+ certification_state: "certified",
287
+ compatibility: {
288
+ proof_contract: "xoonya/v1"
289
+ },
290
+ required_inputs: ["anchor_refs"],
291
+ emitted_artifacts: ["proof_bundle"],
292
+ verification_targets: ["proof_bundle_shape"]
293
+ }, {
294
+ source: "builtin",
295
+ status: "available",
296
+ certification_state: "certified",
297
+ certification_scope: ["proof_bundle_shape"],
298
+ integration_maturity: "production_default",
299
+ operational_readiness: "production",
300
+ default_for_proof_scopes: ["proof_bundle"]
301
+ }),
302
+ createIntegrationDescriptor({
303
+ integration_id: "builtin.verifier.registry_profile",
304
+ integration_class: "verification_helper_adapter",
305
+ display_name: "Registry Profile Verifier",
306
+ description: "Verifies additive registry lifecycle profiles without redefining receipt or bundle validity.",
307
+ certification_scope: ["profile_verification"],
308
+ capabilities: ["registry_profile.verify"],
309
+ public_surfaces: ["sdk", "service"],
310
+ proof_scope: "profile_verification",
311
+ operational_readiness: "production",
312
+ integration_maturity: "production_default",
313
+ certification_state: "certified",
314
+ compatibility: {
315
+ proof_contract: "xoonya/v1"
316
+ },
317
+ required_inputs: ["profile"],
318
+ emitted_artifacts: [],
319
+ verification_targets: ["registry_profile"]
320
+ }, {
321
+ source: "builtin",
322
+ status: "available",
323
+ certification_state: "certified",
324
+ certification_scope: ["profile_verification"],
325
+ integration_maturity: "production_default",
326
+ operational_readiness: "production",
327
+ default_for_proof_scopes: ["profile_verification"]
328
+ }),
329
+ createIntegrationDescriptor({
330
+ integration_id: "builtin.verifier.economic_profile",
331
+ integration_class: "verification_helper_adapter",
332
+ display_name: "Economic Profile Verifier",
333
+ description: "Verifies additive economic profiles while keeping the proof kernel neutral.",
334
+ certification_scope: ["profile_verification"],
335
+ capabilities: ["economic_profile.verify"],
336
+ public_surfaces: ["sdk", "service"],
337
+ proof_scope: "profile_verification",
338
+ operational_readiness: "production",
339
+ integration_maturity: "production_default",
340
+ certification_state: "certified",
341
+ compatibility: {
342
+ proof_contract: "xoonya/v1"
343
+ },
344
+ required_inputs: ["profile"],
345
+ emitted_artifacts: [],
346
+ verification_targets: ["economic_profile"]
347
+ }, {
348
+ source: "builtin",
349
+ status: "available",
350
+ certification_state: "certified",
351
+ certification_scope: ["profile_verification"],
352
+ integration_maturity: "production_default",
353
+ operational_readiness: "production",
354
+ default_for_proof_scopes: ["profile_verification"]
355
+ })
356
+ ];
357
+
358
+ const STAGED_PARTNER_VERIFIER_DESCRIPTOR = {
359
+ integration_id: stagedPartnerVerifierRegistrationRecord.integration_id,
360
+ integration_class: stagedPartnerVerifierRegistrationRecord.integration_class,
361
+ display_name: "Lattice Notary Verifier",
362
+ description: "Reference third-party proof verifier showing how staged additive profile verification integrations can appear in discovery without changing proof validity semantics.",
363
+ proof_scope: stagedPartnerVerifierRegistrationRecord.proof_scope,
364
+ capabilities: ["notary_profile.verify", "evidence_reference.verify"],
365
+ public_surfaces: ["sdk", "service"],
366
+ compatibility: {
367
+ proof_contract: "xoonya/v1"
368
+ },
369
+ required_inputs: ["profile", "evidence_refs"],
370
+ emitted_artifacts: [],
371
+ verification_targets: ["notary_profile", "evidence_reference"]
372
+ };
373
+
374
+ const EXAMPLE_INTEGRATIONS = [
375
+ importRegisteredIntegration(STAGED_PARTNER_VERIFIER_DESCRIPTOR, stagedPartnerVerifierRegistrationRecord, {
376
+ source: "third_party_example",
377
+ status: "available",
378
+ certification_scope: ["self_attested_contract_shape", "staging_profile_smoke"],
379
+ operational_readiness: "staging",
380
+ default_for_proof_scopes: []
381
+ })
382
+ ];
383
+
384
+ const INTEGRATIONS = BUILTIN_INTEGRATIONS.concat(EXAMPLE_INTEGRATIONS).map(clone);
385
+
386
+ const INTEGRATION_REGISTRATION_RECORDS = {
387
+ [stagedPartnerVerifierRegistrationRecord.integration_id]: clone(stagedPartnerVerifierRegistrationRecord)
388
+ };
389
+
390
+ function listIntegrations(filters = {}) {
391
+ const normalized = {
392
+ integration_class: String(filters.integration_class || filters.class || "").trim(),
393
+ capability: String(filters.capability || "").trim(),
394
+ surface: String(filters.surface || "").trim(),
395
+ source: String(filters.source || "").trim(),
396
+ certification_state: String(filters.certification_state || "").trim(),
397
+ integration_maturity: String(filters.integration_maturity || filters.maturity || "").trim(),
398
+ registration_state: String(filters.registration_state || "").trim(),
399
+ proof_scope: String(filters.proof_scope || "").trim(),
400
+ bundled: String(filters.bundled || "").trim().toLowerCase()
401
+ };
402
+ return INTEGRATIONS.filter((integration) => {
403
+ if (normalized.integration_class && integration.integration_class !== normalized.integration_class) return false;
404
+ if (normalized.capability && !integration.capabilities.includes(normalized.capability)) return false;
405
+ if (normalized.surface && !integration.public_surfaces.includes(normalized.surface)) return false;
406
+ if (normalized.source && integration.source !== normalized.source) return false;
407
+ if (normalized.certification_state && integration.certification_state !== normalized.certification_state) return false;
408
+ if (normalized.integration_maturity && integration.integration_maturity !== normalized.integration_maturity) return false;
409
+ if (normalized.proof_scope && integration.proof_scope !== normalized.proof_scope) return false;
410
+ const registrationState = INTEGRATION_REGISTRATION_RECORDS[integration.integration_id]
411
+ ? INTEGRATION_REGISTRATION_RECORDS[integration.integration_id].registration_state
412
+ : "production_registered";
413
+ if (normalized.registration_state && registrationState !== normalized.registration_state) return false;
414
+ if (normalized.bundled === "true" && integration.bundled !== true) return false;
415
+ if (normalized.bundled === "false" && integration.bundled !== false) return false;
416
+ return true;
417
+ }).map((integration) => buildIntegrationView(integration, INTEGRATION_REGISTRATION_RECORDS[integration.integration_id]));
418
+ }
419
+
420
+ function getIntegration(integrationId) {
421
+ const lookup = String(integrationId || "").trim();
422
+ const found = INTEGRATIONS.find((integration) => integration.integration_id === lookup);
423
+ return found ? buildIntegrationView(found, INTEGRATION_REGISTRATION_RECORDS[found.integration_id]) : null;
424
+ }
425
+
426
+ function summarizeIntegrations(filters = {}) {
427
+ const integrations = listIntegrations(filters);
428
+ return {
429
+ ok: true,
430
+ integration_count: integrations.length,
431
+ certified_integration_count: integrations.filter((integration) => integration.certification_state === "certified").length,
432
+ production_default_count: integrations.filter((integration) => integration.integration_maturity === "production_default").length,
433
+ staged_registration_count: integrations.filter((integration) => integration.registration.registration_state === "staging_registered").length,
434
+ integration_ids: integrations.map((integration) => integration.integration_id),
435
+ integration_class_count: Array.from(new Set(integrations.map((integration) => integration.integration_class))).length,
436
+ proof_scope_count: Array.from(new Set(integrations.map((integration) => integration.proof_scope))).length,
437
+ integrations: integrations.map((integration) => ({
438
+ integration_id: integration.integration_id,
439
+ integration_class: integration.integration_class,
440
+ display_name: integration.display_name,
441
+ source: integration.source,
442
+ proof_scope: integration.proof_scope,
443
+ certification_state: integration.certification_state,
444
+ integration_maturity: integration.integration_maturity,
445
+ registration_state: integration.registration.registration_state,
446
+ bundled: integration.registration.bundled,
447
+ capability_count: integration.capabilities.length
448
+ }))
449
+ };
450
+ }
451
+
452
+ module.exports = {
453
+ getIntegration,
454
+ listIntegrations,
455
+ summarizeIntegrations,
456
+ summarizeIntegrationPromotionReadiness,
457
+ validateIntegrationRegistration,
458
+ importRegisteredIntegration,
459
+ createIntegrationRegistrySnapshot,
460
+ exportIntegrationRegistrySnapshot,
461
+ validateIntegrationRegistrySnapshot,
462
+ createIntegrationDescriptor,
463
+ buildIntegrationRegistrationView,
464
+ buildIntegrationView
465
+ };
@@ -0,0 +1,36 @@
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xoonya",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Deterministic proof SDK for canonical events, receipts, proof bundles, and verification.",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
@@ -24,10 +24,12 @@
24
24
  "index.js",
25
25
  "proof_sdk.js",
26
26
  "server.js",
27
+ "integrations/",
27
28
  "vectors/",
28
29
  ".env.example",
29
30
  "README.md",
30
- "LICENSE"
31
+ "LICENSE",
32
+ "NOTICE"
31
33
  ],
32
34
  "sideEffects": false,
33
35
  "keywords": [
@@ -42,9 +44,11 @@
42
44
  "scripts": {
43
45
  "start": "node server.js",
44
46
  "verify:package": "node scripts/verify_all.js",
47
+ "verify:integrations": "node scripts/verify_integrations.js",
48
+ "verify:tooling": "node scripts/verify_tooling.js",
45
49
  "verify:vectors": "node scripts/verify_vectors.js",
46
50
  "verify:examples": "node scripts/verify_examples.js",
47
51
  "verify:service": "node scripts/verify_service.js",
48
- "verify:all": "node scripts/verify_all.js && node scripts/verify_vectors.js && node scripts/verify_examples.js && node scripts/verify_service.js"
52
+ "verify:all": "node scripts/verify_all.js && node scripts/verify_integrations.js && node scripts/verify_tooling.js && node scripts/verify_vectors.js && node scripts/verify_examples.js && node scripts/verify_service.js"
49
53
  }
50
54
  }
package/server.js CHANGED
@@ -1,6 +1,16 @@
1
1
  const http = require('http');
2
2
  const { URL } = require('url');
3
3
  const proofSdk = require('./index.js');
4
+ const {
5
+ getIntegration,
6
+ exportIntegrationRegistrySnapshot,
7
+ summarizeIntegrationPromotionReadiness,
8
+ summarizeIntegrations
9
+ } = require('./integrations/registry');
10
+ const {
11
+ buildIntegrationDetailResponse,
12
+ buildIntegrationListResponse
13
+ } = require('./integrations/views');
4
14
 
5
15
  function readJsonBody(req) {
6
16
  return new Promise((resolve, reject) => {
@@ -81,6 +91,90 @@ async function routeRequest(req, res) {
81
91
  return;
82
92
  }
83
93
 
94
+ if (req.method === 'GET' && url.pathname === '/v1/integrations') {
95
+ const response = buildIntegrationListResponse({
96
+ ok: true,
97
+ integrations: proofSdk.listIntegrations({
98
+ integration_class: url.searchParams.get('class'),
99
+ capability: url.searchParams.get('capability'),
100
+ surface: url.searchParams.get('surface'),
101
+ source: url.searchParams.get('source'),
102
+ certification_state: url.searchParams.get('certification_state'),
103
+ integration_maturity: url.searchParams.get('integration_maturity'),
104
+ bundled: url.searchParams.get('bundled')
105
+ })
106
+ });
107
+ sendJson(res, response.status, response.payload);
108
+ return;
109
+ }
110
+
111
+ if (req.method === 'GET' && url.pathname === '/v1/integrations/summary') {
112
+ const response = buildIntegrationListResponse(summarizeIntegrations({
113
+ integration_class: url.searchParams.get('class'),
114
+ capability: url.searchParams.get('capability'),
115
+ surface: url.searchParams.get('surface'),
116
+ source: url.searchParams.get('source'),
117
+ certification_state: url.searchParams.get('certification_state'),
118
+ integration_maturity: url.searchParams.get('integration_maturity'),
119
+ bundled: url.searchParams.get('bundled')
120
+ }));
121
+ sendJson(res, response.status, response.payload);
122
+ return;
123
+ }
124
+
125
+ if (req.method === 'GET' && url.pathname === '/v1/integrations/snapshot') {
126
+ const response = buildIntegrationListResponse(exportIntegrationRegistrySnapshot({
127
+ integration_class: url.searchParams.get('class'),
128
+ capability: url.searchParams.get('capability'),
129
+ surface: url.searchParams.get('surface'),
130
+ source: url.searchParams.get('source'),
131
+ certification_state: url.searchParams.get('certification_state'),
132
+ integration_maturity: url.searchParams.get('integration_maturity'),
133
+ registration_state: url.searchParams.get('registration_state'),
134
+ proof_scope: url.searchParams.get('proof_scope'),
135
+ bundled: url.searchParams.get('bundled')
136
+ }));
137
+ sendJson(res, response.status, response.payload);
138
+ return;
139
+ }
140
+
141
+ if (req.method === 'GET' && url.pathname === '/v1/integrations/promotion-readiness') {
142
+ const response = buildIntegrationListResponse({
143
+ ok: true,
144
+ integrations: proofSdk.listIntegrations({
145
+ integration_class: url.searchParams.get('class'),
146
+ capability: url.searchParams.get('capability'),
147
+ surface: url.searchParams.get('surface'),
148
+ source: url.searchParams.get('source'),
149
+ certification_state: url.searchParams.get('certification_state'),
150
+ integration_maturity: url.searchParams.get('integration_maturity'),
151
+ registration_state: url.searchParams.get('registration_state'),
152
+ proof_scope: url.searchParams.get('proof_scope'),
153
+ bundled: url.searchParams.get('bundled')
154
+ }).map((integration) => summarizeIntegrationPromotionReadiness(integration))
155
+ });
156
+ sendJson(res, response.status, response.payload);
157
+ return;
158
+ }
159
+
160
+ if (req.method === 'GET' && url.pathname.startsWith('/v1/integrations/') && url.pathname.endsWith('/promotion-readiness')) {
161
+ const integrationId = decodeURIComponent(
162
+ url.pathname
163
+ .slice('/v1/integrations/'.length, -'/promotion-readiness'.length)
164
+ .replace(/\/$/, '')
165
+ );
166
+ const response = buildIntegrationListResponse(summarizeIntegrationPromotionReadiness(integrationId));
167
+ sendJson(res, response.status || 200, response.payload || response);
168
+ return;
169
+ }
170
+
171
+ if (req.method === 'GET' && url.pathname.startsWith('/v1/integrations/')) {
172
+ const integrationId = decodeURIComponent(url.pathname.slice('/v1/integrations/'.length));
173
+ const response = buildIntegrationDetailResponse(getIntegration(integrationId));
174
+ sendJson(res, response.status, response.payload);
175
+ return;
176
+ }
177
+
84
178
  if (req.method === 'POST' && url.pathname === '/v1/events/canonicalize') {
85
179
  try {
86
180
  const body = await readJsonBody(req);