@riddledc/riddle-proof 0.8.58 → 0.8.60
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/dist/adapters/codex-exec-agent.d.cts +1 -0
- package/dist/adapters/codex-exec-agent.d.ts +1 -0
- package/dist/adapters/codex-exec-agent.js +3 -2
- package/dist/adapters/codex.d.cts +1 -0
- package/dist/adapters/codex.d.ts +1 -0
- package/dist/adapters/codex.js +3 -2
- package/dist/adapters/local-agent.d.cts +1 -0
- package/dist/adapters/local-agent.d.ts +1 -0
- package/dist/adapters/local-agent.js +3 -2
- package/dist/adapters/openclaw.d.cts +1 -0
- package/dist/adapters/openclaw.d.ts +1 -0
- package/dist/adapters/openclaw.js +6 -5
- package/dist/advanced/engine-harness.cjs +253 -43
- package/dist/advanced/engine-harness.d.cts +1 -0
- package/dist/advanced/engine-harness.d.ts +1 -0
- package/dist/advanced/engine-harness.js +6 -5
- package/dist/advanced/index.cjs +253 -43
- package/dist/advanced/index.d.cts +1 -0
- package/dist/advanced/index.d.ts +1 -0
- package/dist/advanced/index.js +7 -6
- package/dist/advanced/runner.cjs +202 -4
- package/dist/advanced/runner.d.cts +1 -0
- package/dist/advanced/runner.d.ts +1 -0
- package/dist/advanced/runner.js +6 -5
- package/dist/checkpoint.d.cts +1 -0
- package/dist/checkpoint.d.ts +1 -0
- package/dist/checkpoint.js +3 -2
- package/dist/{chunk-TTB3ZAVX.js → chunk-3FK5HZHK.js} +2 -2
- package/dist/{chunk-ONOPGCID.js → chunk-AWRBSVNW.js} +4 -4
- package/dist/{chunk-MOTQNIZX.js → chunk-FX2CB4MG.js} +1 -1
- package/dist/{chunk-62XLYPMS.js → chunk-HZOILEGF.js} +15 -2
- package/dist/{chunk-KNPCWWF3.js → chunk-NXEAFQYZ.js} +16 -10
- package/dist/{chunk-GHBNDHG7.js → chunk-PCEDAQPG.js} +4 -4
- package/dist/{chunk-CUBYSWZT.js → chunk-QGMSN34W.js} +51 -4
- package/dist/{chunk-RS4HJLJQ.js → chunk-QPKY767W.js} +1 -1
- package/dist/{chunk-UZIX7M7D.js → chunk-UEY5SJG5.js} +13 -9
- package/dist/{chunk-KG64Y5MC.js → chunk-WKIIJX3O.js} +12 -0
- package/dist/{chunk-JLOZTVXU.js → chunk-XKNJ5OE4.js} +2 -2
- package/dist/cli/index.js +9 -9
- package/dist/cli.cjs +473 -403
- package/dist/cli.js +9 -9
- package/dist/codex-exec-agent.d.cts +1 -0
- package/dist/codex-exec-agent.d.ts +1 -0
- package/dist/codex-exec-agent.js +3 -2
- package/dist/diagnostics.d.cts +1 -0
- package/dist/diagnostics.d.ts +1 -0
- package/dist/engine-harness.cjs +253 -43
- package/dist/engine-harness.d.cts +1 -0
- package/dist/engine-harness.d.ts +1 -0
- package/dist/engine-harness.js +6 -5
- package/dist/index.cjs +248 -168
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -11
- package/dist/local-agent.d.cts +1 -0
- package/dist/local-agent.d.ts +1 -0
- package/dist/local-agent.js +3 -2
- package/dist/openclaw.d.cts +1 -0
- package/dist/openclaw.d.ts +1 -0
- package/dist/openclaw.js +6 -5
- package/dist/pr-comment.cjs +19 -1
- package/dist/pr-comment.d.cts +2 -0
- package/dist/pr-comment.d.ts +2 -0
- package/dist/pr-comment.js +2 -2
- package/dist/profile/index.d.cts +1 -0
- package/dist/profile/index.d.ts +1 -0
- package/dist/profile.d.cts +1 -0
- package/dist/profile.d.ts +1 -0
- package/dist/proof-session.d.cts +1 -0
- package/dist/proof-session.d.ts +1 -0
- package/dist/public-state.cjs +15 -0
- package/dist/public-state.d.cts +4 -1
- package/dist/public-state.d.ts +4 -1
- package/dist/public-state.js +7 -1
- package/dist/result.cjs +211 -4
- package/dist/result.d.cts +12 -1
- package/dist/result.d.ts +12 -1
- package/dist/result.js +6 -1
- package/dist/run-card.cjs +198 -40
- package/dist/run-card.d.cts +1 -0
- package/dist/run-card.d.ts +1 -0
- package/dist/run-card.js +4 -3
- package/dist/runner.cjs +202 -4
- package/dist/runner.d.cts +1 -0
- package/dist/runner.d.ts +1 -0
- package/dist/runner.js +6 -5
- package/dist/spec/checkpoint.d.cts +1 -0
- package/dist/spec/checkpoint.d.ts +1 -0
- package/dist/spec/checkpoint.js +3 -2
- package/dist/spec/index.cjs +235 -167
- package/dist/spec/index.d.cts +2 -2
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +17 -7
- package/dist/spec/public-state.cjs +15 -0
- package/dist/spec/public-state.d.cts +1 -1
- package/dist/spec/public-state.d.ts +1 -1
- package/dist/spec/public-state.js +7 -1
- package/dist/spec/result.cjs +209 -4
- package/dist/spec/result.d.cts +2 -1
- package/dist/spec/result.d.ts +2 -1
- package/dist/spec/result.js +6 -1
- package/dist/spec/run-card.cjs +198 -40
- package/dist/spec/run-card.d.cts +1 -0
- package/dist/spec/run-card.d.ts +1 -0
- package/dist/spec/run-card.js +4 -3
- package/dist/spec/state.cjs +207 -45
- package/dist/spec/state.d.cts +1 -0
- package/dist/spec/state.d.ts +1 -0
- package/dist/spec/state.js +5 -4
- package/dist/spec/types.d.cts +1 -0
- package/dist/spec/types.d.ts +1 -0
- package/dist/state.cjs +207 -45
- package/dist/state.d.cts +1 -0
- package/dist/state.d.ts +1 -0
- package/dist/state.js +5 -4
- package/dist/types.d.cts +14 -0
- package/dist/types.d.ts +14 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3511,6 +3511,8 @@ __export(index_exports, {
|
|
|
3511
3511
|
preflightRiddleProofProfileHttpStatusChecks: () => preflightRiddleProofProfileHttpStatusChecks,
|
|
3512
3512
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
3513
3513
|
proofContractFromAuthorCheckpointResponse: () => proofContractFromAuthorCheckpointResponse,
|
|
3514
|
+
publicMergeRecommendationForRunState: () => publicMergeRecommendationForRunState,
|
|
3515
|
+
publicStateForRunState: () => publicStateForRunState,
|
|
3514
3516
|
readRiddleProofRunStatus: () => readRiddleProofRunStatus,
|
|
3515
3517
|
recordValue: () => recordValue,
|
|
3516
3518
|
redactForProofDiagnostics: () => redactForProofDiagnostics,
|
|
@@ -3520,6 +3522,9 @@ __export(index_exports, {
|
|
|
3520
3522
|
resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
|
|
3521
3523
|
resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
|
|
3522
3524
|
resolveRiddleProofProfileTimeoutSec: () => resolveRiddleProofProfileTimeoutSec,
|
|
3525
|
+
riddleProofPublicStateAllowsClaim: () => riddleProofPublicStateAllowsClaim,
|
|
3526
|
+
riddleProofPublicStateAllowsMergeRecommendation: () => riddleProofPublicStateAllowsMergeRecommendation,
|
|
3527
|
+
riddleProofPublicStateMergeRecommendation: () => riddleProofPublicStateMergeRecommendation,
|
|
3523
3528
|
riddleRequestJson: () => riddleRequestJson,
|
|
3524
3529
|
runCodexExecAgentDoctor: () => runCodexExecAgentDoctor,
|
|
3525
3530
|
runLocalAgentDoctor: () => runCodexExecAgentDoctor,
|
|
@@ -3541,6 +3546,167 @@ __export(index_exports, {
|
|
|
3541
3546
|
});
|
|
3542
3547
|
module.exports = __toCommonJS(index_exports);
|
|
3543
3548
|
|
|
3549
|
+
// src/public-state.ts
|
|
3550
|
+
function riddleProofPublicStateAllowsClaim(summary, claim) {
|
|
3551
|
+
return !summary?.prohibited_claims.includes(claim);
|
|
3552
|
+
}
|
|
3553
|
+
function riddleProofPublicStateAllowsMergeRecommendation(summary) {
|
|
3554
|
+
return riddleProofPublicStateAllowsClaim(summary, "merge_ready") && riddleProofPublicStateAllowsClaim(summary, "sync_allowed");
|
|
3555
|
+
}
|
|
3556
|
+
function riddleProofPublicStateMergeRecommendation(summary, recommendation) {
|
|
3557
|
+
return recommendation && riddleProofPublicStateAllowsMergeRecommendation(summary) ? recommendation : void 0;
|
|
3558
|
+
}
|
|
3559
|
+
function asRecord(value) {
|
|
3560
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
3561
|
+
}
|
|
3562
|
+
function stringValue(value) {
|
|
3563
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
3564
|
+
}
|
|
3565
|
+
function booleanValue(value) {
|
|
3566
|
+
return typeof value === "boolean" ? value : void 0;
|
|
3567
|
+
}
|
|
3568
|
+
function numberValue(value) {
|
|
3569
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
3570
|
+
}
|
|
3571
|
+
function firstStringValue(...values) {
|
|
3572
|
+
for (const value of values) {
|
|
3573
|
+
const text = stringValue(value);
|
|
3574
|
+
if (text) return text;
|
|
3575
|
+
}
|
|
3576
|
+
return void 0;
|
|
3577
|
+
}
|
|
3578
|
+
function firstBooleanValue(...values) {
|
|
3579
|
+
for (const value of values) {
|
|
3580
|
+
const bool = booleanValue(value);
|
|
3581
|
+
if (typeof bool === "boolean") return bool;
|
|
3582
|
+
}
|
|
3583
|
+
return void 0;
|
|
3584
|
+
}
|
|
3585
|
+
function firstRecordValue(...values) {
|
|
3586
|
+
for (const value of values) {
|
|
3587
|
+
const record = asRecord(value);
|
|
3588
|
+
if (Object.keys(record).length) return record;
|
|
3589
|
+
}
|
|
3590
|
+
return void 0;
|
|
3591
|
+
}
|
|
3592
|
+
function countValue(value) {
|
|
3593
|
+
const number = numberValue(value);
|
|
3594
|
+
return typeof number === "number" && number > 0 ? Math.trunc(number) : 0;
|
|
3595
|
+
}
|
|
3596
|
+
function checkpointSummaryFrom(...values) {
|
|
3597
|
+
const record = firstRecordValue(...values);
|
|
3598
|
+
if (!record) return void 0;
|
|
3599
|
+
const accepted = countValue(record.response_count);
|
|
3600
|
+
const rejected = countValue(record.rejected_response_count);
|
|
3601
|
+
const ignored = countValue(record.ignored_response_count);
|
|
3602
|
+
const duplicate = countValue(record.duplicate_response_count);
|
|
3603
|
+
const summary = {
|
|
3604
|
+
pending: booleanValue(record.pending),
|
|
3605
|
+
accepted_response_count: accepted,
|
|
3606
|
+
rejected_response_count: rejected,
|
|
3607
|
+
ignored_response_count: ignored,
|
|
3608
|
+
duplicate_response_count: duplicate,
|
|
3609
|
+
latest_decision: stringValue(record.latest_decision),
|
|
3610
|
+
audit_disclosure_required: rejected > 0 || ignored > 0 || duplicate > 0
|
|
3611
|
+
};
|
|
3612
|
+
return Object.values(summary).some((value) => typeof value !== "undefined") ? summary : void 0;
|
|
3613
|
+
}
|
|
3614
|
+
function uniqueStrings(values) {
|
|
3615
|
+
return [...new Set(values.filter(Boolean))];
|
|
3616
|
+
}
|
|
3617
|
+
function summarizeRiddleProofPublicState(input) {
|
|
3618
|
+
const record = asRecord(input);
|
|
3619
|
+
const runCard = asRecord(record.run_card);
|
|
3620
|
+
const stopCondition = asRecord(runCard.stop_condition);
|
|
3621
|
+
const raw = asRecord(record.raw);
|
|
3622
|
+
const request = asRecord(record.request);
|
|
3623
|
+
const requestMetadata = asRecord(record.request_metadata);
|
|
3624
|
+
const prState = asRecord(record.pr_state);
|
|
3625
|
+
const handoff = asRecord(record.pr_handoff_policy);
|
|
3626
|
+
const handoffState = stringValue(handoff.state);
|
|
3627
|
+
const status = firstStringValue(record.status, stopCondition.status);
|
|
3628
|
+
const ok = booleanValue(record.ok) ?? null;
|
|
3629
|
+
const shipMode = firstStringValue(request.ship_mode, requestMetadata.ship_mode, record.ship_mode, handoff.ship_mode);
|
|
3630
|
+
const explicitShippingDisabled = firstBooleanValue(
|
|
3631
|
+
record.shipping_disabled,
|
|
3632
|
+
stopCondition.shipping_disabled,
|
|
3633
|
+
raw.shipping_disabled,
|
|
3634
|
+
handoff.shipping_disabled
|
|
3635
|
+
);
|
|
3636
|
+
const shippingDisabled = explicitShippingDisabled === true || shipMode === "none" || handoffState === "proof_complete_ship_disabled";
|
|
3637
|
+
const explicitShipAuthorized = firstBooleanValue(
|
|
3638
|
+
record.ship_authorized,
|
|
3639
|
+
stopCondition.ship_authorized,
|
|
3640
|
+
raw.ship_authorized
|
|
3641
|
+
);
|
|
3642
|
+
const authorizationEvidence = Boolean(
|
|
3643
|
+
status === "shipped" || record.marked_ready === true || stringValue(prState.status) === "merged" || record.merge_commit || record.merged_at
|
|
3644
|
+
);
|
|
3645
|
+
const shipAuthorizedBeforeHold = explicitShipAuthorized ?? authorizationEvidence;
|
|
3646
|
+
const explicitShipHeld = firstBooleanValue(record.ship_held, stopCondition.ship_held, raw.ship_held);
|
|
3647
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !shipAuthorizedBeforeHold;
|
|
3648
|
+
const shipHeld = explicitShipHeld === true || inferredHeld;
|
|
3649
|
+
const shipAuthorized = shipHeld ? false : shipAuthorizedBeforeHold === true;
|
|
3650
|
+
const proofComplete = Boolean(
|
|
3651
|
+
status === "ready_to_ship" || status === "shipped" || status === "completed" || status === "passed" || ok === true || handoff.proof_complete === true
|
|
3652
|
+
);
|
|
3653
|
+
const checkpointSummary = checkpointSummaryFrom(
|
|
3654
|
+
record.checkpoint_summary,
|
|
3655
|
+
stopCondition.checkpoint_summary,
|
|
3656
|
+
asRecord(record.details).checkpoint_summary,
|
|
3657
|
+
asRecord(raw.details).checkpoint_summary
|
|
3658
|
+
);
|
|
3659
|
+
const blockedOrWaiting = status === "blocked" || status === "failed" || status === "awaiting_checkpoint" || handoffState === "proof_blocked" || handoffState === "proof_review_required" || handoffState === "proof_failed" || handoffState === "proof_checkpoint_required";
|
|
3660
|
+
const proofPassed = Boolean(proofComplete && !blockedOrWaiting);
|
|
3661
|
+
const explicitMergeReady = firstBooleanValue(record.merge_ready, stopCondition.merge_ready, raw.merge_ready, handoff.merge_ready);
|
|
3662
|
+
const normalPrAllowed = firstBooleanValue(record.normal_pr_allowed, raw.normal_pr_allowed, handoff.normal_pr_allowed);
|
|
3663
|
+
const baseHandoffAllowed = !blockedOrWaiting && !shipHeld && !shippingDisabled;
|
|
3664
|
+
const mergeReady = baseHandoffAllowed && normalPrAllowed !== false && (explicitMergeReady ?? shipAuthorized);
|
|
3665
|
+
const syncAllowed = mergeReady;
|
|
3666
|
+
let policyState = "unknown";
|
|
3667
|
+
if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") policyState = "awaiting_checkpoint";
|
|
3668
|
+
else if (status === "failed" || handoffState === "proof_failed") policyState = "proof_failed";
|
|
3669
|
+
else if (status === "blocked" || handoffState === "proof_blocked" || handoffState === "proof_review_required") policyState = "proof_blocked";
|
|
3670
|
+
else if (handoffState === "proof_complete_ship_disabled") policyState = "proof_complete_ship_disabled";
|
|
3671
|
+
else if (proofComplete && shipHeld && !shipAuthorized) policyState = "proof_passed_ship_held";
|
|
3672
|
+
else if (proofComplete && shippingDisabled && !shipAuthorized) policyState = "proof_complete_ship_disabled";
|
|
3673
|
+
else if (shipAuthorized) policyState = "ship_authorized";
|
|
3674
|
+
else if (proofPassed) policyState = "proof_passed";
|
|
3675
|
+
else if (status === "running") policyState = "proof_in_progress";
|
|
3676
|
+
const requiredDisclosures = [];
|
|
3677
|
+
if (shipHeld) requiredDisclosures.push("ship_held");
|
|
3678
|
+
if (shippingDisabled) requiredDisclosures.push("shipping_disabled");
|
|
3679
|
+
if (checkpointSummary?.audit_disclosure_required) requiredDisclosures.push("checkpoint_audit_counters");
|
|
3680
|
+
if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") requiredDisclosures.push("checkpoint_required");
|
|
3681
|
+
const prohibitedClaims = [];
|
|
3682
|
+
if (!shipAuthorized || shipHeld || shippingDisabled) prohibitedClaims.push("ship_authorized", "shipped");
|
|
3683
|
+
if (!mergeReady) prohibitedClaims.push("merge_ready");
|
|
3684
|
+
if (!syncAllowed) prohibitedClaims.push("sync_allowed");
|
|
3685
|
+
if (blockedOrWaiting) {
|
|
3686
|
+
prohibitedClaims.push("proof_passed", "ready_to_ship");
|
|
3687
|
+
}
|
|
3688
|
+
if (checkpointSummary?.audit_disclosure_required) {
|
|
3689
|
+
prohibitedClaims.push("all_checkpoint_responses_accepted");
|
|
3690
|
+
}
|
|
3691
|
+
const resultLabel2 = policyState === "awaiting_checkpoint" ? "checkpoint required" : policyState === "proof_blocked" ? "blocked" : policyState === "proof_failed" ? "failed" : policyState === "proof_complete_ship_disabled" ? "proof complete; shipping disabled" : policyState === "proof_passed_ship_held" ? "proof passed; ship held" : policyState === "ship_authorized" ? status === "shipped" ? "shipped" : "ship authorized" : policyState === "proof_passed" ? "passed" : policyState === "proof_in_progress" ? "running" : status || "recorded";
|
|
3692
|
+
return {
|
|
3693
|
+
status,
|
|
3694
|
+
ok,
|
|
3695
|
+
policy_state: policyState,
|
|
3696
|
+
result_label: resultLabel2,
|
|
3697
|
+
proof_complete: proofComplete,
|
|
3698
|
+
proof_passed: proofPassed,
|
|
3699
|
+
ship_held: shipHeld,
|
|
3700
|
+
shipping_disabled: shippingDisabled,
|
|
3701
|
+
ship_authorized: shipAuthorized,
|
|
3702
|
+
merge_ready: mergeReady,
|
|
3703
|
+
sync_allowed: syncAllowed,
|
|
3704
|
+
checkpoint_summary: checkpointSummary,
|
|
3705
|
+
required_disclosures: uniqueStrings(requiredDisclosures),
|
|
3706
|
+
prohibited_claims: uniqueStrings(prohibitedClaims)
|
|
3707
|
+
};
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3544
3710
|
// src/result.ts
|
|
3545
3711
|
function isTerminalStatus(status) {
|
|
3546
3712
|
return status === "blocked" || status === "failed" || status === "ready_to_ship" || status === "shipped" || status === "completed";
|
|
@@ -3715,6 +3881,37 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
3715
3881
|
if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
|
|
3716
3882
|
return state;
|
|
3717
3883
|
}
|
|
3884
|
+
function publicStateForRunState(input) {
|
|
3885
|
+
const state = input.state;
|
|
3886
|
+
const status = input.status || state.status;
|
|
3887
|
+
const raw = recordValue(input.raw) || {};
|
|
3888
|
+
const extendedState = state;
|
|
3889
|
+
const terminalOk = isTerminalStatus(status) ? state.ok : void 0;
|
|
3890
|
+
return summarizeRiddleProofPublicState(compactRecord({
|
|
3891
|
+
status,
|
|
3892
|
+
ok: terminalOk,
|
|
3893
|
+
request: state.request,
|
|
3894
|
+
pr_state: state.pr_state,
|
|
3895
|
+
marked_ready: state.marked_ready,
|
|
3896
|
+
ship_held: state.ship_held,
|
|
3897
|
+
shipping_disabled: state.shipping_disabled,
|
|
3898
|
+
ship_authorized: state.ship_authorized,
|
|
3899
|
+
ship_mode: state.request?.ship_mode,
|
|
3900
|
+
merge_commit: state.merge_commit,
|
|
3901
|
+
merged_at: state.merged_at,
|
|
3902
|
+
checkpoint_summary: state.checkpoint_summary,
|
|
3903
|
+
pr_handoff_policy: recordValue(extendedState.pr_handoff_policy),
|
|
3904
|
+
merge_ready: extendedState.merge_ready,
|
|
3905
|
+
normal_pr_allowed: extendedState.normal_pr_allowed,
|
|
3906
|
+
raw: Object.keys(raw).length ? raw : void 0
|
|
3907
|
+
}));
|
|
3908
|
+
}
|
|
3909
|
+
function publicMergeRecommendationForRunState(input) {
|
|
3910
|
+
return riddleProofPublicStateMergeRecommendation(
|
|
3911
|
+
publicStateForRunState(input),
|
|
3912
|
+
input.state.merge_recommendation
|
|
3913
|
+
);
|
|
3914
|
+
}
|
|
3718
3915
|
function shipControlStateFor(input) {
|
|
3719
3916
|
const state = input.state;
|
|
3720
3917
|
const status = input.status || state.status;
|
|
@@ -3763,6 +3960,11 @@ function createRunResult(input) {
|
|
|
3763
3960
|
state.ok = ok;
|
|
3764
3961
|
if (isProtectedFinalStatus(status)) state.finalized = true;
|
|
3765
3962
|
applyShipControlState(state, { status, raw: input.raw });
|
|
3963
|
+
const publicState = publicStateForRunState({ state, status, raw: input.raw });
|
|
3964
|
+
const publicMergeRecommendation = riddleProofPublicStateMergeRecommendation(
|
|
3965
|
+
publicState,
|
|
3966
|
+
state.merge_recommendation
|
|
3967
|
+
);
|
|
3766
3968
|
return compactRecord({
|
|
3767
3969
|
ok,
|
|
3768
3970
|
status,
|
|
@@ -3780,9 +3982,12 @@ function createRunResult(input) {
|
|
|
3780
3982
|
pr_state: state.pr_state,
|
|
3781
3983
|
marked_ready: state.marked_ready,
|
|
3782
3984
|
left_draft: state.left_draft,
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3985
|
+
result_label: publicState.result_label,
|
|
3986
|
+
ship_held: publicState.ship_held,
|
|
3987
|
+
shipping_disabled: publicState.shipping_disabled,
|
|
3988
|
+
ship_authorized: publicState.ship_authorized,
|
|
3989
|
+
merge_ready: publicState.merge_ready,
|
|
3990
|
+
sync_allowed: publicState.sync_allowed,
|
|
3786
3991
|
ci_status: state.ci_status,
|
|
3787
3992
|
ship_commit: state.ship_commit,
|
|
3788
3993
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -3796,7 +4001,8 @@ function createRunResult(input) {
|
|
|
3796
4001
|
cleanup_report: state.cleanup_report,
|
|
3797
4002
|
notification: state.notification,
|
|
3798
4003
|
proof_decision: state.proof_decision,
|
|
3799
|
-
merge_recommendation:
|
|
4004
|
+
merge_recommendation: publicMergeRecommendation,
|
|
4005
|
+
public_state: publicState,
|
|
3800
4006
|
finalized: state.finalized,
|
|
3801
4007
|
blocker: state.blocker,
|
|
3802
4008
|
checkpoint_packet: state.checkpoint_packet,
|
|
@@ -4766,7 +4972,8 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4766
4972
|
const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
|
|
4767
4973
|
const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
|
|
4768
4974
|
const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
|
|
4769
|
-
const
|
|
4975
|
+
const publicState = publicStateForRunState({ state, status: state.status });
|
|
4976
|
+
const publicMergeRecommendation = publicMergeRecommendationForRunState({ state, status: state.status });
|
|
4770
4977
|
return {
|
|
4771
4978
|
version: RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
4772
4979
|
run_id: state.run_id || "unknown",
|
|
@@ -4820,14 +5027,18 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4820
5027
|
stop_condition: compactRecord({
|
|
4821
5028
|
status: state.status,
|
|
4822
5029
|
terminal: isTerminalStatus(state.status),
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
5030
|
+
result_label: publicState.result_label,
|
|
5031
|
+
ship_held: publicState.ship_held,
|
|
5032
|
+
shipping_disabled: publicState.shipping_disabled,
|
|
5033
|
+
ship_authorized: publicState.ship_authorized,
|
|
5034
|
+
merge_ready: publicState.merge_ready,
|
|
5035
|
+
sync_allowed: publicState.sync_allowed,
|
|
4826
5036
|
blocker_code: state.blocker?.code || null,
|
|
4827
5037
|
blocker_message: state.blocker?.message || null,
|
|
4828
5038
|
proof_decision: state.proof_decision,
|
|
4829
|
-
merge_recommendation:
|
|
4830
|
-
monitor_should_continue: !isTerminalStatus(state.status)
|
|
5039
|
+
merge_recommendation: publicMergeRecommendation,
|
|
5040
|
+
monitor_should_continue: !isTerminalStatus(state.status),
|
|
5041
|
+
public_state: publicState
|
|
4831
5042
|
}),
|
|
4832
5043
|
updated_at: state.updated_at
|
|
4833
5044
|
};
|
|
@@ -5013,8 +5224,8 @@ function appendStageHeartbeat(state, input) {
|
|
|
5013
5224
|
function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
5014
5225
|
const latestEvent = state.events[state.events.length - 1];
|
|
5015
5226
|
const runId = state.run_id || "unknown";
|
|
5016
|
-
const
|
|
5017
|
-
const existingRunCardCurrent = state.run_card?.status === state.status && state.run_card.stop_condition?.status === state.status && state.run_card.stop_condition?.terminal === isTerminalStatus(state.status) && state.run_card.stop_condition?.monitor_should_continue === !isTerminalStatus(state.status) && state.run_card.stop_condition?.ship_held ===
|
|
5227
|
+
const publicState = publicStateForRunState({ state, status: state.status });
|
|
5228
|
+
const existingRunCardCurrent = state.run_card?.status === state.status && state.run_card.stop_condition?.status === state.status && state.run_card.stop_condition?.terminal === isTerminalStatus(state.status) && state.run_card.stop_condition?.monitor_should_continue === !isTerminalStatus(state.status) && state.run_card.stop_condition?.ship_held === publicState.ship_held && state.run_card.stop_condition?.shipping_disabled === publicState.shipping_disabled && state.run_card.stop_condition?.ship_authorized === publicState.ship_authorized && state.run_card.stop_condition?.merge_ready === publicState.merge_ready && state.run_card.stop_condition?.sync_allowed === publicState.sync_allowed && state.run_card.stop_condition?.result_label === publicState.result_label;
|
|
5018
5229
|
const runCard = existingRunCardCurrent ? state.run_card : createRiddleProofRunCard(state, { at });
|
|
5019
5230
|
return compactRecord({
|
|
5020
5231
|
run_id: runId,
|
|
@@ -5028,9 +5239,13 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
|
5028
5239
|
pr_url: state.pr_url ?? null,
|
|
5029
5240
|
pr_branch: state.pr_branch ?? null,
|
|
5030
5241
|
pr_state: state.pr_state,
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5242
|
+
result_label: publicState.result_label,
|
|
5243
|
+
ship_held: publicState.ship_held,
|
|
5244
|
+
shipping_disabled: publicState.shipping_disabled,
|
|
5245
|
+
ship_authorized: publicState.ship_authorized,
|
|
5246
|
+
merge_ready: publicState.merge_ready,
|
|
5247
|
+
sync_allowed: publicState.sync_allowed,
|
|
5248
|
+
public_state: publicState,
|
|
5034
5249
|
ci_status: state.ci_status,
|
|
5035
5250
|
ship_commit: state.ship_commit,
|
|
5036
5251
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -5078,158 +5293,6 @@ function applyPrLifecycleState(state, input, at = timestamp2()) {
|
|
|
5078
5293
|
return state;
|
|
5079
5294
|
}
|
|
5080
5295
|
|
|
5081
|
-
// src/public-state.ts
|
|
5082
|
-
function asRecord(value) {
|
|
5083
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
5084
|
-
}
|
|
5085
|
-
function stringValue(value) {
|
|
5086
|
-
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
5087
|
-
}
|
|
5088
|
-
function booleanValue(value) {
|
|
5089
|
-
return typeof value === "boolean" ? value : void 0;
|
|
5090
|
-
}
|
|
5091
|
-
function numberValue(value) {
|
|
5092
|
-
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
5093
|
-
}
|
|
5094
|
-
function firstStringValue(...values) {
|
|
5095
|
-
for (const value of values) {
|
|
5096
|
-
const text = stringValue(value);
|
|
5097
|
-
if (text) return text;
|
|
5098
|
-
}
|
|
5099
|
-
return void 0;
|
|
5100
|
-
}
|
|
5101
|
-
function firstBooleanValue(...values) {
|
|
5102
|
-
for (const value of values) {
|
|
5103
|
-
const bool = booleanValue(value);
|
|
5104
|
-
if (typeof bool === "boolean") return bool;
|
|
5105
|
-
}
|
|
5106
|
-
return void 0;
|
|
5107
|
-
}
|
|
5108
|
-
function firstRecordValue(...values) {
|
|
5109
|
-
for (const value of values) {
|
|
5110
|
-
const record = asRecord(value);
|
|
5111
|
-
if (Object.keys(record).length) return record;
|
|
5112
|
-
}
|
|
5113
|
-
return void 0;
|
|
5114
|
-
}
|
|
5115
|
-
function countValue(value) {
|
|
5116
|
-
const number = numberValue(value);
|
|
5117
|
-
return typeof number === "number" && number > 0 ? Math.trunc(number) : 0;
|
|
5118
|
-
}
|
|
5119
|
-
function checkpointSummaryFrom(...values) {
|
|
5120
|
-
const record = firstRecordValue(...values);
|
|
5121
|
-
if (!record) return void 0;
|
|
5122
|
-
const accepted = countValue(record.response_count);
|
|
5123
|
-
const rejected = countValue(record.rejected_response_count);
|
|
5124
|
-
const ignored = countValue(record.ignored_response_count);
|
|
5125
|
-
const duplicate = countValue(record.duplicate_response_count);
|
|
5126
|
-
const summary = {
|
|
5127
|
-
pending: booleanValue(record.pending),
|
|
5128
|
-
accepted_response_count: accepted,
|
|
5129
|
-
rejected_response_count: rejected,
|
|
5130
|
-
ignored_response_count: ignored,
|
|
5131
|
-
duplicate_response_count: duplicate,
|
|
5132
|
-
latest_decision: stringValue(record.latest_decision),
|
|
5133
|
-
audit_disclosure_required: rejected > 0 || ignored > 0 || duplicate > 0
|
|
5134
|
-
};
|
|
5135
|
-
return Object.values(summary).some((value) => typeof value !== "undefined") ? summary : void 0;
|
|
5136
|
-
}
|
|
5137
|
-
function uniqueStrings(values) {
|
|
5138
|
-
return [...new Set(values.filter(Boolean))];
|
|
5139
|
-
}
|
|
5140
|
-
function summarizeRiddleProofPublicState(input) {
|
|
5141
|
-
const record = asRecord(input);
|
|
5142
|
-
const runCard = asRecord(record.run_card);
|
|
5143
|
-
const stopCondition = asRecord(runCard.stop_condition);
|
|
5144
|
-
const raw = asRecord(record.raw);
|
|
5145
|
-
const request = asRecord(record.request);
|
|
5146
|
-
const requestMetadata = asRecord(record.request_metadata);
|
|
5147
|
-
const prState = asRecord(record.pr_state);
|
|
5148
|
-
const handoff = asRecord(record.pr_handoff_policy);
|
|
5149
|
-
const handoffState = stringValue(handoff.state);
|
|
5150
|
-
const status = firstStringValue(record.status, stopCondition.status);
|
|
5151
|
-
const ok = booleanValue(record.ok) ?? null;
|
|
5152
|
-
const shipMode = firstStringValue(request.ship_mode, requestMetadata.ship_mode, record.ship_mode, handoff.ship_mode);
|
|
5153
|
-
const explicitShippingDisabled = firstBooleanValue(
|
|
5154
|
-
record.shipping_disabled,
|
|
5155
|
-
stopCondition.shipping_disabled,
|
|
5156
|
-
raw.shipping_disabled,
|
|
5157
|
-
handoff.shipping_disabled
|
|
5158
|
-
);
|
|
5159
|
-
const shippingDisabled = explicitShippingDisabled === true || shipMode === "none" || handoffState === "proof_complete_ship_disabled";
|
|
5160
|
-
const explicitShipAuthorized = firstBooleanValue(
|
|
5161
|
-
record.ship_authorized,
|
|
5162
|
-
stopCondition.ship_authorized,
|
|
5163
|
-
raw.ship_authorized
|
|
5164
|
-
);
|
|
5165
|
-
const authorizationEvidence = Boolean(
|
|
5166
|
-
status === "shipped" || record.marked_ready === true || stringValue(prState.status) === "merged" || record.merge_commit || record.merged_at
|
|
5167
|
-
);
|
|
5168
|
-
const shipAuthorizedBeforeHold = explicitShipAuthorized ?? authorizationEvidence;
|
|
5169
|
-
const explicitShipHeld = firstBooleanValue(record.ship_held, stopCondition.ship_held, raw.ship_held);
|
|
5170
|
-
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !shipAuthorizedBeforeHold;
|
|
5171
|
-
const shipHeld = explicitShipHeld === true || inferredHeld;
|
|
5172
|
-
const shipAuthorized = shipHeld ? false : shipAuthorizedBeforeHold === true;
|
|
5173
|
-
const proofComplete = Boolean(
|
|
5174
|
-
status === "ready_to_ship" || status === "shipped" || status === "completed" || status === "passed" || ok === true || handoff.proof_complete === true
|
|
5175
|
-
);
|
|
5176
|
-
const checkpointSummary = checkpointSummaryFrom(
|
|
5177
|
-
record.checkpoint_summary,
|
|
5178
|
-
stopCondition.checkpoint_summary,
|
|
5179
|
-
asRecord(record.details).checkpoint_summary,
|
|
5180
|
-
asRecord(raw.details).checkpoint_summary
|
|
5181
|
-
);
|
|
5182
|
-
const blockedOrWaiting = status === "blocked" || status === "failed" || status === "awaiting_checkpoint" || handoffState === "proof_blocked" || handoffState === "proof_review_required" || handoffState === "proof_failed" || handoffState === "proof_checkpoint_required";
|
|
5183
|
-
const proofPassed = Boolean(proofComplete && !blockedOrWaiting);
|
|
5184
|
-
const explicitMergeReady = firstBooleanValue(record.merge_ready, stopCondition.merge_ready, raw.merge_ready, handoff.merge_ready);
|
|
5185
|
-
const normalPrAllowed = firstBooleanValue(record.normal_pr_allowed, raw.normal_pr_allowed, handoff.normal_pr_allowed);
|
|
5186
|
-
const baseHandoffAllowed = !blockedOrWaiting && !shipHeld && !shippingDisabled;
|
|
5187
|
-
const mergeReady = baseHandoffAllowed && normalPrAllowed !== false && (explicitMergeReady ?? shipAuthorized);
|
|
5188
|
-
const syncAllowed = mergeReady;
|
|
5189
|
-
let policyState = "unknown";
|
|
5190
|
-
if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") policyState = "awaiting_checkpoint";
|
|
5191
|
-
else if (status === "failed" || handoffState === "proof_failed") policyState = "proof_failed";
|
|
5192
|
-
else if (status === "blocked" || handoffState === "proof_blocked" || handoffState === "proof_review_required") policyState = "proof_blocked";
|
|
5193
|
-
else if (handoffState === "proof_complete_ship_disabled") policyState = "proof_complete_ship_disabled";
|
|
5194
|
-
else if (proofComplete && shipHeld && !shipAuthorized) policyState = "proof_passed_ship_held";
|
|
5195
|
-
else if (proofComplete && shippingDisabled && !shipAuthorized) policyState = "proof_complete_ship_disabled";
|
|
5196
|
-
else if (shipAuthorized) policyState = "ship_authorized";
|
|
5197
|
-
else if (proofPassed) policyState = "proof_passed";
|
|
5198
|
-
else if (status === "running") policyState = "proof_in_progress";
|
|
5199
|
-
const requiredDisclosures = [];
|
|
5200
|
-
if (shipHeld) requiredDisclosures.push("ship_held");
|
|
5201
|
-
if (shippingDisabled) requiredDisclosures.push("shipping_disabled");
|
|
5202
|
-
if (checkpointSummary?.audit_disclosure_required) requiredDisclosures.push("checkpoint_audit_counters");
|
|
5203
|
-
if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") requiredDisclosures.push("checkpoint_required");
|
|
5204
|
-
const prohibitedClaims = [];
|
|
5205
|
-
if (!shipAuthorized || shipHeld || shippingDisabled) prohibitedClaims.push("ship_authorized", "shipped");
|
|
5206
|
-
if (!mergeReady) prohibitedClaims.push("merge_ready");
|
|
5207
|
-
if (!syncAllowed) prohibitedClaims.push("sync_allowed");
|
|
5208
|
-
if (blockedOrWaiting) {
|
|
5209
|
-
prohibitedClaims.push("proof_passed", "ready_to_ship");
|
|
5210
|
-
}
|
|
5211
|
-
if (checkpointSummary?.audit_disclosure_required) {
|
|
5212
|
-
prohibitedClaims.push("all_checkpoint_responses_accepted");
|
|
5213
|
-
}
|
|
5214
|
-
const resultLabel2 = policyState === "awaiting_checkpoint" ? "checkpoint required" : policyState === "proof_blocked" ? "blocked" : policyState === "proof_failed" ? "failed" : policyState === "proof_complete_ship_disabled" ? "proof complete; shipping disabled" : policyState === "proof_passed_ship_held" ? "proof passed; ship held" : policyState === "ship_authorized" ? status === "shipped" ? "shipped" : "ship authorized" : policyState === "proof_passed" ? "passed" : policyState === "proof_in_progress" ? "running" : status || "recorded";
|
|
5215
|
-
return {
|
|
5216
|
-
status,
|
|
5217
|
-
ok,
|
|
5218
|
-
policy_state: policyState,
|
|
5219
|
-
result_label: resultLabel2,
|
|
5220
|
-
proof_complete: proofComplete,
|
|
5221
|
-
proof_passed: proofPassed,
|
|
5222
|
-
ship_held: shipHeld,
|
|
5223
|
-
shipping_disabled: shippingDisabled,
|
|
5224
|
-
ship_authorized: shipAuthorized,
|
|
5225
|
-
merge_ready: mergeReady,
|
|
5226
|
-
sync_allowed: syncAllowed,
|
|
5227
|
-
checkpoint_summary: checkpointSummary,
|
|
5228
|
-
required_disclosures: uniqueStrings(requiredDisclosures),
|
|
5229
|
-
prohibited_claims: uniqueStrings(prohibitedClaims)
|
|
5230
|
-
};
|
|
5231
|
-
}
|
|
5232
|
-
|
|
5233
5296
|
// src/runner.ts
|
|
5234
5297
|
init_proof_run_core();
|
|
5235
5298
|
function errorDetails(error) {
|
|
@@ -20237,6 +20300,8 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
20237
20300
|
ship_held: publicState.ship_held,
|
|
20238
20301
|
shipping_disabled: publicState.shipping_disabled,
|
|
20239
20302
|
ship_authorized: publicState.ship_authorized,
|
|
20303
|
+
merge_ready: publicState.merge_ready,
|
|
20304
|
+
sync_allowed: publicState.sync_allowed,
|
|
20240
20305
|
proof_decision: firstStringValue2(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
|
|
20241
20306
|
merge_recommendation: firstStringValue2(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation),
|
|
20242
20307
|
checkpoint_summary: checkpointSummary,
|
|
@@ -20286,6 +20351,13 @@ function formatBool(value) {
|
|
|
20286
20351
|
function hasShipControl(summary) {
|
|
20287
20352
|
return typeof summary.ship_held === "boolean" || typeof summary.shipping_disabled === "boolean" || typeof summary.ship_authorized === "boolean";
|
|
20288
20353
|
}
|
|
20354
|
+
function hasHandoffControl(summary) {
|
|
20355
|
+
return typeof summary.merge_ready === "boolean" || typeof summary.sync_allowed === "boolean";
|
|
20356
|
+
}
|
|
20357
|
+
function shouldRenderMergeRecommendation(summary) {
|
|
20358
|
+
if (!summary.merge_recommendation) return false;
|
|
20359
|
+
return riddleProofPublicStateAllowsMergeRecommendation(summary.public_state);
|
|
20360
|
+
}
|
|
20289
20361
|
function checkpointSummaryLine(summary) {
|
|
20290
20362
|
const accepted = summary.response_count ?? 0;
|
|
20291
20363
|
const rejected = summary.rejected_response_count ?? 0;
|
|
@@ -20317,8 +20389,11 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
20317
20389
|
if (hasShipControl(summary)) {
|
|
20318
20390
|
lines.push(`**Ship control:** held=${formatBool(summary.ship_held)}, shipping_disabled=${formatBool(summary.shipping_disabled)}, authorized=${formatBool(summary.ship_authorized)}`);
|
|
20319
20391
|
}
|
|
20392
|
+
if (hasHandoffControl(summary)) {
|
|
20393
|
+
lines.push(`**Handoff:** merge_ready=${formatBool(summary.merge_ready)}, sync_allowed=${formatBool(summary.sync_allowed)}`);
|
|
20394
|
+
}
|
|
20320
20395
|
if (summary.proof_decision) lines.push(`**Proof decision:** \`${summary.proof_decision}\``);
|
|
20321
|
-
if (summary
|
|
20396
|
+
if (shouldRenderMergeRecommendation(summary)) lines.push(`**Merge recommendation:** ${summary.merge_recommendation}`);
|
|
20322
20397
|
if (summary.checkpoint_summary) lines.push(`**Checkpoints:** ${checkpointSummaryLine(summary.checkpoint_summary)}`);
|
|
20323
20398
|
if (summary.proof_url) lines.push(`**Proof URL:** ${markdownLink(summary.proof_url, summary.proof_url)}`);
|
|
20324
20399
|
if (summary.preview_id || summary.preview_url) {
|
|
@@ -20469,6 +20544,8 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
20469
20544
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
20470
20545
|
profileStatusExitCode,
|
|
20471
20546
|
proofContractFromAuthorCheckpointResponse,
|
|
20547
|
+
publicMergeRecommendationForRunState,
|
|
20548
|
+
publicStateForRunState,
|
|
20472
20549
|
readRiddleProofRunStatus,
|
|
20473
20550
|
recordValue,
|
|
20474
20551
|
redactForProofDiagnostics,
|
|
@@ -20478,6 +20555,9 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
20478
20555
|
resolveRiddleProofProfileRouteUrl,
|
|
20479
20556
|
resolveRiddleProofProfileTargetUrl,
|
|
20480
20557
|
resolveRiddleProofProfileTimeoutSec,
|
|
20558
|
+
riddleProofPublicStateAllowsClaim,
|
|
20559
|
+
riddleProofPublicStateAllowsMergeRecommendation,
|
|
20560
|
+
riddleProofPublicStateMergeRecommendation,
|
|
20481
20561
|
riddleRequestJson,
|
|
20482
20562
|
runCodexExecAgentDoctor,
|
|
20483
20563
|
runLocalAgentDoctor,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { EvidenceArtifact, EvidenceReference, ImplementationAdapter, ImplementationAdapterInput, ImplementationAdapterResult, IntegrationContext, JsonObject, JsonPrimitive, JsonValue, JudgeAdapter, NotificationAdapter, PreflightAdapter, PreflightAdapterInput, PreflightAdapterResult, ProofAdapter, ProofAdapterInput, ProofAdapterResult, RiddleProofArtifactRole, RiddleProofAssessment, RiddleProofBlocker, RiddleProofCheckpointArtifact, RiddleProofCheckpointPacket, RiddleProofCheckpointResponse, RiddleProofCheckpointRole, RiddleProofCheckpointRoutingHint, RiddleProofCheckpointSummary, RiddleProofCheckpointVisibility, RiddleProofDecision, RiddleProofEvent, RiddleProofEvidenceBundle, RiddleProofPrLifecycleState, RiddleProofPrLifecycleStatus, RiddleProofProofContract, RiddleProofRunCard, RiddleProofRunParams, RiddleProofRunResult, RiddleProofRunState, RiddleProofRunStatusSnapshot, RiddleProofStage, RiddleProofStatePaths, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofVerificationMode, RiddleProofViewportCapture, RiddleProofViewportMatrixStatus, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter } from './types.cjs';
|
|
2
|
-
export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue, shipControlStateFor } from './result.cjs';
|
|
2
|
+
export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, publicMergeRecommendationForRunState, publicStateForRunState, recordValue, shipControlStateFor } from './result.cjs';
|
|
3
3
|
export { CreateRunStateInput, RIDDLE_PROOF_RUN_STATE_VERSION, RunEventInput, appendRunEvent, appendStageHeartbeat, applyPrLifecycleState, createRunState, createRunStatusSnapshot, normalizeIntegrationContext, normalizePrLifecycleState, normalizeRunParams, setRunStatus } from './state.cjs';
|
|
4
4
|
export { RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION, RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION, authorPacketPayloadFromCheckpointResponse, buildAuthorCheckpointPacket, buildCheckpointPacketForEngineResult, buildProofAssessmentCheckpointPacket, buildStageCheckpointPacket, checkpointPacketIdentity, checkpointResponseIdentity, checkpointSummaryFromState, createCheckpointResponseTemplate, isDuplicateCheckpointResponse, normalizeCheckpointResponse, proofContractFromAuthorCheckpointResponse, statePathsForRunState } from './checkpoint.cjs';
|
|
5
5
|
export { RIDDLE_PROOF_RUN_CARD_VERSION, createRiddleProofRunCard } from './run-card.cjs';
|
|
6
|
-
export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, summarizeRiddleProofPublicState } from './public-state.cjs';
|
|
6
|
+
export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, riddleProofPublicStateAllowsClaim, riddleProofPublicStateAllowsMergeRecommendation, riddleProofPublicStateMergeRecommendation, summarizeRiddleProofPublicState } from './public-state.cjs';
|
|
7
7
|
export { R as RiddleProofRunnerAdapters, a as RunRiddleProofInput, r as runRiddleProof } from './runner-4LJ5z0D-.cjs';
|
|
8
8
|
export { R as RiddleProofAgentAdapter, a as RiddleProofAgentPayload, b as RiddleProofCheckpointMode, c as RiddleProofEngine, d as RiddleProofEngineHarnessConfig, e as RiddleProofEngineHarnessContext, f as RiddleProofEngineResult, g as RiddleProofShipMode, h as RiddleProofWorkflowParams, i as RunRiddleProofEngineHarnessInput, j as createDisabledRiddleProofAgentAdapter, r as readRiddleProofRunStatus, k as runRiddleProofEngineHarness } from './engine-harness-LBfqbFSe.cjs';
|
|
9
9
|
export { CodexExecAgentConfig, CodexJsonRequest, CodexJsonResult, CodexJsonRunner, CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter, createCodexExecJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor, runCodexExecAgentDoctor as runLocalAgentDoctor } from './codex-exec-agent.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { EvidenceArtifact, EvidenceReference, ImplementationAdapter, ImplementationAdapterInput, ImplementationAdapterResult, IntegrationContext, JsonObject, JsonPrimitive, JsonValue, JudgeAdapter, NotificationAdapter, PreflightAdapter, PreflightAdapterInput, PreflightAdapterResult, ProofAdapter, ProofAdapterInput, ProofAdapterResult, RiddleProofArtifactRole, RiddleProofAssessment, RiddleProofBlocker, RiddleProofCheckpointArtifact, RiddleProofCheckpointPacket, RiddleProofCheckpointResponse, RiddleProofCheckpointRole, RiddleProofCheckpointRoutingHint, RiddleProofCheckpointSummary, RiddleProofCheckpointVisibility, RiddleProofDecision, RiddleProofEvent, RiddleProofEvidenceBundle, RiddleProofPrLifecycleState, RiddleProofPrLifecycleStatus, RiddleProofProofContract, RiddleProofRunCard, RiddleProofRunParams, RiddleProofRunResult, RiddleProofRunState, RiddleProofRunStatusSnapshot, RiddleProofStage, RiddleProofStatePaths, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofVerificationMode, RiddleProofViewportCapture, RiddleProofViewportMatrixStatus, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter } from './types.js';
|
|
2
|
-
export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue, shipControlStateFor } from './result.js';
|
|
2
|
+
export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, publicMergeRecommendationForRunState, publicStateForRunState, recordValue, shipControlStateFor } from './result.js';
|
|
3
3
|
export { CreateRunStateInput, RIDDLE_PROOF_RUN_STATE_VERSION, RunEventInput, appendRunEvent, appendStageHeartbeat, applyPrLifecycleState, createRunState, createRunStatusSnapshot, normalizeIntegrationContext, normalizePrLifecycleState, normalizeRunParams, setRunStatus } from './state.js';
|
|
4
4
|
export { RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION, RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION, authorPacketPayloadFromCheckpointResponse, buildAuthorCheckpointPacket, buildCheckpointPacketForEngineResult, buildProofAssessmentCheckpointPacket, buildStageCheckpointPacket, checkpointPacketIdentity, checkpointResponseIdentity, checkpointSummaryFromState, createCheckpointResponseTemplate, isDuplicateCheckpointResponse, normalizeCheckpointResponse, proofContractFromAuthorCheckpointResponse, statePathsForRunState } from './checkpoint.js';
|
|
5
5
|
export { RIDDLE_PROOF_RUN_CARD_VERSION, createRiddleProofRunCard } from './run-card.js';
|
|
6
|
-
export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, summarizeRiddleProofPublicState } from './public-state.js';
|
|
6
|
+
export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, riddleProofPublicStateAllowsClaim, riddleProofPublicStateAllowsMergeRecommendation, riddleProofPublicStateMergeRecommendation, summarizeRiddleProofPublicState } from './public-state.js';
|
|
7
7
|
export { R as RiddleProofRunnerAdapters, a as RunRiddleProofInput, r as runRiddleProof } from './runner-BdQpOkZD.js';
|
|
8
8
|
export { R as RiddleProofAgentAdapter, a as RiddleProofAgentPayload, b as RiddleProofCheckpointMode, c as RiddleProofEngine, d as RiddleProofEngineHarnessConfig, e as RiddleProofEngineHarnessContext, f as RiddleProofEngineResult, g as RiddleProofShipMode, h as RiddleProofWorkflowParams, i as RunRiddleProofEngineHarnessInput, j as createDisabledRiddleProofAgentAdapter, r as readRiddleProofRunStatus, k as runRiddleProofEngineHarness } from './engine-harness-CMACHP6A.js';
|
|
9
9
|
export { CodexExecAgentConfig, CodexJsonRequest, CodexJsonResult, CodexJsonRunner, CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter, createCodexExecJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor, runCodexExecAgentDoctor as runLocalAgentDoctor } from './codex-exec-agent.js';
|