@riddledc/riddle-proof 0.8.8 → 0.8.9
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.cjs +75 -10
- package/dist/adapters/codex-exec-agent.js +1 -1
- package/dist/adapters/codex.cjs +75 -10
- package/dist/adapters/codex.js +1 -1
- package/dist/adapters/local-agent.cjs +75 -10
- package/dist/adapters/local-agent.js +1 -1
- package/dist/advanced/index.d.cts +1 -1
- package/dist/advanced/index.d.ts +1 -1
- package/dist/advanced/proof-run-engine.d.cts +1 -1
- package/dist/advanced/proof-run-engine.d.ts +1 -1
- package/dist/{chunk-PYCQNK66.js → chunk-EEIYUZXE.js} +75 -10
- package/dist/{chunk-V6VZ3CAI.js → chunk-RTWGGKS3.js} +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli.cjs +75 -10
- package/dist/cli.js +2 -2
- package/dist/codex-exec-agent.cjs +75 -10
- package/dist/codex-exec-agent.js +1 -1
- package/dist/index.cjs +75 -10
- package/dist/index.js +1 -1
- package/dist/local-agent.cjs +75 -10
- package/dist/local-agent.js +1 -1
- package/dist/{proof-run-engine-BlocjMni.d.cts → proof-run-engine-B7DCPzpK.d.cts} +3 -3
- package/dist/{proof-run-engine-C_m8WJmX.d.ts → proof-run-engine-BomAcXhA.d.ts} +3 -3
- package/dist/proof-run-engine.d.cts +1 -1
- package/dist/proof-run-engine.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6531,6 +6531,8 @@ var import_node_child_process3 = require("child_process");
|
|
|
6531
6531
|
var import_node_fs4 = require("fs");
|
|
6532
6532
|
var import_node_os = __toESM(require("os"), 1);
|
|
6533
6533
|
var import_node_path4 = __toESM(require("path"), 1);
|
|
6534
|
+
var DEFAULT_CODEX_TIMEOUT_MS = 6e5;
|
|
6535
|
+
var DEFAULT_PROOF_PACKET_AUTHOR_TIMEOUT_MS = 18e4;
|
|
6534
6536
|
var REFINED_INPUTS_SCHEMA = {
|
|
6535
6537
|
type: "object",
|
|
6536
6538
|
additionalProperties: false,
|
|
@@ -6874,6 +6876,46 @@ function parseJsonFromRunnerOutputs(outputs, schema) {
|
|
|
6874
6876
|
if (!combined.trim() || seen.has(combined)) return { parsed: null, source: "" };
|
|
6875
6877
|
return { parsed: parseJsonObject(combined, schema), source: "combined_output" };
|
|
6876
6878
|
}
|
|
6879
|
+
function resolveCodexTimeoutMs(config, request) {
|
|
6880
|
+
if (typeof config.codexTimeoutMs === "number" && Number.isFinite(config.codexTimeoutMs) && config.codexTimeoutMs > 0) {
|
|
6881
|
+
return Number(config.codexTimeoutMs);
|
|
6882
|
+
}
|
|
6883
|
+
return request.purpose === "proof packet authoring" ? DEFAULT_PROOF_PACKET_AUTHOR_TIMEOUT_MS : DEFAULT_CODEX_TIMEOUT_MS;
|
|
6884
|
+
}
|
|
6885
|
+
function isCodexLifecycleEvent(value) {
|
|
6886
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
6887
|
+
const type = value.type;
|
|
6888
|
+
return typeof type === "string" && (type.startsWith("thread.") || type.startsWith("turn.") || type.startsWith("exec.") || type.startsWith("agent.") || type.startsWith("token.") || type.startsWith("reasoning.") || type.startsWith("error."));
|
|
6889
|
+
}
|
|
6890
|
+
function analyzeCodexRunnerOutput(outputs) {
|
|
6891
|
+
const eventTypes = /* @__PURE__ */ new Set();
|
|
6892
|
+
let eventLineCount = 0;
|
|
6893
|
+
let nonEventLineCount = 0;
|
|
6894
|
+
const nonEventSamples = [];
|
|
6895
|
+
for (const output of outputs) {
|
|
6896
|
+
const lines = output.text.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
6897
|
+
for (const line of lines) {
|
|
6898
|
+
try {
|
|
6899
|
+
const parsed = JSON.parse(line);
|
|
6900
|
+
if (isCodexLifecycleEvent(parsed)) {
|
|
6901
|
+
eventLineCount += 1;
|
|
6902
|
+
eventTypes.add(parsed.type);
|
|
6903
|
+
continue;
|
|
6904
|
+
}
|
|
6905
|
+
} catch {
|
|
6906
|
+
}
|
|
6907
|
+
nonEventLineCount += 1;
|
|
6908
|
+
if (nonEventSamples.length < 3) nonEventSamples.push(line.slice(0, 240));
|
|
6909
|
+
}
|
|
6910
|
+
}
|
|
6911
|
+
return {
|
|
6912
|
+
eventLineCount,
|
|
6913
|
+
eventTypes: Array.from(eventTypes),
|
|
6914
|
+
nonEventLineCount,
|
|
6915
|
+
nonEventSamples,
|
|
6916
|
+
onlyLifecycleEvents: eventLineCount > 0 && nonEventLineCount === 0
|
|
6917
|
+
};
|
|
6918
|
+
}
|
|
6877
6919
|
function isHarnessVerificationOnlyBlocker(blocker) {
|
|
6878
6920
|
const text = blocker.toLowerCase();
|
|
6879
6921
|
return (text.includes("erofs") || text.includes("read-only file system")) && text.includes("node_modules") && (text.includes(".vite-temp") || text.includes("vite.config"));
|
|
@@ -6897,21 +6939,25 @@ function runnerMetrics(input) {
|
|
|
6897
6939
|
exit_status: input.status ?? null,
|
|
6898
6940
|
timed_out: input.timedOut || false,
|
|
6899
6941
|
error_code: input.errorCode,
|
|
6942
|
+
codex_event_types: input.codexEventTypes && input.codexEventTypes.length ? input.codexEventTypes : void 0,
|
|
6943
|
+
codex_event_line_count: input.codexEventLineCount,
|
|
6944
|
+
codex_non_event_line_count: input.codexNonEventLineCount,
|
|
6900
6945
|
codex_command: input.config.codexCommand || "codex",
|
|
6901
6946
|
codex_model: input.config.codexModel,
|
|
6902
6947
|
codex_sandbox: input.config.codexSandbox || "workspace-write",
|
|
6903
6948
|
codex_full_auto: input.config.codexFullAuto !== false,
|
|
6904
|
-
timeout_ms:
|
|
6949
|
+
timeout_ms: input.timeoutMs ?? DEFAULT_CODEX_TIMEOUT_MS
|
|
6905
6950
|
});
|
|
6906
6951
|
}
|
|
6907
6952
|
function createCodexExecJsonRunner(config = {}) {
|
|
6908
6953
|
return (request) => {
|
|
6909
6954
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
6910
6955
|
const startedMs = Date.now();
|
|
6956
|
+
const timeoutMs = resolveCodexTimeoutMs(config, request);
|
|
6911
6957
|
if (!request.workdir || !(0, import_node_fs4.existsSync)(request.workdir)) {
|
|
6912
6958
|
return {
|
|
6913
6959
|
ok: false,
|
|
6914
|
-
metrics: runnerMetrics({ request, config, startedAt, startedMs, errorCode: "workdir_missing" }),
|
|
6960
|
+
metrics: runnerMetrics({ request, config, startedAt, startedMs, timeoutMs, errorCode: "workdir_missing" }),
|
|
6915
6961
|
blocker: {
|
|
6916
6962
|
code: "codex_workdir_missing",
|
|
6917
6963
|
message: `Codex workdir does not exist for ${request.purpose}.`,
|
|
@@ -6946,7 +6992,7 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
6946
6992
|
const proc = (0, import_node_child_process3.spawnSync)(config.codexCommand || "codex", args, {
|
|
6947
6993
|
input: request.prompt,
|
|
6948
6994
|
encoding: "utf-8",
|
|
6949
|
-
timeout:
|
|
6995
|
+
timeout: timeoutMs,
|
|
6950
6996
|
maxBuffer: 10 * 1024 * 1024,
|
|
6951
6997
|
env
|
|
6952
6998
|
});
|
|
@@ -6965,6 +7011,7 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
6965
7011
|
stderr: proc.stderr || "",
|
|
6966
7012
|
status: proc.status,
|
|
6967
7013
|
timedOut,
|
|
7014
|
+
timeoutMs,
|
|
6968
7015
|
errorCode: proc.error.code || "spawn_error"
|
|
6969
7016
|
}),
|
|
6970
7017
|
blocker: {
|
|
@@ -6987,6 +7034,7 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
6987
7034
|
stdout: proc.stdout || "",
|
|
6988
7035
|
stderr: proc.stderr || "",
|
|
6989
7036
|
status: proc.status,
|
|
7037
|
+
timeoutMs,
|
|
6990
7038
|
errorCode: "nonzero_exit"
|
|
6991
7039
|
}),
|
|
6992
7040
|
blocker: {
|
|
@@ -6999,12 +7047,15 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
6999
7047
|
const finalText = (0, import_node_fs4.existsSync)(lastMessagePath) ? (0, import_node_fs4.readFileSync)(lastMessagePath, "utf-8") : String(proc.stdout || "");
|
|
7000
7048
|
const stdoutText = String(proc.stdout || "");
|
|
7001
7049
|
const stderrText = String(proc.stderr || "");
|
|
7002
|
-
const
|
|
7050
|
+
const runnerOutputs = [
|
|
7003
7051
|
{ source: (0, import_node_fs4.existsSync)(lastMessagePath) ? "last_message" : "stdout", text: finalText },
|
|
7004
7052
|
{ source: "stdout", text: stdoutText },
|
|
7005
7053
|
{ source: "stderr", text: stderrText }
|
|
7006
|
-
]
|
|
7054
|
+
];
|
|
7055
|
+
const { parsed, source: parsedJsonSource } = parseJsonFromRunnerOutputs(runnerOutputs, request.schema);
|
|
7007
7056
|
if (!parsed) {
|
|
7057
|
+
const outputAnalysis = analyzeCodexRunnerOutput(runnerOutputs);
|
|
7058
|
+
const errorCode = outputAnalysis.onlyLifecycleEvents ? "no_final_response" : "invalid_json";
|
|
7008
7059
|
return {
|
|
7009
7060
|
ok: false,
|
|
7010
7061
|
stdout: stdoutText,
|
|
@@ -7018,12 +7069,24 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
7018
7069
|
stderr: stderrText,
|
|
7019
7070
|
finalText,
|
|
7020
7071
|
status: proc.status,
|
|
7021
|
-
|
|
7072
|
+
timeoutMs,
|
|
7073
|
+
errorCode,
|
|
7074
|
+
codexEventTypes: outputAnalysis.eventTypes,
|
|
7075
|
+
codexEventLineCount: outputAnalysis.eventLineCount,
|
|
7076
|
+
codexNonEventLineCount: outputAnalysis.nonEventLineCount
|
|
7022
7077
|
}),
|
|
7023
7078
|
blocker: {
|
|
7024
|
-
code: "codex_invalid_json",
|
|
7025
|
-
message: `Codex completed ${request.purpose}, but did not return valid JSON.`,
|
|
7026
|
-
details: {
|
|
7079
|
+
code: outputAnalysis.onlyLifecycleEvents ? "codex_no_final_response" : "codex_invalid_json",
|
|
7080
|
+
message: outputAnalysis.onlyLifecycleEvents ? `Codex emitted lifecycle events during ${request.purpose}, but did not produce a final JSON response.` : `Codex completed ${request.purpose}, but did not return valid JSON.`,
|
|
7081
|
+
details: {
|
|
7082
|
+
finalText,
|
|
7083
|
+
stdout: stdoutText,
|
|
7084
|
+
stderr: stderrText,
|
|
7085
|
+
event_types: outputAnalysis.eventTypes,
|
|
7086
|
+
event_line_count: outputAnalysis.eventLineCount,
|
|
7087
|
+
non_event_line_count: outputAnalysis.nonEventLineCount,
|
|
7088
|
+
non_event_samples: outputAnalysis.nonEventSamples
|
|
7089
|
+
}
|
|
7027
7090
|
}
|
|
7028
7091
|
};
|
|
7029
7092
|
}
|
|
@@ -7041,7 +7104,8 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
7041
7104
|
stderr: stderrText,
|
|
7042
7105
|
finalText,
|
|
7043
7106
|
parsedJsonSource,
|
|
7044
|
-
status: proc.status
|
|
7107
|
+
status: proc.status,
|
|
7108
|
+
timeoutMs
|
|
7045
7109
|
})
|
|
7046
7110
|
};
|
|
7047
7111
|
} finally {
|
|
@@ -7150,6 +7214,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
7150
7214
|
"Write a proof_plan and capture_script that will verify the exact user-facing change.",
|
|
7151
7215
|
"Use recon_assessment.baseline_understanding as the source of truth. Do not author a proof plan unless it names the observed before state and the requested delta from that state.",
|
|
7152
7216
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
7217
|
+
"Do not leave this authoring stage pending for external investigation. Keep any repo inspection brief, do not modify files, and return the JSON proof packet from the available state.",
|
|
7153
7218
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
7154
7219
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
7155
7220
|
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
package/dist/index.js
CHANGED
package/dist/local-agent.cjs
CHANGED
|
@@ -48,6 +48,8 @@ function compactRecord(input) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// src/codex-exec-agent.ts
|
|
51
|
+
var DEFAULT_CODEX_TIMEOUT_MS = 6e5;
|
|
52
|
+
var DEFAULT_PROOF_PACKET_AUTHOR_TIMEOUT_MS = 18e4;
|
|
51
53
|
var REFINED_INPUTS_SCHEMA = {
|
|
52
54
|
type: "object",
|
|
53
55
|
additionalProperties: false,
|
|
@@ -391,6 +393,46 @@ function parseJsonFromRunnerOutputs(outputs, schema) {
|
|
|
391
393
|
if (!combined.trim() || seen.has(combined)) return { parsed: null, source: "" };
|
|
392
394
|
return { parsed: parseJsonObject(combined, schema), source: "combined_output" };
|
|
393
395
|
}
|
|
396
|
+
function resolveCodexTimeoutMs(config, request) {
|
|
397
|
+
if (typeof config.codexTimeoutMs === "number" && Number.isFinite(config.codexTimeoutMs) && config.codexTimeoutMs > 0) {
|
|
398
|
+
return Number(config.codexTimeoutMs);
|
|
399
|
+
}
|
|
400
|
+
return request.purpose === "proof packet authoring" ? DEFAULT_PROOF_PACKET_AUTHOR_TIMEOUT_MS : DEFAULT_CODEX_TIMEOUT_MS;
|
|
401
|
+
}
|
|
402
|
+
function isCodexLifecycleEvent(value) {
|
|
403
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
404
|
+
const type = value.type;
|
|
405
|
+
return typeof type === "string" && (type.startsWith("thread.") || type.startsWith("turn.") || type.startsWith("exec.") || type.startsWith("agent.") || type.startsWith("token.") || type.startsWith("reasoning.") || type.startsWith("error."));
|
|
406
|
+
}
|
|
407
|
+
function analyzeCodexRunnerOutput(outputs) {
|
|
408
|
+
const eventTypes = /* @__PURE__ */ new Set();
|
|
409
|
+
let eventLineCount = 0;
|
|
410
|
+
let nonEventLineCount = 0;
|
|
411
|
+
const nonEventSamples = [];
|
|
412
|
+
for (const output of outputs) {
|
|
413
|
+
const lines = output.text.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
414
|
+
for (const line of lines) {
|
|
415
|
+
try {
|
|
416
|
+
const parsed = JSON.parse(line);
|
|
417
|
+
if (isCodexLifecycleEvent(parsed)) {
|
|
418
|
+
eventLineCount += 1;
|
|
419
|
+
eventTypes.add(parsed.type);
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
} catch {
|
|
423
|
+
}
|
|
424
|
+
nonEventLineCount += 1;
|
|
425
|
+
if (nonEventSamples.length < 3) nonEventSamples.push(line.slice(0, 240));
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return {
|
|
429
|
+
eventLineCount,
|
|
430
|
+
eventTypes: Array.from(eventTypes),
|
|
431
|
+
nonEventLineCount,
|
|
432
|
+
nonEventSamples,
|
|
433
|
+
onlyLifecycleEvents: eventLineCount > 0 && nonEventLineCount === 0
|
|
434
|
+
};
|
|
435
|
+
}
|
|
394
436
|
function isHarnessVerificationOnlyBlocker(blocker) {
|
|
395
437
|
const text = blocker.toLowerCase();
|
|
396
438
|
return (text.includes("erofs") || text.includes("read-only file system")) && text.includes("node_modules") && (text.includes(".vite-temp") || text.includes("vite.config"));
|
|
@@ -414,21 +456,25 @@ function runnerMetrics(input) {
|
|
|
414
456
|
exit_status: input.status ?? null,
|
|
415
457
|
timed_out: input.timedOut || false,
|
|
416
458
|
error_code: input.errorCode,
|
|
459
|
+
codex_event_types: input.codexEventTypes && input.codexEventTypes.length ? input.codexEventTypes : void 0,
|
|
460
|
+
codex_event_line_count: input.codexEventLineCount,
|
|
461
|
+
codex_non_event_line_count: input.codexNonEventLineCount,
|
|
417
462
|
codex_command: input.config.codexCommand || "codex",
|
|
418
463
|
codex_model: input.config.codexModel,
|
|
419
464
|
codex_sandbox: input.config.codexSandbox || "workspace-write",
|
|
420
465
|
codex_full_auto: input.config.codexFullAuto !== false,
|
|
421
|
-
timeout_ms:
|
|
466
|
+
timeout_ms: input.timeoutMs ?? DEFAULT_CODEX_TIMEOUT_MS
|
|
422
467
|
});
|
|
423
468
|
}
|
|
424
469
|
function createCodexExecJsonRunner(config = {}) {
|
|
425
470
|
return (request) => {
|
|
426
471
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
427
472
|
const startedMs = Date.now();
|
|
473
|
+
const timeoutMs = resolveCodexTimeoutMs(config, request);
|
|
428
474
|
if (!request.workdir || !(0, import_node_fs.existsSync)(request.workdir)) {
|
|
429
475
|
return {
|
|
430
476
|
ok: false,
|
|
431
|
-
metrics: runnerMetrics({ request, config, startedAt, startedMs, errorCode: "workdir_missing" }),
|
|
477
|
+
metrics: runnerMetrics({ request, config, startedAt, startedMs, timeoutMs, errorCode: "workdir_missing" }),
|
|
432
478
|
blocker: {
|
|
433
479
|
code: "codex_workdir_missing",
|
|
434
480
|
message: `Codex workdir does not exist for ${request.purpose}.`,
|
|
@@ -463,7 +509,7 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
463
509
|
const proc = (0, import_node_child_process.spawnSync)(config.codexCommand || "codex", args, {
|
|
464
510
|
input: request.prompt,
|
|
465
511
|
encoding: "utf-8",
|
|
466
|
-
timeout:
|
|
512
|
+
timeout: timeoutMs,
|
|
467
513
|
maxBuffer: 10 * 1024 * 1024,
|
|
468
514
|
env
|
|
469
515
|
});
|
|
@@ -482,6 +528,7 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
482
528
|
stderr: proc.stderr || "",
|
|
483
529
|
status: proc.status,
|
|
484
530
|
timedOut,
|
|
531
|
+
timeoutMs,
|
|
485
532
|
errorCode: proc.error.code || "spawn_error"
|
|
486
533
|
}),
|
|
487
534
|
blocker: {
|
|
@@ -504,6 +551,7 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
504
551
|
stdout: proc.stdout || "",
|
|
505
552
|
stderr: proc.stderr || "",
|
|
506
553
|
status: proc.status,
|
|
554
|
+
timeoutMs,
|
|
507
555
|
errorCode: "nonzero_exit"
|
|
508
556
|
}),
|
|
509
557
|
blocker: {
|
|
@@ -516,12 +564,15 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
516
564
|
const finalText = (0, import_node_fs.existsSync)(lastMessagePath) ? (0, import_node_fs.readFileSync)(lastMessagePath, "utf-8") : String(proc.stdout || "");
|
|
517
565
|
const stdoutText = String(proc.stdout || "");
|
|
518
566
|
const stderrText = String(proc.stderr || "");
|
|
519
|
-
const
|
|
567
|
+
const runnerOutputs = [
|
|
520
568
|
{ source: (0, import_node_fs.existsSync)(lastMessagePath) ? "last_message" : "stdout", text: finalText },
|
|
521
569
|
{ source: "stdout", text: stdoutText },
|
|
522
570
|
{ source: "stderr", text: stderrText }
|
|
523
|
-
]
|
|
571
|
+
];
|
|
572
|
+
const { parsed, source: parsedJsonSource } = parseJsonFromRunnerOutputs(runnerOutputs, request.schema);
|
|
524
573
|
if (!parsed) {
|
|
574
|
+
const outputAnalysis = analyzeCodexRunnerOutput(runnerOutputs);
|
|
575
|
+
const errorCode = outputAnalysis.onlyLifecycleEvents ? "no_final_response" : "invalid_json";
|
|
525
576
|
return {
|
|
526
577
|
ok: false,
|
|
527
578
|
stdout: stdoutText,
|
|
@@ -535,12 +586,24 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
535
586
|
stderr: stderrText,
|
|
536
587
|
finalText,
|
|
537
588
|
status: proc.status,
|
|
538
|
-
|
|
589
|
+
timeoutMs,
|
|
590
|
+
errorCode,
|
|
591
|
+
codexEventTypes: outputAnalysis.eventTypes,
|
|
592
|
+
codexEventLineCount: outputAnalysis.eventLineCount,
|
|
593
|
+
codexNonEventLineCount: outputAnalysis.nonEventLineCount
|
|
539
594
|
}),
|
|
540
595
|
blocker: {
|
|
541
|
-
code: "codex_invalid_json",
|
|
542
|
-
message: `Codex completed ${request.purpose}, but did not return valid JSON.`,
|
|
543
|
-
details: {
|
|
596
|
+
code: outputAnalysis.onlyLifecycleEvents ? "codex_no_final_response" : "codex_invalid_json",
|
|
597
|
+
message: outputAnalysis.onlyLifecycleEvents ? `Codex emitted lifecycle events during ${request.purpose}, but did not produce a final JSON response.` : `Codex completed ${request.purpose}, but did not return valid JSON.`,
|
|
598
|
+
details: {
|
|
599
|
+
finalText,
|
|
600
|
+
stdout: stdoutText,
|
|
601
|
+
stderr: stderrText,
|
|
602
|
+
event_types: outputAnalysis.eventTypes,
|
|
603
|
+
event_line_count: outputAnalysis.eventLineCount,
|
|
604
|
+
non_event_line_count: outputAnalysis.nonEventLineCount,
|
|
605
|
+
non_event_samples: outputAnalysis.nonEventSamples
|
|
606
|
+
}
|
|
544
607
|
}
|
|
545
608
|
};
|
|
546
609
|
}
|
|
@@ -558,7 +621,8 @@ function createCodexExecJsonRunner(config = {}) {
|
|
|
558
621
|
stderr: stderrText,
|
|
559
622
|
finalText,
|
|
560
623
|
parsedJsonSource,
|
|
561
|
-
status: proc.status
|
|
624
|
+
status: proc.status,
|
|
625
|
+
timeoutMs
|
|
562
626
|
})
|
|
563
627
|
};
|
|
564
628
|
} finally {
|
|
@@ -667,6 +731,7 @@ function createCodexExecAgentAdapter(config = {}, runner = createCodexExecJsonRu
|
|
|
667
731
|
"Write a proof_plan and capture_script that will verify the exact user-facing change.",
|
|
668
732
|
"Use recon_assessment.baseline_understanding as the source of truth. Do not author a proof plan unless it names the observed before state and the requested delta from that state.",
|
|
669
733
|
"Use the recon-approved route and baseline context; make the plan name the concrete target, expected before state, expected after state, and stop condition.",
|
|
734
|
+
"Do not leave this authoring stage pending for external investigation. Keep any repo inspection brief, do not modify files, and return the JSON proof packet from the available state.",
|
|
670
735
|
"Choose the evidence modality from verification_mode and success_criteria: screenshots for visual/UI proof, interactions plus screenshots for interaction proof, structured metrics/logs/JSON/audio analysis for non-visual proof.",
|
|
671
736
|
"For playable/gameplay proof, treat screenshots as supporting artifacts only: start the game, send keyboard or pointer input, measure state before/after, measure non-HUD canvas/playfield pixel deltas across time, and return playability evidence with version riddle-proof.playability.v1.",
|
|
672
737
|
"For interaction proof, return a structured evidence object with start route/state, terminal route/state, action, assertions, and matched UI text. Catch waitForURL or selector timeouts and record them as failed assertions instead of throwing before evidence is emitted.",
|
package/dist/local-agent.js
CHANGED
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './proof-run-core-CE0jx7wL.cjs';
|
|
2
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-B7DCPzpK.cjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './proof-run-core-CE0jx7wL.js';
|
|
2
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-
|
|
2
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-BomAcXhA.js';
|