@riddledc/riddle-proof 0.8.55 → 0.8.57

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 (71) 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 +64 -20
  6. package/dist/advanced/engine-harness.js +5 -5
  7. package/dist/advanced/index.cjs +64 -20
  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 +5 -0
  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-W44XEGYW.js → chunk-CUBYSWZT.js} +5 -0
  18. package/dist/{chunk-QGE3KBRL.js → chunk-GHBNDHG7.js} +60 -24
  19. package/dist/{chunk-F65S5LT2.js → chunk-JLOZTVXU.js} +2 -2
  20. package/dist/{chunk-6KYXX4OE.js → chunk-JR7GFTLS.js} +89 -2
  21. package/dist/{chunk-NYRMPWJB.js → chunk-KNPCWWF3.js} +2 -2
  22. package/dist/{chunk-MYMTAVGP.js → chunk-LUFT7AGY.js} +4 -4
  23. package/dist/{chunk-QUK3SG24.js → chunk-MOTQNIZX.js} +5 -1
  24. package/dist/{chunk-SONWF3FQ.js → chunk-RS4HJLJQ.js} +1 -1
  25. package/dist/{chunk-J2ZNL3H3.js → chunk-TTB3ZAVX.js} +2 -2
  26. package/dist/{chunk-Q5GYD5RG.js → chunk-UZIX7M7D.js} +4 -2
  27. package/dist/cli/index.js +8 -8
  28. package/dist/cli.cjs +153 -22
  29. package/dist/cli.js +8 -8
  30. package/dist/codex-exec-agent.js +2 -2
  31. package/dist/engine-harness.cjs +64 -20
  32. package/dist/engine-harness.js +5 -5
  33. package/dist/index.cjs +155 -22
  34. package/dist/index.d.cts +2 -2
  35. package/dist/index.d.ts +2 -2
  36. package/dist/index.js +10 -8
  37. package/dist/local-agent.js +2 -2
  38. package/dist/openclaw.js +5 -5
  39. package/dist/pr-comment.cjs +89 -2
  40. package/dist/pr-comment.d.cts +18 -1
  41. package/dist/pr-comment.d.ts +18 -1
  42. package/dist/pr-comment.js +1 -1
  43. package/dist/{proof-run-engine-MiKZt9oY.d.ts → proof-run-engine-BqRoA3Do.d.ts} +3 -3
  44. package/dist/{proof-run-engine-Baiv6l3A.d.cts → proof-run-engine-DpChFR5H.d.cts} +3 -3
  45. package/dist/proof-run-engine.d.cts +1 -1
  46. package/dist/proof-run-engine.d.ts +1 -1
  47. package/dist/result.cjs +6 -0
  48. package/dist/result.d.cts +2 -1
  49. package/dist/result.d.ts +2 -1
  50. package/dist/result.js +3 -1
  51. package/dist/run-card.js +3 -3
  52. package/dist/runner.cjs +5 -0
  53. package/dist/runner.js +5 -5
  54. package/dist/spec/checkpoint.cjs +4 -0
  55. package/dist/spec/checkpoint.js +2 -2
  56. package/dist/spec/index.cjs +11 -0
  57. package/dist/spec/index.d.cts +1 -1
  58. package/dist/spec/index.d.ts +1 -1
  59. package/dist/spec/index.js +6 -4
  60. package/dist/spec/result.cjs +6 -0
  61. package/dist/spec/result.d.cts +1 -1
  62. package/dist/spec/result.d.ts +1 -1
  63. package/dist/spec/result.js +3 -1
  64. package/dist/spec/run-card.js +3 -3
  65. package/dist/spec/state.cjs +4 -0
  66. package/dist/spec/state.js +4 -4
  67. package/dist/state.cjs +4 -0
  68. package/dist/state.js +4 -4
  69. package/dist/types.d.cts +2 -0
  70. package/dist/types.d.ts +2 -0
  71. package/package.json +1 -1
@@ -5,10 +5,10 @@ import {
5
5
  createRunStatusSnapshot,
6
6
  normalizeRunParams,
7
7
  setRunStatus
8
- } from "./chunk-Q5GYD5RG.js";
8
+ } from "./chunk-UZIX7M7D.js";
9
9
  import {
10
10
  createRiddleProofRunCard
11
- } from "./chunk-NYRMPWJB.js";
11
+ } from "./chunk-KNPCWWF3.js";
12
12
  import {
13
13
  canonicalProofAssessmentStageForDecision,
14
14
  noImplementationModeFor,
@@ -27,16 +27,17 @@ import {
27
27
  normalizeCheckpointResponse,
28
28
  proofContractFromAuthorCheckpointResponse,
29
29
  statePathsForRunState
30
- } from "./chunk-QUK3SG24.js";
30
+ } from "./chunk-MOTQNIZX.js";
31
31
  import {
32
32
  applyShipControlState,
33
33
  applyTerminalMetadata,
34
34
  compactRecord,
35
35
  createRunResult,
36
+ isProtectedFinalStatus,
36
37
  nonEmptyString,
37
38
  normalizeTerminalMetadata,
38
39
  recordValue
39
- } from "./chunk-W44XEGYW.js";
40
+ } from "./chunk-CUBYSWZT.js";
40
41
  import {
41
42
  __export
42
43
  } from "./chunk-MLKGABMK.js";
@@ -121,9 +122,6 @@ function loadRunState(input) {
121
122
  state_path: statePath
122
123
  });
123
124
  }
124
- function isProtectedFinalStatus(status) {
125
- return status === "ready_to_ship" || status === "shipped" || status === "completed";
126
- }
127
125
  function shouldPreserveFinalizedRunState(filePath, incoming) {
128
126
  const existing = readJson(filePath);
129
127
  if (!existing?.finalized || !isProtectedFinalStatus(existing.status)) return false;
@@ -695,19 +693,38 @@ function appendCheckpointResponse(state, response, input = {}) {
695
693
  setRunStatus(state, "running", at);
696
694
  persist(state);
697
695
  }
696
+ function checkpointResponseRejectedBlocker(state, input) {
697
+ const packet = input.packet || null;
698
+ const response = input.response || null;
699
+ appendRunEvent(state, {
700
+ kind: "checkpoint.response.rejected",
701
+ checkpoint: response?.checkpoint || packet?.checkpoint || input.blocker.checkpoint || null,
702
+ stage: packet?.stage || state.current_stage || "author",
703
+ summary: input.blocker.message,
704
+ details: compactRecord({
705
+ code: input.blocker.code,
706
+ decision: response?.decision,
707
+ resume_token: response?.resume_token,
708
+ packet_id: response?.packet_id,
709
+ source: response?.source
710
+ })
711
+ });
712
+ return { blocker: input.blocker };
713
+ }
698
714
  function checkpointResponseContinuation(state, value) {
699
715
  if (!value) return {};
700
716
  const packet = state.checkpoint_packet;
701
717
  const response = normalizeCheckpointResponse(value);
702
718
  if (!response) {
703
- return {
719
+ return checkpointResponseRejectedBlocker(state, {
720
+ packet,
704
721
  blocker: {
705
722
  code: "checkpoint_response_invalid",
706
723
  checkpoint: packet?.checkpoint || state.last_checkpoint || null,
707
724
  message: "Checkpoint response was not a valid riddle-proof.checkpoint_response.v1 object.",
708
725
  details: { checkpoint_packet: packet || null, checkpoint_summary: checkpointSummaryFromState(state) }
709
726
  }
710
- };
727
+ });
711
728
  }
712
729
  if (isDuplicateCheckpointResponse(state, response)) {
713
730
  const stage = packet?.stage || state.current_stage || "author";
@@ -738,17 +755,20 @@ function checkpointResponseContinuation(state, value) {
738
755
  };
739
756
  }
740
757
  if (!packet) {
741
- return {
758
+ return checkpointResponseRejectedBlocker(state, {
759
+ response,
742
760
  blocker: {
743
761
  code: "checkpoint_response_without_packet",
744
762
  checkpoint: response.checkpoint,
745
763
  message: "A checkpoint response was supplied, but the run state has no pending checkpoint packet.",
746
764
  details: { response, checkpoint_summary: checkpointSummaryFromState(state) }
747
765
  }
748
- };
766
+ });
749
767
  }
750
768
  if (response.run_id !== packet.run_id || response.checkpoint !== packet.checkpoint) {
751
- return {
769
+ return checkpointResponseRejectedBlocker(state, {
770
+ packet,
771
+ response,
752
772
  blocker: {
753
773
  code: "checkpoint_response_mismatch",
754
774
  checkpoint: packet.checkpoint,
@@ -759,10 +779,12 @@ function checkpointResponseContinuation(state, value) {
759
779
  actual: { run_id: response.run_id, checkpoint: response.checkpoint }
760
780
  }
761
781
  }
762
- };
782
+ });
763
783
  }
764
784
  if (packet.resume_token && response.resume_token !== packet.resume_token) {
765
- return {
785
+ return checkpointResponseRejectedBlocker(state, {
786
+ packet,
787
+ response,
766
788
  blocker: {
767
789
  code: "checkpoint_response_resume_token_mismatch",
768
790
  checkpoint: packet.checkpoint,
@@ -773,10 +795,12 @@ function checkpointResponseContinuation(state, value) {
773
795
  actual_resume_token: response.resume_token || null
774
796
  }
775
797
  }
776
- };
798
+ });
777
799
  }
778
800
  if (packet.packet_id && response.packet_id !== packet.packet_id) {
779
- return {
801
+ return checkpointResponseRejectedBlocker(state, {
802
+ packet,
803
+ response,
780
804
  blocker: {
781
805
  code: "checkpoint_response_packet_id_mismatch",
782
806
  checkpoint: packet.checkpoint,
@@ -789,10 +813,12 @@ function checkpointResponseContinuation(state, value) {
789
813
  actual_resume_token: response.resume_token || null
790
814
  }
791
815
  }
792
- };
816
+ });
793
817
  }
794
818
  if (!packet.allowed_decisions.includes(response.decision)) {
795
- return {
819
+ return checkpointResponseRejectedBlocker(state, {
820
+ packet,
821
+ response,
796
822
  blocker: {
797
823
  code: "checkpoint_response_decision_not_allowed",
798
824
  checkpoint: packet.checkpoint,
@@ -804,7 +830,7 @@ function checkpointResponseContinuation(state, value) {
804
830
  response
805
831
  }
806
832
  }
807
- };
833
+ });
808
834
  }
809
835
  const base = {
810
836
  action: "run",
@@ -814,14 +840,16 @@ function checkpointResponseContinuation(state, value) {
814
840
  if (response.decision === "author_packet") {
815
841
  const payload = authorPacketPayloadFromCheckpointResponse(response);
816
842
  if (!payload) {
817
- return {
843
+ return checkpointResponseRejectedBlocker(state, {
844
+ packet,
845
+ response,
818
846
  blocker: {
819
847
  code: "checkpoint_author_packet_missing",
820
848
  checkpoint: packet.checkpoint,
821
849
  message: "Checkpoint response decision=author_packet did not include a proof_plan and capture_script payload.",
822
850
  details: { stage: packet.stage, response }
823
851
  }
824
- };
852
+ });
825
853
  }
826
854
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
827
855
  appendCheckpointResponse(state, response);
@@ -850,14 +878,16 @@ function checkpointResponseContinuation(state, value) {
850
878
  const workdir = nonEmptyString(packet.state_excerpt?.after_worktree) || state.worktree_path;
851
879
  if (workdir) state.worktree_path = workdir;
852
880
  if (!hasGitDiff(workdir)) {
853
- return {
881
+ return checkpointResponseRejectedBlocker(state, {
882
+ packet,
883
+ response,
854
884
  blocker: {
855
885
  code: "implementation_diff_missing",
856
886
  checkpoint: packet.checkpoint,
857
887
  message: "Checkpoint response claimed implementation_complete, but the after worktree has no detectable git diff.",
858
888
  details: { stage: packet.stage, worktree_path: workdir || null, response }
859
889
  }
860
- };
890
+ });
861
891
  }
862
892
  appendCheckpointResponse(state, response);
863
893
  return {
@@ -906,7 +936,13 @@ function checkpointResponseContinuation(state, value) {
906
936
  response,
907
937
  code: "checkpoint_response_source_not_trusted"
908
938
  });
909
- if (sourceBlocker) return { blocker: sourceBlocker };
939
+ if (sourceBlocker) {
940
+ return checkpointResponseRejectedBlocker(state, {
941
+ packet,
942
+ response,
943
+ blocker: sourceBlocker
944
+ });
945
+ }
910
946
  appendCheckpointResponse(state, response);
911
947
  if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
912
948
  const result = {
@@ -3,13 +3,13 @@ import {
3
3
  appendStageHeartbeat,
4
4
  createRunState,
5
5
  setRunStatus
6
- } from "./chunk-Q5GYD5RG.js";
6
+ } from "./chunk-UZIX7M7D.js";
7
7
  import {
8
8
  noImplementationModeFor
9
9
  } from "./chunk-EKZXU6MU.js";
10
10
  import {
11
11
  createRunResult
12
- } from "./chunk-W44XEGYW.js";
12
+ } from "./chunk-CUBYSWZT.js";
13
13
  import {
14
14
  __export
15
15
  } from "./chunk-MLKGABMK.js";
@@ -15,6 +15,20 @@ function numberValue(value) {
15
15
  function booleanValue(value) {
16
16
  return typeof value === "boolean" ? value : void 0;
17
17
  }
18
+ function firstStringValue(...values) {
19
+ for (const value of values) {
20
+ const text = stringValue(value);
21
+ if (text) return text;
22
+ }
23
+ return void 0;
24
+ }
25
+ function firstBooleanValue(...values) {
26
+ for (const value of values) {
27
+ const bool = booleanValue(value);
28
+ if (typeof bool === "boolean") return bool;
29
+ }
30
+ return void 0;
31
+ }
18
32
  function artifactKind(name, url) {
19
33
  const target = `${name} ${url}`.toLowerCase();
20
34
  if (/\.(png|jpe?g|gif|webp|avif|svg)(\?|#|$)/.test(target)) return "image";
@@ -91,20 +105,55 @@ function selectPrimaryImage(artifacts) {
91
105
  const images = artifacts.filter((artifact) => artifact.kind === "image");
92
106
  return images.find((artifact) => /after|proof|screenshot/i.test(artifact.name)) || images[0];
93
107
  }
108
+ function firstRecordValue(...values) {
109
+ for (const value of values) {
110
+ const record = asRecord(value);
111
+ if (Object.keys(record).length) return record;
112
+ }
113
+ return void 0;
114
+ }
115
+ function checkpointSummaryFrom(...values) {
116
+ const record = firstRecordValue(...values);
117
+ if (!record) return void 0;
118
+ const summary = {
119
+ pending: booleanValue(record.pending),
120
+ response_count: numberValue(record.response_count),
121
+ rejected_response_count: numberValue(record.rejected_response_count),
122
+ ignored_response_count: numberValue(record.ignored_response_count),
123
+ duplicate_response_count: numberValue(record.duplicate_response_count),
124
+ latest_decision: stringValue(record.latest_decision),
125
+ latest_packet_id: stringValue(record.latest_packet_id),
126
+ latest_resume_token: stringValue(record.latest_resume_token)
127
+ };
128
+ return Object.values(summary).some((value) => typeof value !== "undefined") ? summary : void 0;
129
+ }
94
130
  function summarizeRiddleProofPrComment(input) {
95
131
  const runResponse = asRecord(input.runResponse);
96
132
  const result = asRecord(input.result);
97
133
  const proofResult = asRecord(runResponse.proofResult);
98
134
  const preview = asRecord(runResponse.preview);
135
+ const resultRunCard = asRecord(result.run_card);
136
+ const stopCondition = asRecord(resultRunCard.stop_condition);
137
+ const resultDetails = asRecord(result.details);
138
+ const resultRaw = asRecord(result.raw);
139
+ const rawDetails = asRecord(resultRaw.details);
99
140
  const artifacts = collectArtifacts(runResponse);
100
141
  const pages = pageSummaries(result);
101
142
  const checkSource = { ...result };
102
143
  delete checkSource.ok;
103
144
  const nestedChecks = summarizeExplicitChecks(checkSource);
104
145
  const ok = booleanValue(result.ok) ?? booleanValue(runResponse.ok) ?? null;
146
+ const checkpointSummary = checkpointSummaryFrom(
147
+ result.checkpoint_summary,
148
+ stopCondition.checkpoint_summary,
149
+ resultDetails.checkpoint_summary,
150
+ rawDetails.checkpoint_summary,
151
+ proofResult.checkpoint_summary
152
+ );
105
153
  return {
106
154
  ok,
107
155
  status: stringValue(proofResult.status),
156
+ result_status: firstStringValue(result.status, stopCondition.status),
108
157
  job_id: stringValue(proofResult.job_id),
109
158
  duration_ms: numberValue(proofResult.duration_ms),
110
159
  proof_url: stringValue(runResponse.proofUrl),
@@ -112,6 +161,12 @@ function summarizeRiddleProofPrComment(input) {
112
161
  preview_url: stringValue(preview.preview_url) || stringValue(preview.url),
113
162
  preview_publish_recovered: booleanValue(preview.publish_recovered),
114
163
  preview_publish_error: stringValue(preview.publish_error),
164
+ ship_held: firstBooleanValue(result.ship_held, stopCondition.ship_held, resultRaw.ship_held),
165
+ shipping_disabled: firstBooleanValue(result.shipping_disabled, stopCondition.shipping_disabled, resultRaw.shipping_disabled),
166
+ ship_authorized: firstBooleanValue(result.ship_authorized, stopCondition.ship_authorized, resultRaw.ship_authorized),
167
+ proof_decision: firstStringValue(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
168
+ merge_recommendation: firstStringValue(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation),
169
+ checkpoint_summary: checkpointSummary,
115
170
  passed_checks: nestedChecks.passed,
116
171
  failed_checks: nestedChecks.failed,
117
172
  pages,
@@ -130,9 +185,15 @@ function markdownLink(label, url) {
130
185
  return `[${label.replace(/\]/g, "\\]")}](${url})`;
131
186
  }
132
187
  function resultLabel(summary) {
133
- if (summary.ok === true) return "passed";
188
+ if (summary.ok === true) {
189
+ if (summary.result_status === "shipped") return "shipped";
190
+ if (summary.result_status === "completed") return "completed";
191
+ if (summary.ship_held === true) return "proof passed; ship held";
192
+ if (summary.ship_authorized === true) return "passed; ship authorized";
193
+ return "passed";
194
+ }
134
195
  if (summary.ok === false) return "failed";
135
- return summary.status || "recorded";
196
+ return summary.result_status || summary.status || "recorded";
136
197
  }
137
198
  function artifactRank(artifact) {
138
199
  const name = artifact.name.toLowerCase();
@@ -144,6 +205,25 @@ function artifactRank(artifact) {
144
205
  if (artifact.kind === "image") return 20;
145
206
  return 30;
146
207
  }
208
+ function formatBool(value) {
209
+ return typeof value === "boolean" ? String(value) : "unknown";
210
+ }
211
+ function hasShipControl(summary) {
212
+ return typeof summary.ship_held === "boolean" || typeof summary.shipping_disabled === "boolean" || typeof summary.ship_authorized === "boolean";
213
+ }
214
+ function checkpointSummaryLine(summary) {
215
+ const accepted = summary.response_count ?? 0;
216
+ const rejected = summary.rejected_response_count ?? 0;
217
+ const ignored = summary.ignored_response_count ?? 0;
218
+ const parts = [`${accepted} accepted`, `${rejected} rejected`, `${ignored} ignored`];
219
+ if ((summary.duplicate_response_count ?? 0) > 0) parts.push(`${summary.duplicate_response_count} duplicate`);
220
+ const state = summary.pending === true ? "pending" : summary.pending === false ? "complete" : "";
221
+ return [
222
+ parts.join(" / "),
223
+ state,
224
+ summary.latest_decision ? `latest decision \`${summary.latest_decision}\`` : ""
225
+ ].filter(Boolean).join("; ");
226
+ }
147
227
  function buildRiddleProofPrCommentMarkdown(input) {
148
228
  const summary = summarizeRiddleProofPrComment(input);
149
229
  const title = input.title?.trim() || "Riddle Proof Evidence";
@@ -155,9 +235,16 @@ function buildRiddleProofPrCommentMarkdown(input) {
155
235
  ];
156
236
  if (input.goal?.trim()) lines.push(`**Goal:** ${input.goal.trim()}`);
157
237
  if (input.successCriteria?.trim()) lines.push(`**Success criteria:** ${input.successCriteria.trim()}`);
238
+ if (summary.result_status) lines.push(`**Evidence status:** ${summary.result_status}`);
158
239
  if (summary.status) lines.push(`**Riddle job status:** ${summary.status}`);
159
240
  if (summary.job_id) lines.push(`**Riddle job:** \`${summary.job_id}\``);
160
241
  if (summary.duration_ms) lines.push(`**Duration:** ${formatDuration(summary.duration_ms)}`);
242
+ if (hasShipControl(summary)) {
243
+ lines.push(`**Ship control:** held=${formatBool(summary.ship_held)}, shipping_disabled=${formatBool(summary.shipping_disabled)}, authorized=${formatBool(summary.ship_authorized)}`);
244
+ }
245
+ if (summary.proof_decision) lines.push(`**Proof decision:** \`${summary.proof_decision}\``);
246
+ if (summary.merge_recommendation) lines.push(`**Merge recommendation:** ${summary.merge_recommendation}`);
247
+ if (summary.checkpoint_summary) lines.push(`**Checkpoints:** ${checkpointSummaryLine(summary.checkpoint_summary)}`);
161
248
  if (summary.proof_url) lines.push(`**Proof URL:** ${markdownLink(summary.proof_url, summary.proof_url)}`);
162
249
  if (summary.preview_id || summary.preview_url) {
163
250
  const previewLabel = summary.preview_id ? `\`${summary.preview_id}\`` : "preview";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  statePathsForRunState
3
- } from "./chunk-QUK3SG24.js";
3
+ } from "./chunk-MOTQNIZX.js";
4
4
  import {
5
5
  compactRecord,
6
6
  isTerminalStatus,
7
7
  nonEmptyString,
8
8
  recordValue,
9
9
  shipControlStateFor
10
- } from "./chunk-W44XEGYW.js";
10
+ } from "./chunk-CUBYSWZT.js";
11
11
 
12
12
  // src/run-card.ts
13
13
  var RIDDLE_PROOF_RUN_CARD_VERSION = "riddle-proof.run-card.v1";
@@ -7,7 +7,7 @@ import {
7
7
  RIDDLE_PROOF_PR_COMMENT_MARKER,
8
8
  buildRiddleProofPrCommentMarkdown,
9
9
  summarizeRiddleProofPrComment
10
- } from "./chunk-6KYXX4OE.js";
10
+ } from "./chunk-JR7GFTLS.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-QGE3KBRL.js";
31
+ } from "./chunk-GHBNDHG7.js";
32
32
  import {
33
33
  createCheckpointResponseTemplate
34
- } from "./chunk-QUK3SG24.js";
34
+ } from "./chunk-MOTQNIZX.js";
35
35
  import {
36
36
  createCodexExecAgentAdapter,
37
37
  runCodexExecAgentDoctor
38
- } from "./chunk-SONWF3FQ.js";
38
+ } from "./chunk-RS4HJLJQ.js";
39
39
 
40
40
  // src/cli.ts
41
41
  import { spawnSync } from "child_process";
@@ -2,7 +2,7 @@ import {
2
2
  compactRecord,
3
3
  nonEmptyString,
4
4
  recordValue
5
- } from "./chunk-W44XEGYW.js";
5
+ } from "./chunk-CUBYSWZT.js";
6
6
 
7
7
  // src/checkpoint.ts
8
8
  import crypto from "crypto";
@@ -702,6 +702,8 @@ function checkpointSummaryFromState(state, engineStatePath) {
702
702
  const packets = history.filter((entry) => entry.packet);
703
703
  const responses = acceptedCheckpointResponseEntries(state);
704
704
  const duplicateResponses = events.filter((event) => event.kind === "checkpoint.response.duplicate");
705
+ const rejectedResponses = events.filter((event) => event.kind === "checkpoint.response.rejected");
706
+ const ignoredResponses = events.filter((event) => event.kind === "checkpoint.response.ignored");
705
707
  const latestPacketEntry = [...history].reverse().find((entry) => entry.packet);
706
708
  const latestResponseEntry = [...responses].reverse().find((entry) => entry.response);
707
709
  const latestPacket = state.checkpoint_packet || latestPacketEntry?.packet;
@@ -717,6 +719,8 @@ function checkpointSummaryFromState(state, engineStatePath) {
717
719
  packet_count: packets.length,
718
720
  response_count: responses.length,
719
721
  duplicate_response_count: duplicateResponses.length,
722
+ rejected_response_count: rejectedResponses.length,
723
+ ignored_response_count: ignoredResponses.length,
720
724
  latest_checkpoint: state.checkpoint_packet?.checkpoint || latestResponse?.checkpoint || state.last_checkpoint || null,
721
725
  latest_stage: state.checkpoint_packet?.stage || latestResponse?.continue_with_stage || state.current_stage || null,
722
726
  latest_kind: state.checkpoint_packet?.kind || latestPacket?.kind || null,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compactRecord
3
- } from "./chunk-W44XEGYW.js";
3
+ } from "./chunk-CUBYSWZT.js";
4
4
 
5
5
  // src/codex-exec-agent.ts
6
6
  import { execFileSync, spawnSync } from "child_process";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  normalizeIntegrationContext,
3
3
  normalizeRunParams
4
- } from "./chunk-Q5GYD5RG.js";
4
+ } from "./chunk-UZIX7M7D.js";
5
5
  import {
6
6
  compactRecord
7
- } from "./chunk-W44XEGYW.js";
7
+ } from "./chunk-CUBYSWZT.js";
8
8
 
9
9
  // src/openclaw.ts
10
10
  function parseOpenClawAssertions(value) {
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  createRiddleProofRunCard
3
- } from "./chunk-NYRMPWJB.js";
3
+ } from "./chunk-KNPCWWF3.js";
4
4
  import {
5
5
  compactRecord,
6
+ isProtectedFinalStatus,
6
7
  isTerminalStatus,
7
8
  nonEmptyString,
8
9
  recordValue,
9
10
  shipControlStateFor
10
- } from "./chunk-W44XEGYW.js";
11
+ } from "./chunk-CUBYSWZT.js";
11
12
 
12
13
  // src/state.ts
13
14
  var RIDDLE_PROOF_RUN_STATE_VERSION = "riddle-proof.run-state.v1";
@@ -232,6 +233,7 @@ function createRunStatusSnapshot(state, at = timestamp()) {
232
233
  function setRunStatus(state, status, at = timestamp()) {
233
234
  state.status = status;
234
235
  state.ok = status !== "blocked" && status !== "failed";
236
+ if (isProtectedFinalStatus(status)) state.finalized = true;
235
237
  state.updated_at = at;
236
238
  return state;
237
239
  }
package/dist/cli/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import "../chunk-MYMTAVGP.js";
1
+ import "../chunk-LUFT7AGY.js";
2
2
  import "../chunk-DI2XNGEZ.js";
3
- import "../chunk-6KYXX4OE.js";
3
+ import "../chunk-JR7GFTLS.js";
4
4
  import "../chunk-EX7TO4I5.js";
5
- import "../chunk-QGE3KBRL.js";
6
- import "../chunk-Q5GYD5RG.js";
7
- import "../chunk-NYRMPWJB.js";
5
+ import "../chunk-GHBNDHG7.js";
6
+ import "../chunk-UZIX7M7D.js";
7
+ import "../chunk-KNPCWWF3.js";
8
8
  import "../chunk-EKZXU6MU.js";
9
- import "../chunk-QUK3SG24.js";
9
+ import "../chunk-MOTQNIZX.js";
10
10
  import "../chunk-JFQXAJH2.js";
11
- import "../chunk-SONWF3FQ.js";
12
- import "../chunk-W44XEGYW.js";
11
+ import "../chunk-RS4HJLJQ.js";
12
+ import "../chunk-CUBYSWZT.js";
13
13
  import "../chunk-MLKGABMK.js";