@riddledc/riddle-proof 0.8.2 → 0.8.4

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 (55) hide show
  1. package/dist/adapters/openclaw.js +4 -4
  2. package/dist/advanced/engine-harness.cjs +33 -11
  3. package/dist/advanced/engine-harness.js +4 -4
  4. package/dist/advanced/index.cjs +33 -11
  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 +28 -8
  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-U4FUFBSH.js → chunk-FMOYUYH2.js} +1 -1
  17. package/dist/{chunk-YB5ACBZE.js → chunk-IP64JLLR.js} +5 -5
  18. package/dist/{chunk-OIFHYMHP.js → chunk-LZFCIHDT.js} +2 -2
  19. package/dist/{chunk-TZ3YMCDM.js → chunk-P22V26PS.js} +28 -8
  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 +33 -11
  25. package/dist/cli.js +5 -5
  26. package/dist/engine-harness.cjs +33 -11
  27. package/dist/engine-harness.js +4 -4
  28. package/dist/index.cjs +33 -11
  29. package/dist/index.js +5 -5
  30. package/dist/openclaw.js +4 -4
  31. package/dist/{proof-run-engine-CVnboNHj.d.cts → proof-run-engine-B7DCPzpK.d.cts} +3 -3
  32. package/dist/{proof-run-engine-BVkeO-Yo.d.ts → proof-run-engine-BomAcXhA.d.ts} +3 -3
  33. package/dist/proof-run-engine.cjs +28 -8
  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 +128 -5
  49. package/runtime/pipelines/riddle-proof-author.lobster +2 -1
  50. package/runtime/pipelines/riddle-proof-implement.lobster +2 -1
  51. package/runtime/pipelines/riddle-proof-recon.lobster +2 -1
  52. package/runtime/pipelines/riddle-proof-setup.lobster +4 -2
  53. package/runtime/pipelines/riddle-proof-ship.lobster +2 -1
  54. package/runtime/pipelines/riddle-proof-verify.lobster +2 -1
  55. package/runtime/tests/recon_verify_smoke.py +116 -0
@@ -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 {
@@ -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
  }
@@ -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);
@@ -3221,7 +3241,7 @@ function responseSchemaForAuthorPacket() {
3221
3241
  summary: { type: "string" },
3222
3242
  payload: {
3223
3243
  type: "object",
3224
- description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan and capture_script."
3244
+ 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."
3225
3245
  },
3226
3246
  reasons: { type: "array", items: { type: "string" } },
3227
3247
  continue_with_stage: { type: "string", enum: ["author", "recon"] },
@@ -3528,9 +3548,11 @@ function buildAuthorCheckpointPacket(input) {
3528
3548
  repo: input.request.repo || fullState.repo,
3529
3549
  branch: input.request.branch || fullState.branch,
3530
3550
  verification_mode: input.request.verification_mode || fullState.verification_mode,
3551
+ success_criteria: fullState.success_criteria,
3531
3552
  reference: input.request.reference || fullState.reference,
3532
3553
  server_path: fullState.server_path,
3533
3554
  wait_for_selector: fullState.wait_for_selector,
3555
+ route_expectation: jsonCloneRecord(fullState.route_expectation),
3534
3556
  author_summary: fullState.author_summary,
3535
3557
  author_request: jsonCloneRecord(authorRequest),
3536
3558
  recon_baseline_understanding: jsonCloneRecord(fullState.recon_baseline_understanding),
@@ -4915,7 +4937,7 @@ function checkpointResponseContinuation(state, value) {
4915
4937
  }
4916
4938
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
4917
4939
  appendCheckpointResponse(state, response);
4918
- return { next: { ...base, author_packet_json: jsonParam(payload) } };
4940
+ return { next: { ...base, advance_stage: "author", author_packet_json: jsonParam(payload) } };
4919
4941
  }
4920
4942
  if (packet.kind === "assess_recon" || packet.stage === "recon") {
4921
4943
  const assessment = reconAssessmentPayloadFromCheckpointResponse(response);
@@ -5394,7 +5416,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5394
5416
  })
5395
5417
  });
5396
5418
  return {
5397
- next: { ...baseContinuation(result), author_packet_json: jsonParam(packet.payload) }
5419
+ next: { ...baseContinuation(result), advance_stage: "author", author_packet_json: jsonParam(packet.payload) }
5398
5420
  };
5399
5421
  }
5400
5422
  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-IP64JLLR.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 {
@@ -1957,9 +1957,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1957
1957
  state = readState(config.statePath);
1958
1958
  const continuedStage = params.continue_from_checkpoint ? checkpointContinueStage(state) : null;
1959
1959
  if (params.continue_from_checkpoint && !params.advance_stage && !continuedStage) {
1960
- const recommended = recommendedAdvanceStage(state);
1960
+ const recommended2 = recommendedAdvanceStage(state);
1961
1961
  return checkpoint(
1962
- state?.active_checkpoint_stage || recommended || "recon",
1962
+ state?.active_checkpoint_stage || recommended2 || "recon",
1963
1963
  "continue_unavailable",
1964
1964
  "This run call asked to continue from a checkpoint, but the current state has no resumable checkpoint. Inspect status or set advance_stage explicitly.",
1965
1965
  {
@@ -1971,9 +1971,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1971
1971
  details: {
1972
1972
  executed,
1973
1973
  activeCheckpoint: state?.active_checkpoint || null,
1974
- suggestedAdvanceStage: recommended || null
1974
+ suggestedAdvanceStage: recommended2 || null
1975
1975
  },
1976
- suggestedAdvanceStage: recommended || null,
1976
+ suggestedAdvanceStage: recommended2 || null,
1977
1977
  executed
1978
1978
  }
1979
1979
  );
@@ -2237,7 +2237,7 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2237
2237
  }
2238
2238
  const noImplementationMode = !implementationRequired(params, state);
2239
2239
  const authorNextStage = stageAfterAuthor(state, params);
2240
- const explicitAuthorDebug = params.advance_stage === "author";
2240
+ const explicitAuthorDebug = params.advance_stage === "author" && !params.continue_from_checkpoint;
2241
2241
  recordAttempt("author", "completed", "Author applied the supervising agent's proof packet to recon observations.", {
2242
2242
  autoApproved: authorRes.autoApproved || false,
2243
2243
  checkpoint: explicitAuthorDebug ? "author_review" : "author_auto_continue",
@@ -2286,16 +2286,16 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
2286
2286
  state = readState(config.statePath);
2287
2287
  }
2288
2288
  if (!effectiveAdvanceStage) {
2289
- const recommended = recommendedAdvanceStage(state);
2289
+ const recommended2 = recommendedAdvanceStage(state);
2290
2290
  const noImplementationMode = !implementationRequired(params, state);
2291
2291
  return checkpoint(
2292
- recommended || (noImplementationMode ? "verify" : "implement"),
2292
+ recommended2 || (noImplementationMode ? "verify" : "implement"),
2293
2293
  "awaiting_stage_advance",
2294
2294
  "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.",
2295
2295
  {
2296
2296
  nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2297
2297
  advanceOptions: noImplementationMode ? ["recon", "author", "verify", "ship"] : ["recon", "author", "implement", "verify", "ship"],
2298
- recommendedAdvanceStage: recommended,
2298
+ recommendedAdvanceStage: recommended2,
2299
2299
  details: { executed },
2300
2300
  executed
2301
2301
  }
@@ -2851,6 +2851,26 @@ ${implementRes.stderr || ""}`;
2851
2851
  }
2852
2852
  );
2853
2853
  }
2854
+ state = readState(config.statePath);
2855
+ const recommended = recommendedAdvanceStage(state);
2856
+ const fallbackStage = recommended || (implementationRequired(params, state) ? "implement" : "verify");
2857
+ return checkpoint(
2858
+ fallbackStage,
2859
+ "awaiting_stage_advance",
2860
+ "The requested run continuation finished its immediate work but did not resolve to verify or ship. Choose the next workflow stage explicitly.",
2861
+ {
2862
+ nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
2863
+ advanceOptions: implementationRequired(params, state) ? ["recon", "author", "implement", "verify", "ship"] : ["recon", "author", "verify"],
2864
+ recommendedAdvanceStage: fallbackStage,
2865
+ continueWithStage: fallbackStage,
2866
+ blocking: false,
2867
+ details: {
2868
+ executed,
2869
+ requestedAdvanceStage: effectiveAdvanceStage
2870
+ },
2871
+ executed
2872
+ }
2873
+ );
2854
2874
  }
2855
2875
  if (action === "ship") {
2856
2876
  const state = readState(config.statePath);
@@ -3252,7 +3272,7 @@ function responseSchemaForAuthorPacket() {
3252
3272
  summary: { type: "string" },
3253
3273
  payload: {
3254
3274
  type: "object",
3255
- description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan and capture_script."
3275
+ 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."
3256
3276
  },
3257
3277
  reasons: { type: "array", items: { type: "string" } },
3258
3278
  continue_with_stage: { type: "string", enum: ["author", "recon"] },
@@ -3559,9 +3579,11 @@ function buildAuthorCheckpointPacket(input) {
3559
3579
  repo: input.request.repo || fullState.repo,
3560
3580
  branch: input.request.branch || fullState.branch,
3561
3581
  verification_mode: input.request.verification_mode || fullState.verification_mode,
3582
+ success_criteria: fullState.success_criteria,
3562
3583
  reference: input.request.reference || fullState.reference,
3563
3584
  server_path: fullState.server_path,
3564
3585
  wait_for_selector: fullState.wait_for_selector,
3586
+ route_expectation: jsonCloneRecord(fullState.route_expectation),
3565
3587
  author_summary: fullState.author_summary,
3566
3588
  author_request: jsonCloneRecord(authorRequest),
3567
3589
  recon_baseline_understanding: jsonCloneRecord(fullState.recon_baseline_understanding),
@@ -5451,7 +5473,7 @@ function checkpointResponseContinuation(state, value) {
5451
5473
  }
5452
5474
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
5453
5475
  appendCheckpointResponse(state, response);
5454
- return { next: { ...base, author_packet_json: jsonParam(payload) } };
5476
+ return { next: { ...base, advance_stage: "author", author_packet_json: jsonParam(payload) } };
5455
5477
  }
5456
5478
  if (packet.kind === "assess_recon" || packet.stage === "recon") {
5457
5479
  const assessment = reconAssessmentPayloadFromCheckpointResponse(response);
@@ -5930,7 +5952,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5930
5952
  })
5931
5953
  });
5932
5954
  return {
5933
- next: { ...baseContinuation(result), author_packet_json: jsonParam(packet.payload) }
5955
+ next: { ...baseContinuation(result), advance_stage: "author", author_packet_json: jsonParam(packet.payload) }
5934
5956
  };
5935
5957
  }
5936
5958
  if (checkpoint === "implement_changes_missing" || checkpoint === "implement_required" || checkpoint === "verify_agent_retry" && continueStage === "implement") {
@@ -1,5 +1,5 @@
1
1
  export { b as runner } from '../runner-4LJ5z0D-.cjs';
2
2
  export { l as engineHarness } from '../engine-harness-LBfqbFSe.cjs';
3
3
  export { p as proofRunCore } from '../proof-run-core-CE0jx7wL.cjs';
4
- export { p as proofRunEngine } from '../proof-run-engine-CVnboNHj.cjs';
4
+ export { p as proofRunEngine } from '../proof-run-engine-B7DCPzpK.cjs';
5
5
  import '../types.cjs';
@@ -1,5 +1,5 @@
1
1
  export { b as runner } from '../runner-BdQpOkZD.js';
2
2
  export { l as engineHarness } from '../engine-harness-CMACHP6A.js';
3
3
  export { p as proofRunCore } from '../proof-run-core-CE0jx7wL.js';
4
- export { p as proofRunEngine } from '../proof-run-engine-BVkeO-Yo.js';
4
+ export { p as proofRunEngine } from '../proof-run-engine-BomAcXhA.js';
5
5
  import '../types.js';
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  proof_run_engine_exports
3
- } from "../chunk-TZ3YMCDM.js";
3
+ } from "../chunk-P22V26PS.js";
4
4
  import {
5
5
  runner_exports
6
- } from "../chunk-ZX45XGDJ.js";
6
+ } from "../chunk-UIJ7X63P.js";
7
7
  import {
8
8
  engine_harness_exports
9
- } from "../chunk-YB5ACBZE.js";
10
- import "../chunk-TNCDVE5O.js";
11
- import "../chunk-U4FUFBSH.js";
9
+ } from "../chunk-IP64JLLR.js";
10
+ import "../chunk-YZUVEJ5B.js";
11
+ import "../chunk-FMOYUYH2.js";
12
12
  import {
13
13
  proof_run_core_exports
14
14
  } from "../chunk-RV6LK7HU.js";
15
- import "../chunk-SKIAZTQ7.js";
15
+ import "../chunk-4FOHZ7JG.js";
16
16
  import "../chunk-VY4Y5U57.js";
17
17
  import "../chunk-MLKGABMK.js";
18
18
  export {
@@ -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
  }
@@ -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);
@@ -1,2 +1,2 @@
1
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-CVnboNHj.cjs';
1
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-B7DCPzpK.cjs';
2
2
  import '../proof-run-core-CE0jx7wL.cjs';
@@ -1,2 +1,2 @@
1
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-BVkeO-Yo.js';
1
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-BomAcXhA.js';
2
2
  import '../proof-run-core-CE0jx7wL.js';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRiddleProofEngine,
3
3
  executeWorkflow
4
- } from "../chunk-TZ3YMCDM.js";
4
+ } from "../chunk-P22V26PS.js";
5
5
  import "../chunk-RV6LK7HU.js";
6
6
  import "../chunk-MLKGABMK.js";
7
7
  export {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "../chunk-ZX45XGDJ.js";
4
- import "../chunk-TNCDVE5O.js";
5
- import "../chunk-U4FUFBSH.js";
3
+ } from "../chunk-UIJ7X63P.js";
4
+ import "../chunk-YZUVEJ5B.js";
5
+ import "../chunk-FMOYUYH2.js";
6
6
  import "../chunk-RV6LK7HU.js";
7
- import "../chunk-SKIAZTQ7.js";
7
+ import "../chunk-4FOHZ7JG.js";
8
8
  import "../chunk-VY4Y5U57.js";
9
9
  import "../chunk-MLKGABMK.js";
10
10
  export {
@@ -119,7 +119,7 @@ function responseSchemaForAuthorPacket() {
119
119
  summary: { type: "string" },
120
120
  payload: {
121
121
  type: "object",
122
- description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan and capture_script."
122
+ 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."
123
123
  },
124
124
  reasons: { type: "array", items: { type: "string" } },
125
125
  continue_with_stage: { type: "string", enum: ["author", "recon"] },
@@ -426,9 +426,11 @@ function buildAuthorCheckpointPacket(input) {
426
426
  repo: input.request.repo || fullState.repo,
427
427
  branch: input.request.branch || fullState.branch,
428
428
  verification_mode: input.request.verification_mode || fullState.verification_mode,
429
+ success_criteria: fullState.success_criteria,
429
430
  reference: input.request.reference || fullState.reference,
430
431
  server_path: fullState.server_path,
431
432
  wait_for_selector: fullState.wait_for_selector,
433
+ route_expectation: jsonCloneRecord(fullState.route_expectation),
432
434
  author_summary: fullState.author_summary,
433
435
  author_request: jsonCloneRecord(authorRequest),
434
436
  recon_baseline_understanding: jsonCloneRecord(fullState.recon_baseline_understanding),
@@ -13,7 +13,7 @@ import {
13
13
  normalizeCheckpointResponse,
14
14
  proofContractFromAuthorCheckpointResponse,
15
15
  statePathsForRunState
16
- } from "./chunk-SKIAZTQ7.js";
16
+ } from "./chunk-4FOHZ7JG.js";
17
17
  import "./chunk-VY4Y5U57.js";
18
18
  import "./chunk-MLKGABMK.js";
19
19
  export {
@@ -65,7 +65,7 @@ function responseSchemaForAuthorPacket() {
65
65
  summary: { type: "string" },
66
66
  payload: {
67
67
  type: "object",
68
- description: "For decision=author_packet, provide the proof packet itself or {author_packet:{...}} with proof_plan and capture_script."
68
+ 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."
69
69
  },
70
70
  reasons: { type: "array", items: { type: "string" } },
71
71
  continue_with_stage: { type: "string", enum: ["author", "recon"] },
@@ -372,9 +372,11 @@ function buildAuthorCheckpointPacket(input) {
372
372
  repo: input.request.repo || fullState.repo,
373
373
  branch: input.request.branch || fullState.branch,
374
374
  verification_mode: input.request.verification_mode || fullState.verification_mode,
375
+ success_criteria: fullState.success_criteria,
375
376
  reference: input.request.reference || fullState.reference,
376
377
  server_path: fullState.server_path,
377
378
  wait_for_selector: fullState.wait_for_selector,
379
+ route_expectation: jsonCloneRecord(fullState.route_expectation),
378
380
  author_summary: fullState.author_summary,
379
381
  author_request: jsonCloneRecord(authorRequest),
380
382
  recon_baseline_understanding: jsonCloneRecord(fullState.recon_baseline_understanding),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  statePathsForRunState
3
- } from "./chunk-SKIAZTQ7.js";
3
+ } from "./chunk-4FOHZ7JG.js";
4
4
  import {
5
5
  compactRecord,
6
6
  isTerminalStatus,
@@ -5,10 +5,10 @@ import {
5
5
  createRunStatusSnapshot,
6
6
  normalizeRunParams,
7
7
  setRunStatus
8
- } from "./chunk-TNCDVE5O.js";
8
+ } from "./chunk-YZUVEJ5B.js";
9
9
  import {
10
10
  createRiddleProofRunCard
11
- } from "./chunk-U4FUFBSH.js";
11
+ } from "./chunk-FMOYUYH2.js";
12
12
  import {
13
13
  noImplementationModeFor,
14
14
  visualDeltaForState,
@@ -24,7 +24,7 @@ import {
24
24
  normalizeCheckpointResponse,
25
25
  proofContractFromAuthorCheckpointResponse,
26
26
  statePathsForRunState
27
- } from "./chunk-SKIAZTQ7.js";
27
+ } from "./chunk-4FOHZ7JG.js";
28
28
  import {
29
29
  applyTerminalMetadata,
30
30
  compactRecord,
@@ -738,7 +738,7 @@ function checkpointResponseContinuation(state, value) {
738
738
  }
739
739
  state.proof_contract = proofContractFromAuthorCheckpointResponse(response, packet, payload);
740
740
  appendCheckpointResponse(state, response);
741
- return { next: { ...base, author_packet_json: jsonParam(payload) } };
741
+ return { next: { ...base, advance_stage: "author", author_packet_json: jsonParam(payload) } };
742
742
  }
743
743
  if (packet.kind === "assess_recon" || packet.stage === "recon") {
744
744
  const assessment = reconAssessmentPayloadFromCheckpointResponse(response);
@@ -1217,7 +1217,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
1217
1217
  })
1218
1218
  });
1219
1219
  return {
1220
- next: { ...baseContinuation(result), author_packet_json: jsonParam(packet.payload) }
1220
+ next: { ...baseContinuation(result), advance_stage: "author", author_packet_json: jsonParam(packet.payload) }
1221
1221
  };
1222
1222
  }
1223
1223
  if (checkpoint === "implement_changes_missing" || checkpoint === "implement_required" || checkpoint === "verify_agent_retry" && continueStage === "implement") {
@@ -22,10 +22,10 @@ import {
22
22
  createDisabledRiddleProofAgentAdapter,
23
23
  readRiddleProofRunStatus,
24
24
  runRiddleProofEngineHarness
25
- } from "./chunk-YB5ACBZE.js";
25
+ } from "./chunk-IP64JLLR.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
@@ -909,9 +909,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
909
909
  state = readState(config.statePath);
910
910
  const continuedStage = params.continue_from_checkpoint ? checkpointContinueStage(state) : null;
911
911
  if (params.continue_from_checkpoint && !params.advance_stage && !continuedStage) {
912
- const recommended = recommendedAdvanceStage(state);
912
+ const recommended2 = recommendedAdvanceStage(state);
913
913
  return checkpoint(
914
- state?.active_checkpoint_stage || recommended || "recon",
914
+ state?.active_checkpoint_stage || recommended2 || "recon",
915
915
  "continue_unavailable",
916
916
  "This run call asked to continue from a checkpoint, but the current state has no resumable checkpoint. Inspect status or set advance_stage explicitly.",
917
917
  {
@@ -923,9 +923,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
923
923
  details: {
924
924
  executed,
925
925
  activeCheckpoint: state?.active_checkpoint || null,
926
- suggestedAdvanceStage: recommended || null
926
+ suggestedAdvanceStage: recommended2 || null
927
927
  },
928
- suggestedAdvanceStage: recommended || null,
928
+ suggestedAdvanceStage: recommended2 || null,
929
929
  executed
930
930
  }
931
931
  );
@@ -1189,7 +1189,7 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1189
1189
  }
1190
1190
  const noImplementationMode = !implementationRequired(params, state);
1191
1191
  const authorNextStage = stageAfterAuthor(state, params);
1192
- const explicitAuthorDebug = params.advance_stage === "author";
1192
+ const explicitAuthorDebug = params.advance_stage === "author" && !params.continue_from_checkpoint;
1193
1193
  recordAttempt("author", "completed", "Author applied the supervising agent's proof packet to recon observations.", {
1194
1194
  autoApproved: authorRes.autoApproved || false,
1195
1195
  checkpoint: explicitAuthorDebug ? "author_review" : "author_auto_continue",
@@ -1238,16 +1238,16 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1238
1238
  state = readState(config.statePath);
1239
1239
  }
1240
1240
  if (!effectiveAdvanceStage) {
1241
- const recommended = recommendedAdvanceStage(state);
1241
+ const recommended2 = recommendedAdvanceStage(state);
1242
1242
  const noImplementationMode = !implementationRequired(params, state);
1243
1243
  return checkpoint(
1244
- recommended || (noImplementationMode ? "verify" : "implement"),
1244
+ recommended2 || (noImplementationMode ? "verify" : "implement"),
1245
1245
  "awaiting_stage_advance",
1246
1246
  "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.",
1247
1247
  {
1248
1248
  nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
1249
1249
  advanceOptions: noImplementationMode ? ["recon", "author", "verify", "ship"] : ["recon", "author", "implement", "verify", "ship"],
1250
- recommendedAdvanceStage: recommended,
1250
+ recommendedAdvanceStage: recommended2,
1251
1251
  details: { executed },
1252
1252
  executed
1253
1253
  }
@@ -1803,6 +1803,26 @@ ${implementRes.stderr || ""}`;
1803
1803
  }
1804
1804
  );
1805
1805
  }
1806
+ state = readState(config.statePath);
1807
+ const recommended = recommendedAdvanceStage(state);
1808
+ const fallbackStage = recommended || (implementationRequired(params, state) ? "implement" : "verify");
1809
+ return checkpoint(
1810
+ fallbackStage,
1811
+ "awaiting_stage_advance",
1812
+ "The requested run continuation finished its immediate work but did not resolve to verify or ship. Choose the next workflow stage explicitly.",
1813
+ {
1814
+ nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
1815
+ advanceOptions: implementationRequired(params, state) ? ["recon", "author", "implement", "verify", "ship"] : ["recon", "author", "verify"],
1816
+ recommendedAdvanceStage: fallbackStage,
1817
+ continueWithStage: fallbackStage,
1818
+ blocking: false,
1819
+ details: {
1820
+ executed,
1821
+ requestedAdvanceStage: effectiveAdvanceStage
1822
+ },
1823
+ executed
1824
+ }
1825
+ );
1806
1826
  }
1807
1827
  if (action === "ship") {
1808
1828
  const state = readState(config.statePath);
@@ -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";