xoonya 2.7.0 → 2.9.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/proof_sdk.js CHANGED
@@ -1056,6 +1056,9 @@ function verifyReceiptProofMethod(receipt, ceb, bundle) {
1056
1056
  if (algorithm === VERIFICATION_METHOD_NONE) {
1057
1057
  return { valid: false, reason: "verification_method_none" };
1058
1058
  }
1059
+ if (algorithm === XOONYA_NATIVE_HYBRID_METHOD) {
1060
+ return { valid: false, reason: "native_hybrid_design_gated" };
1061
+ }
1059
1062
 
1060
1063
  const method = PROOF_VERIFICATION_METHODS[algorithm];
1061
1064
  if (!method) {
@@ -1135,7 +1138,8 @@ function verifyReceiptProofMethod(receipt, ceb, bundle) {
1135
1138
  if (
1136
1139
  signature.startsWith(`${XOONYA_NATIVE_SHA256_METHOD}:`) ||
1137
1140
  signature.startsWith(`${XOONYA_NATIVE_SIGNED_METHOD}:`) ||
1138
- signature.startsWith(`${XOONYA_NATIVE_ANCHORED_METHOD}:`)
1141
+ signature.startsWith(`${XOONYA_NATIVE_ANCHORED_METHOD}:`) ||
1142
+ signature.startsWith(`${XOONYA_NATIVE_HYBRID_METHOD}:`)
1139
1143
  ) {
1140
1144
  return { valid: false, reason: "signature_method_mismatch" };
1141
1145
  }
@@ -2046,6 +2050,20 @@ function normalizeExternalProofMaterial(value) {
2046
2050
  throw new Error("external_proof_material_required");
2047
2051
  }
2048
2052
 
2053
+ const EXTERNAL_PROOF_IMPORT_REJECTION_CODES = Object.freeze([
2054
+ "verification_method_required",
2055
+ "verification_method_unsupported",
2056
+ "verification_method_not_external_importable",
2057
+ "external_proof_material_required",
2058
+ "external_proof_material_empty",
2059
+ "external_proof_hash_mismatch",
2060
+ "external_issuer_truth_claim_requires_external_verifier",
2061
+ "external_signature_truth_claim_requires_external_verifier",
2062
+ "external_revocation_status_claim_requires_external_verifier",
2063
+ "did_resolution_truth_claim_requires_external_verifier",
2064
+ "secret_material_forbidden"
2065
+ ]);
2066
+
2049
2067
  function pickExternalProofMaterial(body) {
2050
2068
  if (body.external_proof != null) return body.external_proof;
2051
2069
  if (body.external_envelope != null) return body.external_envelope;
@@ -2056,6 +2074,32 @@ function pickExternalProofMaterial(body) {
2056
2074
  return undefined;
2057
2075
  }
2058
2076
 
2077
+ function containsExternalImportSecretMaterial(value) {
2078
+ if (!value || typeof value !== "object") return false;
2079
+ const materialKeys = new Set([
2080
+ "external_proof",
2081
+ "external_envelope",
2082
+ "proof_envelope",
2083
+ "proof_material",
2084
+ "token",
2085
+ "compact"
2086
+ ]);
2087
+ const secretishKey = /(private[_-]?key|password|credential|authorization|access[_-]?token|api[_-]?key|secret)/i;
2088
+ const secretishValue = /(bearer\s+[a-z0-9._-]{8,}|sk_live_|npm_[a-z0-9]|ghp_[a-z0-9]|xox[baprs]-)/i;
2089
+ const stack = [value];
2090
+ while (stack.length > 0) {
2091
+ const current = stack.pop();
2092
+ if (!current || typeof current !== "object") continue;
2093
+ for (const [key, entry] of Object.entries(current)) {
2094
+ if (materialKeys.has(key)) continue;
2095
+ if (secretishKey.test(String(key))) return true;
2096
+ if (typeof entry === "string" && secretishValue.test(entry)) return true;
2097
+ if (entry && typeof entry === "object") stack.push(entry);
2098
+ }
2099
+ }
2100
+ return false;
2101
+ }
2102
+
2059
2103
  function normalizeExternalProofImport(input) {
2060
2104
  const body = input && typeof input === "object" && !Array.isArray(input) ? input : {};
2061
2105
  const method = normalizeString(body.method || body.verification_method || body.proof_method);
@@ -2099,6 +2143,47 @@ function normalizeExternalProofImport(input) {
2099
2143
  };
2100
2144
  }
2101
2145
 
2146
+ function validateExternalProofImportEvidence(input) {
2147
+ const body = input && typeof input === "object" && !Array.isArray(input) ? input : {};
2148
+ const rejectionCodes = [];
2149
+ let imported = null;
2150
+ try {
2151
+ imported = normalizeExternalProofImport(body);
2152
+ } catch (error) {
2153
+ const message = error && error.message ? error.message : "external_proof_material_required";
2154
+ if (EXTERNAL_PROOF_IMPORT_REJECTION_CODES.includes(message)) {
2155
+ rejectionCodes.push(message);
2156
+ } else {
2157
+ rejectionCodes.push("external_proof_material_required");
2158
+ }
2159
+ }
2160
+
2161
+ if (body.claim_external_issuer_truth === true && !normalizeString(body.external_issuer_verifier_ref)) {
2162
+ rejectionCodes.push("external_issuer_truth_claim_requires_external_verifier");
2163
+ }
2164
+ if (body.claim_external_signature_truth === true && !normalizeString(body.external_signature_verifier_ref)) {
2165
+ rejectionCodes.push("external_signature_truth_claim_requires_external_verifier");
2166
+ }
2167
+ if (body.claim_external_revocation_status === true && !normalizeString(body.external_revocation_verifier_ref)) {
2168
+ rejectionCodes.push("external_revocation_status_claim_requires_external_verifier");
2169
+ }
2170
+ if (body.claim_did_resolution_truth === true && !normalizeString(body.did_resolution_verifier_ref)) {
2171
+ rejectionCodes.push("did_resolution_truth_claim_requires_external_verifier");
2172
+ }
2173
+ if (containsExternalImportSecretMaterial(body)) {
2174
+ rejectionCodes.push("secret_material_forbidden");
2175
+ }
2176
+
2177
+ return {
2178
+ validation_version: "xoonya-external-proof-import-evidence-validation-v1",
2179
+ import_allowed: rejectionCodes.length === 0,
2180
+ method: imported ? imported.method : normalizeString(body.method || body.verification_method || body.proof_method) || null,
2181
+ rejection_codes: Array.from(new Set(rejectionCodes)),
2182
+ deterministic_rejection_codes: EXTERNAL_PROOF_IMPORT_REJECTION_CODES.slice(),
2183
+ boundary: "xoonya_import_validation_binds_external_evidence_without_claiming_external_issuer_signature_revocation_or_did_truth"
2184
+ };
2185
+ }
2186
+
2102
2187
  function buildExternalProofImportAdapterPack() {
2103
2188
  return {
2104
2189
  ok: true,
@@ -2129,6 +2214,17 @@ function buildExternalProofImportAdapterPack() {
2129
2214
  "policy_ref",
2130
2215
  "received_at_iso"
2131
2216
  ],
2217
+ deterministic_rejection_codes: EXTERNAL_PROOF_IMPORT_REJECTION_CODES.slice(),
2218
+ external_truth_claim_template: {
2219
+ claim_external_issuer_truth: false,
2220
+ claim_external_signature_truth: false,
2221
+ claim_external_revocation_status: false,
2222
+ claim_did_resolution_truth: false,
2223
+ external_issuer_verifier_ref: "external.verifier.issuer.<optional>",
2224
+ external_signature_verifier_ref: "external.verifier.signature.<optional>",
2225
+ external_revocation_verifier_ref: "external.verifier.revocation.<optional>",
2226
+ did_resolution_verifier_ref: "external.verifier.did_resolution.<optional>"
2227
+ },
2132
2228
  output_artifacts: [
2133
2229
  "canonical_event",
2134
2230
  "receipt",
@@ -2176,6 +2272,7 @@ function summarizeExternalProofImportAdapterPack() {
2176
2272
  output_artifact_count: pack.output_artifacts.length,
2177
2273
  xoonya_verified_boundary_count: pack.verification_boundary.xoonya_verifies.length,
2178
2274
  external_verifier_boundary_count: pack.verification_boundary.external_verifier_retains.length,
2275
+ deterministic_rejection_code_count: pack.deterministic_rejection_codes.length,
2179
2276
  linked_surfaces: pack.linked_surfaces
2180
2277
  };
2181
2278
  }
@@ -2769,6 +2866,7 @@ function buildXoonyaNativeHybridReadinessPack() {
2769
2866
  promotion_requirements: [
2770
2867
  "runtime_validator_available_without_experimental_flags",
2771
2868
  "positive_conformance_vectors",
2869
+ "design_gate_adversarial_vector",
2772
2870
  "wrong_key_adversarial_vectors",
2773
2871
  "tampered_signature_adversarial_vectors",
2774
2872
  "downgrade_and_method_confusion_vectors",
@@ -2779,6 +2877,7 @@ function buildXoonyaNativeHybridReadinessPack() {
2779
2877
  hybrid_object_model_boundary: {
2780
2878
  atom_rule: "XNYA_atom_remains_commitment_only",
2781
2879
  envelope_rule: "hybrid_or_pqc_material_lives_in_proof_envelope_or_profile",
2880
+ current_deterministic_reject_reason: "native_hybrid_design_gated",
2782
2881
  downgrade_rule: "hybrid_receipts_must_not_verify_as_classical_native_signed_receipts",
2783
2882
  claim_rule: "claim_candidate_or_design_gated_until_validators_and_vectors_are_real"
2784
2883
  },
@@ -2805,6 +2904,7 @@ function summarizeXoonyaNativeHybridReadinessPack() {
2805
2904
  implemented_classical_suites: pack.implemented_classical_suites.map((entry) => entry.suite),
2806
2905
  gated_candidate_suite_count: pack.gated_candidate_suites.length,
2807
2906
  promotion_requirement_count: pack.promotion_requirements.length,
2907
+ deterministic_reject_reason: pack.hybrid_object_model_boundary.current_deterministic_reject_reason,
2808
2908
  current_decision: pack.current_decision,
2809
2909
  linked_surfaces: pack.linked_surfaces
2810
2910
  };
@@ -2956,16 +3056,19 @@ function buildXoonyaNativeStandardizationPack() {
2956
3056
  },
2957
3057
  standard_artifacts: [
2958
3058
  "XOONYA_NATIVE_PROOF_FORMAT.md",
3059
+ "XNYA_CONFORMANCE_MARK.md",
2959
3060
  "vectors/native-atom-vectors.json",
2960
3061
  "vectors/native-payload-profile-vectors.json",
2961
3062
  "vectors/conformance-vectors.json",
2962
3063
  "vectors/adversarial-vectors.json",
2963
3064
  "proof_sdk.js reference validator",
3065
+ "XNYA_REFERENCE_IMPLEMENTATIONS.md",
2964
3066
  "/v1/proof-center/native-standard",
2965
3067
  "/v1/proof-center/native-atom-conformance",
2966
3068
  "/v1/proof-center/native-hybrid-readiness",
2967
3069
  "/v1/proof-center/native-payload-profile",
2968
- "/v1/proof-center/native-line-rate-frame"
3070
+ "/v1/proof-center/native-line-rate-frame",
3071
+ "/v1/proof-center/native-reference-implementations"
2969
3072
  ],
2970
3073
  adoption_steps: [
2971
3074
  "keep_xoonya_package_as_reference_implementation",
@@ -2987,6 +3090,7 @@ function buildXoonyaNativeStandardizationPack() {
2987
3090
  native_hybrid_readiness_ref: "/v1/proof-center/native-hybrid-readiness",
2988
3091
  native_payload_profile_ref: "/v1/proof-center/native-payload-profile",
2989
3092
  native_line_rate_frame_ref: "/v1/proof-center/native-line-rate-frame",
3093
+ native_reference_implementations_ref: "/v1/proof-center/native-reference-implementations/summary",
2990
3094
  import_adapter_ref: "/v1/proof-center/import-adapter"
2991
3095
  }
2992
3096
  };
@@ -3012,6 +3116,499 @@ function summarizeXoonyaNativeStandardizationPack() {
3012
3116
  };
3013
3117
  }
3014
3118
 
3119
+ const XNYA_REFERENCE_PROMOTION_REQUIREMENTS = Object.freeze([
3120
+ "candidate_repository_or_packaged_reference",
3121
+ "all_required_vector_sets_pass",
3122
+ "matching_deterministic_error_codes",
3123
+ "independent_parser_not_wrapping_javascript",
3124
+ "native_signature_suite_crypto_parity",
3125
+ "cross_language_round_trip",
3126
+ "conformance_mark_review",
3127
+ "forbidden_claim_review"
3128
+ ]);
3129
+
3130
+ const XNYA_REFERENCE_PROMOTION_REJECTION_CODES = Object.freeze([
3131
+ "reference_language_not_registered",
3132
+ "candidate_repository_missing",
3133
+ "required_vector_set_missing",
3134
+ "deterministic_error_code_parity_missing",
3135
+ "independent_parser_evidence_missing",
3136
+ "signature_crypto_parity_missing",
3137
+ "round_trip_evidence_missing",
3138
+ "conformance_mark_review_missing",
3139
+ "forbidden_claim_review_missing",
3140
+ "javascript_wrapper_forbidden",
3141
+ "secret_material_forbidden"
3142
+ ]);
3143
+
3144
+ function normalizeReferencePromotionString(value) {
3145
+ return typeof value === "string" ? value.trim() : "";
3146
+ }
3147
+
3148
+ function containsReferencePromotionSecretMaterial(value) {
3149
+ if (!value || typeof value !== "object") return false;
3150
+ const secretishKey = /(secret|token|credential|password|private[_-]?key|authorization)/i;
3151
+ const secretishValue = /(bearer\s+[a-z0-9._-]{8,}|sk_live_|npm_[a-z0-9]|ghp_[a-z0-9]|xox[baprs]-)/i;
3152
+ const stack = [value];
3153
+ while (stack.length > 0) {
3154
+ const current = stack.pop();
3155
+ if (!current || typeof current !== "object") continue;
3156
+ for (const [key, entry] of Object.entries(current)) {
3157
+ if (secretishKey.test(String(key))) return true;
3158
+ if (typeof entry === "string" && secretishValue.test(entry)) return true;
3159
+ if (entry && typeof entry === "object") stack.push(entry);
3160
+ }
3161
+ }
3162
+ return false;
3163
+ }
3164
+
3165
+ function buildXoonyaNativeReferenceImplementationPack() {
3166
+ const conformanceMark = summarizeXoonyaNativeConformanceMarkPack();
3167
+ const atomConformance = summarizeXoonyaNativeAtomConformancePack();
3168
+ const payloadProfile = summarizeXoonyaNativePayloadProfilePack();
3169
+ return {
3170
+ ok: true,
3171
+ product: "xoonya",
3172
+ category: "xoonya-native-reference-implementation-pack",
3173
+ pack_version: "xoonya-native-reference-implementation-pack-v1",
3174
+ standard: XOONYA_NATIVE_PROOF_FORMAT_VERSION,
3175
+ canonical_magic: XOONYA_NATIVE_ATOM_MAGIC_ASCII,
3176
+ status: "js_reference_implemented_independent_references_planned",
3177
+ posture: "javascript_package_is_canonical_reference_python_and_rust_require_vector_parity_before_claims",
3178
+ repo_strategy: "ship_reference_inside_xoonya_package_until_external_adoption_pressure_justifies_split_repo",
3179
+ conformance_mark: conformanceMark.mark,
3180
+ implemented_reference_implementations: [
3181
+ {
3182
+ language: "javascript",
3183
+ package: "xoonya",
3184
+ status: "implemented",
3185
+ role: "canonical_reference_implementation",
3186
+ entrypoints: [
3187
+ "proof_sdk.js",
3188
+ "bin/xoonya.js",
3189
+ "bin/xoonya-release.js",
3190
+ "server.js"
3191
+ ],
3192
+ public_checks: [
3193
+ "npm run verify:release-candidate",
3194
+ "npm run verify:all",
3195
+ "xoonya conformance --json",
3196
+ "xoonya first-run --verify-native --pretty"
3197
+ ]
3198
+ }
3199
+ ],
3200
+ planned_reference_candidates: [
3201
+ {
3202
+ language: "python",
3203
+ package_candidate: "xoonya-native-python",
3204
+ status: "atom_payload_vector_parity_scaffold_implemented",
3205
+ promotion_gate: "full_native_proof_round_trip_and_all_positive_adversarial_vectors_pass"
3206
+ },
3207
+ {
3208
+ language: "rust",
3209
+ package_candidate: "xoonya-native-rust",
3210
+ status: "source_scaffold_packaged_vector_parity_not_verified",
3211
+ promotion_gate: "independent_parser_and_verifier_pass_all_positive_and_adversarial_vectors"
3212
+ }
3213
+ ],
3214
+ candidate_scaffolds: [
3215
+ {
3216
+ language: "python",
3217
+ path: "reference/python",
3218
+ status: "verified_atom_payload_frame_non_signed_proof_bundle_and_optional_ed25519_crypto_gate",
3219
+ command: "npm run verify:reference-python",
3220
+ optional_crypto_command: "npm run verify:reference-python-crypto",
3221
+ optional_crypto_dependency_file: "reference/python/requirements-optional.txt",
3222
+ covered_vector_sets: [
3223
+ "vectors/native-atom-vectors.json",
3224
+ "vectors/native-payload-profile-vectors.json",
3225
+ "vectors/conformance-vectors.json",
3226
+ "vectors/adversarial-vectors.json"
3227
+ ],
3228
+ covered_behaviors: [
3229
+ "xnya_atom_v1_create_parse_verify",
3230
+ "xnya_atom_v2_create_parse_verify",
3231
+ "native_atom_adversarial_error_codes",
3232
+ "xnyp_payload_profile_encode_parse",
3233
+ "line_rate_frame_checksum",
3234
+ "canonical_event_hash_parity",
3235
+ "receipt_emission_for_external_native_digest_legacy_and_anchored_methods",
3236
+ "proof_bundle_build_verify_for_non_signed_methods",
3237
+ "proof_bundle_adversarial_reason_parity_for_non_signed_methods",
3238
+ "ed25519_native_signed_verification_when_python_cryptography_dependency_exists",
3239
+ "deterministic_native_signature_crypto_dependency_missing_gate"
3240
+ ],
3241
+ not_yet_claimed: [
3242
+ "always_on_native_signature_suite_cryptographic_verification_without_optional_dependency",
3243
+ "secp256k1_or_p256_python_signature_suite_verification",
3244
+ "external_method_import_reference",
3245
+ "cross_language_round_trip_for_all_native_signed_proof_bundles",
3246
+ "XNYA-compatible_mark_for_python_package"
3247
+ ]
3248
+ },
3249
+ {
3250
+ language: "rust",
3251
+ path: "reference/rust",
3252
+ status: "source_scaffold_packaged_not_vector_verified",
3253
+ command: "npm run verify:reference-rust-scaffold",
3254
+ covered_vector_sets: [],
3255
+ covered_behaviors: [
3256
+ "source_packaging_guard",
3257
+ "xnya_atom_constants_declared",
3258
+ "deterministic_atom_parser_error_codes_declared",
3259
+ "cargo_publish_false_boundary_declared"
3260
+ ],
3261
+ not_yet_claimed: [
3262
+ "compiled_rust_toolchain_check",
3263
+ "native_atom_vector_parity",
3264
+ "native_payload_profile_vector_parity",
3265
+ "canonical_event_or_proof_bundle_parity",
3266
+ "signature_suite_cryptographic_verification",
3267
+ "XNYA-compatible_mark_for_rust_package"
3268
+ ]
3269
+ }
3270
+ ],
3271
+ required_vector_sets: [
3272
+ "vectors/conformance-vectors.json",
3273
+ "vectors/adversarial-vectors.json",
3274
+ "vectors/native-atom-vectors.json",
3275
+ "vectors/native-payload-profile-vectors.json"
3276
+ ],
3277
+ required_artifacts: [
3278
+ "XOONYA_NATIVE_PROOF_FORMAT.md",
3279
+ "XOONYA_NATIVE_ATOM_SPEC.md",
3280
+ "XOONYA_NATIVE_STANDARD_GOVERNANCE.md",
3281
+ "XNYA_CONFORMANCE_MARK.md",
3282
+ "XNYA_REFERENCE_IMPLEMENTATIONS.md"
3283
+ ],
3284
+ required_behaviors: [
3285
+ "parse_XNYA_atoms_without_loose_json_or_string_reinterpretation",
3286
+ "derive_identity_and_payload_hashes_with_exact_domain_separation",
3287
+ "return_stable_error_codes_for_rejects",
3288
+ "reject_algorithm_none_for_production_native_proofs",
3289
+ "verify_ed25519_secp256k1_and_p256_only_when_suite_specific_validators_exist",
3290
+ "treat_pq_hybrid_as_design_gated_until_validators_and_vectors_exist",
3291
+ "bind_external_methods_without_claiming_external_issuer_truth",
3292
+ "preserve_anchor_binding_boundary_without_claiming_external_finality_truth"
3293
+ ],
3294
+ independence_rules: [
3295
+ "non_javascript_references_must_not_wrap_the_node_runtime",
3296
+ "each_reference_must_implement_its_own_byte_parser",
3297
+ "each_reference_must_emit_matching_deterministic_error_codes",
3298
+ "each_reference_must_pass_positive_and_adversarial_vectors_before_public_compatibility_claims",
3299
+ "reference_claims_must_link_to_the_exact_package_version_and vector set"
3300
+ ],
3301
+ promotion_gates: [
3302
+ {
3303
+ gate: "candidate_repository_created",
3304
+ required_evidence: "public_repo_or_package_with_license_docs_and_test_runner"
3305
+ },
3306
+ {
3307
+ gate: "vector_parity",
3308
+ required_evidence: "all_required_vector_sets_pass_with_matching_error_codes"
3309
+ },
3310
+ {
3311
+ gate: "interop_round_trip",
3312
+ required_evidence: "candidate_generates_artifacts_verified_by_javascript_reference_and vice versa"
3313
+ },
3314
+ {
3315
+ gate: "conformance_mark_allowed",
3316
+ required_evidence: "candidate_satisfies_XNYA-compatible_mark_rules_without_forbidden_claims"
3317
+ }
3318
+ ],
3319
+ promotion_requirements: XNYA_REFERENCE_PROMOTION_REQUIREMENTS.slice(),
3320
+ deterministic_rejection_codes: XNYA_REFERENCE_PROMOTION_REJECTION_CODES.slice(),
3321
+ promotion_evidence_template: {
3322
+ language: "python",
3323
+ candidate_repository_ref: "repo-or-package-ref",
3324
+ vector_sets_passed: [
3325
+ "vectors/conformance-vectors.json",
3326
+ "vectors/adversarial-vectors.json",
3327
+ "vectors/native-atom-vectors.json",
3328
+ "vectors/native-payload-profile-vectors.json"
3329
+ ],
3330
+ deterministic_error_code_parity_ref: "xnya.reference.error_codes.<language>.<version>",
3331
+ independent_parser_ref: "xnya.reference.parser.<language>.<version>",
3332
+ signature_crypto_parity_ref: "xnya.reference.crypto.<language>.<version>",
3333
+ round_trip_ref: "xnya.reference.round_trip.<language>.<version>",
3334
+ conformance_mark_review_ref: "xnya.reference.conformance_mark.<language>.<version>",
3335
+ forbidden_claim_review_ref: "xnya.reference.claim_boundary.<language>.<version>",
3336
+ wraps_javascript_runtime: false
3337
+ },
3338
+ explicit_non_claims: [
3339
+ "no_pq_or_hybrid_runtime_validation_claim",
3340
+ "no_live_external_provider_claim",
3341
+ "no_identity_auth_custody_transport_or_settlement_claim",
3342
+ "no_python_or_rust_full_reference_claim_until_signature_suite_crypto_full_vector_parity_and_round_trip",
3343
+ "no_rust_reference_claim_until_cargo_compilation_and_vector_parity_exist",
3344
+ "no_external_issuer_or_chain_truth_claim_without_external_verifier_evidence"
3345
+ ],
3346
+ conformance_floor: {
3347
+ native_atom_error_code_count: atomConformance.deterministic_error_code_count,
3348
+ native_payload_field_type_count: payloadProfile.field_type_count,
3349
+ conformance_mark_required_artifact_count: conformanceMark.required_artifact_count,
3350
+ forbidden_claim_count: conformanceMark.forbidden_claim_count
3351
+ },
3352
+ linked_surfaces: {
3353
+ native_standard_ref: "/v1/proof-center/native-standard",
3354
+ native_standardization_ref: "/v1/proof-center/native-standardization",
3355
+ native_reference_implementations_summary_ref: "/v1/proof-center/native-reference-implementations/summary",
3356
+ native_conformance_mark_ref: "/v1/proof-center/native-conformance-mark",
3357
+ native_atom_conformance_ref: "/v1/proof-center/native-atom-conformance",
3358
+ native_payload_profile_ref: "/v1/proof-center/native-payload-profile"
3359
+ },
3360
+ boundary: "only_the_javascript_reference_is_full_implemented_today_python_has_atom_payload_frame_non_signed_proof_bundle_and_optional_ed25519_crypto_gate_scaffold_rust_is_source_scaffold_not_vector_verified"
3361
+ };
3362
+ }
3363
+
3364
+ function validateXoonyaNativeReferencePromotionEvidence(pack, evidence) {
3365
+ const referencePack = pack || {};
3366
+ const evidencePacket = evidence || {};
3367
+ const language = normalizeReferencePromotionString(evidencePacket.language).toLowerCase();
3368
+ const planned = Array.isArray(referencePack.planned_reference_candidates)
3369
+ ? referencePack.planned_reference_candidates
3370
+ : [];
3371
+ const implemented = Array.isArray(referencePack.implemented_reference_implementations)
3372
+ ? referencePack.implemented_reference_implementations
3373
+ : [];
3374
+ const candidate = planned.find((entry) => entry && entry.language === language) || null;
3375
+ const alreadyImplemented = implemented.find((entry) => entry && entry.language === language) || null;
3376
+ const requiredVectorSets = Array.isArray(referencePack.required_vector_sets) ? referencePack.required_vector_sets : [];
3377
+ const vectorSetsPassed = Array.isArray(evidencePacket.vector_sets_passed) ? evidencePacket.vector_sets_passed : [];
3378
+ const rejectionCodes = [];
3379
+
3380
+ if (!candidate || alreadyImplemented) rejectionCodes.push("reference_language_not_registered");
3381
+ if (!normalizeReferencePromotionString(evidencePacket.candidate_repository_ref)) {
3382
+ rejectionCodes.push("candidate_repository_missing");
3383
+ }
3384
+ if (!requiredVectorSets.every((entry) => vectorSetsPassed.includes(entry))) {
3385
+ rejectionCodes.push("required_vector_set_missing");
3386
+ }
3387
+ if (!normalizeReferencePromotionString(evidencePacket.deterministic_error_code_parity_ref)) {
3388
+ rejectionCodes.push("deterministic_error_code_parity_missing");
3389
+ }
3390
+ if (!normalizeReferencePromotionString(evidencePacket.independent_parser_ref)) {
3391
+ rejectionCodes.push("independent_parser_evidence_missing");
3392
+ }
3393
+ if (!normalizeReferencePromotionString(evidencePacket.signature_crypto_parity_ref)) {
3394
+ rejectionCodes.push("signature_crypto_parity_missing");
3395
+ }
3396
+ if (!normalizeReferencePromotionString(evidencePacket.round_trip_ref)) {
3397
+ rejectionCodes.push("round_trip_evidence_missing");
3398
+ }
3399
+ if (!normalizeReferencePromotionString(evidencePacket.conformance_mark_review_ref)) {
3400
+ rejectionCodes.push("conformance_mark_review_missing");
3401
+ }
3402
+ if (!normalizeReferencePromotionString(evidencePacket.forbidden_claim_review_ref)) {
3403
+ rejectionCodes.push("forbidden_claim_review_missing");
3404
+ }
3405
+ if (evidencePacket.wraps_javascript_runtime === true) {
3406
+ rejectionCodes.push("javascript_wrapper_forbidden");
3407
+ }
3408
+ if (containsReferencePromotionSecretMaterial(evidencePacket)) {
3409
+ rejectionCodes.push("secret_material_forbidden");
3410
+ }
3411
+
3412
+ return {
3413
+ validation_version: "xoonya-native-reference-promotion-evidence-validation-v1",
3414
+ promotion_allowed: rejectionCodes.length === 0,
3415
+ language: language || null,
3416
+ rejection_codes: Array.from(new Set(rejectionCodes)),
3417
+ required_requirements: XNYA_REFERENCE_PROMOTION_REQUIREMENTS.slice(),
3418
+ boundary: "native_reference_promotion_requires_independent_vector_crypto_round_trip_and_conformance_mark_evidence_without_secret_material"
3419
+ };
3420
+ }
3421
+
3422
+ function summarizeXoonyaNativeReferenceImplementationPack() {
3423
+ const pack = buildXoonyaNativeReferenceImplementationPack();
3424
+ return {
3425
+ ok: true,
3426
+ product: pack.product,
3427
+ category: "xoonya-native-reference-implementation-summary",
3428
+ summary_version: "xoonya-native-reference-implementation-summary-v1",
3429
+ standard: pack.standard,
3430
+ canonical_magic: pack.canonical_magic,
3431
+ status: pack.status,
3432
+ implemented_reference_count: pack.implemented_reference_implementations.length,
3433
+ planned_reference_count: pack.planned_reference_candidates.length,
3434
+ candidate_scaffold_count: pack.candidate_scaffolds.length,
3435
+ verified_candidate_scaffold_count: pack.candidate_scaffolds.filter((entry) => entry.status.startsWith("verified_")).length,
3436
+ required_vector_set_count: pack.required_vector_sets.length,
3437
+ required_behavior_count: pack.required_behaviors.length,
3438
+ promotion_gate_count: pack.promotion_gates.length,
3439
+ deterministic_rejection_code_count: pack.deterministic_rejection_codes.length,
3440
+ boundary: pack.boundary,
3441
+ linked_surfaces: pack.linked_surfaces
3442
+ };
3443
+ }
3444
+
3445
+ function buildXoonyaNativeConformanceMarkPack() {
3446
+ const standardization = buildXoonyaNativeStandardizationPack();
3447
+ const atomConformance = summarizeXoonyaNativeAtomConformancePack();
3448
+ const nativeStandard = summarizeXoonyaNativeProofStandard();
3449
+ const hybridReadiness = summarizeXoonyaNativeHybridReadinessPack();
3450
+ return {
3451
+ ok: true,
3452
+ product: "xoonya",
3453
+ category: "xoonya-native-conformance-mark-pack",
3454
+ pack_version: "xoonya-native-conformance-mark-pack-v1",
3455
+ mark: "XNYA-compatible",
3456
+ status: "active",
3457
+ posture: "compatibility_mark_requires_exact_vectors_errors_and_claim_boundaries",
3458
+ standard: standardization.standard,
3459
+ canonical_magic: standardization.canonical_magic,
3460
+ repo_strategy: standardization.repo_strategy,
3461
+ required_spec_versions: [
3462
+ "xoonya-native-proof/v1",
3463
+ "xoonya-native-atom-spec/v1",
3464
+ "xoonya-native-payload-profile/v1",
3465
+ "xoonya-native-line-rate-frame/v1"
3466
+ ],
3467
+ required_artifacts: [
3468
+ "XOONYA_NATIVE_PROOF_FORMAT.md",
3469
+ "XOONYA_NATIVE_ATOM_SPEC.md",
3470
+ "XOONYA_NATIVE_STANDARD_GOVERNANCE.md",
3471
+ "XNYA_CONFORMANCE_MARK.md",
3472
+ "vectors/conformance-vectors.json",
3473
+ "vectors/adversarial-vectors.json",
3474
+ "vectors/native-atom-vectors.json",
3475
+ "vectors/native-payload-profile-vectors.json"
3476
+ ],
3477
+ required_cli_checks: [
3478
+ "xoonya first-run --verify-native --pretty",
3479
+ "xoonya conformance --json",
3480
+ "npm run verify:release-candidate",
3481
+ "npm run verify:service"
3482
+ ],
3483
+ required_surface_checks: [
3484
+ "/v1/proof-center/native-standard",
3485
+ "/v1/proof-center/native-atom-conformance",
3486
+ "/v1/proof-center/native-payload-profile",
3487
+ "/v1/proof-center/native-line-rate-frame",
3488
+ "/v1/proof-center/native-hybrid-readiness",
3489
+ "/v1/proof-center/native-conformance-mark"
3490
+ ],
3491
+ claim_classes: [
3492
+ {
3493
+ claim: "xnya_atom_compatible",
3494
+ allowed_when: [
3495
+ "canonical_magic_is_XNYA",
3496
+ "atom_version_and_fixed_size_match",
3497
+ "payload_and_identity_hash_derivation_match_vectors",
3498
+ "native_atom_adversarial_vectors_fail_with_stable_error_codes"
3499
+ ]
3500
+ },
3501
+ {
3502
+ claim: "xnya_payload_profile_compatible",
3503
+ allowed_when: [
3504
+ "binary_magic_is_XNYP",
3505
+ "field_ordering_and_fixed_width_integer_rules_match_profile",
3506
+ "unknown_field_policy_is_explicit",
3507
+ "loose_json_float_and_implicit_type_semantics_are_not_used"
3508
+ ]
3509
+ },
3510
+ {
3511
+ claim: "xnya_native_proof_compatible",
3512
+ allowed_when: [
3513
+ "registered_native_methods_verify",
3514
+ "algorithm_none_is_rejected",
3515
+ "signature_suite_is_declared_and_registered",
3516
+ "anchor_binding_is_verified_without_external_finality_overclaim"
3517
+ ]
3518
+ },
3519
+ {
3520
+ claim: "xnya_external_interop_compatible",
3521
+ allowed_when: [
3522
+ "external_envelope_is_bound_to_canonical_receipt",
3523
+ "issuer_or_signature_truth_is_left_to_declared_external_verifier",
3524
+ "method_boundary_is_machine_readable"
3525
+ ]
3526
+ }
3527
+ ],
3528
+ forbidden_claims_without_extra_evidence: [
3529
+ {
3530
+ claim: "pqc_or_hybrid_verified",
3531
+ required_extra_evidence: [
3532
+ "non_experimental_runtime_validator",
3533
+ "suite_specific_public_key_rules",
3534
+ "positive_conformance_vectors",
3535
+ "adversarial_downgrade_vectors",
3536
+ "deterministic_error_codes"
3537
+ ],
3538
+ current_state: hybridReadiness.status
3539
+ },
3540
+ {
3541
+ claim: "live_external_framework_provider",
3542
+ required_extra_evidence: [
3543
+ "real_external_endpoint",
3544
+ "auth_and_secret_boundary",
3545
+ "health_and_tool_catalog_checks",
3546
+ "failure_behavior",
3547
+ "latency_and_live_execution_evidence"
3548
+ ],
3549
+ current_state: "not_a_xoonya_native_mark_claim"
3550
+ },
3551
+ {
3552
+ claim: "external_chain_or_provider_truth_verified_by_xoonya",
3553
+ required_extra_evidence: [
3554
+ "declared_external_verifier",
3555
+ "verifier_policy",
3556
+ "verifier_result_binding",
3557
+ "replayable_verifier_evidence"
3558
+ ],
3559
+ current_state: "anchor_binding_only"
3560
+ }
3561
+ ],
3562
+ conformance_floor: {
3563
+ native_method_count: nativeStandard.current_native_method_count,
3564
+ implemented_signature_suites: nativeStandard.implemented_signature_suites,
3565
+ native_atom_error_code_count: atomConformance.deterministic_error_code_count,
3566
+ conformance_requirement_count: atomConformance.conformance_requirement_count,
3567
+ adversarial_vector_category_count: atomConformance.adversarial_vector_category_count
3568
+ },
3569
+ mark_usage_rules: [
3570
+ "do_not_change_magic_layout_or_fixed_sizes_and_keep_the_mark",
3571
+ "do_not_claim_pqc_hybrid_or_live_external_truth_without_extra_evidence",
3572
+ "do_not_accept_algorithm_none_as_production_proof",
3573
+ "do_not_remove_adversarial_failures_from_compatibility_evidence",
3574
+ "do_not_use_the_mark_for_identity_auth_custody_transport_or_settlement_claims"
3575
+ ],
3576
+ governance_rule: "new_mark_claims_require_vectors_error_codes_docs_and_release_candidate_checks_before_public_use",
3577
+ linked_surfaces: {
3578
+ native_standard_ref: "/v1/proof-center/native-standard",
3579
+ native_standardization_ref: "/v1/proof-center/native-standardization",
3580
+ native_conformance_mark_summary_ref: "/v1/proof-center/native-conformance-mark/summary",
3581
+ native_atom_conformance_ref: "/v1/proof-center/native-atom-conformance",
3582
+ native_hybrid_readiness_ref: "/v1/proof-center/native-hybrid-readiness"
3583
+ }
3584
+ };
3585
+ }
3586
+
3587
+ function summarizeXoonyaNativeConformanceMarkPack() {
3588
+ const pack = buildXoonyaNativeConformanceMarkPack();
3589
+ return {
3590
+ ok: true,
3591
+ product: pack.product,
3592
+ category: "xoonya-native-conformance-mark-summary",
3593
+ summary_version: "xoonya-native-conformance-mark-summary-v1",
3594
+ mark: pack.mark,
3595
+ status: pack.status,
3596
+ posture: pack.posture,
3597
+ standard: pack.standard,
3598
+ canonical_magic: pack.canonical_magic,
3599
+ required_spec_version_count: pack.required_spec_versions.length,
3600
+ required_artifact_count: pack.required_artifacts.length,
3601
+ required_cli_check_count: pack.required_cli_checks.length,
3602
+ required_surface_check_count: pack.required_surface_checks.length,
3603
+ claim_class_count: pack.claim_classes.length,
3604
+ forbidden_claim_count: pack.forbidden_claims_without_extra_evidence.length,
3605
+ native_atom_error_code_count: pack.conformance_floor.native_atom_error_code_count,
3606
+ implemented_signature_suites: pack.conformance_floor.implemented_signature_suites,
3607
+ governance_rule: pack.governance_rule,
3608
+ linked_surfaces: pack.linked_surfaces
3609
+ };
3610
+ }
3611
+
3015
3612
  function buildXoonyaNativeAnchorProfile() {
3016
3613
  return {
3017
3614
  ok: true,
@@ -5207,6 +5804,9 @@ module.exports = {
5207
5804
  buildXoonyaNativeLineRateFramePack,
5208
5805
  buildXoonyaNativePayloadProfilePack,
5209
5806
  buildXoonyaNativeStandardizationPack,
5807
+ buildXoonyaNativeConformanceMarkPack,
5808
+ buildXoonyaNativeReferenceImplementationPack,
5809
+ validateXoonyaNativeReferencePromotionEvidence,
5210
5810
  buildXoonyaNativeAtomSpec,
5211
5811
  buildXoonyaNativeAtomConformancePack,
5212
5812
  buildXoonyaNativeProofStandard,
@@ -5220,6 +5820,7 @@ module.exports = {
5220
5820
  canonicalizeInteractionResultPackageHandoff,
5221
5821
  canonicalizeInteractionSpineProofHandoff,
5222
5822
  normalizeExternalProofImport,
5823
+ validateExternalProofImportEvidence,
5223
5824
  getDefaultProofLoop,
5224
5825
  canonicalizeTransactionProofHandoff,
5225
5826
  runDefaultProofLoop,
@@ -5279,6 +5880,8 @@ module.exports = {
5279
5880
  summarizeXoonyaNativeLineRateFramePack,
5280
5881
  summarizeXoonyaNativePayloadProfilePack,
5281
5882
  summarizeXoonyaNativeStandardizationPack,
5883
+ summarizeXoonyaNativeConformanceMarkPack,
5884
+ summarizeXoonyaNativeReferenceImplementationPack,
5282
5885
  summarizeXoonyaNativeAtomSpec,
5283
5886
  summarizeXoonyaNativeAtomConformancePack,
5284
5887
  summarizeXoonyaNativeProofStandard,