@lesliechan721/agent-skill-eval 0.1.0-beta.5 → 0.1.0-beta.51
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/bin.js +167 -39
- package/dist/bin.js.map +1 -1
- package/dist/codex-eval-app-server.d.ts +210 -0
- package/dist/codex-eval-app-server.js +1384 -0
- package/dist/codex-eval-app-server.js.map +1 -0
- package/dist/codex-eval-cases.d.ts +41 -0
- package/dist/codex-eval-cases.js +324 -0
- package/dist/codex-eval-cases.js.map +1 -0
- package/dist/codex-eval-isolation.d.ts +79 -0
- package/dist/codex-eval-isolation.js +420 -0
- package/dist/codex-eval-isolation.js.map +1 -0
- package/dist/codex-eval-process-tree.d.ts +42 -0
- package/dist/codex-eval-process-tree.js +860 -0
- package/dist/codex-eval-process-tree.js.map +1 -0
- package/dist/codex-eval-rollout.d.ts +8 -0
- package/dist/codex-eval-rollout.js +85 -0
- package/dist/codex-eval-rollout.js.map +1 -0
- package/dist/codex-eval-runtime-config.d.ts +43 -0
- package/dist/codex-eval-runtime-config.js +607 -0
- package/dist/codex-eval-runtime-config.js.map +1 -0
- package/dist/codex-trigger-eval.d.ts +85 -0
- package/dist/codex-trigger-eval.js +941 -0
- package/dist/codex-trigger-eval.js.map +1 -0
- package/dist/codex-workflow-evaluation.d.ts +91 -0
- package/dist/codex-workflow-evaluation.js +309 -0
- package/dist/codex-workflow-evaluation.js.map +1 -0
- package/dist/codex-workflow-fixtures.d.ts +37 -0
- package/dist/codex-workflow-fixtures.js +144 -0
- package/dist/codex-workflow-fixtures.js.map +1 -0
- package/dist/codex-workflow.d.ts +224 -0
- package/dist/codex-workflow.js +2140 -0
- package/dist/codex-workflow.js.map +1 -0
- package/dist/credentials.d.ts +5 -0
- package/dist/credentials.js +30 -0
- package/dist/credentials.js.map +1 -0
- package/dist/custom-process.d.ts +60 -0
- package/dist/custom-process.js +424 -0
- package/dist/custom-process.js.map +1 -0
- package/dist/eval-audit.d.ts +38 -0
- package/dist/eval-audit.js +71 -0
- package/dist/eval-audit.js.map +1 -0
- package/dist/eval-file.d.ts +9 -0
- package/dist/eval-file.js +15 -0
- package/dist/eval-file.js.map +1 -0
- package/dist/eval-process-management.d.ts +22 -0
- package/dist/eval-process-management.js +90 -0
- package/dist/eval-process-management.js.map +1 -0
- package/dist/eval-result.d.ts +79 -0
- package/dist/eval-result.js +144 -0
- package/dist/eval-result.js.map +1 -0
- package/dist/eval-run.d.ts +27 -0
- package/dist/eval-run.js +566 -0
- package/dist/eval-run.js.map +1 -0
- package/dist/eval-spec.d.ts +57 -0
- package/dist/eval-spec.js +120 -0
- package/dist/eval-spec.js.map +1 -0
- package/dist/eval-suite-binding.d.ts +4 -0
- package/dist/eval-suite-binding.js +19 -0
- package/dist/eval-suite-binding.js.map +1 -0
- package/dist/index.d.ts +44 -10
- package/dist/index.js +22 -6
- package/dist/index.js.map +1 -1
- package/dist/instruction-v2.d.ts +53 -0
- package/dist/instruction-v2.js +169 -0
- package/dist/instruction-v2.js.map +1 -0
- package/dist/json-schema.js +84 -5
- package/dist/json-schema.js.map +1 -1
- package/dist/output-path.js +2 -2
- package/dist/process-tree.d.ts +53 -1
- package/dist/process-tree.js +931 -160
- package/dist/process-tree.js.map +1 -1
- package/dist/process.d.ts +2 -2
- package/dist/process.js +99 -34
- package/dist/process.js.map +1 -1
- package/dist/provider-doctor.d.ts +46 -0
- package/dist/provider-doctor.js +120 -0
- package/dist/provider-doctor.js.map +1 -0
- package/dist/providers.d.ts +85 -0
- package/dist/providers.js +685 -0
- package/dist/providers.js.map +1 -0
- package/dist/run-paths.d.ts +8 -0
- package/dist/run-paths.js +71 -0
- package/dist/run-paths.js.map +1 -0
- package/dist/runtime-skill.d.ts +6 -0
- package/dist/runtime-skill.js +87 -3
- package/dist/runtime-skill.js.map +1 -1
- package/dist/schemas/digests.json +7 -3
- package/dist/schemas/eval-audit.schema.json +64 -0
- package/dist/schemas/eval-result.schema.json +232 -0
- package/dist/schemas/eval-spec.schema.json +109 -0
- package/dist/schemas/instruction-v2-receipt.schema.json +24 -0
- package/dist/schemas/instruction-v2-request.schema.json +51 -0
- package/dist/schemas/workflow-evaluation.schema.json +38 -0
- package/dist/schemas/workflow-fixture-action.schema.json +15 -0
- package/dist/schemas.d.ts +1 -3
- package/dist/schemas.js +22 -20
- package/dist/schemas.js.map +1 -1
- package/dist/selected-cases.d.ts +30 -0
- package/dist/selected-cases.js +386 -0
- package/dist/selected-cases.js.map +1 -0
- package/dist/types.d.ts +2 -34
- package/dist/windows-job.d.ts +26 -0
- package/dist/windows-job.js +97 -0
- package/dist/windows-job.js.map +1 -0
- package/package.json +22 -3
- package/dist/bundle.d.ts +0 -93
- package/dist/bundle.js +0 -216
- package/dist/bundle.js.map +0 -1
- package/dist/capabilities.d.ts +0 -2
- package/dist/capabilities.js +0 -38
- package/dist/capabilities.js.map +0 -1
- package/dist/plan.d.ts +0 -79
- package/dist/plan.js +0 -285
- package/dist/plan.js.map +0 -1
- package/dist/run.d.ts +0 -2
- package/dist/run.js +0 -592
- package/dist/run.js.map +0 -1
- package/dist/schemas/aw-skill-eval-execution-plan.schema.json +0 -220
- package/dist/schemas/eval-run-bundle.schema.json +0 -408
- package/dist/schemas/eval-runtime-capabilities.schema.json +0 -85
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { assertHostReadContainmentAvailable } from './codex-eval-app-server.js';
|
|
5
|
+
import { createCodexEvalTemporaryRoot, redactCodexEvalValue } from './codex-eval-runtime-config.js';
|
|
6
|
+
import { applyCodexEvalGitIsolation } from './codex-eval-isolation.js';
|
|
7
|
+
import { runProviderProcess } from './process.js';
|
|
8
|
+
function object(value, label) {
|
|
9
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
10
|
+
throw new Error(`${label} must be an object.`);
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
function exact(value, required, optional, label) {
|
|
14
|
+
if (required.some((key) => !Object.hasOwn(value, key)))
|
|
15
|
+
throw new Error(`${label} is missing a required field.`);
|
|
16
|
+
if (Object.keys(value).some((key) => ![...required, ...optional].includes(key)))
|
|
17
|
+
throw new Error(`${label} has an unknown field.`);
|
|
18
|
+
}
|
|
19
|
+
function relative(value) {
|
|
20
|
+
if (typeof value !== 'string' || !value || Buffer.byteLength(value) > 1_024 || value.includes('\\') || value.includes('\0')
|
|
21
|
+
|| path.posix.isAbsolute(value) || value.split('/').some((segment) => !segment || segment === '.' || segment === '..')) {
|
|
22
|
+
throw new Error('workflow fixture asset must be a normalized relative path.');
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
function json(value, depth = 0) {
|
|
27
|
+
if (depth > 8)
|
|
28
|
+
throw new Error('workflow fixture JSON depth limit exceeded.');
|
|
29
|
+
if (value === null || typeof value === 'boolean' || typeof value === 'string')
|
|
30
|
+
return value;
|
|
31
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
32
|
+
return value;
|
|
33
|
+
if (Array.isArray(value) && value.length <= 128)
|
|
34
|
+
return value.map((entry) => json(entry, depth + 1));
|
|
35
|
+
const entries = Object.entries(object(value, 'workflow fixture JSON'));
|
|
36
|
+
if (entries.length > 128)
|
|
37
|
+
throw new Error('workflow fixture JSON field limit exceeded.');
|
|
38
|
+
return Object.fromEntries(entries.map(([key, entry]) => [key, json(entry, depth + 1)]));
|
|
39
|
+
}
|
|
40
|
+
export function parseWorkflowFixtureAction(value) {
|
|
41
|
+
const action = object(value, 'workflow fixture action');
|
|
42
|
+
exact(action, ['command', 'input'], ['pathPrepend'], 'workflow fixture action');
|
|
43
|
+
if (!Array.isArray(action.command) || action.command.length !== 2 || action.command[0] !== 'node') {
|
|
44
|
+
throw new Error('workflow fixture command must be ["node", relative fixture script].');
|
|
45
|
+
}
|
|
46
|
+
const input = json(action.input);
|
|
47
|
+
if (Buffer.byteLength(JSON.stringify(input)) > 200_000)
|
|
48
|
+
throw new Error('workflow fixture input byte limit exceeded.');
|
|
49
|
+
let pathPrepend;
|
|
50
|
+
if (action.pathPrepend !== undefined) {
|
|
51
|
+
if (!Array.isArray(action.pathPrepend) || action.pathPrepend.length > 8)
|
|
52
|
+
throw new Error('workflow fixture pathPrepend has too many entries.');
|
|
53
|
+
pathPrepend = action.pathPrepend.map(relative);
|
|
54
|
+
if (new Set(pathPrepend).size !== pathPrepend.length)
|
|
55
|
+
throw new Error('workflow fixture pathPrepend must be unique.');
|
|
56
|
+
}
|
|
57
|
+
return { command: ['node', relative(action.command[1])], input, ...(pathPrepend ? { pathPrepend } : {}) };
|
|
58
|
+
}
|
|
59
|
+
async function fixtureAsset(root, relativePath, directory = false) {
|
|
60
|
+
let current = root;
|
|
61
|
+
for (const segment of relative(relativePath).split('/')) {
|
|
62
|
+
current = path.join(current, segment);
|
|
63
|
+
if ((await fs.lstat(current)).isSymbolicLink())
|
|
64
|
+
throw new Error('workflow fixture assets must not contain symbolic links.');
|
|
65
|
+
}
|
|
66
|
+
const info = await fs.lstat(current);
|
|
67
|
+
if (directory ? !info.isDirectory() : !info.isFile() || info.size > 1024 * 1024)
|
|
68
|
+
throw new Error('workflow fixture asset kind or size is invalid.');
|
|
69
|
+
if (directory) {
|
|
70
|
+
for (const entry of await fs.readdir(current)) {
|
|
71
|
+
const child = await fs.lstat(path.join(current, entry));
|
|
72
|
+
if (child.isSymbolicLink() || (!child.isDirectory() && !child.isFile()))
|
|
73
|
+
throw new Error('workflow fixture PATH tree contains an unsafe node.');
|
|
74
|
+
if (child.isDirectory())
|
|
75
|
+
await fixtureAsset(root, `${relativePath}/${entry}`, true);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return current;
|
|
79
|
+
}
|
|
80
|
+
export async function validateWorkflowFixtureActions(actions, fixtures) {
|
|
81
|
+
for (const action of actions) {
|
|
82
|
+
await fixtureAsset(fixtures, action.command[1]);
|
|
83
|
+
for (const directory of action.pathPrepend ?? [])
|
|
84
|
+
await fixtureAsset(fixtures, directory, true);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export async function runWorkflowFixtureAction(options) {
|
|
88
|
+
await validateWorkflowFixtureActions([options.action], options.fixtures);
|
|
89
|
+
const script = await fixtureAsset(options.fixtures, options.action.command[1]);
|
|
90
|
+
const scriptSha256 = createHash('sha256').update(await fs.readFile(script)).digest('hex');
|
|
91
|
+
const temporaryRoot = await createCodexEvalTemporaryRoot('workflow-fixture-');
|
|
92
|
+
const root = await fs.realpath(temporaryRoot.root);
|
|
93
|
+
try {
|
|
94
|
+
const environment = {};
|
|
95
|
+
for (const key of ['PATH', 'LANG', 'LC_ALL'])
|
|
96
|
+
if (options.sourceEnv[key] !== undefined)
|
|
97
|
+
environment[key] = options.sourceEnv[key];
|
|
98
|
+
environment.PATH = [...(options.action.pathPrepend ?? []).map((entry) => path.join(options.fixtures, entry)), environment.PATH ?? ''].join(path.delimiter);
|
|
99
|
+
const env = applyCodexEvalGitIsolation({ ...environment, HOME: path.join(root, 'home'), USERPROFILE: path.join(root, 'home'),
|
|
100
|
+
TMPDIR: path.join(root, 'tmp'), TEMP: path.join(root, 'tmp'), TMP: path.join(root, 'tmp'), NO_COLOR: '1' });
|
|
101
|
+
await Promise.all([fs.ensureDir(env.HOME), fs.ensureDir(env.TMPDIR)]);
|
|
102
|
+
const allowed = [options.workspace, options.fixtures, root, path.dirname(process.execPath), '/System', '/usr', '/bin', '/sbin', '/dev', '/Library/Developer/CommandLineTools'];
|
|
103
|
+
let profile = [
|
|
104
|
+
'(version 1)', '(allow default)',
|
|
105
|
+
// macOS executable startup needs the root directory; descendants remain restricted.
|
|
106
|
+
`(deny file-read-data (require-all (require-not (literal "/")) ${allowed.map((entry) => `(require-not (subpath ${JSON.stringify(entry)}))`).join(' ')}))`,
|
|
107
|
+
'(deny file-write*)',
|
|
108
|
+
'(allow file-write* (literal "/dev/null"))', '(allow file-read* (literal "/dev/null") (literal "/dev/urandom"))',
|
|
109
|
+
...[options.workspace, root].map((entry) => `(allow file-write* (subpath ${JSON.stringify(entry)}))`),
|
|
110
|
+
`(deny file-read* (subpath ${JSON.stringify(options.output)}))`,
|
|
111
|
+
].join('\n');
|
|
112
|
+
for (const entry of allowed) {
|
|
113
|
+
for (let ancestor = path.dirname(entry); ancestor !== path.dirname(ancestor); ancestor = path.dirname(ancestor)) {
|
|
114
|
+
profile += `\n(allow file-read-metadata (literal ${JSON.stringify(ancestor)}))`;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
await assertHostReadContainmentAvailable(profile);
|
|
118
|
+
const result = await runProviderProcess({
|
|
119
|
+
executable: '/usr/bin/sandbox-exec', args: ['-p', profile, process.execPath, script], cwd: options.workspace, env,
|
|
120
|
+
stdin: JSON.stringify({ version: 1, input: options.action.input, paths: { workspace: options.workspace, fixtures: options.fixtures } }),
|
|
121
|
+
timeoutMs: options.timeoutMs, maxBufferBytes: 1024 * 1024, ...(options.signal ? { signal: options.signal } : {}),
|
|
122
|
+
}, {}, {
|
|
123
|
+
containment: options.processManagement.mode === 'unmanaged-confirmed' ? 'unmanaged-confirmed' : 'verified-observed',
|
|
124
|
+
...(options.processManagement.mode === 'unmanaged-confirmed' ? {} : { processTree: options.processTree }),
|
|
125
|
+
});
|
|
126
|
+
if (result.exitCode !== 0 || result.signal || result.timedOut || result.cancelled || result.maxBufferExceeded
|
|
127
|
+
|| (options.processManagement.mode !== 'unmanaged-confirmed' && !result.gradingEvidenceAccepted)) {
|
|
128
|
+
throw new Error('workflow fixture action did not finish with confirmed process cleanup; no answer or grade was released.');
|
|
129
|
+
}
|
|
130
|
+
const value = object(JSON.parse(result.stdout), 'workflow fixture receipt');
|
|
131
|
+
exact(value, ['version', 'completed', 'artifacts', 'evidence'], [], 'workflow fixture receipt');
|
|
132
|
+
if (value.version !== 1 || value.completed !== true || !Array.isArray(value.artifacts) || value.artifacts.length > 64) {
|
|
133
|
+
throw new Error('workflow fixture action returned an invalid factual receipt.');
|
|
134
|
+
}
|
|
135
|
+
const artifacts = value.artifacts.map(relative);
|
|
136
|
+
for (const artifact of artifacts)
|
|
137
|
+
await fixtureAsset(options.workspace, artifact);
|
|
138
|
+
return redactCodexEvalValue({ receipt: { version: 1, completed: true, artifacts, evidence: json(value.evidence) }, scriptSha256 }, options.runtime);
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
await temporaryRoot.cleanup();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=codex-workflow-fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-workflow-fixtures.js","sourceRoot":"","sources":["../src/codex-workflow-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB,OAAO,EAAE,kCAAkC,EAA2C,MAAM,4BAA4B,CAAA;AACxH,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAA+B,MAAM,gCAAgC,CAAA;AAChI,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAmBjD,SAAS,MAAM,CAAC,KAAc,EAAE,KAAa;IAC3C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qBAAqB,CAAC,CAAA;IAC/G,OAAO,KAAgC,CAAA;AACzC,CAAC;AAED,SAAS,KAAK,CAAC,KAA8B,EAAE,QAAkB,EAAE,QAAkB,EAAE,KAAa;IAClG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,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,CAAC,QAAQ,CAAC,EAAE,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;IACrJ,CAAC;YAAS,CAAC;QACT,MAAM,aAAa,CAAC,OAAO,EAAE,CAAA;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { type CodexEvalProcessManagementEvidence } from './codex-eval-app-server.js';
|
|
2
|
+
import { type CodexEvalRuntimeConfig } from './codex-eval-runtime-config.js';
|
|
3
|
+
import { type InstructionV2ReasoningEffort, type InstructionV2Receipt, type InstructionV2Transport } from './instruction-v2.js';
|
|
4
|
+
import type { ProcessTreeDependencies } from './process-tree.js';
|
|
5
|
+
import { type EvalProviderRunInput, type EvalProviderRunResult } from './custom-process.js';
|
|
6
|
+
import { type WorkflowEvaluationRequest } from './codex-workflow-evaluation.js';
|
|
7
|
+
export declare const CODEX_WORKFLOW_ARTIFACTS: readonly [{
|
|
8
|
+
readonly path: "workflow-evidence.json";
|
|
9
|
+
readonly role: "evidence";
|
|
10
|
+
}, {
|
|
11
|
+
readonly path: "workflow-trace.json";
|
|
12
|
+
readonly role: "trace";
|
|
13
|
+
}, {
|
|
14
|
+
readonly path: "model-output.txt";
|
|
15
|
+
readonly role: "output";
|
|
16
|
+
}];
|
|
17
|
+
export interface CodexWorkflowProvider {
|
|
18
|
+
type: 'codex-workflow';
|
|
19
|
+
command: readonly [string, ...string[]];
|
|
20
|
+
allowedModels: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
export interface CodexWorkflowRole {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
configFile: string;
|
|
26
|
+
}
|
|
27
|
+
export interface CodexWorkflowRequest {
|
|
28
|
+
version: 1;
|
|
29
|
+
prompt: string;
|
|
30
|
+
sandbox: 'read-only' | 'workspace-write';
|
|
31
|
+
model: string | null;
|
|
32
|
+
reasoningEffort?: InstructionV2ReasoningEffort;
|
|
33
|
+
developerInstructions: string;
|
|
34
|
+
roles: CodexWorkflowRole[];
|
|
35
|
+
evaluation?: WorkflowEvaluationRequest;
|
|
36
|
+
transport?: InstructionV2Transport;
|
|
37
|
+
multiAgent: {
|
|
38
|
+
protocol: 'v1' | 'v2';
|
|
39
|
+
maxDepth: number;
|
|
40
|
+
hideSpawnAgentMetadata: boolean;
|
|
41
|
+
exposeSpawnAgentModelOverrides: boolean;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface CodexWorkflowArtifact {
|
|
45
|
+
path: string;
|
|
46
|
+
role: string;
|
|
47
|
+
}
|
|
48
|
+
export interface CodexWorkflowAdapterInput {
|
|
49
|
+
version: 1;
|
|
50
|
+
phase: 'prepare' | 'grade';
|
|
51
|
+
case: Record<string, unknown>;
|
|
52
|
+
variant: EvalProviderRunInput['variant'];
|
|
53
|
+
attempt: number;
|
|
54
|
+
paths: {
|
|
55
|
+
workspace: string;
|
|
56
|
+
fixtures: string;
|
|
57
|
+
output: string;
|
|
58
|
+
evidence?: string;
|
|
59
|
+
modelOutput?: string;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface CodexWorkflowCall {
|
|
63
|
+
ordinal: number;
|
|
64
|
+
threadId: string;
|
|
65
|
+
parentThreadId: string | null;
|
|
66
|
+
linkedThreadId?: string;
|
|
67
|
+
callId: string | null;
|
|
68
|
+
namespace: string | null;
|
|
69
|
+
tool: string;
|
|
70
|
+
arguments: unknown;
|
|
71
|
+
effectiveRuntime?: {
|
|
72
|
+
model?: string;
|
|
73
|
+
reasoningEffort?: string;
|
|
74
|
+
};
|
|
75
|
+
output: unknown;
|
|
76
|
+
status: string | null;
|
|
77
|
+
}
|
|
78
|
+
export interface CodexWorkflowEvidence {
|
|
79
|
+
version: 1;
|
|
80
|
+
rootThreadId: string;
|
|
81
|
+
completion: {
|
|
82
|
+
status: 'completed' | 'failed' | 'cancelled' | 'unknown';
|
|
83
|
+
turnStatus: string;
|
|
84
|
+
durationMs: number;
|
|
85
|
+
};
|
|
86
|
+
termination: {
|
|
87
|
+
reason: 'completed' | 'failed' | 'cancelled' | 'unknown';
|
|
88
|
+
appServerProcessTreeCleanupConfirmed?: true;
|
|
89
|
+
providerProcessCleanupConfirmed?: boolean;
|
|
90
|
+
};
|
|
91
|
+
usage: unknown;
|
|
92
|
+
finalMessage: string;
|
|
93
|
+
workspaceDiff: {
|
|
94
|
+
added: string[];
|
|
95
|
+
removed: string[];
|
|
96
|
+
modified: string[];
|
|
97
|
+
};
|
|
98
|
+
skillLoads: Array<{
|
|
99
|
+
threadId: string;
|
|
100
|
+
skill: string;
|
|
101
|
+
callId: string | null;
|
|
102
|
+
}>;
|
|
103
|
+
threadGraph: Array<{
|
|
104
|
+
threadId: string;
|
|
105
|
+
parentThreadId: string | null;
|
|
106
|
+
agentRole: string | null;
|
|
107
|
+
initialMessage: {
|
|
108
|
+
kind: 'plaintext';
|
|
109
|
+
text: string;
|
|
110
|
+
} | {
|
|
111
|
+
kind: 'opaque-link';
|
|
112
|
+
sha256: string;
|
|
113
|
+
linkedCallId: string;
|
|
114
|
+
} | null;
|
|
115
|
+
developerContext: {
|
|
116
|
+
present: boolean;
|
|
117
|
+
messageCount: number;
|
|
118
|
+
sha256: string | null;
|
|
119
|
+
hasMultiAgentModeGate: boolean;
|
|
120
|
+
hasNestedAgentCapability: boolean;
|
|
121
|
+
hasCodexExploreDeveloperAuthorization: boolean;
|
|
122
|
+
};
|
|
123
|
+
}>;
|
|
124
|
+
collaborationCalls: CodexWorkflowCall[];
|
|
125
|
+
leafCalls: CodexWorkflowCall[];
|
|
126
|
+
cleanup: {
|
|
127
|
+
isolatedCodexHomeRemoved: true;
|
|
128
|
+
};
|
|
129
|
+
evaluation?: Record<string, unknown>;
|
|
130
|
+
launch?: {
|
|
131
|
+
instructionChannel: 'developer';
|
|
132
|
+
developerInstructions: string;
|
|
133
|
+
instructionsRevision: string;
|
|
134
|
+
model: string | null;
|
|
135
|
+
reasoningEffort: InstructionV2ReasoningEffort | null;
|
|
136
|
+
sandbox: CodexWorkflowRequest['sandbox'];
|
|
137
|
+
roles: CodexWorkflowRole[];
|
|
138
|
+
configOverrides: string[];
|
|
139
|
+
hostRoleAdoption: 'unknown';
|
|
140
|
+
};
|
|
141
|
+
transport?: {
|
|
142
|
+
type: 'instruction-v2';
|
|
143
|
+
request: InstructionV2Transport['request'];
|
|
144
|
+
command: readonly string[];
|
|
145
|
+
receipt: InstructionV2Receipt | null;
|
|
146
|
+
traceAvailable: boolean;
|
|
147
|
+
observationLimits: string[];
|
|
148
|
+
diagnostic: string | null;
|
|
149
|
+
exitCode: number | null;
|
|
150
|
+
signal: NodeJS.Signals | null;
|
|
151
|
+
stderr: string;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export interface CodexWorkflowExecutionResult {
|
|
155
|
+
evidence: CodexWorkflowEvidence;
|
|
156
|
+
trace: unknown[];
|
|
157
|
+
modelOutput: string;
|
|
158
|
+
usage: unknown;
|
|
159
|
+
}
|
|
160
|
+
export interface CodexWorkflowTransportInput {
|
|
161
|
+
request: CodexWorkflowRequest;
|
|
162
|
+
input: EvalProviderRunInput;
|
|
163
|
+
evalRoot: string;
|
|
164
|
+
codexRuntime: CodexEvalRuntimeConfig;
|
|
165
|
+
codexBin: string;
|
|
166
|
+
sourceEnv: NodeJS.ProcessEnv;
|
|
167
|
+
timeoutMs: number;
|
|
168
|
+
processManagement: CodexEvalProcessManagementEvidence;
|
|
169
|
+
processTree?: ProcessTreeDependencies;
|
|
170
|
+
protectedEvalRoots?: readonly string[];
|
|
171
|
+
signal?: AbortSignal;
|
|
172
|
+
}
|
|
173
|
+
export interface CodexWorkflowTransport {
|
|
174
|
+
run(input: CodexWorkflowTransportInput): Promise<CodexWorkflowExecutionResult>;
|
|
175
|
+
}
|
|
176
|
+
export interface CodexWorkflowExecutorOptions {
|
|
177
|
+
provider: CodexWorkflowProvider;
|
|
178
|
+
evalRoot: string;
|
|
179
|
+
input: EvalProviderRunInput;
|
|
180
|
+
codexRuntime: CodexEvalRuntimeConfig;
|
|
181
|
+
sourceEnv?: NodeJS.ProcessEnv;
|
|
182
|
+
codexBin?: string;
|
|
183
|
+
platform?: NodeJS.Platform;
|
|
184
|
+
processTree?: ProcessTreeDependencies;
|
|
185
|
+
processManagement?: CodexEvalProcessManagementEvidence;
|
|
186
|
+
transport?: CodexWorkflowTransport;
|
|
187
|
+
protectedEvalRoots?: readonly string[];
|
|
188
|
+
}
|
|
189
|
+
export declare function parseCodexWorkflowRequest(value: unknown, allowedModels: readonly string[], workspace: string, fixtures?: string): Promise<CodexWorkflowRequest>;
|
|
190
|
+
export declare function codexWorkflowAdapterEnvironment(sourceEnv: NodeJS.ProcessEnv, evalRoot: string, phase: 'prepare' | 'grade'): NodeJS.ProcessEnv;
|
|
191
|
+
export declare function codexWorkflowFrameThreadId(frame: Record<string, unknown>): string | null;
|
|
192
|
+
export declare function codexWorkflowFrameIsForRoot(frame: Record<string, unknown>, rootThreadId: string): boolean;
|
|
193
|
+
export declare function codexWorkflowMissingFinalMessageDiagnostic(options: {
|
|
194
|
+
frames: readonly unknown[];
|
|
195
|
+
rootThreadId: string;
|
|
196
|
+
turnStatus: string | null;
|
|
197
|
+
usage: unknown;
|
|
198
|
+
}): {
|
|
199
|
+
rootTurnStatus: string | null;
|
|
200
|
+
rootFinalAgentMessageCount: number;
|
|
201
|
+
otherThreadFinalAgentMessageCount: number;
|
|
202
|
+
usagePresent: boolean;
|
|
203
|
+
frameCount: number;
|
|
204
|
+
};
|
|
205
|
+
export declare function normalizeCodexWorkflowRollouts(options: {
|
|
206
|
+
codexHome: string;
|
|
207
|
+
rootThreadId: string;
|
|
208
|
+
request: CodexWorkflowRequest;
|
|
209
|
+
runtime: CodexEvalRuntimeConfig;
|
|
210
|
+
appServerFrames?: readonly unknown[];
|
|
211
|
+
isolatedPaths?: readonly {
|
|
212
|
+
path: string;
|
|
213
|
+
marker: string;
|
|
214
|
+
}[];
|
|
215
|
+
}): Promise<{
|
|
216
|
+
threadGraph: CodexWorkflowEvidence['threadGraph'];
|
|
217
|
+
collaborationCalls: CodexWorkflowCall[];
|
|
218
|
+
leafCalls: CodexWorkflowCall[];
|
|
219
|
+
skillLoads: CodexWorkflowEvidence['skillLoads'];
|
|
220
|
+
trace: unknown[];
|
|
221
|
+
}>;
|
|
222
|
+
export declare function executeCodexWorkflowProvider(options: CodexWorkflowExecutorOptions): Promise<EvalProviderRunResult & {
|
|
223
|
+
artifacts: CodexWorkflowArtifact[];
|
|
224
|
+
}>;
|