@riddledc/riddle-proof 0.8.54 → 0.8.55
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.js +2 -2
- package/dist/adapters/codex.js +2 -2
- package/dist/adapters/local-agent.js +2 -2
- package/dist/adapters/openclaw.js +5 -5
- package/dist/advanced/engine-harness.cjs +65 -2
- package/dist/advanced/engine-harness.js +5 -5
- package/dist/advanced/index.cjs +66 -3
- package/dist/advanced/index.js +6 -6
- package/dist/advanced/runner.cjs +54 -1
- package/dist/advanced/runner.js +5 -5
- package/dist/checkpoint.js +2 -2
- package/dist/{chunk-S5DX7Z6X.js → chunk-F65S5LT2.js} +3 -3
- package/dist/{chunk-LNWJAHAQ.js → chunk-J2ZNL3H3.js} +2 -2
- package/dist/{chunk-ECLGGGAI.js → chunk-MYMTAVGP.js} +3 -3
- package/dist/{chunk-JJ4IWRMJ.js → chunk-NYRMPWJB.js} +8 -3
- package/dist/{chunk-WDIKPIMB.js → chunk-Q5GYD5RG.js} +9 -4
- package/dist/{chunk-IV4DVWPR.js → chunk-QGE3KBRL.js} +11 -5
- package/dist/{chunk-BLM5EIBA.js → chunk-QUK3SG24.js} +1 -1
- package/dist/{chunk-73EBR3YL.js → chunk-SONWF3FQ.js} +1 -1
- package/dist/{chunk-VY4Y5U57.js → chunk-W44XEGYW.js} +52 -0
- package/dist/cli/index.js +7 -7
- package/dist/cli.cjs +65 -2
- package/dist/cli.js +7 -7
- package/dist/codex-exec-agent.js +2 -2
- package/dist/engine-harness.cjs +65 -2
- package/dist/engine-harness.js +5 -5
- package/dist/index.cjs +70 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -8
- package/dist/local-agent.js +2 -2
- package/dist/openclaw.js +5 -5
- package/dist/result.cjs +56 -2
- package/dist/result.d.cts +16 -2
- package/dist/result.d.ts +16 -2
- package/dist/result.js +7 -3
- package/dist/run-card.cjs +43 -0
- package/dist/run-card.js +3 -3
- package/dist/runner.cjs +54 -1
- package/dist/runner.js +5 -5
- package/dist/spec/checkpoint.js +2 -2
- package/dist/spec/index.cjs +63 -1
- package/dist/spec/index.d.cts +1 -1
- package/dist/spec/index.d.ts +1 -1
- package/dist/spec/index.js +9 -5
- package/dist/spec/result.cjs +56 -2
- package/dist/spec/result.d.cts +1 -1
- package/dist/spec/result.d.ts +1 -1
- package/dist/spec/result.js +7 -3
- package/dist/spec/run-card.cjs +43 -0
- package/dist/spec/run-card.js +3 -3
- package/dist/spec/state.cjs +48 -1
- package/dist/spec/state.js +4 -4
- package/dist/state.cjs +48 -1
- package/dist/state.js +4 -4
- package/dist/types.d.cts +15 -0
- package/dist/types.d.ts +15 -0
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
createCodexExecAgentAdapter,
|
|
4
4
|
createCodexExecJsonRunner,
|
|
5
5
|
runCodexExecAgentDoctor
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-SONWF3FQ.js";
|
|
7
|
+
import "../chunk-W44XEGYW.js";
|
|
8
8
|
import "../chunk-MLKGABMK.js";
|
|
9
9
|
export {
|
|
10
10
|
createCodexExecAgentAdapter,
|
package/dist/adapters/codex.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
createCodexExecAgentAdapter,
|
|
4
4
|
createCodexExecJsonRunner,
|
|
5
5
|
runCodexExecAgentDoctor
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-SONWF3FQ.js";
|
|
7
|
+
import "../chunk-W44XEGYW.js";
|
|
8
8
|
import "../chunk-MLKGABMK.js";
|
|
9
9
|
export {
|
|
10
10
|
createCodexExecAgentAdapter,
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
createCodexExecAgentAdapter,
|
|
4
4
|
createCodexExecJsonRunner,
|
|
5
5
|
runCodexExecAgentDoctor
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-SONWF3FQ.js";
|
|
7
|
+
import "../chunk-W44XEGYW.js";
|
|
8
8
|
import "../chunk-MLKGABMK.js";
|
|
9
9
|
export {
|
|
10
10
|
createCodexExecAgentAdapter as createLocalAgentAdapter,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
parseOpenClawAssertions,
|
|
4
4
|
parseOpenClawJsonObjectOrArray,
|
|
5
5
|
toRiddleProofRunParams
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-J2ZNL3H3.js";
|
|
7
|
+
import "../chunk-Q5GYD5RG.js";
|
|
8
|
+
import "../chunk-NYRMPWJB.js";
|
|
9
|
+
import "../chunk-QUK3SG24.js";
|
|
10
|
+
import "../chunk-W44XEGYW.js";
|
|
11
11
|
import "../chunk-MLKGABMK.js";
|
|
12
12
|
export {
|
|
13
13
|
openClawIntegrationContext,
|
|
@@ -3520,6 +3520,9 @@ function normalizeTerminalMetadata(input) {
|
|
|
3520
3520
|
pr_state: prState,
|
|
3521
3521
|
marked_ready: markedReady,
|
|
3522
3522
|
left_draft: leftDraft,
|
|
3523
|
+
ship_held: firstBoolean(riddleState.ship_held, result.ship_held, result.shipHeld, details.ship_held, details.shipHeld, shipReport.ship_held, shipReport.shipHeld),
|
|
3524
|
+
shipping_disabled: firstBoolean(riddleState.shipping_disabled, result.shipping_disabled, result.shippingDisabled, details.shipping_disabled, details.shippingDisabled, shipReport.shipping_disabled, shipReport.shippingDisabled),
|
|
3525
|
+
ship_authorized: firstBoolean(riddleState.ship_authorized, result.ship_authorized, result.shipAuthorized, details.ship_authorized, details.shipAuthorized, shipReport.ship_authorized, shipReport.shipAuthorized),
|
|
3523
3526
|
ci_status: firstNonEmptyString(riddleState.ci_status, result.ci_status, result.ciStatus, details.ci_status, details.ciStatus, shipReport.ci_status),
|
|
3524
3527
|
ship_commit: firstNonEmptyString(riddleState.ship_commit, result.ship_commit, result.shipCommit, details.ship_commit, details.shipCommit, shipReport.shipped_commit, shipReport.ship_commit),
|
|
3525
3528
|
ship_remote_head: firstNonEmptyString(riddleState.ship_remote_head, result.ship_remote_head, result.shipRemoteHead, details.ship_remote_head, details.shipRemoteHead, shipReport.ship_remote_head),
|
|
@@ -3553,6 +3556,9 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
3553
3556
|
if (prBranch) state.pr_branch = prBranch;
|
|
3554
3557
|
if (typeof metadata.marked_ready === "boolean") state.marked_ready = metadata.marked_ready;
|
|
3555
3558
|
if (typeof metadata.left_draft === "boolean") state.left_draft = metadata.left_draft;
|
|
3559
|
+
if (typeof metadata.ship_held === "boolean") state.ship_held = metadata.ship_held;
|
|
3560
|
+
if (typeof metadata.shipping_disabled === "boolean") state.shipping_disabled = metadata.shipping_disabled;
|
|
3561
|
+
if (typeof metadata.ship_authorized === "boolean") state.ship_authorized = metadata.ship_authorized;
|
|
3556
3562
|
const ciStatus = nonEmptyString(metadata.ci_status);
|
|
3557
3563
|
if (ciStatus) state.ci_status = ciStatus;
|
|
3558
3564
|
const shipCommit = nonEmptyString(metadata.ship_commit);
|
|
@@ -3584,12 +3590,53 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
3584
3590
|
if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
|
|
3585
3591
|
return state;
|
|
3586
3592
|
}
|
|
3593
|
+
function shipControlStateFor(input) {
|
|
3594
|
+
const state = input.state;
|
|
3595
|
+
const status = input.status || state.status;
|
|
3596
|
+
const raw = recordValue(input.raw) || {};
|
|
3597
|
+
const shipReport = recordValue(state.ship_report) || {};
|
|
3598
|
+
const prState = recordValue(state.pr_state) || {};
|
|
3599
|
+
const shippingDisabled = firstBoolean(
|
|
3600
|
+
raw.shipping_disabled,
|
|
3601
|
+
raw.shippingDisabled,
|
|
3602
|
+
state.shipping_disabled,
|
|
3603
|
+
shipReport.shipping_disabled,
|
|
3604
|
+
shipReport.shippingDisabled
|
|
3605
|
+
) ?? state.request?.ship_mode === "none";
|
|
3606
|
+
const explicitAuthorized = firstBoolean(
|
|
3607
|
+
raw.ship_authorized,
|
|
3608
|
+
raw.shipAuthorized,
|
|
3609
|
+
state.ship_authorized,
|
|
3610
|
+
shipReport.ship_authorized,
|
|
3611
|
+
shipReport.shipAuthorized
|
|
3612
|
+
);
|
|
3613
|
+
const authorizationEvidence = Boolean(
|
|
3614
|
+
status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
|
|
3615
|
+
);
|
|
3616
|
+
const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
|
|
3617
|
+
const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
|
|
3618
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
|
|
3619
|
+
const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
|
|
3620
|
+
return {
|
|
3621
|
+
ship_held: shipHeld,
|
|
3622
|
+
shipping_disabled: shippingDisabled,
|
|
3623
|
+
ship_authorized: shipHeld ? false : inferredAuthorized
|
|
3624
|
+
};
|
|
3625
|
+
}
|
|
3626
|
+
function applyShipControlState(state, input = {}) {
|
|
3627
|
+
const control = shipControlStateFor({ state, status: input.status, raw: input.raw });
|
|
3628
|
+
state.ship_held = control.ship_held;
|
|
3629
|
+
state.shipping_disabled = control.shipping_disabled;
|
|
3630
|
+
state.ship_authorized = control.ship_authorized;
|
|
3631
|
+
return state;
|
|
3632
|
+
}
|
|
3587
3633
|
function createRunResult(input) {
|
|
3588
3634
|
const status = input.status || input.state.status;
|
|
3589
3635
|
const ok = isSuccessfulStatus(status);
|
|
3590
3636
|
const state = input.metadata ? applyTerminalMetadata(input.state, input.metadata) : input.state;
|
|
3591
3637
|
state.status = status;
|
|
3592
3638
|
state.ok = ok;
|
|
3639
|
+
applyShipControlState(state, { status, raw: input.raw });
|
|
3593
3640
|
return compactRecord({
|
|
3594
3641
|
ok,
|
|
3595
3642
|
status,
|
|
@@ -3607,6 +3654,9 @@ function createRunResult(input) {
|
|
|
3607
3654
|
pr_state: state.pr_state,
|
|
3608
3655
|
marked_ready: state.marked_ready,
|
|
3609
3656
|
left_draft: state.left_draft,
|
|
3657
|
+
ship_held: state.ship_held,
|
|
3658
|
+
shipping_disabled: state.shipping_disabled,
|
|
3659
|
+
ship_authorized: state.ship_authorized,
|
|
3610
3660
|
ci_status: state.ci_status,
|
|
3611
3661
|
ship_commit: state.ship_commit,
|
|
3612
3662
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -4496,6 +4546,7 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4496
4546
|
const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
|
|
4497
4547
|
const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
|
|
4498
4548
|
const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
|
|
4549
|
+
const shipControl = shipControlStateFor({ state });
|
|
4499
4550
|
return {
|
|
4500
4551
|
version: RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
4501
4552
|
run_id: state.run_id || "unknown",
|
|
@@ -4549,6 +4600,9 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4549
4600
|
stop_condition: compactRecord({
|
|
4550
4601
|
status: state.status,
|
|
4551
4602
|
terminal: isTerminalStatus(state.status),
|
|
4603
|
+
ship_held: shipControl.ship_held,
|
|
4604
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
4605
|
+
ship_authorized: shipControl.ship_authorized,
|
|
4552
4606
|
blocker_code: state.blocker?.code || null,
|
|
4553
4607
|
blocker_message: state.blocker?.message || null,
|
|
4554
4608
|
proof_decision: state.proof_decision,
|
|
@@ -4709,7 +4763,8 @@ function appendStageHeartbeat(state, input) {
|
|
|
4709
4763
|
function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
4710
4764
|
const latestEvent = state.events[state.events.length - 1];
|
|
4711
4765
|
const runId = state.run_id || "unknown";
|
|
4712
|
-
const
|
|
4766
|
+
const shipControl = shipControlStateFor({ state });
|
|
4767
|
+
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 === shipControl.ship_held && state.run_card.stop_condition?.shipping_disabled === shipControl.shipping_disabled && state.run_card.stop_condition?.ship_authorized === shipControl.ship_authorized;
|
|
4713
4768
|
const runCard = existingRunCardCurrent ? state.run_card : createRiddleProofRunCard(state, { at });
|
|
4714
4769
|
return compactRecord({
|
|
4715
4770
|
run_id: runId,
|
|
@@ -4723,6 +4778,9 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
|
4723
4778
|
pr_url: state.pr_url ?? null,
|
|
4724
4779
|
pr_branch: state.pr_branch ?? null,
|
|
4725
4780
|
pr_state: state.pr_state,
|
|
4781
|
+
ship_held: shipControl.ship_held,
|
|
4782
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
4783
|
+
ship_authorized: shipControl.ship_authorized,
|
|
4726
4784
|
ci_status: state.ci_status,
|
|
4727
4785
|
ship_commit: state.ship_commit,
|
|
4728
4786
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -5009,7 +5067,7 @@ function shipHeldTerminal(state, result) {
|
|
|
5009
5067
|
"ready_to_ship",
|
|
5010
5068
|
result,
|
|
5011
5069
|
result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
5012
|
-
{ ship_held: true }
|
|
5070
|
+
{ ship_held: true, shipping_disabled: true, ship_authorized: false }
|
|
5013
5071
|
);
|
|
5014
5072
|
}
|
|
5015
5073
|
function checkpointContinueStage2(result) {
|
|
@@ -5287,6 +5345,7 @@ function terminalResult(state, status, result, summary, raw = {}) {
|
|
|
5287
5345
|
engineResult: result
|
|
5288
5346
|
});
|
|
5289
5347
|
applyTerminalMetadata(state, metadata);
|
|
5348
|
+
applyShipControlState(state, { status, raw });
|
|
5290
5349
|
persist(state);
|
|
5291
5350
|
return createRunResult({
|
|
5292
5351
|
state,
|
|
@@ -5619,6 +5678,8 @@ function checkpointResponseContinuation(state, value) {
|
|
|
5619
5678
|
response.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
5620
5679
|
{
|
|
5621
5680
|
ship_held: true,
|
|
5681
|
+
shipping_disabled: true,
|
|
5682
|
+
ship_authorized: false,
|
|
5622
5683
|
proof_assessment: assessment
|
|
5623
5684
|
}
|
|
5624
5685
|
)
|
|
@@ -6212,6 +6273,8 @@ async function routeCheckpoint(request, state, result, agent, input) {
|
|
|
6212
6273
|
assessment.summary || result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
6213
6274
|
{
|
|
6214
6275
|
ship_held: true,
|
|
6276
|
+
shipping_disabled: true,
|
|
6277
|
+
ship_authorized: false,
|
|
6215
6278
|
proof_assessment: payload
|
|
6216
6279
|
}
|
|
6217
6280
|
)
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-QGE3KBRL.js";
|
|
6
|
+
import "../chunk-Q5GYD5RG.js";
|
|
7
|
+
import "../chunk-NYRMPWJB.js";
|
|
8
8
|
import "../chunk-EKZXU6MU.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-QUK3SG24.js";
|
|
10
|
+
import "../chunk-W44XEGYW.js";
|
|
11
11
|
import "../chunk-MLKGABMK.js";
|
|
12
12
|
export {
|
|
13
13
|
createDisabledRiddleProofAgentAdapter,
|
package/dist/advanced/index.cjs
CHANGED
|
@@ -3554,6 +3554,9 @@ function normalizeTerminalMetadata(input) {
|
|
|
3554
3554
|
pr_state: prState,
|
|
3555
3555
|
marked_ready: markedReady,
|
|
3556
3556
|
left_draft: leftDraft,
|
|
3557
|
+
ship_held: firstBoolean(riddleState.ship_held, result.ship_held, result.shipHeld, details.ship_held, details.shipHeld, shipReport.ship_held, shipReport.shipHeld),
|
|
3558
|
+
shipping_disabled: firstBoolean(riddleState.shipping_disabled, result.shipping_disabled, result.shippingDisabled, details.shipping_disabled, details.shippingDisabled, shipReport.shipping_disabled, shipReport.shippingDisabled),
|
|
3559
|
+
ship_authorized: firstBoolean(riddleState.ship_authorized, result.ship_authorized, result.shipAuthorized, details.ship_authorized, details.shipAuthorized, shipReport.ship_authorized, shipReport.shipAuthorized),
|
|
3557
3560
|
ci_status: firstNonEmptyString(riddleState.ci_status, result.ci_status, result.ciStatus, details.ci_status, details.ciStatus, shipReport.ci_status),
|
|
3558
3561
|
ship_commit: firstNonEmptyString(riddleState.ship_commit, result.ship_commit, result.shipCommit, details.ship_commit, details.shipCommit, shipReport.shipped_commit, shipReport.ship_commit),
|
|
3559
3562
|
ship_remote_head: firstNonEmptyString(riddleState.ship_remote_head, result.ship_remote_head, result.shipRemoteHead, details.ship_remote_head, details.shipRemoteHead, shipReport.ship_remote_head),
|
|
@@ -3587,6 +3590,9 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
3587
3590
|
if (prBranch) state.pr_branch = prBranch;
|
|
3588
3591
|
if (typeof metadata.marked_ready === "boolean") state.marked_ready = metadata.marked_ready;
|
|
3589
3592
|
if (typeof metadata.left_draft === "boolean") state.left_draft = metadata.left_draft;
|
|
3593
|
+
if (typeof metadata.ship_held === "boolean") state.ship_held = metadata.ship_held;
|
|
3594
|
+
if (typeof metadata.shipping_disabled === "boolean") state.shipping_disabled = metadata.shipping_disabled;
|
|
3595
|
+
if (typeof metadata.ship_authorized === "boolean") state.ship_authorized = metadata.ship_authorized;
|
|
3590
3596
|
const ciStatus = nonEmptyString(metadata.ci_status);
|
|
3591
3597
|
if (ciStatus) state.ci_status = ciStatus;
|
|
3592
3598
|
const shipCommit = nonEmptyString(metadata.ship_commit);
|
|
@@ -3618,12 +3624,53 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
3618
3624
|
if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
|
|
3619
3625
|
return state;
|
|
3620
3626
|
}
|
|
3627
|
+
function shipControlStateFor(input) {
|
|
3628
|
+
const state = input.state;
|
|
3629
|
+
const status = input.status || state.status;
|
|
3630
|
+
const raw = recordValue(input.raw) || {};
|
|
3631
|
+
const shipReport = recordValue(state.ship_report) || {};
|
|
3632
|
+
const prState = recordValue(state.pr_state) || {};
|
|
3633
|
+
const shippingDisabled = firstBoolean(
|
|
3634
|
+
raw.shipping_disabled,
|
|
3635
|
+
raw.shippingDisabled,
|
|
3636
|
+
state.shipping_disabled,
|
|
3637
|
+
shipReport.shipping_disabled,
|
|
3638
|
+
shipReport.shippingDisabled
|
|
3639
|
+
) ?? state.request?.ship_mode === "none";
|
|
3640
|
+
const explicitAuthorized = firstBoolean(
|
|
3641
|
+
raw.ship_authorized,
|
|
3642
|
+
raw.shipAuthorized,
|
|
3643
|
+
state.ship_authorized,
|
|
3644
|
+
shipReport.ship_authorized,
|
|
3645
|
+
shipReport.shipAuthorized
|
|
3646
|
+
);
|
|
3647
|
+
const authorizationEvidence = Boolean(
|
|
3648
|
+
status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
|
|
3649
|
+
);
|
|
3650
|
+
const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
|
|
3651
|
+
const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
|
|
3652
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
|
|
3653
|
+
const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
|
|
3654
|
+
return {
|
|
3655
|
+
ship_held: shipHeld,
|
|
3656
|
+
shipping_disabled: shippingDisabled,
|
|
3657
|
+
ship_authorized: shipHeld ? false : inferredAuthorized
|
|
3658
|
+
};
|
|
3659
|
+
}
|
|
3660
|
+
function applyShipControlState(state, input = {}) {
|
|
3661
|
+
const control = shipControlStateFor({ state, status: input.status, raw: input.raw });
|
|
3662
|
+
state.ship_held = control.ship_held;
|
|
3663
|
+
state.shipping_disabled = control.shipping_disabled;
|
|
3664
|
+
state.ship_authorized = control.ship_authorized;
|
|
3665
|
+
return state;
|
|
3666
|
+
}
|
|
3621
3667
|
function createRunResult(input) {
|
|
3622
3668
|
const status = input.status || input.state.status;
|
|
3623
3669
|
const ok = isSuccessfulStatus(status);
|
|
3624
3670
|
const state = input.metadata ? applyTerminalMetadata(input.state, input.metadata) : input.state;
|
|
3625
3671
|
state.status = status;
|
|
3626
3672
|
state.ok = ok;
|
|
3673
|
+
applyShipControlState(state, { status, raw: input.raw });
|
|
3627
3674
|
return compactRecord({
|
|
3628
3675
|
ok,
|
|
3629
3676
|
status,
|
|
@@ -3641,6 +3688,9 @@ function createRunResult(input) {
|
|
|
3641
3688
|
pr_state: state.pr_state,
|
|
3642
3689
|
marked_ready: state.marked_ready,
|
|
3643
3690
|
left_draft: state.left_draft,
|
|
3691
|
+
ship_held: state.ship_held,
|
|
3692
|
+
shipping_disabled: state.shipping_disabled,
|
|
3693
|
+
ship_authorized: state.ship_authorized,
|
|
3644
3694
|
ci_status: state.ci_status,
|
|
3645
3695
|
ship_commit: state.ship_commit,
|
|
3646
3696
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -4530,6 +4580,7 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4530
4580
|
const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
|
|
4531
4581
|
const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
|
|
4532
4582
|
const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
|
|
4583
|
+
const shipControl = shipControlStateFor({ state });
|
|
4533
4584
|
return {
|
|
4534
4585
|
version: RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
4535
4586
|
run_id: state.run_id || "unknown",
|
|
@@ -4583,6 +4634,9 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4583
4634
|
stop_condition: compactRecord({
|
|
4584
4635
|
status: state.status,
|
|
4585
4636
|
terminal: isTerminalStatus(state.status),
|
|
4637
|
+
ship_held: shipControl.ship_held,
|
|
4638
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
4639
|
+
ship_authorized: shipControl.ship_authorized,
|
|
4586
4640
|
blocker_code: state.blocker?.code || null,
|
|
4587
4641
|
blocker_message: state.blocker?.message || null,
|
|
4588
4642
|
proof_decision: state.proof_decision,
|
|
@@ -4743,7 +4797,8 @@ function appendStageHeartbeat(state, input) {
|
|
|
4743
4797
|
function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
4744
4798
|
const latestEvent = state.events[state.events.length - 1];
|
|
4745
4799
|
const runId = state.run_id || "unknown";
|
|
4746
|
-
const
|
|
4800
|
+
const shipControl = shipControlStateFor({ state });
|
|
4801
|
+
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 === shipControl.ship_held && state.run_card.stop_condition?.shipping_disabled === shipControl.shipping_disabled && state.run_card.stop_condition?.ship_authorized === shipControl.ship_authorized;
|
|
4747
4802
|
const runCard = existingRunCardCurrent ? state.run_card : createRiddleProofRunCard(state, { at });
|
|
4748
4803
|
return compactRecord({
|
|
4749
4804
|
run_id: runId,
|
|
@@ -4757,6 +4812,9 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
|
4757
4812
|
pr_url: state.pr_url ?? null,
|
|
4758
4813
|
pr_branch: state.pr_branch ?? null,
|
|
4759
4814
|
pr_state: state.pr_state,
|
|
4815
|
+
ship_held: shipControl.ship_held,
|
|
4816
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
4817
|
+
ship_authorized: shipControl.ship_authorized,
|
|
4760
4818
|
ci_status: state.ci_status,
|
|
4761
4819
|
ship_commit: state.ship_commit,
|
|
4762
4820
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -5223,7 +5281,7 @@ async function runRiddleProof(input) {
|
|
|
5223
5281
|
status: "ready_to_ship",
|
|
5224
5282
|
last_summary: assessment.summary,
|
|
5225
5283
|
evidence_bundle: evidenceBundle,
|
|
5226
|
-
raw: { implementation, assessment }
|
|
5284
|
+
raw: { implementation, assessment, ship_held: true, shipping_disabled: true, ship_authorized: false }
|
|
5227
5285
|
});
|
|
5228
5286
|
return notifyIfConfigured({ state, result: result2, notification: adapters.notification });
|
|
5229
5287
|
}
|
|
@@ -5548,7 +5606,7 @@ function shipHeldTerminal(state, result) {
|
|
|
5548
5606
|
"ready_to_ship",
|
|
5549
5607
|
result,
|
|
5550
5608
|
result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
5551
|
-
{ ship_held: true }
|
|
5609
|
+
{ ship_held: true, shipping_disabled: true, ship_authorized: false }
|
|
5552
5610
|
);
|
|
5553
5611
|
}
|
|
5554
5612
|
function checkpointContinueStage2(result) {
|
|
@@ -5826,6 +5884,7 @@ function terminalResult(state, status, result, summary, raw = {}) {
|
|
|
5826
5884
|
engineResult: result
|
|
5827
5885
|
});
|
|
5828
5886
|
applyTerminalMetadata(state, metadata);
|
|
5887
|
+
applyShipControlState(state, { status, raw });
|
|
5829
5888
|
persist(state);
|
|
5830
5889
|
return createRunResult({
|
|
5831
5890
|
state,
|
|
@@ -6158,6 +6217,8 @@ function checkpointResponseContinuation(state, value) {
|
|
|
6158
6217
|
response.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
6159
6218
|
{
|
|
6160
6219
|
ship_held: true,
|
|
6220
|
+
shipping_disabled: true,
|
|
6221
|
+
ship_authorized: false,
|
|
6161
6222
|
proof_assessment: assessment
|
|
6162
6223
|
}
|
|
6163
6224
|
)
|
|
@@ -6751,6 +6812,8 @@ async function routeCheckpoint(request, state, result, agent, input) {
|
|
|
6751
6812
|
assessment.summary || result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
6752
6813
|
{
|
|
6753
6814
|
ship_held: true,
|
|
6815
|
+
shipping_disabled: true,
|
|
6816
|
+
ship_authorized: false,
|
|
6754
6817
|
proof_assessment: payload
|
|
6755
6818
|
}
|
|
6756
6819
|
)
|
package/dist/advanced/index.js
CHANGED
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "../chunk-VYJD6XYF.js";
|
|
4
4
|
import {
|
|
5
5
|
runner_exports
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-F65S5LT2.js";
|
|
7
7
|
import {
|
|
8
8
|
engine_harness_exports
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-QGE3KBRL.js";
|
|
10
|
+
import "../chunk-Q5GYD5RG.js";
|
|
11
|
+
import "../chunk-NYRMPWJB.js";
|
|
12
12
|
import {
|
|
13
13
|
proof_run_core_exports
|
|
14
14
|
} from "../chunk-EKZXU6MU.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-QUK3SG24.js";
|
|
16
|
+
import "../chunk-W44XEGYW.js";
|
|
17
17
|
import "../chunk-MLKGABMK.js";
|
|
18
18
|
export {
|
|
19
19
|
engine_harness_exports as engineHarness,
|
package/dist/advanced/runner.cjs
CHANGED
|
@@ -47,6 +47,12 @@ function nonEmptyString(value) {
|
|
|
47
47
|
function recordValue(value) {
|
|
48
48
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
49
49
|
}
|
|
50
|
+
function firstBoolean(...values) {
|
|
51
|
+
for (const value of values) {
|
|
52
|
+
if (typeof value === "boolean") return value;
|
|
53
|
+
}
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
50
56
|
function applyTerminalMetadata(state, metadata) {
|
|
51
57
|
if (metadata.pr_state) {
|
|
52
58
|
state.pr_state = metadata.pr_state;
|
|
@@ -63,6 +69,9 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
63
69
|
if (prBranch) state.pr_branch = prBranch;
|
|
64
70
|
if (typeof metadata.marked_ready === "boolean") state.marked_ready = metadata.marked_ready;
|
|
65
71
|
if (typeof metadata.left_draft === "boolean") state.left_draft = metadata.left_draft;
|
|
72
|
+
if (typeof metadata.ship_held === "boolean") state.ship_held = metadata.ship_held;
|
|
73
|
+
if (typeof metadata.shipping_disabled === "boolean") state.shipping_disabled = metadata.shipping_disabled;
|
|
74
|
+
if (typeof metadata.ship_authorized === "boolean") state.ship_authorized = metadata.ship_authorized;
|
|
66
75
|
const ciStatus = nonEmptyString(metadata.ci_status);
|
|
67
76
|
if (ciStatus) state.ci_status = ciStatus;
|
|
68
77
|
const shipCommit = nonEmptyString(metadata.ship_commit);
|
|
@@ -94,12 +103,53 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
94
103
|
if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
|
|
95
104
|
return state;
|
|
96
105
|
}
|
|
106
|
+
function shipControlStateFor(input) {
|
|
107
|
+
const state = input.state;
|
|
108
|
+
const status = input.status || state.status;
|
|
109
|
+
const raw = recordValue(input.raw) || {};
|
|
110
|
+
const shipReport = recordValue(state.ship_report) || {};
|
|
111
|
+
const prState = recordValue(state.pr_state) || {};
|
|
112
|
+
const shippingDisabled = firstBoolean(
|
|
113
|
+
raw.shipping_disabled,
|
|
114
|
+
raw.shippingDisabled,
|
|
115
|
+
state.shipping_disabled,
|
|
116
|
+
shipReport.shipping_disabled,
|
|
117
|
+
shipReport.shippingDisabled
|
|
118
|
+
) ?? state.request?.ship_mode === "none";
|
|
119
|
+
const explicitAuthorized = firstBoolean(
|
|
120
|
+
raw.ship_authorized,
|
|
121
|
+
raw.shipAuthorized,
|
|
122
|
+
state.ship_authorized,
|
|
123
|
+
shipReport.ship_authorized,
|
|
124
|
+
shipReport.shipAuthorized
|
|
125
|
+
);
|
|
126
|
+
const authorizationEvidence = Boolean(
|
|
127
|
+
status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
|
|
128
|
+
);
|
|
129
|
+
const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
|
|
130
|
+
const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
|
|
131
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
|
|
132
|
+
const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
|
|
133
|
+
return {
|
|
134
|
+
ship_held: shipHeld,
|
|
135
|
+
shipping_disabled: shippingDisabled,
|
|
136
|
+
ship_authorized: shipHeld ? false : inferredAuthorized
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function applyShipControlState(state, input = {}) {
|
|
140
|
+
const control = shipControlStateFor({ state, status: input.status, raw: input.raw });
|
|
141
|
+
state.ship_held = control.ship_held;
|
|
142
|
+
state.shipping_disabled = control.shipping_disabled;
|
|
143
|
+
state.ship_authorized = control.ship_authorized;
|
|
144
|
+
return state;
|
|
145
|
+
}
|
|
97
146
|
function createRunResult(input) {
|
|
98
147
|
const status = input.status || input.state.status;
|
|
99
148
|
const ok = isSuccessfulStatus(status);
|
|
100
149
|
const state = input.metadata ? applyTerminalMetadata(input.state, input.metadata) : input.state;
|
|
101
150
|
state.status = status;
|
|
102
151
|
state.ok = ok;
|
|
152
|
+
applyShipControlState(state, { status, raw: input.raw });
|
|
103
153
|
return compactRecord({
|
|
104
154
|
ok,
|
|
105
155
|
status,
|
|
@@ -117,6 +167,9 @@ function createRunResult(input) {
|
|
|
117
167
|
pr_state: state.pr_state,
|
|
118
168
|
marked_ready: state.marked_ready,
|
|
119
169
|
left_draft: state.left_draft,
|
|
170
|
+
ship_held: state.ship_held,
|
|
171
|
+
shipping_disabled: state.shipping_disabled,
|
|
172
|
+
ship_authorized: state.ship_authorized,
|
|
120
173
|
ci_status: state.ci_status,
|
|
121
174
|
ship_commit: state.ship_commit,
|
|
122
175
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -770,7 +823,7 @@ async function runRiddleProof(input) {
|
|
|
770
823
|
status: "ready_to_ship",
|
|
771
824
|
last_summary: assessment.summary,
|
|
772
825
|
evidence_bundle: evidenceBundle,
|
|
773
|
-
raw: { implementation, assessment }
|
|
826
|
+
raw: { implementation, assessment, ship_held: true, shipping_disabled: true, ship_authorized: false }
|
|
774
827
|
});
|
|
775
828
|
return notifyIfConfigured({ state, result: result2, notification: adapters.notification });
|
|
776
829
|
}
|
package/dist/advanced/runner.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-F65S5LT2.js";
|
|
4
|
+
import "../chunk-Q5GYD5RG.js";
|
|
5
|
+
import "../chunk-NYRMPWJB.js";
|
|
6
6
|
import "../chunk-EKZXU6MU.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-QUK3SG24.js";
|
|
8
|
+
import "../chunk-W44XEGYW.js";
|
|
9
9
|
import "../chunk-MLKGABMK.js";
|
|
10
10
|
export {
|
|
11
11
|
runRiddleProof
|
package/dist/checkpoint.js
CHANGED
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
normalizeCheckpointResponse,
|
|
15
15
|
proofContractFromAuthorCheckpointResponse,
|
|
16
16
|
statePathsForRunState
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-QUK3SG24.js";
|
|
18
|
+
import "./chunk-W44XEGYW.js";
|
|
19
19
|
import "./chunk-MLKGABMK.js";
|
|
20
20
|
export {
|
|
21
21
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
appendStageHeartbeat,
|
|
4
4
|
createRunState,
|
|
5
5
|
setRunStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Q5GYD5RG.js";
|
|
7
7
|
import {
|
|
8
8
|
noImplementationModeFor
|
|
9
9
|
} from "./chunk-EKZXU6MU.js";
|
|
10
10
|
import {
|
|
11
11
|
createRunResult
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-W44XEGYW.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
15
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -454,7 +454,7 @@ async function runRiddleProof(input) {
|
|
|
454
454
|
status: "ready_to_ship",
|
|
455
455
|
last_summary: assessment.summary,
|
|
456
456
|
evidence_bundle: evidenceBundle,
|
|
457
|
-
raw: { implementation, assessment }
|
|
457
|
+
raw: { implementation, assessment, ship_held: true, shipping_disabled: true, ship_authorized: false }
|
|
458
458
|
});
|
|
459
459
|
return notifyIfConfigured({ state, result: result2, notification: adapters.notification });
|
|
460
460
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeIntegrationContext,
|
|
3
3
|
normalizeRunParams
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q5GYD5RG.js";
|
|
5
5
|
import {
|
|
6
6
|
compactRecord
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W44XEGYW.js";
|
|
8
8
|
|
|
9
9
|
// src/openclaw.ts
|
|
10
10
|
function parseOpenClawAssertions(value) {
|
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
createDisabledRiddleProofAgentAdapter,
|
|
29
29
|
readRiddleProofRunStatus,
|
|
30
30
|
runRiddleProofEngineHarness
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QGE3KBRL.js";
|
|
32
32
|
import {
|
|
33
33
|
createCheckpointResponseTemplate
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QUK3SG24.js";
|
|
35
35
|
import {
|
|
36
36
|
createCodexExecAgentAdapter,
|
|
37
37
|
runCodexExecAgentDoctor
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SONWF3FQ.js";
|
|
39
39
|
|
|
40
40
|
// src/cli.ts
|
|
41
41
|
import { spawnSync } from "child_process";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
statePathsForRunState
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QUK3SG24.js";
|
|
4
4
|
import {
|
|
5
5
|
compactRecord,
|
|
6
6
|
isTerminalStatus,
|
|
7
7
|
nonEmptyString,
|
|
8
|
-
recordValue
|
|
9
|
-
|
|
8
|
+
recordValue,
|
|
9
|
+
shipControlStateFor
|
|
10
|
+
} from "./chunk-W44XEGYW.js";
|
|
10
11
|
|
|
11
12
|
// src/run-card.ts
|
|
12
13
|
var RIDDLE_PROOF_RUN_CARD_VERSION = "riddle-proof.run-card.v1";
|
|
@@ -167,6 +168,7 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
167
168
|
const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
|
|
168
169
|
const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
|
|
169
170
|
const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
|
|
171
|
+
const shipControl = shipControlStateFor({ state });
|
|
170
172
|
return {
|
|
171
173
|
version: RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
172
174
|
run_id: state.run_id || "unknown",
|
|
@@ -220,6 +222,9 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
220
222
|
stop_condition: compactRecord({
|
|
221
223
|
status: state.status,
|
|
222
224
|
terminal: isTerminalStatus(state.status),
|
|
225
|
+
ship_held: shipControl.ship_held,
|
|
226
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
227
|
+
ship_authorized: shipControl.ship_authorized,
|
|
223
228
|
blocker_code: state.blocker?.code || null,
|
|
224
229
|
blocker_message: state.blocker?.message || null,
|
|
225
230
|
proof_decision: state.proof_decision,
|