@riddledc/riddle-proof 0.8.54 → 0.8.56

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.
Files changed (68) hide show
  1. package/dist/adapters/codex-exec-agent.js +2 -2
  2. package/dist/adapters/codex.js +2 -2
  3. package/dist/adapters/local-agent.js +2 -2
  4. package/dist/adapters/openclaw.js +5 -5
  5. package/dist/advanced/engine-harness.cjs +129 -22
  6. package/dist/advanced/engine-harness.js +5 -5
  7. package/dist/advanced/index.cjs +130 -23
  8. package/dist/advanced/index.d.cts +1 -1
  9. package/dist/advanced/index.d.ts +1 -1
  10. package/dist/advanced/index.js +6 -6
  11. package/dist/advanced/proof-run-engine.d.cts +1 -1
  12. package/dist/advanced/proof-run-engine.d.ts +1 -1
  13. package/dist/advanced/runner.cjs +59 -1
  14. package/dist/advanced/runner.js +5 -5
  15. package/dist/checkpoint.cjs +4 -0
  16. package/dist/checkpoint.js +2 -2
  17. package/dist/{chunk-ECLGGGAI.js → chunk-54DIEDR3.js} +3 -3
  18. package/dist/{chunk-VY4Y5U57.js → chunk-CUBYSWZT.js} +57 -0
  19. package/dist/{chunk-IV4DVWPR.js → chunk-GHBNDHG7.js} +67 -25
  20. package/dist/{chunk-S5DX7Z6X.js → chunk-JLOZTVXU.js} +3 -3
  21. package/dist/{chunk-JJ4IWRMJ.js → chunk-KNPCWWF3.js} +8 -3
  22. package/dist/{chunk-BLM5EIBA.js → chunk-MOTQNIZX.js} +5 -1
  23. package/dist/{chunk-73EBR3YL.js → chunk-RS4HJLJQ.js} +1 -1
  24. package/dist/{chunk-LNWJAHAQ.js → chunk-TTB3ZAVX.js} +2 -2
  25. package/dist/{chunk-WDIKPIMB.js → chunk-UZIX7M7D.js} +11 -4
  26. package/dist/cli/index.js +7 -7
  27. package/dist/cli.cjs +129 -22
  28. package/dist/cli.js +7 -7
  29. package/dist/codex-exec-agent.js +2 -2
  30. package/dist/engine-harness.cjs +129 -22
  31. package/dist/engine-harness.js +5 -5
  32. package/dist/index.cjs +136 -23
  33. package/dist/index.d.cts +1 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.js +14 -8
  36. package/dist/local-agent.js +2 -2
  37. package/dist/openclaw.js +5 -5
  38. package/dist/{proof-run-engine-MiKZt9oY.d.ts → proof-run-engine-BqRoA3Do.d.ts} +3 -3
  39. package/dist/{proof-run-engine-Baiv6l3A.d.cts → proof-run-engine-DpChFR5H.d.cts} +3 -3
  40. package/dist/proof-run-engine.d.cts +1 -1
  41. package/dist/proof-run-engine.d.ts +1 -1
  42. package/dist/result.cjs +62 -2
  43. package/dist/result.d.cts +17 -2
  44. package/dist/result.d.ts +17 -2
  45. package/dist/result.js +9 -3
  46. package/dist/run-card.cjs +43 -0
  47. package/dist/run-card.js +3 -3
  48. package/dist/runner.cjs +59 -1
  49. package/dist/runner.js +5 -5
  50. package/dist/spec/checkpoint.cjs +4 -0
  51. package/dist/spec/checkpoint.js +2 -2
  52. package/dist/spec/index.cjs +74 -1
  53. package/dist/spec/index.d.cts +1 -1
  54. package/dist/spec/index.d.ts +1 -1
  55. package/dist/spec/index.js +11 -5
  56. package/dist/spec/result.cjs +62 -2
  57. package/dist/spec/result.d.cts +1 -1
  58. package/dist/spec/result.d.ts +1 -1
  59. package/dist/spec/result.js +9 -3
  60. package/dist/spec/run-card.cjs +43 -0
  61. package/dist/spec/run-card.js +3 -3
  62. package/dist/spec/state.cjs +52 -1
  63. package/dist/spec/state.js +4 -4
  64. package/dist/state.cjs +52 -1
  65. package/dist/state.js +4 -4
  66. package/dist/types.d.cts +17 -0
  67. package/dist/types.d.ts +17 -0
  68. 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,
@@ -3492,6 +3493,7 @@ __export(index_exports, {
3492
3493
  extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
3493
3494
  getRiddleBalance: () => getRiddleBalance,
3494
3495
  isDuplicateCheckpointResponse: () => isDuplicateCheckpointResponse,
3496
+ isProtectedFinalStatus: () => isProtectedFinalStatus,
3495
3497
  isRiddleProofPlayabilityMode: () => isRiddleProofPlayabilityMode,
3496
3498
  isSuccessfulStatus: () => isSuccessfulStatus,
3497
3499
  isTerminalRiddleJobStatus: () => isTerminalRiddleJobStatus,
@@ -3527,6 +3529,7 @@ __export(index_exports, {
3527
3529
  runRiddleServerPreview: () => runRiddleServerPreview,
3528
3530
  sanitizeBasicGameplayJsonString: () => sanitizeBasicGameplayJsonString,
3529
3531
  setRunStatus: () => setRunStatus,
3532
+ shipControlStateFor: () => shipControlStateFor,
3530
3533
  slugifyRiddleProofProfileName: () => slugifyRiddleProofProfileName,
3531
3534
  statePathsForRunState: () => statePathsForRunState,
3532
3535
  summarizeCaptureArtifacts: () => summarizeCaptureArtifacts,
@@ -3541,6 +3544,9 @@ module.exports = __toCommonJS(index_exports);
3541
3544
  function isTerminalStatus(status) {
3542
3545
  return status === "blocked" || status === "failed" || status === "ready_to_ship" || status === "shipped" || status === "completed";
3543
3546
  }
3547
+ function isProtectedFinalStatus(status) {
3548
+ return status === "ready_to_ship" || status === "shipped" || status === "completed";
3549
+ }
3544
3550
  function isSuccessfulStatus(status) {
3545
3551
  return status !== "blocked" && status !== "failed";
3546
3552
  }
@@ -3638,6 +3644,9 @@ function normalizeTerminalMetadata(input) {
3638
3644
  pr_state: prState,
3639
3645
  marked_ready: markedReady,
3640
3646
  left_draft: leftDraft,
3647
+ ship_held: firstBoolean(riddleState.ship_held, result.ship_held, result.shipHeld, details.ship_held, details.shipHeld, shipReport.ship_held, shipReport.shipHeld),
3648
+ shipping_disabled: firstBoolean(riddleState.shipping_disabled, result.shipping_disabled, result.shippingDisabled, details.shipping_disabled, details.shippingDisabled, shipReport.shipping_disabled, shipReport.shippingDisabled),
3649
+ ship_authorized: firstBoolean(riddleState.ship_authorized, result.ship_authorized, result.shipAuthorized, details.ship_authorized, details.shipAuthorized, shipReport.ship_authorized, shipReport.shipAuthorized),
3641
3650
  ci_status: firstNonEmptyString(riddleState.ci_status, result.ci_status, result.ciStatus, details.ci_status, details.ciStatus, shipReport.ci_status),
3642
3651
  ship_commit: firstNonEmptyString(riddleState.ship_commit, result.ship_commit, result.shipCommit, details.ship_commit, details.shipCommit, shipReport.shipped_commit, shipReport.ship_commit),
3643
3652
  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 +3680,9 @@ function applyTerminalMetadata(state, metadata) {
3671
3680
  if (prBranch) state.pr_branch = prBranch;
3672
3681
  if (typeof metadata.marked_ready === "boolean") state.marked_ready = metadata.marked_ready;
3673
3682
  if (typeof metadata.left_draft === "boolean") state.left_draft = metadata.left_draft;
3683
+ if (typeof metadata.ship_held === "boolean") state.ship_held = metadata.ship_held;
3684
+ if (typeof metadata.shipping_disabled === "boolean") state.shipping_disabled = metadata.shipping_disabled;
3685
+ if (typeof metadata.ship_authorized === "boolean") state.ship_authorized = metadata.ship_authorized;
3674
3686
  const ciStatus = nonEmptyString(metadata.ci_status);
3675
3687
  if (ciStatus) state.ci_status = ciStatus;
3676
3688
  const shipCommit = nonEmptyString(metadata.ship_commit);
@@ -3702,12 +3714,54 @@ function applyTerminalMetadata(state, metadata) {
3702
3714
  if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
3703
3715
  return state;
3704
3716
  }
3717
+ function shipControlStateFor(input) {
3718
+ const state = input.state;
3719
+ const status = input.status || state.status;
3720
+ const raw = recordValue(input.raw) || {};
3721
+ const shipReport = recordValue(state.ship_report) || {};
3722
+ const prState = recordValue(state.pr_state) || {};
3723
+ const shippingDisabled = firstBoolean(
3724
+ raw.shipping_disabled,
3725
+ raw.shippingDisabled,
3726
+ state.shipping_disabled,
3727
+ shipReport.shipping_disabled,
3728
+ shipReport.shippingDisabled
3729
+ ) ?? state.request?.ship_mode === "none";
3730
+ const explicitAuthorized = firstBoolean(
3731
+ raw.ship_authorized,
3732
+ raw.shipAuthorized,
3733
+ state.ship_authorized,
3734
+ shipReport.ship_authorized,
3735
+ shipReport.shipAuthorized
3736
+ );
3737
+ const authorizationEvidence = Boolean(
3738
+ status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
3739
+ );
3740
+ const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
3741
+ const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
3742
+ const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
3743
+ const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
3744
+ return {
3745
+ ship_held: shipHeld,
3746
+ shipping_disabled: shippingDisabled,
3747
+ ship_authorized: shipHeld ? false : inferredAuthorized
3748
+ };
3749
+ }
3750
+ function applyShipControlState(state, input = {}) {
3751
+ const control = shipControlStateFor({ state, status: input.status, raw: input.raw });
3752
+ state.ship_held = control.ship_held;
3753
+ state.shipping_disabled = control.shipping_disabled;
3754
+ state.ship_authorized = control.ship_authorized;
3755
+ return state;
3756
+ }
3705
3757
  function createRunResult(input) {
3706
3758
  const status = input.status || input.state.status;
3707
3759
  const ok = isSuccessfulStatus(status);
3708
3760
  const state = input.metadata ? applyTerminalMetadata(input.state, input.metadata) : input.state;
3709
3761
  state.status = status;
3710
3762
  state.ok = ok;
3763
+ if (isProtectedFinalStatus(status)) state.finalized = true;
3764
+ applyShipControlState(state, { status, raw: input.raw });
3711
3765
  return compactRecord({
3712
3766
  ok,
3713
3767
  status,
@@ -3725,6 +3779,9 @@ function createRunResult(input) {
3725
3779
  pr_state: state.pr_state,
3726
3780
  marked_ready: state.marked_ready,
3727
3781
  left_draft: state.left_draft,
3782
+ ship_held: state.ship_held,
3783
+ shipping_disabled: state.shipping_disabled,
3784
+ ship_authorized: state.ship_authorized,
3728
3785
  ci_status: state.ci_status,
3729
3786
  ship_commit: state.ship_commit,
3730
3787
  ship_remote_head: state.ship_remote_head,
@@ -4451,6 +4508,8 @@ function checkpointSummaryFromState(state, engineStatePath2) {
4451
4508
  const packets = history.filter((entry) => entry.packet);
4452
4509
  const responses = acceptedCheckpointResponseEntries(state);
4453
4510
  const duplicateResponses = events.filter((event) => event.kind === "checkpoint.response.duplicate");
4511
+ const rejectedResponses = events.filter((event) => event.kind === "checkpoint.response.rejected");
4512
+ const ignoredResponses = events.filter((event) => event.kind === "checkpoint.response.ignored");
4454
4513
  const latestPacketEntry = [...history].reverse().find((entry) => entry.packet);
4455
4514
  const latestResponseEntry = [...responses].reverse().find((entry) => entry.response);
4456
4515
  const latestPacket = state.checkpoint_packet || latestPacketEntry?.packet;
@@ -4466,6 +4525,8 @@ function checkpointSummaryFromState(state, engineStatePath2) {
4466
4525
  packet_count: packets.length,
4467
4526
  response_count: responses.length,
4468
4527
  duplicate_response_count: duplicateResponses.length,
4528
+ rejected_response_count: rejectedResponses.length,
4529
+ ignored_response_count: ignoredResponses.length,
4469
4530
  latest_checkpoint: state.checkpoint_packet?.checkpoint || latestResponse?.checkpoint || state.last_checkpoint || null,
4470
4531
  latest_stage: state.checkpoint_packet?.stage || latestResponse?.continue_with_stage || state.current_stage || null,
4471
4532
  latest_kind: state.checkpoint_packet?.kind || latestPacket?.kind || null,
@@ -4704,6 +4765,7 @@ function createRiddleProofRunCard(state, input = {}) {
4704
4765
  const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
4705
4766
  const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
4706
4767
  const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
4768
+ const shipControl = shipControlStateFor({ state });
4707
4769
  return {
4708
4770
  version: RIDDLE_PROOF_RUN_CARD_VERSION,
4709
4771
  run_id: state.run_id || "unknown",
@@ -4757,6 +4819,9 @@ function createRiddleProofRunCard(state, input = {}) {
4757
4819
  stop_condition: compactRecord({
4758
4820
  status: state.status,
4759
4821
  terminal: isTerminalStatus(state.status),
4822
+ ship_held: shipControl.ship_held,
4823
+ shipping_disabled: shipControl.shipping_disabled,
4824
+ ship_authorized: shipControl.ship_authorized,
4760
4825
  blocker_code: state.blocker?.code || null,
4761
4826
  blocker_message: state.blocker?.message || null,
4762
4827
  proof_decision: state.proof_decision,
@@ -4947,7 +5012,8 @@ function appendStageHeartbeat(state, input) {
4947
5012
  function createRunStatusSnapshot(state, at = timestamp2()) {
4948
5013
  const latestEvent = state.events[state.events.length - 1];
4949
5014
  const runId = state.run_id || "unknown";
4950
- 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);
5015
+ const shipControl = shipControlStateFor({ state });
5016
+ 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
5017
  const runCard = existingRunCardCurrent ? state.run_card : createRiddleProofRunCard(state, { at });
4952
5018
  return compactRecord({
4953
5019
  run_id: runId,
@@ -4961,6 +5027,9 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
4961
5027
  pr_url: state.pr_url ?? null,
4962
5028
  pr_branch: state.pr_branch ?? null,
4963
5029
  pr_state: state.pr_state,
5030
+ ship_held: shipControl.ship_held,
5031
+ shipping_disabled: shipControl.shipping_disabled,
5032
+ ship_authorized: shipControl.ship_authorized,
4964
5033
  ci_status: state.ci_status,
4965
5034
  ship_commit: state.ship_commit,
4966
5035
  ship_remote_head: state.ship_remote_head,
@@ -4986,6 +5055,7 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
4986
5055
  function setRunStatus(state, status, at = timestamp2()) {
4987
5056
  state.status = status;
4988
5057
  state.ok = status !== "blocked" && status !== "failed";
5058
+ if (isProtectedFinalStatus(status)) state.finalized = true;
4989
5059
  state.updated_at = at;
4990
5060
  return state;
4991
5061
  }
@@ -5444,7 +5514,7 @@ async function runRiddleProof(input) {
5444
5514
  status: "ready_to_ship",
5445
5515
  last_summary: assessment.summary,
5446
5516
  evidence_bundle: evidenceBundle,
5447
- raw: { implementation, assessment }
5517
+ raw: { implementation, assessment, ship_held: true, shipping_disabled: true, ship_authorized: false }
5448
5518
  });
5449
5519
  return notifyIfConfigured({ state, result: result2, notification: adapters.notification });
5450
5520
  }
@@ -5570,9 +5640,6 @@ function loadRunState(input) {
5570
5640
  state_path: statePath
5571
5641
  });
5572
5642
  }
5573
- function isProtectedFinalStatus(status) {
5574
- return status === "ready_to_ship" || status === "shipped" || status === "completed";
5575
- }
5576
5643
  function shouldPreserveFinalizedRunState(filePath, incoming) {
5577
5644
  const existing = readJson(filePath);
5578
5645
  if (!existing?.finalized || !isProtectedFinalStatus(existing.status)) return false;
@@ -5763,7 +5830,7 @@ function shipHeldTerminal(state, result) {
5763
5830
  "ready_to_ship",
5764
5831
  result,
5765
5832
  result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
5766
- { ship_held: true }
5833
+ { ship_held: true, shipping_disabled: true, ship_authorized: false }
5767
5834
  );
5768
5835
  }
5769
5836
  function checkpointContinueStage2(result) {
@@ -6041,6 +6108,7 @@ function terminalResult(state, status, result, summary, raw = {}) {
6041
6108
  engineResult: result
6042
6109
  });
6043
6110
  applyTerminalMetadata(state, metadata);
6111
+ applyShipControlState(state, { status, raw });
6044
6112
  persist(state);
6045
6113
  return createRunResult({
6046
6114
  state,
@@ -6143,19 +6211,38 @@ function appendCheckpointResponse(state, response, input = {}) {
6143
6211
  setRunStatus(state, "running", at);
6144
6212
  persist(state);
6145
6213
  }
6214
+ function checkpointResponseRejectedBlocker(state, input) {
6215
+ const packet = input.packet || null;
6216
+ const response = input.response || null;
6217
+ appendRunEvent(state, {
6218
+ kind: "checkpoint.response.rejected",
6219
+ checkpoint: response?.checkpoint || packet?.checkpoint || input.blocker.checkpoint || null,
6220
+ stage: packet?.stage || state.current_stage || "author",
6221
+ summary: input.blocker.message,
6222
+ details: compactRecord({
6223
+ code: input.blocker.code,
6224
+ decision: response?.decision,
6225
+ resume_token: response?.resume_token,
6226
+ packet_id: response?.packet_id,
6227
+ source: response?.source
6228
+ })
6229
+ });
6230
+ return { blocker: input.blocker };
6231
+ }
6146
6232
  function checkpointResponseContinuation(state, value) {
6147
6233
  if (!value) return {};
6148
6234
  const packet = state.checkpoint_packet;
6149
6235
  const response = normalizeCheckpointResponse(value);
6150
6236
  if (!response) {
6151
- return {
6237
+ return checkpointResponseRejectedBlocker(state, {
6238
+ packet,
6152
6239
  blocker: {
6153
6240
  code: "checkpoint_response_invalid",
6154
6241
  checkpoint: packet?.checkpoint || state.last_checkpoint || null,
6155
6242
  message: "Checkpoint response was not a valid riddle-proof.checkpoint_response.v1 object.",
6156
6243
  details: { checkpoint_packet: packet || null, checkpoint_summary: checkpointSummaryFromState(state) }
6157
6244
  }
6158
- };
6245
+ });
6159
6246
  }
6160
6247
  if (isDuplicateCheckpointResponse(state, response)) {
6161
6248
  const stage = packet?.stage || state.current_stage || "author";
@@ -6186,17 +6273,20 @@ function checkpointResponseContinuation(state, value) {
6186
6273
  };
6187
6274
  }
6188
6275
  if (!packet) {
6189
- return {
6276
+ return checkpointResponseRejectedBlocker(state, {
6277
+ response,
6190
6278
  blocker: {
6191
6279
  code: "checkpoint_response_without_packet",
6192
6280
  checkpoint: response.checkpoint,
6193
6281
  message: "A checkpoint response was supplied, but the run state has no pending checkpoint packet.",
6194
6282
  details: { response, checkpoint_summary: checkpointSummaryFromState(state) }
6195
6283
  }
6196
- };
6284
+ });
6197
6285
  }
6198
6286
  if (response.run_id !== packet.run_id || response.checkpoint !== packet.checkpoint) {
6199
- return {
6287
+ return checkpointResponseRejectedBlocker(state, {
6288
+ packet,
6289
+ response,
6200
6290
  blocker: {
6201
6291
  code: "checkpoint_response_mismatch",
6202
6292
  checkpoint: packet.checkpoint,
@@ -6207,10 +6297,12 @@ function checkpointResponseContinuation(state, value) {
6207
6297
  actual: { run_id: response.run_id, checkpoint: response.checkpoint }
6208
6298
  }
6209
6299
  }
6210
- };
6300
+ });
6211
6301
  }
6212
6302
  if (packet.resume_token && response.resume_token !== packet.resume_token) {
6213
- return {
6303
+ return checkpointResponseRejectedBlocker(state, {
6304
+ packet,
6305
+ response,
6214
6306
  blocker: {
6215
6307
  code: "checkpoint_response_resume_token_mismatch",
6216
6308
  checkpoint: packet.checkpoint,
@@ -6221,10 +6313,12 @@ function checkpointResponseContinuation(state, value) {
6221
6313
  actual_resume_token: response.resume_token || null
6222
6314
  }
6223
6315
  }
6224
- };
6316
+ });
6225
6317
  }
6226
6318
  if (packet.packet_id && response.packet_id !== packet.packet_id) {
6227
- return {
6319
+ return checkpointResponseRejectedBlocker(state, {
6320
+ packet,
6321
+ response,
6228
6322
  blocker: {
6229
6323
  code: "checkpoint_response_packet_id_mismatch",
6230
6324
  checkpoint: packet.checkpoint,
@@ -6237,10 +6331,12 @@ function checkpointResponseContinuation(state, value) {
6237
6331
  actual_resume_token: response.resume_token || null
6238
6332
  }
6239
6333
  }
6240
- };
6334
+ });
6241
6335
  }
6242
6336
  if (!packet.allowed_decisions.includes(response.decision)) {
6243
- return {
6337
+ return checkpointResponseRejectedBlocker(state, {
6338
+ packet,
6339
+ response,
6244
6340
  blocker: {
6245
6341
  code: "checkpoint_response_decision_not_allowed",
6246
6342
  checkpoint: packet.checkpoint,
@@ -6252,7 +6348,7 @@ function checkpointResponseContinuation(state, value) {
6252
6348
  response
6253
6349
  }
6254
6350
  }
6255
- };
6351
+ });
6256
6352
  }
6257
6353
  const base = {
6258
6354
  action: "run",
@@ -6262,14 +6358,16 @@ function checkpointResponseContinuation(state, value) {
6262
6358
  if (response.decision === "author_packet") {
6263
6359
  const payload = authorPacketPayloadFromCheckpointResponse(response);
6264
6360
  if (!payload) {
6265
- return {
6361
+ return checkpointResponseRejectedBlocker(state, {
6362
+ packet,
6363
+ response,
6266
6364
  blocker: {
6267
6365
  code: "checkpoint_author_packet_missing",
6268
6366
  checkpoint: packet.checkpoint,
6269
6367
  message: "Checkpoint response decision=author_packet did not include a proof_plan and capture_script payload.",
6270
6368
  details: { stage: packet.stage, response }
6271
6369
  }
6272
- };
6370
+ });
6273
6371
  }
6274
6372
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
6275
6373
  appendCheckpointResponse(state, response);
@@ -6298,14 +6396,16 @@ function checkpointResponseContinuation(state, value) {
6298
6396
  const workdir = nonEmptyString(packet.state_excerpt?.after_worktree) || state.worktree_path;
6299
6397
  if (workdir) state.worktree_path = workdir;
6300
6398
  if (!hasGitDiff(workdir)) {
6301
- return {
6399
+ return checkpointResponseRejectedBlocker(state, {
6400
+ packet,
6401
+ response,
6302
6402
  blocker: {
6303
6403
  code: "implementation_diff_missing",
6304
6404
  checkpoint: packet.checkpoint,
6305
6405
  message: "Checkpoint response claimed implementation_complete, but the after worktree has no detectable git diff.",
6306
6406
  details: { stage: packet.stage, worktree_path: workdir || null, response }
6307
6407
  }
6308
- };
6408
+ });
6309
6409
  }
6310
6410
  appendCheckpointResponse(state, response);
6311
6411
  return {
@@ -6354,7 +6454,13 @@ function checkpointResponseContinuation(state, value) {
6354
6454
  response,
6355
6455
  code: "checkpoint_response_source_not_trusted"
6356
6456
  });
6357
- if (sourceBlocker) return { blocker: sourceBlocker };
6457
+ if (sourceBlocker) {
6458
+ return checkpointResponseRejectedBlocker(state, {
6459
+ packet,
6460
+ response,
6461
+ blocker: sourceBlocker
6462
+ });
6463
+ }
6358
6464
  appendCheckpointResponse(state, response);
6359
6465
  if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
6360
6466
  const result = {
@@ -6373,6 +6479,8 @@ function checkpointResponseContinuation(state, value) {
6373
6479
  response.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
6374
6480
  {
6375
6481
  ship_held: true,
6482
+ shipping_disabled: true,
6483
+ ship_authorized: false,
6376
6484
  proof_assessment: assessment
6377
6485
  }
6378
6486
  )
@@ -6966,6 +7074,8 @@ async function routeCheckpoint(request, state, result, agent, input) {
6966
7074
  assessment.summary || result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
6967
7075
  {
6968
7076
  ship_held: true,
7077
+ shipping_disabled: true,
7078
+ ship_authorized: false,
6969
7079
  proof_assessment: payload
6970
7080
  }
6971
7081
  )
@@ -20048,6 +20158,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
20048
20158
  appendStageHeartbeat,
20049
20159
  applyPrLifecycleState,
20050
20160
  applyRiddleProofProfileArtifactCompleteness,
20161
+ applyShipControlState,
20051
20162
  applyTerminalMetadata,
20052
20163
  assessBasicGameplayEvidence,
20053
20164
  assessBasicGameplayProgressionCheck,
@@ -20100,6 +20211,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
20100
20211
  extractRiddleProofProfileResult,
20101
20212
  getRiddleBalance,
20102
20213
  isDuplicateCheckpointResponse,
20214
+ isProtectedFinalStatus,
20103
20215
  isRiddleProofPlayabilityMode,
20104
20216
  isSuccessfulStatus,
20105
20217
  isTerminalRiddleJobStatus,
@@ -20135,6 +20247,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
20135
20247
  runRiddleServerPreview,
20136
20248
  sanitizeBasicGameplayJsonString,
20137
20249
  setRunStatus,
20250
+ shipControlStateFor,
20138
20251
  slugifyRiddleProofProfileName,
20139
20252
  statePathsForRunState,
20140
20253
  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, isProtectedFinalStatus, 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, isProtectedFinalStatus, 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-S5DX7Z6X.js";
3
+ } from "./chunk-JLOZTVXU.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-IV4DVWPR.js";
105
+ } from "./chunk-GHBNDHG7.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-WDIKPIMB.js";
117
+ } from "./chunk-UZIX7M7D.js";
118
118
  import {
119
119
  RIDDLE_PROOF_RUN_CARD_VERSION,
120
120
  createRiddleProofRunCard
121
- } from "./chunk-JJ4IWRMJ.js";
121
+ } from "./chunk-KNPCWWF3.js";
122
122
  import "./chunk-EKZXU6MU.js";
123
123
  import {
124
124
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
@@ -136,23 +136,26 @@ import {
136
136
  normalizeCheckpointResponse,
137
137
  proofContractFromAuthorCheckpointResponse,
138
138
  statePathsForRunState
139
- } from "./chunk-BLM5EIBA.js";
139
+ } from "./chunk-MOTQNIZX.js";
140
140
  import "./chunk-JFQXAJH2.js";
141
141
  import {
142
142
  createCodexExecAgentAdapter,
143
143
  createCodexExecJsonRunner,
144
144
  runCodexExecAgentDoctor
145
- } from "./chunk-73EBR3YL.js";
145
+ } from "./chunk-RS4HJLJQ.js";
146
146
  import {
147
+ applyShipControlState,
147
148
  applyTerminalMetadata,
148
149
  compactRecord,
149
150
  createRunResult,
151
+ isProtectedFinalStatus,
150
152
  isSuccessfulStatus,
151
153
  isTerminalStatus,
152
154
  nonEmptyString,
153
155
  normalizeTerminalMetadata,
154
- recordValue
155
- } from "./chunk-VY4Y5U57.js";
156
+ recordValue,
157
+ shipControlStateFor
158
+ } from "./chunk-CUBYSWZT.js";
156
159
  import "./chunk-MLKGABMK.js";
157
160
  export {
158
161
  BASIC_GAMEPLAY_ACTION_TYPES,
@@ -188,6 +191,7 @@ export {
188
191
  appendStageHeartbeat,
189
192
  applyPrLifecycleState,
190
193
  applyRiddleProofProfileArtifactCompleteness,
194
+ applyShipControlState,
191
195
  applyTerminalMetadata,
192
196
  assessBasicGameplayEvidence,
193
197
  assessBasicGameplayProgressionCheck,
@@ -240,6 +244,7 @@ export {
240
244
  extractRiddleProofProfileResult,
241
245
  getRiddleBalance,
242
246
  isDuplicateCheckpointResponse,
247
+ isProtectedFinalStatus,
243
248
  isRiddleProofPlayabilityMode,
244
249
  isSuccessfulStatus,
245
250
  isTerminalRiddleJobStatus,
@@ -275,6 +280,7 @@ export {
275
280
  runRiddleServerPreview,
276
281
  sanitizeBasicGameplayJsonString,
277
282
  setRunStatus,
283
+ shipControlStateFor,
278
284
  slugifyRiddleProofProfileName,
279
285
  statePathsForRunState,
280
286
  summarizeCaptureArtifacts,
@@ -3,8 +3,8 @@ import {
3
3
  createCodexExecAgentAdapter,
4
4
  createCodexExecJsonRunner,
5
5
  runCodexExecAgentDoctor
6
- } from "./chunk-73EBR3YL.js";
7
- import "./chunk-VY4Y5U57.js";
6
+ } from "./chunk-RS4HJLJQ.js";
7
+ import "./chunk-CUBYSWZT.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-LNWJAHAQ.js";
7
- import "./chunk-WDIKPIMB.js";
8
- import "./chunk-JJ4IWRMJ.js";
9
- import "./chunk-BLM5EIBA.js";
10
- import "./chunk-VY4Y5U57.js";
6
+ } from "./chunk-TTB3ZAVX.js";
7
+ import "./chunk-UZIX7M7D.js";
8
+ import "./chunk-KNPCWWF3.js";
9
+ import "./chunk-MOTQNIZX.js";
10
+ import "./chunk-CUBYSWZT.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
  export {
13
13
  openClawIntegrationContext,
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "setup" | "recon" | "author" | "implement" | "verify" | "ship";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "setup" | "recon" | "author" | "implement" | "verify" | "ship";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -1,2 +1,2 @@
1
1
  import './proof-run-core-7Dqm7RKM.cjs';
2
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-Baiv6l3A.cjs';
2
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-DpChFR5H.cjs';
@@ -1,2 +1,2 @@
1
1
  import './proof-run-core-7Dqm7RKM.js';
2
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-MiKZt9oY.js';
2
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-BqRoA3Do.js';