@riddledc/riddle-proof 0.8.80 → 0.8.82
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 +79 -0
- package/dist/change-proof.js +2 -2
- package/dist/{chunk-ZNVYJFR7.js → chunk-2K3DIK7A.js} +5 -1
- package/dist/{chunk-6T6ZAK77.js → chunk-7OAETQU3.js} +1 -1
- package/dist/{chunk-A4EF4M3B.js → chunk-FW7CKARF.js} +1 -1
- package/dist/{chunk-IL7MLYB5.js → chunk-LR4UYJDY.js} +1 -1
- package/dist/{chunk-N7EETHYG.js → chunk-QYZ3GKCP.js} +4 -4
- package/dist/chunk-ZZ6UNKJQ.js +469 -0
- package/dist/cli/index.js +5 -5
- package/dist/cli.cjs +5 -1
- package/dist/cli.js +5 -5
- package/dist/index.cjs +481 -5
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -4
- package/dist/pr-comment.js +3 -3
- package/dist/profile/index.cjs +5 -1
- package/dist/profile/index.js +1 -1
- package/dist/profile-suggestions.js +2 -2
- package/dist/profile.cjs +5 -1
- package/dist/profile.d.cts +2 -0
- package/dist/profile.d.ts +2 -0
- package/dist/profile.js +1 -1
- package/dist/semantic-certificate.cjs +497 -0
- package/dist/semantic-certificate.d.cts +142 -0
- package/dist/semantic-certificate.d.ts +142 -0
- package/dist/semantic-certificate.js +15 -0
- package/package.json +8 -3
package/dist/cli.cjs
CHANGED
|
@@ -9893,10 +9893,14 @@ function normalizeViewport(input, index) {
|
|
|
9893
9893
|
if (!width || !height || width < 100 || height < 100) {
|
|
9894
9894
|
throw new Error(`target.viewports[${index}] requires numeric width and height >= 100.`);
|
|
9895
9895
|
}
|
|
9896
|
+
const hasTouch = booleanValue2(valueFromOwn(input, "hasTouch", "has_touch"));
|
|
9897
|
+
const isMobile = booleanValue2(valueFromOwn(input, "isMobile", "is_mobile"));
|
|
9896
9898
|
return {
|
|
9897
9899
|
name: normalizeName(input.name || input.label, `viewport-${index + 1}`),
|
|
9898
9900
|
width: Math.round(width),
|
|
9899
|
-
height: Math.round(height)
|
|
9901
|
+
height: Math.round(height),
|
|
9902
|
+
...hasTouch === void 0 ? {} : { hasTouch },
|
|
9903
|
+
...isMobile === void 0 ? {} : { isMobile }
|
|
9900
9904
|
};
|
|
9901
9905
|
}
|
|
9902
9906
|
function normalizeViewports(value) {
|
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-QYZ3GKCP.js";
|
|
3
3
|
import "./chunk-5IFZSUPF.js";
|
|
4
4
|
import "./chunk-JFQXAJH2.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-7OAETQU3.js";
|
|
6
|
+
import "./chunk-FW7CKARF.js";
|
|
7
|
+
import "./chunk-LR4UYJDY.js";
|
|
8
8
|
import "./chunk-MEVVL4TI.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-2K3DIK7A.js";
|
|
10
10
|
import "./chunk-KXLEN4SA.js";
|
|
11
11
|
import "./chunk-WLUMLHII.js";
|
|
12
12
|
import "./chunk-CGJX7LJO.js";
|
package/dist/index.cjs
CHANGED
|
@@ -3442,6 +3442,7 @@ __export(index_exports, {
|
|
|
3442
3442
|
RIDDLE_PROOF_PR_COMMENT_MARKER: () => RIDDLE_PROOF_PR_COMMENT_MARKER,
|
|
3443
3443
|
RIDDLE_PROOF_RUN_CARD_VERSION: () => RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
3444
3444
|
RIDDLE_PROOF_RUN_STATE_VERSION: () => RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
3445
|
+
RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION: () => RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION,
|
|
3445
3446
|
RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION: () => RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION,
|
|
3446
3447
|
RIDDLE_PROOF_VISUAL_SESSION_VERSION: () => RIDDLE_PROOF_VISUAL_SESSION_VERSION,
|
|
3447
3448
|
RIDDLE_UNSUBMITTED_WAKE_HINT: () => RIDDLE_UNSUBMITTED_WAKE_HINT,
|
|
@@ -3483,6 +3484,7 @@ __export(index_exports, {
|
|
|
3483
3484
|
compactBasicGameplayText: () => compactBasicGameplayText,
|
|
3484
3485
|
compactRecord: () => compactRecord,
|
|
3485
3486
|
compareVisualProofSessionFingerprint: () => compareVisualProofSessionFingerprint,
|
|
3487
|
+
composeRiddleProofSemanticCertificates: () => composeRiddleProofSemanticCertificates,
|
|
3486
3488
|
createBasicGameplayCatchRecords: () => createBasicGameplayCatchRecords,
|
|
3487
3489
|
createBasicGameplayCatchSummary: () => createBasicGameplayCatchSummary,
|
|
3488
3490
|
createCaptureDiagnostic: () => createCaptureDiagnostic,
|
|
@@ -3500,6 +3502,7 @@ __export(index_exports, {
|
|
|
3500
3502
|
createRiddleProofProfileEnvironmentBlockedResult: () => createRiddleProofProfileEnvironmentBlockedResult,
|
|
3501
3503
|
createRiddleProofProfileInsufficientResult: () => createRiddleProofProfileInsufficientResult,
|
|
3502
3504
|
createRiddleProofRunCard: () => createRiddleProofRunCard,
|
|
3505
|
+
createRiddleProofSemanticCertificate: () => createRiddleProofSemanticCertificate,
|
|
3503
3506
|
createRunResult: () => createRunResult,
|
|
3504
3507
|
createRunState: () => createRunState,
|
|
3505
3508
|
createRunStatusSnapshot: () => createRunStatusSnapshot,
|
|
@@ -3529,6 +3532,7 @@ __export(index_exports, {
|
|
|
3529
3532
|
parseRiddleProofChangeReceipt: () => parseRiddleProofChangeReceipt,
|
|
3530
3533
|
parseRiddleProofHandoffReceipt: () => parseRiddleProofHandoffReceipt,
|
|
3531
3534
|
parseRiddleProofObservationReceipt: () => parseRiddleProofObservationReceipt,
|
|
3535
|
+
parseRiddleProofSemanticCertificate: () => parseRiddleProofSemanticCertificate,
|
|
3532
3536
|
parseRiddleViewport: () => parseRiddleViewport,
|
|
3533
3537
|
parseVisualProofSession: () => parseVisualProofSession,
|
|
3534
3538
|
pollRiddleJob: () => pollRiddleJob,
|
|
@@ -3552,6 +3556,7 @@ __export(index_exports, {
|
|
|
3552
3556
|
riddleProofPublicStateAllowsClaim: () => riddleProofPublicStateAllowsClaim,
|
|
3553
3557
|
riddleProofPublicStateAllowsMergeRecommendation: () => riddleProofPublicStateAllowsMergeRecommendation,
|
|
3554
3558
|
riddleProofPublicStateMergeRecommendation: () => riddleProofPublicStateMergeRecommendation,
|
|
3559
|
+
riddleProofSemanticScopesEqual: () => riddleProofSemanticScopesEqual,
|
|
3555
3560
|
riddleRequestJson: () => riddleRequestJson,
|
|
3556
3561
|
runCodexExecAgentDoctor: () => runCodexExecAgentDoctor,
|
|
3557
3562
|
runLocalAgentDoctor: () => runCodexExecAgentDoctor,
|
|
@@ -11326,10 +11331,14 @@ function normalizeViewport(input, index) {
|
|
|
11326
11331
|
if (!width || !height || width < 100 || height < 100) {
|
|
11327
11332
|
throw new Error(`target.viewports[${index}] requires numeric width and height >= 100.`);
|
|
11328
11333
|
}
|
|
11334
|
+
const hasTouch = booleanValue2(valueFromOwn(input, "hasTouch", "has_touch"));
|
|
11335
|
+
const isMobile = booleanValue2(valueFromOwn(input, "isMobile", "is_mobile"));
|
|
11329
11336
|
return {
|
|
11330
11337
|
name: normalizeName(input.name || input.label, `viewport-${index + 1}`),
|
|
11331
11338
|
width: Math.round(width),
|
|
11332
|
-
height: Math.round(height)
|
|
11339
|
+
height: Math.round(height),
|
|
11340
|
+
...hasTouch === void 0 ? {} : { hasTouch },
|
|
11341
|
+
...isMobile === void 0 ? {} : { isMobile }
|
|
11333
11342
|
};
|
|
11334
11343
|
}
|
|
11335
11344
|
function normalizeViewports(value) {
|
|
@@ -20562,6 +20571,468 @@ function parseRiddleProofObservationReceipt(value) {
|
|
|
20562
20571
|
return value;
|
|
20563
20572
|
}
|
|
20564
20573
|
|
|
20574
|
+
// src/semantic-certificate.ts
|
|
20575
|
+
var import_node_crypto5 = require("crypto");
|
|
20576
|
+
var RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION = "riddle-proof.semantic-certificate.v0";
|
|
20577
|
+
var SCOPE_FIELDS = [
|
|
20578
|
+
"repository",
|
|
20579
|
+
"revision",
|
|
20580
|
+
"environment",
|
|
20581
|
+
"target",
|
|
20582
|
+
"proof_attempt"
|
|
20583
|
+
];
|
|
20584
|
+
var AUTHORITY_FIELDS = [
|
|
20585
|
+
"authority",
|
|
20586
|
+
"status",
|
|
20587
|
+
"verdict",
|
|
20588
|
+
"ready_to_ship",
|
|
20589
|
+
"merge_ready",
|
|
20590
|
+
"sync_allowed",
|
|
20591
|
+
"ship_authorized",
|
|
20592
|
+
"shipping_authorized",
|
|
20593
|
+
"shipping_disabled",
|
|
20594
|
+
"merge_recommended",
|
|
20595
|
+
"merge_recommendation",
|
|
20596
|
+
"shipping_authorization"
|
|
20597
|
+
];
|
|
20598
|
+
var CERTIFICATE_FIELDS = /* @__PURE__ */ new Set([
|
|
20599
|
+
"version",
|
|
20600
|
+
"certificate_id",
|
|
20601
|
+
"scope",
|
|
20602
|
+
"claim",
|
|
20603
|
+
"evidence",
|
|
20604
|
+
"derivation",
|
|
20605
|
+
"issued_at"
|
|
20606
|
+
]);
|
|
20607
|
+
function isRecord4(value) {
|
|
20608
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
20609
|
+
}
|
|
20610
|
+
function assertOnlyKeys(record, allowed, context) {
|
|
20611
|
+
const allowedSet = new Set(allowed);
|
|
20612
|
+
for (const key of Object.keys(record)) {
|
|
20613
|
+
if (!allowedSet.has(key)) {
|
|
20614
|
+
throw new Error(`${context} contains unsupported field ${key}.`);
|
|
20615
|
+
}
|
|
20616
|
+
}
|
|
20617
|
+
}
|
|
20618
|
+
function requiredString2(record, key, context) {
|
|
20619
|
+
const value = record[key];
|
|
20620
|
+
if (typeof value !== "string" || !value.trim()) {
|
|
20621
|
+
throw new Error(`${context}.${key} must be a non-empty string.`);
|
|
20622
|
+
}
|
|
20623
|
+
return value.trim();
|
|
20624
|
+
}
|
|
20625
|
+
function optionalString(record, key, context) {
|
|
20626
|
+
if (record[key] === void 0) return void 0;
|
|
20627
|
+
return requiredString2(record, key, context);
|
|
20628
|
+
}
|
|
20629
|
+
function isJsonValue(value, ancestors = /* @__PURE__ */ new Set()) {
|
|
20630
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") {
|
|
20631
|
+
return true;
|
|
20632
|
+
}
|
|
20633
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
20634
|
+
if (Array.isArray(value)) {
|
|
20635
|
+
if (ancestors.has(value)) return false;
|
|
20636
|
+
ancestors.add(value);
|
|
20637
|
+
const valid2 = value.every((entry) => isJsonValue(entry, ancestors));
|
|
20638
|
+
ancestors.delete(value);
|
|
20639
|
+
return valid2;
|
|
20640
|
+
}
|
|
20641
|
+
if (!isRecord4(value)) return false;
|
|
20642
|
+
const prototype = Object.getPrototypeOf(value);
|
|
20643
|
+
if (prototype !== Object.prototype && prototype !== null) return false;
|
|
20644
|
+
if (ancestors.has(value)) return false;
|
|
20645
|
+
ancestors.add(value);
|
|
20646
|
+
const valid = Object.values(value).every((entry) => isJsonValue(entry, ancestors));
|
|
20647
|
+
ancestors.delete(value);
|
|
20648
|
+
return valid;
|
|
20649
|
+
}
|
|
20650
|
+
function parseJsonObject2(value, context) {
|
|
20651
|
+
if (value === void 0) return void 0;
|
|
20652
|
+
if (!isRecord4(value) || !isJsonValue(value)) {
|
|
20653
|
+
throw new Error(`${context} must be a JSON object.`);
|
|
20654
|
+
}
|
|
20655
|
+
const cloned = JSON.parse(JSON.stringify(value));
|
|
20656
|
+
if (!isRecord4(cloned) || !isJsonValue(cloned)) {
|
|
20657
|
+
throw new Error(`${context} must remain a JSON object when serialized.`);
|
|
20658
|
+
}
|
|
20659
|
+
return cloned;
|
|
20660
|
+
}
|
|
20661
|
+
function parseIssuedAt(value, context) {
|
|
20662
|
+
if (typeof value !== "string" || !value.trim() || !Number.isFinite(Date.parse(value))) {
|
|
20663
|
+
throw new Error(`${context} must be a valid timestamp.`);
|
|
20664
|
+
}
|
|
20665
|
+
return value.trim();
|
|
20666
|
+
}
|
|
20667
|
+
function parseScope(value, context) {
|
|
20668
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20669
|
+
assertOnlyKeys(value, SCOPE_FIELDS, context);
|
|
20670
|
+
return {
|
|
20671
|
+
repository: requiredString2(value, "repository", context),
|
|
20672
|
+
revision: requiredString2(value, "revision", context),
|
|
20673
|
+
environment: requiredString2(value, "environment", context),
|
|
20674
|
+
target: requiredString2(value, "target", context),
|
|
20675
|
+
proof_attempt: requiredString2(value, "proof_attempt", context)
|
|
20676
|
+
};
|
|
20677
|
+
}
|
|
20678
|
+
function parseClaimRef(value, context, allowedExtras = []) {
|
|
20679
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20680
|
+
assertOnlyKeys(value, ["claim_id", "claim_version", "parameters", ...allowedExtras], context);
|
|
20681
|
+
const parameters = parseJsonObject2(value.parameters, `${context}.parameters`);
|
|
20682
|
+
return {
|
|
20683
|
+
claim_id: requiredString2(value, "claim_id", context),
|
|
20684
|
+
claim_version: requiredString2(value, "claim_version", context),
|
|
20685
|
+
...parameters ? { parameters } : {}
|
|
20686
|
+
};
|
|
20687
|
+
}
|
|
20688
|
+
function parseClaim(value, context) {
|
|
20689
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20690
|
+
return {
|
|
20691
|
+
...parseClaimRef(value, context, ["label"]),
|
|
20692
|
+
label: requiredString2(value, "label", context)
|
|
20693
|
+
};
|
|
20694
|
+
}
|
|
20695
|
+
function parseEvidenceRef(value, context) {
|
|
20696
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20697
|
+
assertOnlyKeys(
|
|
20698
|
+
value,
|
|
20699
|
+
["receipt_id", "artifact_digest", "role", "artifact_url", "artifact_path"],
|
|
20700
|
+
context
|
|
20701
|
+
);
|
|
20702
|
+
const artifactDigest = requiredString2(value, "artifact_digest", context).toLowerCase();
|
|
20703
|
+
if (!/^sha256:[0-9a-f]{64}$/u.test(artifactDigest)) {
|
|
20704
|
+
throw new Error(`${context}.artifact_digest must be a full sha256 digest.`);
|
|
20705
|
+
}
|
|
20706
|
+
const artifactUrl = optionalString(value, "artifact_url", context);
|
|
20707
|
+
const artifactPath = optionalString(value, "artifact_path", context);
|
|
20708
|
+
return {
|
|
20709
|
+
receipt_id: requiredString2(value, "receipt_id", context),
|
|
20710
|
+
artifact_digest: artifactDigest,
|
|
20711
|
+
role: requiredString2(value, "role", context),
|
|
20712
|
+
...artifactUrl ? { artifact_url: artifactUrl } : {},
|
|
20713
|
+
...artifactPath ? { artifact_path: artifactPath } : {}
|
|
20714
|
+
};
|
|
20715
|
+
}
|
|
20716
|
+
function parseEvidenceBundle(value, context) {
|
|
20717
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
20718
|
+
throw new Error(`${context} must contain at least one evidence reference.`);
|
|
20719
|
+
}
|
|
20720
|
+
return value.map((entry, index) => parseEvidenceRef(entry, `${context}[${index}]`));
|
|
20721
|
+
}
|
|
20722
|
+
function parseContractRef(value, context) {
|
|
20723
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20724
|
+
return {
|
|
20725
|
+
contract_id: requiredString2(value, "contract_id", context),
|
|
20726
|
+
contract_version: requiredString2(value, "contract_version", context),
|
|
20727
|
+
label: requiredString2(value, "label", context)
|
|
20728
|
+
};
|
|
20729
|
+
}
|
|
20730
|
+
function parseContract(value, context, allowRuntimePredicate = false) {
|
|
20731
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20732
|
+
assertOnlyKeys(
|
|
20733
|
+
value,
|
|
20734
|
+
["contract_id", "contract_version", "label", "claim", ...allowRuntimePredicate ? ["accepts"] : []],
|
|
20735
|
+
context
|
|
20736
|
+
);
|
|
20737
|
+
if (allowRuntimePredicate && typeof value.accepts !== "function") {
|
|
20738
|
+
throw new Error(`${context}.accepts must be a function.`);
|
|
20739
|
+
}
|
|
20740
|
+
return {
|
|
20741
|
+
...parseContractRef(value, context),
|
|
20742
|
+
claim: parseClaim(value.claim, `${context}.claim`)
|
|
20743
|
+
};
|
|
20744
|
+
}
|
|
20745
|
+
function parseRule(value, context, allowFullPremises = false) {
|
|
20746
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20747
|
+
assertOnlyKeys(value, ["rule_id", "rule_version", "label", "premises", "conclusion"], context);
|
|
20748
|
+
if (!Array.isArray(value.premises) || value.premises.length === 0) {
|
|
20749
|
+
throw new Error(`${context}.premises must contain at least one claim reference.`);
|
|
20750
|
+
}
|
|
20751
|
+
return {
|
|
20752
|
+
rule_id: requiredString2(value, "rule_id", context),
|
|
20753
|
+
rule_version: requiredString2(value, "rule_version", context),
|
|
20754
|
+
label: requiredString2(value, "label", context),
|
|
20755
|
+
premises: value.premises.map((premise, index) => parseClaimRef(
|
|
20756
|
+
premise,
|
|
20757
|
+
`${context}.premises[${index}]`,
|
|
20758
|
+
allowFullPremises ? ["label"] : []
|
|
20759
|
+
)),
|
|
20760
|
+
conclusion: parseClaim(value.conclusion, `${context}.conclusion`)
|
|
20761
|
+
};
|
|
20762
|
+
}
|
|
20763
|
+
function parsePremise(value, context) {
|
|
20764
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20765
|
+
assertOnlyKeys(
|
|
20766
|
+
value,
|
|
20767
|
+
["certificate_id", "derivation_kind", "assurance", "scope", "claim", "evidence"],
|
|
20768
|
+
context
|
|
20769
|
+
);
|
|
20770
|
+
const derivationKind = requiredString2(value, "derivation_kind", context);
|
|
20771
|
+
const assurance = requiredString2(value, "assurance", context);
|
|
20772
|
+
const validAssurance = derivationKind === "contract" && assurance === "runtime_contract_accepted" || derivationKind === "composition" && assurance === "declared_runtime_rule";
|
|
20773
|
+
if (!validAssurance) {
|
|
20774
|
+
throw new Error(`${context} must preserve a valid derivation_kind and assurance pair.`);
|
|
20775
|
+
}
|
|
20776
|
+
return {
|
|
20777
|
+
certificate_id: requiredString2(value, "certificate_id", context),
|
|
20778
|
+
derivation_kind: derivationKind,
|
|
20779
|
+
assurance,
|
|
20780
|
+
scope: parseScope(value.scope, `${context}.scope`),
|
|
20781
|
+
claim: parseClaim(value.claim, `${context}.claim`),
|
|
20782
|
+
evidence: parseEvidenceBundle(value.evidence, `${context}.evidence`)
|
|
20783
|
+
};
|
|
20784
|
+
}
|
|
20785
|
+
function stableJson3(value) {
|
|
20786
|
+
if (Array.isArray(value)) return `[${value.map(stableJson3).join(",")}]`;
|
|
20787
|
+
if (isRecord4(value)) {
|
|
20788
|
+
return `{${Object.keys(value).filter((key) => value[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${stableJson3(value[key])}`).join(",")}}`;
|
|
20789
|
+
}
|
|
20790
|
+
const encoded = JSON.stringify(value);
|
|
20791
|
+
if (encoded === void 0) throw new Error("Semantic certificate contains a non-JSON value.");
|
|
20792
|
+
return encoded;
|
|
20793
|
+
}
|
|
20794
|
+
function sameClaimRef(left, right) {
|
|
20795
|
+
return left.claim_id === right.claim_id && left.claim_version === right.claim_version && stableJson3(left.parameters || {}) === stableJson3(right.parameters || {});
|
|
20796
|
+
}
|
|
20797
|
+
function sameEvidence(left, right) {
|
|
20798
|
+
return stableJson3(left) === stableJson3(right);
|
|
20799
|
+
}
|
|
20800
|
+
function certificateId(body) {
|
|
20801
|
+
const digest = (0, import_node_crypto5.createHash)("sha256").update(stableJson3(body)).digest("hex");
|
|
20802
|
+
return `rpsc_${digest}`;
|
|
20803
|
+
}
|
|
20804
|
+
function withCertificateId(body) {
|
|
20805
|
+
return { ...body, certificate_id: certificateId(body) };
|
|
20806
|
+
}
|
|
20807
|
+
function parseDerivation(value, context) {
|
|
20808
|
+
if (!isRecord4(value)) throw new Error(`${context} must be an object.`);
|
|
20809
|
+
const kind = requiredString2(value, "kind", context);
|
|
20810
|
+
if (kind === "contract") {
|
|
20811
|
+
assertOnlyKeys(value, ["kind", "assurance", "contract"], context);
|
|
20812
|
+
if (value.assurance !== "runtime_contract_accepted") {
|
|
20813
|
+
throw new Error(`${context}.assurance must be runtime_contract_accepted.`);
|
|
20814
|
+
}
|
|
20815
|
+
return {
|
|
20816
|
+
kind,
|
|
20817
|
+
assurance: "runtime_contract_accepted",
|
|
20818
|
+
contract: parseContract(value.contract, `${context}.contract`)
|
|
20819
|
+
};
|
|
20820
|
+
}
|
|
20821
|
+
if (kind === "composition") {
|
|
20822
|
+
assertOnlyKeys(value, ["kind", "assurance", "rule", "premises"], context);
|
|
20823
|
+
if (value.assurance !== "declared_runtime_rule") {
|
|
20824
|
+
throw new Error(`${context}.assurance must be declared_runtime_rule.`);
|
|
20825
|
+
}
|
|
20826
|
+
if (!Array.isArray(value.premises) || value.premises.length === 0) {
|
|
20827
|
+
throw new Error(`${context}.premises must contain at least one certificate premise.`);
|
|
20828
|
+
}
|
|
20829
|
+
return {
|
|
20830
|
+
kind,
|
|
20831
|
+
assurance: "declared_runtime_rule",
|
|
20832
|
+
rule: parseRule(value.rule, `${context}.rule`),
|
|
20833
|
+
premises: value.premises.map((premise, index) => parsePremise(premise, `${context}.premises[${index}]`))
|
|
20834
|
+
};
|
|
20835
|
+
}
|
|
20836
|
+
throw new Error(`${context}.kind must be contract or composition.`);
|
|
20837
|
+
}
|
|
20838
|
+
function riddleProofSemanticScopesEqual(left, right) {
|
|
20839
|
+
return SCOPE_FIELDS.every((field) => left[field] === right[field]);
|
|
20840
|
+
}
|
|
20841
|
+
function createRiddleProofSemanticCertificate(input) {
|
|
20842
|
+
if (!isRecord4(input)) throw new Error("Semantic certificate input must be an object.");
|
|
20843
|
+
assertOnlyKeys(
|
|
20844
|
+
input,
|
|
20845
|
+
["scope", "evidence", "observation", "contract", "issued_at"],
|
|
20846
|
+
"semantic certificate input"
|
|
20847
|
+
);
|
|
20848
|
+
const scope = parseScope(input.scope, "semantic certificate scope");
|
|
20849
|
+
const evidence = parseEvidenceBundle(input.evidence, "semantic certificate evidence");
|
|
20850
|
+
const contract = parseContract(input.contract, "semantic certificate contract", true);
|
|
20851
|
+
const contractRef = {
|
|
20852
|
+
contract_id: contract.contract_id,
|
|
20853
|
+
contract_version: contract.contract_version,
|
|
20854
|
+
label: contract.label
|
|
20855
|
+
};
|
|
20856
|
+
const claim = contract.claim;
|
|
20857
|
+
let accepted;
|
|
20858
|
+
try {
|
|
20859
|
+
accepted = input.contract.accepts({ ...scope }, input.observation) === true;
|
|
20860
|
+
} catch (error) {
|
|
20861
|
+
return {
|
|
20862
|
+
ok: false,
|
|
20863
|
+
error: {
|
|
20864
|
+
code: "contract_error",
|
|
20865
|
+
contract: contractRef,
|
|
20866
|
+
message: `Semantic contract evaluation failed: ${error instanceof Error ? error.message : String(error)}.`
|
|
20867
|
+
}
|
|
20868
|
+
};
|
|
20869
|
+
}
|
|
20870
|
+
if (!accepted) {
|
|
20871
|
+
return {
|
|
20872
|
+
ok: false,
|
|
20873
|
+
error: {
|
|
20874
|
+
code: "contract_rejected",
|
|
20875
|
+
contract: contractRef,
|
|
20876
|
+
message: "Semantic contract rejected the supplied observation at this scope."
|
|
20877
|
+
}
|
|
20878
|
+
};
|
|
20879
|
+
}
|
|
20880
|
+
const body = {
|
|
20881
|
+
version: RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION,
|
|
20882
|
+
scope,
|
|
20883
|
+
claim,
|
|
20884
|
+
evidence,
|
|
20885
|
+
derivation: { kind: "contract", assurance: "runtime_contract_accepted", contract },
|
|
20886
|
+
issued_at: parseIssuedAt(input.issued_at || (/* @__PURE__ */ new Date()).toISOString(), "semantic certificate issued_at")
|
|
20887
|
+
};
|
|
20888
|
+
return { ok: true, certificate: withCertificateId(body) };
|
|
20889
|
+
}
|
|
20890
|
+
function parseRiddleProofSemanticCertificate(value) {
|
|
20891
|
+
if (!isRecord4(value)) throw new Error("Semantic certificate must be an object.");
|
|
20892
|
+
if (value.version !== RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION) {
|
|
20893
|
+
throw new Error(`Unsupported Semantic certificate version ${String(value.version || "missing")}.`);
|
|
20894
|
+
}
|
|
20895
|
+
for (const field of AUTHORITY_FIELDS) {
|
|
20896
|
+
if (Object.prototype.hasOwnProperty.call(value, field)) {
|
|
20897
|
+
throw new Error(`Semantic certificate must not contain authority field ${field}.`);
|
|
20898
|
+
}
|
|
20899
|
+
}
|
|
20900
|
+
for (const field of Object.keys(value)) {
|
|
20901
|
+
if (!CERTIFICATE_FIELDS.has(field)) {
|
|
20902
|
+
throw new Error(`Semantic certificate contains unsupported field ${field}.`);
|
|
20903
|
+
}
|
|
20904
|
+
}
|
|
20905
|
+
const scope = parseScope(value.scope, "semantic certificate scope");
|
|
20906
|
+
const claim = parseClaim(value.claim, "semantic certificate claim");
|
|
20907
|
+
const evidence = parseEvidenceBundle(value.evidence, "semantic certificate evidence");
|
|
20908
|
+
const derivation = parseDerivation(value.derivation, "semantic certificate derivation");
|
|
20909
|
+
if (derivation.kind === "contract" && !sameClaimRef(claim, derivation.contract.claim)) {
|
|
20910
|
+
throw new Error("Semantic contract-derived claim must match its contract claim.");
|
|
20911
|
+
}
|
|
20912
|
+
if (derivation.kind === "composition") {
|
|
20913
|
+
if (derivation.premises.length !== derivation.rule.premises.length) {
|
|
20914
|
+
throw new Error("Semantic composition premises must match the rule premise count.");
|
|
20915
|
+
}
|
|
20916
|
+
derivation.premises.forEach((premise, index) => {
|
|
20917
|
+
if (!riddleProofSemanticScopesEqual(scope, premise.scope)) {
|
|
20918
|
+
throw new Error(`Semantic composition premise ${index} must have the certificate scope.`);
|
|
20919
|
+
}
|
|
20920
|
+
if (!sameClaimRef(premise.claim, derivation.rule.premises[index])) {
|
|
20921
|
+
throw new Error(`Semantic composition premise ${index} must match its rule claim.`);
|
|
20922
|
+
}
|
|
20923
|
+
});
|
|
20924
|
+
if (!sameClaimRef(claim, derivation.rule.conclusion)) {
|
|
20925
|
+
throw new Error("Semantic composition claim must match its rule conclusion.");
|
|
20926
|
+
}
|
|
20927
|
+
const expectedEvidence = derivation.premises.flatMap((premise) => premise.evidence);
|
|
20928
|
+
if (!sameEvidence(evidence, expectedEvidence)) {
|
|
20929
|
+
throw new Error("Semantic composition evidence must be the ordered concatenation of premise evidence.");
|
|
20930
|
+
}
|
|
20931
|
+
}
|
|
20932
|
+
const body = {
|
|
20933
|
+
version: RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION,
|
|
20934
|
+
scope,
|
|
20935
|
+
claim,
|
|
20936
|
+
evidence,
|
|
20937
|
+
derivation,
|
|
20938
|
+
issued_at: parseIssuedAt(value.issued_at, "semantic certificate issued_at")
|
|
20939
|
+
};
|
|
20940
|
+
const observedId = requiredString2(value, "certificate_id", "semantic certificate");
|
|
20941
|
+
const expectedId = certificateId(body);
|
|
20942
|
+
if (observedId !== expectedId) {
|
|
20943
|
+
throw new Error("Semantic certificate_id must match its content.");
|
|
20944
|
+
}
|
|
20945
|
+
return { ...body, certificate_id: observedId };
|
|
20946
|
+
}
|
|
20947
|
+
function firstScopeMismatch(expected, observed) {
|
|
20948
|
+
for (const field of SCOPE_FIELDS) {
|
|
20949
|
+
if (expected[field] !== observed[field]) {
|
|
20950
|
+
return { field, expected: expected[field], observed: observed[field] };
|
|
20951
|
+
}
|
|
20952
|
+
}
|
|
20953
|
+
return void 0;
|
|
20954
|
+
}
|
|
20955
|
+
function premiseFromCertificate(certificate) {
|
|
20956
|
+
return {
|
|
20957
|
+
certificate_id: certificate.certificate_id,
|
|
20958
|
+
derivation_kind: certificate.derivation.kind,
|
|
20959
|
+
assurance: certificate.derivation.assurance,
|
|
20960
|
+
scope: { ...certificate.scope },
|
|
20961
|
+
claim: parseClaim(certificate.claim, "semantic composition premise claim"),
|
|
20962
|
+
evidence: certificate.evidence.map((entry) => ({ ...entry }))
|
|
20963
|
+
};
|
|
20964
|
+
}
|
|
20965
|
+
function composeRiddleProofSemanticCertificates(input) {
|
|
20966
|
+
if (!isRecord4(input)) throw new Error("Semantic composition input must be an object.");
|
|
20967
|
+
assertOnlyKeys(
|
|
20968
|
+
input,
|
|
20969
|
+
["rule", "certificates", "issued_at"],
|
|
20970
|
+
"semantic composition input"
|
|
20971
|
+
);
|
|
20972
|
+
const rule = parseRule(input.rule, "semantic composition rule", true);
|
|
20973
|
+
if (!Array.isArray(input.certificates) || input.certificates.length === 0) {
|
|
20974
|
+
throw new Error("Semantic composition requires at least one certificate.");
|
|
20975
|
+
}
|
|
20976
|
+
const certificates = input.certificates.map((certificate) => parseRiddleProofSemanticCertificate(certificate));
|
|
20977
|
+
if (certificates.length !== rule.premises.length) {
|
|
20978
|
+
return {
|
|
20979
|
+
ok: false,
|
|
20980
|
+
error: {
|
|
20981
|
+
code: "premise_count_mismatch",
|
|
20982
|
+
expected: rule.premises.length,
|
|
20983
|
+
observed: certificates.length,
|
|
20984
|
+
message: `Semantic rule expected ${rule.premises.length} certificate(s), received ${certificates.length}.`
|
|
20985
|
+
}
|
|
20986
|
+
};
|
|
20987
|
+
}
|
|
20988
|
+
const expectedScope = certificates[0].scope;
|
|
20989
|
+
for (let index = 1; index < certificates.length; index += 1) {
|
|
20990
|
+
const mismatch = firstScopeMismatch(expectedScope, certificates[index].scope);
|
|
20991
|
+
if (mismatch) {
|
|
20992
|
+
return {
|
|
20993
|
+
ok: false,
|
|
20994
|
+
error: {
|
|
20995
|
+
code: "scope_mismatch",
|
|
20996
|
+
input_index: index,
|
|
20997
|
+
...mismatch,
|
|
20998
|
+
message: `Semantic certificate ${index} has a different ${mismatch.field}.`
|
|
20999
|
+
}
|
|
21000
|
+
};
|
|
21001
|
+
}
|
|
21002
|
+
}
|
|
21003
|
+
for (let index = 0; index < certificates.length; index += 1) {
|
|
21004
|
+
const expected = rule.premises[index];
|
|
21005
|
+
const observed = certificates[index].claim;
|
|
21006
|
+
if (!sameClaimRef(expected, observed)) {
|
|
21007
|
+
return {
|
|
21008
|
+
ok: false,
|
|
21009
|
+
error: {
|
|
21010
|
+
code: "premise_mismatch",
|
|
21011
|
+
input_index: index,
|
|
21012
|
+
expected,
|
|
21013
|
+
observed: parseClaimRef(observed, "semantic composition observed claim", ["label"]),
|
|
21014
|
+
message: `Semantic certificate ${index} does not satisfy its declared rule premise.`
|
|
21015
|
+
}
|
|
21016
|
+
};
|
|
21017
|
+
}
|
|
21018
|
+
}
|
|
21019
|
+
const evidence = certificates.flatMap((certificate) => certificate.evidence);
|
|
21020
|
+
const body = {
|
|
21021
|
+
version: RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION,
|
|
21022
|
+
scope: { ...expectedScope },
|
|
21023
|
+
claim: { ...rule.conclusion },
|
|
21024
|
+
evidence,
|
|
21025
|
+
derivation: {
|
|
21026
|
+
kind: "composition",
|
|
21027
|
+
assurance: "declared_runtime_rule",
|
|
21028
|
+
rule,
|
|
21029
|
+
premises: certificates.map(premiseFromCertificate)
|
|
21030
|
+
},
|
|
21031
|
+
issued_at: parseIssuedAt(input.issued_at || (/* @__PURE__ */ new Date()).toISOString(), "semantic certificate issued_at")
|
|
21032
|
+
};
|
|
21033
|
+
return { ok: true, certificate: withCertificateId(body) };
|
|
21034
|
+
}
|
|
21035
|
+
|
|
20565
21036
|
// src/change-proof.ts
|
|
20566
21037
|
var RIDDLE_PROOF_CHANGE_CONTRACT_VERSION = "riddle-proof.change-contract.v1";
|
|
20567
21038
|
var RIDDLE_PROOF_CHANGE_RESULT_VERSION = "riddle-proof.change-result.v1";
|
|
@@ -21019,7 +21490,7 @@ function createRiddleProofChangeReceipt(input) {
|
|
|
21019
21490
|
metadata: input.result.metadata
|
|
21020
21491
|
};
|
|
21021
21492
|
}
|
|
21022
|
-
function
|
|
21493
|
+
function isRecord5(value) {
|
|
21023
21494
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
21024
21495
|
}
|
|
21025
21496
|
function migratedObservationFromLegacySide(side, legacy) {
|
|
@@ -21096,7 +21567,7 @@ function migrateRiddleProofChangeReceipt(legacy) {
|
|
|
21096
21567
|
};
|
|
21097
21568
|
}
|
|
21098
21569
|
function parseRiddleProofChangeReceipt(value) {
|
|
21099
|
-
if (!
|
|
21570
|
+
if (!isRecord5(value)) throw new Error("Change receipt must be an object.");
|
|
21100
21571
|
if (value.version === RIDDLE_PROOF_CHANGE_RECEIPT_V1_VERSION) {
|
|
21101
21572
|
return migrateRiddleProofChangeReceipt(value);
|
|
21102
21573
|
}
|
|
@@ -21140,8 +21611,8 @@ function createRiddleProofHandoffReceipt(changeReceipt, options = {}) {
|
|
|
21140
21611
|
};
|
|
21141
21612
|
}
|
|
21142
21613
|
function parseRiddleProofHandoffReceipt(value) {
|
|
21143
|
-
if (!
|
|
21144
|
-
throw new Error(`Unsupported Handoff receipt version ${String(
|
|
21614
|
+
if (!isRecord5(value) || value.version !== RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION) {
|
|
21615
|
+
throw new Error(`Unsupported Handoff receipt version ${String(isRecord5(value) ? value.version || "missing" : "missing")}.`);
|
|
21145
21616
|
}
|
|
21146
21617
|
const receipt = value;
|
|
21147
21618
|
if (!Number.isFinite(Date.parse(receipt.created_at))) {
|
|
@@ -22612,6 +23083,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
22612
23083
|
RIDDLE_PROOF_PR_COMMENT_MARKER,
|
|
22613
23084
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
22614
23085
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
23086
|
+
RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION,
|
|
22615
23087
|
RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION,
|
|
22616
23088
|
RIDDLE_PROOF_VISUAL_SESSION_VERSION,
|
|
22617
23089
|
RIDDLE_UNSUBMITTED_WAKE_HINT,
|
|
@@ -22653,6 +23125,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
22653
23125
|
compactBasicGameplayText,
|
|
22654
23126
|
compactRecord,
|
|
22655
23127
|
compareVisualProofSessionFingerprint,
|
|
23128
|
+
composeRiddleProofSemanticCertificates,
|
|
22656
23129
|
createBasicGameplayCatchRecords,
|
|
22657
23130
|
createBasicGameplayCatchSummary,
|
|
22658
23131
|
createCaptureDiagnostic,
|
|
@@ -22670,6 +23143,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
22670
23143
|
createRiddleProofProfileEnvironmentBlockedResult,
|
|
22671
23144
|
createRiddleProofProfileInsufficientResult,
|
|
22672
23145
|
createRiddleProofRunCard,
|
|
23146
|
+
createRiddleProofSemanticCertificate,
|
|
22673
23147
|
createRunResult,
|
|
22674
23148
|
createRunState,
|
|
22675
23149
|
createRunStatusSnapshot,
|
|
@@ -22699,6 +23173,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
22699
23173
|
parseRiddleProofChangeReceipt,
|
|
22700
23174
|
parseRiddleProofHandoffReceipt,
|
|
22701
23175
|
parseRiddleProofObservationReceipt,
|
|
23176
|
+
parseRiddleProofSemanticCertificate,
|
|
22702
23177
|
parseRiddleViewport,
|
|
22703
23178
|
parseVisualProofSession,
|
|
22704
23179
|
pollRiddleJob,
|
|
@@ -22722,6 +23197,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
22722
23197
|
riddleProofPublicStateAllowsClaim,
|
|
22723
23198
|
riddleProofPublicStateAllowsMergeRecommendation,
|
|
22724
23199
|
riddleProofPublicStateMergeRecommendation,
|
|
23200
|
+
riddleProofSemanticScopesEqual,
|
|
22725
23201
|
riddleRequestJson,
|
|
22726
23202
|
runCodexExecAgentDoctor,
|
|
22727
23203
|
runLocalAgentDoctor,
|
package/dist/index.d.cts
CHANGED
|
@@ -14,6 +14,7 @@ export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_G
|
|
|
14
14
|
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_ORDERED_TRACE_OPERATORS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofOrderedTraceAssessment, RiddleProofOrderedTraceEvent, RiddleProofOrderedTraceOperator, RiddleProofOrderedTracePredicate, RiddleProofOrderedTraceWitness, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofOrderedTrace, assessRiddleProofOrderedTraceSetupResults, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
15
15
|
export { RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION, RiddleProofProfileChangedTextInput, RiddleProofProfileSuggestion, RiddleProofProfileSuggestionInput, RiddleProofProfileSuggestionsResult, suggestRiddleProofProfileChecks } from './profile-suggestions.cjs';
|
|
16
16
|
export { CreateRiddleProofObservationReceiptInput, RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, RiddlePreviewReceipt, RiddleProofComparisonRole, RiddleProofExecutionPhase, RiddleProofExecutionTelemetry, RiddleProofObservationArtifact, RiddleProofObservationArtifactRole, RiddleProofObservationExecutor, RiddleProofObservationExecutorKind, RiddleProofObservationPublication, RiddleProofObservationReceipt, RiddleProofObservationTarget, RiddleProofSourceIdentity, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt } from './receipts.cjs';
|
|
17
|
+
export { ComposeRiddleProofSemanticCertificatesInput, CreateRiddleProofSemanticCertificateInput, RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION, RiddleProofSemanticCertificate, RiddleProofSemanticCertificationResult, RiddleProofSemanticClaim, RiddleProofSemanticClaimRef, RiddleProofSemanticCompositionDerivation, RiddleProofSemanticCompositionError, RiddleProofSemanticCompositionResult, RiddleProofSemanticContract, RiddleProofSemanticContractDerivation, RiddleProofSemanticContractError, RiddleProofSemanticContractRef, RiddleProofSemanticContractRejected, RiddleProofSemanticDerivation, RiddleProofSemanticEvidenceBundle, RiddleProofSemanticEvidenceRef, RiddleProofSemanticPremise, RiddleProofSemanticPremiseCountMismatch, RiddleProofSemanticPremiseMismatch, RiddleProofSemanticRule, RiddleProofSemanticRuntimeContract, RiddleProofSemanticScope, RiddleProofSemanticScopeField, RiddleProofSemanticScopeMismatch, composeRiddleProofSemanticCertificates, createRiddleProofSemanticCertificate, parseRiddleProofSemanticCertificate, riddleProofSemanticScopesEqual } from './semantic-certificate.cjs';
|
|
17
18
|
export { AssessRiddleProofChangeInput, CreateRiddleProofChangeReceiptInput, RIDDLE_PROOF_CHANGE_CONTRACT_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_V1_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_VERSION, RIDDLE_PROOF_CHANGE_RESULT_VERSION, RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION, RiddleProofChangeContract, RiddleProofChangeDelta, RiddleProofChangeDeltaResult, RiddleProofChangeDeltaStatus, RiddleProofChangeGroupContract, RiddleProofChangeGroupResult, RiddleProofChangeProfileCheckStatus, RiddleProofChangeReceipt, RiddleProofChangeReceiptArtifact, RiddleProofChangeReceiptArtifactKind, RiddleProofChangeReceiptCheckCounts, RiddleProofChangeReceiptDelta, RiddleProofChangeReceiptSide, RiddleProofChangeReceiptVerdict, RiddleProofChangeRecommendation, RiddleProofChangeResult, RiddleProofChangeSide, RiddleProofChangeSourceBindingContract, RiddleProofChangeSourceBindingRequirement, RiddleProofChangeSourceBindingResult, RiddleProofChangeSourceBindingStatus, RiddleProofChangeStatus, RiddleProofCheckStatusTransitionDelta, RiddleProofHandoffReceipt, RiddleProofLegacyChangeReceipt, RiddleProofProfileStatusTransitionDelta, RiddleProofShippingAuthorization, assessRiddleProofChange, createRiddleProofChangeReceipt, createRiddleProofHandoffReceipt, migrateRiddleProofChangeReceipt, parseRiddleProofChangeReceipt, parseRiddleProofHandoffReceipt, riddleProofChangeReceiptHtml, riddleProofChangeReceiptMarkdown } from './change-proof.cjs';
|
|
18
19
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RIDDLE_UNSUBMITTED_WAKE_HINT, RiddleApiError, RiddleApiKeySource, RiddleBalanceResult, RiddleClientConfig, RiddleFetch, RiddlePollJobOptions, RiddlePollJobResult, RiddlePollProgressSnapshot, RiddlePollSummary, RiddlePreviewDeployOptions, RiddlePreviewDeployProgressSnapshot, RiddlePreviewDeployResult, RiddlePreviewDeployStage, RiddlePreviewFramework, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, collectRiddlePreviewDeployWarnings, createRiddleApiClient, deployRiddlePreview, deployRiddleStaticPreview, detectRiddlePreviewSource, getRiddleBalance, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, resolveRiddleApiKeySource, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.cjs';
|
|
19
20
|
export { RIDDLE_PROOF_PR_COMMENT_MARKER, RiddleProofPrCommentArtifact, RiddleProofPrCommentArtifactKind, RiddleProofPrCommentCheckpointSummary, RiddleProofPrCommentInput, RiddleProofPrCommentPageSummary, RiddleProofPrCommentSummary, buildRiddleProofHandoffPrCommentMarkdown, buildRiddleProofPrCommentMarkdown, summarizeRiddleProofPrComment } from './pr-comment.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_G
|
|
|
14
14
|
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_ORDERED_TRACE_OPERATORS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofOrderedTraceAssessment, RiddleProofOrderedTraceEvent, RiddleProofOrderedTraceOperator, RiddleProofOrderedTracePredicate, RiddleProofOrderedTraceWitness, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofOrderedTrace, assessRiddleProofOrderedTraceSetupResults, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
15
15
|
export { RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION, RiddleProofProfileChangedTextInput, RiddleProofProfileSuggestion, RiddleProofProfileSuggestionInput, RiddleProofProfileSuggestionsResult, suggestRiddleProofProfileChecks } from './profile-suggestions.js';
|
|
16
16
|
export { CreateRiddleProofObservationReceiptInput, RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, RiddlePreviewReceipt, RiddleProofComparisonRole, RiddleProofExecutionPhase, RiddleProofExecutionTelemetry, RiddleProofObservationArtifact, RiddleProofObservationArtifactRole, RiddleProofObservationExecutor, RiddleProofObservationExecutorKind, RiddleProofObservationPublication, RiddleProofObservationReceipt, RiddleProofObservationTarget, RiddleProofSourceIdentity, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt } from './receipts.js';
|
|
17
|
+
export { ComposeRiddleProofSemanticCertificatesInput, CreateRiddleProofSemanticCertificateInput, RIDDLE_PROOF_SEMANTIC_CERTIFICATE_VERSION, RiddleProofSemanticCertificate, RiddleProofSemanticCertificationResult, RiddleProofSemanticClaim, RiddleProofSemanticClaimRef, RiddleProofSemanticCompositionDerivation, RiddleProofSemanticCompositionError, RiddleProofSemanticCompositionResult, RiddleProofSemanticContract, RiddleProofSemanticContractDerivation, RiddleProofSemanticContractError, RiddleProofSemanticContractRef, RiddleProofSemanticContractRejected, RiddleProofSemanticDerivation, RiddleProofSemanticEvidenceBundle, RiddleProofSemanticEvidenceRef, RiddleProofSemanticPremise, RiddleProofSemanticPremiseCountMismatch, RiddleProofSemanticPremiseMismatch, RiddleProofSemanticRule, RiddleProofSemanticRuntimeContract, RiddleProofSemanticScope, RiddleProofSemanticScopeField, RiddleProofSemanticScopeMismatch, composeRiddleProofSemanticCertificates, createRiddleProofSemanticCertificate, parseRiddleProofSemanticCertificate, riddleProofSemanticScopesEqual } from './semantic-certificate.js';
|
|
17
18
|
export { AssessRiddleProofChangeInput, CreateRiddleProofChangeReceiptInput, RIDDLE_PROOF_CHANGE_CONTRACT_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_V1_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_VERSION, RIDDLE_PROOF_CHANGE_RESULT_VERSION, RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION, RiddleProofChangeContract, RiddleProofChangeDelta, RiddleProofChangeDeltaResult, RiddleProofChangeDeltaStatus, RiddleProofChangeGroupContract, RiddleProofChangeGroupResult, RiddleProofChangeProfileCheckStatus, RiddleProofChangeReceipt, RiddleProofChangeReceiptArtifact, RiddleProofChangeReceiptArtifactKind, RiddleProofChangeReceiptCheckCounts, RiddleProofChangeReceiptDelta, RiddleProofChangeReceiptSide, RiddleProofChangeReceiptVerdict, RiddleProofChangeRecommendation, RiddleProofChangeResult, RiddleProofChangeSide, RiddleProofChangeSourceBindingContract, RiddleProofChangeSourceBindingRequirement, RiddleProofChangeSourceBindingResult, RiddleProofChangeSourceBindingStatus, RiddleProofChangeStatus, RiddleProofCheckStatusTransitionDelta, RiddleProofHandoffReceipt, RiddleProofLegacyChangeReceipt, RiddleProofProfileStatusTransitionDelta, RiddleProofShippingAuthorization, assessRiddleProofChange, createRiddleProofChangeReceipt, createRiddleProofHandoffReceipt, migrateRiddleProofChangeReceipt, parseRiddleProofChangeReceipt, parseRiddleProofHandoffReceipt, riddleProofChangeReceiptHtml, riddleProofChangeReceiptMarkdown } from './change-proof.js';
|
|
18
19
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RIDDLE_UNSUBMITTED_WAKE_HINT, RiddleApiError, RiddleApiKeySource, RiddleBalanceResult, RiddleClientConfig, RiddleFetch, RiddlePollJobOptions, RiddlePollJobResult, RiddlePollProgressSnapshot, RiddlePollSummary, RiddlePreviewDeployOptions, RiddlePreviewDeployProgressSnapshot, RiddlePreviewDeployResult, RiddlePreviewDeployStage, RiddlePreviewFramework, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, collectRiddlePreviewDeployWarnings, createRiddleApiClient, deployRiddlePreview, deployRiddleStaticPreview, detectRiddlePreviewSource, getRiddleBalance, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, resolveRiddleApiKeySource, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.js';
|
|
19
20
|
export { RIDDLE_PROOF_PR_COMMENT_MARKER, RiddleProofPrCommentArtifact, RiddleProofPrCommentArtifactKind, RiddleProofPrCommentCheckpointSummary, RiddleProofPrCommentInput, RiddleProofPrCommentPageSummary, RiddleProofPrCommentSummary, buildRiddleProofHandoffPrCommentMarkdown, buildRiddleProofPrCommentMarkdown, summarizeRiddleProofPrComment } from './pr-comment.js';
|