@riddledc/riddle-proof 0.8.60 → 0.8.62

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 (56) hide show
  1. package/dist/adapters/codex-exec-agent.js +3 -3
  2. package/dist/adapters/codex.js +3 -3
  3. package/dist/adapters/local-agent.js +3 -3
  4. package/dist/adapters/openclaw.js +6 -6
  5. package/dist/advanced/engine-harness.cjs +46 -0
  6. package/dist/advanced/engine-harness.js +6 -6
  7. package/dist/advanced/index.cjs +46 -0
  8. package/dist/advanced/index.js +7 -7
  9. package/dist/advanced/runner.js +6 -6
  10. package/dist/checkpoint.js +3 -3
  11. package/dist/{chunk-NXEAFQYZ.js → chunk-2OTPBHSM.js} +2 -2
  12. package/dist/{chunk-WKIIJX3O.js → chunk-6PSM6KB2.js} +66 -1
  13. package/dist/{chunk-AWRBSVNW.js → chunk-DDAV6D6K.js} +4 -4
  14. package/dist/{chunk-XKNJ5OE4.js → chunk-HRY2IHXM.js} +2 -2
  15. package/dist/{chunk-UEY5SJG5.js → chunk-NMQIWBSB.js} +2 -2
  16. package/dist/{chunk-QPKY767W.js → chunk-OD6OKXL2.js} +1 -1
  17. package/dist/{chunk-PCEDAQPG.js → chunk-P4BHU5NM.js} +50 -4
  18. package/dist/{chunk-HZOILEGF.js → chunk-RZ3GXSXQ.js} +7 -2
  19. package/dist/{chunk-QGMSN34W.js → chunk-UK7G4RKA.js} +1 -1
  20. package/dist/{chunk-3FK5HZHK.js → chunk-WKNWMRDF.js} +2 -2
  21. package/dist/{chunk-FX2CB4MG.js → chunk-ZB5XBHWD.js} +1 -1
  22. package/dist/cli/index.js +9 -9
  23. package/dist/cli.cjs +51 -1
  24. package/dist/cli.js +9 -9
  25. package/dist/codex-exec-agent.js +3 -3
  26. package/dist/engine-harness.cjs +46 -0
  27. package/dist/engine-harness.js +6 -6
  28. package/dist/index.cjs +119 -1
  29. package/dist/index.d.cts +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +15 -9
  32. package/dist/local-agent.js +3 -3
  33. package/dist/openclaw.js +6 -6
  34. package/dist/pr-comment.cjs +8 -1
  35. package/dist/pr-comment.js +2 -2
  36. package/dist/public-state.cjs +68 -0
  37. package/dist/public-state.d.cts +41 -1
  38. package/dist/public-state.d.ts +41 -1
  39. package/dist/public-state.js +7 -1
  40. package/dist/result.js +2 -2
  41. package/dist/run-card.js +4 -4
  42. package/dist/runner.js +6 -6
  43. package/dist/spec/checkpoint.js +3 -3
  44. package/dist/spec/index.cjs +68 -0
  45. package/dist/spec/index.d.cts +1 -1
  46. package/dist/spec/index.d.ts +1 -1
  47. package/dist/spec/index.js +11 -5
  48. package/dist/spec/public-state.cjs +68 -0
  49. package/dist/spec/public-state.d.cts +1 -1
  50. package/dist/spec/public-state.d.ts +1 -1
  51. package/dist/spec/public-state.js +7 -1
  52. package/dist/spec/result.js +2 -2
  53. package/dist/spec/run-card.js +4 -4
  54. package/dist/spec/state.js +5 -5
  55. package/dist/state.js +5 -5
  56. package/package.json +1 -1
@@ -3,9 +3,9 @@ import {
3
3
  createCodexExecAgentAdapter,
4
4
  createCodexExecJsonRunner,
5
5
  runCodexExecAgentDoctor
6
- } from "../chunk-QPKY767W.js";
7
- import "../chunk-QGMSN34W.js";
8
- import "../chunk-WKIIJX3O.js";
6
+ } from "../chunk-OD6OKXL2.js";
7
+ import "../chunk-UK7G4RKA.js";
8
+ import "../chunk-6PSM6KB2.js";
9
9
  import "../chunk-MLKGABMK.js";
10
10
  export {
11
11
  createCodexExecAgentAdapter,
@@ -3,9 +3,9 @@ import {
3
3
  createCodexExecAgentAdapter,
4
4
  createCodexExecJsonRunner,
5
5
  runCodexExecAgentDoctor
6
- } from "../chunk-QPKY767W.js";
7
- import "../chunk-QGMSN34W.js";
8
- import "../chunk-WKIIJX3O.js";
6
+ } from "../chunk-OD6OKXL2.js";
7
+ import "../chunk-UK7G4RKA.js";
8
+ import "../chunk-6PSM6KB2.js";
9
9
  import "../chunk-MLKGABMK.js";
10
10
  export {
11
11
  createCodexExecAgentAdapter,
@@ -3,9 +3,9 @@ import {
3
3
  createCodexExecAgentAdapter,
4
4
  createCodexExecJsonRunner,
5
5
  runCodexExecAgentDoctor
6
- } from "../chunk-QPKY767W.js";
7
- import "../chunk-QGMSN34W.js";
8
- import "../chunk-WKIIJX3O.js";
6
+ } from "../chunk-OD6OKXL2.js";
7
+ import "../chunk-UK7G4RKA.js";
8
+ import "../chunk-6PSM6KB2.js";
9
9
  import "../chunk-MLKGABMK.js";
10
10
  export {
11
11
  createCodexExecAgentAdapter as createLocalAgentAdapter,
@@ -3,12 +3,12 @@ import {
3
3
  parseOpenClawAssertions,
4
4
  parseOpenClawJsonObjectOrArray,
5
5
  toRiddleProofRunParams
6
- } from "../chunk-3FK5HZHK.js";
7
- import "../chunk-UEY5SJG5.js";
8
- import "../chunk-NXEAFQYZ.js";
9
- import "../chunk-FX2CB4MG.js";
10
- import "../chunk-QGMSN34W.js";
11
- import "../chunk-WKIIJX3O.js";
6
+ } from "../chunk-WKNWMRDF.js";
7
+ import "../chunk-NMQIWBSB.js";
8
+ import "../chunk-2OTPBHSM.js";
9
+ import "../chunk-ZB5XBHWD.js";
10
+ import "../chunk-UK7G4RKA.js";
11
+ import "../chunk-6PSM6KB2.js";
12
12
  import "../chunk-MLKGABMK.js";
13
13
  export {
14
14
  openClawIntegrationContext,
@@ -5368,6 +5368,13 @@ function proofAssessmentHardBlockers(state, payload) {
5368
5368
  }
5369
5369
  return blockers;
5370
5370
  }
5371
+ function proofGateStateForCheckpointResponse(state) {
5372
+ const fullState = readJson(state.request.engine_state_path) || {};
5373
+ return compactRecord({
5374
+ ...fullState,
5375
+ verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
5376
+ });
5377
+ }
5371
5378
  function proofAssessmentContinuation(result, payload) {
5372
5379
  const proof_assessment_json = jsonParam(payload);
5373
5380
  return { ...baseContinuation(result), proof_assessment_json };
@@ -5914,6 +5921,45 @@ function checkpointResponseContinuation(state, value) {
5914
5921
  blocker: sourceBlocker
5915
5922
  });
5916
5923
  }
5924
+ const proofGateState = proofGateStateForCheckpointResponse(state);
5925
+ const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
5926
+ if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
5927
+ return checkpointResponseRejectedBlocker(state, {
5928
+ packet,
5929
+ response,
5930
+ blocker: {
5931
+ code: "checkpoint_response_proof_hard_blocker",
5932
+ checkpoint: packet.checkpoint,
5933
+ message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
5934
+ details: compactRecord({
5935
+ stage: packet.stage,
5936
+ hard_blockers: hardBlockers,
5937
+ proofAssessment: assessment,
5938
+ response
5939
+ })
5940
+ }
5941
+ });
5942
+ }
5943
+ const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
5944
+ if (visualBlocker) {
5945
+ const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
5946
+ appendCheckpointResponse(state, response, { summary: visualBlocker });
5947
+ recordEvent(state, {
5948
+ kind: "checkpoint.response.evidence_recovery_required",
5949
+ checkpoint: packet.checkpoint,
5950
+ stage: "verify",
5951
+ summary: visualBlocker,
5952
+ details: compactRecord({
5953
+ evidence_collection_incomplete: true,
5954
+ recovery_stage: "verify",
5955
+ evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
5956
+ visual_delta: recoveryAssessment.visual_delta || null,
5957
+ proof_assessment: recoveryAssessment,
5958
+ checkpoint_response_source: response.source || null
5959
+ })
5960
+ });
5961
+ return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
5962
+ }
5917
5963
  appendCheckpointResponse(state, response);
5918
5964
  if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
5919
5965
  const result = {
@@ -2,13 +2,13 @@ import {
2
2
  createDisabledRiddleProofAgentAdapter,
3
3
  readRiddleProofRunStatus,
4
4
  runRiddleProofEngineHarness
5
- } from "../chunk-PCEDAQPG.js";
6
- import "../chunk-UEY5SJG5.js";
7
- import "../chunk-NXEAFQYZ.js";
5
+ } from "../chunk-P4BHU5NM.js";
6
+ import "../chunk-NMQIWBSB.js";
7
+ import "../chunk-2OTPBHSM.js";
8
8
  import "../chunk-EKZXU6MU.js";
9
- import "../chunk-FX2CB4MG.js";
10
- import "../chunk-QGMSN34W.js";
11
- import "../chunk-WKIIJX3O.js";
9
+ import "../chunk-ZB5XBHWD.js";
10
+ import "../chunk-UK7G4RKA.js";
11
+ import "../chunk-6PSM6KB2.js";
12
12
  import "../chunk-MLKGABMK.js";
13
13
  export {
14
14
  createDisabledRiddleProofAgentAdapter,
@@ -5907,6 +5907,13 @@ function proofAssessmentHardBlockers(state, payload) {
5907
5907
  }
5908
5908
  return blockers;
5909
5909
  }
5910
+ function proofGateStateForCheckpointResponse(state) {
5911
+ const fullState = readJson(state.request.engine_state_path) || {};
5912
+ return compactRecord({
5913
+ ...fullState,
5914
+ verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
5915
+ });
5916
+ }
5910
5917
  function proofAssessmentContinuation(result, payload) {
5911
5918
  const proof_assessment_json = jsonParam(payload);
5912
5919
  return { ...baseContinuation(result), proof_assessment_json };
@@ -6453,6 +6460,45 @@ function checkpointResponseContinuation(state, value) {
6453
6460
  blocker: sourceBlocker
6454
6461
  });
6455
6462
  }
6463
+ const proofGateState = proofGateStateForCheckpointResponse(state);
6464
+ const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
6465
+ if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
6466
+ return checkpointResponseRejectedBlocker(state, {
6467
+ packet,
6468
+ response,
6469
+ blocker: {
6470
+ code: "checkpoint_response_proof_hard_blocker",
6471
+ checkpoint: packet.checkpoint,
6472
+ message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
6473
+ details: compactRecord({
6474
+ stage: packet.stage,
6475
+ hard_blockers: hardBlockers,
6476
+ proofAssessment: assessment,
6477
+ response
6478
+ })
6479
+ }
6480
+ });
6481
+ }
6482
+ const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
6483
+ if (visualBlocker) {
6484
+ const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
6485
+ appendCheckpointResponse(state, response, { summary: visualBlocker });
6486
+ recordEvent(state, {
6487
+ kind: "checkpoint.response.evidence_recovery_required",
6488
+ checkpoint: packet.checkpoint,
6489
+ stage: "verify",
6490
+ summary: visualBlocker,
6491
+ details: compactRecord({
6492
+ evidence_collection_incomplete: true,
6493
+ recovery_stage: "verify",
6494
+ evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
6495
+ visual_delta: recoveryAssessment.visual_delta || null,
6496
+ proof_assessment: recoveryAssessment,
6497
+ checkpoint_response_source: response.source || null
6498
+ })
6499
+ });
6500
+ return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
6501
+ }
6456
6502
  appendCheckpointResponse(state, response);
6457
6503
  if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
6458
6504
  const result = {
@@ -3,18 +3,18 @@ import {
3
3
  } from "../chunk-VYJD6XYF.js";
4
4
  import {
5
5
  runner_exports
6
- } from "../chunk-XKNJ5OE4.js";
6
+ } from "../chunk-HRY2IHXM.js";
7
7
  import {
8
8
  engine_harness_exports
9
- } from "../chunk-PCEDAQPG.js";
10
- import "../chunk-UEY5SJG5.js";
11
- import "../chunk-NXEAFQYZ.js";
9
+ } from "../chunk-P4BHU5NM.js";
10
+ import "../chunk-NMQIWBSB.js";
11
+ import "../chunk-2OTPBHSM.js";
12
12
  import {
13
13
  proof_run_core_exports
14
14
  } from "../chunk-EKZXU6MU.js";
15
- import "../chunk-FX2CB4MG.js";
16
- import "../chunk-QGMSN34W.js";
17
- import "../chunk-WKIIJX3O.js";
15
+ import "../chunk-ZB5XBHWD.js";
16
+ import "../chunk-UK7G4RKA.js";
17
+ import "../chunk-6PSM6KB2.js";
18
18
  import "../chunk-MLKGABMK.js";
19
19
  export {
20
20
  engine_harness_exports as engineHarness,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "../chunk-XKNJ5OE4.js";
4
- import "../chunk-UEY5SJG5.js";
5
- import "../chunk-NXEAFQYZ.js";
3
+ } from "../chunk-HRY2IHXM.js";
4
+ import "../chunk-NMQIWBSB.js";
5
+ import "../chunk-2OTPBHSM.js";
6
6
  import "../chunk-EKZXU6MU.js";
7
- import "../chunk-FX2CB4MG.js";
8
- import "../chunk-QGMSN34W.js";
9
- import "../chunk-WKIIJX3O.js";
7
+ import "../chunk-ZB5XBHWD.js";
8
+ import "../chunk-UK7G4RKA.js";
9
+ import "../chunk-6PSM6KB2.js";
10
10
  import "../chunk-MLKGABMK.js";
11
11
  export {
12
12
  runRiddleProof
@@ -14,9 +14,9 @@ import {
14
14
  normalizeCheckpointResponse,
15
15
  proofContractFromAuthorCheckpointResponse,
16
16
  statePathsForRunState
17
- } from "./chunk-FX2CB4MG.js";
18
- import "./chunk-QGMSN34W.js";
19
- import "./chunk-WKIIJX3O.js";
17
+ } from "./chunk-ZB5XBHWD.js";
18
+ import "./chunk-UK7G4RKA.js";
19
+ import "./chunk-6PSM6KB2.js";
20
20
  import "./chunk-MLKGABMK.js";
21
21
  export {
22
22
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  statePathsForRunState
3
- } from "./chunk-FX2CB4MG.js";
3
+ } from "./chunk-ZB5XBHWD.js";
4
4
  import {
5
5
  compactRecord,
6
6
  isTerminalStatus,
@@ -8,7 +8,7 @@ import {
8
8
  publicMergeRecommendationForRunState,
9
9
  publicStateForRunState,
10
10
  recordValue
11
- } from "./chunk-QGMSN34W.js";
11
+ } from "./chunk-UK7G4RKA.js";
12
12
 
13
13
  // src/run-card.ts
14
14
  var RIDDLE_PROOF_RUN_CARD_VERSION = "riddle-proof.run-card.v1";
@@ -158,10 +158,75 @@ function summarizeRiddleProofPublicState(input) {
158
158
  prohibited_claims: uniqueStrings(prohibitedClaims)
159
159
  };
160
160
  }
161
+ function summarizeRiddleProofPublicConsumerSurface(input, options = {}) {
162
+ const record = asRecord(input);
163
+ const runCard = asRecord(record.run_card);
164
+ const stopCondition = asRecord(runCard.stop_condition);
165
+ const raw = asRecord(record.raw);
166
+ const publicState = summarizeRiddleProofPublicState(input);
167
+ const checkpointAudit = publicState.checkpoint_summary;
168
+ const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
169
+ publicState,
170
+ firstStringValue(
171
+ options.merge_recommendation,
172
+ record.merge_recommendation,
173
+ stopCondition.merge_recommendation,
174
+ raw.merge_recommendation
175
+ )
176
+ );
177
+ const checkpointAuditRequired = publicState.required_disclosures.includes("checkpoint_audit_counters");
178
+ return {
179
+ kind: options.kind || "run_result",
180
+ status: publicState.status,
181
+ result_label: publicState.result_label,
182
+ policy_state: publicState.policy_state,
183
+ proof_complete: publicState.proof_complete,
184
+ claims: {
185
+ proof_passed: publicState.proof_passed,
186
+ ship_authorized: publicState.ship_authorized,
187
+ merge_ready: publicState.merge_ready,
188
+ sync_allowed: publicState.sync_allowed,
189
+ all_checkpoint_responses_accepted: checkpointAudit ? !checkpointAudit.audit_disclosure_required : false
190
+ },
191
+ ship_control: {
192
+ ship_held: publicState.ship_held,
193
+ shipping_disabled: publicState.shipping_disabled,
194
+ ship_authorized: publicState.ship_authorized
195
+ },
196
+ handoff: {
197
+ merge_ready: publicState.merge_ready,
198
+ sync_allowed: publicState.sync_allowed,
199
+ merge_recommendation: mergeRecommendation
200
+ },
201
+ checkpoint_audit: checkpointAudit,
202
+ disclosures: {
203
+ ship_control: true,
204
+ checkpoint_audit: !checkpointAuditRequired || Boolean(checkpointAudit),
205
+ required: [...publicState.required_disclosures],
206
+ prohibited_claims: [...publicState.prohibited_claims]
207
+ },
208
+ public_state: publicState
209
+ };
210
+ }
211
+ function summarizeRiddleProofHostedProofViewSurface(input, options = {}) {
212
+ return summarizeRiddleProofPublicConsumerSurface(input, {
213
+ ...options,
214
+ kind: "hosted_proof_view"
215
+ });
216
+ }
217
+ function summarizeRiddleProofAgentSummarySurface(input, options = {}) {
218
+ return summarizeRiddleProofPublicConsumerSurface(input, {
219
+ ...options,
220
+ kind: "agent_summary"
221
+ });
222
+ }
161
223
 
162
224
  export {
163
225
  riddleProofPublicStateAllowsClaim,
164
226
  riddleProofPublicStateAllowsMergeRecommendation,
165
227
  riddleProofPublicStateMergeRecommendation,
166
- summarizeRiddleProofPublicState
228
+ summarizeRiddleProofPublicState,
229
+ summarizeRiddleProofPublicConsumerSurface,
230
+ summarizeRiddleProofHostedProofViewSurface,
231
+ summarizeRiddleProofAgentSummarySurface
167
232
  };
@@ -7,7 +7,7 @@ import {
7
7
  RIDDLE_PROOF_PR_COMMENT_MARKER,
8
8
  buildRiddleProofPrCommentMarkdown,
9
9
  summarizeRiddleProofPrComment
10
- } from "./chunk-HZOILEGF.js";
10
+ } from "./chunk-RZ3GXSXQ.js";
11
11
  import {
12
12
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
13
13
  applyRiddleProofProfileArtifactCompleteness,
@@ -28,14 +28,14 @@ import {
28
28
  createDisabledRiddleProofAgentAdapter,
29
29
  readRiddleProofRunStatus,
30
30
  runRiddleProofEngineHarness
31
- } from "./chunk-PCEDAQPG.js";
31
+ } from "./chunk-P4BHU5NM.js";
32
32
  import {
33
33
  createCheckpointResponseTemplate
34
- } from "./chunk-FX2CB4MG.js";
34
+ } from "./chunk-ZB5XBHWD.js";
35
35
  import {
36
36
  createCodexExecAgentAdapter,
37
37
  runCodexExecAgentDoctor
38
- } from "./chunk-QPKY767W.js";
38
+ } from "./chunk-OD6OKXL2.js";
39
39
 
40
40
  // src/cli.ts
41
41
  import { spawnSync } from "child_process";
@@ -3,13 +3,13 @@ import {
3
3
  appendStageHeartbeat,
4
4
  createRunState,
5
5
  setRunStatus
6
- } from "./chunk-UEY5SJG5.js";
6
+ } from "./chunk-NMQIWBSB.js";
7
7
  import {
8
8
  noImplementationModeFor
9
9
  } from "./chunk-EKZXU6MU.js";
10
10
  import {
11
11
  createRunResult
12
- } from "./chunk-QGMSN34W.js";
12
+ } from "./chunk-UK7G4RKA.js";
13
13
  import {
14
14
  __export
15
15
  } from "./chunk-MLKGABMK.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRiddleProofRunCard
3
- } from "./chunk-NXEAFQYZ.js";
3
+ } from "./chunk-2OTPBHSM.js";
4
4
  import {
5
5
  compactRecord,
6
6
  isProtectedFinalStatus,
@@ -8,7 +8,7 @@ import {
8
8
  nonEmptyString,
9
9
  publicStateForRunState,
10
10
  recordValue
11
- } from "./chunk-QGMSN34W.js";
11
+ } from "./chunk-UK7G4RKA.js";
12
12
 
13
13
  // src/state.ts
14
14
  var RIDDLE_PROOF_RUN_STATE_VERSION = "riddle-proof.run-state.v1";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compactRecord
3
- } from "./chunk-QGMSN34W.js";
3
+ } from "./chunk-UK7G4RKA.js";
4
4
 
5
5
  // src/codex-exec-agent.ts
6
6
  import { execFileSync, spawnSync } from "child_process";
@@ -5,10 +5,10 @@ import {
5
5
  createRunStatusSnapshot,
6
6
  normalizeRunParams,
7
7
  setRunStatus
8
- } from "./chunk-UEY5SJG5.js";
8
+ } from "./chunk-NMQIWBSB.js";
9
9
  import {
10
10
  createRiddleProofRunCard
11
- } from "./chunk-NXEAFQYZ.js";
11
+ } from "./chunk-2OTPBHSM.js";
12
12
  import {
13
13
  canonicalProofAssessmentStageForDecision,
14
14
  noImplementationModeFor,
@@ -27,7 +27,7 @@ import {
27
27
  normalizeCheckpointResponse,
28
28
  proofContractFromAuthorCheckpointResponse,
29
29
  statePathsForRunState
30
- } from "./chunk-FX2CB4MG.js";
30
+ } from "./chunk-ZB5XBHWD.js";
31
31
  import {
32
32
  applyShipControlState,
33
33
  applyTerminalMetadata,
@@ -37,7 +37,7 @@ import {
37
37
  nonEmptyString,
38
38
  normalizeTerminalMetadata,
39
39
  recordValue
40
- } from "./chunk-QGMSN34W.js";
40
+ } from "./chunk-UK7G4RKA.js";
41
41
  import {
42
42
  __export
43
43
  } from "./chunk-MLKGABMK.js";
@@ -397,6 +397,13 @@ function proofAssessmentHardBlockers(state, payload) {
397
397
  }
398
398
  return blockers;
399
399
  }
400
+ function proofGateStateForCheckpointResponse(state) {
401
+ const fullState = readJson(state.request.engine_state_path) || {};
402
+ return compactRecord({
403
+ ...fullState,
404
+ verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
405
+ });
406
+ }
400
407
  function proofAssessmentContinuation(result, payload) {
401
408
  const proof_assessment_json = jsonParam(payload);
402
409
  return { ...baseContinuation(result), proof_assessment_json };
@@ -943,6 +950,45 @@ function checkpointResponseContinuation(state, value) {
943
950
  blocker: sourceBlocker
944
951
  });
945
952
  }
953
+ const proofGateState = proofGateStateForCheckpointResponse(state);
954
+ const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
955
+ if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
956
+ return checkpointResponseRejectedBlocker(state, {
957
+ packet,
958
+ response,
959
+ blocker: {
960
+ code: "checkpoint_response_proof_hard_blocker",
961
+ checkpoint: packet.checkpoint,
962
+ message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
963
+ details: compactRecord({
964
+ stage: packet.stage,
965
+ hard_blockers: hardBlockers,
966
+ proofAssessment: assessment,
967
+ response
968
+ })
969
+ }
970
+ });
971
+ }
972
+ const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
973
+ if (visualBlocker) {
974
+ const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
975
+ appendCheckpointResponse(state, response, { summary: visualBlocker });
976
+ recordEvent(state, {
977
+ kind: "checkpoint.response.evidence_recovery_required",
978
+ checkpoint: packet.checkpoint,
979
+ stage: "verify",
980
+ summary: visualBlocker,
981
+ details: compactRecord({
982
+ evidence_collection_incomplete: true,
983
+ recovery_stage: "verify",
984
+ evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
985
+ visual_delta: recoveryAssessment.visual_delta || null,
986
+ proof_assessment: recoveryAssessment,
987
+ checkpoint_response_source: response.source || null
988
+ })
989
+ });
990
+ return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
991
+ }
946
992
  appendCheckpointResponse(state, response);
947
993
  if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
948
994
  const result = {
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  riddleProofPublicStateAllowsMergeRecommendation,
3
+ riddleProofPublicStateMergeRecommendation,
3
4
  summarizeRiddleProofPublicState
4
- } from "./chunk-WKIIJX3O.js";
5
+ } from "./chunk-6PSM6KB2.js";
5
6
 
6
7
  // src/pr-comment.ts
7
8
  var RIDDLE_PROOF_PR_COMMENT_MARKER = "<!-- riddle-proof:pr-comment:v1 -->";
@@ -153,6 +154,10 @@ function summarizeRiddleProofPrComment(input) {
153
154
  status: firstStringValue(result.status, stopCondition.status),
154
155
  checkpoint_summary: checkpointSummary || result.checkpoint_summary
155
156
  });
157
+ const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
158
+ publicState,
159
+ firstStringValue(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation)
160
+ );
156
161
  return {
157
162
  ok,
158
163
  status: stringValue(proofResult.status),
@@ -170,7 +175,7 @@ function summarizeRiddleProofPrComment(input) {
170
175
  merge_ready: publicState.merge_ready,
171
176
  sync_allowed: publicState.sync_allowed,
172
177
  proof_decision: firstStringValue(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
173
- merge_recommendation: firstStringValue(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation),
178
+ merge_recommendation: mergeRecommendation,
174
179
  checkpoint_summary: checkpointSummary,
175
180
  public_state: publicState,
176
181
  passed_checks: nestedChecks.passed,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  riddleProofPublicStateMergeRecommendation,
3
3
  summarizeRiddleProofPublicState
4
- } from "./chunk-WKIIJX3O.js";
4
+ } from "./chunk-6PSM6KB2.js";
5
5
 
6
6
  // src/result.ts
7
7
  function isTerminalStatus(status) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  normalizeIntegrationContext,
3
3
  normalizeRunParams
4
- } from "./chunk-UEY5SJG5.js";
4
+ } from "./chunk-NMQIWBSB.js";
5
5
  import {
6
6
  compactRecord
7
- } from "./chunk-QGMSN34W.js";
7
+ } from "./chunk-UK7G4RKA.js";
8
8
 
9
9
  // src/openclaw.ts
10
10
  function parseOpenClawAssertions(value) {
@@ -2,7 +2,7 @@ import {
2
2
  compactRecord,
3
3
  nonEmptyString,
4
4
  recordValue
5
- } from "./chunk-QGMSN34W.js";
5
+ } from "./chunk-UK7G4RKA.js";
6
6
 
7
7
  // src/checkpoint.ts
8
8
  import crypto from "crypto";
package/dist/cli/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import "../chunk-AWRBSVNW.js";
1
+ import "../chunk-DDAV6D6K.js";
2
2
  import "../chunk-DI2XNGEZ.js";
3
- import "../chunk-HZOILEGF.js";
3
+ import "../chunk-RZ3GXSXQ.js";
4
4
  import "../chunk-EX7TO4I5.js";
5
- import "../chunk-PCEDAQPG.js";
6
- import "../chunk-UEY5SJG5.js";
7
- import "../chunk-NXEAFQYZ.js";
5
+ import "../chunk-P4BHU5NM.js";
6
+ import "../chunk-NMQIWBSB.js";
7
+ import "../chunk-2OTPBHSM.js";
8
8
  import "../chunk-EKZXU6MU.js";
9
- import "../chunk-FX2CB4MG.js";
9
+ import "../chunk-ZB5XBHWD.js";
10
10
  import "../chunk-JFQXAJH2.js";
11
- import "../chunk-QPKY767W.js";
12
- import "../chunk-QGMSN34W.js";
13
- import "../chunk-WKIIJX3O.js";
11
+ import "../chunk-OD6OKXL2.js";
12
+ import "../chunk-UK7G4RKA.js";
13
+ import "../chunk-6PSM6KB2.js";
14
14
  import "../chunk-MLKGABMK.js";