@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
package/dist/index.cjs
CHANGED
|
@@ -3440,6 +3440,7 @@ __export(index_exports, {
|
|
|
3440
3440
|
appendStageHeartbeat: () => appendStageHeartbeat,
|
|
3441
3441
|
applyPrLifecycleState: () => applyPrLifecycleState,
|
|
3442
3442
|
applyRiddleProofProfileArtifactCompleteness: () => applyRiddleProofProfileArtifactCompleteness,
|
|
3443
|
+
applyShipControlState: () => applyShipControlState,
|
|
3443
3444
|
applyTerminalMetadata: () => applyTerminalMetadata,
|
|
3444
3445
|
assessBasicGameplayEvidence: () => assessBasicGameplayEvidence,
|
|
3445
3446
|
assessBasicGameplayProgressionCheck: () => assessBasicGameplayProgressionCheck,
|
|
@@ -3527,6 +3528,7 @@ __export(index_exports, {
|
|
|
3527
3528
|
runRiddleServerPreview: () => runRiddleServerPreview,
|
|
3528
3529
|
sanitizeBasicGameplayJsonString: () => sanitizeBasicGameplayJsonString,
|
|
3529
3530
|
setRunStatus: () => setRunStatus,
|
|
3531
|
+
shipControlStateFor: () => shipControlStateFor,
|
|
3530
3532
|
slugifyRiddleProofProfileName: () => slugifyRiddleProofProfileName,
|
|
3531
3533
|
statePathsForRunState: () => statePathsForRunState,
|
|
3532
3534
|
summarizeCaptureArtifacts: () => summarizeCaptureArtifacts,
|
|
@@ -3638,6 +3640,9 @@ function normalizeTerminalMetadata(input) {
|
|
|
3638
3640
|
pr_state: prState,
|
|
3639
3641
|
marked_ready: markedReady,
|
|
3640
3642
|
left_draft: leftDraft,
|
|
3643
|
+
ship_held: firstBoolean(riddleState.ship_held, result.ship_held, result.shipHeld, details.ship_held, details.shipHeld, shipReport.ship_held, shipReport.shipHeld),
|
|
3644
|
+
shipping_disabled: firstBoolean(riddleState.shipping_disabled, result.shipping_disabled, result.shippingDisabled, details.shipping_disabled, details.shippingDisabled, shipReport.shipping_disabled, shipReport.shippingDisabled),
|
|
3645
|
+
ship_authorized: firstBoolean(riddleState.ship_authorized, result.ship_authorized, result.shipAuthorized, details.ship_authorized, details.shipAuthorized, shipReport.ship_authorized, shipReport.shipAuthorized),
|
|
3641
3646
|
ci_status: firstNonEmptyString(riddleState.ci_status, result.ci_status, result.ciStatus, details.ci_status, details.ciStatus, shipReport.ci_status),
|
|
3642
3647
|
ship_commit: firstNonEmptyString(riddleState.ship_commit, result.ship_commit, result.shipCommit, details.ship_commit, details.shipCommit, shipReport.shipped_commit, shipReport.ship_commit),
|
|
3643
3648
|
ship_remote_head: firstNonEmptyString(riddleState.ship_remote_head, result.ship_remote_head, result.shipRemoteHead, details.ship_remote_head, details.shipRemoteHead, shipReport.ship_remote_head),
|
|
@@ -3671,6 +3676,9 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
3671
3676
|
if (prBranch) state.pr_branch = prBranch;
|
|
3672
3677
|
if (typeof metadata.marked_ready === "boolean") state.marked_ready = metadata.marked_ready;
|
|
3673
3678
|
if (typeof metadata.left_draft === "boolean") state.left_draft = metadata.left_draft;
|
|
3679
|
+
if (typeof metadata.ship_held === "boolean") state.ship_held = metadata.ship_held;
|
|
3680
|
+
if (typeof metadata.shipping_disabled === "boolean") state.shipping_disabled = metadata.shipping_disabled;
|
|
3681
|
+
if (typeof metadata.ship_authorized === "boolean") state.ship_authorized = metadata.ship_authorized;
|
|
3674
3682
|
const ciStatus = nonEmptyString(metadata.ci_status);
|
|
3675
3683
|
if (ciStatus) state.ci_status = ciStatus;
|
|
3676
3684
|
const shipCommit = nonEmptyString(metadata.ship_commit);
|
|
@@ -3702,12 +3710,53 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
3702
3710
|
if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
|
|
3703
3711
|
return state;
|
|
3704
3712
|
}
|
|
3713
|
+
function shipControlStateFor(input) {
|
|
3714
|
+
const state = input.state;
|
|
3715
|
+
const status = input.status || state.status;
|
|
3716
|
+
const raw = recordValue(input.raw) || {};
|
|
3717
|
+
const shipReport = recordValue(state.ship_report) || {};
|
|
3718
|
+
const prState = recordValue(state.pr_state) || {};
|
|
3719
|
+
const shippingDisabled = firstBoolean(
|
|
3720
|
+
raw.shipping_disabled,
|
|
3721
|
+
raw.shippingDisabled,
|
|
3722
|
+
state.shipping_disabled,
|
|
3723
|
+
shipReport.shipping_disabled,
|
|
3724
|
+
shipReport.shippingDisabled
|
|
3725
|
+
) ?? state.request?.ship_mode === "none";
|
|
3726
|
+
const explicitAuthorized = firstBoolean(
|
|
3727
|
+
raw.ship_authorized,
|
|
3728
|
+
raw.shipAuthorized,
|
|
3729
|
+
state.ship_authorized,
|
|
3730
|
+
shipReport.ship_authorized,
|
|
3731
|
+
shipReport.shipAuthorized
|
|
3732
|
+
);
|
|
3733
|
+
const authorizationEvidence = Boolean(
|
|
3734
|
+
status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
|
|
3735
|
+
);
|
|
3736
|
+
const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
|
|
3737
|
+
const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
|
|
3738
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
|
|
3739
|
+
const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
|
|
3740
|
+
return {
|
|
3741
|
+
ship_held: shipHeld,
|
|
3742
|
+
shipping_disabled: shippingDisabled,
|
|
3743
|
+
ship_authorized: shipHeld ? false : inferredAuthorized
|
|
3744
|
+
};
|
|
3745
|
+
}
|
|
3746
|
+
function applyShipControlState(state, input = {}) {
|
|
3747
|
+
const control = shipControlStateFor({ state, status: input.status, raw: input.raw });
|
|
3748
|
+
state.ship_held = control.ship_held;
|
|
3749
|
+
state.shipping_disabled = control.shipping_disabled;
|
|
3750
|
+
state.ship_authorized = control.ship_authorized;
|
|
3751
|
+
return state;
|
|
3752
|
+
}
|
|
3705
3753
|
function createRunResult(input) {
|
|
3706
3754
|
const status = input.status || input.state.status;
|
|
3707
3755
|
const ok = isSuccessfulStatus(status);
|
|
3708
3756
|
const state = input.metadata ? applyTerminalMetadata(input.state, input.metadata) : input.state;
|
|
3709
3757
|
state.status = status;
|
|
3710
3758
|
state.ok = ok;
|
|
3759
|
+
applyShipControlState(state, { status, raw: input.raw });
|
|
3711
3760
|
return compactRecord({
|
|
3712
3761
|
ok,
|
|
3713
3762
|
status,
|
|
@@ -3725,6 +3774,9 @@ function createRunResult(input) {
|
|
|
3725
3774
|
pr_state: state.pr_state,
|
|
3726
3775
|
marked_ready: state.marked_ready,
|
|
3727
3776
|
left_draft: state.left_draft,
|
|
3777
|
+
ship_held: state.ship_held,
|
|
3778
|
+
shipping_disabled: state.shipping_disabled,
|
|
3779
|
+
ship_authorized: state.ship_authorized,
|
|
3728
3780
|
ci_status: state.ci_status,
|
|
3729
3781
|
ship_commit: state.ship_commit,
|
|
3730
3782
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -4704,6 +4756,7 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4704
4756
|
const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
|
|
4705
4757
|
const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
|
|
4706
4758
|
const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
|
|
4759
|
+
const shipControl = shipControlStateFor({ state });
|
|
4707
4760
|
return {
|
|
4708
4761
|
version: RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
4709
4762
|
run_id: state.run_id || "unknown",
|
|
@@ -4757,6 +4810,9 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
4757
4810
|
stop_condition: compactRecord({
|
|
4758
4811
|
status: state.status,
|
|
4759
4812
|
terminal: isTerminalStatus(state.status),
|
|
4813
|
+
ship_held: shipControl.ship_held,
|
|
4814
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
4815
|
+
ship_authorized: shipControl.ship_authorized,
|
|
4760
4816
|
blocker_code: state.blocker?.code || null,
|
|
4761
4817
|
blocker_message: state.blocker?.message || null,
|
|
4762
4818
|
proof_decision: state.proof_decision,
|
|
@@ -4947,7 +5003,8 @@ function appendStageHeartbeat(state, input) {
|
|
|
4947
5003
|
function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
4948
5004
|
const latestEvent = state.events[state.events.length - 1];
|
|
4949
5005
|
const runId = state.run_id || "unknown";
|
|
4950
|
-
const
|
|
5006
|
+
const shipControl = shipControlStateFor({ state });
|
|
5007
|
+
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;
|
|
4951
5008
|
const runCard = existingRunCardCurrent ? state.run_card : createRiddleProofRunCard(state, { at });
|
|
4952
5009
|
return compactRecord({
|
|
4953
5010
|
run_id: runId,
|
|
@@ -4961,6 +5018,9 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
|
|
|
4961
5018
|
pr_url: state.pr_url ?? null,
|
|
4962
5019
|
pr_branch: state.pr_branch ?? null,
|
|
4963
5020
|
pr_state: state.pr_state,
|
|
5021
|
+
ship_held: shipControl.ship_held,
|
|
5022
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
5023
|
+
ship_authorized: shipControl.ship_authorized,
|
|
4964
5024
|
ci_status: state.ci_status,
|
|
4965
5025
|
ship_commit: state.ship_commit,
|
|
4966
5026
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -5444,7 +5504,7 @@ async function runRiddleProof(input) {
|
|
|
5444
5504
|
status: "ready_to_ship",
|
|
5445
5505
|
last_summary: assessment.summary,
|
|
5446
5506
|
evidence_bundle: evidenceBundle,
|
|
5447
|
-
raw: { implementation, assessment }
|
|
5507
|
+
raw: { implementation, assessment, ship_held: true, shipping_disabled: true, ship_authorized: false }
|
|
5448
5508
|
});
|
|
5449
5509
|
return notifyIfConfigured({ state, result: result2, notification: adapters.notification });
|
|
5450
5510
|
}
|
|
@@ -5763,7 +5823,7 @@ function shipHeldTerminal(state, result) {
|
|
|
5763
5823
|
"ready_to_ship",
|
|
5764
5824
|
result,
|
|
5765
5825
|
result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
5766
|
-
{ ship_held: true }
|
|
5826
|
+
{ ship_held: true, shipping_disabled: true, ship_authorized: false }
|
|
5767
5827
|
);
|
|
5768
5828
|
}
|
|
5769
5829
|
function checkpointContinueStage2(result) {
|
|
@@ -6041,6 +6101,7 @@ function terminalResult(state, status, result, summary, raw = {}) {
|
|
|
6041
6101
|
engineResult: result
|
|
6042
6102
|
});
|
|
6043
6103
|
applyTerminalMetadata(state, metadata);
|
|
6104
|
+
applyShipControlState(state, { status, raw });
|
|
6044
6105
|
persist(state);
|
|
6045
6106
|
return createRunResult({
|
|
6046
6107
|
state,
|
|
@@ -6373,6 +6434,8 @@ function checkpointResponseContinuation(state, value) {
|
|
|
6373
6434
|
response.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
6374
6435
|
{
|
|
6375
6436
|
ship_held: true,
|
|
6437
|
+
shipping_disabled: true,
|
|
6438
|
+
ship_authorized: false,
|
|
6376
6439
|
proof_assessment: assessment
|
|
6377
6440
|
}
|
|
6378
6441
|
)
|
|
@@ -6966,6 +7029,8 @@ async function routeCheckpoint(request, state, result, agent, input) {
|
|
|
6966
7029
|
assessment.summary || result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
|
|
6967
7030
|
{
|
|
6968
7031
|
ship_held: true,
|
|
7032
|
+
shipping_disabled: true,
|
|
7033
|
+
ship_authorized: false,
|
|
6969
7034
|
proof_assessment: payload
|
|
6970
7035
|
}
|
|
6971
7036
|
)
|
|
@@ -20048,6 +20113,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
20048
20113
|
appendStageHeartbeat,
|
|
20049
20114
|
applyPrLifecycleState,
|
|
20050
20115
|
applyRiddleProofProfileArtifactCompleteness,
|
|
20116
|
+
applyShipControlState,
|
|
20051
20117
|
applyTerminalMetadata,
|
|
20052
20118
|
assessBasicGameplayEvidence,
|
|
20053
20119
|
assessBasicGameplayProgressionCheck,
|
|
@@ -20135,6 +20201,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
20135
20201
|
runRiddleServerPreview,
|
|
20136
20202
|
sanitizeBasicGameplayJsonString,
|
|
20137
20203
|
setRunStatus,
|
|
20204
|
+
shipControlStateFor,
|
|
20138
20205
|
slugifyRiddleProofProfileName,
|
|
20139
20206
|
statePathsForRunState,
|
|
20140
20207
|
summarizeCaptureArtifacts,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 { TerminalMetadataInput, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue } from './result.cjs';
|
|
2
|
+
export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, 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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 { TerminalMetadataInput, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue } from './result.js';
|
|
2
|
+
export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, 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';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F65S5LT2.js";
|
|
4
4
|
import "./chunk-6F4PWJZI.js";
|
|
5
5
|
import {
|
|
6
6
|
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
createDisabledRiddleProofAgentAdapter,
|
|
103
103
|
readRiddleProofRunStatus,
|
|
104
104
|
runRiddleProofEngineHarness
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-QGE3KBRL.js";
|
|
106
106
|
import {
|
|
107
107
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
108
108
|
appendRunEvent,
|
|
@@ -114,11 +114,11 @@ import {
|
|
|
114
114
|
normalizePrLifecycleState,
|
|
115
115
|
normalizeRunParams,
|
|
116
116
|
setRunStatus
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-Q5GYD5RG.js";
|
|
118
118
|
import {
|
|
119
119
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
120
120
|
createRiddleProofRunCard
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-NYRMPWJB.js";
|
|
122
122
|
import "./chunk-EKZXU6MU.js";
|
|
123
123
|
import {
|
|
124
124
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
@@ -136,14 +136,15 @@ import {
|
|
|
136
136
|
normalizeCheckpointResponse,
|
|
137
137
|
proofContractFromAuthorCheckpointResponse,
|
|
138
138
|
statePathsForRunState
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-QUK3SG24.js";
|
|
140
140
|
import "./chunk-JFQXAJH2.js";
|
|
141
141
|
import {
|
|
142
142
|
createCodexExecAgentAdapter,
|
|
143
143
|
createCodexExecJsonRunner,
|
|
144
144
|
runCodexExecAgentDoctor
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-SONWF3FQ.js";
|
|
146
146
|
import {
|
|
147
|
+
applyShipControlState,
|
|
147
148
|
applyTerminalMetadata,
|
|
148
149
|
compactRecord,
|
|
149
150
|
createRunResult,
|
|
@@ -151,8 +152,9 @@ import {
|
|
|
151
152
|
isTerminalStatus,
|
|
152
153
|
nonEmptyString,
|
|
153
154
|
normalizeTerminalMetadata,
|
|
154
|
-
recordValue
|
|
155
|
-
|
|
155
|
+
recordValue,
|
|
156
|
+
shipControlStateFor
|
|
157
|
+
} from "./chunk-W44XEGYW.js";
|
|
156
158
|
import "./chunk-MLKGABMK.js";
|
|
157
159
|
export {
|
|
158
160
|
BASIC_GAMEPLAY_ACTION_TYPES,
|
|
@@ -188,6 +190,7 @@ export {
|
|
|
188
190
|
appendStageHeartbeat,
|
|
189
191
|
applyPrLifecycleState,
|
|
190
192
|
applyRiddleProofProfileArtifactCompleteness,
|
|
193
|
+
applyShipControlState,
|
|
191
194
|
applyTerminalMetadata,
|
|
192
195
|
assessBasicGameplayEvidence,
|
|
193
196
|
assessBasicGameplayProgressionCheck,
|
|
@@ -275,6 +278,7 @@ export {
|
|
|
275
278
|
runRiddleServerPreview,
|
|
276
279
|
sanitizeBasicGameplayJsonString,
|
|
277
280
|
setRunStatus,
|
|
281
|
+
shipControlStateFor,
|
|
278
282
|
slugifyRiddleProofProfileName,
|
|
279
283
|
statePathsForRunState,
|
|
280
284
|
summarizeCaptureArtifacts,
|
package/dist/local-agent.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 as createLocalAgentAdapter,
|
package/dist/openclaw.js
CHANGED
|
@@ -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,
|
package/dist/result.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/result.ts
|
|
21
21
|
var result_exports = {};
|
|
22
22
|
__export(result_exports, {
|
|
23
|
+
applyShipControlState: () => applyShipControlState,
|
|
23
24
|
applyTerminalMetadata: () => applyTerminalMetadata,
|
|
24
25
|
compactRecord: () => compactRecord,
|
|
25
26
|
createRunResult: () => createRunResult,
|
|
@@ -27,7 +28,8 @@ __export(result_exports, {
|
|
|
27
28
|
isTerminalStatus: () => isTerminalStatus,
|
|
28
29
|
nonEmptyString: () => nonEmptyString,
|
|
29
30
|
normalizeTerminalMetadata: () => normalizeTerminalMetadata,
|
|
30
|
-
recordValue: () => recordValue
|
|
31
|
+
recordValue: () => recordValue,
|
|
32
|
+
shipControlStateFor: () => shipControlStateFor
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(result_exports);
|
|
33
35
|
function isTerminalStatus(status) {
|
|
@@ -130,6 +132,9 @@ function normalizeTerminalMetadata(input) {
|
|
|
130
132
|
pr_state: prState,
|
|
131
133
|
marked_ready: markedReady,
|
|
132
134
|
left_draft: leftDraft,
|
|
135
|
+
ship_held: firstBoolean(riddleState.ship_held, result.ship_held, result.shipHeld, details.ship_held, details.shipHeld, shipReport.ship_held, shipReport.shipHeld),
|
|
136
|
+
shipping_disabled: firstBoolean(riddleState.shipping_disabled, result.shipping_disabled, result.shippingDisabled, details.shipping_disabled, details.shippingDisabled, shipReport.shipping_disabled, shipReport.shippingDisabled),
|
|
137
|
+
ship_authorized: firstBoolean(riddleState.ship_authorized, result.ship_authorized, result.shipAuthorized, details.ship_authorized, details.shipAuthorized, shipReport.ship_authorized, shipReport.shipAuthorized),
|
|
133
138
|
ci_status: firstNonEmptyString(riddleState.ci_status, result.ci_status, result.ciStatus, details.ci_status, details.ciStatus, shipReport.ci_status),
|
|
134
139
|
ship_commit: firstNonEmptyString(riddleState.ship_commit, result.ship_commit, result.shipCommit, details.ship_commit, details.shipCommit, shipReport.shipped_commit, shipReport.ship_commit),
|
|
135
140
|
ship_remote_head: firstNonEmptyString(riddleState.ship_remote_head, result.ship_remote_head, result.shipRemoteHead, details.ship_remote_head, details.shipRemoteHead, shipReport.ship_remote_head),
|
|
@@ -163,6 +168,9 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
163
168
|
if (prBranch) state.pr_branch = prBranch;
|
|
164
169
|
if (typeof metadata.marked_ready === "boolean") state.marked_ready = metadata.marked_ready;
|
|
165
170
|
if (typeof metadata.left_draft === "boolean") state.left_draft = metadata.left_draft;
|
|
171
|
+
if (typeof metadata.ship_held === "boolean") state.ship_held = metadata.ship_held;
|
|
172
|
+
if (typeof metadata.shipping_disabled === "boolean") state.shipping_disabled = metadata.shipping_disabled;
|
|
173
|
+
if (typeof metadata.ship_authorized === "boolean") state.ship_authorized = metadata.ship_authorized;
|
|
166
174
|
const ciStatus = nonEmptyString(metadata.ci_status);
|
|
167
175
|
if (ciStatus) state.ci_status = ciStatus;
|
|
168
176
|
const shipCommit = nonEmptyString(metadata.ship_commit);
|
|
@@ -194,12 +202,53 @@ function applyTerminalMetadata(state, metadata) {
|
|
|
194
202
|
if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
|
|
195
203
|
return state;
|
|
196
204
|
}
|
|
205
|
+
function shipControlStateFor(input) {
|
|
206
|
+
const state = input.state;
|
|
207
|
+
const status = input.status || state.status;
|
|
208
|
+
const raw = recordValue(input.raw) || {};
|
|
209
|
+
const shipReport = recordValue(state.ship_report) || {};
|
|
210
|
+
const prState = recordValue(state.pr_state) || {};
|
|
211
|
+
const shippingDisabled = firstBoolean(
|
|
212
|
+
raw.shipping_disabled,
|
|
213
|
+
raw.shippingDisabled,
|
|
214
|
+
state.shipping_disabled,
|
|
215
|
+
shipReport.shipping_disabled,
|
|
216
|
+
shipReport.shippingDisabled
|
|
217
|
+
) ?? state.request?.ship_mode === "none";
|
|
218
|
+
const explicitAuthorized = firstBoolean(
|
|
219
|
+
raw.ship_authorized,
|
|
220
|
+
raw.shipAuthorized,
|
|
221
|
+
state.ship_authorized,
|
|
222
|
+
shipReport.ship_authorized,
|
|
223
|
+
shipReport.shipAuthorized
|
|
224
|
+
);
|
|
225
|
+
const authorizationEvidence = Boolean(
|
|
226
|
+
status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
|
|
227
|
+
);
|
|
228
|
+
const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
|
|
229
|
+
const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
|
|
230
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
|
|
231
|
+
const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
|
|
232
|
+
return {
|
|
233
|
+
ship_held: shipHeld,
|
|
234
|
+
shipping_disabled: shippingDisabled,
|
|
235
|
+
ship_authorized: shipHeld ? false : inferredAuthorized
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function applyShipControlState(state, input = {}) {
|
|
239
|
+
const control = shipControlStateFor({ state, status: input.status, raw: input.raw });
|
|
240
|
+
state.ship_held = control.ship_held;
|
|
241
|
+
state.shipping_disabled = control.shipping_disabled;
|
|
242
|
+
state.ship_authorized = control.ship_authorized;
|
|
243
|
+
return state;
|
|
244
|
+
}
|
|
197
245
|
function createRunResult(input) {
|
|
198
246
|
const status = input.status || input.state.status;
|
|
199
247
|
const ok = isSuccessfulStatus(status);
|
|
200
248
|
const state = input.metadata ? applyTerminalMetadata(input.state, input.metadata) : input.state;
|
|
201
249
|
state.status = status;
|
|
202
250
|
state.ok = ok;
|
|
251
|
+
applyShipControlState(state, { status, raw: input.raw });
|
|
203
252
|
return compactRecord({
|
|
204
253
|
ok,
|
|
205
254
|
status,
|
|
@@ -217,6 +266,9 @@ function createRunResult(input) {
|
|
|
217
266
|
pr_state: state.pr_state,
|
|
218
267
|
marked_ready: state.marked_ready,
|
|
219
268
|
left_draft: state.left_draft,
|
|
269
|
+
ship_held: state.ship_held,
|
|
270
|
+
shipping_disabled: state.shipping_disabled,
|
|
271
|
+
ship_authorized: state.ship_authorized,
|
|
220
272
|
ci_status: state.ci_status,
|
|
221
273
|
ship_commit: state.ship_commit,
|
|
222
274
|
ship_remote_head: state.ship_remote_head,
|
|
@@ -246,6 +298,7 @@ function createRunResult(input) {
|
|
|
246
298
|
}
|
|
247
299
|
// Annotate the CommonJS export names for ESM import in node:
|
|
248
300
|
0 && (module.exports = {
|
|
301
|
+
applyShipControlState,
|
|
249
302
|
applyTerminalMetadata,
|
|
250
303
|
compactRecord,
|
|
251
304
|
createRunResult,
|
|
@@ -253,5 +306,6 @@ function createRunResult(input) {
|
|
|
253
306
|
isTerminalStatus,
|
|
254
307
|
nonEmptyString,
|
|
255
308
|
normalizeTerminalMetadata,
|
|
256
|
-
recordValue
|
|
309
|
+
recordValue,
|
|
310
|
+
shipControlStateFor
|
|
257
311
|
});
|
package/dist/result.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RiddleProofRunState,
|
|
1
|
+
import { RiddleProofRunState, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofEvidenceBundle, RiddleProofRunResult } from './types.cjs';
|
|
2
2
|
|
|
3
3
|
declare function isTerminalStatus(status: RiddleProofStatus): boolean;
|
|
4
4
|
declare function isSuccessfulStatus(status: RiddleProofStatus): boolean;
|
|
@@ -12,6 +12,20 @@ interface TerminalMetadataInput {
|
|
|
12
12
|
}
|
|
13
13
|
declare function normalizeTerminalMetadata(input: TerminalMetadataInput): RiddleProofTerminalMetadata;
|
|
14
14
|
declare function applyTerminalMetadata<T extends RiddleProofRunState>(state: T, metadata: RiddleProofTerminalMetadata): T;
|
|
15
|
+
interface RiddleProofShipControlState {
|
|
16
|
+
ship_held: boolean;
|
|
17
|
+
shipping_disabled: boolean;
|
|
18
|
+
ship_authorized: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare function shipControlStateFor(input: {
|
|
21
|
+
state: RiddleProofRunState;
|
|
22
|
+
status?: RiddleProofStatus;
|
|
23
|
+
raw?: Record<string, unknown>;
|
|
24
|
+
}): RiddleProofShipControlState;
|
|
25
|
+
declare function applyShipControlState<T extends RiddleProofRunState>(state: T, input?: {
|
|
26
|
+
status?: RiddleProofStatus;
|
|
27
|
+
raw?: Record<string, unknown>;
|
|
28
|
+
}): T;
|
|
15
29
|
declare function createRunResult(input: {
|
|
16
30
|
state: RiddleProofRunState;
|
|
17
31
|
status?: RiddleProofStatus;
|
|
@@ -22,4 +36,4 @@ declare function createRunResult(input: {
|
|
|
22
36
|
raw?: Record<string, unknown>;
|
|
23
37
|
}): RiddleProofRunResult;
|
|
24
38
|
|
|
25
|
-
export { type TerminalMetadataInput, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue };
|
|
39
|
+
export { type RiddleProofShipControlState, type TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue, shipControlStateFor };
|
package/dist/result.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RiddleProofRunState,
|
|
1
|
+
import { RiddleProofRunState, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofEvidenceBundle, RiddleProofRunResult } from './types.js';
|
|
2
2
|
|
|
3
3
|
declare function isTerminalStatus(status: RiddleProofStatus): boolean;
|
|
4
4
|
declare function isSuccessfulStatus(status: RiddleProofStatus): boolean;
|
|
@@ -12,6 +12,20 @@ interface TerminalMetadataInput {
|
|
|
12
12
|
}
|
|
13
13
|
declare function normalizeTerminalMetadata(input: TerminalMetadataInput): RiddleProofTerminalMetadata;
|
|
14
14
|
declare function applyTerminalMetadata<T extends RiddleProofRunState>(state: T, metadata: RiddleProofTerminalMetadata): T;
|
|
15
|
+
interface RiddleProofShipControlState {
|
|
16
|
+
ship_held: boolean;
|
|
17
|
+
shipping_disabled: boolean;
|
|
18
|
+
ship_authorized: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare function shipControlStateFor(input: {
|
|
21
|
+
state: RiddleProofRunState;
|
|
22
|
+
status?: RiddleProofStatus;
|
|
23
|
+
raw?: Record<string, unknown>;
|
|
24
|
+
}): RiddleProofShipControlState;
|
|
25
|
+
declare function applyShipControlState<T extends RiddleProofRunState>(state: T, input?: {
|
|
26
|
+
status?: RiddleProofStatus;
|
|
27
|
+
raw?: Record<string, unknown>;
|
|
28
|
+
}): T;
|
|
15
29
|
declare function createRunResult(input: {
|
|
16
30
|
state: RiddleProofRunState;
|
|
17
31
|
status?: RiddleProofStatus;
|
|
@@ -22,4 +36,4 @@ declare function createRunResult(input: {
|
|
|
22
36
|
raw?: Record<string, unknown>;
|
|
23
37
|
}): RiddleProofRunResult;
|
|
24
38
|
|
|
25
|
-
export { type TerminalMetadataInput, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue };
|
|
39
|
+
export { type RiddleProofShipControlState, type TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue, shipControlStateFor };
|
package/dist/result.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
applyShipControlState,
|
|
2
3
|
applyTerminalMetadata,
|
|
3
4
|
compactRecord,
|
|
4
5
|
createRunResult,
|
|
@@ -6,10 +7,12 @@ import {
|
|
|
6
7
|
isTerminalStatus,
|
|
7
8
|
nonEmptyString,
|
|
8
9
|
normalizeTerminalMetadata,
|
|
9
|
-
recordValue
|
|
10
|
-
|
|
10
|
+
recordValue,
|
|
11
|
+
shipControlStateFor
|
|
12
|
+
} from "./chunk-W44XEGYW.js";
|
|
11
13
|
import "./chunk-MLKGABMK.js";
|
|
12
14
|
export {
|
|
15
|
+
applyShipControlState,
|
|
13
16
|
applyTerminalMetadata,
|
|
14
17
|
compactRecord,
|
|
15
18
|
createRunResult,
|
|
@@ -17,5 +20,6 @@ export {
|
|
|
17
20
|
isTerminalStatus,
|
|
18
21
|
nonEmptyString,
|
|
19
22
|
normalizeTerminalMetadata,
|
|
20
|
-
recordValue
|
|
23
|
+
recordValue,
|
|
24
|
+
shipControlStateFor
|
|
21
25
|
};
|
package/dist/run-card.cjs
CHANGED
|
@@ -48,6 +48,45 @@ function nonEmptyString(value) {
|
|
|
48
48
|
function recordValue(value) {
|
|
49
49
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
50
50
|
}
|
|
51
|
+
function firstBoolean(...values) {
|
|
52
|
+
for (const value of values) {
|
|
53
|
+
if (typeof value === "boolean") return value;
|
|
54
|
+
}
|
|
55
|
+
return void 0;
|
|
56
|
+
}
|
|
57
|
+
function shipControlStateFor(input) {
|
|
58
|
+
const state = input.state;
|
|
59
|
+
const status = input.status || state.status;
|
|
60
|
+
const raw = recordValue(input.raw) || {};
|
|
61
|
+
const shipReport = recordValue(state.ship_report) || {};
|
|
62
|
+
const prState = recordValue(state.pr_state) || {};
|
|
63
|
+
const shippingDisabled = firstBoolean(
|
|
64
|
+
raw.shipping_disabled,
|
|
65
|
+
raw.shippingDisabled,
|
|
66
|
+
state.shipping_disabled,
|
|
67
|
+
shipReport.shipping_disabled,
|
|
68
|
+
shipReport.shippingDisabled
|
|
69
|
+
) ?? state.request?.ship_mode === "none";
|
|
70
|
+
const explicitAuthorized = firstBoolean(
|
|
71
|
+
raw.ship_authorized,
|
|
72
|
+
raw.shipAuthorized,
|
|
73
|
+
state.ship_authorized,
|
|
74
|
+
shipReport.ship_authorized,
|
|
75
|
+
shipReport.shipAuthorized
|
|
76
|
+
);
|
|
77
|
+
const authorizationEvidence = Boolean(
|
|
78
|
+
status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
|
|
79
|
+
);
|
|
80
|
+
const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
|
|
81
|
+
const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
|
|
82
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
|
|
83
|
+
const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
|
|
84
|
+
return {
|
|
85
|
+
ship_held: shipHeld,
|
|
86
|
+
shipping_disabled: shippingDisabled,
|
|
87
|
+
ship_authorized: shipHeld ? false : inferredAuthorized
|
|
88
|
+
};
|
|
89
|
+
}
|
|
51
90
|
|
|
52
91
|
// src/checkpoint.ts
|
|
53
92
|
var import_node_crypto = __toESM(require("crypto"), 1);
|
|
@@ -218,6 +257,7 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
218
257
|
const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
|
|
219
258
|
const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
|
|
220
259
|
const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
|
|
260
|
+
const shipControl = shipControlStateFor({ state });
|
|
221
261
|
return {
|
|
222
262
|
version: RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
223
263
|
run_id: state.run_id || "unknown",
|
|
@@ -271,6 +311,9 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
271
311
|
stop_condition: compactRecord({
|
|
272
312
|
status: state.status,
|
|
273
313
|
terminal: isTerminalStatus(state.status),
|
|
314
|
+
ship_held: shipControl.ship_held,
|
|
315
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
316
|
+
ship_authorized: shipControl.ship_authorized,
|
|
274
317
|
blocker_code: state.blocker?.code || null,
|
|
275
318
|
blocker_message: state.blocker?.message || null,
|
|
276
319
|
proof_decision: state.proof_decision,
|
package/dist/run-card.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
3
3
|
createRiddleProofRunCard
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NYRMPWJB.js";
|
|
5
|
+
import "./chunk-QUK3SG24.js";
|
|
6
|
+
import "./chunk-W44XEGYW.js";
|
|
7
7
|
import "./chunk-MLKGABMK.js";
|
|
8
8
|
export {
|
|
9
9
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|