xoonya 2.5.0 → 2.7.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/README.md +119 -7
- package/RELEASE_NOTES.md +29 -7
- package/SERVICE_CONTRACT.md +22 -0
- package/START_HERE.md +12 -0
- package/XOONYA_NATIVE_ATOM_SPEC.md +184 -0
- package/XOONYA_NATIVE_PROOF_FORMAT.md +502 -0
- package/XOONYA_NATIVE_STANDARD_GOVERNANCE.md +116 -0
- package/bin/xoonya-first-run.js +184 -0
- package/bin/xoonya.js +31 -5
- package/lib/release_history.js +29 -0
- package/package.json +11 -15
- package/proof_sdk.js +2391 -44
- package/scripts/registry_cli.js +157 -0
- package/scripts/verify_all.js +558 -0
- package/scripts/verify_examples.js +19 -0
- package/scripts/verify_integrations.js +170 -0
- package/scripts/verify_release_candidate.js +87 -0
- package/scripts/verify_service.js +2825 -0
- package/scripts/verify_tooling.js +1228 -0
- package/scripts/verify_vectors.js +164 -0
- package/server.js +125 -2
- package/vectors/adversarial-vectors.json +373 -2
- package/vectors/conformance-vectors.json +342 -1
- package/vectors/native-atom-vectors.json +101 -0
- package/vectors/native-payload-profile-vectors.json +50 -0
- package/OPERATIONS_RUNBOOK.md +0 -50
- package/OPERATOR_START_HERE.md +0 -67
- package/PROGRAM_COMPLETE_RELEASE.md +0 -52
- package/PROGRAM_STATUS.md +0 -57
- package/PUBLISH_PLAN.md +0 -14
- package/RELEASE_CHECKLIST.md +0 -16
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const {
|
|
6
|
+
exportIntegrationRegistrySnapshot,
|
|
7
|
+
summarizeIntegrationPromotionWorkflow,
|
|
8
|
+
summarizeIntegrationPromotionWorkflowList,
|
|
9
|
+
summarizeIntegrationPromotionReadiness,
|
|
10
|
+
validateIntegrationRegistration
|
|
11
|
+
} = require("../integrations/registry");
|
|
12
|
+
|
|
13
|
+
function readJson(filePath) {
|
|
14
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function writeJson(payload) {
|
|
18
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function resolveExampleRegistration(name) {
|
|
22
|
+
const filename = name === "verifier"
|
|
23
|
+
? "example-third-party-verifier-registration.record.json"
|
|
24
|
+
: "example-third-party-verifier-registration.record.json";
|
|
25
|
+
return path.resolve(__dirname, "..", "integrations", "examples", filename);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function resolveExampleDescriptor(name) {
|
|
29
|
+
const descriptorByExample = {
|
|
30
|
+
verifier: {
|
|
31
|
+
integration_id: "partner.verifier.lattice_notary",
|
|
32
|
+
integration_class: "verification_helper_adapter",
|
|
33
|
+
proof_scope: "profile_verification"
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return descriptorByExample[name] || descriptorByExample.verifier;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function parseArgs(argv) {
|
|
40
|
+
const [command, ...rest] = argv;
|
|
41
|
+
const options = {};
|
|
42
|
+
for (let index = 0; index < rest.length; index += 1) {
|
|
43
|
+
const token = rest[index];
|
|
44
|
+
if (!token.startsWith("--")) continue;
|
|
45
|
+
const key = token.slice(2);
|
|
46
|
+
const next = rest[index + 1];
|
|
47
|
+
if (!next || next.startsWith("--")) {
|
|
48
|
+
options[key] = true;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
options[key] = next;
|
|
52
|
+
index += 1;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
command: command || "",
|
|
56
|
+
options
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function runValidateRegistration(options) {
|
|
61
|
+
const exampleName = options.example === "verifier" ? "verifier" : "verifier";
|
|
62
|
+
const filePath = options.file
|
|
63
|
+
? path.resolve(process.cwd(), options.file)
|
|
64
|
+
: resolveExampleRegistration(exampleName);
|
|
65
|
+
const registrationRecord = readJson(filePath);
|
|
66
|
+
const descriptor = resolveExampleDescriptor(exampleName);
|
|
67
|
+
const validation = validateIntegrationRegistration(descriptor, registrationRecord);
|
|
68
|
+
writeJson({
|
|
69
|
+
ok: validation.ok,
|
|
70
|
+
file: filePath,
|
|
71
|
+
descriptor,
|
|
72
|
+
errors: validation.errors
|
|
73
|
+
});
|
|
74
|
+
process.exitCode = validation.ok ? 0 : 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function runExportSnapshot(options) {
|
|
78
|
+
const filters = {
|
|
79
|
+
source: options.source || undefined,
|
|
80
|
+
certification_state: options.certification_state || undefined,
|
|
81
|
+
integration_maturity: options.integration_maturity || undefined,
|
|
82
|
+
registration_state: options.registration_state || undefined,
|
|
83
|
+
proof_scope: options.proof_scope || undefined,
|
|
84
|
+
bundled: options.bundled || undefined
|
|
85
|
+
};
|
|
86
|
+
const snapshot = exportIntegrationRegistrySnapshot(filters);
|
|
87
|
+
writeJson({
|
|
88
|
+
generated_by: "registry_cli",
|
|
89
|
+
filters: snapshot.filters,
|
|
90
|
+
snapshot
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function runPromotionReadiness(options) {
|
|
95
|
+
const integrationId = options.integration || "partner.verifier.lattice_notary";
|
|
96
|
+
writeJson({
|
|
97
|
+
integration_id: integrationId,
|
|
98
|
+
review: summarizeIntegrationPromotionReadiness(integrationId)
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function runPromotionWorkflow(options) {
|
|
103
|
+
const integrationId = options.integration || "partner.verifier.lattice_notary";
|
|
104
|
+
writeJson({
|
|
105
|
+
integration_id: integrationId,
|
|
106
|
+
review: summarizeIntegrationPromotionWorkflow(integrationId)
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function runPromotionWorkflowSummary(options) {
|
|
111
|
+
writeJson({
|
|
112
|
+
review: summarizeIntegrationPromotionWorkflowList({
|
|
113
|
+
source: options.source || undefined,
|
|
114
|
+
registration_state: options.registration_state || undefined,
|
|
115
|
+
proof_scope: options.proof_scope || undefined,
|
|
116
|
+
bundled: options.bundled || undefined
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function main() {
|
|
122
|
+
const { command, options } = parseArgs(process.argv.slice(2));
|
|
123
|
+
if (command === "validate-registration") {
|
|
124
|
+
runValidateRegistration(options);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (command === "export-snapshot") {
|
|
128
|
+
runExportSnapshot(options);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (command === "promotion-readiness") {
|
|
132
|
+
runPromotionReadiness(options);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (command === "promotion-workflow") {
|
|
136
|
+
runPromotionWorkflow(options);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (command === "promotion-workflow-summary") {
|
|
140
|
+
runPromotionWorkflowSummary(options);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
writeJson({
|
|
145
|
+
ok: false,
|
|
146
|
+
usage: [
|
|
147
|
+
"node scripts/registry_cli.js validate-registration [--file <path>] [--example verifier]",
|
|
148
|
+
"node scripts/registry_cli.js export-snapshot [--source <value>] [--registration_state <value>] [--proof_scope <value>]",
|
|
149
|
+
"node scripts/registry_cli.js promotion-readiness [--integration <integration_id>]",
|
|
150
|
+
"node scripts/registry_cli.js promotion-workflow [--integration <integration_id>]",
|
|
151
|
+
"node scripts/registry_cli.js promotion-workflow-summary [--source <value>] [--registration_state <value>] [--proof_scope <value>] [--bundled true|false]"
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
process.exitCode = 1;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
main();
|