@riddledc/riddle-proof 0.5.51 → 0.5.52
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 +4 -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 +23 -6
- package/dist/cli.js +24 -7
- 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/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
|
@@ -83,6 +83,10 @@ full `--response-json` or the shorter `--decision` / `--summary` /
|
|
|
83
83
|
`--payload-json` flags. No local executor or OpenClaw surface is required for
|
|
84
84
|
that base workflow.
|
|
85
85
|
|
|
86
|
+
Flag-based `respond` refuses to submit generated placeholder payloads. If the
|
|
87
|
+
checkpoint template includes `TODO` fields, provide a real `--payload-json`
|
|
88
|
+
file/object before resuming the run.
|
|
89
|
+
|
|
86
90
|
`--agent local` is the generic CLI executor slot. The current implementation
|
|
87
91
|
uses the local Codex CLI adapter underneath, but the loop contract and CLI
|
|
88
92
|
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",
|
|
@@ -6466,6 +6466,14 @@ 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
|
+
}
|
|
6469
6477
|
function checkpointResponseForFlags(statePath, options) {
|
|
6470
6478
|
const state = readRunState(statePath);
|
|
6471
6479
|
if (!state.checkpoint_packet) {
|
|
@@ -6479,15 +6487,24 @@ function checkpointResponseForFlags(statePath, options) {
|
|
|
6479
6487
|
if (!state.checkpoint_packet.allowed_decisions.includes(decision)) {
|
|
6480
6488
|
throw new Error(`--decision ${decision} is not allowed for ${state.checkpoint_packet.checkpoint}. Allowed decisions: ${state.checkpoint_packet.allowed_decisions.join(", ")}`);
|
|
6481
6489
|
}
|
|
6482
|
-
|
|
6490
|
+
const payload = readOptionalJsonRecord(optionString(options, "payloadJson"), "--payload-json");
|
|
6491
|
+
const reasons = readOptionalJsonStringArray(optionString(options, "reasonsJson"), "--reasons-json");
|
|
6492
|
+
const response = createCheckpointResponseTemplate(state.checkpoint_packet, {
|
|
6483
6493
|
decision,
|
|
6484
6494
|
summary,
|
|
6485
|
-
payload
|
|
6486
|
-
reasons
|
|
6495
|
+
payload,
|
|
6496
|
+
reasons,
|
|
6487
6497
|
continue_with_stage: optionString(options, "continueWithStage"),
|
|
6488
6498
|
source_kind: optionString(options, "sourceKind") || "codex",
|
|
6489
6499
|
created_at: optionString(options, "createdAt")
|
|
6490
6500
|
});
|
|
6501
|
+
if (!payload && hasPlaceholderValue(response.payload)) {
|
|
6502
|
+
throw new Error(`--payload-json is required for ${decision} at ${state.checkpoint_packet.checkpoint}; the generated template contains placeholders.`);
|
|
6503
|
+
}
|
|
6504
|
+
if (!reasons && hasPlaceholderValue(response.reasons)) {
|
|
6505
|
+
delete response.reasons;
|
|
6506
|
+
}
|
|
6507
|
+
return response;
|
|
6491
6508
|
}
|
|
6492
6509
|
function codexConfig(options) {
|
|
6493
6510
|
const codexFullAuto = optionString(options, "codexFullAuto");
|
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
|
|
@@ -88,6 +88,14 @@ 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
|
+
}
|
|
91
99
|
function checkpointResponseForFlags(statePath, options) {
|
|
92
100
|
const state = readRunState(statePath);
|
|
93
101
|
if (!state.checkpoint_packet) {
|
|
@@ -101,15 +109,24 @@ function checkpointResponseForFlags(statePath, options) {
|
|
|
101
109
|
if (!state.checkpoint_packet.allowed_decisions.includes(decision)) {
|
|
102
110
|
throw new Error(`--decision ${decision} is not allowed for ${state.checkpoint_packet.checkpoint}. Allowed decisions: ${state.checkpoint_packet.allowed_decisions.join(", ")}`);
|
|
103
111
|
}
|
|
104
|
-
|
|
112
|
+
const payload = readOptionalJsonRecord(optionString(options, "payloadJson"), "--payload-json");
|
|
113
|
+
const reasons = readOptionalJsonStringArray(optionString(options, "reasonsJson"), "--reasons-json");
|
|
114
|
+
const response = createCheckpointResponseTemplate(state.checkpoint_packet, {
|
|
105
115
|
decision,
|
|
106
116
|
summary,
|
|
107
|
-
payload
|
|
108
|
-
reasons
|
|
117
|
+
payload,
|
|
118
|
+
reasons,
|
|
109
119
|
continue_with_stage: optionString(options, "continueWithStage"),
|
|
110
120
|
source_kind: optionString(options, "sourceKind") || "codex",
|
|
111
121
|
created_at: optionString(options, "createdAt")
|
|
112
122
|
});
|
|
123
|
+
if (!payload && hasPlaceholderValue(response.payload)) {
|
|
124
|
+
throw new Error(`--payload-json is required for ${decision} at ${state.checkpoint_packet.checkpoint}; the generated template contains placeholders.`);
|
|
125
|
+
}
|
|
126
|
+
if (!reasons && hasPlaceholderValue(response.reasons)) {
|
|
127
|
+
delete response.reasons;
|
|
128
|
+
}
|
|
129
|
+
return response;
|
|
113
130
|
}
|
|
114
131
|
function codexConfig(options) {
|
|
115
132
|
const codexFullAuto = optionString(options, "codexFullAuto");
|
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";
|
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,
|