@riddledc/riddle-proof 0.8.3 → 0.8.5

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 (49) hide show
  1. package/dist/adapters/openclaw.js +4 -4
  2. package/dist/advanced/engine-harness.cjs +34 -12
  3. package/dist/advanced/engine-harness.js +4 -4
  4. package/dist/advanced/index.cjs +34 -12
  5. package/dist/advanced/index.d.cts +1 -1
  6. package/dist/advanced/index.d.ts +1 -1
  7. package/dist/advanced/index.js +6 -6
  8. package/dist/advanced/proof-run-engine.cjs +29 -9
  9. package/dist/advanced/proof-run-engine.d.cts +1 -1
  10. package/dist/advanced/proof-run-engine.d.ts +1 -1
  11. package/dist/advanced/proof-run-engine.js +1 -1
  12. package/dist/advanced/runner.js +4 -4
  13. package/dist/checkpoint.cjs +3 -1
  14. package/dist/checkpoint.js +1 -1
  15. package/dist/{chunk-SKIAZTQ7.js → chunk-4FOHZ7JG.js} +3 -1
  16. package/dist/{chunk-YB5ACBZE.js → chunk-BDFSMWTI.js} +5 -5
  17. package/dist/{chunk-U4FUFBSH.js → chunk-FMOYUYH2.js} +1 -1
  18. package/dist/{chunk-TZ3YMCDM.js → chunk-GMZ57RRY.js} +29 -9
  19. package/dist/{chunk-OIFHYMHP.js → chunk-OD5UNE57.js} +2 -2
  20. package/dist/{chunk-SMBZT46I.js → chunk-RBWSCU6V.js} +1 -1
  21. package/dist/{chunk-ZX45XGDJ.js → chunk-UIJ7X63P.js} +1 -1
  22. package/dist/{chunk-TNCDVE5O.js → chunk-YZUVEJ5B.js} +1 -1
  23. package/dist/cli/index.js +5 -5
  24. package/dist/cli.cjs +34 -12
  25. package/dist/cli.js +5 -5
  26. package/dist/engine-harness.cjs +34 -12
  27. package/dist/engine-harness.js +4 -4
  28. package/dist/index.cjs +34 -12
  29. package/dist/index.js +5 -5
  30. package/dist/openclaw.js +4 -4
  31. package/dist/{proof-run-engine-Rkd_hXB-.d.cts → proof-run-engine-B7DCPzpK.d.cts} +3 -3
  32. package/dist/{proof-run-engine-DxWW1VX1.d.ts → proof-run-engine-BomAcXhA.d.ts} +3 -3
  33. package/dist/proof-run-engine.cjs +29 -9
  34. package/dist/proof-run-engine.d.cts +1 -1
  35. package/dist/proof-run-engine.d.ts +1 -1
  36. package/dist/proof-run-engine.js +1 -1
  37. package/dist/run-card.js +2 -2
  38. package/dist/runner.js +4 -4
  39. package/dist/spec/checkpoint.cjs +3 -1
  40. package/dist/spec/checkpoint.js +1 -1
  41. package/dist/spec/index.cjs +3 -1
  42. package/dist/spec/index.js +3 -3
  43. package/dist/spec/run-card.js +2 -2
  44. package/dist/spec/state.js +3 -3
  45. package/dist/state.js +3 -3
  46. package/package.json +1 -1
  47. package/runtime/lib/util.py +57 -0
  48. package/runtime/lib/verify.py +158 -14
  49. package/runtime/tests/recon_verify_smoke.py +211 -0
@@ -22,10 +22,10 @@ import {
22
22
  createDisabledRiddleProofAgentAdapter,
23
23
  readRiddleProofRunStatus,
24
24
  runRiddleProofEngineHarness
25
- } from "./chunk-YB5ACBZE.js";
25
+ } from "./chunk-BDFSMWTI.js";
26
26
  import {
27
27
  createCheckpointResponseTemplate
28
- } from "./chunk-SKIAZTQ7.js";
28
+ } from "./chunk-4FOHZ7JG.js";
29
29
  import {
30
30
  createCodexExecAgentAdapter,
31
31
  runCodexExecAgentDoctor
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  normalizeIntegrationContext,
3
3
  normalizeRunParams
4
- } from "./chunk-TNCDVE5O.js";
4
+ } from "./chunk-YZUVEJ5B.js";
5
5
  import {
6
6
  compactRecord
7
7
  } from "./chunk-VY4Y5U57.js";
@@ -3,7 +3,7 @@ import {
3
3
  appendStageHeartbeat,
4
4
  createRunState,
5
5
  setRunStatus
6
- } from "./chunk-TNCDVE5O.js";
6
+ } from "./chunk-YZUVEJ5B.js";
7
7
  import {
8
8
  noImplementationModeFor
9
9
  } from "./chunk-RV6LK7HU.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRiddleProofRunCard
3
- } from "./chunk-U4FUFBSH.js";
3
+ } from "./chunk-FMOYUYH2.js";
4
4
  import {
5
5
  compactRecord,
6
6
  isTerminalStatus,
package/dist/cli/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import "../chunk-OIFHYMHP.js";
1
+ import "../chunk-OD5UNE57.js";
2
2
  import "../chunk-PEWAIEER.js";
3
3
  import "../chunk-TWTEUS7R.js";
4
- import "../chunk-YB5ACBZE.js";
5
- import "../chunk-TNCDVE5O.js";
6
- import "../chunk-U4FUFBSH.js";
4
+ import "../chunk-BDFSMWTI.js";
5
+ import "../chunk-YZUVEJ5B.js";
6
+ import "../chunk-FMOYUYH2.js";
7
7
  import "../chunk-RV6LK7HU.js";
8
- import "../chunk-SKIAZTQ7.js";
8
+ import "../chunk-4FOHZ7JG.js";
9
9
  import "../chunk-JFQXAJH2.js";
10
10
  import "../chunk-7F5LNUGR.js";
11
11
  import "../chunk-VY4Y5U57.js";
package/dist/cli.cjs CHANGED
@@ -1927,9 +1927,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1927
1927
  state = readState(config.statePath);
1928
1928
  const continuedStage = params.continue_from_checkpoint ? checkpointContinueStage(state) : null;
1929
1929
  if (params.continue_from_checkpoint && !params.advance_stage && !continuedStage) {
1930
- const recommended = recommendedAdvanceStage(state);
1930
+ const recommended2 = recommendedAdvanceStage(state);
1931
1931
  return checkpoint(
1932
- state?.active_checkpoint_stage || recommended || "recon",
1932
+ state?.active_checkpoint_stage || recommended2 || "recon",
1933
1933
  "continue_unavailable",
1934
1934
  "This run call asked to continue from a checkpoint, but the current state has no resumable checkpoint. Inspect status or set advance_stage explicitly.",
1935
1935
  {
@@ -1941,9 +1941,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1941
1941
  details: {
1942
1942
  executed,
1943
1943
  activeCheckpoint: state?.active_checkpoint || null,
1944
- suggestedAdvanceStage: recommended || null
1944
+ suggestedAdvanceStage: recommended2 || null
1945
1945
  },
1946
- suggestedAdvanceStage: recommended || null,
1946
+ suggestedAdvanceStage: recommended2 || null,
1947
1947
  executed
1948
1948
  }
1949
1949
  );
@@ -2207,7 +2207,7 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2207
2207
  }
2208
2208
  const noImplementationMode = !implementationRequired(params, state);
2209
2209
  const authorNextStage = stageAfterAuthor(state, params);
2210
- const explicitAuthorDebug = params.advance_stage === "author";
2210
+ const explicitAuthorDebug = params.advance_stage === "author" && !params.continue_from_checkpoint;
2211
2211
  recordAttempt("author", "completed", "Author applied the supervising agent's proof packet to recon observations.", {
2212
2212
  autoApproved: authorRes.autoApproved || false,
2213
2213
  checkpoint: explicitAuthorDebug ? "author_review" : "author_auto_continue",
@@ -2256,16 +2256,16 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2256
2256
  state = readState(config.statePath);
2257
2257
  }
2258
2258
  if (!effectiveAdvanceStage) {
2259
- const recommended = recommendedAdvanceStage(state);
2259
+ const recommended2 = recommendedAdvanceStage(state);
2260
2260
  const noImplementationMode = !implementationRequired(params, state);
2261
2261
  return checkpoint(
2262
- recommended || (noImplementationMode ? "verify" : "implement"),
2262
+ recommended2 || (noImplementationMode ? "verify" : "implement"),
2263
2263
  "awaiting_stage_advance",
2264
2264
  "Proof authoring is ready. The wrapper will not guess the next stage from here, explicitly choose whether to revisit recon/author, validate implementation, capture verify evidence, or ship.",
2265
2265
  {
2266
2266
  nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2267
2267
  advanceOptions: noImplementationMode ? ["recon", "author", "verify", "ship"] : ["recon", "author", "implement", "verify", "ship"],
2268
- recommendedAdvanceStage: recommended,
2268
+ recommendedAdvanceStage: recommended2,
2269
2269
  details: { executed },
2270
2270
  executed
2271
2271
  }
@@ -2465,7 +2465,7 @@ ${implementRes.stderr || ""}`;
2465
2465
  state = readState(config.statePath);
2466
2466
  }
2467
2467
  const checkpointName = "verify_capture_retry";
2468
- const summary = "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2468
+ const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2469
2469
  recordAttempt("verify", "checkpoint", summary, {
2470
2470
  autoApproved: verifyRes.autoApproved || false,
2471
2471
  checkpoint: checkpointName,
@@ -2821,6 +2821,26 @@ ${implementRes.stderr || ""}`;
2821
2821
  }
2822
2822
  );
2823
2823
  }
2824
+ state = readState(config.statePath);
2825
+ const recommended = recommendedAdvanceStage(state);
2826
+ const fallbackStage = recommended || (implementationRequired(params, state) ? "implement" : "verify");
2827
+ return checkpoint(
2828
+ fallbackStage,
2829
+ "awaiting_stage_advance",
2830
+ "The requested run continuation finished its immediate work but did not resolve to verify or ship. Choose the next workflow stage explicitly.",
2831
+ {
2832
+ nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2833
+ advanceOptions: implementationRequired(params, state) ? ["recon", "author", "implement", "verify", "ship"] : ["recon", "author", "verify"],
2834
+ recommendedAdvanceStage: fallbackStage,
2835
+ continueWithStage: fallbackStage,
2836
+ blocking: false,
2837
+ details: {
2838
+ executed,
2839
+ requestedAdvanceStage: effectiveAdvanceStage
2840
+ },
2841
+ executed
2842
+ }
2843
+ );
2824
2844
  }
2825
2845
  if (action === "ship") {
2826
2846
  const state = readState(config.statePath);
@@ -3216,7 +3236,7 @@ function responseSchemaForAuthorPacket() {
3216
3236
  summary: { type: "string" },
3217
3237
  payload: {
3218
3238
  type: "object",
3219
- description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan and capture_script."
3239
+ description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan, capture_script, and refined_inputs.expected_terminal_path when the proof changes route, query, or hash."
3220
3240
  },
3221
3241
  reasons: { type: "array", items: { type: "string" } },
3222
3242
  continue_with_stage: { type: "string", enum: ["author", "recon"] },
@@ -3523,9 +3543,11 @@ function buildAuthorCheckpointPacket(input) {
3523
3543
  repo: input.request.repo || fullState.repo,
3524
3544
  branch: input.request.branch || fullState.branch,
3525
3545
  verification_mode: input.request.verification_mode || fullState.verification_mode,
3546
+ success_criteria: fullState.success_criteria,
3526
3547
  reference: input.request.reference || fullState.reference,
3527
3548
  server_path: fullState.server_path,
3528
3549
  wait_for_selector: fullState.wait_for_selector,
3550
+ route_expectation: jsonCloneRecord(fullState.route_expectation),
3529
3551
  author_summary: fullState.author_summary,
3530
3552
  author_request: jsonCloneRecord(authorRequest),
3531
3553
  recon_baseline_understanding: jsonCloneRecord(fullState.recon_baseline_understanding),
@@ -4984,7 +5006,7 @@ function checkpointResponseContinuation(state, value) {
4984
5006
  }
4985
5007
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
4986
5008
  appendCheckpointResponse(state, response);
4987
- return { next: { ...base, author_packet_json: jsonParam(payload) } };
5009
+ return { next: { ...base, advance_stage: "author", author_packet_json: jsonParam(payload) } };
4988
5010
  }
4989
5011
  if (packet.kind === "assess_recon" || packet.stage === "recon") {
4990
5012
  const assessment = reconAssessmentPayloadFromCheckpointResponse(response);
@@ -5463,7 +5485,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5463
5485
  })
5464
5486
  });
5465
5487
  return {
5466
- next: { ...baseContinuation(result), author_packet_json: jsonParam(packet.payload) }
5488
+ next: { ...baseContinuation(result), advance_stage: "author", author_packet_json: jsonParam(packet.payload) }
5467
5489
  };
5468
5490
  }
5469
5491
  if (checkpoint === "implement_changes_missing" || checkpoint === "implement_required" || checkpoint === "verify_agent_retry" && continueStage === "implement") {
package/dist/cli.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-OIFHYMHP.js";
2
+ import "./chunk-OD5UNE57.js";
3
3
  import "./chunk-PEWAIEER.js";
4
4
  import "./chunk-TWTEUS7R.js";
5
- import "./chunk-YB5ACBZE.js";
6
- import "./chunk-TNCDVE5O.js";
7
- import "./chunk-U4FUFBSH.js";
5
+ import "./chunk-BDFSMWTI.js";
6
+ import "./chunk-YZUVEJ5B.js";
7
+ import "./chunk-FMOYUYH2.js";
8
8
  import "./chunk-RV6LK7HU.js";
9
- import "./chunk-SKIAZTQ7.js";
9
+ import "./chunk-4FOHZ7JG.js";
10
10
  import "./chunk-JFQXAJH2.js";
11
11
  import "./chunk-7F5LNUGR.js";
12
12
  import "./chunk-VY4Y5U57.js";
@@ -1927,9 +1927,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1927
1927
  state = readState(config.statePath);
1928
1928
  const continuedStage = params.continue_from_checkpoint ? checkpointContinueStage(state) : null;
1929
1929
  if (params.continue_from_checkpoint && !params.advance_stage && !continuedStage) {
1930
- const recommended = recommendedAdvanceStage(state);
1930
+ const recommended2 = recommendedAdvanceStage(state);
1931
1931
  return checkpoint(
1932
- state?.active_checkpoint_stage || recommended || "recon",
1932
+ state?.active_checkpoint_stage || recommended2 || "recon",
1933
1933
  "continue_unavailable",
1934
1934
  "This run call asked to continue from a checkpoint, but the current state has no resumable checkpoint. Inspect status or set advance_stage explicitly.",
1935
1935
  {
@@ -1941,9 +1941,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1941
1941
  details: {
1942
1942
  executed,
1943
1943
  activeCheckpoint: state?.active_checkpoint || null,
1944
- suggestedAdvanceStage: recommended || null
1944
+ suggestedAdvanceStage: recommended2 || null
1945
1945
  },
1946
- suggestedAdvanceStage: recommended || null,
1946
+ suggestedAdvanceStage: recommended2 || null,
1947
1947
  executed
1948
1948
  }
1949
1949
  );
@@ -2207,7 +2207,7 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2207
2207
  }
2208
2208
  const noImplementationMode = !implementationRequired(params, state);
2209
2209
  const authorNextStage = stageAfterAuthor(state, params);
2210
- const explicitAuthorDebug = params.advance_stage === "author";
2210
+ const explicitAuthorDebug = params.advance_stage === "author" && !params.continue_from_checkpoint;
2211
2211
  recordAttempt("author", "completed", "Author applied the supervising agent's proof packet to recon observations.", {
2212
2212
  autoApproved: authorRes.autoApproved || false,
2213
2213
  checkpoint: explicitAuthorDebug ? "author_review" : "author_auto_continue",
@@ -2256,16 +2256,16 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2256
2256
  state = readState(config.statePath);
2257
2257
  }
2258
2258
  if (!effectiveAdvanceStage) {
2259
- const recommended = recommendedAdvanceStage(state);
2259
+ const recommended2 = recommendedAdvanceStage(state);
2260
2260
  const noImplementationMode = !implementationRequired(params, state);
2261
2261
  return checkpoint(
2262
- recommended || (noImplementationMode ? "verify" : "implement"),
2262
+ recommended2 || (noImplementationMode ? "verify" : "implement"),
2263
2263
  "awaiting_stage_advance",
2264
2264
  "Proof authoring is ready. The wrapper will not guess the next stage from here, explicitly choose whether to revisit recon/author, validate implementation, capture verify evidence, or ship.",
2265
2265
  {
2266
2266
  nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2267
2267
  advanceOptions: noImplementationMode ? ["recon", "author", "verify", "ship"] : ["recon", "author", "implement", "verify", "ship"],
2268
- recommendedAdvanceStage: recommended,
2268
+ recommendedAdvanceStage: recommended2,
2269
2269
  details: { executed },
2270
2270
  executed
2271
2271
  }
@@ -2465,7 +2465,7 @@ ${implementRes.stderr || ""}`;
2465
2465
  state = readState(config.statePath);
2466
2466
  }
2467
2467
  const checkpointName = "verify_capture_retry";
2468
- const summary = "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2468
+ const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2469
2469
  recordAttempt("verify", "checkpoint", summary, {
2470
2470
  autoApproved: verifyRes.autoApproved || false,
2471
2471
  checkpoint: checkpointName,
@@ -2821,6 +2821,26 @@ ${implementRes.stderr || ""}`;
2821
2821
  }
2822
2822
  );
2823
2823
  }
2824
+ state = readState(config.statePath);
2825
+ const recommended = recommendedAdvanceStage(state);
2826
+ const fallbackStage = recommended || (implementationRequired(params, state) ? "implement" : "verify");
2827
+ return checkpoint(
2828
+ fallbackStage,
2829
+ "awaiting_stage_advance",
2830
+ "The requested run continuation finished its immediate work but did not resolve to verify or ship. Choose the next workflow stage explicitly.",
2831
+ {
2832
+ nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2833
+ advanceOptions: implementationRequired(params, state) ? ["recon", "author", "implement", "verify", "ship"] : ["recon", "author", "verify"],
2834
+ recommendedAdvanceStage: fallbackStage,
2835
+ continueWithStage: fallbackStage,
2836
+ blocking: false,
2837
+ details: {
2838
+ executed,
2839
+ requestedAdvanceStage: effectiveAdvanceStage
2840
+ },
2841
+ executed
2842
+ }
2843
+ );
2824
2844
  }
2825
2845
  if (action === "ship") {
2826
2846
  const state = readState(config.statePath);
@@ -3219,7 +3239,7 @@ function responseSchemaForAuthorPacket() {
3219
3239
  summary: { type: "string" },
3220
3240
  payload: {
3221
3241
  type: "object",
3222
- description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan and capture_script."
3242
+ description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan, capture_script, and refined_inputs.expected_terminal_path when the proof changes route, query, or hash."
3223
3243
  },
3224
3244
  reasons: { type: "array", items: { type: "string" } },
3225
3245
  continue_with_stage: { type: "string", enum: ["author", "recon"] },
@@ -3526,9 +3546,11 @@ function buildAuthorCheckpointPacket(input) {
3526
3546
  repo: input.request.repo || fullState.repo,
3527
3547
  branch: input.request.branch || fullState.branch,
3528
3548
  verification_mode: input.request.verification_mode || fullState.verification_mode,
3549
+ success_criteria: fullState.success_criteria,
3529
3550
  reference: input.request.reference || fullState.reference,
3530
3551
  server_path: fullState.server_path,
3531
3552
  wait_for_selector: fullState.wait_for_selector,
3553
+ route_expectation: jsonCloneRecord(fullState.route_expectation),
3532
3554
  author_summary: fullState.author_summary,
3533
3555
  author_request: jsonCloneRecord(authorRequest),
3534
3556
  recon_baseline_understanding: jsonCloneRecord(fullState.recon_baseline_understanding),
@@ -4913,7 +4935,7 @@ function checkpointResponseContinuation(state, value) {
4913
4935
  }
4914
4936
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
4915
4937
  appendCheckpointResponse(state, response);
4916
- return { next: { ...base, author_packet_json: jsonParam(payload) } };
4938
+ return { next: { ...base, advance_stage: "author", author_packet_json: jsonParam(payload) } };
4917
4939
  }
4918
4940
  if (packet.kind === "assess_recon" || packet.stage === "recon") {
4919
4941
  const assessment = reconAssessmentPayloadFromCheckpointResponse(response);
@@ -5392,7 +5414,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5392
5414
  })
5393
5415
  });
5394
5416
  return {
5395
- next: { ...baseContinuation(result), author_packet_json: jsonParam(packet.payload) }
5417
+ next: { ...baseContinuation(result), advance_stage: "author", author_packet_json: jsonParam(packet.payload) }
5396
5418
  };
5397
5419
  }
5398
5420
  if (checkpoint === "implement_changes_missing" || checkpoint === "implement_required" || checkpoint === "verify_agent_retry" && continueStage === "implement") {
@@ -2,11 +2,11 @@ import {
2
2
  createDisabledRiddleProofAgentAdapter,
3
3
  readRiddleProofRunStatus,
4
4
  runRiddleProofEngineHarness
5
- } from "./chunk-YB5ACBZE.js";
6
- import "./chunk-TNCDVE5O.js";
7
- import "./chunk-U4FUFBSH.js";
5
+ } from "./chunk-BDFSMWTI.js";
6
+ import "./chunk-YZUVEJ5B.js";
7
+ import "./chunk-FMOYUYH2.js";
8
8
  import "./chunk-RV6LK7HU.js";
9
- import "./chunk-SKIAZTQ7.js";
9
+ import "./chunk-4FOHZ7JG.js";
10
10
  import "./chunk-VY4Y5U57.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
  export {
package/dist/index.cjs CHANGED
@@ -1927,9 +1927,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1927
1927
  state = readState(config.statePath);
1928
1928
  const continuedStage = params.continue_from_checkpoint ? checkpointContinueStage(state) : null;
1929
1929
  if (params.continue_from_checkpoint && !params.advance_stage && !continuedStage) {
1930
- const recommended = recommendedAdvanceStage(state);
1930
+ const recommended2 = recommendedAdvanceStage(state);
1931
1931
  return checkpoint(
1932
- state?.active_checkpoint_stage || recommended || "recon",
1932
+ state?.active_checkpoint_stage || recommended2 || "recon",
1933
1933
  "continue_unavailable",
1934
1934
  "This run call asked to continue from a checkpoint, but the current state has no resumable checkpoint. Inspect status or set advance_stage explicitly.",
1935
1935
  {
@@ -1941,9 +1941,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1941
1941
  details: {
1942
1942
  executed,
1943
1943
  activeCheckpoint: state?.active_checkpoint || null,
1944
- suggestedAdvanceStage: recommended || null
1944
+ suggestedAdvanceStage: recommended2 || null
1945
1945
  },
1946
- suggestedAdvanceStage: recommended || null,
1946
+ suggestedAdvanceStage: recommended2 || null,
1947
1947
  executed
1948
1948
  }
1949
1949
  );
@@ -2207,7 +2207,7 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2207
2207
  }
2208
2208
  const noImplementationMode = !implementationRequired(params, state);
2209
2209
  const authorNextStage = stageAfterAuthor(state, params);
2210
- const explicitAuthorDebug = params.advance_stage === "author";
2210
+ const explicitAuthorDebug = params.advance_stage === "author" && !params.continue_from_checkpoint;
2211
2211
  recordAttempt("author", "completed", "Author applied the supervising agent's proof packet to recon observations.", {
2212
2212
  autoApproved: authorRes.autoApproved || false,
2213
2213
  checkpoint: explicitAuthorDebug ? "author_review" : "author_auto_continue",
@@ -2256,16 +2256,16 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2256
2256
  state = readState(config.statePath);
2257
2257
  }
2258
2258
  if (!effectiveAdvanceStage) {
2259
- const recommended = recommendedAdvanceStage(state);
2259
+ const recommended2 = recommendedAdvanceStage(state);
2260
2260
  const noImplementationMode = !implementationRequired(params, state);
2261
2261
  return checkpoint(
2262
- recommended || (noImplementationMode ? "verify" : "implement"),
2262
+ recommended2 || (noImplementationMode ? "verify" : "implement"),
2263
2263
  "awaiting_stage_advance",
2264
2264
  "Proof authoring is ready. The wrapper will not guess the next stage from here, explicitly choose whether to revisit recon/author, validate implementation, capture verify evidence, or ship.",
2265
2265
  {
2266
2266
  nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2267
2267
  advanceOptions: noImplementationMode ? ["recon", "author", "verify", "ship"] : ["recon", "author", "implement", "verify", "ship"],
2268
- recommendedAdvanceStage: recommended,
2268
+ recommendedAdvanceStage: recommended2,
2269
2269
  details: { executed },
2270
2270
  executed
2271
2271
  }
@@ -2465,7 +2465,7 @@ ${implementRes.stderr || ""}`;
2465
2465
  state = readState(config.statePath);
2466
2466
  }
2467
2467
  const checkpointName = "verify_capture_retry";
2468
- const summary = "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2468
+ const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2469
2469
  recordAttempt("verify", "checkpoint", summary, {
2470
2470
  autoApproved: verifyRes.autoApproved || false,
2471
2471
  checkpoint: checkpointName,
@@ -2821,6 +2821,26 @@ ${implementRes.stderr || ""}`;
2821
2821
  }
2822
2822
  );
2823
2823
  }
2824
+ state = readState(config.statePath);
2825
+ const recommended = recommendedAdvanceStage(state);
2826
+ const fallbackStage = recommended || (implementationRequired(params, state) ? "implement" : "verify");
2827
+ return checkpoint(
2828
+ fallbackStage,
2829
+ "awaiting_stage_advance",
2830
+ "The requested run continuation finished its immediate work but did not resolve to verify or ship. Choose the next workflow stage explicitly.",
2831
+ {
2832
+ nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2833
+ advanceOptions: implementationRequired(params, state) ? ["recon", "author", "implement", "verify", "ship"] : ["recon", "author", "verify"],
2834
+ recommendedAdvanceStage: fallbackStage,
2835
+ continueWithStage: fallbackStage,
2836
+ blocking: false,
2837
+ details: {
2838
+ executed,
2839
+ requestedAdvanceStage: effectiveAdvanceStage
2840
+ },
2841
+ executed
2842
+ }
2843
+ );
2824
2844
  }
2825
2845
  if (action === "ship") {
2826
2846
  const state = readState(config.statePath);
@@ -3333,7 +3353,7 @@ function responseSchemaForAuthorPacket() {
3333
3353
  summary: { type: "string" },
3334
3354
  payload: {
3335
3355
  type: "object",
3336
- description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan and capture_script."
3356
+ description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan, capture_script, and refined_inputs.expected_terminal_path when the proof changes route, query, or hash."
3337
3357
  },
3338
3358
  reasons: { type: "array", items: { type: "string" } },
3339
3359
  continue_with_stage: { type: "string", enum: ["author", "recon"] },
@@ -3640,9 +3660,11 @@ function buildAuthorCheckpointPacket(input) {
3640
3660
  repo: input.request.repo || fullState.repo,
3641
3661
  branch: input.request.branch || fullState.branch,
3642
3662
  verification_mode: input.request.verification_mode || fullState.verification_mode,
3663
+ success_criteria: fullState.success_criteria,
3643
3664
  reference: input.request.reference || fullState.reference,
3644
3665
  server_path: fullState.server_path,
3645
3666
  wait_for_selector: fullState.wait_for_selector,
3667
+ route_expectation: jsonCloneRecord(fullState.route_expectation),
3646
3668
  author_summary: fullState.author_summary,
3647
3669
  author_request: jsonCloneRecord(authorRequest),
3648
3670
  recon_baseline_understanding: jsonCloneRecord(fullState.recon_baseline_understanding),
@@ -5647,7 +5669,7 @@ function checkpointResponseContinuation(state, value) {
5647
5669
  }
5648
5670
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
5649
5671
  appendCheckpointResponse(state, response);
5650
- return { next: { ...base, author_packet_json: jsonParam(payload) } };
5672
+ return { next: { ...base, advance_stage: "author", author_packet_json: jsonParam(payload) } };
5651
5673
  }
5652
5674
  if (packet.kind === "assess_recon" || packet.stage === "recon") {
5653
5675
  const assessment = reconAssessmentPayloadFromCheckpointResponse(response);
@@ -6126,7 +6148,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
6126
6148
  })
6127
6149
  });
6128
6150
  return {
6129
- next: { ...baseContinuation(result), author_packet_json: jsonParam(packet.payload) }
6151
+ next: { ...baseContinuation(result), advance_stage: "author", author_packet_json: jsonParam(packet.payload) }
6130
6152
  };
6131
6153
  }
6132
6154
  if (checkpoint === "implement_changes_missing" || checkpoint === "implement_required" || checkpoint === "verify_agent_retry" && continueStage === "implement") {
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-ZX45XGDJ.js";
3
+ } from "./chunk-UIJ7X63P.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
  import {
6
6
  RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
@@ -95,7 +95,7 @@ import {
95
95
  createDisabledRiddleProofAgentAdapter,
96
96
  readRiddleProofRunStatus,
97
97
  runRiddleProofEngineHarness
98
- } from "./chunk-YB5ACBZE.js";
98
+ } from "./chunk-BDFSMWTI.js";
99
99
  import {
100
100
  RIDDLE_PROOF_RUN_STATE_VERSION,
101
101
  appendRunEvent,
@@ -107,11 +107,11 @@ import {
107
107
  normalizePrLifecycleState,
108
108
  normalizeRunParams,
109
109
  setRunStatus
110
- } from "./chunk-TNCDVE5O.js";
110
+ } from "./chunk-YZUVEJ5B.js";
111
111
  import {
112
112
  RIDDLE_PROOF_RUN_CARD_VERSION,
113
113
  createRiddleProofRunCard
114
- } from "./chunk-U4FUFBSH.js";
114
+ } from "./chunk-FMOYUYH2.js";
115
115
  import "./chunk-RV6LK7HU.js";
116
116
  import {
117
117
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
@@ -128,7 +128,7 @@ import {
128
128
  normalizeCheckpointResponse,
129
129
  proofContractFromAuthorCheckpointResponse,
130
130
  statePathsForRunState
131
- } from "./chunk-SKIAZTQ7.js";
131
+ } from "./chunk-4FOHZ7JG.js";
132
132
  import "./chunk-JFQXAJH2.js";
133
133
  import {
134
134
  createCodexExecAgentAdapter,
package/dist/openclaw.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  parseOpenClawAssertions,
4
4
  parseOpenClawJsonObjectOrArray,
5
5
  toRiddleProofRunParams
6
- } from "./chunk-SMBZT46I.js";
7
- import "./chunk-TNCDVE5O.js";
8
- import "./chunk-U4FUFBSH.js";
9
- import "./chunk-SKIAZTQ7.js";
6
+ } from "./chunk-RBWSCU6V.js";
7
+ import "./chunk-YZUVEJ5B.js";
8
+ import "./chunk-FMOYUYH2.js";
9
+ import "./chunk-4FOHZ7JG.js";
10
10
  import "./chunk-VY4Y5U57.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
  export {
@@ -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: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "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: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "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: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
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: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "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: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "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: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;