@riddledc/riddle-proof 0.5.9 → 0.5.11
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/{chunk-GVPCSXN7.js → chunk-7ZJAUEUN.js} +3 -0
- package/dist/{chunk-VSEKLCNU.js → chunk-F6VFKS7K.js} +1 -1
- package/dist/{chunk-CNKNPJAF.js → chunk-URO4JVMA.js} +18 -12
- package/dist/engine-harness.cjs +22 -11
- package/dist/engine-harness.js +2 -2
- package/dist/index.cjs +19 -11
- package/dist/index.js +3 -3
- package/dist/openclaw.js +1 -1
- package/dist/runner.js +2 -2
- package/dist/state.cjs +5 -0
- package/dist/state.js +1 -1
- package/dist/types.d.cts +2 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compactRecord,
|
|
3
|
+
isTerminalStatus,
|
|
3
4
|
nonEmptyString,
|
|
4
5
|
recordValue
|
|
5
6
|
} from "./chunk-TMMKRKY5.js";
|
|
@@ -172,6 +173,8 @@ function createRunStatusSnapshot(state, at = timestamp()) {
|
|
|
172
173
|
return compactRecord({
|
|
173
174
|
run_id: runId,
|
|
174
175
|
status: state.status,
|
|
176
|
+
is_terminal: isTerminalStatus(state.status),
|
|
177
|
+
monitor_should_continue: !isTerminalStatus(state.status),
|
|
175
178
|
current_stage: state.current_stage ?? null,
|
|
176
179
|
state_path: state.state_path ?? null,
|
|
177
180
|
worktree_path: state.worktree_path ?? null,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
createRunStatusSnapshot,
|
|
6
6
|
normalizeRunParams,
|
|
7
7
|
setRunStatus
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7ZJAUEUN.js";
|
|
9
9
|
import {
|
|
10
10
|
applyTerminalMetadata,
|
|
11
11
|
compactRecord,
|
|
@@ -265,17 +265,9 @@ function proofAssessmentRequestsShip(payload) {
|
|
|
265
265
|
const continueStage = String(payload.continue_with_stage || "");
|
|
266
266
|
return decision === "ready_to_ship" || recommendedStage === "ship" || continueStage === "ship";
|
|
267
267
|
}
|
|
268
|
-
function proofAssessmentContinuation(
|
|
268
|
+
function proofAssessmentContinuation(result, payload) {
|
|
269
269
|
const proof_assessment_json = jsonParam(payload);
|
|
270
|
-
|
|
271
|
-
return { ...baseContinuation(result), proof_assessment_json };
|
|
272
|
-
}
|
|
273
|
-
return {
|
|
274
|
-
action: "run",
|
|
275
|
-
state_path: String(result.state_path || ""),
|
|
276
|
-
advance_stage: "verify",
|
|
277
|
-
proof_assessment_json
|
|
278
|
-
};
|
|
270
|
+
return { ...baseContinuation(result), proof_assessment_json };
|
|
279
271
|
}
|
|
280
272
|
function contextFor(request, state, result) {
|
|
281
273
|
return {
|
|
@@ -599,7 +591,21 @@ async function routeCheckpoint(request, state, result, agent, input) {
|
|
|
599
591
|
summary: assessment.summary,
|
|
600
592
|
details: { payload }
|
|
601
593
|
});
|
|
602
|
-
|
|
594
|
+
if (effectiveShipMode(request, input.config) !== "ship" && proofAssessmentRequestsShip(payload)) {
|
|
595
|
+
return {
|
|
596
|
+
terminal: terminalResult(
|
|
597
|
+
state,
|
|
598
|
+
"ready_to_ship",
|
|
599
|
+
result,
|
|
600
|
+
assessment.summary || result.summary || "Riddle Proof is ready to ship.",
|
|
601
|
+
{
|
|
602
|
+
ship_held: true,
|
|
603
|
+
proof_assessment: payload
|
|
604
|
+
}
|
|
605
|
+
)
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
return { next: proofAssessmentContinuation(result, payload) };
|
|
603
609
|
}
|
|
604
610
|
if (checkpoint === "verify_agent_retry") {
|
|
605
611
|
const next = recommendedContinuation(result);
|
package/dist/engine-harness.cjs
CHANGED
|
@@ -2623,6 +2623,9 @@ var import_node_path3 = __toESM(require("path"), 1);
|
|
|
2623
2623
|
var import_node_crypto2 = __toESM(require("crypto"), 1);
|
|
2624
2624
|
|
|
2625
2625
|
// src/result.ts
|
|
2626
|
+
function isTerminalStatus(status) {
|
|
2627
|
+
return status === "blocked" || status === "failed" || status === "ready_to_ship" || status === "shipped" || status === "completed";
|
|
2628
|
+
}
|
|
2626
2629
|
function isSuccessfulStatus(status) {
|
|
2627
2630
|
return status !== "blocked" && status !== "failed";
|
|
2628
2631
|
}
|
|
@@ -2966,6 +2969,8 @@ function createRunStatusSnapshot(state, at = timestamp()) {
|
|
|
2966
2969
|
return compactRecord({
|
|
2967
2970
|
run_id: runId,
|
|
2968
2971
|
status: state.status,
|
|
2972
|
+
is_terminal: isTerminalStatus(state.status),
|
|
2973
|
+
monitor_should_continue: !isTerminalStatus(state.status),
|
|
2969
2974
|
current_stage: state.current_stage ?? null,
|
|
2970
2975
|
state_path: state.state_path ?? null,
|
|
2971
2976
|
worktree_path: state.worktree_path ?? null,
|
|
@@ -3235,17 +3240,9 @@ function proofAssessmentRequestsShip(payload) {
|
|
|
3235
3240
|
const continueStage = String(payload.continue_with_stage || "");
|
|
3236
3241
|
return decision === "ready_to_ship" || recommendedStage === "ship" || continueStage === "ship";
|
|
3237
3242
|
}
|
|
3238
|
-
function proofAssessmentContinuation(
|
|
3243
|
+
function proofAssessmentContinuation(result, payload) {
|
|
3239
3244
|
const proof_assessment_json = jsonParam(payload);
|
|
3240
|
-
|
|
3241
|
-
return { ...baseContinuation(result), proof_assessment_json };
|
|
3242
|
-
}
|
|
3243
|
-
return {
|
|
3244
|
-
action: "run",
|
|
3245
|
-
state_path: String(result.state_path || ""),
|
|
3246
|
-
advance_stage: "verify",
|
|
3247
|
-
proof_assessment_json
|
|
3248
|
-
};
|
|
3245
|
+
return { ...baseContinuation(result), proof_assessment_json };
|
|
3249
3246
|
}
|
|
3250
3247
|
function contextFor(request, state, result) {
|
|
3251
3248
|
return {
|
|
@@ -3569,7 +3566,21 @@ async function routeCheckpoint(request, state, result, agent, input) {
|
|
|
3569
3566
|
summary: assessment.summary,
|
|
3570
3567
|
details: { payload }
|
|
3571
3568
|
});
|
|
3572
|
-
|
|
3569
|
+
if (effectiveShipMode(request, input.config) !== "ship" && proofAssessmentRequestsShip(payload)) {
|
|
3570
|
+
return {
|
|
3571
|
+
terminal: terminalResult(
|
|
3572
|
+
state,
|
|
3573
|
+
"ready_to_ship",
|
|
3574
|
+
result,
|
|
3575
|
+
assessment.summary || result.summary || "Riddle Proof is ready to ship.",
|
|
3576
|
+
{
|
|
3577
|
+
ship_held: true,
|
|
3578
|
+
proof_assessment: payload
|
|
3579
|
+
}
|
|
3580
|
+
)
|
|
3581
|
+
};
|
|
3582
|
+
}
|
|
3583
|
+
return { next: proofAssessmentContinuation(result, payload) };
|
|
3573
3584
|
}
|
|
3574
3585
|
if (checkpoint === "verify_agent_retry") {
|
|
3575
3586
|
const next = recommendedContinuation(result);
|
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-URO4JVMA.js";
|
|
6
|
+
import "./chunk-7ZJAUEUN.js";
|
|
7
7
|
import "./chunk-TMMKRKY5.js";
|
|
8
8
|
export {
|
|
9
9
|
createDisabledRiddleProofAgentAdapter,
|
package/dist/index.cjs
CHANGED
|
@@ -3022,6 +3022,8 @@ function createRunStatusSnapshot(state, at = timestamp()) {
|
|
|
3022
3022
|
return compactRecord({
|
|
3023
3023
|
run_id: runId,
|
|
3024
3024
|
status: state.status,
|
|
3025
|
+
is_terminal: isTerminalStatus(state.status),
|
|
3026
|
+
monitor_should_continue: !isTerminalStatus(state.status),
|
|
3025
3027
|
current_stage: state.current_stage ?? null,
|
|
3026
3028
|
state_path: state.state_path ?? null,
|
|
3027
3029
|
worktree_path: state.worktree_path ?? null,
|
|
@@ -3794,17 +3796,9 @@ function proofAssessmentRequestsShip(payload) {
|
|
|
3794
3796
|
const continueStage = String(payload.continue_with_stage || "");
|
|
3795
3797
|
return decision === "ready_to_ship" || recommendedStage === "ship" || continueStage === "ship";
|
|
3796
3798
|
}
|
|
3797
|
-
function proofAssessmentContinuation(
|
|
3799
|
+
function proofAssessmentContinuation(result, payload) {
|
|
3798
3800
|
const proof_assessment_json = jsonParam(payload);
|
|
3799
|
-
|
|
3800
|
-
return { ...baseContinuation(result), proof_assessment_json };
|
|
3801
|
-
}
|
|
3802
|
-
return {
|
|
3803
|
-
action: "run",
|
|
3804
|
-
state_path: String(result.state_path || ""),
|
|
3805
|
-
advance_stage: "verify",
|
|
3806
|
-
proof_assessment_json
|
|
3807
|
-
};
|
|
3801
|
+
return { ...baseContinuation(result), proof_assessment_json };
|
|
3808
3802
|
}
|
|
3809
3803
|
function contextFor(request, state, result) {
|
|
3810
3804
|
return {
|
|
@@ -4128,7 +4122,21 @@ async function routeCheckpoint(request, state, result, agent, input) {
|
|
|
4128
4122
|
summary: assessment.summary,
|
|
4129
4123
|
details: { payload }
|
|
4130
4124
|
});
|
|
4131
|
-
|
|
4125
|
+
if (effectiveShipMode(request, input.config) !== "ship" && proofAssessmentRequestsShip(payload)) {
|
|
4126
|
+
return {
|
|
4127
|
+
terminal: terminalResult(
|
|
4128
|
+
state,
|
|
4129
|
+
"ready_to_ship",
|
|
4130
|
+
result,
|
|
4131
|
+
assessment.summary || result.summary || "Riddle Proof is ready to ship.",
|
|
4132
|
+
{
|
|
4133
|
+
ship_held: true,
|
|
4134
|
+
proof_assessment: payload
|
|
4135
|
+
}
|
|
4136
|
+
)
|
|
4137
|
+
};
|
|
4138
|
+
}
|
|
4139
|
+
return { next: proofAssessmentContinuation(result, payload) };
|
|
4132
4140
|
}
|
|
4133
4141
|
if (checkpoint === "verify_agent_retry") {
|
|
4134
4142
|
const next = recommendedContinuation(result);
|
package/dist/index.js
CHANGED
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
createDisabledRiddleProofAgentAdapter,
|
|
14
14
|
readRiddleProofRunStatus,
|
|
15
15
|
runRiddleProofEngineHarness
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-URO4JVMA.js";
|
|
17
17
|
import {
|
|
18
18
|
runRiddleProof
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-F6VFKS7K.js";
|
|
20
20
|
import {
|
|
21
21
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
22
22
|
appendRunEvent,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
normalizePrLifecycleState,
|
|
29
29
|
normalizeRunParams,
|
|
30
30
|
setRunStatus
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7ZJAUEUN.js";
|
|
32
32
|
import {
|
|
33
33
|
applyTerminalMetadata,
|
|
34
34
|
compactRecord,
|
package/dist/openclaw.js
CHANGED
package/dist/runner.js
CHANGED
package/dist/state.cjs
CHANGED
|
@@ -34,6 +34,9 @@ __export(state_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(state_exports);
|
|
35
35
|
|
|
36
36
|
// src/result.ts
|
|
37
|
+
function isTerminalStatus(status) {
|
|
38
|
+
return status === "blocked" || status === "failed" || status === "ready_to_ship" || status === "shipped" || status === "completed";
|
|
39
|
+
}
|
|
37
40
|
function compactRecord(input) {
|
|
38
41
|
return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== void 0 && value !== null && value !== ""));
|
|
39
42
|
}
|
|
@@ -212,6 +215,8 @@ function createRunStatusSnapshot(state, at = timestamp()) {
|
|
|
212
215
|
return compactRecord({
|
|
213
216
|
run_id: runId,
|
|
214
217
|
status: state.status,
|
|
218
|
+
is_terminal: isTerminalStatus(state.status),
|
|
219
|
+
monitor_should_continue: !isTerminalStatus(state.status),
|
|
215
220
|
current_stage: state.current_stage ?? null,
|
|
216
221
|
state_path: state.state_path ?? null,
|
|
217
222
|
worktree_path: state.worktree_path ?? null,
|
package/dist/state.js
CHANGED
package/dist/types.d.cts
CHANGED
|
@@ -146,6 +146,8 @@ interface RiddleProofRunResult {
|
|
|
146
146
|
interface RiddleProofRunStatusSnapshot {
|
|
147
147
|
run_id: string;
|
|
148
148
|
status: RiddleProofStatus;
|
|
149
|
+
is_terminal?: boolean;
|
|
150
|
+
monitor_should_continue?: boolean;
|
|
149
151
|
current_stage?: RiddleProofStage | null;
|
|
150
152
|
state_path?: string | null;
|
|
151
153
|
worktree_path?: string | null;
|
package/dist/types.d.ts
CHANGED
|
@@ -146,6 +146,8 @@ interface RiddleProofRunResult {
|
|
|
146
146
|
interface RiddleProofRunStatusSnapshot {
|
|
147
147
|
run_id: string;
|
|
148
148
|
status: RiddleProofStatus;
|
|
149
|
+
is_terminal?: boolean;
|
|
150
|
+
monitor_should_continue?: boolean;
|
|
149
151
|
current_stage?: RiddleProofStage | null;
|
|
150
152
|
state_path?: string | null;
|
|
151
153
|
worktree_path?: string | null;
|