stitchkit 0.130.0 → 0.131.0
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/CHANGELOG.md +48 -0
- package/dist/agent-executor/acp/v1-connect.d.ts +40 -26
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-driver.d.ts +10 -4
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-handlers.d.ts +6 -2
- package/dist/agent-executor/acp/v1-handlers.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-probe.d.ts +38 -0
- package/dist/agent-executor/acp/v1-probe.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts +15 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts +9 -7
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/claude/cli-driver.d.ts +7 -7
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
- package/dist/agent-executor/claude/limits.d.ts +6 -4
- package/dist/agent-executor/claude/limits.d.ts.map +1 -1
- package/dist/agent-executor/claude/session.d.ts +3 -3
- package/dist/agent-executor/claude/session.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/controls.d.ts +1 -0
- package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/driver.d.ts +51 -50
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/probe.d.ts +3 -3
- package/dist/agent-executor/claude-sdk/probe.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/query-loop.d.ts +2 -1
- package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -1
- package/dist/agent-executor/codex/classify.d.ts.map +1 -1
- package/dist/agent-executor/codex/connect.d.ts +9 -7
- package/dist/agent-executor/codex/connect.d.ts.map +1 -1
- package/dist/agent-executor/codex/control-client.d.ts +112 -87
- package/dist/agent-executor/codex/control-client.d.ts.map +1 -1
- package/dist/agent-executor/codex/control-read-methods.d.ts +7 -0
- package/dist/agent-executor/codex/control-read-methods.d.ts.map +1 -0
- package/dist/agent-executor/codex/driver.d.ts +42 -31
- package/dist/agent-executor/codex/driver.d.ts.map +1 -1
- package/dist/agent-executor/codex/event-routing.d.ts +14 -0
- package/dist/agent-executor/codex/event-routing.d.ts.map +1 -0
- package/dist/agent-executor/codex/handlers.d.ts +9 -4
- package/dist/agent-executor/codex/handlers.d.ts.map +1 -1
- package/dist/agent-executor/codex/limits.d.ts +9 -3
- package/dist/agent-executor/codex/limits.d.ts.map +1 -1
- package/dist/agent-executor/codex/notifications.d.ts +183 -0
- package/dist/agent-executor/codex/notifications.d.ts.map +1 -0
- package/dist/agent-executor/codex/pagination.d.ts +54 -0
- package/dist/agent-executor/codex/pagination.d.ts.map +1 -0
- package/dist/agent-executor/codex/protocol.d.ts +586 -144
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/request-answers.d.ts +4 -2
- package/dist/agent-executor/codex/request-answers.d.ts.map +1 -1
- package/dist/agent-executor/codex/responses.d.ts +855 -0
- package/dist/agent-executor/codex/responses.d.ts.map +1 -0
- package/dist/agent-executor/codex/session-bind.d.ts +410 -0
- package/dist/agent-executor/codex/session-bind.d.ts.map +1 -0
- package/dist/agent-executor/codex/session-controls.d.ts +21 -169
- package/dist/agent-executor/codex/session-controls.d.ts.map +1 -1
- package/dist/agent-executor/codex/session-types.d.ts +190 -0
- package/dist/agent-executor/codex/session-types.d.ts.map +1 -0
- package/dist/agent-executor/codex/session.d.ts +5 -53
- package/dist/agent-executor/codex/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/shared-server.d.ts +7 -5
- package/dist/agent-executor/codex/shared-server.d.ts.map +1 -1
- package/dist/agent-executor/codex/shared-thread.d.ts +8 -8
- package/dist/agent-executor/codex/shared-thread.d.ts.map +1 -1
- package/dist/agent-executor/codex/thread-controls.d.ts +61 -36
- package/dist/agent-executor/codex/thread-controls.d.ts.map +1 -1
- package/dist/agent-executor/codex/thread-list-query.d.ts +5 -0
- package/dist/agent-executor/codex/thread-list-query.d.ts.map +1 -0
- package/dist/agent-executor/codex/thread-open.d.ts +66 -0
- package/dist/agent-executor/codex/thread-open.d.ts.map +1 -0
- package/dist/agent-executor/codex/turn-input.d.ts +25 -7
- package/dist/agent-executor/codex/turn-input.d.ts.map +1 -1
- package/dist/agent-executor/codex/unix-socket-target.d.ts +12 -3
- package/dist/agent-executor/codex/unix-socket-target.d.ts.map +1 -1
- package/dist/agent-executor/codex/ws-frame.d.ts +4 -1
- package/dist/agent-executor/codex/ws-frame.d.ts.map +1 -1
- package/dist/agent-executor/contract.d.ts +3 -1
- package/dist/agent-executor/contract.d.ts.map +1 -1
- package/dist/agent-executor/engine-process.d.ts +4 -4
- package/dist/agent-executor/engine-process.d.ts.map +1 -1
- package/dist/agent-executor/engine.d.ts +3 -3
- package/dist/agent-executor/engine.d.ts.map +1 -1
- package/dist/agent-executor/handoff.d.ts.map +1 -1
- package/dist/agent-executor/hello.d.ts +7 -0
- package/dist/agent-executor/hello.d.ts.map +1 -1
- package/dist/agent-executor/json-rpc-peer.d.ts +9 -4
- package/dist/agent-executor/json-rpc-peer.d.ts.map +1 -1
- package/dist/agent-executor/leases.d.ts +1 -1
- package/dist/agent-executor/leases.d.ts.map +1 -1
- package/dist/agent-executor/plan-limits.d.ts +12 -1
- package/dist/agent-executor/plan-limits.d.ts.map +1 -1
- package/dist/agent-executor/profile.d.ts +7 -0
- package/dist/agent-executor/profile.d.ts.map +1 -1
- package/dist/agent-executor/session-primitives.d.ts +8 -0
- package/dist/agent-executor/session-primitives.d.ts.map +1 -1
- package/dist/agent-executor/testing/consumer-stubs.d.ts +45 -0
- package/dist/agent-executor/testing/consumer-stubs.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-claude-sdk-query.d.ts +88 -0
- package/dist/agent-executor/testing/fake-claude-sdk-query.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-codex-app-server.d.ts +56 -0
- package/dist/agent-executor/testing/fake-codex-app-server.d.ts.map +1 -0
- package/dist/agent-executor/testing/fixtures.d.ts +26 -0
- package/dist/agent-executor/testing/fixtures.d.ts.map +1 -0
- package/dist/agent-executor/testing/replay-driver.d.ts +8 -8
- package/dist/agent-executor/testing/replay-driver.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-runner.d.ts +3 -2
- package/dist/agent-executor/testing/replay-runner.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-transcript.d.ts +5 -3
- package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +5 -5
- package/dist/entrypoints/agent-executor/acp.d.ts +2 -1
- package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +284 -82
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts +4 -0
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/claude-sdk.js +58 -32
- package/dist/entrypoints/agent-executor/claude.d.ts +2 -2
- package/dist/entrypoints/agent-executor/claude.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/claude.js +25 -20
- package/dist/entrypoints/agent-executor/codex.d.ts +11 -6
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/codex.js +2223 -1803
- package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
- package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/testing.js +880 -18
- package/dist/entrypoints/agent-executor.d.ts +3 -3
- package/dist/entrypoints/agent-executor.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor.js +42 -8
- package/dist/entrypoints/process.js +3 -3
- package/dist/{index-jrn3prgm.js → index-32vaajec.js} +29 -4
- package/dist/{index-p1qmpq0p.js → index-64e9p079.js} +92 -56
- package/dist/{index-dbp6xemn.js → index-g2d9kws8.js} +199 -3
- package/dist/index-gm9yz82v.js +56 -0
- package/dist/index-j15dhkda.js +749 -0
- package/dist/{index-1q0n6zek.js → index-kwsr7j5k.js} +84 -44
- package/llms/agent-executor-acp.txt +5 -5
- package/llms/agent-executor-claude-sdk.txt +3 -1
- package/llms/agent-executor-claude.txt +2 -2
- package/llms/agent-executor-codex.txt +13 -10
- package/llms/agent-executor-testing.txt +5 -1
- package/llms/agent-executor.txt +4 -4
- package/llms/stitchkit.txt +75 -74
- package/llms/{upgrading-0.128.0-0.130.0.txt → upgrading-0.128.0-0.131.0.txt} +56 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +160 -97
- package/llms.txt +8 -8
- package/package.json +3 -3
- package/dist/index-2s8sy57y.js +0 -229
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import
|
|
2
|
+
import { JsonRpcRecordSchema } from '../json-rpc-peer.js';
|
|
3
3
|
/**
|
|
4
4
|
* The slice of Codex's app-server protocol (0.171.0, JSON-RPC over stdio or
|
|
5
5
|
* WebSocket-over-Unix-socket without the `jsonrpc` header) the driver reads.
|
|
@@ -7,10 +7,124 @@ import type { JsonRpcValue } from '../json-rpc-peer.js';
|
|
|
7
7
|
* the JSON Schema the pinned CLI generates, so a renamed field fails there and
|
|
8
8
|
* not in a turn.
|
|
9
9
|
*/
|
|
10
|
+
/** Typed protocol error raised when a Codex app-server response or notification violates its schema. */
|
|
11
|
+
export declare class CodexProtocolError extends Error {
|
|
12
|
+
readonly method: string;
|
|
13
|
+
readonly cause: z.ZodError;
|
|
14
|
+
constructor(method: string, cause: z.ZodError, message?: string);
|
|
15
|
+
}
|
|
16
|
+
/** Parse a Codex JSON-RPC payload with `schema`, wrapping any `ZodError` in {@link CodexProtocolError}. */
|
|
17
|
+
export declare function parseCodexResponse<T>(method: string, schema: z.ZodType<T>, raw: unknown, kind?: 'response' | 'notification'): T;
|
|
18
|
+
/** Fallback schema for open-variant unions (`{ type: string }`) preserving TS narrowing. */
|
|
19
|
+
export declare function unknownTypedRecordSchema<TDisallowed extends Record<string, never | undefined>>(knownTypes: ReadonlySet<string>): z.ZodCustom<{
|
|
20
|
+
readonly type: string;
|
|
21
|
+
} & TDisallowed, {
|
|
22
|
+
readonly type: string;
|
|
23
|
+
} & TDisallowed>;
|
|
24
|
+
/** Zod schema for approval policies accepted by Codex `thread/start`, `thread/resume`, `thread/fork`, and `turn/start`. */
|
|
25
|
+
export declare const CodexApprovalPolicySchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
26
|
+
never: "never";
|
|
27
|
+
"on-failure": "on-failure";
|
|
28
|
+
"on-request": "on-request";
|
|
29
|
+
untrusted: "untrusted";
|
|
30
|
+
}>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
10
31
|
/** Approval policy values accepted by Codex `thread/start`, `thread/resume`, `thread/fork`, and `turn/start`. */
|
|
11
|
-
export type CodexApprovalPolicy = 'untrusted' | 'on-failure' | 'on-request' | 'never' | Readonly<
|
|
32
|
+
export type CodexApprovalPolicy = 'untrusted' | 'on-failure' | 'on-request' | 'never' | Readonly<z.infer<typeof JsonRpcRecordSchema>>;
|
|
33
|
+
/** Zod schema for sandbox modes accepted by Codex `thread/start`, `thread/resume`, and `thread/fork`. */
|
|
34
|
+
export declare const CodexSandboxModeSchema: z.ZodEnum<{
|
|
35
|
+
"danger-full-access": "danger-full-access";
|
|
36
|
+
"read-only": "read-only";
|
|
37
|
+
"workspace-write": "workspace-write";
|
|
38
|
+
}>;
|
|
12
39
|
/** Sandbox mode values accepted by Codex `thread/start`, `thread/resume`, and `thread/fork`. */
|
|
13
|
-
export type CodexSandboxMode =
|
|
40
|
+
export type CodexSandboxMode = z.infer<typeof CodexSandboxModeSchema>;
|
|
41
|
+
/** Open-variant Zod schema for Codex `SandboxPolicy` (known 0.171.0 variants strictly validated; unknown future `type` passes through). */
|
|
42
|
+
export declare const CodexSandboxPolicySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"dangerFullAccess">;
|
|
44
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<"readOnly">;
|
|
46
|
+
networkAccess: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<"externalSandbox">;
|
|
49
|
+
networkAccess: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
51
|
+
type: z.ZodLiteral<"workspaceWrite">;
|
|
52
|
+
writableRoots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
|
+
networkAccess: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
excludeTmpdirEnvVar: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
excludeSlashTmp: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
57
|
+
readonly type: string;
|
|
58
|
+
} & {
|
|
59
|
+
readonly writableRoots?: never;
|
|
60
|
+
readonly networkAccess?: never;
|
|
61
|
+
readonly excludeTmpdirEnvVar?: never;
|
|
62
|
+
readonly excludeSlashTmp?: never;
|
|
63
|
+
}, {
|
|
64
|
+
readonly type: string;
|
|
65
|
+
} & {
|
|
66
|
+
readonly writableRoots?: never;
|
|
67
|
+
readonly networkAccess?: never;
|
|
68
|
+
readonly excludeTmpdirEnvVar?: never;
|
|
69
|
+
readonly excludeSlashTmp?: never;
|
|
70
|
+
}>]>;
|
|
71
|
+
/** Applied or per-turn Codex sandbox policy inferred from {@link CodexSandboxPolicySchema}. */
|
|
72
|
+
export type CodexSandboxPolicy = z.infer<typeof CodexSandboxPolicySchema>;
|
|
73
|
+
/** Open-variant Zod schema for Codex `ThreadStatus` (`notLoaded`, `idle`, `systemError`, `active`, or future variants). */
|
|
74
|
+
export declare const CodexThreadStatusSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
75
|
+
type: z.ZodLiteral<"notLoaded">;
|
|
76
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"idle">;
|
|
78
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
79
|
+
type: z.ZodLiteral<"systemError">;
|
|
80
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"active">;
|
|
82
|
+
activeFlags: z.ZodArray<z.ZodString>;
|
|
83
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
84
|
+
readonly type: string;
|
|
85
|
+
} & {
|
|
86
|
+
readonly activeFlags?: never;
|
|
87
|
+
}, {
|
|
88
|
+
readonly type: string;
|
|
89
|
+
} & {
|
|
90
|
+
readonly activeFlags?: never;
|
|
91
|
+
}>]>;
|
|
92
|
+
/** Runtime thread status inferred from {@link CodexThreadStatusSchema}. */
|
|
93
|
+
export type CodexThreadStatus = z.infer<typeof CodexThreadStatusSchema>;
|
|
94
|
+
/** Zod schema for Codex turn lifecycle status (`completed`, `interrupted`, `failed`, `inProgress`). */
|
|
95
|
+
export declare const CodexTurnStatusSchema: z.ZodEnum<{
|
|
96
|
+
completed: "completed";
|
|
97
|
+
failed: "failed";
|
|
98
|
+
inProgress: "inProgress";
|
|
99
|
+
interrupted: "interrupted";
|
|
100
|
+
}>;
|
|
101
|
+
/** Turn lifecycle status inferred from {@link CodexTurnStatusSchema}. */
|
|
102
|
+
export type CodexTurnStatus = z.infer<typeof CodexTurnStatusSchema>;
|
|
103
|
+
/** Open-variant Zod schema for Codex `TurnItemsView` (`notLoaded`, `summary`, `full`, or future views). */
|
|
104
|
+
export declare const CodexTurnItemsViewSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
105
|
+
full: "full";
|
|
106
|
+
notLoaded: "notLoaded";
|
|
107
|
+
summary: "summary";
|
|
108
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
109
|
+
/** Turn items hydration level inferred from {@link CodexTurnItemsViewSchema}. */
|
|
110
|
+
export type CodexTurnItemsView = z.infer<typeof CodexTurnItemsViewSchema>;
|
|
111
|
+
/** Known `ThreadSourceKind` filter values accepted by Codex `thread/list` (`0.171.0`). */
|
|
112
|
+
export declare const CODEX_THREAD_SOURCE_KINDS: readonly ['cli', 'vscode', 'exec', 'appServer', 'subAgent', 'subAgentReview', 'subAgentCompact', 'subAgentThreadSpawn', 'subAgentOther', 'unknown'];
|
|
113
|
+
/** Zod schema for Codex `ThreadSourceKind` filter values accepted by `thread/list`. */
|
|
114
|
+
export declare const CodexThreadSourceKindSchema: z.ZodEnum<{
|
|
115
|
+
appServer: "appServer";
|
|
116
|
+
cli: "cli";
|
|
117
|
+
exec: "exec";
|
|
118
|
+
subAgent: "subAgent";
|
|
119
|
+
subAgentCompact: "subAgentCompact";
|
|
120
|
+
subAgentOther: "subAgentOther";
|
|
121
|
+
subAgentReview: "subAgentReview";
|
|
122
|
+
subAgentThreadSpawn: "subAgentThreadSpawn";
|
|
123
|
+
unknown: "unknown";
|
|
124
|
+
vscode: "vscode";
|
|
125
|
+
}>;
|
|
126
|
+
/** Thread source kind filter accepted by Codex `thread/list`. */
|
|
127
|
+
export type CodexThreadSourceKind = z.infer<typeof CodexThreadSourceKindSchema>;
|
|
14
128
|
/** Collaboration mode settings passed on `turn/start`. */
|
|
15
129
|
export declare const CodexCollaborationModeSchema: z.ZodObject<{
|
|
16
130
|
mode: z.ZodEnum<{
|
|
@@ -25,11 +139,14 @@ export declare const CodexCollaborationModeSchema: z.ZodObject<{
|
|
|
25
139
|
}, z.core.$strict>;
|
|
26
140
|
/** Collaboration mode override accepted by Codex `turn/start`. */
|
|
27
141
|
export type CodexCollaborationMode = z.infer<typeof CodexCollaborationModeSchema>;
|
|
142
|
+
/** Loose Zod schema for a Codex `ThreadItem` emitted in notifications and `thread/items/list`. */
|
|
28
143
|
export declare const CodexThreadItemSchema: z.ZodObject<{
|
|
29
144
|
type: z.ZodString;
|
|
30
145
|
id: z.ZodString;
|
|
31
146
|
}, z.core.$loose>;
|
|
147
|
+
/** Thread item inferred from {@link CodexThreadItemSchema}. */
|
|
32
148
|
export type CodexThreadItem = z.infer<typeof CodexThreadItemSchema>;
|
|
149
|
+
/** Loose Zod schema for a Codex `Turn` returned by turn lifecycle notifications. */
|
|
33
150
|
export declare const CodexTurnSchema: z.ZodObject<{
|
|
34
151
|
id: z.ZodString;
|
|
35
152
|
status: z.ZodEnum<{
|
|
@@ -46,34 +163,237 @@ export declare const CodexTurnSchema: z.ZodObject<{
|
|
|
46
163
|
type: z.ZodString;
|
|
47
164
|
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
165
|
}, z.core.$loose>>>;
|
|
166
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
167
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
168
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
169
|
+
rootTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
170
|
}, z.core.$loose>;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
171
|
+
/** Loose Zod schema for one item entry embedded inside a {@link CodexListedTurn}. */
|
|
172
|
+
export declare const CodexListedTurnItemSchema: z.ZodObject<{
|
|
173
|
+
type: z.ZodString;
|
|
174
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
}, z.core.$loose>;
|
|
176
|
+
/** Loose Zod schema for a turn returned by `thread/turns/list` or embedded in `Thread.turns`. */
|
|
177
|
+
export declare const CodexListedTurnSchema: z.ZodObject<{
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
status: z.ZodEnum<{
|
|
180
|
+
completed: "completed";
|
|
181
|
+
failed: "failed";
|
|
182
|
+
inProgress: "inProgress";
|
|
183
|
+
interrupted: "interrupted";
|
|
184
|
+
}>;
|
|
185
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
186
|
+
message: z.ZodString;
|
|
187
|
+
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
188
|
+
}, z.core.$loose>>>;
|
|
189
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
190
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
191
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
192
|
+
rootTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
|
+
items: z.ZodArray<z.ZodObject<{
|
|
194
|
+
type: z.ZodString;
|
|
195
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
+
}, z.core.$loose>>;
|
|
197
|
+
itemsView: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
198
|
+
full: "full";
|
|
199
|
+
notLoaded: "notLoaded";
|
|
200
|
+
summary: "summary";
|
|
201
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
202
|
+
}, z.core.$loose>;
|
|
203
|
+
/** Listed turn inferred from {@link CodexListedTurnSchema}. */
|
|
204
|
+
export type CodexListedTurn = z.infer<typeof CodexListedTurnSchema>;
|
|
205
|
+
/** Loose Zod schema for a page returned by Codex `thread/turns/list`. */
|
|
206
|
+
export declare const CodexTurnsPageSchema: z.ZodObject<{
|
|
207
|
+
data: z.ZodArray<z.ZodObject<{
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
status: z.ZodEnum<{
|
|
210
|
+
completed: "completed";
|
|
211
|
+
failed: "failed";
|
|
212
|
+
inProgress: "inProgress";
|
|
213
|
+
interrupted: "interrupted";
|
|
214
|
+
}>;
|
|
215
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
216
|
+
message: z.ZodString;
|
|
217
|
+
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
218
|
+
}, z.core.$loose>>>;
|
|
219
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
220
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
221
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
222
|
+
rootTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
|
+
items: z.ZodArray<z.ZodObject<{
|
|
65
224
|
type: z.ZodString;
|
|
66
|
-
|
|
67
|
-
}, z.core.$loose
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
225
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
|
+
}, z.core.$loose>>;
|
|
227
|
+
itemsView: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
228
|
+
full: "full";
|
|
229
|
+
notLoaded: "notLoaded";
|
|
230
|
+
summary: "summary";
|
|
231
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
232
|
+
}, z.core.$loose>>;
|
|
233
|
+
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
|
+
backwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
235
|
+
}, z.core.$loose>;
|
|
236
|
+
/** Paginated turns response inferred from {@link CodexTurnsPageSchema}. */
|
|
237
|
+
export type CodexTurnsPage = z.infer<typeof CodexTurnsPageSchema>;
|
|
238
|
+
/** Loose Zod schema for a Codex `Thread` returned across `thread/*` RPCs. */
|
|
239
|
+
export declare const CodexThreadSchema: z.ZodObject<{
|
|
240
|
+
id: z.ZodString;
|
|
241
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
243
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
244
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
|
+
modelProvider: z.ZodOptional<z.ZodString>;
|
|
246
|
+
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
247
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
248
|
+
type: z.ZodLiteral<"notLoaded">;
|
|
249
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
250
|
+
type: z.ZodLiteral<"idle">;
|
|
251
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
252
|
+
type: z.ZodLiteral<"systemError">;
|
|
253
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"active">;
|
|
255
|
+
activeFlags: z.ZodArray<z.ZodString>;
|
|
256
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
257
|
+
readonly type: string;
|
|
258
|
+
} & {
|
|
259
|
+
readonly activeFlags?: never;
|
|
260
|
+
}, {
|
|
261
|
+
readonly type: string;
|
|
262
|
+
} & {
|
|
263
|
+
readonly activeFlags?: never;
|
|
264
|
+
}>]>>;
|
|
265
|
+
canAcceptDirectInput: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
266
|
+
cliVersion: z.ZodOptional<z.ZodString>;
|
|
267
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
recencyAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
270
|
+
ephemeral: z.ZodOptional<z.ZodBoolean>;
|
|
271
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
272
|
+
source: z.ZodOptional<z.ZodJSONSchema>;
|
|
273
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
274
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
|
+
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
276
|
+
parentThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
+
attachedToThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
|
+
originator: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
279
|
+
agentNickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
280
|
+
agentRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
281
|
+
gitInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
282
|
+
turns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
283
|
+
id: z.ZodString;
|
|
284
|
+
status: z.ZodEnum<{
|
|
285
|
+
completed: "completed";
|
|
286
|
+
failed: "failed";
|
|
287
|
+
inProgress: "inProgress";
|
|
288
|
+
interrupted: "interrupted";
|
|
289
|
+
}>;
|
|
290
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
291
|
+
message: z.ZodString;
|
|
292
|
+
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
293
|
+
}, z.core.$loose>>>;
|
|
294
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
295
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
296
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
297
|
+
rootTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
+
items: z.ZodArray<z.ZodObject<{
|
|
71
299
|
type: z.ZodString;
|
|
72
|
-
|
|
73
|
-
}, z.core.$loose
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
300
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
+
}, z.core.$loose>>;
|
|
302
|
+
itemsView: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
303
|
+
full: "full";
|
|
304
|
+
notLoaded: "notLoaded";
|
|
305
|
+
summary: "summary";
|
|
306
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
307
|
+
}, z.core.$loose>>>;
|
|
308
|
+
}, z.core.$loose>;
|
|
309
|
+
/** Codex thread metadata inferred from {@link CodexThreadSchema}. */
|
|
310
|
+
export type CodexThread = z.infer<typeof CodexThreadSchema>;
|
|
311
|
+
/** Applied thread policy and runtime context returned by `thread/start`, `thread/resume`, or `thread/fork`. */
|
|
312
|
+
export declare const CodexThreadContextSchema: z.ZodObject<{
|
|
313
|
+
model: z.ZodOptional<z.ZodString>;
|
|
314
|
+
modelProvider: z.ZodOptional<z.ZodString>;
|
|
315
|
+
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
316
|
+
approvalPolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
317
|
+
never: "never";
|
|
318
|
+
"on-failure": "on-failure";
|
|
319
|
+
"on-request": "on-request";
|
|
320
|
+
untrusted: "untrusted";
|
|
321
|
+
}>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>>;
|
|
322
|
+
sandbox: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
323
|
+
type: z.ZodLiteral<"dangerFullAccess">;
|
|
324
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
325
|
+
type: z.ZodLiteral<"readOnly">;
|
|
326
|
+
networkAccess: z.ZodOptional<z.ZodBoolean>;
|
|
327
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
328
|
+
type: z.ZodLiteral<"externalSandbox">;
|
|
329
|
+
networkAccess: z.ZodOptional<z.ZodString>;
|
|
330
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
331
|
+
type: z.ZodLiteral<"workspaceWrite">;
|
|
332
|
+
writableRoots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
|
+
networkAccess: z.ZodOptional<z.ZodBoolean>;
|
|
334
|
+
excludeTmpdirEnvVar: z.ZodOptional<z.ZodBoolean>;
|
|
335
|
+
excludeSlashTmp: z.ZodOptional<z.ZodBoolean>;
|
|
336
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
337
|
+
readonly type: string;
|
|
338
|
+
} & {
|
|
339
|
+
readonly writableRoots?: never;
|
|
340
|
+
readonly networkAccess?: never;
|
|
341
|
+
readonly excludeTmpdirEnvVar?: never;
|
|
342
|
+
readonly excludeSlashTmp?: never;
|
|
343
|
+
}, {
|
|
344
|
+
readonly type: string;
|
|
345
|
+
} & {
|
|
346
|
+
readonly writableRoots?: never;
|
|
347
|
+
readonly networkAccess?: never;
|
|
348
|
+
readonly excludeTmpdirEnvVar?: never;
|
|
349
|
+
readonly excludeSlashTmp?: never;
|
|
350
|
+
}>]>>;
|
|
351
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
352
|
+
runtimeWorkspaceRoots: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
353
|
+
thread: z.ZodOptional<z.ZodObject<{
|
|
354
|
+
id: z.ZodString;
|
|
355
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
357
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
358
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
359
|
+
modelProvider: z.ZodOptional<z.ZodString>;
|
|
360
|
+
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
361
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
362
|
+
type: z.ZodLiteral<"notLoaded">;
|
|
363
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
364
|
+
type: z.ZodLiteral<"idle">;
|
|
365
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
366
|
+
type: z.ZodLiteral<"systemError">;
|
|
367
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
368
|
+
type: z.ZodLiteral<"active">;
|
|
369
|
+
activeFlags: z.ZodArray<z.ZodString>;
|
|
370
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
371
|
+
readonly type: string;
|
|
372
|
+
} & {
|
|
373
|
+
readonly activeFlags?: never;
|
|
374
|
+
}, {
|
|
375
|
+
readonly type: string;
|
|
376
|
+
} & {
|
|
377
|
+
readonly activeFlags?: never;
|
|
378
|
+
}>]>>;
|
|
379
|
+
canAcceptDirectInput: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
380
|
+
cliVersion: z.ZodOptional<z.ZodString>;
|
|
381
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
recencyAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
384
|
+
ephemeral: z.ZodOptional<z.ZodBoolean>;
|
|
385
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
386
|
+
source: z.ZodOptional<z.ZodJSONSchema>;
|
|
387
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
388
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
389
|
+
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
390
|
+
parentThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
391
|
+
attachedToThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
|
+
originator: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
393
|
+
agentNickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
394
|
+
agentRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
395
|
+
gitInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
396
|
+
turns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
77
397
|
id: z.ZodString;
|
|
78
398
|
status: z.ZodEnum<{
|
|
79
399
|
completed: "completed";
|
|
@@ -85,42 +405,246 @@ export declare const CodexNotificationParams: {
|
|
|
85
405
|
message: z.ZodString;
|
|
86
406
|
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
87
407
|
}, z.core.$loose>>>;
|
|
88
|
-
|
|
408
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
409
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
410
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
411
|
+
rootTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
412
|
+
items: z.ZodArray<z.ZodObject<{
|
|
89
413
|
type: z.ZodString;
|
|
90
414
|
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
415
|
+
}, z.core.$loose>>;
|
|
416
|
+
itemsView: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
417
|
+
full: "full";
|
|
418
|
+
notLoaded: "notLoaded";
|
|
419
|
+
summary: "summary";
|
|
420
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
421
|
+
}, z.core.$loose>>>;
|
|
422
|
+
}, z.core.$loose>>;
|
|
423
|
+
}, z.core.$strip>;
|
|
424
|
+
/** Applied policy and model context reported by Codex when opening, resuming, or forking a thread. */
|
|
425
|
+
export type CodexThreadContext = Readonly<z.infer<typeof CodexThreadContextSchema>>;
|
|
426
|
+
/** Loose Zod schema for Codex `initialize` response. */
|
|
427
|
+
export declare const CodexInitializeResponseSchema: z.ZodObject<{
|
|
428
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
+
}, z.core.$loose>;
|
|
430
|
+
/** Loose Zod schema for responses returned by `thread/start`, `thread/resume`, and `thread/fork`. */
|
|
431
|
+
export declare const CodexStartedThreadSchema: z.ZodObject<{
|
|
432
|
+
model: z.ZodOptional<z.ZodString>;
|
|
433
|
+
modelProvider: z.ZodOptional<z.ZodString>;
|
|
434
|
+
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
435
|
+
approvalPolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
436
|
+
never: "never";
|
|
437
|
+
"on-failure": "on-failure";
|
|
438
|
+
"on-request": "on-request";
|
|
439
|
+
untrusted: "untrusted";
|
|
440
|
+
}>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>>;
|
|
441
|
+
sandbox: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
442
|
+
type: z.ZodLiteral<"dangerFullAccess">;
|
|
443
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
444
|
+
type: z.ZodLiteral<"readOnly">;
|
|
445
|
+
networkAccess: z.ZodOptional<z.ZodBoolean>;
|
|
446
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
447
|
+
type: z.ZodLiteral<"externalSandbox">;
|
|
448
|
+
networkAccess: z.ZodOptional<z.ZodString>;
|
|
449
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
450
|
+
type: z.ZodLiteral<"workspaceWrite">;
|
|
451
|
+
writableRoots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
452
|
+
networkAccess: z.ZodOptional<z.ZodBoolean>;
|
|
453
|
+
excludeTmpdirEnvVar: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
+
excludeSlashTmp: z.ZodOptional<z.ZodBoolean>;
|
|
455
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
456
|
+
readonly type: string;
|
|
457
|
+
} & {
|
|
458
|
+
readonly writableRoots?: never;
|
|
459
|
+
readonly networkAccess?: never;
|
|
460
|
+
readonly excludeTmpdirEnvVar?: never;
|
|
461
|
+
readonly excludeSlashTmp?: never;
|
|
462
|
+
}, {
|
|
463
|
+
readonly type: string;
|
|
464
|
+
} & {
|
|
465
|
+
readonly writableRoots?: never;
|
|
466
|
+
readonly networkAccess?: never;
|
|
467
|
+
readonly excludeTmpdirEnvVar?: never;
|
|
468
|
+
readonly excludeSlashTmp?: never;
|
|
469
|
+
}>]>>;
|
|
470
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
471
|
+
runtimeWorkspaceRoots: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
472
|
+
thread: z.ZodObject<{
|
|
473
|
+
id: z.ZodString;
|
|
474
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
475
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
476
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
477
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
|
+
modelProvider: z.ZodOptional<z.ZodString>;
|
|
479
|
+
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
480
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
481
|
+
type: z.ZodLiteral<"notLoaded">;
|
|
482
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
483
|
+
type: z.ZodLiteral<"idle">;
|
|
484
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
485
|
+
type: z.ZodLiteral<"systemError">;
|
|
486
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
487
|
+
type: z.ZodLiteral<"active">;
|
|
488
|
+
activeFlags: z.ZodArray<z.ZodString>;
|
|
489
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
490
|
+
readonly type: string;
|
|
491
|
+
} & {
|
|
492
|
+
readonly activeFlags?: never;
|
|
493
|
+
}, {
|
|
494
|
+
readonly type: string;
|
|
495
|
+
} & {
|
|
496
|
+
readonly activeFlags?: never;
|
|
497
|
+
}>]>>;
|
|
498
|
+
canAcceptDirectInput: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
499
|
+
cliVersion: z.ZodOptional<z.ZodString>;
|
|
500
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
recencyAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
503
|
+
ephemeral: z.ZodOptional<z.ZodBoolean>;
|
|
504
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
505
|
+
source: z.ZodOptional<z.ZodJSONSchema>;
|
|
506
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
507
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
508
|
+
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
|
+
parentThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
510
|
+
attachedToThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
511
|
+
originator: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
512
|
+
agentNickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
513
|
+
agentRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
514
|
+
gitInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
515
|
+
turns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
516
|
+
id: z.ZodString;
|
|
517
|
+
status: z.ZodEnum<{
|
|
518
|
+
completed: "completed";
|
|
519
|
+
failed: "failed";
|
|
520
|
+
inProgress: "inProgress";
|
|
521
|
+
interrupted: "interrupted";
|
|
522
|
+
}>;
|
|
523
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
524
|
+
message: z.ZodString;
|
|
525
|
+
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
91
526
|
}, z.core.$loose>>>;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
cachedInputTokens: z.ZodOptional<z.ZodInt>;
|
|
100
|
-
cacheWriteInputTokens: z.ZodOptional<z.ZodInt>;
|
|
101
|
-
reasoningOutputTokens: z.ZodOptional<z.ZodInt>;
|
|
102
|
-
totalTokens: z.ZodOptional<z.ZodInt>;
|
|
103
|
-
}, z.core.$loose>;
|
|
104
|
-
total: z.ZodOptional<z.ZodObject<{
|
|
105
|
-
inputTokens: z.ZodOptional<z.ZodInt>;
|
|
106
|
-
outputTokens: z.ZodOptional<z.ZodInt>;
|
|
107
|
-
cachedInputTokens: z.ZodOptional<z.ZodInt>;
|
|
108
|
-
cacheWriteInputTokens: z.ZodOptional<z.ZodInt>;
|
|
109
|
-
reasoningOutputTokens: z.ZodOptional<z.ZodInt>;
|
|
110
|
-
totalTokens: z.ZodOptional<z.ZodInt>;
|
|
527
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
528
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
529
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
530
|
+
rootTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
531
|
+
items: z.ZodArray<z.ZodObject<{
|
|
532
|
+
type: z.ZodString;
|
|
533
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
534
|
}, z.core.$loose>>;
|
|
112
|
-
|
|
113
|
-
|
|
535
|
+
itemsView: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
536
|
+
full: "full";
|
|
537
|
+
notLoaded: "notLoaded";
|
|
538
|
+
summary: "summary";
|
|
539
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
540
|
+
}, z.core.$loose>>>;
|
|
114
541
|
}, z.core.$loose>;
|
|
115
|
-
|
|
116
|
-
|
|
542
|
+
approvalsReviewer: z.ZodOptional<z.ZodString>;
|
|
543
|
+
collaborationMode: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
544
|
+
mode: z.ZodString;
|
|
545
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
546
|
+
model: z.ZodOptional<z.ZodString>;
|
|
547
|
+
reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
548
|
+
developer_instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
549
|
+
}, z.core.$loose>>;
|
|
550
|
+
}, z.core.$loose>>>;
|
|
551
|
+
turnsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
552
|
+
itemsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
553
|
+
serviceTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
554
|
+
disabledPluginIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
555
|
+
instructionSources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
556
|
+
}, z.core.$loose>;
|
|
557
|
+
/** Extract the normalized applied thread context from a parsed `thread/start`, `thread/resume`, or `thread/fork` reply. */
|
|
558
|
+
export declare function extractCodexThreadContext(parsed: z.infer<typeof CodexStartedThreadSchema>): CodexThreadContext;
|
|
559
|
+
/** Loose Zod schema for Codex `turn/start` response. */
|
|
560
|
+
export declare const CodexStartedTurnSchema: z.ZodObject<{
|
|
561
|
+
turn: z.ZodObject<{
|
|
562
|
+
id: z.ZodString;
|
|
117
563
|
}, z.core.$loose>;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
564
|
+
}, z.core.$loose>;
|
|
565
|
+
/** Loose Zod schema for Codex `turn/steer` response. */
|
|
566
|
+
export declare const CodexTurnSteerResponseSchema: z.ZodObject<{
|
|
567
|
+
turnId: z.ZodString;
|
|
568
|
+
}, z.core.$loose>;
|
|
569
|
+
/** Loose Zod schema for Codex `thread/revert` response. */
|
|
570
|
+
export declare const CodexThreadRevertResponseSchema: z.ZodObject<{
|
|
571
|
+
thread: z.ZodObject<{
|
|
572
|
+
id: z.ZodString;
|
|
573
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
574
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
575
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
576
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
577
|
+
modelProvider: z.ZodOptional<z.ZodString>;
|
|
578
|
+
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
579
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
580
|
+
type: z.ZodLiteral<"notLoaded">;
|
|
581
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
582
|
+
type: z.ZodLiteral<"idle">;
|
|
583
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
584
|
+
type: z.ZodLiteral<"systemError">;
|
|
585
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
586
|
+
type: z.ZodLiteral<"active">;
|
|
587
|
+
activeFlags: z.ZodArray<z.ZodString>;
|
|
588
|
+
}, z.core.$loose>, z.ZodCustom<{
|
|
589
|
+
readonly type: string;
|
|
590
|
+
} & {
|
|
591
|
+
readonly activeFlags?: never;
|
|
592
|
+
}, {
|
|
593
|
+
readonly type: string;
|
|
594
|
+
} & {
|
|
595
|
+
readonly activeFlags?: never;
|
|
596
|
+
}>]>>;
|
|
597
|
+
canAcceptDirectInput: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
598
|
+
cliVersion: z.ZodOptional<z.ZodString>;
|
|
599
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
600
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
601
|
+
recencyAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
602
|
+
ephemeral: z.ZodOptional<z.ZodBoolean>;
|
|
603
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
604
|
+
source: z.ZodOptional<z.ZodJSONSchema>;
|
|
605
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
606
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
607
|
+
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
608
|
+
parentThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
609
|
+
attachedToThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
610
|
+
originator: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
611
|
+
agentNickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
612
|
+
agentRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
613
|
+
gitInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
614
|
+
turns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
615
|
+
id: z.ZodString;
|
|
616
|
+
status: z.ZodEnum<{
|
|
617
|
+
completed: "completed";
|
|
618
|
+
failed: "failed";
|
|
619
|
+
inProgress: "inProgress";
|
|
620
|
+
interrupted: "interrupted";
|
|
621
|
+
}>;
|
|
622
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
623
|
+
message: z.ZodString;
|
|
624
|
+
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
625
|
+
}, z.core.$loose>>>;
|
|
626
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
627
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
628
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
629
|
+
rootTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
630
|
+
items: z.ZodArray<z.ZodObject<{
|
|
631
|
+
type: z.ZodString;
|
|
632
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
633
|
+
}, z.core.$loose>>;
|
|
634
|
+
itemsView: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
635
|
+
full: "full";
|
|
636
|
+
notLoaded: "notLoaded";
|
|
637
|
+
summary: "summary";
|
|
638
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
639
|
+
}, z.core.$loose>>>;
|
|
121
640
|
}, z.core.$loose>;
|
|
122
|
-
|
|
641
|
+
turnsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
642
|
+
itemsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
643
|
+
}, z.core.$loose>;
|
|
644
|
+
/** Loose Zod schema for `item/commandExecution/requestApproval` and `item/fileChange/requestApproval` params. */
|
|
123
645
|
export declare const CodexApprovalParamsSchema: z.ZodObject<{
|
|
646
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
647
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
124
648
|
itemId: z.ZodString;
|
|
125
649
|
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
126
650
|
cwd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -128,13 +652,16 @@ export declare const CodexApprovalParamsSchema: z.ZodObject<{
|
|
|
128
652
|
grantRoot: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
129
653
|
kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
654
|
approvalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
655
|
+
startedAtMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
131
656
|
commandActions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodJSONSchema>>>;
|
|
132
657
|
availableDecisions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodJSONSchema>>>;
|
|
133
658
|
}, z.core.$loose>;
|
|
659
|
+
/** Loose Zod schema for one option inside a `item/tool/requestUserInput` question. */
|
|
134
660
|
export declare const CodexUserInputOptionSchema: z.ZodObject<{
|
|
135
661
|
label: z.ZodString;
|
|
136
662
|
description: z.ZodString;
|
|
137
663
|
}, z.core.$loose>;
|
|
664
|
+
/** Loose Zod schema for one question inside `item/tool/requestUserInput`. */
|
|
138
665
|
export declare const CodexUserInputQuestionSchema: z.ZodObject<{
|
|
139
666
|
id: z.ZodString;
|
|
140
667
|
question: z.ZodString;
|
|
@@ -146,7 +673,10 @@ export declare const CodexUserInputQuestionSchema: z.ZodObject<{
|
|
|
146
673
|
description: z.ZodString;
|
|
147
674
|
}, z.core.$loose>>>>;
|
|
148
675
|
}, z.core.$loose>;
|
|
676
|
+
/** Loose Zod schema for `item/tool/requestUserInput` server request params. */
|
|
149
677
|
export declare const CodexUserInputParamsSchema: z.ZodObject<{
|
|
678
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
679
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
150
680
|
itemId: z.ZodString;
|
|
151
681
|
questions: z.ZodArray<z.ZodObject<{
|
|
152
682
|
id: z.ZodString;
|
|
@@ -239,94 +769,6 @@ export declare const CodexMcpElicitationAnswerSchema: z.ZodObject<{
|
|
|
239
769
|
content: z.ZodOptional<z.ZodJSONSchema>;
|
|
240
770
|
_meta: z.ZodOptional<z.ZodJSONSchema>;
|
|
241
771
|
}, z.core.$strict>;
|
|
242
|
-
/** Applied thread policy and runtime context returned by `thread/start`, `thread/resume`, or `thread/fork`. */
|
|
243
|
-
export declare const CodexThreadContextSchema: z.ZodObject<{
|
|
244
|
-
model: z.ZodOptional<z.ZodString>;
|
|
245
|
-
modelProvider: z.ZodOptional<z.ZodString>;
|
|
246
|
-
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
247
|
-
approvalPolicy: z.ZodOptional<z.ZodJSONSchema>;
|
|
248
|
-
sandbox: z.ZodOptional<z.ZodJSONSchema>;
|
|
249
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
250
|
-
runtimeWorkspaceRoots: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
251
|
-
}, z.core.$strip>;
|
|
252
|
-
/** Applied policy and model context reported by Codex when opening, resuming, or forking a thread. */
|
|
253
|
-
export type CodexThreadContext = Readonly<z.infer<typeof CodexThreadContextSchema>>;
|
|
254
|
-
export declare const CodexStartedThreadSchema: z.ZodObject<{
|
|
255
|
-
model: z.ZodOptional<z.ZodString>;
|
|
256
|
-
modelProvider: z.ZodOptional<z.ZodString>;
|
|
257
|
-
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
|
-
approvalPolicy: z.ZodOptional<z.ZodJSONSchema>;
|
|
259
|
-
sandbox: z.ZodOptional<z.ZodJSONSchema>;
|
|
260
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
261
|
-
runtimeWorkspaceRoots: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
262
|
-
thread: z.ZodObject<{
|
|
263
|
-
id: z.ZodString;
|
|
264
|
-
}, z.core.$loose>;
|
|
265
|
-
}, z.core.$loose>;
|
|
266
|
-
/** Extract the normalized applied thread context from a parsed `thread/start`, `thread/resume`, or `thread/fork` reply. */
|
|
267
|
-
export declare function extractCodexThreadContext(parsed: z.infer<typeof CodexStartedThreadSchema>): CodexThreadContext;
|
|
268
|
-
export declare const CodexStartedTurnSchema: z.ZodObject<{
|
|
269
|
-
turn: z.ZodObject<{
|
|
270
|
-
id: z.ZodString;
|
|
271
|
-
}, z.core.$loose>;
|
|
272
|
-
}, z.core.$loose>;
|
|
273
|
-
export declare const CodexTurnSteerResponseSchema: z.ZodObject<{
|
|
274
|
-
turnId: z.ZodString;
|
|
275
|
-
}, z.core.$loose>;
|
|
276
|
-
export declare const CodexListedTurnItemSchema: z.ZodObject<{
|
|
277
|
-
type: z.ZodString;
|
|
278
|
-
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
279
|
-
}, z.core.$loose>;
|
|
280
|
-
export declare const CodexListedTurnSchema: z.ZodObject<{
|
|
281
|
-
id: z.ZodString;
|
|
282
|
-
status: z.ZodEnum<{
|
|
283
|
-
completed: "completed";
|
|
284
|
-
failed: "failed";
|
|
285
|
-
inProgress: "inProgress";
|
|
286
|
-
interrupted: "interrupted";
|
|
287
|
-
}>;
|
|
288
|
-
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
289
|
-
message: z.ZodString;
|
|
290
|
-
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
291
|
-
}, z.core.$loose>>>;
|
|
292
|
-
items: z.ZodArray<z.ZodObject<{
|
|
293
|
-
type: z.ZodString;
|
|
294
|
-
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
295
|
-
}, z.core.$loose>>;
|
|
296
|
-
itemsView: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
297
|
-
}, z.core.$loose>;
|
|
298
|
-
export declare const CodexTurnsPageSchema: z.ZodObject<{
|
|
299
|
-
data: z.ZodArray<z.ZodObject<{
|
|
300
|
-
id: z.ZodString;
|
|
301
|
-
status: z.ZodEnum<{
|
|
302
|
-
completed: "completed";
|
|
303
|
-
failed: "failed";
|
|
304
|
-
inProgress: "inProgress";
|
|
305
|
-
interrupted: "interrupted";
|
|
306
|
-
}>;
|
|
307
|
-
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
308
|
-
message: z.ZodString;
|
|
309
|
-
codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
310
|
-
}, z.core.$loose>>>;
|
|
311
|
-
items: z.ZodArray<z.ZodObject<{
|
|
312
|
-
type: z.ZodString;
|
|
313
|
-
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
314
|
-
}, z.core.$loose>>;
|
|
315
|
-
itemsView: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
316
|
-
}, z.core.$loose>>;
|
|
317
|
-
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
318
|
-
}, z.core.$loose>;
|
|
319
|
-
export declare const CodexThreadRevertResponseSchema: z.ZodObject<{
|
|
320
|
-
thread: z.ZodObject<{
|
|
321
|
-
id: z.ZodString;
|
|
322
|
-
}, z.core.$loose>;
|
|
323
|
-
turnsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
324
|
-
itemsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
|
-
}, z.core.$loose>;
|
|
326
|
-
/** Notifications the driver asks the server not to send: noise for a turn. */
|
|
327
|
-
export declare const CODEX_OPTED_OUT_NOTIFICATIONS: string[];
|
|
328
|
-
/** Notifications a turn sees and that carry nothing for it. */
|
|
329
|
-
export declare const CODEX_QUIET_NOTIFICATIONS: Set<string>;
|
|
330
772
|
/** Server requests the driver answers; every other is refused `-32601`. */
|
|
331
773
|
export declare const CODEX_APPROVAL_REQUESTS: Set<string>;
|
|
332
774
|
export declare const CODEX_PERMISSIONS_APPROVAL_REQUEST = "item/permissions/requestApproval";
|