@riddledc/riddle-proof 0.8.54 → 0.8.55
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/codex-exec-agent.js +2 -2
- package/dist/adapters/codex.js +2 -2
- package/dist/adapters/local-agent.js +2 -2
- package/dist/adapters/openclaw.js +5 -5
- package/dist/advanced/engine-harness.cjs +65 -2
- package/dist/advanced/engine-harness.js +5 -5
- package/dist/advanced/index.cjs +66 -3
- package/dist/advanced/index.js +6 -6
- package/dist/advanced/runner.cjs +54 -1
- package/dist/advanced/runner.js +5 -5
- package/dist/checkpoint.js +2 -2
- package/dist/{chunk-S5DX7Z6X.js → chunk-F65S5LT2.js} +3 -3
- package/dist/{chunk-LNWJAHAQ.js → chunk-J2ZNL3H3.js} +2 -2
- package/dist/{chunk-ECLGGGAI.js → chunk-MYMTAVGP.js} +3 -3
- package/dist/{chunk-JJ4IWRMJ.js → chunk-NYRMPWJB.js} +8 -3
- package/dist/{chunk-WDIKPIMB.js → chunk-Q5GYD5RG.js} +9 -4
- package/dist/{chunk-IV4DVWPR.js → chunk-QGE3KBRL.js} +11 -5
- package/dist/{chunk-BLM5EIBA.js → chunk-QUK3SG24.js} +1 -1
- package/dist/{chunk-73EBR3YL.js → chunk-SONWF3FQ.js} +1 -1
- package/dist/{chunk-VY4Y5U57.js → chunk-W44XEGYW.js} +52 -0
- package/dist/cli/index.js +7 -7
- package/dist/cli.cjs +65 -2
- package/dist/cli.js +7 -7
- package/dist/codex-exec-agent.js +2 -2
- package/dist/engine-harness.cjs +65 -2
- package/dist/engine-harness.js +5 -5
- package/dist/index.cjs +70 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -8
- package/dist/local-agent.js +2 -2
- package/dist/openclaw.js +5 -5
- package/dist/result.cjs +56 -2
- package/dist/result.d.cts +16 -2
- package/dist/result.d.ts +16 -2
- package/dist/result.js +7 -3
- package/dist/run-card.cjs +43 -0
- package/dist/run-card.js +3 -3
- package/dist/runner.cjs +54 -1
- package/dist/runner.js +5 -5
- package/dist/spec/checkpoint.js +2 -2
- package/dist/spec/index.cjs +63 -1
- package/dist/spec/index.d.cts +1 -1
- package/dist/spec/index.d.ts +1 -1
- package/dist/spec/index.js +9 -5
- package/dist/spec/result.cjs +56 -2
- package/dist/spec/result.d.cts +1 -1
- package/dist/spec/result.d.ts +1 -1
- package/dist/spec/result.js +7 -3
- package/dist/spec/run-card.cjs +43 -0
- package/dist/spec/run-card.js +3 -3
- package/dist/spec/state.cjs +48 -1
- package/dist/spec/state.js +4 -4
- package/dist/state.cjs +48 -1
- package/dist/state.js +4 -4
- package/dist/types.d.cts +15 -0
- package/dist/types.d.ts +15 -0
- package/package.json +1 -1
package/dist/spec/state.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
normalizePrLifecycleState,
|
|
10
10
|
normalizeRunParams,
|
|
11
11
|
setRunStatus
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-Q5GYD5RG.js";
|
|
13
|
+
import "../chunk-NYRMPWJB.js";
|
|
14
|
+
import "../chunk-QUK3SG24.js";
|
|
15
|
+
import "../chunk-W44XEGYW.js";
|
|
16
16
|
import "../chunk-MLKGABMK.js";
|
|
17
17
|
export {
|
|
18
18
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
package/dist/state.cjs
CHANGED
|
@@ -56,6 +56,45 @@ function nonEmptyString(value) {
|
|
|
56
56
|
function recordValue(value) {
|
|
57
57
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
58
58
|
}
|
|
59
|
+
function firstBoolean(...values) {
|
|
60
|
+
for (const value of values) {
|
|
61
|
+
if (typeof value === "boolean") return value;
|
|
62
|
+
}
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
function shipControlStateFor(input) {
|
|
66
|
+
const state = input.state;
|
|
67
|
+
const status = input.status || state.status;
|
|
68
|
+
const raw = recordValue(input.raw) || {};
|
|
69
|
+
const shipReport = recordValue(state.ship_report) || {};
|
|
70
|
+
const prState = recordValue(state.pr_state) || {};
|
|
71
|
+
const shippingDisabled = firstBoolean(
|
|
72
|
+
raw.shipping_disabled,
|
|
73
|
+
raw.shippingDisabled,
|
|
74
|
+
state.shipping_disabled,
|
|
75
|
+
shipReport.shipping_disabled,
|
|
76
|
+
shipReport.shippingDisabled
|
|
77
|
+
) ?? state.request?.ship_mode === "none";
|
|
78
|
+
const explicitAuthorized = firstBoolean(
|
|
79
|
+
raw.ship_authorized,
|
|
80
|
+
raw.shipAuthorized,
|
|
81
|
+
state.ship_authorized,
|
|
82
|
+
shipReport.ship_authorized,
|
|
83
|
+
shipReport.shipAuthorized
|
|
84
|
+
);
|
|
85
|
+
const authorizationEvidence = Boolean(
|
|
86
|
+
status === "shipped" || state.marked_ready === true || shipReport.marked_ready === true || prState.status === "merged" || state.merge_commit || state.merged_at
|
|
87
|
+
);
|
|
88
|
+
const inferredAuthorized = explicitAuthorized ?? authorizationEvidence;
|
|
89
|
+
const rawHeld = firstBoolean(raw.ship_held, raw.shipHeld);
|
|
90
|
+
const inferredHeld = status === "ready_to_ship" && shippingDisabled && !inferredAuthorized;
|
|
91
|
+
const shipHeld = rawHeld ?? (state.ship_held === true || inferredHeld);
|
|
92
|
+
return {
|
|
93
|
+
ship_held: shipHeld,
|
|
94
|
+
shipping_disabled: shippingDisabled,
|
|
95
|
+
ship_authorized: shipHeld ? false : inferredAuthorized
|
|
96
|
+
};
|
|
97
|
+
}
|
|
59
98
|
|
|
60
99
|
// src/checkpoint.ts
|
|
61
100
|
var import_node_crypto = __toESM(require("crypto"), 1);
|
|
@@ -226,6 +265,7 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
226
265
|
const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
|
|
227
266
|
const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
|
|
228
267
|
const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
|
|
268
|
+
const shipControl = shipControlStateFor({ state });
|
|
229
269
|
return {
|
|
230
270
|
version: RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
231
271
|
run_id: state.run_id || "unknown",
|
|
@@ -279,6 +319,9 @@ function createRiddleProofRunCard(state, input = {}) {
|
|
|
279
319
|
stop_condition: compactRecord({
|
|
280
320
|
status: state.status,
|
|
281
321
|
terminal: isTerminalStatus(state.status),
|
|
322
|
+
ship_held: shipControl.ship_held,
|
|
323
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
324
|
+
ship_authorized: shipControl.ship_authorized,
|
|
282
325
|
blocker_code: state.blocker?.code || null,
|
|
283
326
|
blocker_message: state.blocker?.message || null,
|
|
284
327
|
proof_decision: state.proof_decision,
|
|
@@ -469,7 +512,8 @@ function appendStageHeartbeat(state, input) {
|
|
|
469
512
|
function createRunStatusSnapshot(state, at = timestamp()) {
|
|
470
513
|
const latestEvent = state.events[state.events.length - 1];
|
|
471
514
|
const runId = state.run_id || "unknown";
|
|
472
|
-
const
|
|
515
|
+
const shipControl = shipControlStateFor({ state });
|
|
516
|
+
const existingRunCardCurrent = state.run_card?.status === state.status && state.run_card.stop_condition?.status === state.status && state.run_card.stop_condition?.terminal === isTerminalStatus(state.status) && state.run_card.stop_condition?.monitor_should_continue === !isTerminalStatus(state.status) && state.run_card.stop_condition?.ship_held === shipControl.ship_held && state.run_card.stop_condition?.shipping_disabled === shipControl.shipping_disabled && state.run_card.stop_condition?.ship_authorized === shipControl.ship_authorized;
|
|
473
517
|
const runCard = existingRunCardCurrent ? state.run_card : createRiddleProofRunCard(state, { at });
|
|
474
518
|
return compactRecord({
|
|
475
519
|
run_id: runId,
|
|
@@ -483,6 +527,9 @@ function createRunStatusSnapshot(state, at = timestamp()) {
|
|
|
483
527
|
pr_url: state.pr_url ?? null,
|
|
484
528
|
pr_branch: state.pr_branch ?? null,
|
|
485
529
|
pr_state: state.pr_state,
|
|
530
|
+
ship_held: shipControl.ship_held,
|
|
531
|
+
shipping_disabled: shipControl.shipping_disabled,
|
|
532
|
+
ship_authorized: shipControl.ship_authorized,
|
|
486
533
|
ci_status: state.ci_status,
|
|
487
534
|
ship_commit: state.ship_commit,
|
|
488
535
|
ship_remote_head: state.ship_remote_head,
|
package/dist/state.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
normalizePrLifecycleState,
|
|
10
10
|
normalizeRunParams,
|
|
11
11
|
setRunStatus
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-Q5GYD5RG.js";
|
|
13
|
+
import "./chunk-NYRMPWJB.js";
|
|
14
|
+
import "./chunk-QUK3SG24.js";
|
|
15
|
+
import "./chunk-W44XEGYW.js";
|
|
16
16
|
import "./chunk-MLKGABMK.js";
|
|
17
17
|
export {
|
|
18
18
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
package/dist/types.d.cts
CHANGED
|
@@ -239,6 +239,9 @@ interface RiddleProofRunCard {
|
|
|
239
239
|
stop_condition: {
|
|
240
240
|
status: RiddleProofStatus;
|
|
241
241
|
terminal?: boolean;
|
|
242
|
+
ship_held?: boolean;
|
|
243
|
+
shipping_disabled?: boolean;
|
|
244
|
+
ship_authorized?: boolean;
|
|
242
245
|
blocker_code?: string | null;
|
|
243
246
|
blocker_message?: string | null;
|
|
244
247
|
proof_decision?: RiddleProofDecision;
|
|
@@ -289,6 +292,9 @@ interface RiddleProofRunState {
|
|
|
289
292
|
pr_state?: RiddleProofPrLifecycleState;
|
|
290
293
|
marked_ready?: boolean;
|
|
291
294
|
left_draft?: boolean;
|
|
295
|
+
ship_held?: boolean;
|
|
296
|
+
shipping_disabled?: boolean;
|
|
297
|
+
ship_authorized?: boolean;
|
|
292
298
|
ci_status?: string;
|
|
293
299
|
ship_commit?: string;
|
|
294
300
|
ship_remote_head?: string;
|
|
@@ -338,6 +344,9 @@ interface RiddleProofRunResult {
|
|
|
338
344
|
pr_state?: RiddleProofPrLifecycleState;
|
|
339
345
|
marked_ready?: boolean;
|
|
340
346
|
left_draft?: boolean;
|
|
347
|
+
ship_held?: boolean;
|
|
348
|
+
shipping_disabled?: boolean;
|
|
349
|
+
ship_authorized?: boolean;
|
|
341
350
|
ci_status?: string;
|
|
342
351
|
ship_commit?: string;
|
|
343
352
|
ship_remote_head?: string;
|
|
@@ -376,6 +385,9 @@ interface RiddleProofRunStatusSnapshot {
|
|
|
376
385
|
pr_url?: string | null;
|
|
377
386
|
pr_branch?: string | null;
|
|
378
387
|
pr_state?: RiddleProofPrLifecycleState;
|
|
388
|
+
ship_held?: boolean;
|
|
389
|
+
shipping_disabled?: boolean;
|
|
390
|
+
ship_authorized?: boolean;
|
|
379
391
|
ci_status?: string;
|
|
380
392
|
ship_commit?: string;
|
|
381
393
|
ship_remote_head?: string;
|
|
@@ -528,6 +540,9 @@ interface RiddleProofTerminalMetadata {
|
|
|
528
540
|
pr_state?: RiddleProofPrLifecycleState;
|
|
529
541
|
marked_ready?: boolean;
|
|
530
542
|
left_draft?: boolean;
|
|
543
|
+
ship_held?: boolean;
|
|
544
|
+
shipping_disabled?: boolean;
|
|
545
|
+
ship_authorized?: boolean;
|
|
531
546
|
ci_status?: string;
|
|
532
547
|
ship_commit?: string;
|
|
533
548
|
ship_remote_head?: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -239,6 +239,9 @@ interface RiddleProofRunCard {
|
|
|
239
239
|
stop_condition: {
|
|
240
240
|
status: RiddleProofStatus;
|
|
241
241
|
terminal?: boolean;
|
|
242
|
+
ship_held?: boolean;
|
|
243
|
+
shipping_disabled?: boolean;
|
|
244
|
+
ship_authorized?: boolean;
|
|
242
245
|
blocker_code?: string | null;
|
|
243
246
|
blocker_message?: string | null;
|
|
244
247
|
proof_decision?: RiddleProofDecision;
|
|
@@ -289,6 +292,9 @@ interface RiddleProofRunState {
|
|
|
289
292
|
pr_state?: RiddleProofPrLifecycleState;
|
|
290
293
|
marked_ready?: boolean;
|
|
291
294
|
left_draft?: boolean;
|
|
295
|
+
ship_held?: boolean;
|
|
296
|
+
shipping_disabled?: boolean;
|
|
297
|
+
ship_authorized?: boolean;
|
|
292
298
|
ci_status?: string;
|
|
293
299
|
ship_commit?: string;
|
|
294
300
|
ship_remote_head?: string;
|
|
@@ -338,6 +344,9 @@ interface RiddleProofRunResult {
|
|
|
338
344
|
pr_state?: RiddleProofPrLifecycleState;
|
|
339
345
|
marked_ready?: boolean;
|
|
340
346
|
left_draft?: boolean;
|
|
347
|
+
ship_held?: boolean;
|
|
348
|
+
shipping_disabled?: boolean;
|
|
349
|
+
ship_authorized?: boolean;
|
|
341
350
|
ci_status?: string;
|
|
342
351
|
ship_commit?: string;
|
|
343
352
|
ship_remote_head?: string;
|
|
@@ -376,6 +385,9 @@ interface RiddleProofRunStatusSnapshot {
|
|
|
376
385
|
pr_url?: string | null;
|
|
377
386
|
pr_branch?: string | null;
|
|
378
387
|
pr_state?: RiddleProofPrLifecycleState;
|
|
388
|
+
ship_held?: boolean;
|
|
389
|
+
shipping_disabled?: boolean;
|
|
390
|
+
ship_authorized?: boolean;
|
|
379
391
|
ci_status?: string;
|
|
380
392
|
ship_commit?: string;
|
|
381
393
|
ship_remote_head?: string;
|
|
@@ -528,6 +540,9 @@ interface RiddleProofTerminalMetadata {
|
|
|
528
540
|
pr_state?: RiddleProofPrLifecycleState;
|
|
529
541
|
marked_ready?: boolean;
|
|
530
542
|
left_draft?: boolean;
|
|
543
|
+
ship_held?: boolean;
|
|
544
|
+
shipping_disabled?: boolean;
|
|
545
|
+
ship_authorized?: boolean;
|
|
531
546
|
ci_status?: string;
|
|
532
547
|
ship_commit?: string;
|
|
533
548
|
ship_remote_head?: string;
|