@c4a/context 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/docs/getting-started.md +30 -24
- package/docs/guides/agent-guide.md +41 -46
- package/docs/reference/code-extractors.md +7 -22
- package/docs/reference/indexer-provider-protocol.md +17 -28
- package/docs/reference/project-api.md +39 -38
- package/index.d.ts +2 -2
- package/index.js +127 -349
- package/indexerArtifactResult.d.ts +2 -3
- package/indexerCandidateCompile.d.ts +184 -0
- package/{indexerOverlayTrust.d.ts → indexerContractOverlay.d.ts} +13 -559
- package/indexerOverlayQuestionAmendment.d.ts +6 -6
- package/indexerOverlayQuestionApplyProposal.d.ts +8 -8
- package/indexerProvider.d.ts +0 -63
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -12688,11 +12688,6 @@ var indexerPartitionStrategyDeclarationSchema = exports_external.object({
|
|
|
12688
12688
|
}).strict().superRefine((value, context) => {
|
|
12689
12689
|
addDuplicateIssues(value.profiles, context, "partition strategy profiles");
|
|
12690
12690
|
});
|
|
12691
|
-
var overlayAttestationResourceSchema = exports_external.object({
|
|
12692
|
-
protocol: exports_external.literal("context.indexer.overlay-attestation/v1"),
|
|
12693
|
-
resource: portableIndexerPathSchema,
|
|
12694
|
-
integrity: indexerDigestSchema
|
|
12695
|
-
}).strict();
|
|
12696
12691
|
var contractOverlayResourceSchema = exports_external.object({
|
|
12697
12692
|
id: indexerIdSchema,
|
|
12698
12693
|
protocol: exports_external.literal("context.indexer.contract-overlay/v1"),
|
|
@@ -12701,8 +12696,7 @@ var contractOverlayResourceSchema = exports_external.object({
|
|
|
12701
12696
|
version: indexerSemverSchema
|
|
12702
12697
|
}).strict(),
|
|
12703
12698
|
resource: portableIndexerPathSchema,
|
|
12704
|
-
integrity: indexerDigestSchema
|
|
12705
|
-
attestation: overlayAttestationResourceSchema.optional()
|
|
12699
|
+
integrity: indexerDigestSchema
|
|
12706
12700
|
}).strict();
|
|
12707
12701
|
var providesSchema = exports_external.object({
|
|
12708
12702
|
profiles: exports_external.array(indexerIdSchema).min(1),
|
|
@@ -12943,10 +12937,7 @@ function referencedProviderPaths(manifest) {
|
|
|
12943
12937
|
...manifest.provider.config_schema === undefined ? [] : [manifest.provider.config_schema],
|
|
12944
12938
|
...manifest.customization?.guide === undefined ? [] : [manifest.customization.guide],
|
|
12945
12939
|
...manifest.quality_guidance?.repair === undefined ? [] : [manifest.quality_guidance.repair],
|
|
12946
|
-
...(manifest.provides.contract_overlays ?? []).
|
|
12947
|
-
overlay.resource,
|
|
12948
|
-
...overlay.attestation === undefined ? [] : [overlay.attestation.resource]
|
|
12949
|
-
])
|
|
12940
|
+
...(manifest.provides.contract_overlays ?? []).map((overlay) => overlay.resource)
|
|
12950
12941
|
];
|
|
12951
12942
|
}
|
|
12952
12943
|
async function assertBundleFile(bundleRoot, path) {
|
|
@@ -15786,7 +15777,7 @@ function assertIndexerGeneratedAuthoringAuditClear(audit) {
|
|
|
15786
15777
|
}
|
|
15787
15778
|
|
|
15788
15779
|
// src/indexerArtifactResult.ts
|
|
15789
|
-
var
|
|
15780
|
+
var indexerEvidenceBindingSchema = exports_external.object({
|
|
15790
15781
|
evidence_ref: indexerCanonicalRefSchema,
|
|
15791
15782
|
kind: exports_external.enum(INDEXER_EVIDENCE_KINDS),
|
|
15792
15783
|
source_ref: indexerCanonicalRefSchema,
|
|
@@ -15925,7 +15916,7 @@ var indexerArtifactResultSchema = exports_external.object({
|
|
|
15925
15916
|
structured_declarations: indexerStructuredDeclarationSetSchema.optional(),
|
|
15926
15917
|
structured_claims: indexerStructuredClaimSetSchema.optional(),
|
|
15927
15918
|
facts: exports_external.array(indexerArtifactFactSchema),
|
|
15928
|
-
evidence_bindings: exports_external.array(
|
|
15919
|
+
evidence_bindings: exports_external.array(indexerEvidenceBindingSchema),
|
|
15929
15920
|
artifacts: exports_external.array(artifactSchema),
|
|
15930
15921
|
artifact_bundle: indexerArtifactBundleSchema.nullable(),
|
|
15931
15922
|
material_question_proposals: exports_external.array(materialQuestionProposalSchema),
|
|
@@ -16154,6 +16145,8 @@ function validateTargetResolution(result, view, evidenceRefs) {
|
|
|
16154
16145
|
if (canonicalIndexerNodeRef(disposition.subject_key) === (entry.state === "resolved" ? entry.node_ref : "")) {
|
|
16155
16146
|
throw new TypeError("index-target-resolution-invalid: create-independent must introduce a distinct SubjectKey");
|
|
16156
16147
|
}
|
|
16148
|
+
} else if (entry.state !== "absent") {
|
|
16149
|
+
throw new TypeError("index-target-resolution-invalid: resolved targets cannot be reported as unavailable");
|
|
16157
16150
|
}
|
|
16158
16151
|
}
|
|
16159
16152
|
}
|
|
@@ -21328,10 +21321,7 @@ var indexerMaterialAnswerEvidenceCompatibilitySchema = exports_external.discrimi
|
|
|
21328
21321
|
incompatibleEvidenceSchema
|
|
21329
21322
|
]);
|
|
21330
21323
|
function indexerMaterialAnswerSourceInputSetDigest(sourceInputDigests) {
|
|
21331
|
-
const digests = sourceInputDigests.map((digest) => indexerDigestSchema.parse(digest)).sort(compareIndexerCanonicalText);
|
|
21332
|
-
if (new Set(digests).size !== digests.length) {
|
|
21333
|
-
throw new TypeError("material-answer source input digests must be unique");
|
|
21334
|
-
}
|
|
21324
|
+
const digests = [...new Set(sourceInputDigests.map((digest) => indexerDigestSchema.parse(digest)))].sort(compareIndexerCanonicalText);
|
|
21335
21325
|
return indexerProtocolDigest({ inputs: digests });
|
|
21336
21326
|
}
|
|
21337
21327
|
function compatibilityPayload(report) {
|
|
@@ -25368,8 +25358,7 @@ function validateIndexerProviderSelectionProposal(value) {
|
|
|
25368
25358
|
}
|
|
25369
25359
|
return proposal;
|
|
25370
25360
|
}
|
|
25371
|
-
// src/
|
|
25372
|
-
import { createPublicKey, verify } from "node:crypto";
|
|
25361
|
+
// src/indexerContractOverlay.ts
|
|
25373
25362
|
var minimumTighteningSchema = exports_external.object({
|
|
25374
25363
|
metric_ref: indexerIdSchema,
|
|
25375
25364
|
direction: exports_external.literal("minimum"),
|
|
@@ -25599,306 +25588,61 @@ function validateIndexerContractOverlay(input) {
|
|
|
25599
25588
|
report: { ...reportPayload4, report_digest: reportDigest(reportPayload4) }
|
|
25600
25589
|
};
|
|
25601
25590
|
}
|
|
25602
|
-
var
|
|
25603
|
-
|
|
25604
|
-
protocol: exports_external.literal("context.indexer.overlay-attestation/v1"),
|
|
25605
|
-
overlay: exports_external.object({
|
|
25606
|
-
protocol: exports_external.literal("context.indexer.contract-overlay/v1"),
|
|
25607
|
-
id: indexerIdSchema,
|
|
25608
|
-
version: indexerSemverSchema,
|
|
25609
|
-
digest: indexerDigestSchema
|
|
25610
|
-
}).strict(),
|
|
25611
|
-
base: exports_external.object({
|
|
25612
|
-
profile: indexerIdSchema,
|
|
25613
|
-
version: indexerSemverSchema,
|
|
25614
|
-
contract_digest: indexerDigestSchema
|
|
25615
|
-
}).strict(),
|
|
25616
|
-
operator_contract: exports_external.object({
|
|
25617
|
-
version: indexerSemverSchema,
|
|
25618
|
-
digest: indexerDigestSchema
|
|
25619
|
-
}).strict(),
|
|
25620
|
-
issuer: indexerIdSchema,
|
|
25621
|
-
key_id: indexerIdSchema,
|
|
25622
|
-
algorithm: exports_external.literal("ed25519"),
|
|
25623
|
-
signature: base64Schema,
|
|
25624
|
-
attestation_digest: indexerDigestSchema
|
|
25625
|
-
}).strict();
|
|
25626
|
-
function indexerOverlayAttestationSigningPayload(attestation) {
|
|
25627
|
-
return canonicalIndexerJson(attestation);
|
|
25628
|
-
}
|
|
25629
|
-
function indexerOverlayAttestationDigest(attestation) {
|
|
25630
|
-
return indexerProtocolDigest(attestation);
|
|
25631
|
-
}
|
|
25632
|
-
var trustKeySchema = exports_external.object({
|
|
25633
|
-
key_id: indexerIdSchema,
|
|
25634
|
-
algorithm: exports_external.literal("ed25519"),
|
|
25635
|
-
public_key: base64Schema,
|
|
25636
|
-
not_before: exports_external.string().datetime({ offset: true }),
|
|
25637
|
-
not_after: exports_external.string().datetime({ offset: true })
|
|
25638
|
-
}).strict();
|
|
25639
|
-
var indexerOverlayTrustBundleSchema = exports_external.object({
|
|
25640
|
-
protocol: exports_external.literal("context.indexer.overlay-trust-bundle/v1"),
|
|
25641
|
-
policy_id: indexerIdSchema,
|
|
25642
|
-
policy_version: indexerSemverSchema,
|
|
25643
|
-
issuers: exports_external.array(exports_external.object({
|
|
25644
|
-
id: indexerIdSchema,
|
|
25645
|
-
keys: exports_external.array(trustKeySchema).min(1)
|
|
25646
|
-
}).strict()).min(1),
|
|
25647
|
-
revocations: exports_external.array(exports_external.object({
|
|
25648
|
-
issuer: indexerIdSchema,
|
|
25649
|
-
key_id: indexerIdSchema,
|
|
25650
|
-
revoked_at: exports_external.string().datetime({ offset: true })
|
|
25651
|
-
}).strict()),
|
|
25652
|
-
policy_digest: indexerDigestSchema
|
|
25653
|
-
}).strict().superRefine((value, context) => {
|
|
25654
|
-
const issuerIds = new Set;
|
|
25655
|
-
const trustedKeys = new Set;
|
|
25656
|
-
value.issuers.forEach((issuer, issuerIndex) => {
|
|
25657
|
-
if (issuerIds.has(issuer.id)) {
|
|
25658
|
-
context.addIssue({
|
|
25659
|
-
code: exports_external.ZodIssueCode.custom,
|
|
25660
|
-
message: `duplicate issuer ${issuer.id}`,
|
|
25661
|
-
path: ["issuers", issuerIndex, "id"]
|
|
25662
|
-
});
|
|
25663
|
-
}
|
|
25664
|
-
issuerIds.add(issuer.id);
|
|
25665
|
-
const keyIds = new Set;
|
|
25666
|
-
issuer.keys.forEach((key, keyIndex) => {
|
|
25667
|
-
if (keyIds.has(key.key_id)) {
|
|
25668
|
-
context.addIssue({
|
|
25669
|
-
code: exports_external.ZodIssueCode.custom,
|
|
25670
|
-
message: `duplicate key ${issuer.id}:${key.key_id}`,
|
|
25671
|
-
path: ["issuers", issuerIndex, "keys", keyIndex, "key_id"]
|
|
25672
|
-
});
|
|
25673
|
-
}
|
|
25674
|
-
keyIds.add(key.key_id);
|
|
25675
|
-
trustedKeys.add(`${issuer.id}\x00${key.key_id}`);
|
|
25676
|
-
if (Date.parse(key.not_before) >= Date.parse(key.not_after)) {
|
|
25677
|
-
context.addIssue({
|
|
25678
|
-
code: exports_external.ZodIssueCode.custom,
|
|
25679
|
-
message: "key not_before must precede not_after",
|
|
25680
|
-
path: ["issuers", issuerIndex, "keys", keyIndex, "not_after"]
|
|
25681
|
-
});
|
|
25682
|
-
}
|
|
25683
|
-
});
|
|
25684
|
-
});
|
|
25685
|
-
const revocations = new Set;
|
|
25686
|
-
value.revocations.forEach((revocation, index) => {
|
|
25687
|
-
const ref = `${revocation.issuer}\x00${revocation.key_id}`;
|
|
25688
|
-
if (!trustedKeys.has(ref)) {
|
|
25689
|
-
context.addIssue({
|
|
25690
|
-
code: exports_external.ZodIssueCode.custom,
|
|
25691
|
-
message: "revocation references an unknown trusted key",
|
|
25692
|
-
path: ["revocations", index]
|
|
25693
|
-
});
|
|
25694
|
-
}
|
|
25695
|
-
if (revocations.has(ref)) {
|
|
25696
|
-
context.addIssue({
|
|
25697
|
-
code: exports_external.ZodIssueCode.custom,
|
|
25698
|
-
message: "duplicate revocation",
|
|
25699
|
-
path: ["revocations", index]
|
|
25700
|
-
});
|
|
25701
|
-
}
|
|
25702
|
-
revocations.add(ref);
|
|
25703
|
-
});
|
|
25704
|
-
});
|
|
25705
|
-
function indexerOverlayTrustBundleDigest(bundle) {
|
|
25706
|
-
return indexerProtocolDigest(bundle);
|
|
25707
|
-
}
|
|
25708
|
-
var indexerOverlayTrustBundleEnvelopeSchema = exports_external.object({
|
|
25709
|
-
protocol: exports_external.literal("context.indexer.overlay-trust-bundle-envelope/v1"),
|
|
25710
|
-
adapter: indexerIdSchema,
|
|
25711
|
-
adapter_version: indexerSemverSchema,
|
|
25712
|
-
management_authority_digest: indexerDigestSchema,
|
|
25713
|
-
bundle: indexerOverlayTrustBundleSchema
|
|
25714
|
-
}).strict();
|
|
25715
|
-
var enterpriseTrustReceiptSchema = exports_external.object({
|
|
25716
|
-
protocol: exports_external.literal("context.indexer.overlay-trust-receipt/v1"),
|
|
25717
|
-
trust_class: exports_external.literal("enterprise-signed"),
|
|
25718
|
-
project_ref: exports_external.null(),
|
|
25719
|
-
overlay_digest: indexerDigestSchema,
|
|
25720
|
-
attestation_digest: indexerDigestSchema,
|
|
25721
|
-
base_contract_digest: indexerDigestSchema,
|
|
25722
|
-
provider_integrity: indexerDigestSchema,
|
|
25723
|
-
operator_contract_digest: indexerDigestSchema,
|
|
25724
|
-
conformance_report_digest: indexerDigestSchema,
|
|
25725
|
-
trust_adapter: indexerIdSchema,
|
|
25726
|
-
trust_adapter_version: indexerSemverSchema,
|
|
25727
|
-
trust_management_authority_digest: indexerDigestSchema,
|
|
25728
|
-
trust_policy_digest: indexerDigestSchema,
|
|
25729
|
-
authorization_receipt_digest: exports_external.null(),
|
|
25730
|
-
receipt_digest: indexerDigestSchema
|
|
25731
|
-
}).strict();
|
|
25732
|
-
var projectTrustReceiptSchema = exports_external.object({
|
|
25733
|
-
protocol: exports_external.literal("context.indexer.overlay-trust-receipt/v1"),
|
|
25734
|
-
trust_class: exports_external.literal("project-authorized-exact-digest"),
|
|
25591
|
+
var indexerOverlayValidationReceiptSchema = exports_external.object({
|
|
25592
|
+
protocol: exports_external.literal("context.indexer.overlay-validation-receipt/v1"),
|
|
25735
25593
|
project_ref: exports_external.string().min(1),
|
|
25736
25594
|
overlay_digest: indexerDigestSchema,
|
|
25737
|
-
attestation_digest: indexerDigestSchema.nullable(),
|
|
25738
25595
|
base_contract_digest: indexerDigestSchema,
|
|
25739
25596
|
provider_integrity: indexerDigestSchema,
|
|
25740
25597
|
operator_contract_digest: indexerDigestSchema,
|
|
25741
25598
|
conformance_report_digest: indexerDigestSchema,
|
|
25742
|
-
trust_adapter: exports_external.null(),
|
|
25743
|
-
trust_adapter_version: exports_external.null(),
|
|
25744
|
-
trust_management_authority_digest: exports_external.null(),
|
|
25745
|
-
trust_policy_digest: exports_external.null(),
|
|
25746
|
-
authorization_receipt_digest: indexerDigestSchema,
|
|
25747
25599
|
receipt_digest: indexerDigestSchema
|
|
25748
25600
|
}).strict();
|
|
25749
|
-
|
|
25750
|
-
enterpriseTrustReceiptSchema,
|
|
25751
|
-
projectTrustReceiptSchema
|
|
25752
|
-
]);
|
|
25753
|
-
function indexerOverlayTrustReceiptDigest(receipt) {
|
|
25601
|
+
function indexerOverlayValidationReceiptDigest(receipt) {
|
|
25754
25602
|
return indexerProtocolDigest(receipt);
|
|
25755
25603
|
}
|
|
25756
|
-
function
|
|
25757
|
-
const
|
|
25758
|
-
const
|
|
25759
|
-
if (indexerOverlayAttestationDigest(payload2) !== parsed.attestation_digest) {
|
|
25760
|
-
throw new TypeError("overlay attestation digest does not match its canonical payload");
|
|
25761
|
-
}
|
|
25762
|
-
if (parsed.overlay.id !== overlay.id || parsed.overlay.version !== overlay.version || parsed.overlay.digest !== overlay.overlay_digest || parsed.base.profile !== overlay.extends.profile || parsed.base.version !== base.version || parsed.base.contract_digest !== base.contract_digest || parsed.operator_contract.version !== operators.version || parsed.operator_contract.digest !== operators.contract_digest) {
|
|
25763
|
-
throw new TypeError("overlay attestation is bound to another contract payload");
|
|
25764
|
-
}
|
|
25765
|
-
return parsed;
|
|
25766
|
-
}
|
|
25767
|
-
function validateIndexerOverlayTrustBundleEnvelope(value) {
|
|
25768
|
-
const envelope = indexerOverlayTrustBundleEnvelopeSchema.parse(value);
|
|
25769
|
-
const payload2 = withoutFields(envelope.bundle, ["policy_digest"]);
|
|
25770
|
-
if (indexerOverlayTrustBundleDigest(payload2) !== envelope.bundle.policy_digest) {
|
|
25771
|
-
throw new TypeError("overlay trust bundle digest does not match its canonical payload");
|
|
25772
|
-
}
|
|
25773
|
-
return envelope;
|
|
25774
|
-
}
|
|
25775
|
-
function revalidateOverlayResult(input) {
|
|
25604
|
+
function createIndexerOverlayValidationReceipt(input) {
|
|
25605
|
+
const projectRef = exports_external.string().min(1).parse(input.projectRef);
|
|
25606
|
+
const providerIntegrity = indexerDigestSchema.parse(input.providerIntegrity);
|
|
25776
25607
|
const validation = validateIndexerContractOverlay({
|
|
25777
25608
|
overlay: input.overlayValidation.overlay,
|
|
25778
|
-
baseContract: input.
|
|
25779
|
-
operatorContract: input.
|
|
25609
|
+
baseContract: input.baseContract,
|
|
25610
|
+
operatorContract: input.operatorContract
|
|
25780
25611
|
});
|
|
25781
|
-
if (validation.report
|
|
25612
|
+
if (canonicalIndexerJson(validation.report) !== canonicalIndexerJson(input.overlayValidation.report)) {
|
|
25782
25613
|
throw new TypeError("overlay conformance report is not the canonical current report");
|
|
25783
25614
|
}
|
|
25784
|
-
|
|
25785
|
-
|
|
25786
|
-
|
|
25787
|
-
const now = input.now ?? new Date;
|
|
25788
|
-
const operators = validateIndexerOperatorContract(input.operatorContract);
|
|
25789
|
-
const base = validateIndexerProfileContract(input.baseContract, operators);
|
|
25790
|
-
const validation = revalidateOverlayResult({
|
|
25791
|
-
overlayValidation: input.overlayValidation,
|
|
25792
|
-
base,
|
|
25793
|
-
operators
|
|
25794
|
-
});
|
|
25795
|
-
const attestation = validateIndexerOverlayAttestation(input.attestation, validation.overlay, base, operators);
|
|
25796
|
-
const trustEnvelope = validateIndexerOverlayTrustBundleEnvelope(input.trustBundleEnvelope);
|
|
25797
|
-
const issuer = trustEnvelope.bundle.issuers.find((item) => item.id === attestation.issuer);
|
|
25798
|
-
const key = issuer?.keys.find((item) => item.key_id === attestation.key_id);
|
|
25799
|
-
if (key === undefined) {
|
|
25800
|
-
throw new TypeError("overlay attestation issuer or key is not trusted");
|
|
25801
|
-
}
|
|
25802
|
-
const nowMs = now.getTime();
|
|
25803
|
-
if (Date.parse(key.not_before) > nowMs || Date.parse(key.not_after) <= nowMs) {
|
|
25804
|
-
throw new TypeError("overlay attestation key is outside its validity window");
|
|
25805
|
-
}
|
|
25806
|
-
const revoked = trustEnvelope.bundle.revocations.some((revocation) => revocation.issuer === attestation.issuer && revocation.key_id === attestation.key_id && Date.parse(revocation.revoked_at) <= nowMs);
|
|
25807
|
-
if (revoked)
|
|
25808
|
-
throw new TypeError("overlay attestation key has been revoked");
|
|
25809
|
-
const signingPayload = withoutFields(attestation, ["signature", "attestation_digest"]);
|
|
25810
|
-
const publicKey = createPublicKey({
|
|
25811
|
-
key: Buffer.from(key.public_key, "base64"),
|
|
25812
|
-
format: "der",
|
|
25813
|
-
type: "spki"
|
|
25814
|
-
});
|
|
25815
|
-
const verified = verify(null, Buffer.from(indexerOverlayAttestationSigningPayload(signingPayload)), publicKey, Buffer.from(attestation.signature, "base64"));
|
|
25816
|
-
if (!verified)
|
|
25817
|
-
throw new TypeError("overlay attestation signature is invalid");
|
|
25818
|
-
const receiptPayload = {
|
|
25819
|
-
protocol: "context.indexer.overlay-trust-receipt/v1",
|
|
25820
|
-
trust_class: "enterprise-signed",
|
|
25821
|
-
project_ref: null,
|
|
25615
|
+
const payload2 = {
|
|
25616
|
+
protocol: "context.indexer.overlay-validation-receipt/v1",
|
|
25617
|
+
project_ref: projectRef,
|
|
25822
25618
|
overlay_digest: validation.overlay.overlay_digest,
|
|
25823
|
-
|
|
25824
|
-
|
|
25825
|
-
|
|
25826
|
-
|
|
25827
|
-
conformance_report_digest: validation.report.report_digest,
|
|
25828
|
-
trust_adapter: trustEnvelope.adapter,
|
|
25829
|
-
trust_adapter_version: trustEnvelope.adapter_version,
|
|
25830
|
-
trust_management_authority_digest: trustEnvelope.management_authority_digest,
|
|
25831
|
-
trust_policy_digest: trustEnvelope.bundle.policy_digest,
|
|
25832
|
-
authorization_receipt_digest: null
|
|
25619
|
+
base_contract_digest: validation.report.base_contract_digest,
|
|
25620
|
+
provider_integrity: providerIntegrity,
|
|
25621
|
+
operator_contract_digest: validation.report.operator_contract_digest,
|
|
25622
|
+
conformance_report_digest: validation.report.report_digest
|
|
25833
25623
|
};
|
|
25834
|
-
return
|
|
25835
|
-
...
|
|
25836
|
-
receipt_digest:
|
|
25624
|
+
return indexerOverlayValidationReceiptSchema.parse({
|
|
25625
|
+
...payload2,
|
|
25626
|
+
receipt_digest: indexerOverlayValidationReceiptDigest(payload2)
|
|
25837
25627
|
});
|
|
25838
25628
|
}
|
|
25839
|
-
|
|
25840
|
-
|
|
25841
|
-
|
|
25842
|
-
|
|
25843
|
-
|
|
25844
|
-
|
|
25845
|
-
|
|
25846
|
-
operator_contract_digest: indexerDigestSchema,
|
|
25847
|
-
conformance_report_digest: indexerDigestSchema,
|
|
25848
|
-
authority_ref: exports_external.string().min(1),
|
|
25849
|
-
authority_scope_digest: indexerDigestSchema,
|
|
25850
|
-
authorization_receipt_digest: indexerDigestSchema
|
|
25851
|
-
}).strict();
|
|
25852
|
-
function indexerOverlayProjectAuthorizationDigest(authorization) {
|
|
25853
|
-
return indexerProtocolDigest(authorization);
|
|
25854
|
-
}
|
|
25855
|
-
function authorizeProjectIndexerOverlay(input) {
|
|
25856
|
-
const operators = validateIndexerOperatorContract(input.operatorContract);
|
|
25857
|
-
const base = validateIndexerProfileContract(input.baseContract, operators);
|
|
25858
|
-
const validation = revalidateOverlayResult({
|
|
25629
|
+
function validateIndexerOverlayValidationReceipt(input) {
|
|
25630
|
+
const receipt = indexerOverlayValidationReceiptSchema.parse(input.value);
|
|
25631
|
+
const payload2 = withoutFields(receipt, ["receipt_digest"]);
|
|
25632
|
+
if (indexerOverlayValidationReceiptDigest(payload2) !== receipt.receipt_digest) {
|
|
25633
|
+
throw new TypeError("overlay validation receipt digest is invalid");
|
|
25634
|
+
}
|
|
25635
|
+
const expected = createIndexerOverlayValidationReceipt({
|
|
25859
25636
|
overlayValidation: input.overlayValidation,
|
|
25860
|
-
|
|
25861
|
-
|
|
25637
|
+
baseContract: input.baseContract,
|
|
25638
|
+
operatorContract: input.operatorContract,
|
|
25639
|
+
providerIntegrity: input.providerIntegrity,
|
|
25640
|
+
projectRef: input.projectRef
|
|
25862
25641
|
});
|
|
25863
|
-
|
|
25864
|
-
|
|
25865
|
-
if (indexerOverlayProjectAuthorizationDigest(payload2) !== authorization.authorization_receipt_digest) {
|
|
25866
|
-
throw new TypeError("overlay project authorization receipt digest is invalid");
|
|
25642
|
+
if (canonicalIndexerJson(expected) !== canonicalIndexerJson(receipt)) {
|
|
25643
|
+
throw new TypeError("overlay validation receipt is stale or bound to another validation");
|
|
25867
25644
|
}
|
|
25868
|
-
|
|
25869
|
-
project_ref: input.projectRef,
|
|
25870
|
-
overlay_digest: validation.overlay.overlay_digest,
|
|
25871
|
-
attestation_digest: input.declaredAttestationDigest,
|
|
25872
|
-
base_contract_digest: base.contract_digest,
|
|
25873
|
-
provider_integrity: input.providerIntegrity,
|
|
25874
|
-
operator_contract_digest: operators.contract_digest,
|
|
25875
|
-
conformance_report_digest: validation.report.report_digest
|
|
25876
|
-
};
|
|
25877
|
-
for (const [field, value] of Object.entries(expected)) {
|
|
25878
|
-
if (authorization[field] !== value) {
|
|
25879
|
-
throw new TypeError(`overlay project authorization does not match ${field}`);
|
|
25880
|
-
}
|
|
25881
|
-
}
|
|
25882
|
-
const receiptPayload = {
|
|
25883
|
-
protocol: "context.indexer.overlay-trust-receipt/v1",
|
|
25884
|
-
trust_class: "project-authorized-exact-digest",
|
|
25885
|
-
project_ref: input.projectRef,
|
|
25886
|
-
overlay_digest: input.overlayValidation.overlay.overlay_digest,
|
|
25887
|
-
attestation_digest: input.declaredAttestationDigest,
|
|
25888
|
-
base_contract_digest: base.contract_digest,
|
|
25889
|
-
provider_integrity: input.providerIntegrity,
|
|
25890
|
-
operator_contract_digest: operators.contract_digest,
|
|
25891
|
-
conformance_report_digest: input.overlayValidation.report.report_digest,
|
|
25892
|
-
trust_adapter: null,
|
|
25893
|
-
trust_adapter_version: null,
|
|
25894
|
-
trust_management_authority_digest: null,
|
|
25895
|
-
trust_policy_digest: null,
|
|
25896
|
-
authorization_receipt_digest: authorization.authorization_receipt_digest
|
|
25897
|
-
};
|
|
25898
|
-
return indexerOverlayTrustReceiptSchema.parse({
|
|
25899
|
-
...receiptPayload,
|
|
25900
|
-
receipt_digest: indexerOverlayTrustReceiptDigest(receiptPayload)
|
|
25901
|
-
});
|
|
25645
|
+
return receipt;
|
|
25902
25646
|
}
|
|
25903
25647
|
// src/indexerOverlayQuestionAmendment.ts
|
|
25904
25648
|
var comparisonChangeSchema = exports_external.object({
|
|
@@ -25956,7 +25700,7 @@ var indexerOverlayQuestionAmendmentSchema = exports_external.object({
|
|
|
25956
25700
|
target_registry: indexerRegistrySchema,
|
|
25957
25701
|
target_registry_digest: indexerDigestSchema,
|
|
25958
25702
|
overlay_digest: indexerDigestSchema,
|
|
25959
|
-
|
|
25703
|
+
overlay_validation_receipt_digest: indexerDigestSchema,
|
|
25960
25704
|
conformance_report_digest: indexerDigestSchema,
|
|
25961
25705
|
added_target_domains: exports_external.array(amendmentTargetDomainSchema).min(1),
|
|
25962
25706
|
added_questions: exports_external.array(amendmentQuestionSchema).min(1),
|
|
@@ -25969,10 +25713,10 @@ function withoutDigest2(value, field) {
|
|
|
25969
25713
|
Reflect.deleteProperty(payload2, field);
|
|
25970
25714
|
return payload2;
|
|
25971
25715
|
}
|
|
25972
|
-
function
|
|
25716
|
+
function validationReceiptDigest(receipt) {
|
|
25973
25717
|
const payload2 = withoutDigest2(receipt, "receipt_digest");
|
|
25974
|
-
if (
|
|
25975
|
-
throw new TypeError("overlay
|
|
25718
|
+
if (indexerOverlayValidationReceiptDigest(payload2) !== receipt.receipt_digest) {
|
|
25719
|
+
throw new TypeError("overlay validation receipt digest is invalid");
|
|
25976
25720
|
}
|
|
25977
25721
|
return receipt.receipt_digest;
|
|
25978
25722
|
}
|
|
@@ -26008,12 +25752,9 @@ function assertNamespacedTargetDomain(id) {
|
|
|
26008
25752
|
throw new TypeError("overlay question target-domain ids must be namespaced");
|
|
26009
25753
|
}
|
|
26010
25754
|
}
|
|
26011
|
-
function
|
|
26012
|
-
if (input.receipt.overlay_digest !== input.overlay.overlay_digest || input.receipt.base_contract_digest !== input.base.contract_digest || input.receipt.provider_integrity !== input.providerIntegrity || input.receipt.operator_contract_digest !== input.operators.contract_digest || input.receipt.conformance_report_digest !== input.report.report_digest) {
|
|
26013
|
-
throw new TypeError("overlay
|
|
26014
|
-
}
|
|
26015
|
-
if (input.receipt.trust_class === "project-authorized-exact-digest" && input.receipt.project_ref !== input.projectRef) {
|
|
26016
|
-
throw new TypeError("project overlay trust receipt belongs to another project");
|
|
25755
|
+
function assertValidationReceipt(input) {
|
|
25756
|
+
if (input.receipt.overlay_digest !== input.overlay.overlay_digest || input.receipt.base_contract_digest !== input.base.contract_digest || input.receipt.provider_integrity !== input.providerIntegrity || input.receipt.operator_contract_digest !== input.operators.contract_digest || input.receipt.conformance_report_digest !== input.report.report_digest || input.receipt.project_ref !== input.projectRef) {
|
|
25757
|
+
throw new TypeError("overlay validation receipt is stale or bound to another validation");
|
|
26017
25758
|
}
|
|
26018
25759
|
}
|
|
26019
25760
|
function validateQuestionAdditions(input) {
|
|
@@ -26095,8 +25836,8 @@ function resolveIndexerOverlayQuestionBindingAuthority(input) {
|
|
|
26095
25836
|
if (canonicalIndexerJson(validation.report) !== canonicalIndexerJson(input.proof.overlay_validation.report)) {
|
|
26096
25837
|
throw new TypeError("overlay question authority requires the current conformance report");
|
|
26097
25838
|
}
|
|
26098
|
-
const receipt =
|
|
26099
|
-
|
|
25839
|
+
const receipt = indexerOverlayValidationReceiptSchema.parse(input.proof.validation_receipt);
|
|
25840
|
+
assertValidationReceipt({
|
|
26100
25841
|
receipt,
|
|
26101
25842
|
projectRef: input.proof.project_ref,
|
|
26102
25843
|
providerIntegrity: input.proof.provider_integrity,
|
|
@@ -26105,7 +25846,7 @@ function resolveIndexerOverlayQuestionBindingAuthority(input) {
|
|
|
26105
25846
|
operators: input.operator_contract,
|
|
26106
25847
|
report: validation.report
|
|
26107
25848
|
});
|
|
26108
|
-
|
|
25849
|
+
validationReceiptDigest(receipt);
|
|
26109
25850
|
const authorityRef = overlayAuthorityRef(validation.overlay);
|
|
26110
25851
|
if (binding.authority.ref !== authorityRef || binding.authority.digest !== validation.overlay.overlay_digest) {
|
|
26111
25852
|
throw new TypeError("overlay question binding belongs to another overlay authority");
|
|
@@ -26160,8 +25901,8 @@ function buildIndexerOverlayQuestionAmendment(input) {
|
|
|
26160
25901
|
if (canonicalIndexerJson(validation.report) !== canonicalIndexerJson(input.overlay_validation.report)) {
|
|
26161
25902
|
throw new TypeError("overlay question amendment requires the current conformance report");
|
|
26162
25903
|
}
|
|
26163
|
-
const receipt =
|
|
26164
|
-
|
|
25904
|
+
const receipt = indexerOverlayValidationReceiptSchema.parse(input.validation_receipt);
|
|
25905
|
+
assertValidationReceipt({
|
|
26165
25906
|
receipt,
|
|
26166
25907
|
projectRef: input.project_ref,
|
|
26167
25908
|
providerIntegrity: input.provider_integrity,
|
|
@@ -26206,7 +25947,7 @@ function buildIndexerOverlayQuestionAmendment(input) {
|
|
|
26206
25947
|
target_registry: targetRegistry2,
|
|
26207
25948
|
target_registry_digest: targetDigests.registryDigest,
|
|
26208
25949
|
overlay_digest: validation.overlay.overlay_digest,
|
|
26209
|
-
|
|
25950
|
+
overlay_validation_receipt_digest: validationReceiptDigest(receipt),
|
|
26210
25951
|
conformance_report_digest: validation.report.report_digest,
|
|
26211
25952
|
added_target_domains: additions.targetDomains,
|
|
26212
25953
|
added_questions: additions.questions,
|
|
@@ -26329,7 +26070,7 @@ var indexerOverlayQuestionRegistryApplyProposalSchema = exports_external.object(
|
|
|
26329
26070
|
amendment: indexerOverlayQuestionAmendmentSchema,
|
|
26330
26071
|
confirmation: indexerRequirementAmendmentConfirmationSchema,
|
|
26331
26072
|
overlay_contract_digest: indexerDigestSchema,
|
|
26332
|
-
|
|
26073
|
+
overlay_validation_receipt_digest: indexerDigestSchema,
|
|
26333
26074
|
rebind_receipt_digest: indexerDigestSchema,
|
|
26334
26075
|
rebound_selection_digest: indexerDigestSchema,
|
|
26335
26076
|
subject_key_schema_set_digest: indexerDigestSchema,
|
|
@@ -26428,7 +26169,7 @@ function buildIndexerOverlayQuestionRegistryApplyProposal(input) {
|
|
|
26428
26169
|
amendment,
|
|
26429
26170
|
confirmation,
|
|
26430
26171
|
overlay_contract_digest: amendment.overlay_digest,
|
|
26431
|
-
|
|
26172
|
+
overlay_validation_receipt_digest: amendment.overlay_validation_receipt_digest,
|
|
26432
26173
|
rebind_receipt_digest: input.rebind_receipt_digest,
|
|
26433
26174
|
rebound_selection_digest: input.rebound_selection_digest,
|
|
26434
26175
|
subject_key_schema_set_digest: input.subject_key_schema_set_digest,
|
|
@@ -26446,7 +26187,7 @@ function validateIndexerOverlayQuestionRegistryApplyProposal(value) {
|
|
|
26446
26187
|
amendment,
|
|
26447
26188
|
confirmation: proposal.confirmation
|
|
26448
26189
|
});
|
|
26449
|
-
if (proposal.project_ref !== amendment.project_ref || proposal.overlay_contract_digest !== amendment.overlay_digest || proposal.
|
|
26190
|
+
if (proposal.project_ref !== amendment.project_ref || proposal.overlay_contract_digest !== amendment.overlay_digest || proposal.overlay_validation_receipt_digest !== amendment.overlay_validation_receipt_digest || proposal.base_registry.requirement_set_digest !== amendment.base_requirement_set_digest || proposal.target_registry.requirement_set_digest !== amendment.target_requirement_set_digest || proposal.target_registry.registry_digest !== amendment.target_registry_digest) {
|
|
26450
26191
|
throw new TypeError("overlay coupled proposal does not bind its amendment");
|
|
26451
26192
|
}
|
|
26452
26193
|
const target = parseIndexerRegistry(proposal.target_document_content, "overlay-proposal:target");
|
|
@@ -26841,9 +26582,11 @@ function resolveIndexerSubjectKeySchemas(input) {
|
|
|
26841
26582
|
if (owner === undefined) {
|
|
26842
26583
|
throw new TypeError(`extension profile ${selection.profile} has no exact owner Provider layer`);
|
|
26843
26584
|
}
|
|
26844
|
-
const declarations = input.providers.flatMap((provider) => (provider.manifest.composition?.extensions ?? []).filter((extension) => extension.profile === selection.profile).map((extension) => ({ provider, extension })));
|
|
26585
|
+
const declarations = input.providers.filter((provider) => provider.indexer_id === selection.indexer_id).flatMap((provider) => (provider.manifest.composition?.extensions ?? []).filter((extension) => extension.profile === selection.profile).map((extension) => ({ provider, extension })));
|
|
26845
26586
|
const declarationAuthorities = new Map(declarations.map((declaration2) => [
|
|
26846
26587
|
canonicalIndexerJson({
|
|
26588
|
+
indexer_id: declaration2.provider.indexer_id,
|
|
26589
|
+
provider_layer_id: declaration2.provider.provider_layer_id,
|
|
26847
26590
|
provider_id: declaration2.provider.manifest.id,
|
|
26848
26591
|
provider_version: declaration2.provider.manifest.version,
|
|
26849
26592
|
provider_integrity: declaration2.provider.provider_integrity,
|
|
@@ -26853,6 +26596,8 @@ function resolveIndexerSubjectKeySchemas(input) {
|
|
|
26853
26596
|
declaration2
|
|
26854
26597
|
]));
|
|
26855
26598
|
const ownerAuthorityKey = canonicalIndexerJson({
|
|
26599
|
+
indexer_id: owner.indexer_id,
|
|
26600
|
+
provider_layer_id: owner.provider_layer_id,
|
|
26856
26601
|
provider_id: owner.manifest.id,
|
|
26857
26602
|
provider_version: owner.manifest.version,
|
|
26858
26603
|
provider_integrity: owner.provider_integrity,
|
|
@@ -27003,7 +26748,7 @@ function analyzeIndexerSubjectKeySchemaTransition(input) {
|
|
|
27003
26748
|
if (oldSchema.authority.kind !== newSchema.authority.kind) {
|
|
27004
26749
|
throw new TypeError("SubjectKey schema transition cannot change authority kind");
|
|
27005
26750
|
}
|
|
27006
|
-
if (oldSchema.authority.kind === "provider-extension" && (newSchema.authority.kind !== "provider-extension" || oldSchema.authority.provider_id !== newSchema.authority.provider_id)) {
|
|
26751
|
+
if (oldSchema.authority.kind === "provider-extension" && (newSchema.authority.kind !== "provider-extension" || oldSchema.indexer_id !== newSchema.indexer_id || oldSchema.authority.extends !== newSchema.authority.extends || oldSchema.authority.provider_layer_id !== newSchema.authority.provider_layer_id || oldSchema.authority.provider_id !== newSchema.authority.provider_id || oldSchema.authority.provider_version === newSchema.authority.provider_version && (oldSchema.authority.provider_integrity !== newSchema.authority.provider_integrity || oldSchema.authority.manifest_digest !== newSchema.authority.manifest_digest))) {
|
|
27007
26752
|
throw new TypeError("SubjectKey extension transition cannot change owner Provider");
|
|
27008
26753
|
}
|
|
27009
26754
|
const approved = input.approved_subjects.map((value) => approvedSubjectSchema.parse(value));
|
|
@@ -31962,8 +31707,14 @@ var compileResultBindingSchema = exports_external.object({
|
|
|
31962
31707
|
}).strict();
|
|
31963
31708
|
var candidateFilePayloadSchema = exports_external.object({
|
|
31964
31709
|
artifact_ref: exports_external.string().min(1),
|
|
31710
|
+
node_ref: exports_external.string().min(1),
|
|
31711
|
+
internal_view_ref: exports_external.string().min(1),
|
|
31712
|
+
collection: indexerKnowledgeCollectionSchema2,
|
|
31713
|
+
artifact_kind: indexerIdSchema,
|
|
31965
31714
|
output_path: portableIndexerPathSchema,
|
|
31966
31715
|
indexer_id: indexerIdSchema,
|
|
31716
|
+
source_ref: exports_external.string().min(1),
|
|
31717
|
+
evidence_bindings: exports_external.array(indexerEvidenceBindingSchema),
|
|
31967
31718
|
acceptance_digest: indexerDigestSchema,
|
|
31968
31719
|
indexer_result_digest: indexerDigestSchema,
|
|
31969
31720
|
artifact_result_digest: indexerDigestSchema,
|
|
@@ -31971,6 +31722,13 @@ var candidateFilePayloadSchema = exports_external.object({
|
|
|
31971
31722
|
result_binding_digest: indexerDigestSchema,
|
|
31972
31723
|
shared_artifact_fingerprint_digest: indexerDigestSchema,
|
|
31973
31724
|
section_refs: exports_external.array(exports_external.string().min(1)).min(1),
|
|
31725
|
+
sections: exports_external.array(exports_external.object({
|
|
31726
|
+
section_ref: exports_external.string().min(1),
|
|
31727
|
+
section_key: indexerIdSchema,
|
|
31728
|
+
evidence_refs: exports_external.array(exports_external.string().min(1)),
|
|
31729
|
+
markdown: exports_external.string().min(1),
|
|
31730
|
+
markdown_digest: indexerDigestSchema
|
|
31731
|
+
}).strict()).min(1),
|
|
31974
31732
|
markdown: exports_external.string().min(1),
|
|
31975
31733
|
markdown_digest: indexerDigestSchema
|
|
31976
31734
|
}).strict();
|
|
@@ -32049,7 +31807,7 @@ function assertSectionIntegrity(input) {
|
|
|
32049
31807
|
throw new TypeError(`Candidate compile Section ${input.artifactId}/${input.sectionKey} is stale for layout`);
|
|
32050
31808
|
}
|
|
32051
31809
|
}
|
|
32052
|
-
function
|
|
31810
|
+
function structuredArtifactSections(input) {
|
|
32053
31811
|
return input.artifact.sections.map((section) => {
|
|
32054
31812
|
const blocks = materializeIndexerStructuredContent({
|
|
32055
31813
|
blocks: section.blocks,
|
|
@@ -32063,14 +31821,23 @@ function structuredArtifactMarkdown(input) {
|
|
|
32063
31821
|
contentDigest: indexerProtocolDigest({ content_blocks: blocks }),
|
|
32064
31822
|
evidenceRefs
|
|
32065
31823
|
});
|
|
32066
|
-
|
|
32067
|
-
|
|
32068
|
-
`);
|
|
32069
|
-
}).join(`
|
|
31824
|
+
const markdown = blocks.map((block) => block.markdown).join(`
|
|
32070
31825
|
|
|
32071
31826
|
`);
|
|
31827
|
+
const layoutSection = input.proposal.artifacts.find((candidate) => candidate.artifact_id === input.artifact.artifact_id).sections.find((candidate) => candidate.section_key === section.section_key);
|
|
31828
|
+
return {
|
|
31829
|
+
section_ref: layoutSection.section_ref,
|
|
31830
|
+
section_key: section.section_key,
|
|
31831
|
+
evidence_refs: evidenceRefs,
|
|
31832
|
+
markdown,
|
|
31833
|
+
markdown_digest: indexerProtocolDigest({
|
|
31834
|
+
protocol: "context.indexer.physical-section-markdown/v1",
|
|
31835
|
+
markdown
|
|
31836
|
+
})
|
|
31837
|
+
};
|
|
31838
|
+
});
|
|
32072
31839
|
}
|
|
32073
|
-
function
|
|
31840
|
+
function templateArtifactSections(input) {
|
|
32074
31841
|
const renderedBySection = new Map(input.rendered.sections.map((section) => [
|
|
32075
31842
|
section.section_key,
|
|
32076
31843
|
section
|
|
@@ -32091,10 +31858,17 @@ function templateArtifactMarkdown(input) {
|
|
|
32091
31858
|
contentDigest: section.content_digest,
|
|
32092
31859
|
evidenceRefs: section.evidence_refs
|
|
32093
31860
|
});
|
|
32094
|
-
return
|
|
32095
|
-
|
|
32096
|
-
|
|
32097
|
-
|
|
31861
|
+
return {
|
|
31862
|
+
section_ref: layoutSection.section_ref,
|
|
31863
|
+
section_key: section.section_key,
|
|
31864
|
+
evidence_refs: section.evidence_refs,
|
|
31865
|
+
markdown: section.markdown,
|
|
31866
|
+
markdown_digest: indexerProtocolDigest({
|
|
31867
|
+
protocol: "context.indexer.physical-section-markdown/v1",
|
|
31868
|
+
markdown: section.markdown
|
|
31869
|
+
})
|
|
31870
|
+
};
|
|
31871
|
+
});
|
|
32098
31872
|
}
|
|
32099
31873
|
function candidateFiles(input) {
|
|
32100
31874
|
const layoutById = new Map(input.proposal.artifacts.map((artifact) => [
|
|
@@ -32110,7 +31884,7 @@ function candidateFiles(input) {
|
|
|
32110
31884
|
if (layout === undefined) {
|
|
32111
31885
|
throw new TypeError(`Candidate compile Result Artifact ${artifact.artifact_id} has no layout`);
|
|
32112
31886
|
}
|
|
32113
|
-
const
|
|
31887
|
+
const sections = artifact.representation === "sections" ? structuredArtifactSections({
|
|
32114
31888
|
result: input.accepted.artifactResult,
|
|
32115
31889
|
proposal: input.proposal,
|
|
32116
31890
|
artifact
|
|
@@ -32119,16 +31893,30 @@ function candidateFiles(input) {
|
|
|
32119
31893
|
if (rendered === undefined) {
|
|
32120
31894
|
throw new TypeError(`Candidate compile template Artifact ${artifact.artifact_id} is not rendered`);
|
|
32121
31895
|
}
|
|
32122
|
-
return
|
|
31896
|
+
return templateArtifactSections({
|
|
32123
31897
|
proposal: input.proposal,
|
|
32124
31898
|
artifact,
|
|
32125
31899
|
rendered
|
|
32126
31900
|
});
|
|
32127
31901
|
})();
|
|
31902
|
+
const markdown = sections.map((section) => section.markdown).join(`
|
|
31903
|
+
|
|
31904
|
+
`);
|
|
31905
|
+
const evidenceRefs = new Set(layout.sections.flatMap((section) => section.evidence_refs));
|
|
31906
|
+
const evidenceBindings = input.accepted.artifactResult.evidence_bindings.filter((binding) => evidenceRefs.has(binding.evidence_ref)).sort((left, right) => compareIndexerCanonicalText(left.evidence_ref, right.evidence_ref));
|
|
31907
|
+
if (evidenceBindings.length !== evidenceRefs.size) {
|
|
31908
|
+
throw new TypeError(`Candidate compile Artifact ${artifact.artifact_id} has unresolved evidence bindings`);
|
|
31909
|
+
}
|
|
32128
31910
|
const payload3 = candidateFilePayloadSchema.parse({
|
|
32129
31911
|
artifact_ref: layout.artifact_ref,
|
|
31912
|
+
node_ref: layout.node_ref,
|
|
31913
|
+
internal_view_ref: layout.internal_view_ref,
|
|
31914
|
+
collection: layout.collection,
|
|
31915
|
+
artifact_kind: layout.artifact_kind,
|
|
32130
31916
|
output_path: layout.output_path,
|
|
32131
31917
|
indexer_id: input.accepted.artifactResult.indexer_id,
|
|
31918
|
+
source_ref: input.accepted.artifactResult.source_ref,
|
|
31919
|
+
evidence_bindings: evidenceBindings,
|
|
32132
31920
|
acceptance_digest: input.binding.acceptance_digest,
|
|
32133
31921
|
indexer_result_digest: input.binding.indexer_result_digest,
|
|
32134
31922
|
artifact_result_digest: input.binding.artifact_result_digest,
|
|
@@ -32136,6 +31924,7 @@ function candidateFiles(input) {
|
|
|
32136
31924
|
result_binding_digest: input.binding.binding_digest,
|
|
32137
31925
|
shared_artifact_fingerprint_digest: input.binding.shared_artifact_fingerprint.fingerprint_digest,
|
|
32138
31926
|
section_refs: layout.sections.map((section) => section.section_ref).sort(compareIndexerCanonicalText),
|
|
31927
|
+
sections,
|
|
32139
31928
|
markdown,
|
|
32140
31929
|
markdown_digest: indexerProtocolDigest({
|
|
32141
31930
|
protocol: "context.indexer.physical-markdown/v1",
|
|
@@ -33817,11 +33606,9 @@ function deriveIndexerMaterialAnswerFlowStatus(input) {
|
|
|
33817
33606
|
const resolvedBindings = [];
|
|
33818
33607
|
for (const entry of ledger.entries) {
|
|
33819
33608
|
const domainState = authorityByOwner.get(entry.owner_cell_ref);
|
|
33820
|
-
if (domainState === undefined) {
|
|
33821
|
-
|
|
33822
|
-
|
|
33823
|
-
if (domainState === "out-of-scope") {
|
|
33824
|
-
throw new TypeError("out-of-scope material gaps must not be retained");
|
|
33609
|
+
if (domainState === undefined || domainState === "out-of-scope") {
|
|
33610
|
+
blockingUnresolved.push(indexerMaterialGapQuestionKey(entry));
|
|
33611
|
+
continue;
|
|
33825
33612
|
}
|
|
33826
33613
|
const questionKey = indexerMaterialGapQuestionKey(entry);
|
|
33827
33614
|
const pending = entry.state === "unresolved" || entry.state === "answer-approved" || entry.state === "resolved" && entry.actualization.layout_digest !== layoutDigest;
|
|
@@ -35705,7 +35492,6 @@ var llmsPackage = (definition) => ({
|
|
|
35705
35492
|
...createPackageDefinitionBase("llms", definition)
|
|
35706
35493
|
});
|
|
35707
35494
|
export {
|
|
35708
|
-
verifyEnterpriseIndexerOverlayTrust,
|
|
35709
35495
|
validatedIndexerCustomizationDraftSchema,
|
|
35710
35496
|
validateValidatedIndexerCustomizationDraft,
|
|
35711
35497
|
validateResolvedProviderBundle,
|
|
@@ -35780,10 +35566,9 @@ export {
|
|
|
35780
35566
|
validateIndexerParserImport,
|
|
35781
35567
|
validateIndexerParserFactView,
|
|
35782
35568
|
validateIndexerParserCoordinateMapping,
|
|
35783
|
-
|
|
35569
|
+
validateIndexerOverlayValidationReceipt,
|
|
35784
35570
|
validateIndexerOverlayQuestionRegistryApplyProposal,
|
|
35785
35571
|
validateIndexerOverlayQuestionAmendment,
|
|
35786
|
-
validateIndexerOverlayAttestation,
|
|
35787
35572
|
validateIndexerOperatorContract,
|
|
35788
35573
|
validateIndexerNavigationArtifactPlan,
|
|
35789
35574
|
validateIndexerNavigationArtifactGraph,
|
|
@@ -36112,19 +35897,11 @@ export {
|
|
|
36112
35897
|
indexerParserFactViewSchema,
|
|
36113
35898
|
indexerParserCoordinateMappingSchema,
|
|
36114
35899
|
indexerOwnerCohortRef,
|
|
36115
|
-
|
|
36116
|
-
|
|
36117
|
-
indexerOverlayTrustBundleSchema,
|
|
36118
|
-
indexerOverlayTrustBundleEnvelopeSchema,
|
|
36119
|
-
indexerOverlayTrustBundleDigest,
|
|
35900
|
+
indexerOverlayValidationReceiptSchema,
|
|
35901
|
+
indexerOverlayValidationReceiptDigest,
|
|
36120
35902
|
indexerOverlayQuestionRegistryApplyProposalSchema,
|
|
36121
35903
|
indexerOverlayQuestionDocumentDigest,
|
|
36122
35904
|
indexerOverlayQuestionAmendmentSchema,
|
|
36123
|
-
indexerOverlayProjectAuthorizationSchema,
|
|
36124
|
-
indexerOverlayProjectAuthorizationDigest,
|
|
36125
|
-
indexerOverlayAttestationSigningPayload,
|
|
36126
|
-
indexerOverlayAttestationSchema,
|
|
36127
|
-
indexerOverlayAttestationDigest,
|
|
36128
35905
|
indexerOperatorContractSchema,
|
|
36129
35906
|
indexerOperatorContractDigest,
|
|
36130
35907
|
indexerNegativeDependencyNodeSchema,
|
|
@@ -36232,6 +36009,7 @@ export {
|
|
|
36232
36009
|
indexerExampleCandidateDecisionSchema,
|
|
36233
36010
|
indexerEvidenceRefSchema,
|
|
36234
36011
|
indexerEvidenceItemRef,
|
|
36012
|
+
indexerEvidenceBindingSchema,
|
|
36235
36013
|
indexerEvidenceBindingDigest,
|
|
36236
36014
|
indexerEvidenceAdapterResultSchema,
|
|
36237
36015
|
indexerEvidenceAdapterOutputDigest,
|
|
@@ -36330,6 +36108,7 @@ export {
|
|
|
36330
36108
|
defineProject,
|
|
36331
36109
|
decideIndexerMaterialAnswerReview,
|
|
36332
36110
|
customPhase,
|
|
36111
|
+
createIndexerOverlayValidationReceipt,
|
|
36333
36112
|
coverageDomainCompletionSchema,
|
|
36334
36113
|
coverageCompletionReportPayloadSchema,
|
|
36335
36114
|
convergeIndexerPartitionPlan,
|
|
@@ -36463,7 +36242,6 @@ export {
|
|
|
36463
36242
|
buildIndexerAgentStepResult,
|
|
36464
36243
|
buildIndexerAgentStepInput,
|
|
36465
36244
|
buildIndexerActivationRequest,
|
|
36466
|
-
authorizeProjectIndexerOverlay,
|
|
36467
36245
|
authorizeIndexerSubjectReidentification,
|
|
36468
36246
|
authorizeIndexerProgramExecution,
|
|
36469
36247
|
authorizeIndexerProfileOverride,
|