xoonya 3.0.1 → 3.1.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/.env.example +8 -0
- package/README.md +107 -1
- package/RELEASE_NOTES.md +12 -9
- package/SERVICE_CONTRACT.md +12 -0
- package/START_HERE.md +9 -0
- package/XOONYA_NATIVE_PROOF_FORMAT.md +52 -9
- package/index.js +12 -3
- package/lib/adapter_certification_contract.js +90 -0
- package/lib/authority_binding_lifecycle_contract.js +182 -0
- package/lib/crypto_agility_matrix.js +125 -0
- package/lib/machine_identity_registry_contract.js +199 -0
- package/lib/offline_verifiability_recovery_contract.js +155 -0
- package/lib/operational_receipt_contract.js +165 -0
- package/lib/public_surface_policy_contract.js +111 -0
- package/lib/signed_audit_provenance_contract.js +93 -0
- package/lib/trust_portability_boundary_contract.js +66 -0
- package/package.json +5 -2
- package/proof_sdk.js +327 -31
- package/reference/python/__pycache__/xnya_reference.cpython-314.pyc +0 -0
- package/scripts/verify_control_plane_contracts.js +34 -0
- package/scripts/verify_control_plane_routes.js +70 -0
- package/scripts/verify_forgery_resistance.js +281 -0
- package/scripts/verify_service.js +98 -0
- package/server.js +242 -16
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
|
|
5
|
+
function buildAuthorityBindingLifecycleContractPack() {
|
|
6
|
+
return {
|
|
7
|
+
ok: true,
|
|
8
|
+
product: packageJson.name,
|
|
9
|
+
category: "naxytra-authority-binding-lifecycle-contract",
|
|
10
|
+
pack_version: "naxytra-authority-binding-lifecycle-contract-v1",
|
|
11
|
+
doctrine: "xoonya_reviews_binding_lifecycle_state_without_claiming_universal_external_identity_authority_or_custody_truth",
|
|
12
|
+
model_state: "core_now",
|
|
13
|
+
core_claim: "binding lifecycle state is the proof-linked record for identity bindings authority bindings spend credentials and delegated signing",
|
|
14
|
+
binding_kinds: [
|
|
15
|
+
{
|
|
16
|
+
binding_kind: "identity_binding",
|
|
17
|
+
description: "binds a subject to an identity posture"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
binding_kind: "authority_binding",
|
|
21
|
+
description: "binds a subject to an authority posture"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
binding_kind: "spend_credential",
|
|
25
|
+
description: "binds a subject to a spend credential or delegated spend posture"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
binding_kind: "delegation_grant",
|
|
29
|
+
description: "records a delegated capability grant"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
binding_kind: "delegation_revocation",
|
|
33
|
+
description: "records that a delegation has been revoked"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
binding_kind: "key_binding",
|
|
37
|
+
description: "binds a subject to a key or public-key reference"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
lifecycle_states: [
|
|
41
|
+
{ state: "active", description: "usable and currently in force" },
|
|
42
|
+
{ state: "rotated", description: "superseded by a successor binding" },
|
|
43
|
+
{ state: "revoked", description: "disabled before natural expiry" },
|
|
44
|
+
{ state: "expired", description: "no longer valid because the validity window ended" },
|
|
45
|
+
{ state: "suspended", description: "temporarily unusable pending review" }
|
|
46
|
+
],
|
|
47
|
+
canonical_objects: [
|
|
48
|
+
{
|
|
49
|
+
object_id: "binding_lifecycle_record",
|
|
50
|
+
role: "versioned_lineage_preserving_state_record_for_a_binding_or_credential",
|
|
51
|
+
required_fields: [
|
|
52
|
+
"version",
|
|
53
|
+
"binding_id",
|
|
54
|
+
"binding_kind",
|
|
55
|
+
"subject_id",
|
|
56
|
+
"status",
|
|
57
|
+
"issued_by",
|
|
58
|
+
"issued_at_iso"
|
|
59
|
+
],
|
|
60
|
+
recommended_fields: [
|
|
61
|
+
"expires_at_iso",
|
|
62
|
+
"rotated_from_binding_id",
|
|
63
|
+
"replaced_by_binding_id",
|
|
64
|
+
"revoked_at_iso",
|
|
65
|
+
"revoke_reason",
|
|
66
|
+
"scope",
|
|
67
|
+
"key_ref",
|
|
68
|
+
"signature_suite",
|
|
69
|
+
"proof_ref",
|
|
70
|
+
"anchor_ref"
|
|
71
|
+
],
|
|
72
|
+
optional_fields: [
|
|
73
|
+
"delegation_ref",
|
|
74
|
+
"controller_id",
|
|
75
|
+
"previous_binding_id",
|
|
76
|
+
"metadata"
|
|
77
|
+
],
|
|
78
|
+
primary_surfaces: [
|
|
79
|
+
"/v1/phases/phase-4/identity-registry/proof",
|
|
80
|
+
"/v1/phases/phase-4/identity-registry/proof/summary",
|
|
81
|
+
"/v1/phases/phase-4/attestation/proof",
|
|
82
|
+
"/v1/proof-center/trust-portability",
|
|
83
|
+
"/v1/proof-center/trust-portability/summary"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
transition_rules: [
|
|
88
|
+
"issue_creates_a_new_active_binding",
|
|
89
|
+
"renew_extends_expiry_without_breaking_lineage",
|
|
90
|
+
"rotate_creates_a_successor_binding_and_preserves_predecessor_lineage",
|
|
91
|
+
"revoke_disables_the_binding_and_preserves_auditability",
|
|
92
|
+
"expire_marks_the_binding_inactive_when_the_validity_window_ends",
|
|
93
|
+
"narrow_scope_must_not_silently_broaden_access"
|
|
94
|
+
],
|
|
95
|
+
delegated_signing_rules: [
|
|
96
|
+
"delegated_signing_must_be_explicit",
|
|
97
|
+
"delegated_signing_must_be_scope_bounded",
|
|
98
|
+
"delegated_signing_must_be_time_bounded_unless_a_product_decision_says_otherwise",
|
|
99
|
+
"delegated_signing_must_preserve_subject_and_issuer_lineage",
|
|
100
|
+
"delegated_signing_must_not_become_hidden_shared_secret_magic"
|
|
101
|
+
],
|
|
102
|
+
lineage_model: [
|
|
103
|
+
{
|
|
104
|
+
layer_id: "binding_review",
|
|
105
|
+
order_index: 1,
|
|
106
|
+
objects: ["binding_lifecycle_record"],
|
|
107
|
+
invariants: [
|
|
108
|
+
"issuance_is_explicit",
|
|
109
|
+
"binding_ids_are_versioned_and_auditable"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
layer_id: "binding_portability",
|
|
114
|
+
order_index: 2,
|
|
115
|
+
objects: ["binding_lifecycle_record"],
|
|
116
|
+
invariants: [
|
|
117
|
+
"predecessor_and_successor_linkage_is_preserved",
|
|
118
|
+
"revocation_history_remains_visible"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
layer_id: "proof_followthrough",
|
|
123
|
+
order_index: 3,
|
|
124
|
+
objects: ["binding_lifecycle_record"],
|
|
125
|
+
invariants: [
|
|
126
|
+
"binding_lineage_can_be_carried_into_proof_without_becoming_proof_truth_itself",
|
|
127
|
+
"optional_proof_and_anchor_refs_do_not_change_base_binding_meaning"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
invariants: [
|
|
132
|
+
"binding_state_changes_are_explicit_and_versioned",
|
|
133
|
+
"rotation_preserves_lineage",
|
|
134
|
+
"revocation_preserves_auditability",
|
|
135
|
+
"delegated_signing_remains_bounded",
|
|
136
|
+
"binding_lifecycle_is_a_proof_followthrough_concept_not_a_general_web_token_story"
|
|
137
|
+
],
|
|
138
|
+
linked_surfaces: {
|
|
139
|
+
identity_binding_proof_ref: "/v1/phases/phase-4/identity-registry/proof",
|
|
140
|
+
identity_binding_proof_summary_ref: "/v1/phases/phase-4/identity-registry/proof/summary",
|
|
141
|
+
attestation_proof_ref: "/v1/phases/phase-4/attestation/proof",
|
|
142
|
+
trust_portability_ref: "/v1/proof-center/trust-portability",
|
|
143
|
+
trust_portability_summary_ref: "/v1/proof-center/trust-portability/summary"
|
|
144
|
+
},
|
|
145
|
+
claim_boundary: "claim_the_xoonya_binding_lifecycle_followthrough_only_without_claiming_universal_external_identity_authority_or_custody_truth"
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function summarizeAuthorityBindingLifecycleContractPack() {
|
|
150
|
+
const pack = buildAuthorityBindingLifecycleContractPack();
|
|
151
|
+
return {
|
|
152
|
+
ok: true,
|
|
153
|
+
product: pack.product,
|
|
154
|
+
category: pack.category,
|
|
155
|
+
summary_version: "naxytra-authority-binding-lifecycle-contract-summary-v1",
|
|
156
|
+
pack_version: pack.pack_version,
|
|
157
|
+
model_state: pack.model_state,
|
|
158
|
+
binding_kind_count: pack.binding_kinds.length,
|
|
159
|
+
lifecycle_state_count: pack.lifecycle_states.length,
|
|
160
|
+
canonical_object_count: pack.canonical_objects.length,
|
|
161
|
+
transition_rule_count: pack.transition_rules.length,
|
|
162
|
+
delegated_signing_rule_count: pack.delegated_signing_rules.length,
|
|
163
|
+
linked_surfaces: pack.linked_surfaces
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function getAuthorityBindingKindDetail(bindingKind) {
|
|
168
|
+
const normalized = String(bindingKind || "").trim().toLowerCase();
|
|
169
|
+
return (buildAuthorityBindingLifecycleContractPack().binding_kinds || []).find((entry) => entry.binding_kind === normalized) || null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function getAuthorityLifecycleStateDetail(state) {
|
|
173
|
+
const normalized = String(state || "").trim().toLowerCase();
|
|
174
|
+
return (buildAuthorityBindingLifecycleContractPack().lifecycle_states || []).find((entry) => entry.state === normalized) || null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
module.exports = {
|
|
178
|
+
buildAuthorityBindingLifecycleContractPack,
|
|
179
|
+
summarizeAuthorityBindingLifecycleContractPack,
|
|
180
|
+
getAuthorityBindingKindDetail,
|
|
181
|
+
getAuthorityLifecycleStateDetail
|
|
182
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
|
|
5
|
+
function buildCryptoAgilityMatrixPack() {
|
|
6
|
+
return {
|
|
7
|
+
ok: true,
|
|
8
|
+
product: packageJson.name,
|
|
9
|
+
category: "naxytra-crypto-agility-matrix",
|
|
10
|
+
pack_version: "naxytra-crypto-agility-matrix-v1",
|
|
11
|
+
doctrine: "xoonya_verifies_crypto_agility_boundaries_without_claiming_unverified_future_algorithms_as_current_proof_truth",
|
|
12
|
+
model_state: "core_now",
|
|
13
|
+
core_claim: "the proof stack must be explicit about which algorithms are core today, supported today, future lane, blocked, or never core",
|
|
14
|
+
lane_classes: [
|
|
15
|
+
{
|
|
16
|
+
lane_class: "core_today",
|
|
17
|
+
description: "verified and claimable today",
|
|
18
|
+
items: [
|
|
19
|
+
"sha256_domain_separated_commitments",
|
|
20
|
+
"ed25519",
|
|
21
|
+
"secp256k1",
|
|
22
|
+
"p256",
|
|
23
|
+
"native_anchor_binding",
|
|
24
|
+
"line_rate_transport_frame"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
lane_class: "supported_today",
|
|
29
|
+
description: "supported as interop or external verification lanes today",
|
|
30
|
+
items: [
|
|
31
|
+
"jwt",
|
|
32
|
+
"jws",
|
|
33
|
+
"jwk",
|
|
34
|
+
"did",
|
|
35
|
+
"vc",
|
|
36
|
+
"sd_jwt_vc",
|
|
37
|
+
"webauthn_cose_when_verifier_present"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
lane_class: "future_lane",
|
|
42
|
+
description: "explicit future cryptographic direction, not claimable as the current core",
|
|
43
|
+
items: [
|
|
44
|
+
"ml_dsa",
|
|
45
|
+
"slh_dsa",
|
|
46
|
+
"xoonya_native_hybrid_v1",
|
|
47
|
+
"xoonya_native_atom_v2"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
lane_class: "blocked_until_vectors",
|
|
52
|
+
description: "not claimable until validators and vectors exist",
|
|
53
|
+
items: [
|
|
54
|
+
"webauthn_cose",
|
|
55
|
+
"dilithium",
|
|
56
|
+
"falcon",
|
|
57
|
+
"sphincs_plus"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
lane_class: "never_core",
|
|
62
|
+
description: "must never become implicit or silent core behavior",
|
|
63
|
+
items: [
|
|
64
|
+
"silent_algorithm_negotiation",
|
|
65
|
+
"implicit_downgrade",
|
|
66
|
+
"unversioned_signature_assumptions",
|
|
67
|
+
"hidden_verifier_boundaries"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
signature_suites: [
|
|
72
|
+
{ suite_id: "ed25519", state: "core_today" },
|
|
73
|
+
{ suite_id: "secp256k1", state: "core_today" },
|
|
74
|
+
{ suite_id: "p256", state: "core_today" },
|
|
75
|
+
{ suite_id: "webauthn-cose", state: "blocked_until_vectors" },
|
|
76
|
+
{ suite_id: "dilithium", state: "blocked_until_vectors" },
|
|
77
|
+
{ suite_id: "falcon", state: "blocked_until_vectors" },
|
|
78
|
+
{ suite_id: "sphincs-plus", state: "blocked_until_vectors" },
|
|
79
|
+
{ suite_id: "ml-dsa", state: "future_lane" },
|
|
80
|
+
{ suite_id: "slh-dsa", state: "future_lane" }
|
|
81
|
+
],
|
|
82
|
+
proof_envelope_rules: [
|
|
83
|
+
"signature_suite_must_be_explicit",
|
|
84
|
+
"unsupported_suites_must_not_be_claimed_as_verified",
|
|
85
|
+
"native_proof_methods_remain_optional",
|
|
86
|
+
"envelopes_must_not_redefine_receipt_validity",
|
|
87
|
+
"envelope_claims_must_stay_bounded_to_verified_behavior"
|
|
88
|
+
],
|
|
89
|
+
linked_surfaces: {
|
|
90
|
+
native_standard_ref: "/v1/proof-center/native-standard",
|
|
91
|
+
native_standard_summary_ref: "/v1/proof-center/native-standard/summary",
|
|
92
|
+
native_atom_spec_ref: "/v1/proof-center/native-atom-spec",
|
|
93
|
+
native_payload_profile_ref: "/v1/proof-center/native-payload-profile",
|
|
94
|
+
native_anchor_profile_ref: "/v1/proof-center/native-anchor-profile"
|
|
95
|
+
},
|
|
96
|
+
claim_boundary: "claim_the_crypto_agility_policy_for_xoonya_only_without_claiming_unverified_future_algorithms_as_current_core_truth"
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function summarizeCryptoAgilityMatrixPack() {
|
|
101
|
+
const pack = buildCryptoAgilityMatrixPack();
|
|
102
|
+
return {
|
|
103
|
+
ok: true,
|
|
104
|
+
product: pack.product,
|
|
105
|
+
category: pack.category,
|
|
106
|
+
summary_version: "naxytra-crypto-agility-matrix-summary-v1",
|
|
107
|
+
pack_version: pack.pack_version,
|
|
108
|
+
model_state: pack.model_state,
|
|
109
|
+
lane_class_count: pack.lane_classes.length,
|
|
110
|
+
signature_suite_count: pack.signature_suites.length,
|
|
111
|
+
rule_count: pack.proof_envelope_rules.length,
|
|
112
|
+
linked_surfaces: pack.linked_surfaces
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function getCryptoAgilitySuiteDetail(suiteId) {
|
|
117
|
+
const normalized = String(suiteId || "").trim().toLowerCase();
|
|
118
|
+
return (buildCryptoAgilityMatrixPack().signature_suites || []).find((entry) => entry.suite_id === normalized) || null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
module.exports = {
|
|
122
|
+
buildCryptoAgilityMatrixPack,
|
|
123
|
+
summarizeCryptoAgilityMatrixPack,
|
|
124
|
+
getCryptoAgilitySuiteDetail
|
|
125
|
+
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
|
|
5
|
+
function buildMachineIdentityRegistryContractPack() {
|
|
6
|
+
return {
|
|
7
|
+
ok: true,
|
|
8
|
+
product: packageJson.name,
|
|
9
|
+
category: "naxytra-machine-identity-registry-contract",
|
|
10
|
+
pack_version: "naxytra-machine-identity-registry-contract-v1",
|
|
11
|
+
doctrine: "xoonya_reviews_machine_identity_state_as_proof_linked_followthrough_without_claiming_identity_session_or_custody_truth",
|
|
12
|
+
model_state: "core_now",
|
|
13
|
+
core_claim: "the machine identity registry is the proof-linked state machine for subject, key, delegation, attestation, and revocation followthrough",
|
|
14
|
+
canonical_objects: [
|
|
15
|
+
{
|
|
16
|
+
object_id: "machine_identity_record",
|
|
17
|
+
role: "versioned_commitment_backed_registry_record_for_a_machine_subject",
|
|
18
|
+
required_fields: [
|
|
19
|
+
"version",
|
|
20
|
+
"registry_record_id",
|
|
21
|
+
"registry_scope",
|
|
22
|
+
"subject_kind",
|
|
23
|
+
"subject_id",
|
|
24
|
+
"record_type",
|
|
25
|
+
"status",
|
|
26
|
+
"issuer_id",
|
|
27
|
+
"issued_at_ns",
|
|
28
|
+
"commitment_hash"
|
|
29
|
+
],
|
|
30
|
+
recommended_fields: [
|
|
31
|
+
"updated_at_ns",
|
|
32
|
+
"public_key_ref",
|
|
33
|
+
"delegation_ref",
|
|
34
|
+
"revocation_ref",
|
|
35
|
+
"proof_ref",
|
|
36
|
+
"anchor_ref"
|
|
37
|
+
],
|
|
38
|
+
optional_fields: [
|
|
39
|
+
"controller_id",
|
|
40
|
+
"parent_record_id",
|
|
41
|
+
"previous_record_id",
|
|
42
|
+
"subject_ref",
|
|
43
|
+
"trust_state",
|
|
44
|
+
"metadata"
|
|
45
|
+
],
|
|
46
|
+
primary_surfaces: [
|
|
47
|
+
"/v1/phases/phase-4/identity-registry/proof",
|
|
48
|
+
"/v1/phases/phase-4/identity-registry/proof/summary",
|
|
49
|
+
"/v1/phases/phase-4/attestation/proof",
|
|
50
|
+
"/v1/proof-center/trust-portability",
|
|
51
|
+
"/v1/proof-center/trust-portability/summary"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
subject_kinds: [
|
|
56
|
+
{
|
|
57
|
+
subject_kind: "agent",
|
|
58
|
+
description: "a software agent or operator-facing autonomous identity"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
subject_kind: "service",
|
|
62
|
+
description: "a runtime service or machine-facing backend identity"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
subject_kind: "device",
|
|
66
|
+
description: "a physical or embedded device identity"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
subject_kind: "key",
|
|
70
|
+
description: "a bound public-key or credential identity"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
subject_kind: "delegation",
|
|
74
|
+
description: "a delegated authority or capability identity"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
subject_kind: "attestation",
|
|
78
|
+
description: "an attestation-linked identity or evidence binding"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
record_types: [
|
|
82
|
+
{
|
|
83
|
+
record_type: "identity_attestation",
|
|
84
|
+
description: "binds a subject to an attested identity state"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
record_type: "registry_link",
|
|
88
|
+
description: "binds a subject into a registry scope or registry graph"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
record_type: "key_binding",
|
|
92
|
+
description: "binds a subject to one or more active key references"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
record_type: "delegation_grant",
|
|
96
|
+
description: "records that authority or capability has been delegated"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
record_type: "delegation_revocation",
|
|
100
|
+
description: "records that a delegation has been revoked or retired"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
record_type: "trust_state_update",
|
|
104
|
+
description: "records a trust, access, or permission-state update"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
record_type: "device_registration",
|
|
108
|
+
description: "records a device subject into the registry"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
record_type: "service_registration",
|
|
112
|
+
description: "records a service subject into the registry"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
record_type: "agent_registration",
|
|
116
|
+
description: "records an agent subject into the registry"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
lineage_model: [
|
|
120
|
+
{
|
|
121
|
+
layer_id: "subject_review",
|
|
122
|
+
order_index: 1,
|
|
123
|
+
objects: ["machine_identity_record"],
|
|
124
|
+
invariants: [
|
|
125
|
+
"the_registry_subject_is_reviewable_in_proof_form",
|
|
126
|
+
"the_registry_record_is_commitment_backed_and_versioned"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
layer_id: "trust_portability",
|
|
131
|
+
order_index: 2,
|
|
132
|
+
objects: ["machine_identity_record"],
|
|
133
|
+
invariants: [
|
|
134
|
+
"keys_delegations_and_attestations_can_be_reviewed_across_bounded_lanes",
|
|
135
|
+
"revocation_and_status_changes_remain_explicit"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
layer_id: "proof_followthrough",
|
|
140
|
+
order_index: 3,
|
|
141
|
+
objects: ["machine_identity_record"],
|
|
142
|
+
invariants: [
|
|
143
|
+
"the_registry_record_can_be_carried_into_proof_without_becoming_a_new_identity_standard",
|
|
144
|
+
"anchor_and_proof_refs_are_followthrough_layers_not_identity_truth_itself"
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
invariants: [
|
|
149
|
+
"commitment_hash_is_derived_from_the_canonical_registry_record",
|
|
150
|
+
"registry_record_id_is_stable_and_replay_safe",
|
|
151
|
+
"status_changes_are_explicit_and_versioned",
|
|
152
|
+
"optional_proof_anchor_and_revocation_refs_do_not_change_base_registry_record_meaning",
|
|
153
|
+
"machine_identity_is_a_shared_control_plane_substrate_not_a_generic_web_claim_container"
|
|
154
|
+
],
|
|
155
|
+
linked_surfaces: {
|
|
156
|
+
identity_registry_proof_ref: "/v1/phases/phase-4/identity-registry/proof",
|
|
157
|
+
identity_registry_proof_summary_ref: "/v1/phases/phase-4/identity-registry/proof/summary",
|
|
158
|
+
attestation_proof_ref: "/v1/phases/phase-4/attestation/proof",
|
|
159
|
+
trust_portability_ref: "/v1/proof-center/trust-portability",
|
|
160
|
+
trust_portability_summary_ref: "/v1/proof-center/trust-portability/summary"
|
|
161
|
+
},
|
|
162
|
+
claim_boundary: "claim_the_machine_identity_registry_proof_followthrough_only_without_claiming_universal_external_identity_session_or_custody_truth"
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function summarizeMachineIdentityRegistryContractPack() {
|
|
167
|
+
const pack = buildMachineIdentityRegistryContractPack();
|
|
168
|
+
return {
|
|
169
|
+
ok: true,
|
|
170
|
+
product: pack.product,
|
|
171
|
+
category: pack.category,
|
|
172
|
+
summary_version: "naxytra-machine-identity-registry-contract-summary-v1",
|
|
173
|
+
pack_version: pack.pack_version,
|
|
174
|
+
model_state: pack.model_state,
|
|
175
|
+
subject_kind_count: pack.subject_kinds.length,
|
|
176
|
+
record_type_count: pack.record_types.length,
|
|
177
|
+
canonical_object_count: pack.canonical_objects.length,
|
|
178
|
+
layer_count: pack.lineage_model.length,
|
|
179
|
+
invariant_count: pack.invariants.length,
|
|
180
|
+
linked_surfaces: pack.linked_surfaces
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function getMachineIdentitySubjectKindDetail(subjectKind) {
|
|
185
|
+
const normalized = String(subjectKind || "").trim().toLowerCase();
|
|
186
|
+
return (buildMachineIdentityRegistryContractPack().subject_kinds || []).find((entry) => entry.subject_kind === normalized) || null;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function getMachineIdentityRecordTypeDetail(recordType) {
|
|
190
|
+
const normalized = String(recordType || "").trim().toLowerCase();
|
|
191
|
+
return (buildMachineIdentityRegistryContractPack().record_types || []).find((entry) => entry.record_type === normalized) || null;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
module.exports = {
|
|
195
|
+
buildMachineIdentityRegistryContractPack,
|
|
196
|
+
summarizeMachineIdentityRegistryContractPack,
|
|
197
|
+
getMachineIdentitySubjectKindDetail,
|
|
198
|
+
getMachineIdentityRecordTypeDetail
|
|
199
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
|
|
5
|
+
function buildOfflineVerifiabilityRecoveryContractPack() {
|
|
6
|
+
return {
|
|
7
|
+
ok: true,
|
|
8
|
+
product: packageJson.name,
|
|
9
|
+
category: "naxytra-offline-verifiability-recovery-contract",
|
|
10
|
+
pack_version: "naxytra-offline-verifiability-recovery-contract-v1",
|
|
11
|
+
doctrine: "xoonya_keeps_evidence_verifiable_and_recoverable_when_live_provider_paths_are_unavailable",
|
|
12
|
+
model_state: "core_now",
|
|
13
|
+
core_claim: "offline mode remains a bounded operational mode with explicit verification restore and evidence lineage rules",
|
|
14
|
+
offline_states: [
|
|
15
|
+
{ state: "online", description: "normal live operation" },
|
|
16
|
+
{ state: "degraded", description: "limited live capability but still operational" },
|
|
17
|
+
{ state: "offline_verify_only", description: "local evidence verification without live provider dependence" },
|
|
18
|
+
{ state: "restore_pending", description: "durable data is being restored or validated" },
|
|
19
|
+
{ state: "restored", description: "state has been restored and revalidated" }
|
|
20
|
+
],
|
|
21
|
+
verifiable_offline_inputs: [
|
|
22
|
+
"operational_receipts",
|
|
23
|
+
"proof_bundles",
|
|
24
|
+
"registry_records",
|
|
25
|
+
"identity_or_authority_bindings",
|
|
26
|
+
"release_and_provenance_artifacts",
|
|
27
|
+
"checksum_or_hash_manifests"
|
|
28
|
+
],
|
|
29
|
+
recovery_inputs: [
|
|
30
|
+
"receipts",
|
|
31
|
+
"proof_bundles",
|
|
32
|
+
"registry_snapshots",
|
|
33
|
+
"operator_notes_where_required",
|
|
34
|
+
"release_evidence",
|
|
35
|
+
"backup_manifests"
|
|
36
|
+
],
|
|
37
|
+
recovery_rules: [
|
|
38
|
+
"backups_must_be_versioned",
|
|
39
|
+
"restore_targets_must_be_explicit",
|
|
40
|
+
"restore_actions_must_be_replayable_or_at_least_auditable",
|
|
41
|
+
"restored_state_must_preserve_evidence_lineage",
|
|
42
|
+
"restore_procedures_must_not_silently_rewrite_the_canonical_record"
|
|
43
|
+
],
|
|
44
|
+
offline_verification_rules: [
|
|
45
|
+
"local_verification_must_not_depend_on_live_provider_truth_for_the_base_evidence_record",
|
|
46
|
+
"imported_evidence_must_keep_its_source_boundary_explicit",
|
|
47
|
+
"cryptographic_checks_must_be_deterministic",
|
|
48
|
+
"if_an_external_claim_cannot_be_verified_locally_that_limitation_must_be_recorded"
|
|
49
|
+
],
|
|
50
|
+
canonical_objects: [
|
|
51
|
+
{
|
|
52
|
+
object_id: "offline_verification_record",
|
|
53
|
+
role: "local_verification_or_restore_state_record",
|
|
54
|
+
required_fields: [
|
|
55
|
+
"version",
|
|
56
|
+
"state",
|
|
57
|
+
"record_id",
|
|
58
|
+
"created_at_iso",
|
|
59
|
+
"actor_id",
|
|
60
|
+
"evidence_refs"
|
|
61
|
+
],
|
|
62
|
+
recommended_fields: [
|
|
63
|
+
"backup_ref",
|
|
64
|
+
"restore_ref",
|
|
65
|
+
"proof_ref",
|
|
66
|
+
"registry_snapshot_ref",
|
|
67
|
+
"hash_manifest_ref"
|
|
68
|
+
],
|
|
69
|
+
optional_fields: [
|
|
70
|
+
"limitation_notes",
|
|
71
|
+
"metadata"
|
|
72
|
+
],
|
|
73
|
+
primary_surfaces: [
|
|
74
|
+
"/v1/proof-truth",
|
|
75
|
+
"/v1/proof-truth/summary",
|
|
76
|
+
"/v1/provenance",
|
|
77
|
+
"/v1/provenance/summary",
|
|
78
|
+
"/v1/security-reliability-drills"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
lineage_model: [
|
|
83
|
+
{
|
|
84
|
+
layer_id: "offline_verification",
|
|
85
|
+
order_index: 1,
|
|
86
|
+
objects: ["offline_verification_record"],
|
|
87
|
+
invariants: [
|
|
88
|
+
"local_verification_can_run_without_live_provider_truth",
|
|
89
|
+
"evidence_boundary_remains_explicit"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
layer_id: "restore_and_replay",
|
|
94
|
+
order_index: 2,
|
|
95
|
+
objects: ["offline_verification_record"],
|
|
96
|
+
invariants: [
|
|
97
|
+
"restores_preserve_lineage",
|
|
98
|
+
"restore_state_is_auditable"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
layer_id: "post_restore_followthrough",
|
|
103
|
+
order_index: 3,
|
|
104
|
+
objects: ["offline_verification_record"],
|
|
105
|
+
invariants: [
|
|
106
|
+
"restored_state_can_rejoin_live_operation_after_revalidation",
|
|
107
|
+
"offline_verification_does_not_redefine_core_truth"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
invariants: [
|
|
112
|
+
"offline_mode_is_bounded",
|
|
113
|
+
"restore_events_are_evidence_events",
|
|
114
|
+
"local_verification_does_not_require_live_provider_truth_for_base_evidence",
|
|
115
|
+
"restore_procedures_preserve_lineage",
|
|
116
|
+
"offline_verification_is_a_proof_followthrough_mode_not_a_new_proof_standard"
|
|
117
|
+
],
|
|
118
|
+
linked_surfaces: {
|
|
119
|
+
proof_truth_ref: "/v1/proof-truth",
|
|
120
|
+
proof_truth_summary_ref: "/v1/proof-truth/summary",
|
|
121
|
+
provenance_ref: "/v1/provenance",
|
|
122
|
+
security_reliability_drills_ref: "/v1/security-reliability-drills",
|
|
123
|
+
release_verification_receipt_ref: "/v1/release-verification-receipt"
|
|
124
|
+
},
|
|
125
|
+
claim_boundary: "claim_the_offline_verification_and_recovery_followthrough_only_without_claiming_live_provider_truth_or_universal_availability"
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function summarizeOfflineVerifiabilityRecoveryContractPack() {
|
|
130
|
+
const pack = buildOfflineVerifiabilityRecoveryContractPack();
|
|
131
|
+
return {
|
|
132
|
+
ok: true,
|
|
133
|
+
product: pack.product,
|
|
134
|
+
category: pack.category,
|
|
135
|
+
summary_version: "naxytra-offline-verifiability-recovery-contract-summary-v1",
|
|
136
|
+
pack_version: pack.pack_version,
|
|
137
|
+
model_state: pack.model_state,
|
|
138
|
+
offline_state_count: pack.offline_states.length,
|
|
139
|
+
offline_input_count: pack.verifiable_offline_inputs.length,
|
|
140
|
+
recovery_input_count: pack.recovery_inputs.length,
|
|
141
|
+
rule_count: pack.recovery_rules.length,
|
|
142
|
+
linked_surfaces: pack.linked_surfaces
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function getOfflineStateDetail(state) {
|
|
147
|
+
const normalized = String(state || "").trim().toLowerCase();
|
|
148
|
+
return (buildOfflineVerifiabilityRecoveryContractPack().offline_states || []).find((entry) => entry.state === normalized) || null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
module.exports = {
|
|
152
|
+
buildOfflineVerifiabilityRecoveryContractPack,
|
|
153
|
+
summarizeOfflineVerifiabilityRecoveryContractPack,
|
|
154
|
+
getOfflineStateDetail
|
|
155
|
+
};
|