@riddledc/riddle-proof 0.4.0 → 0.4.2
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 +7 -3
- package/dist/{chunk-5FHUOSNO.js → chunk-3XJJ4JOB.js} +1 -0
- package/dist/{chunk-US63AYQU.js → chunk-7DED7LM3.js} +8 -3
- package/dist/{chunk-F65YYXVO.js → chunk-CL2FOOXX.js} +1 -1
- package/dist/engine-harness.cjs +8 -2
- package/dist/engine-harness.d.cts +2 -0
- package/dist/engine-harness.d.ts +2 -0
- package/dist/engine-harness.js +2 -2
- package/dist/index.cjs +8 -2
- package/dist/index.js +3 -3
- package/dist/openclaw.cjs +2 -0
- package/dist/openclaw.d.cts +1 -0
- package/dist/openclaw.d.ts +1 -0
- package/dist/openclaw.js +2 -1
- package/dist/runner.cjs +1 -0
- package/dist/runner.js +2 -2
- package/dist/state.cjs +1 -0
- package/dist/state.js +1 -1
- package/dist/types.d.cts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,15 +71,19 @@ events and return `createRunStatusSnapshot` for cheap observer status.
|
|
|
71
71
|
|
|
72
72
|
The proof adapter is where a host wires Riddle server-backed capture. The ship
|
|
73
73
|
adapter is where a host commits, pushes, opens or updates a PR, and waits for CI
|
|
74
|
-
when configured.
|
|
75
|
-
|
|
74
|
+
when configured. `ship_mode: "ship"` is expected to drive the happy path all the
|
|
75
|
+
way to a ready PR after proof and CI; `leave_draft: true` is only an explicit
|
|
76
|
+
debug or user-request escape hatch. The notification adapter is where a host
|
|
77
|
+
updates Discord, OpenClaw, GitHub, or another integration.
|
|
76
78
|
|
|
77
79
|
## OpenClaw Adapter Boundary
|
|
78
80
|
|
|
79
81
|
`@riddledc/riddle-proof/openclaw` translates the current
|
|
80
82
|
`proofed_change_run`-style tool params into generic `RiddleProofRunParams`.
|
|
81
83
|
It preserves Discord routing metadata as `integration_context` and parses
|
|
82
|
-
`assertions_json` into the shared assertions field.
|
|
84
|
+
`assertions_json` into the shared assertions field. Compatibility params such as
|
|
85
|
+
`ship_after_verify` and the explicit `leave_draft` escape hatch are preserved so
|
|
86
|
+
the underlying runtime can distinguish "do not merge" from "keep this draft."
|
|
83
87
|
|
|
84
88
|
The adapter does not invoke another OpenClaw plugin and does not supply a
|
|
85
89
|
coding agent. It is the reusable mapping layer a future OpenClaw wrapper can
|
|
@@ -63,6 +63,7 @@ function normalizeRunParams(input) {
|
|
|
63
63
|
color_scheme: input.color_scheme,
|
|
64
64
|
wait_for_selector: input.wait_for_selector,
|
|
65
65
|
ship_mode: input.ship_mode,
|
|
66
|
+
leave_draft: input.leave_draft,
|
|
66
67
|
engine_state_path: input.engine_state_path,
|
|
67
68
|
harness_state_path: input.harness_state_path,
|
|
68
69
|
max_iterations: input.max_iterations,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
createRunStatusSnapshot,
|
|
6
6
|
normalizeRunParams,
|
|
7
7
|
setRunStatus
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3XJJ4JOB.js";
|
|
9
9
|
import {
|
|
10
10
|
applyTerminalMetadata,
|
|
11
11
|
compactRecord,
|
|
@@ -175,6 +175,7 @@ function initialRunParams(request, input, state) {
|
|
|
175
175
|
use_auth: request.use_auth,
|
|
176
176
|
color_scheme: request.color_scheme,
|
|
177
177
|
wait_for_selector: request.wait_for_selector,
|
|
178
|
+
leave_draft: request.leave_draft || void 0,
|
|
178
179
|
discord_channel: request.integration_context?.channel_id,
|
|
179
180
|
discord_thread_id: request.integration_context?.thread_id,
|
|
180
181
|
discord_message_id: request.integration_context?.message_id,
|
|
@@ -577,7 +578,8 @@ async function runRiddleProofEngineHarness(input) {
|
|
|
577
578
|
state_path: state.state_path,
|
|
578
579
|
engine_state_path: request.engine_state_path || null,
|
|
579
580
|
max_iterations: maxIterations,
|
|
580
|
-
ship_mode: effectiveShipMode(request, input.config)
|
|
581
|
+
ship_mode: effectiveShipMode(request, input.config),
|
|
582
|
+
leave_draft: request.leave_draft || false
|
|
581
583
|
}
|
|
582
584
|
});
|
|
583
585
|
let engine;
|
|
@@ -591,9 +593,12 @@ async function runRiddleProofEngineHarness(input) {
|
|
|
591
593
|
message
|
|
592
594
|
});
|
|
593
595
|
}
|
|
594
|
-
let nextParams = initialRunParams(request, input, state);
|
|
596
|
+
let nextParams = input.resume_params || initialRunParams(request, input, state);
|
|
595
597
|
let lastResult = null;
|
|
596
598
|
for (let index = 0; index < maxIterations; index += 1) {
|
|
599
|
+
if (request.leave_draft && nextParams.leave_draft === void 0) {
|
|
600
|
+
nextParams = { ...nextParams, leave_draft: true };
|
|
601
|
+
}
|
|
597
602
|
state.iterations += 1;
|
|
598
603
|
const stage = stageFromWorkflowParams(nextParams);
|
|
599
604
|
heartbeat(state, {
|
package/dist/engine-harness.cjs
CHANGED
|
@@ -171,6 +171,7 @@ function normalizeRunParams(input) {
|
|
|
171
171
|
color_scheme: input.color_scheme,
|
|
172
172
|
wait_for_selector: input.wait_for_selector,
|
|
173
173
|
ship_mode: input.ship_mode,
|
|
174
|
+
leave_draft: input.leave_draft,
|
|
174
175
|
engine_state_path: input.engine_state_path,
|
|
175
176
|
harness_state_path: input.harness_state_path,
|
|
176
177
|
max_iterations: input.max_iterations,
|
|
@@ -415,6 +416,7 @@ function initialRunParams(request, input, state) {
|
|
|
415
416
|
use_auth: request.use_auth,
|
|
416
417
|
color_scheme: request.color_scheme,
|
|
417
418
|
wait_for_selector: request.wait_for_selector,
|
|
419
|
+
leave_draft: request.leave_draft || void 0,
|
|
418
420
|
discord_channel: request.integration_context?.channel_id,
|
|
419
421
|
discord_thread_id: request.integration_context?.thread_id,
|
|
420
422
|
discord_message_id: request.integration_context?.message_id,
|
|
@@ -817,7 +819,8 @@ async function runRiddleProofEngineHarness(input) {
|
|
|
817
819
|
state_path: state.state_path,
|
|
818
820
|
engine_state_path: request.engine_state_path || null,
|
|
819
821
|
max_iterations: maxIterations,
|
|
820
|
-
ship_mode: effectiveShipMode(request, input.config)
|
|
822
|
+
ship_mode: effectiveShipMode(request, input.config),
|
|
823
|
+
leave_draft: request.leave_draft || false
|
|
821
824
|
}
|
|
822
825
|
});
|
|
823
826
|
let engine;
|
|
@@ -831,9 +834,12 @@ async function runRiddleProofEngineHarness(input) {
|
|
|
831
834
|
message
|
|
832
835
|
});
|
|
833
836
|
}
|
|
834
|
-
let nextParams = initialRunParams(request, input, state);
|
|
837
|
+
let nextParams = input.resume_params || initialRunParams(request, input, state);
|
|
835
838
|
let lastResult = null;
|
|
836
839
|
for (let index = 0; index < maxIterations; index += 1) {
|
|
840
|
+
if (request.leave_draft && nextParams.leave_draft === void 0) {
|
|
841
|
+
nextParams = { ...nextParams, leave_draft: true };
|
|
842
|
+
}
|
|
837
843
|
state.iterations += 1;
|
|
838
844
|
const stage = stageFromWorkflowParams(nextParams);
|
|
839
845
|
heartbeat(state, {
|
|
@@ -4,6 +4,7 @@ type RiddleProofShipMode = "none" | "ship";
|
|
|
4
4
|
interface RiddleProofWorkflowParams extends Record<string, unknown> {
|
|
5
5
|
action: string;
|
|
6
6
|
state_path?: string;
|
|
7
|
+
leave_draft?: boolean;
|
|
7
8
|
}
|
|
8
9
|
interface RiddleProofEngineResult extends Record<string, unknown> {
|
|
9
10
|
ok?: boolean;
|
|
@@ -57,6 +58,7 @@ interface RunRiddleProofEngineHarnessInput {
|
|
|
57
58
|
config?: RiddleProofEngineHarnessConfig;
|
|
58
59
|
state?: RiddleProofRunState;
|
|
59
60
|
state_path?: string;
|
|
61
|
+
resume_params?: RiddleProofWorkflowParams;
|
|
60
62
|
max_iterations?: number;
|
|
61
63
|
dry_run?: boolean;
|
|
62
64
|
auto_approve?: boolean;
|
package/dist/engine-harness.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ type RiddleProofShipMode = "none" | "ship";
|
|
|
4
4
|
interface RiddleProofWorkflowParams extends Record<string, unknown> {
|
|
5
5
|
action: string;
|
|
6
6
|
state_path?: string;
|
|
7
|
+
leave_draft?: boolean;
|
|
7
8
|
}
|
|
8
9
|
interface RiddleProofEngineResult extends Record<string, unknown> {
|
|
9
10
|
ok?: boolean;
|
|
@@ -57,6 +58,7 @@ interface RunRiddleProofEngineHarnessInput {
|
|
|
57
58
|
config?: RiddleProofEngineHarnessConfig;
|
|
58
59
|
state?: RiddleProofRunState;
|
|
59
60
|
state_path?: string;
|
|
61
|
+
resume_params?: RiddleProofWorkflowParams;
|
|
60
62
|
max_iterations?: number;
|
|
61
63
|
dry_run?: boolean;
|
|
62
64
|
auto_approve?: boolean;
|
package/dist/engine-harness.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-7DED7LM3.js";
|
|
6
|
+
import "./chunk-3XJJ4JOB.js";
|
|
7
7
|
import "./chunk-5DC6YXN4.js";
|
|
8
8
|
export {
|
|
9
9
|
createDisabledRiddleProofAgentAdapter,
|
package/dist/index.cjs
CHANGED
|
@@ -187,6 +187,7 @@ function normalizeRunParams(input) {
|
|
|
187
187
|
color_scheme: input.color_scheme,
|
|
188
188
|
wait_for_selector: input.wait_for_selector,
|
|
189
189
|
ship_mode: input.ship_mode,
|
|
190
|
+
leave_draft: input.leave_draft,
|
|
190
191
|
engine_state_path: input.engine_state_path,
|
|
191
192
|
harness_state_path: input.harness_state_path,
|
|
192
193
|
max_iterations: input.max_iterations,
|
|
@@ -917,6 +918,7 @@ function initialRunParams(request, input, state) {
|
|
|
917
918
|
use_auth: request.use_auth,
|
|
918
919
|
color_scheme: request.color_scheme,
|
|
919
920
|
wait_for_selector: request.wait_for_selector,
|
|
921
|
+
leave_draft: request.leave_draft || void 0,
|
|
920
922
|
discord_channel: request.integration_context?.channel_id,
|
|
921
923
|
discord_thread_id: request.integration_context?.thread_id,
|
|
922
924
|
discord_message_id: request.integration_context?.message_id,
|
|
@@ -1319,7 +1321,8 @@ async function runRiddleProofEngineHarness(input) {
|
|
|
1319
1321
|
state_path: state.state_path,
|
|
1320
1322
|
engine_state_path: request.engine_state_path || null,
|
|
1321
1323
|
max_iterations: maxIterations,
|
|
1322
|
-
ship_mode: effectiveShipMode(request, input.config)
|
|
1324
|
+
ship_mode: effectiveShipMode(request, input.config),
|
|
1325
|
+
leave_draft: request.leave_draft || false
|
|
1323
1326
|
}
|
|
1324
1327
|
});
|
|
1325
1328
|
let engine;
|
|
@@ -1333,9 +1336,12 @@ async function runRiddleProofEngineHarness(input) {
|
|
|
1333
1336
|
message
|
|
1334
1337
|
});
|
|
1335
1338
|
}
|
|
1336
|
-
let nextParams = initialRunParams(request, input, state);
|
|
1339
|
+
let nextParams = input.resume_params || initialRunParams(request, input, state);
|
|
1337
1340
|
let lastResult = null;
|
|
1338
1341
|
for (let index = 0; index < maxIterations; index += 1) {
|
|
1342
|
+
if (request.leave_draft && nextParams.leave_draft === void 0) {
|
|
1343
|
+
nextParams = { ...nextParams, leave_draft: true };
|
|
1344
|
+
}
|
|
1339
1345
|
state.iterations += 1;
|
|
1340
1346
|
const stage = stageFromWorkflowParams(nextParams);
|
|
1341
1347
|
heartbeat(state, {
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7DED7LM3.js";
|
|
6
6
|
import {
|
|
7
7
|
runRiddleProof
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CL2FOOXX.js";
|
|
9
9
|
import {
|
|
10
10
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
11
11
|
appendRunEvent,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
normalizeIntegrationContext,
|
|
16
16
|
normalizeRunParams,
|
|
17
17
|
setRunStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3XJJ4JOB.js";
|
|
19
19
|
import {
|
|
20
20
|
applyTerminalMetadata,
|
|
21
21
|
compactRecord,
|
package/dist/openclaw.cjs
CHANGED
|
@@ -81,6 +81,7 @@ function normalizeRunParams(input) {
|
|
|
81
81
|
color_scheme: input.color_scheme,
|
|
82
82
|
wait_for_selector: input.wait_for_selector,
|
|
83
83
|
ship_mode: input.ship_mode,
|
|
84
|
+
leave_draft: input.leave_draft,
|
|
84
85
|
engine_state_path: input.engine_state_path,
|
|
85
86
|
harness_state_path: input.harness_state_path,
|
|
86
87
|
max_iterations: input.max_iterations,
|
|
@@ -144,6 +145,7 @@ function toRiddleProofRunParams(params) {
|
|
|
144
145
|
color_scheme: params.color_scheme,
|
|
145
146
|
wait_for_selector: params.wait_for_selector,
|
|
146
147
|
ship_mode: params.ship_mode || (params.ship_after_verify ? "ship" : void 0),
|
|
148
|
+
leave_draft: params.leave_draft,
|
|
147
149
|
engine_state_path: params.state_path,
|
|
148
150
|
harness_state_path: params.harness_state_path,
|
|
149
151
|
max_iterations: params.max_iterations,
|
package/dist/openclaw.d.cts
CHANGED
package/dist/openclaw.d.ts
CHANGED
package/dist/openclaw.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeIntegrationContext,
|
|
3
3
|
normalizeRunParams
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3XJJ4JOB.js";
|
|
5
5
|
import {
|
|
6
6
|
compactRecord
|
|
7
7
|
} from "./chunk-5DC6YXN4.js";
|
|
@@ -60,6 +60,7 @@ function toRiddleProofRunParams(params) {
|
|
|
60
60
|
color_scheme: params.color_scheme,
|
|
61
61
|
wait_for_selector: params.wait_for_selector,
|
|
62
62
|
ship_mode: params.ship_mode || (params.ship_after_verify ? "ship" : void 0),
|
|
63
|
+
leave_draft: params.leave_draft,
|
|
63
64
|
engine_state_path: params.state_path,
|
|
64
65
|
harness_state_path: params.harness_state_path,
|
|
65
66
|
max_iterations: params.max_iterations,
|
package/dist/runner.cjs
CHANGED
|
@@ -139,6 +139,7 @@ function normalizeRunParams(input) {
|
|
|
139
139
|
color_scheme: input.color_scheme,
|
|
140
140
|
wait_for_selector: input.wait_for_selector,
|
|
141
141
|
ship_mode: input.ship_mode,
|
|
142
|
+
leave_draft: input.leave_draft,
|
|
142
143
|
engine_state_path: input.engine_state_path,
|
|
143
144
|
harness_state_path: input.harness_state_path,
|
|
144
145
|
max_iterations: input.max_iterations,
|
package/dist/runner.js
CHANGED
package/dist/state.cjs
CHANGED
|
@@ -101,6 +101,7 @@ function normalizeRunParams(input) {
|
|
|
101
101
|
color_scheme: input.color_scheme,
|
|
102
102
|
wait_for_selector: input.wait_for_selector,
|
|
103
103
|
ship_mode: input.ship_mode,
|
|
104
|
+
leave_draft: input.leave_draft,
|
|
104
105
|
engine_state_path: input.engine_state_path,
|
|
105
106
|
harness_state_path: input.harness_state_path,
|
|
106
107
|
max_iterations: input.max_iterations,
|
package/dist/state.js
CHANGED
package/dist/types.d.cts
CHANGED
|
@@ -35,6 +35,7 @@ interface RiddleProofRunParams {
|
|
|
35
35
|
color_scheme?: "dark" | "light" | (string & {});
|
|
36
36
|
wait_for_selector?: string;
|
|
37
37
|
ship_mode?: "none" | "ship";
|
|
38
|
+
leave_draft?: boolean;
|
|
38
39
|
engine_state_path?: string;
|
|
39
40
|
harness_state_path?: string;
|
|
40
41
|
max_iterations?: number;
|
package/dist/types.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ interface RiddleProofRunParams {
|
|
|
35
35
|
color_scheme?: "dark" | "light" | (string & {});
|
|
36
36
|
wait_for_selector?: string;
|
|
37
37
|
ship_mode?: "none" | "ship";
|
|
38
|
+
leave_draft?: boolean;
|
|
38
39
|
engine_state_path?: string;
|
|
39
40
|
harness_state_path?: string;
|
|
40
41
|
max_iterations?: number;
|