@riddledc/riddle-proof 0.5.51 → 0.5.53
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/README.md +5 -0
- package/dist/checkpoint.cjs +3 -3
- package/dist/checkpoint.js +1 -1
- package/dist/{chunk-T7YFCZND.js → chunk-53UPEUVU.js} +1 -1
- package/dist/{chunk-LBZWFSTU.js → chunk-KYGWIA7A.js} +3 -3
- package/dist/{chunk-KLOSE27H.js → chunk-PVUZZ2P6.js} +1 -1
- package/dist/{chunk-WKKMBN5S.js → chunk-QBOKV3ES.js} +1 -1
- package/dist/{chunk-36CBRVAK.js → chunk-T5RHGGQ2.js} +3 -3
- package/dist/cli.cjs +95 -7
- package/dist/cli.js +96 -8
- package/dist/engine-harness.js +4 -4
- package/dist/index.cjs +3 -3
- package/dist/index.js +5 -5
- package/dist/openclaw.js +3 -3
- package/dist/proof-run-core.d.cts +1 -1
- package/dist/proof-run-core.d.ts +1 -1
- package/dist/run-card.js +2 -2
- package/dist/runner.js +4 -4
- package/dist/state.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ Codex/CLI-style testing:
|
|
|
64
64
|
```sh
|
|
65
65
|
riddle-proof-loop run --request-json request.json --checkpoint-mode yield
|
|
66
66
|
riddle-proof-loop checkpoint --state-path /tmp/riddle-proof-run.json
|
|
67
|
+
riddle-proof-loop checkpoint --state-path /tmp/riddle-proof-run.json --format markdown
|
|
67
68
|
riddle-proof-loop run --request-json request.json --agent local
|
|
68
69
|
riddle-proof-loop status --state-path /tmp/riddle-proof-run.json
|
|
69
70
|
riddle-proof-loop respond --state-path /tmp/riddle-proof-run.json --response-json response.json
|
|
@@ -83,6 +84,10 @@ full `--response-json` or the shorter `--decision` / `--summary` /
|
|
|
83
84
|
`--payload-json` flags. No local executor or OpenClaw surface is required for
|
|
84
85
|
that base workflow.
|
|
85
86
|
|
|
87
|
+
Flag-based `respond` refuses to submit generated placeholder payloads. If the
|
|
88
|
+
checkpoint template includes `TODO` fields, provide a real `--payload-json`
|
|
89
|
+
file/object before resuming the run.
|
|
90
|
+
|
|
86
91
|
`--agent local` is the generic CLI executor slot. The current implementation
|
|
87
92
|
uses the local Codex CLI adapter underneath, but the loop contract and CLI
|
|
88
93
|
surface are intentionally not Codex-specific.
|
package/dist/checkpoint.cjs
CHANGED
|
@@ -614,21 +614,21 @@ function defaultContinueStage(packet, decision) {
|
|
|
614
614
|
return void 0;
|
|
615
615
|
}
|
|
616
616
|
function templatePayloadFor(packet, decision) {
|
|
617
|
-
if (
|
|
617
|
+
if (decision === "author_packet") {
|
|
618
618
|
return {
|
|
619
619
|
proof_plan: "TODO: describe the exact proof plan and stop condition.",
|
|
620
620
|
capture_script: "TODO: provide the capture script that collects required artifacts/evidence.",
|
|
621
621
|
summary: "TODO: summarize why this proof packet targets the requested change."
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
|
-
if (
|
|
624
|
+
if (decision === "implementation_complete") {
|
|
625
625
|
return {
|
|
626
626
|
changed_files: [],
|
|
627
627
|
tests_run: [],
|
|
628
628
|
implementation_notes: "TODO: summarize the direct edits made in the after worktree."
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
if (
|
|
631
|
+
if (decision === "ready_for_author") {
|
|
632
632
|
return {
|
|
633
633
|
baseline_understanding: {
|
|
634
634
|
reference: "TODO",
|
package/dist/checkpoint.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
normalizeCheckpointResponse,
|
|
14
14
|
proofContractFromAuthorCheckpointResponse,
|
|
15
15
|
statePathsForRunState
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-T5RHGGQ2.js";
|
|
17
17
|
import "./chunk-DUFDZJOF.js";
|
|
18
18
|
export {
|
|
19
19
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
createRunStatusSnapshot,
|
|
11
11
|
normalizeRunParams,
|
|
12
12
|
setRunStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PVUZZ2P6.js";
|
|
14
14
|
import {
|
|
15
15
|
createRiddleProofRunCard
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-53UPEUVU.js";
|
|
17
17
|
import {
|
|
18
18
|
authorPacketPayloadFromCheckpointResponse,
|
|
19
19
|
buildCheckpointPacketForEngineResult,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
normalizeCheckpointResponse,
|
|
24
24
|
proofContractFromAuthorCheckpointResponse,
|
|
25
25
|
statePathsForRunState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-T5RHGGQ2.js";
|
|
27
27
|
import {
|
|
28
28
|
applyTerminalMetadata,
|
|
29
29
|
compactRecord,
|
|
@@ -560,21 +560,21 @@ function defaultContinueStage(packet, decision) {
|
|
|
560
560
|
return void 0;
|
|
561
561
|
}
|
|
562
562
|
function templatePayloadFor(packet, decision) {
|
|
563
|
-
if (
|
|
563
|
+
if (decision === "author_packet") {
|
|
564
564
|
return {
|
|
565
565
|
proof_plan: "TODO: describe the exact proof plan and stop condition.",
|
|
566
566
|
capture_script: "TODO: provide the capture script that collects required artifacts/evidence.",
|
|
567
567
|
summary: "TODO: summarize why this proof packet targets the requested change."
|
|
568
568
|
};
|
|
569
569
|
}
|
|
570
|
-
if (
|
|
570
|
+
if (decision === "implementation_complete") {
|
|
571
571
|
return {
|
|
572
572
|
changed_files: [],
|
|
573
573
|
tests_run: [],
|
|
574
574
|
implementation_notes: "TODO: summarize the direct edits made in the after worktree."
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
|
-
if (
|
|
577
|
+
if (decision === "ready_for_author") {
|
|
578
578
|
return {
|
|
579
579
|
baseline_understanding: {
|
|
580
580
|
reference: "TODO",
|
package/dist/cli.cjs
CHANGED
|
@@ -3549,21 +3549,21 @@ function defaultContinueStage(packet, decision) {
|
|
|
3549
3549
|
return void 0;
|
|
3550
3550
|
}
|
|
3551
3551
|
function templatePayloadFor(packet, decision) {
|
|
3552
|
-
if (
|
|
3552
|
+
if (decision === "author_packet") {
|
|
3553
3553
|
return {
|
|
3554
3554
|
proof_plan: "TODO: describe the exact proof plan and stop condition.",
|
|
3555
3555
|
capture_script: "TODO: provide the capture script that collects required artifacts/evidence.",
|
|
3556
3556
|
summary: "TODO: summarize why this proof packet targets the requested change."
|
|
3557
3557
|
};
|
|
3558
3558
|
}
|
|
3559
|
-
if (
|
|
3559
|
+
if (decision === "implementation_complete") {
|
|
3560
3560
|
return {
|
|
3561
3561
|
changed_files: [],
|
|
3562
3562
|
tests_run: [],
|
|
3563
3563
|
implementation_notes: "TODO: summarize the direct edits made in the after worktree."
|
|
3564
3564
|
};
|
|
3565
3565
|
}
|
|
3566
|
-
if (
|
|
3566
|
+
if (decision === "ready_for_author") {
|
|
3567
3567
|
return {
|
|
3568
3568
|
baseline_understanding: {
|
|
3569
3569
|
reference: "TODO",
|
|
@@ -6401,7 +6401,7 @@ function usage() {
|
|
|
6401
6401
|
return [
|
|
6402
6402
|
"Usage:",
|
|
6403
6403
|
" riddle-proof-loop run --request-json <file|json|-> [--agent disabled|local] [--checkpoint-mode yield|auto]",
|
|
6404
|
-
" riddle-proof-loop checkpoint --state-path <path> [--decision <decision>]",
|
|
6404
|
+
" riddle-proof-loop checkpoint --state-path <path> [--decision <decision>] [--format json|markdown]",
|
|
6405
6405
|
" riddle-proof-loop respond --state-path <path> --response-json <file|json|->",
|
|
6406
6406
|
" riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
|
|
6407
6407
|
" riddle-proof-loop status --state-path <path>",
|
|
@@ -6466,6 +6466,73 @@ function readRunState(statePath) {
|
|
|
6466
6466
|
}
|
|
6467
6467
|
return parsed;
|
|
6468
6468
|
}
|
|
6469
|
+
function hasPlaceholderValue(value) {
|
|
6470
|
+
if (typeof value === "string") return /\bTODO\b/.test(value);
|
|
6471
|
+
if (Array.isArray(value)) return value.some(hasPlaceholderValue);
|
|
6472
|
+
if (value && typeof value === "object") {
|
|
6473
|
+
return Object.values(value).some(hasPlaceholderValue);
|
|
6474
|
+
}
|
|
6475
|
+
return false;
|
|
6476
|
+
}
|
|
6477
|
+
function markdownJson(value) {
|
|
6478
|
+
return JSON.stringify(value ?? null, null, 2);
|
|
6479
|
+
}
|
|
6480
|
+
function formatCheckpointMarkdown(input) {
|
|
6481
|
+
const packet = input.checkpointPacket;
|
|
6482
|
+
const runCard = input.runCard;
|
|
6483
|
+
const lines = [
|
|
6484
|
+
"# Riddle Proof Checkpoint",
|
|
6485
|
+
"",
|
|
6486
|
+
`Run: ${packet.run_id}`,
|
|
6487
|
+
`State: ${input.statePath}`,
|
|
6488
|
+
`Status: ${input.status || "awaiting_checkpoint"}`,
|
|
6489
|
+
`Stage: ${packet.stage}`,
|
|
6490
|
+
`Checkpoint: ${packet.checkpoint}`,
|
|
6491
|
+
`Kind: ${packet.kind}`,
|
|
6492
|
+
"",
|
|
6493
|
+
"## Goal",
|
|
6494
|
+
"",
|
|
6495
|
+
runCard?.goal?.change_request || packet.change_request,
|
|
6496
|
+
"",
|
|
6497
|
+
"## Next Action",
|
|
6498
|
+
"",
|
|
6499
|
+
packet.question,
|
|
6500
|
+
"",
|
|
6501
|
+
"## Allowed Decisions",
|
|
6502
|
+
"",
|
|
6503
|
+
...packet.allowed_decisions.map((decision) => `- ${decision}`),
|
|
6504
|
+
""
|
|
6505
|
+
];
|
|
6506
|
+
if (packet.artifacts?.length) {
|
|
6507
|
+
lines.push("## Artifacts", "");
|
|
6508
|
+
for (const artifact of packet.artifacts) {
|
|
6509
|
+
lines.push(`- ${artifact.role}: ${artifact.url || artifact.path || artifact.name || "available"}`);
|
|
6510
|
+
}
|
|
6511
|
+
lines.push("");
|
|
6512
|
+
}
|
|
6513
|
+
if (packet.evidence_excerpt && Object.keys(packet.evidence_excerpt).length) {
|
|
6514
|
+
lines.push("## Evidence Excerpt", "", "```json", markdownJson(packet.evidence_excerpt), "```", "");
|
|
6515
|
+
}
|
|
6516
|
+
if (packet.state_excerpt && Object.keys(packet.state_excerpt).length) {
|
|
6517
|
+
lines.push("## State Excerpt", "", "```json", markdownJson(packet.state_excerpt), "```", "");
|
|
6518
|
+
}
|
|
6519
|
+
lines.push(
|
|
6520
|
+
"## Response Template",
|
|
6521
|
+
"",
|
|
6522
|
+
"```json",
|
|
6523
|
+
markdownJson(input.responseTemplate),
|
|
6524
|
+
"```",
|
|
6525
|
+
"",
|
|
6526
|
+
"## Next Command",
|
|
6527
|
+
"",
|
|
6528
|
+
"```sh",
|
|
6529
|
+
`riddle-proof-loop respond --state-path ${input.statePath} --decision ${input.responseTemplate.decision} --summary <summary> --payload-json <file|json|->`,
|
|
6530
|
+
"```",
|
|
6531
|
+
""
|
|
6532
|
+
);
|
|
6533
|
+
return `${lines.join("\n")}
|
|
6534
|
+
`;
|
|
6535
|
+
}
|
|
6469
6536
|
function checkpointResponseForFlags(statePath, options) {
|
|
6470
6537
|
const state = readRunState(statePath);
|
|
6471
6538
|
if (!state.checkpoint_packet) {
|
|
@@ -6479,15 +6546,24 @@ function checkpointResponseForFlags(statePath, options) {
|
|
|
6479
6546
|
if (!state.checkpoint_packet.allowed_decisions.includes(decision)) {
|
|
6480
6547
|
throw new Error(`--decision ${decision} is not allowed for ${state.checkpoint_packet.checkpoint}. Allowed decisions: ${state.checkpoint_packet.allowed_decisions.join(", ")}`);
|
|
6481
6548
|
}
|
|
6482
|
-
|
|
6549
|
+
const payload = readOptionalJsonRecord(optionString(options, "payloadJson"), "--payload-json");
|
|
6550
|
+
const reasons = readOptionalJsonStringArray(optionString(options, "reasonsJson"), "--reasons-json");
|
|
6551
|
+
const response = createCheckpointResponseTemplate(state.checkpoint_packet, {
|
|
6483
6552
|
decision,
|
|
6484
6553
|
summary,
|
|
6485
|
-
payload
|
|
6486
|
-
reasons
|
|
6554
|
+
payload,
|
|
6555
|
+
reasons,
|
|
6487
6556
|
continue_with_stage: optionString(options, "continueWithStage"),
|
|
6488
6557
|
source_kind: optionString(options, "sourceKind") || "codex",
|
|
6489
6558
|
created_at: optionString(options, "createdAt")
|
|
6490
6559
|
});
|
|
6560
|
+
if (!payload && hasPlaceholderValue(response.payload)) {
|
|
6561
|
+
throw new Error(`--payload-json is required for ${decision} at ${state.checkpoint_packet.checkpoint}; the generated template contains placeholders.`);
|
|
6562
|
+
}
|
|
6563
|
+
if (!reasons && hasPlaceholderValue(response.reasons)) {
|
|
6564
|
+
delete response.reasons;
|
|
6565
|
+
}
|
|
6566
|
+
return response;
|
|
6491
6567
|
}
|
|
6492
6568
|
function codexConfig(options) {
|
|
6493
6569
|
const codexFullAuto = optionString(options, "codexFullAuto");
|
|
@@ -6560,6 +6636,18 @@ async function main() {
|
|
|
6560
6636
|
decision: optionString(options, "decision"),
|
|
6561
6637
|
source_kind: optionString(options, "sourceKind") || "codex"
|
|
6562
6638
|
});
|
|
6639
|
+
const format = optionString(options, "format") || "json";
|
|
6640
|
+
if (format === "markdown" || format === "md") {
|
|
6641
|
+
process.stdout.write(formatCheckpointMarkdown({
|
|
6642
|
+
statePath,
|
|
6643
|
+
status: snapshot?.status || state.status,
|
|
6644
|
+
checkpointPacket: state.checkpoint_packet,
|
|
6645
|
+
runCard: snapshot?.run_card || state.run_card || null,
|
|
6646
|
+
responseTemplate
|
|
6647
|
+
}));
|
|
6648
|
+
return;
|
|
6649
|
+
}
|
|
6650
|
+
if (format !== "json") throw new Error("--format must be json or markdown.");
|
|
6563
6651
|
process.stdout.write(`${JSON.stringify({
|
|
6564
6652
|
checkpoint_packet: state.checkpoint_packet,
|
|
6565
6653
|
run_card: snapshot?.run_card || state.run_card || null,
|
package/dist/cli.js
CHANGED
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
createDisabledRiddleProofAgentAdapter,
|
|
4
4
|
readRiddleProofRunStatus,
|
|
5
5
|
runRiddleProofEngineHarness
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KYGWIA7A.js";
|
|
7
7
|
import "./chunk-4ASMX4R6.js";
|
|
8
8
|
import "./chunk-JFQXAJH2.js";
|
|
9
9
|
import {
|
|
10
10
|
createCodexExecAgentAdapter,
|
|
11
11
|
runCodexExecAgentDoctor
|
|
12
12
|
} from "./chunk-3266V3MO.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-PVUZZ2P6.js";
|
|
14
|
+
import "./chunk-53UPEUVU.js";
|
|
15
15
|
import {
|
|
16
16
|
createCheckpointResponseTemplate
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T5RHGGQ2.js";
|
|
18
18
|
import "./chunk-DUFDZJOF.js";
|
|
19
19
|
|
|
20
20
|
// src/cli.ts
|
|
@@ -23,7 +23,7 @@ function usage() {
|
|
|
23
23
|
return [
|
|
24
24
|
"Usage:",
|
|
25
25
|
" riddle-proof-loop run --request-json <file|json|-> [--agent disabled|local] [--checkpoint-mode yield|auto]",
|
|
26
|
-
" riddle-proof-loop checkpoint --state-path <path> [--decision <decision>]",
|
|
26
|
+
" riddle-proof-loop checkpoint --state-path <path> [--decision <decision>] [--format json|markdown]",
|
|
27
27
|
" riddle-proof-loop respond --state-path <path> --response-json <file|json|->",
|
|
28
28
|
" riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
|
|
29
29
|
" riddle-proof-loop status --state-path <path>",
|
|
@@ -88,6 +88,73 @@ function readRunState(statePath) {
|
|
|
88
88
|
}
|
|
89
89
|
return parsed;
|
|
90
90
|
}
|
|
91
|
+
function hasPlaceholderValue(value) {
|
|
92
|
+
if (typeof value === "string") return /\bTODO\b/.test(value);
|
|
93
|
+
if (Array.isArray(value)) return value.some(hasPlaceholderValue);
|
|
94
|
+
if (value && typeof value === "object") {
|
|
95
|
+
return Object.values(value).some(hasPlaceholderValue);
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
function markdownJson(value) {
|
|
100
|
+
return JSON.stringify(value ?? null, null, 2);
|
|
101
|
+
}
|
|
102
|
+
function formatCheckpointMarkdown(input) {
|
|
103
|
+
const packet = input.checkpointPacket;
|
|
104
|
+
const runCard = input.runCard;
|
|
105
|
+
const lines = [
|
|
106
|
+
"# Riddle Proof Checkpoint",
|
|
107
|
+
"",
|
|
108
|
+
`Run: ${packet.run_id}`,
|
|
109
|
+
`State: ${input.statePath}`,
|
|
110
|
+
`Status: ${input.status || "awaiting_checkpoint"}`,
|
|
111
|
+
`Stage: ${packet.stage}`,
|
|
112
|
+
`Checkpoint: ${packet.checkpoint}`,
|
|
113
|
+
`Kind: ${packet.kind}`,
|
|
114
|
+
"",
|
|
115
|
+
"## Goal",
|
|
116
|
+
"",
|
|
117
|
+
runCard?.goal?.change_request || packet.change_request,
|
|
118
|
+
"",
|
|
119
|
+
"## Next Action",
|
|
120
|
+
"",
|
|
121
|
+
packet.question,
|
|
122
|
+
"",
|
|
123
|
+
"## Allowed Decisions",
|
|
124
|
+
"",
|
|
125
|
+
...packet.allowed_decisions.map((decision) => `- ${decision}`),
|
|
126
|
+
""
|
|
127
|
+
];
|
|
128
|
+
if (packet.artifacts?.length) {
|
|
129
|
+
lines.push("## Artifacts", "");
|
|
130
|
+
for (const artifact of packet.artifacts) {
|
|
131
|
+
lines.push(`- ${artifact.role}: ${artifact.url || artifact.path || artifact.name || "available"}`);
|
|
132
|
+
}
|
|
133
|
+
lines.push("");
|
|
134
|
+
}
|
|
135
|
+
if (packet.evidence_excerpt && Object.keys(packet.evidence_excerpt).length) {
|
|
136
|
+
lines.push("## Evidence Excerpt", "", "```json", markdownJson(packet.evidence_excerpt), "```", "");
|
|
137
|
+
}
|
|
138
|
+
if (packet.state_excerpt && Object.keys(packet.state_excerpt).length) {
|
|
139
|
+
lines.push("## State Excerpt", "", "```json", markdownJson(packet.state_excerpt), "```", "");
|
|
140
|
+
}
|
|
141
|
+
lines.push(
|
|
142
|
+
"## Response Template",
|
|
143
|
+
"",
|
|
144
|
+
"```json",
|
|
145
|
+
markdownJson(input.responseTemplate),
|
|
146
|
+
"```",
|
|
147
|
+
"",
|
|
148
|
+
"## Next Command",
|
|
149
|
+
"",
|
|
150
|
+
"```sh",
|
|
151
|
+
`riddle-proof-loop respond --state-path ${input.statePath} --decision ${input.responseTemplate.decision} --summary <summary> --payload-json <file|json|->`,
|
|
152
|
+
"```",
|
|
153
|
+
""
|
|
154
|
+
);
|
|
155
|
+
return `${lines.join("\n")}
|
|
156
|
+
`;
|
|
157
|
+
}
|
|
91
158
|
function checkpointResponseForFlags(statePath, options) {
|
|
92
159
|
const state = readRunState(statePath);
|
|
93
160
|
if (!state.checkpoint_packet) {
|
|
@@ -101,15 +168,24 @@ function checkpointResponseForFlags(statePath, options) {
|
|
|
101
168
|
if (!state.checkpoint_packet.allowed_decisions.includes(decision)) {
|
|
102
169
|
throw new Error(`--decision ${decision} is not allowed for ${state.checkpoint_packet.checkpoint}. Allowed decisions: ${state.checkpoint_packet.allowed_decisions.join(", ")}`);
|
|
103
170
|
}
|
|
104
|
-
|
|
171
|
+
const payload = readOptionalJsonRecord(optionString(options, "payloadJson"), "--payload-json");
|
|
172
|
+
const reasons = readOptionalJsonStringArray(optionString(options, "reasonsJson"), "--reasons-json");
|
|
173
|
+
const response = createCheckpointResponseTemplate(state.checkpoint_packet, {
|
|
105
174
|
decision,
|
|
106
175
|
summary,
|
|
107
|
-
payload
|
|
108
|
-
reasons
|
|
176
|
+
payload,
|
|
177
|
+
reasons,
|
|
109
178
|
continue_with_stage: optionString(options, "continueWithStage"),
|
|
110
179
|
source_kind: optionString(options, "sourceKind") || "codex",
|
|
111
180
|
created_at: optionString(options, "createdAt")
|
|
112
181
|
});
|
|
182
|
+
if (!payload && hasPlaceholderValue(response.payload)) {
|
|
183
|
+
throw new Error(`--payload-json is required for ${decision} at ${state.checkpoint_packet.checkpoint}; the generated template contains placeholders.`);
|
|
184
|
+
}
|
|
185
|
+
if (!reasons && hasPlaceholderValue(response.reasons)) {
|
|
186
|
+
delete response.reasons;
|
|
187
|
+
}
|
|
188
|
+
return response;
|
|
113
189
|
}
|
|
114
190
|
function codexConfig(options) {
|
|
115
191
|
const codexFullAuto = optionString(options, "codexFullAuto");
|
|
@@ -182,6 +258,18 @@ async function main() {
|
|
|
182
258
|
decision: optionString(options, "decision"),
|
|
183
259
|
source_kind: optionString(options, "sourceKind") || "codex"
|
|
184
260
|
});
|
|
261
|
+
const format = optionString(options, "format") || "json";
|
|
262
|
+
if (format === "markdown" || format === "md") {
|
|
263
|
+
process.stdout.write(formatCheckpointMarkdown({
|
|
264
|
+
statePath,
|
|
265
|
+
status: snapshot?.status || state.status,
|
|
266
|
+
checkpointPacket: state.checkpoint_packet,
|
|
267
|
+
runCard: snapshot?.run_card || state.run_card || null,
|
|
268
|
+
responseTemplate
|
|
269
|
+
}));
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (format !== "json") throw new Error("--format must be json or markdown.");
|
|
185
273
|
process.stdout.write(`${JSON.stringify({
|
|
186
274
|
checkpoint_packet: state.checkpoint_packet,
|
|
187
275
|
run_card: snapshot?.run_card || state.run_card || null,
|
package/dist/engine-harness.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KYGWIA7A.js";
|
|
6
6
|
import "./chunk-4ASMX4R6.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-PVUZZ2P6.js";
|
|
8
|
+
import "./chunk-53UPEUVU.js";
|
|
9
|
+
import "./chunk-T5RHGGQ2.js";
|
|
10
10
|
import "./chunk-DUFDZJOF.js";
|
|
11
11
|
export {
|
|
12
12
|
createDisabledRiddleProofAgentAdapter,
|
package/dist/index.cjs
CHANGED
|
@@ -3610,21 +3610,21 @@ function defaultContinueStage(packet, decision) {
|
|
|
3610
3610
|
return void 0;
|
|
3611
3611
|
}
|
|
3612
3612
|
function templatePayloadFor(packet, decision) {
|
|
3613
|
-
if (
|
|
3613
|
+
if (decision === "author_packet") {
|
|
3614
3614
|
return {
|
|
3615
3615
|
proof_plan: "TODO: describe the exact proof plan and stop condition.",
|
|
3616
3616
|
capture_script: "TODO: provide the capture script that collects required artifacts/evidence.",
|
|
3617
3617
|
summary: "TODO: summarize why this proof packet targets the requested change."
|
|
3618
3618
|
};
|
|
3619
3619
|
}
|
|
3620
|
-
if (
|
|
3620
|
+
if (decision === "implementation_complete") {
|
|
3621
3621
|
return {
|
|
3622
3622
|
changed_files: [],
|
|
3623
3623
|
tests_run: [],
|
|
3624
3624
|
implementation_notes: "TODO: summarize the direct edits made in the after worktree."
|
|
3625
3625
|
};
|
|
3626
3626
|
}
|
|
3627
|
-
if (
|
|
3627
|
+
if (decision === "ready_for_author") {
|
|
3628
3628
|
return {
|
|
3629
3629
|
baseline_understanding: {
|
|
3630
3630
|
reference: "TODO",
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-ODORKNSO.js";
|
|
18
18
|
import {
|
|
19
19
|
runRiddleProof
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QBOKV3ES.js";
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_DIAGNOSTIC_ARRAY_LIMIT,
|
|
23
23
|
DEFAULT_DIAGNOSTIC_HISTORY_LIMIT,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
createDisabledRiddleProofAgentAdapter,
|
|
33
33
|
readRiddleProofRunStatus,
|
|
34
34
|
runRiddleProofEngineHarness
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KYGWIA7A.js";
|
|
36
36
|
import "./chunk-4ASMX4R6.js";
|
|
37
37
|
import "./chunk-JFQXAJH2.js";
|
|
38
38
|
import {
|
|
@@ -51,11 +51,11 @@ import {
|
|
|
51
51
|
normalizePrLifecycleState,
|
|
52
52
|
normalizeRunParams,
|
|
53
53
|
setRunStatus
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-PVUZZ2P6.js";
|
|
55
55
|
import {
|
|
56
56
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
57
57
|
createRiddleProofRunCard
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-53UPEUVU.js";
|
|
59
59
|
import {
|
|
60
60
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
61
61
|
RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
normalizeCheckpointResponse,
|
|
72
72
|
proofContractFromAuthorCheckpointResponse,
|
|
73
73
|
statePathsForRunState
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-T5RHGGQ2.js";
|
|
75
75
|
import {
|
|
76
76
|
applyTerminalMetadata,
|
|
77
77
|
compactRecord,
|
package/dist/openclaw.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeIntegrationContext,
|
|
3
3
|
normalizeRunParams
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-PVUZZ2P6.js";
|
|
5
|
+
import "./chunk-53UPEUVU.js";
|
|
6
|
+
import "./chunk-T5RHGGQ2.js";
|
|
7
7
|
import {
|
|
8
8
|
compactRecord
|
|
9
9
|
} from "./chunk-DUFDZJOF.js";
|
|
@@ -115,7 +115,7 @@ declare function buildSetupArgs(params: WorkflowParams, config: ReturnType<typeo
|
|
|
115
115
|
target_image_hash: string;
|
|
116
116
|
viewport_matrix_json: string;
|
|
117
117
|
deterministic_setup_json: string;
|
|
118
|
-
reference: "
|
|
118
|
+
reference: "before" | "prod" | "both";
|
|
119
119
|
base_branch: string;
|
|
120
120
|
before_ref: string;
|
|
121
121
|
allow_static_preview_fallback: string;
|
package/dist/proof-run-core.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ declare function buildSetupArgs(params: WorkflowParams, config: ReturnType<typeo
|
|
|
115
115
|
target_image_hash: string;
|
|
116
116
|
viewport_matrix_json: string;
|
|
117
117
|
deterministic_setup_json: string;
|
|
118
|
-
reference: "
|
|
118
|
+
reference: "before" | "prod" | "both";
|
|
119
119
|
base_branch: string;
|
|
120
120
|
before_ref: string;
|
|
121
121
|
allow_static_preview_fallback: string;
|
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-53UPEUVU.js";
|
|
5
|
+
import "./chunk-T5RHGGQ2.js";
|
|
6
6
|
import "./chunk-DUFDZJOF.js";
|
|
7
7
|
export {
|
|
8
8
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
package/dist/runner.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QBOKV3ES.js";
|
|
4
|
+
import "./chunk-PVUZZ2P6.js";
|
|
5
|
+
import "./chunk-53UPEUVU.js";
|
|
6
|
+
import "./chunk-T5RHGGQ2.js";
|
|
7
7
|
import "./chunk-DUFDZJOF.js";
|
|
8
8
|
export {
|
|
9
9
|
runRiddleProof
|
package/dist/state.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
normalizePrLifecycleState,
|
|
10
10
|
normalizeRunParams,
|
|
11
11
|
setRunStatus
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-PVUZZ2P6.js";
|
|
13
|
+
import "./chunk-53UPEUVU.js";
|
|
14
|
+
import "./chunk-T5RHGGQ2.js";
|
|
15
15
|
import "./chunk-DUFDZJOF.js";
|
|
16
16
|
export {
|
|
17
17
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|