@riddledc/riddle-proof 0.8.1 → 0.8.3

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 (63) hide show
  1. package/dist/adapters/openclaw.js +4 -4
  2. package/dist/advanced/engine-harness.cjs +25 -4
  3. package/dist/advanced/engine-harness.js +5 -5
  4. package/dist/advanced/index.cjs +25 -4
  5. package/dist/advanced/index.d.cts +1 -1
  6. package/dist/advanced/index.d.ts +1 -1
  7. package/dist/advanced/index.js +7 -7
  8. package/dist/advanced/proof-run-core.cjs +12 -0
  9. package/dist/advanced/proof-run-core.js +1 -1
  10. package/dist/advanced/proof-run-engine.cjs +19 -0
  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/proof-run-engine.js +2 -2
  14. package/dist/advanced/runner.js +5 -5
  15. package/dist/checkpoint.cjs +3 -1
  16. package/dist/checkpoint.js +1 -1
  17. package/dist/{chunk-VZD5LH7U.js → chunk-OIFHYMHP.js} +2 -2
  18. package/dist/{chunk-TJ63IE65.js → chunk-RV6LK7HU.js} +12 -0
  19. package/dist/{chunk-2CFVREFI.js → chunk-SKIAZTQ7.js} +3 -1
  20. package/dist/{chunk-BTN76IGW.js → chunk-SMBZT46I.js} +1 -1
  21. package/dist/{chunk-OHJQRDST.js → chunk-TNCDVE5O.js} +1 -1
  22. package/dist/{chunk-BHL4JSGM.js → chunk-TZ3YMCDM.js} +8 -1
  23. package/dist/{chunk-Y2KTBACQ.js → chunk-U4FUFBSH.js} +1 -1
  24. package/dist/{chunk-IWLQQ5S5.js → chunk-YB5ACBZE.js} +7 -7
  25. package/dist/{chunk-COERZX63.js → chunk-ZX45XGDJ.js} +2 -2
  26. package/dist/cli/index.js +6 -6
  27. package/dist/cli.cjs +25 -4
  28. package/dist/cli.js +6 -6
  29. package/dist/engine-harness.cjs +25 -4
  30. package/dist/engine-harness.js +5 -5
  31. package/dist/index.cjs +25 -4
  32. package/dist/index.js +6 -6
  33. package/dist/openclaw.js +4 -4
  34. package/dist/proof-run-core.cjs +12 -0
  35. package/dist/proof-run-core.js +1 -1
  36. package/dist/{proof-run-engine-CSSc0mNn.d.ts → proof-run-engine-DxWW1VX1.d.ts} +3 -3
  37. package/dist/{proof-run-engine-HSRpUeBi.d.cts → proof-run-engine-Rkd_hXB-.d.cts} +3 -3
  38. package/dist/proof-run-engine.cjs +19 -0
  39. package/dist/proof-run-engine.d.cts +1 -1
  40. package/dist/proof-run-engine.d.ts +1 -1
  41. package/dist/proof-run-engine.js +2 -2
  42. package/dist/run-card.js +2 -2
  43. package/dist/runner.js +5 -5
  44. package/dist/spec/checkpoint.cjs +3 -1
  45. package/dist/spec/checkpoint.js +1 -1
  46. package/dist/spec/index.cjs +3 -1
  47. package/dist/spec/index.js +3 -3
  48. package/dist/spec/run-card.js +2 -2
  49. package/dist/spec/state.js +3 -3
  50. package/dist/state.js +3 -3
  51. package/dist/types.d.cts +1 -0
  52. package/dist/types.d.ts +1 -0
  53. package/package.json +1 -1
  54. package/runtime/lib/author.py +32 -0
  55. package/runtime/lib/setup.py +3 -0
  56. package/runtime/lib/verify.py +247 -8
  57. package/runtime/pipelines/riddle-proof-author.lobster +2 -1
  58. package/runtime/pipelines/riddle-proof-implement.lobster +2 -1
  59. package/runtime/pipelines/riddle-proof-recon.lobster +2 -1
  60. package/runtime/pipelines/riddle-proof-setup.lobster +4 -2
  61. package/runtime/pipelines/riddle-proof-ship.lobster +2 -1
  62. package/runtime/pipelines/riddle-proof-verify.lobster +2 -1
  63. package/runtime/tests/recon_verify_smoke.py +306 -8
package/dist/cli.cjs CHANGED
@@ -645,6 +645,12 @@ function mergeStateFromParams(statePath, params) {
645
645
  if (parsed?.baseline_understanding_used && typeof parsed.baseline_understanding_used === "object") {
646
646
  state.author_baseline_understanding_used = parsed.baseline_understanding_used;
647
647
  }
648
+ if (parsed?.interaction_contract && typeof parsed.interaction_contract === "object") {
649
+ state.interaction_contract = parsed.interaction_contract;
650
+ }
651
+ if (parsed?.proof_contract && typeof parsed.proof_contract === "object") {
652
+ state.proof_contract = parsed.proof_contract;
653
+ }
648
654
  const refined = parsed?.refined_inputs || {};
649
655
  if (typeof refined?.server_path === "string") {
650
656
  state.server_path = normalizeOptionalString(refined.server_path) || "";
@@ -652,6 +658,12 @@ function mergeStateFromParams(statePath, params) {
652
658
  }
653
659
  if (typeof refined?.wait_for_selector === "string") state.wait_for_selector = normalizeOptionalString(refined.wait_for_selector) || "";
654
660
  if (typeof refined?.reference === "string" && refined.reference.trim()) state.reference = refined.reference.trim();
661
+ if (typeof refined?.expected_terminal_path === "string") {
662
+ state.expected_terminal_path = normalizeOptionalString(refined.expected_terminal_path) || "";
663
+ }
664
+ if (typeof parsed?.expected_terminal_path === "string") {
665
+ state.expected_terminal_path = normalizeOptionalString(parsed.expected_terminal_path) || "";
666
+ }
655
667
  if (typeof parsed?.confidence === "string") state.supervisor_author_confidence = normalizeOptionalString(parsed.confidence) || null;
656
668
  if (parsed?.rationale !== void 0) state.supervisor_author_rationale = parsed.rationale;
657
669
  if (typeof parsed?.summary === "string") state.supervisor_author_summary = normalizeOptionalString(parsed.summary) || null;
@@ -1659,6 +1671,13 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1659
1671
  const args = step === "setup" ? buildSetupArgs(params, config) : {};
1660
1672
  const stepWorkflowFile = workflowFile(config.riddleProofDir, step);
1661
1673
  const timer = beginRuntimeStep(config.statePath, action, step, stepWorkflowFile);
1674
+ if (!(0, import_node_fs2.existsSync)(stepWorkflowFile)) {
1675
+ return finishRuntimeStep(config.statePath, action, {
1676
+ ok: false,
1677
+ step,
1678
+ error: `Riddle Proof workflow file missing for ${step}: ${stepWorkflowFile}`
1679
+ }, timer);
1680
+ }
1662
1681
  let output;
1663
1682
  try {
1664
1683
  if (step === "setup") {
@@ -3850,12 +3869,14 @@ function proofContractFromAuthorCheckpointResponse(response, packet, payload) {
3850
3869
  capture_script: nonEmptyString(payload.capture_script),
3851
3870
  artifact_contract: jsonCloneRecord(payload.artifact_contract),
3852
3871
  assertions: jsonCloneValue(payload.assertions),
3872
+ interaction_contract: jsonCloneRecord(payload.interaction_contract) || jsonCloneRecord(payload.interactionContract),
3853
3873
  baseline_understanding: jsonCloneRecord(payload.baseline_understanding) || jsonCloneRecord(payload.recon_baseline_understanding) || jsonCloneRecord(packet.state_excerpt?.recon_baseline_understanding),
3854
3874
  route_assumptions: compactRecord({
3855
3875
  server_path: nonEmptyString(refinedInputs.server_path) || nonEmptyString(payload.server_path) || nonEmptyString(packet.state_excerpt?.server_path),
3856
3876
  wait_for_selector: nonEmptyString(refinedInputs.wait_for_selector) || nonEmptyString(payload.wait_for_selector) || nonEmptyString(packet.state_excerpt?.wait_for_selector),
3857
3877
  reference: nonEmptyString(refinedInputs.reference) || nonEmptyString(payload.reference),
3858
- expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path)
3878
+ expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path),
3879
+ expected_terminal_path: nonEmptyString(refinedInputs.expected_terminal_path) || nonEmptyString(payload.expected_terminal_path) || nonEmptyString(refinedInputs.expected_after_path) || nonEmptyString(payload.expected_after_path)
3859
3880
  }),
3860
3881
  stop_condition: nonEmptyString(payload.stop_condition),
3861
3882
  rationale: jsonCloneValue(payload.rationale),
@@ -5320,7 +5341,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5320
5341
  return { next: { ...baseContinuation(result), ship_after_verify: true } };
5321
5342
  }
5322
5343
  return {
5323
- terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof is ready to ship.", {
5344
+ terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.", {
5324
5345
  ship_held: true
5325
5346
  })
5326
5347
  };
@@ -5543,7 +5564,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5543
5564
  state,
5544
5565
  "ready_to_ship",
5545
5566
  result,
5546
- assessment.summary || result.summary || "Riddle Proof is ready to ship.",
5567
+ assessment.summary || result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
5547
5568
  {
5548
5569
  ship_held: true,
5549
5570
  proof_assessment: payload
@@ -5562,7 +5583,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5562
5583
  if (next) {
5563
5584
  if (String(next.advance_stage || "") === "ship" && effectiveShipMode(request, input.config) !== "ship") {
5564
5585
  return {
5565
- terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof is ready to ship.", {
5586
+ terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.", {
5566
5587
  ship_held: true
5567
5588
  })
5568
5589
  };
package/dist/cli.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-VZD5LH7U.js";
2
+ import "./chunk-OIFHYMHP.js";
3
3
  import "./chunk-PEWAIEER.js";
4
4
  import "./chunk-TWTEUS7R.js";
5
- import "./chunk-IWLQQ5S5.js";
6
- import "./chunk-OHJQRDST.js";
7
- import "./chunk-Y2KTBACQ.js";
8
- import "./chunk-TJ63IE65.js";
9
- import "./chunk-2CFVREFI.js";
5
+ import "./chunk-YB5ACBZE.js";
6
+ import "./chunk-TNCDVE5O.js";
7
+ import "./chunk-U4FUFBSH.js";
8
+ import "./chunk-RV6LK7HU.js";
9
+ import "./chunk-SKIAZTQ7.js";
10
10
  import "./chunk-JFQXAJH2.js";
11
11
  import "./chunk-7F5LNUGR.js";
12
12
  import "./chunk-VY4Y5U57.js";
@@ -645,6 +645,12 @@ function mergeStateFromParams(statePath, params) {
645
645
  if (parsed?.baseline_understanding_used && typeof parsed.baseline_understanding_used === "object") {
646
646
  state.author_baseline_understanding_used = parsed.baseline_understanding_used;
647
647
  }
648
+ if (parsed?.interaction_contract && typeof parsed.interaction_contract === "object") {
649
+ state.interaction_contract = parsed.interaction_contract;
650
+ }
651
+ if (parsed?.proof_contract && typeof parsed.proof_contract === "object") {
652
+ state.proof_contract = parsed.proof_contract;
653
+ }
648
654
  const refined = parsed?.refined_inputs || {};
649
655
  if (typeof refined?.server_path === "string") {
650
656
  state.server_path = normalizeOptionalString(refined.server_path) || "";
@@ -652,6 +658,12 @@ function mergeStateFromParams(statePath, params) {
652
658
  }
653
659
  if (typeof refined?.wait_for_selector === "string") state.wait_for_selector = normalizeOptionalString(refined.wait_for_selector) || "";
654
660
  if (typeof refined?.reference === "string" && refined.reference.trim()) state.reference = refined.reference.trim();
661
+ if (typeof refined?.expected_terminal_path === "string") {
662
+ state.expected_terminal_path = normalizeOptionalString(refined.expected_terminal_path) || "";
663
+ }
664
+ if (typeof parsed?.expected_terminal_path === "string") {
665
+ state.expected_terminal_path = normalizeOptionalString(parsed.expected_terminal_path) || "";
666
+ }
655
667
  if (typeof parsed?.confidence === "string") state.supervisor_author_confidence = normalizeOptionalString(parsed.confidence) || null;
656
668
  if (parsed?.rationale !== void 0) state.supervisor_author_rationale = parsed.rationale;
657
669
  if (typeof parsed?.summary === "string") state.supervisor_author_summary = normalizeOptionalString(parsed.summary) || null;
@@ -1659,6 +1671,13 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1659
1671
  const args = step === "setup" ? buildSetupArgs(params, config) : {};
1660
1672
  const stepWorkflowFile = workflowFile(config.riddleProofDir, step);
1661
1673
  const timer = beginRuntimeStep(config.statePath, action, step, stepWorkflowFile);
1674
+ if (!(0, import_node_fs2.existsSync)(stepWorkflowFile)) {
1675
+ return finishRuntimeStep(config.statePath, action, {
1676
+ ok: false,
1677
+ step,
1678
+ error: `Riddle Proof workflow file missing for ${step}: ${stepWorkflowFile}`
1679
+ }, timer);
1680
+ }
1662
1681
  let output;
1663
1682
  try {
1664
1683
  if (step === "setup") {
@@ -3779,12 +3798,14 @@ function proofContractFromAuthorCheckpointResponse(response, packet, payload) {
3779
3798
  capture_script: nonEmptyString(payload.capture_script),
3780
3799
  artifact_contract: jsonCloneRecord(payload.artifact_contract),
3781
3800
  assertions: jsonCloneValue(payload.assertions),
3801
+ interaction_contract: jsonCloneRecord(payload.interaction_contract) || jsonCloneRecord(payload.interactionContract),
3782
3802
  baseline_understanding: jsonCloneRecord(payload.baseline_understanding) || jsonCloneRecord(payload.recon_baseline_understanding) || jsonCloneRecord(packet.state_excerpt?.recon_baseline_understanding),
3783
3803
  route_assumptions: compactRecord({
3784
3804
  server_path: nonEmptyString(refinedInputs.server_path) || nonEmptyString(payload.server_path) || nonEmptyString(packet.state_excerpt?.server_path),
3785
3805
  wait_for_selector: nonEmptyString(refinedInputs.wait_for_selector) || nonEmptyString(payload.wait_for_selector) || nonEmptyString(packet.state_excerpt?.wait_for_selector),
3786
3806
  reference: nonEmptyString(refinedInputs.reference) || nonEmptyString(payload.reference),
3787
- expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path)
3807
+ expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path),
3808
+ expected_terminal_path: nonEmptyString(refinedInputs.expected_terminal_path) || nonEmptyString(payload.expected_terminal_path) || nonEmptyString(refinedInputs.expected_after_path) || nonEmptyString(payload.expected_after_path)
3788
3809
  }),
3789
3810
  stop_condition: nonEmptyString(payload.stop_condition),
3790
3811
  rationale: jsonCloneValue(payload.rationale),
@@ -5249,7 +5270,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5249
5270
  return { next: { ...baseContinuation(result), ship_after_verify: true } };
5250
5271
  }
5251
5272
  return {
5252
- terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof is ready to ship.", {
5273
+ terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.", {
5253
5274
  ship_held: true
5254
5275
  })
5255
5276
  };
@@ -5472,7 +5493,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5472
5493
  state,
5473
5494
  "ready_to_ship",
5474
5495
  result,
5475
- assessment.summary || result.summary || "Riddle Proof is ready to ship.",
5496
+ assessment.summary || result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
5476
5497
  {
5477
5498
  ship_held: true,
5478
5499
  proof_assessment: payload
@@ -5491,7 +5512,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5491
5512
  if (next) {
5492
5513
  if (String(next.advance_stage || "") === "ship" && effectiveShipMode(request, input.config) !== "ship") {
5493
5514
  return {
5494
- terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof is ready to ship.", {
5515
+ terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.", {
5495
5516
  ship_held: true
5496
5517
  })
5497
5518
  };
@@ -2,11 +2,11 @@ import {
2
2
  createDisabledRiddleProofAgentAdapter,
3
3
  readRiddleProofRunStatus,
4
4
  runRiddleProofEngineHarness
5
- } from "./chunk-IWLQQ5S5.js";
6
- import "./chunk-OHJQRDST.js";
7
- import "./chunk-Y2KTBACQ.js";
8
- import "./chunk-TJ63IE65.js";
9
- import "./chunk-2CFVREFI.js";
5
+ } from "./chunk-YB5ACBZE.js";
6
+ import "./chunk-TNCDVE5O.js";
7
+ import "./chunk-U4FUFBSH.js";
8
+ import "./chunk-RV6LK7HU.js";
9
+ import "./chunk-SKIAZTQ7.js";
10
10
  import "./chunk-VY4Y5U57.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
  export {
package/dist/index.cjs CHANGED
@@ -645,6 +645,12 @@ function mergeStateFromParams(statePath, params) {
645
645
  if (parsed?.baseline_understanding_used && typeof parsed.baseline_understanding_used === "object") {
646
646
  state.author_baseline_understanding_used = parsed.baseline_understanding_used;
647
647
  }
648
+ if (parsed?.interaction_contract && typeof parsed.interaction_contract === "object") {
649
+ state.interaction_contract = parsed.interaction_contract;
650
+ }
651
+ if (parsed?.proof_contract && typeof parsed.proof_contract === "object") {
652
+ state.proof_contract = parsed.proof_contract;
653
+ }
648
654
  const refined = parsed?.refined_inputs || {};
649
655
  if (typeof refined?.server_path === "string") {
650
656
  state.server_path = normalizeOptionalString(refined.server_path) || "";
@@ -652,6 +658,12 @@ function mergeStateFromParams(statePath, params) {
652
658
  }
653
659
  if (typeof refined?.wait_for_selector === "string") state.wait_for_selector = normalizeOptionalString(refined.wait_for_selector) || "";
654
660
  if (typeof refined?.reference === "string" && refined.reference.trim()) state.reference = refined.reference.trim();
661
+ if (typeof refined?.expected_terminal_path === "string") {
662
+ state.expected_terminal_path = normalizeOptionalString(refined.expected_terminal_path) || "";
663
+ }
664
+ if (typeof parsed?.expected_terminal_path === "string") {
665
+ state.expected_terminal_path = normalizeOptionalString(parsed.expected_terminal_path) || "";
666
+ }
655
667
  if (typeof parsed?.confidence === "string") state.supervisor_author_confidence = normalizeOptionalString(parsed.confidence) || null;
656
668
  if (parsed?.rationale !== void 0) state.supervisor_author_rationale = parsed.rationale;
657
669
  if (typeof parsed?.summary === "string") state.supervisor_author_summary = normalizeOptionalString(parsed.summary) || null;
@@ -1659,6 +1671,13 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1659
1671
  const args = step === "setup" ? buildSetupArgs(params, config) : {};
1660
1672
  const stepWorkflowFile = workflowFile(config.riddleProofDir, step);
1661
1673
  const timer = beginRuntimeStep(config.statePath, action, step, stepWorkflowFile);
1674
+ if (!(0, import_node_fs2.existsSync)(stepWorkflowFile)) {
1675
+ return finishRuntimeStep(config.statePath, action, {
1676
+ ok: false,
1677
+ step,
1678
+ error: `Riddle Proof workflow file missing for ${step}: ${stepWorkflowFile}`
1679
+ }, timer);
1680
+ }
1662
1681
  let output;
1663
1682
  try {
1664
1683
  if (step === "setup") {
@@ -3967,12 +3986,14 @@ function proofContractFromAuthorCheckpointResponse(response, packet, payload) {
3967
3986
  capture_script: nonEmptyString(payload.capture_script),
3968
3987
  artifact_contract: jsonCloneRecord(payload.artifact_contract),
3969
3988
  assertions: jsonCloneValue(payload.assertions),
3989
+ interaction_contract: jsonCloneRecord(payload.interaction_contract) || jsonCloneRecord(payload.interactionContract),
3970
3990
  baseline_understanding: jsonCloneRecord(payload.baseline_understanding) || jsonCloneRecord(payload.recon_baseline_understanding) || jsonCloneRecord(packet.state_excerpt?.recon_baseline_understanding),
3971
3991
  route_assumptions: compactRecord({
3972
3992
  server_path: nonEmptyString(refinedInputs.server_path) || nonEmptyString(payload.server_path) || nonEmptyString(packet.state_excerpt?.server_path),
3973
3993
  wait_for_selector: nonEmptyString(refinedInputs.wait_for_selector) || nonEmptyString(payload.wait_for_selector) || nonEmptyString(packet.state_excerpt?.wait_for_selector),
3974
3994
  reference: nonEmptyString(refinedInputs.reference) || nonEmptyString(payload.reference),
3975
- expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path)
3995
+ expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path),
3996
+ expected_terminal_path: nonEmptyString(refinedInputs.expected_terminal_path) || nonEmptyString(payload.expected_terminal_path) || nonEmptyString(refinedInputs.expected_after_path) || nonEmptyString(payload.expected_after_path)
3976
3997
  }),
3977
3998
  stop_condition: nonEmptyString(payload.stop_condition),
3978
3999
  rationale: jsonCloneValue(payload.rationale),
@@ -5983,7 +6004,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
5983
6004
  return { next: { ...baseContinuation(result), ship_after_verify: true } };
5984
6005
  }
5985
6006
  return {
5986
- terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof is ready to ship.", {
6007
+ terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.", {
5987
6008
  ship_held: true
5988
6009
  })
5989
6010
  };
@@ -6206,7 +6227,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
6206
6227
  state,
6207
6228
  "ready_to_ship",
6208
6229
  result,
6209
- assessment.summary || result.summary || "Riddle Proof is ready to ship.",
6230
+ assessment.summary || result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.",
6210
6231
  {
6211
6232
  ship_held: true,
6212
6233
  proof_assessment: payload
@@ -6225,7 +6246,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
6225
6246
  if (next) {
6226
6247
  if (String(next.advance_stage || "") === "ship" && effectiveShipMode(request, input.config) !== "ship") {
6227
6248
  return {
6228
- terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof is ready to ship.", {
6249
+ terminal: terminalResult(state, "ready_to_ship", result, result.summary || "Riddle Proof evidence is approved, but ship_mode=none is holding before PR/ship.", {
6229
6250
  ship_held: true
6230
6251
  })
6231
6252
  };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-COERZX63.js";
3
+ } from "./chunk-ZX45XGDJ.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-IWLQQ5S5.js";
98
+ } from "./chunk-YB5ACBZE.js";
99
99
  import {
100
100
  RIDDLE_PROOF_RUN_STATE_VERSION,
101
101
  appendRunEvent,
@@ -107,12 +107,12 @@ import {
107
107
  normalizePrLifecycleState,
108
108
  normalizeRunParams,
109
109
  setRunStatus
110
- } from "./chunk-OHJQRDST.js";
110
+ } from "./chunk-TNCDVE5O.js";
111
111
  import {
112
112
  RIDDLE_PROOF_RUN_CARD_VERSION,
113
113
  createRiddleProofRunCard
114
- } from "./chunk-Y2KTBACQ.js";
115
- import "./chunk-TJ63IE65.js";
114
+ } from "./chunk-U4FUFBSH.js";
115
+ import "./chunk-RV6LK7HU.js";
116
116
  import {
117
117
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
118
118
  RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
@@ -128,7 +128,7 @@ import {
128
128
  normalizeCheckpointResponse,
129
129
  proofContractFromAuthorCheckpointResponse,
130
130
  statePathsForRunState
131
- } from "./chunk-2CFVREFI.js";
131
+ } from "./chunk-SKIAZTQ7.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-BTN76IGW.js";
7
- import "./chunk-OHJQRDST.js";
8
- import "./chunk-Y2KTBACQ.js";
9
- import "./chunk-2CFVREFI.js";
6
+ } from "./chunk-SMBZT46I.js";
7
+ import "./chunk-TNCDVE5O.js";
8
+ import "./chunk-U4FUFBSH.js";
9
+ import "./chunk-SKIAZTQ7.js";
10
10
  import "./chunk-VY4Y5U57.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
  export {
@@ -866,6 +866,12 @@ function mergeStateFromParams(statePath, params) {
866
866
  if (parsed?.baseline_understanding_used && typeof parsed.baseline_understanding_used === "object") {
867
867
  state.author_baseline_understanding_used = parsed.baseline_understanding_used;
868
868
  }
869
+ if (parsed?.interaction_contract && typeof parsed.interaction_contract === "object") {
870
+ state.interaction_contract = parsed.interaction_contract;
871
+ }
872
+ if (parsed?.proof_contract && typeof parsed.proof_contract === "object") {
873
+ state.proof_contract = parsed.proof_contract;
874
+ }
869
875
  const refined = parsed?.refined_inputs || {};
870
876
  if (typeof refined?.server_path === "string") {
871
877
  state.server_path = normalizeOptionalString(refined.server_path) || "";
@@ -873,6 +879,12 @@ function mergeStateFromParams(statePath, params) {
873
879
  }
874
880
  if (typeof refined?.wait_for_selector === "string") state.wait_for_selector = normalizeOptionalString(refined.wait_for_selector) || "";
875
881
  if (typeof refined?.reference === "string" && refined.reference.trim()) state.reference = refined.reference.trim();
882
+ if (typeof refined?.expected_terminal_path === "string") {
883
+ state.expected_terminal_path = normalizeOptionalString(refined.expected_terminal_path) || "";
884
+ }
885
+ if (typeof parsed?.expected_terminal_path === "string") {
886
+ state.expected_terminal_path = normalizeOptionalString(parsed.expected_terminal_path) || "";
887
+ }
876
888
  if (typeof parsed?.confidence === "string") state.supervisor_author_confidence = normalizeOptionalString(parsed.confidence) || null;
877
889
  if (parsed?.rationale !== void 0) state.supervisor_author_rationale = parsed.rationale;
878
890
  if (typeof parsed?.summary === "string") state.supervisor_author_summary = normalizeOptionalString(parsed.summary) || null;
@@ -26,7 +26,7 @@ import {
26
26
  visualDeltaShipGateReason,
27
27
  workflowFile,
28
28
  writeState
29
- } from "./chunk-TJ63IE65.js";
29
+ } from "./chunk-RV6LK7HU.js";
30
30
  import "./chunk-MLKGABMK.js";
31
31
  export {
32
32
  BUNDLED_RIDDLE_PROOF_DIR,
@@ -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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "recon" | "author" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "recon" | "author" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "recon" | "author" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "recon" | "author" | "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: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -846,6 +846,12 @@ function mergeStateFromParams(statePath, params) {
846
846
  if (parsed?.baseline_understanding_used && typeof parsed.baseline_understanding_used === "object") {
847
847
  state.author_baseline_understanding_used = parsed.baseline_understanding_used;
848
848
  }
849
+ if (parsed?.interaction_contract && typeof parsed.interaction_contract === "object") {
850
+ state.interaction_contract = parsed.interaction_contract;
851
+ }
852
+ if (parsed?.proof_contract && typeof parsed.proof_contract === "object") {
853
+ state.proof_contract = parsed.proof_contract;
854
+ }
849
855
  const refined = parsed?.refined_inputs || {};
850
856
  if (typeof refined?.server_path === "string") {
851
857
  state.server_path = normalizeOptionalString(refined.server_path) || "";
@@ -853,6 +859,12 @@ function mergeStateFromParams(statePath, params) {
853
859
  }
854
860
  if (typeof refined?.wait_for_selector === "string") state.wait_for_selector = normalizeOptionalString(refined.wait_for_selector) || "";
855
861
  if (typeof refined?.reference === "string" && refined.reference.trim()) state.reference = refined.reference.trim();
862
+ if (typeof refined?.expected_terminal_path === "string") {
863
+ state.expected_terminal_path = normalizeOptionalString(refined.expected_terminal_path) || "";
864
+ }
865
+ if (typeof parsed?.expected_terminal_path === "string") {
866
+ state.expected_terminal_path = normalizeOptionalString(parsed.expected_terminal_path) || "";
867
+ }
856
868
  if (typeof parsed?.confidence === "string") state.supervisor_author_confidence = normalizeOptionalString(parsed.confidence) || null;
857
869
  if (parsed?.rationale !== void 0) state.supervisor_author_rationale = parsed.rationale;
858
870
  if (typeof parsed?.summary === "string") state.supervisor_author_summary = normalizeOptionalString(parsed.summary) || null;
@@ -1657,6 +1669,13 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
1657
1669
  const args = step === "setup" ? buildSetupArgs(params, config) : {};
1658
1670
  const stepWorkflowFile = workflowFile(config.riddleProofDir, step);
1659
1671
  const timer = beginRuntimeStep(config.statePath, action, step, stepWorkflowFile);
1672
+ if (!(0, import_node_fs2.existsSync)(stepWorkflowFile)) {
1673
+ return finishRuntimeStep(config.statePath, action, {
1674
+ ok: false,
1675
+ step,
1676
+ error: `Riddle Proof workflow file missing for ${step}: ${stepWorkflowFile}`
1677
+ }, timer);
1678
+ }
1660
1679
  let output;
1661
1680
  try {
1662
1681
  if (step === "setup") {
@@ -1,2 +1,2 @@
1
1
  import './proof-run-core-CE0jx7wL.cjs';
2
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-HSRpUeBi.cjs';
2
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-Rkd_hXB-.cjs';
@@ -1,2 +1,2 @@
1
1
  import './proof-run-core-CE0jx7wL.js';
2
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-CSSc0mNn.js';
2
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-DxWW1VX1.js';
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createRiddleProofEngine,
3
3
  executeWorkflow
4
- } from "./chunk-BHL4JSGM.js";
5
- import "./chunk-TJ63IE65.js";
4
+ } from "./chunk-TZ3YMCDM.js";
5
+ import "./chunk-RV6LK7HU.js";
6
6
  import "./chunk-MLKGABMK.js";
7
7
  export {
8
8
  createRiddleProofEngine,
package/dist/run-card.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  RIDDLE_PROOF_RUN_CARD_VERSION,
3
3
  createRiddleProofRunCard
4
- } from "./chunk-Y2KTBACQ.js";
5
- import "./chunk-2CFVREFI.js";
4
+ } from "./chunk-U4FUFBSH.js";
5
+ import "./chunk-SKIAZTQ7.js";
6
6
  import "./chunk-VY4Y5U57.js";
7
7
  import "./chunk-MLKGABMK.js";
8
8
  export {
package/dist/runner.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-COERZX63.js";
4
- import "./chunk-OHJQRDST.js";
5
- import "./chunk-Y2KTBACQ.js";
6
- import "./chunk-TJ63IE65.js";
7
- import "./chunk-2CFVREFI.js";
3
+ } from "./chunk-ZX45XGDJ.js";
4
+ import "./chunk-TNCDVE5O.js";
5
+ import "./chunk-U4FUFBSH.js";
6
+ import "./chunk-RV6LK7HU.js";
7
+ import "./chunk-SKIAZTQ7.js";
8
8
  import "./chunk-VY4Y5U57.js";
9
9
  import "./chunk-MLKGABMK.js";
10
10
  export {
@@ -774,12 +774,14 @@ function proofContractFromAuthorCheckpointResponse(response, packet, payload) {
774
774
  capture_script: nonEmptyString(payload.capture_script),
775
775
  artifact_contract: jsonCloneRecord(payload.artifact_contract),
776
776
  assertions: jsonCloneValue(payload.assertions),
777
+ interaction_contract: jsonCloneRecord(payload.interaction_contract) || jsonCloneRecord(payload.interactionContract),
777
778
  baseline_understanding: jsonCloneRecord(payload.baseline_understanding) || jsonCloneRecord(payload.recon_baseline_understanding) || jsonCloneRecord(packet.state_excerpt?.recon_baseline_understanding),
778
779
  route_assumptions: compactRecord({
779
780
  server_path: nonEmptyString(refinedInputs.server_path) || nonEmptyString(payload.server_path) || nonEmptyString(packet.state_excerpt?.server_path),
780
781
  wait_for_selector: nonEmptyString(refinedInputs.wait_for_selector) || nonEmptyString(payload.wait_for_selector) || nonEmptyString(packet.state_excerpt?.wait_for_selector),
781
782
  reference: nonEmptyString(refinedInputs.reference) || nonEmptyString(payload.reference),
782
- expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path)
783
+ expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path),
784
+ expected_terminal_path: nonEmptyString(refinedInputs.expected_terminal_path) || nonEmptyString(payload.expected_terminal_path) || nonEmptyString(refinedInputs.expected_after_path) || nonEmptyString(payload.expected_after_path)
783
785
  }),
784
786
  stop_condition: nonEmptyString(payload.stop_condition),
785
787
  rationale: jsonCloneValue(payload.rationale),
@@ -13,7 +13,7 @@ import {
13
13
  normalizeCheckpointResponse,
14
14
  proofContractFromAuthorCheckpointResponse,
15
15
  statePathsForRunState
16
- } from "../chunk-2CFVREFI.js";
16
+ } from "../chunk-SKIAZTQ7.js";
17
17
  import "../chunk-VY4Y5U57.js";
18
18
  import "../chunk-MLKGABMK.js";
19
19
  export {
@@ -997,12 +997,14 @@ function proofContractFromAuthorCheckpointResponse(response, packet, payload) {
997
997
  capture_script: nonEmptyString(payload.capture_script),
998
998
  artifact_contract: jsonCloneRecord(payload.artifact_contract),
999
999
  assertions: jsonCloneValue(payload.assertions),
1000
+ interaction_contract: jsonCloneRecord(payload.interaction_contract) || jsonCloneRecord(payload.interactionContract),
1000
1001
  baseline_understanding: jsonCloneRecord(payload.baseline_understanding) || jsonCloneRecord(payload.recon_baseline_understanding) || jsonCloneRecord(packet.state_excerpt?.recon_baseline_understanding),
1001
1002
  route_assumptions: compactRecord({
1002
1003
  server_path: nonEmptyString(refinedInputs.server_path) || nonEmptyString(payload.server_path) || nonEmptyString(packet.state_excerpt?.server_path),
1003
1004
  wait_for_selector: nonEmptyString(refinedInputs.wait_for_selector) || nonEmptyString(payload.wait_for_selector) || nonEmptyString(packet.state_excerpt?.wait_for_selector),
1004
1005
  reference: nonEmptyString(refinedInputs.reference) || nonEmptyString(payload.reference),
1005
- expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path)
1006
+ expected_path: nonEmptyString(payload.expected_path) || nonEmptyString(refinedInputs.expected_path),
1007
+ expected_terminal_path: nonEmptyString(refinedInputs.expected_terminal_path) || nonEmptyString(payload.expected_terminal_path) || nonEmptyString(refinedInputs.expected_after_path) || nonEmptyString(payload.expected_after_path)
1006
1008
  }),
1007
1009
  stop_condition: nonEmptyString(payload.stop_condition),
1008
1010
  rationale: jsonCloneValue(payload.rationale),
@@ -10,11 +10,11 @@ import {
10
10
  normalizePrLifecycleState,
11
11
  normalizeRunParams,
12
12
  setRunStatus
13
- } from "../chunk-OHJQRDST.js";
13
+ } from "../chunk-TNCDVE5O.js";
14
14
  import {
15
15
  RIDDLE_PROOF_RUN_CARD_VERSION,
16
16
  createRiddleProofRunCard
17
- } from "../chunk-Y2KTBACQ.js";
17
+ } from "../chunk-U4FUFBSH.js";
18
18
  import {
19
19
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
20
20
  RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
@@ -30,7 +30,7 @@ import {
30
30
  normalizeCheckpointResponse,
31
31
  proofContractFromAuthorCheckpointResponse,
32
32
  statePathsForRunState
33
- } from "../chunk-2CFVREFI.js";
33
+ } from "../chunk-SKIAZTQ7.js";
34
34
  import {
35
35
  applyTerminalMetadata,
36
36
  compactRecord,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  RIDDLE_PROOF_RUN_CARD_VERSION,
3
3
  createRiddleProofRunCard
4
- } from "../chunk-Y2KTBACQ.js";
5
- import "../chunk-2CFVREFI.js";
4
+ } from "../chunk-U4FUFBSH.js";
5
+ import "../chunk-SKIAZTQ7.js";
6
6
  import "../chunk-VY4Y5U57.js";
7
7
  import "../chunk-MLKGABMK.js";
8
8
  export {
@@ -9,9 +9,9 @@ import {
9
9
  normalizePrLifecycleState,
10
10
  normalizeRunParams,
11
11
  setRunStatus
12
- } from "../chunk-OHJQRDST.js";
13
- import "../chunk-Y2KTBACQ.js";
14
- import "../chunk-2CFVREFI.js";
12
+ } from "../chunk-TNCDVE5O.js";
13
+ import "../chunk-U4FUFBSH.js";
14
+ import "../chunk-SKIAZTQ7.js";
15
15
  import "../chunk-VY4Y5U57.js";
16
16
  import "../chunk-MLKGABMK.js";
17
17
  export {
package/dist/state.js CHANGED
@@ -9,9 +9,9 @@ import {
9
9
  normalizePrLifecycleState,
10
10
  normalizeRunParams,
11
11
  setRunStatus
12
- } from "./chunk-OHJQRDST.js";
13
- import "./chunk-Y2KTBACQ.js";
14
- import "./chunk-2CFVREFI.js";
12
+ } from "./chunk-TNCDVE5O.js";
13
+ import "./chunk-U4FUFBSH.js";
14
+ import "./chunk-SKIAZTQ7.js";
15
15
  import "./chunk-VY4Y5U57.js";
16
16
  import "./chunk-MLKGABMK.js";
17
17
  export {