@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.
- package/dist/adapters/openclaw.js +4 -4
- package/dist/advanced/engine-harness.cjs +33 -11
- package/dist/advanced/engine-harness.js +4 -4
- package/dist/advanced/index.cjs +33 -11
- package/dist/advanced/index.d.cts +1 -1
- package/dist/advanced/index.d.ts +1 -1
- package/dist/advanced/index.js +6 -6
- package/dist/advanced/proof-run-engine.cjs +28 -8
- package/dist/advanced/proof-run-engine.d.cts +1 -1
- package/dist/advanced/proof-run-engine.d.ts +1 -1
- package/dist/advanced/proof-run-engine.js +1 -1
- package/dist/advanced/runner.js +4 -4
- package/dist/checkpoint.cjs +3 -1
- package/dist/checkpoint.js +1 -1
- package/dist/{chunk-SKIAZTQ7.js → chunk-4FOHZ7JG.js} +3 -1
- package/dist/{chunk-U4FUFBSH.js → chunk-FMOYUYH2.js} +1 -1
- package/dist/{chunk-YB5ACBZE.js → chunk-IP64JLLR.js} +5 -5
- package/dist/{chunk-OIFHYMHP.js → chunk-LZFCIHDT.js} +2 -2
- package/dist/{chunk-TZ3YMCDM.js → chunk-P22V26PS.js} +28 -8
- package/dist/{chunk-SMBZT46I.js → chunk-RBWSCU6V.js} +1 -1
- package/dist/{chunk-ZX45XGDJ.js → chunk-UIJ7X63P.js} +1 -1
- package/dist/{chunk-TNCDVE5O.js → chunk-YZUVEJ5B.js} +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/cli.cjs +33 -11
- package/dist/cli.js +5 -5
- package/dist/engine-harness.cjs +33 -11
- package/dist/engine-harness.js +4 -4
- package/dist/index.cjs +33 -11
- package/dist/index.js +5 -5
- package/dist/openclaw.js +4 -4
- package/dist/{proof-run-engine-CVnboNHj.d.cts → proof-run-engine-B7DCPzpK.d.cts} +3 -3
- package/dist/{proof-run-engine-BVkeO-Yo.d.ts → proof-run-engine-BomAcXhA.d.ts} +3 -3
- package/dist/proof-run-engine.cjs +28 -8
- package/dist/proof-run-engine.d.cts +1 -1
- package/dist/proof-run-engine.d.ts +1 -1
- package/dist/proof-run-engine.js +1 -1
- package/dist/run-card.js +2 -2
- package/dist/runner.js +4 -4
- package/dist/spec/checkpoint.cjs +3 -1
- package/dist/spec/checkpoint.js +1 -1
- package/dist/spec/index.cjs +3 -1
- package/dist/spec/index.js +3 -3
- package/dist/spec/run-card.js +2 -2
- package/dist/spec/state.js +3 -3
- package/dist/state.js +3 -3
- package/package.json +1 -1
- package/runtime/lib/util.py +57 -0
- package/runtime/lib/verify.py +128 -5
- package/runtime/pipelines/riddle-proof-author.lobster +2 -1
- package/runtime/pipelines/riddle-proof-implement.lobster +2 -1
- package/runtime/pipelines/riddle-proof-recon.lobster +2 -1
- package/runtime/pipelines/riddle-proof-setup.lobster +4 -2
- package/runtime/pipelines/riddle-proof-ship.lobster +2 -1
- package/runtime/pipelines/riddle-proof-verify.lobster +2 -1
- package/runtime/tests/recon_verify_smoke.py +116 -0
package/dist/cli/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-LZFCIHDT.js";
|
|
2
2
|
import "../chunk-PEWAIEER.js";
|
|
3
3
|
import "../chunk-TWTEUS7R.js";
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
import "../chunk-IP64JLLR.js";
|
|
5
|
+
import "../chunk-YZUVEJ5B.js";
|
|
6
|
+
import "../chunk-FMOYUYH2.js";
|
|
7
7
|
import "../chunk-RV6LK7HU.js";
|
|
8
|
-
import "../chunk-
|
|
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
|
|
1930
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
1931
1931
|
return checkpoint(
|
|
1932
|
-
state?.active_checkpoint_stage ||
|
|
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:
|
|
1944
|
+
suggestedAdvanceStage: recommended2 || null
|
|
1945
1945
|
},
|
|
1946
|
-
suggestedAdvanceStage:
|
|
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
|
|
2259
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
2260
2260
|
const noImplementationMode = !implementationRequired(params, state);
|
|
2261
2261
|
return checkpoint(
|
|
2262
|
-
|
|
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:
|
|
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);
|
|
@@ -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
|
|
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-
|
|
2
|
+
import "./chunk-LZFCIHDT.js";
|
|
3
3
|
import "./chunk-PEWAIEER.js";
|
|
4
4
|
import "./chunk-TWTEUS7R.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-IP64JLLR.js";
|
|
6
|
+
import "./chunk-YZUVEJ5B.js";
|
|
7
|
+
import "./chunk-FMOYUYH2.js";
|
|
8
8
|
import "./chunk-RV6LK7HU.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-4FOHZ7JG.js";
|
|
10
10
|
import "./chunk-JFQXAJH2.js";
|
|
11
11
|
import "./chunk-7F5LNUGR.js";
|
|
12
12
|
import "./chunk-VY4Y5U57.js";
|
package/dist/engine-harness.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
|
|
1930
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
1931
1931
|
return checkpoint(
|
|
1932
|
-
state?.active_checkpoint_stage ||
|
|
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:
|
|
1944
|
+
suggestedAdvanceStage: recommended2 || null
|
|
1945
1945
|
},
|
|
1946
|
-
suggestedAdvanceStage:
|
|
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
|
|
2259
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
2260
2260
|
const noImplementationMode = !implementationRequired(params, state);
|
|
2261
2261
|
return checkpoint(
|
|
2262
|
-
|
|
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:
|
|
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);
|
|
@@ -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
|
|
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") {
|
package/dist/engine-harness.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-IP64JLLR.js";
|
|
6
|
+
import "./chunk-YZUVEJ5B.js";
|
|
7
|
+
import "./chunk-FMOYUYH2.js";
|
|
8
8
|
import "./chunk-RV6LK7HU.js";
|
|
9
|
-
import "./chunk-
|
|
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
|
|
1930
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
1931
1931
|
return checkpoint(
|
|
1932
|
-
state?.active_checkpoint_stage ||
|
|
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:
|
|
1944
|
+
suggestedAdvanceStage: recommended2 || null
|
|
1945
1945
|
},
|
|
1946
|
-
suggestedAdvanceStage:
|
|
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
|
|
2259
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
2260
2260
|
const noImplementationMode = !implementationRequired(params, state);
|
|
2261
2261
|
return checkpoint(
|
|
2262
|
-
|
|
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:
|
|
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);
|
|
@@ -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
|
|
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-
|
|
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-
|
|
98
|
+
} from "./chunk-IP64JLLR.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-
|
|
110
|
+
} from "./chunk-YZUVEJ5B.js";
|
|
111
111
|
import {
|
|
112
112
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
113
113
|
createRiddleProofRunCard
|
|
114
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -1925,9 +1925,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
|
|
|
1925
1925
|
state = readState(config.statePath);
|
|
1926
1926
|
const continuedStage = params.continue_from_checkpoint ? checkpointContinueStage(state) : null;
|
|
1927
1927
|
if (params.continue_from_checkpoint && !params.advance_stage && !continuedStage) {
|
|
1928
|
-
const
|
|
1928
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
1929
1929
|
return checkpoint(
|
|
1930
|
-
state?.active_checkpoint_stage ||
|
|
1930
|
+
state?.active_checkpoint_stage || recommended2 || "recon",
|
|
1931
1931
|
"continue_unavailable",
|
|
1932
1932
|
"This run call asked to continue from a checkpoint, but the current state has no resumable checkpoint. Inspect status or set advance_stage explicitly.",
|
|
1933
1933
|
{
|
|
@@ -1939,9 +1939,9 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
|
|
|
1939
1939
|
details: {
|
|
1940
1940
|
executed,
|
|
1941
1941
|
activeCheckpoint: state?.active_checkpoint || null,
|
|
1942
|
-
suggestedAdvanceStage:
|
|
1942
|
+
suggestedAdvanceStage: recommended2 || null
|
|
1943
1943
|
},
|
|
1944
|
-
suggestedAdvanceStage:
|
|
1944
|
+
suggestedAdvanceStage: recommended2 || null,
|
|
1945
1945
|
executed
|
|
1946
1946
|
}
|
|
1947
1947
|
);
|
|
@@ -2205,7 +2205,7 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
const noImplementationMode = !implementationRequired(params, state);
|
|
2207
2207
|
const authorNextStage = stageAfterAuthor(state, params);
|
|
2208
|
-
const explicitAuthorDebug = params.advance_stage === "author";
|
|
2208
|
+
const explicitAuthorDebug = params.advance_stage === "author" && !params.continue_from_checkpoint;
|
|
2209
2209
|
recordAttempt("author", "completed", "Author applied the supervising agent's proof packet to recon observations.", {
|
|
2210
2210
|
autoApproved: authorRes.autoApproved || false,
|
|
2211
2211
|
checkpoint: explicitAuthorDebug ? "author_review" : "author_auto_continue",
|
|
@@ -2254,16 +2254,16 @@ async function executeWorkflow(params, pluginConfig, resolvedConfig) {
|
|
|
2254
2254
|
state = readState(config.statePath);
|
|
2255
2255
|
}
|
|
2256
2256
|
if (!effectiveAdvanceStage) {
|
|
2257
|
-
const
|
|
2257
|
+
const recommended2 = recommendedAdvanceStage(state);
|
|
2258
2258
|
const noImplementationMode = !implementationRequired(params, state);
|
|
2259
2259
|
return checkpoint(
|
|
2260
|
-
|
|
2260
|
+
recommended2 || (noImplementationMode ? "verify" : "implement"),
|
|
2261
2261
|
"awaiting_stage_advance",
|
|
2262
2262
|
"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.",
|
|
2263
2263
|
{
|
|
2264
2264
|
nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
|
|
2265
2265
|
advanceOptions: noImplementationMode ? ["recon", "author", "verify", "ship"] : ["recon", "author", "implement", "verify", "ship"],
|
|
2266
|
-
recommendedAdvanceStage:
|
|
2266
|
+
recommendedAdvanceStage: recommended2,
|
|
2267
2267
|
details: { executed },
|
|
2268
2268
|
executed
|
|
2269
2269
|
}
|
|
@@ -2819,6 +2819,26 @@ ${implementRes.stderr || ""}`;
|
|
|
2819
2819
|
}
|
|
2820
2820
|
);
|
|
2821
2821
|
}
|
|
2822
|
+
state = readState(config.statePath);
|
|
2823
|
+
const recommended = recommendedAdvanceStage(state);
|
|
2824
|
+
const fallbackStage = recommended || (implementationRequired(params, state) ? "implement" : "verify");
|
|
2825
|
+
return checkpoint(
|
|
2826
|
+
fallbackStage,
|
|
2827
|
+
"awaiting_stage_advance",
|
|
2828
|
+
"The requested run continuation finished its immediate work but did not resolve to verify or ship. Choose the next workflow stage explicitly.",
|
|
2829
|
+
{
|
|
2830
|
+
nextActions: ["inspect_state", "set_advance_stage", "resume_run"],
|
|
2831
|
+
advanceOptions: implementationRequired(params, state) ? ["recon", "author", "implement", "verify", "ship"] : ["recon", "author", "verify"],
|
|
2832
|
+
recommendedAdvanceStage: fallbackStage,
|
|
2833
|
+
continueWithStage: fallbackStage,
|
|
2834
|
+
blocking: false,
|
|
2835
|
+
details: {
|
|
2836
|
+
executed,
|
|
2837
|
+
requestedAdvanceStage: effectiveAdvanceStage
|
|
2838
|
+
},
|
|
2839
|
+
executed
|
|
2840
|
+
}
|
|
2841
|
+
);
|
|
2822
2842
|
}
|
|
2823
2843
|
if (action === "ship") {
|
|
2824
2844
|
const state = readState(config.statePath);
|
|
@@ -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-
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-B7DCPzpK.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-
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-BomAcXhA.js';
|
package/dist/proof-run-engine.js
CHANGED
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-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-FMOYUYH2.js";
|
|
5
|
+
import "./chunk-4FOHZ7JG.js";
|
|
6
6
|
import "./chunk-VY4Y5U57.js";
|
|
7
7
|
import "./chunk-MLKGABMK.js";
|
|
8
8
|
export {
|