@stitchmux/client 0.0.0-stage → 0.96.1
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/LICENSE +21 -0
- package/README.md +45 -2
- package/dist/chunk-wddwdvbj.js +714 -0
- package/dist/index.js +4070 -0
- package/dist/monitoring.js +279 -0
- package/native-stream.json +8 -0
- package/package.json +36 -4
- package/types/src/agent/claude/native/commandSchema.d.ts +14 -0
- package/types/src/agent/custom/config.d.ts +159 -0
- package/types/src/agent/custom/endpoint.d.ts +26 -0
- package/types/src/agent/transcript/messageSchema.d.ts +153 -0
- package/types/src/attachments/reference.d.ts +56 -0
- package/types/src/attachments/schema.d.ts +512 -0
- package/types/src/chat/communicationAuthorizationSchema.d.ts +77 -0
- package/types/src/chat/communicationReceiptSchema.d.ts +82 -0
- package/types/src/chat/feedSchema.d.ts +641 -0
- package/types/src/chat/holdKind.d.ts +26 -0
- package/types/src/chat/identity.d.ts +55 -0
- package/types/src/chat/identitySchema.d.ts +121 -0
- package/types/src/chat/letterRequestSchema.d.ts +35 -0
- package/types/src/chat/messageOperationSchema.d.ts +277 -0
- package/types/src/chat/messageSchema.d.ts +284 -0
- package/types/src/chat/originSchema.d.ts +67 -0
- package/types/src/chat/sentLetterSchema.d.ts +79 -0
- package/types/src/client.d.ts +16 -0
- package/types/src/config/claudeProfileSchema.d.ts +22 -0
- package/types/src/config/launchSchema.d.ts +136 -0
- package/types/src/config/location.d.ts +6 -0
- package/types/src/config/machineSchema.d.ts +320 -0
- package/types/src/config/modelSelectionFlags.d.ts +4 -0
- package/types/src/config/paths.d.ts +87 -0
- package/types/src/config/remoteTransport.d.ts +12 -0
- package/types/src/content/schema.d.ts +312 -0
- package/types/src/content/toolSchema.d.ts +36 -0
- package/types/src/context/corpusSearchSchema.d.ts +578 -0
- package/types/src/context/exactMessageSchema.d.ts +54 -0
- package/types/src/context/messageSenderSchema.d.ts +14 -0
- package/types/src/context/schema.d.ts +176 -0
- package/types/src/context/searchFrames.d.ts +225 -0
- package/types/src/context/searchRequestSchema.d.ts +47 -0
- package/types/src/context/transcriptJsonSchema.d.ts +210 -0
- package/types/src/control/schema/context.d.ts +188 -0
- package/types/src/control/schema/contract.d.ts +7142 -0
- package/types/src/control/schema/core.d.ts +722 -0
- package/types/src/control/schema/directory.d.ts +34 -0
- package/types/src/control/schema/eventsContract.d.ts +1423 -0
- package/types/src/control/schema/externalList.d.ts +96 -0
- package/types/src/control/schema/message.d.ts +280 -0
- package/types/src/control/schema/model.d.ts +128 -0
- package/types/src/control/schema/native.d.ts +664 -0
- package/types/src/control/schema/nativeStreamContract.d.ts +155 -0
- package/types/src/control/schema/performance.d.ts +85 -0
- package/types/src/control/schema/public.d.ts +48 -0
- package/types/src/control/schema/reading.d.ts +24 -0
- package/types/src/control/schema/refusals.d.ts +433 -0
- package/types/src/control/schema/runtimeOps.d.ts +724 -0
- package/types/src/control/schema/searchContract.d.ts +258 -0
- package/types/src/control/schema/selection.d.ts +124 -0
- package/types/src/control/schema/session.d.ts +272 -0
- package/types/src/control/schema/terminalPrompt.d.ts +102 -0
- package/types/src/control/transport/boundary.d.ts +7137 -0
- package/types/src/control/transport/client.d.ts +10838 -0
- package/types/src/control/transport/connection.d.ts +13 -0
- package/types/src/control/transport/socketPath.d.ts +3 -0
- package/types/src/control-client.d.ts +9 -0
- package/types/src/delegation/applicationSchema.d.ts +132 -0
- package/types/src/delegation/schema.d.ts +267 -0
- package/types/src/events/schema.d.ts +155 -0
- package/types/src/external/contentSchema.d.ts +145 -0
- package/types/src/external/messageSchema.d.ts +131 -0
- package/types/src/external/residentFrames.d.ts +130 -0
- package/types/src/external/residentSchema.d.ts +144 -0
- package/types/src/external/sessionSchema.d.ts +427 -0
- package/types/src/external/turnSchema.d.ts +55 -0
- package/types/src/fleet/fleetSchema.d.ts +937 -0
- package/types/src/inventory/listSchema.d.ts +442 -0
- package/types/src/monitoring/nativeFile.d.ts +7 -0
- package/types/src/monitoring/nativeRead.d.ts +14 -0
- package/types/src/monitoring/performanceSchema.d.ts +28 -0
- package/types/src/monitoring/schema.d.ts +410 -0
- package/types/src/monitoring/validate.d.ts +5 -0
- package/types/src/monitoring-reader.d.ts +4 -0
- package/types/src/policy/reference.d.ts +93 -0
- package/types/src/policy/runtimeProfile.d.ts +24 -0
- package/types/src/policy/schema.d.ts +177 -0
- package/types/src/runtime/capabilities.d.ts +124 -0
- package/types/src/runtime/modes.d.ts +47 -0
- package/types/src/runtime/permissionScope.d.ts +22 -0
- package/types/src/runtime/planLimitsSchema.d.ts +55 -0
- package/types/src/runtime/projectionSchema.d.ts +539 -0
- package/types/src/runtime/rewindSchema.d.ts +16 -0
- package/types/src/runtime/selectionSchema.d.ts +158 -0
- package/types/src/runtime/workloadContract.d.ts +55 -0
- package/types/src/session/boundary.d.ts +43 -0
- package/types/src/session/identitySchema.d.ts +353 -0
- package/types/src/session/schema.d.ts +341 -0
- package/types/src/session/sleep/schema.d.ts +283 -0
- package/types/src/steering/schema.d.ts +197 -0
- package/types/src/types.d.ts +48 -0
- package/types/src/usage/schema.d.ts +978 -0
- package/types/src/util/home.d.ts +9 -0
- package/types/src/util/preview.d.ts +13 -0
- package/types/src/util/version.d.ts +3 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ExternalOriginSchema: z.ZodEnum<{
|
|
3
|
+
"app-server": "app-server";
|
|
4
|
+
cli: "cli";
|
|
5
|
+
desktop: "desktop";
|
|
6
|
+
exec: "exec";
|
|
7
|
+
subagent: "subagent";
|
|
8
|
+
unknown: "unknown";
|
|
9
|
+
vscode: "vscode";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const ExternalStorageSchema: z.ZodEnum<{
|
|
12
|
+
missing: "missing";
|
|
13
|
+
stored: "stored";
|
|
14
|
+
unknown: "unknown";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const WriterEvidenceSchema: z.ZodEnum<{
|
|
17
|
+
"none-observed": "none-observed";
|
|
18
|
+
observed: "observed";
|
|
19
|
+
unknown: "unknown";
|
|
20
|
+
}>;
|
|
21
|
+
export declare const WriterRuntimeKindSchema: z.ZodEnum<{
|
|
22
|
+
"app-server": "app-server";
|
|
23
|
+
"dedicated-cli": "dedicated-cli";
|
|
24
|
+
desktop: "desktop";
|
|
25
|
+
managed: "managed";
|
|
26
|
+
self: "self";
|
|
27
|
+
shared: "shared";
|
|
28
|
+
unknown: "unknown";
|
|
29
|
+
vscode: "vscode";
|
|
30
|
+
}>;
|
|
31
|
+
export declare const WriterRuntimeSchema: z.ZodObject<{
|
|
32
|
+
kind: z.ZodEnum<{
|
|
33
|
+
"app-server": "app-server";
|
|
34
|
+
"dedicated-cli": "dedicated-cli";
|
|
35
|
+
desktop: "desktop";
|
|
36
|
+
managed: "managed";
|
|
37
|
+
self: "self";
|
|
38
|
+
shared: "shared";
|
|
39
|
+
unknown: "unknown";
|
|
40
|
+
vscode: "vscode";
|
|
41
|
+
}>;
|
|
42
|
+
pid: z.ZodNullable<z.ZodNumber>;
|
|
43
|
+
startTime: z.ZodNullable<z.ZodString>;
|
|
44
|
+
processGroup: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
reason: z.ZodString;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
export declare const ExternalCapabilitiesSchema: z.ZodObject<{
|
|
48
|
+
inspect: z.ZodBoolean;
|
|
49
|
+
attemptAdopt: z.ZodBoolean;
|
|
50
|
+
fork: z.ZodBoolean;
|
|
51
|
+
terminateAndAdopt: z.ZodBoolean;
|
|
52
|
+
releaseAtSource: z.ZodBoolean;
|
|
53
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
export declare const ExternalSessionSchema: z.ZodObject<{
|
|
56
|
+
key: z.ZodString;
|
|
57
|
+
plane: z.ZodLiteral<"external">;
|
|
58
|
+
provider: z.ZodEnum<{
|
|
59
|
+
antigravity: "antigravity";
|
|
60
|
+
claude: "claude";
|
|
61
|
+
codex: "codex";
|
|
62
|
+
custom: "custom";
|
|
63
|
+
opencode: "opencode";
|
|
64
|
+
}>;
|
|
65
|
+
host: z.ZodString;
|
|
66
|
+
threadId: z.ZodUUID;
|
|
67
|
+
dir: z.ZodNullable<z.ZodString>;
|
|
68
|
+
path: z.ZodNullable<z.ZodString>;
|
|
69
|
+
origin: z.ZodEnum<{
|
|
70
|
+
"app-server": "app-server";
|
|
71
|
+
cli: "cli";
|
|
72
|
+
desktop: "desktop";
|
|
73
|
+
exec: "exec";
|
|
74
|
+
subagent: "subagent";
|
|
75
|
+
unknown: "unknown";
|
|
76
|
+
vscode: "vscode";
|
|
77
|
+
}>;
|
|
78
|
+
storage: z.ZodEnum<{
|
|
79
|
+
missing: "missing";
|
|
80
|
+
stored: "stored";
|
|
81
|
+
unknown: "unknown";
|
|
82
|
+
}>;
|
|
83
|
+
writerEvidence: z.ZodEnum<{
|
|
84
|
+
"none-observed": "none-observed";
|
|
85
|
+
observed: "observed";
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
}>;
|
|
88
|
+
writerRuntime: z.ZodNullable<z.ZodObject<{
|
|
89
|
+
kind: z.ZodEnum<{
|
|
90
|
+
"app-server": "app-server";
|
|
91
|
+
"dedicated-cli": "dedicated-cli";
|
|
92
|
+
desktop: "desktop";
|
|
93
|
+
managed: "managed";
|
|
94
|
+
self: "self";
|
|
95
|
+
shared: "shared";
|
|
96
|
+
unknown: "unknown";
|
|
97
|
+
vscode: "vscode";
|
|
98
|
+
}>;
|
|
99
|
+
pid: z.ZodNullable<z.ZodNumber>;
|
|
100
|
+
startTime: z.ZodNullable<z.ZodString>;
|
|
101
|
+
processGroup: z.ZodNullable<z.ZodNumber>;
|
|
102
|
+
reason: z.ZodString;
|
|
103
|
+
}, z.core.$strict>>;
|
|
104
|
+
turnState: z.ZodObject<{
|
|
105
|
+
state: z.ZodEnum<{
|
|
106
|
+
idle: "idle";
|
|
107
|
+
unknown: "unknown";
|
|
108
|
+
"waiting-approval": "waiting-approval";
|
|
109
|
+
"waiting-input": "waiting-input";
|
|
110
|
+
working: "working";
|
|
111
|
+
}>;
|
|
112
|
+
evidence: z.ZodEnum<{
|
|
113
|
+
observed: "observed";
|
|
114
|
+
stale: "stale";
|
|
115
|
+
unavailable: "unavailable";
|
|
116
|
+
unknown: "unknown";
|
|
117
|
+
}>;
|
|
118
|
+
source: z.ZodEnum<{
|
|
119
|
+
"codex-app-server": "codex-app-server";
|
|
120
|
+
unsupported: "unsupported";
|
|
121
|
+
}>;
|
|
122
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
123
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
124
|
+
observedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
125
|
+
expiresAt: z.ZodNullable<z.ZodISODateTime>;
|
|
126
|
+
reason: z.ZodEnum<{
|
|
127
|
+
"connection-lost": "connection-lost";
|
|
128
|
+
"connection-unavailable": "connection-unavailable";
|
|
129
|
+
deadline: "deadline";
|
|
130
|
+
"endpoint-absent": "endpoint-absent";
|
|
131
|
+
"endpoint-not-listening": "endpoint-not-listening";
|
|
132
|
+
"native-status": "native-status";
|
|
133
|
+
"not-loaded": "not-loaded";
|
|
134
|
+
"not-observed": "not-observed";
|
|
135
|
+
"not-reported": "not-reported";
|
|
136
|
+
"read-limit": "read-limit";
|
|
137
|
+
"system-error": "system-error";
|
|
138
|
+
"unsupported-provider": "unsupported-provider";
|
|
139
|
+
"unsupported-runtime": "unsupported-runtime";
|
|
140
|
+
"unsupported-status": "unsupported-status";
|
|
141
|
+
"upgrade-refused": "upgrade-refused";
|
|
142
|
+
}>;
|
|
143
|
+
remedy: z.ZodNullable<z.ZodString>;
|
|
144
|
+
}, z.core.$strict>;
|
|
145
|
+
capabilities: z.ZodObject<{
|
|
146
|
+
inspect: z.ZodBoolean;
|
|
147
|
+
attemptAdopt: z.ZodBoolean;
|
|
148
|
+
fork: z.ZodBoolean;
|
|
149
|
+
terminateAndAdopt: z.ZodBoolean;
|
|
150
|
+
releaseAtSource: z.ZodBoolean;
|
|
151
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
152
|
+
}, z.core.$strict>;
|
|
153
|
+
lastActivityMs: z.ZodNullable<z.ZodNumber>;
|
|
154
|
+
lastModel: z.ZodNullable<z.ZodString>;
|
|
155
|
+
usedTokens: z.ZodNullable<z.ZodNumber>;
|
|
156
|
+
lastMessage: z.ZodNullable<z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
seq: z.ZodNumber;
|
|
159
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
160
|
+
role: z.ZodEnum<{
|
|
161
|
+
assistant: "assistant";
|
|
162
|
+
system: "system";
|
|
163
|
+
tool: "tool";
|
|
164
|
+
unknown: "unknown";
|
|
165
|
+
user: "user";
|
|
166
|
+
}>;
|
|
167
|
+
kind: z.ZodEnum<{
|
|
168
|
+
event: "event";
|
|
169
|
+
image: "image";
|
|
170
|
+
message: "message";
|
|
171
|
+
thinking: "thinking";
|
|
172
|
+
tool_call: "tool_call";
|
|
173
|
+
tool_result: "tool_result";
|
|
174
|
+
unknown: "unknown";
|
|
175
|
+
}>;
|
|
176
|
+
text: z.ZodNullable<z.ZodString>;
|
|
177
|
+
title: z.ZodNullable<z.ZodString>;
|
|
178
|
+
toolName: z.ZodNullable<z.ZodString>;
|
|
179
|
+
toolCallId: z.ZodNullable<z.ZodString>;
|
|
180
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
181
|
+
error: "error";
|
|
182
|
+
}>>;
|
|
183
|
+
rawType: z.ZodNullable<z.ZodString>;
|
|
184
|
+
done: z.ZodBoolean;
|
|
185
|
+
result: z.ZodNullable<z.ZodString>;
|
|
186
|
+
input: z.ZodNullable<z.ZodString>;
|
|
187
|
+
image: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
188
|
+
address: z.ZodString;
|
|
189
|
+
mediaType: z.ZodNullable<z.ZodString>;
|
|
190
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
191
|
+
digest: z.ZodNullable<z.ZodString>;
|
|
192
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
193
|
+
malformed: "malformed";
|
|
194
|
+
"too-large": "too-large";
|
|
195
|
+
"unsupported-source": "unsupported-source";
|
|
196
|
+
}>>;
|
|
197
|
+
}, z.core.$strip>>>;
|
|
198
|
+
resultImages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
199
|
+
address: z.ZodString;
|
|
200
|
+
mediaType: z.ZodNullable<z.ZodString>;
|
|
201
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
202
|
+
digest: z.ZodNullable<z.ZodString>;
|
|
203
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
204
|
+
malformed: "malformed";
|
|
205
|
+
"too-large": "too-large";
|
|
206
|
+
"unsupported-source": "unsupported-source";
|
|
207
|
+
}>>;
|
|
208
|
+
}, z.core.$strip>>>;
|
|
209
|
+
usage: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
210
|
+
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
211
|
+
outputTokens: z.ZodNullable<z.ZodNumber>;
|
|
212
|
+
cacheReadTokens: z.ZodNullable<z.ZodNumber>;
|
|
213
|
+
cacheCreationTokens: z.ZodNullable<z.ZodNumber>;
|
|
214
|
+
}, z.core.$strip>>>;
|
|
215
|
+
resultText: z.ZodNullable<z.ZodString>;
|
|
216
|
+
doneAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
217
|
+
agent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
218
|
+
id: z.ZodString;
|
|
219
|
+
type: z.ZodNullable<z.ZodString>;
|
|
220
|
+
description: z.ZodNullable<z.ZodString>;
|
|
221
|
+
model: z.ZodNullable<z.ZodString>;
|
|
222
|
+
state: z.ZodEnum<{
|
|
223
|
+
finished: "finished";
|
|
224
|
+
running: "running";
|
|
225
|
+
}>;
|
|
226
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
227
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
228
|
+
toolCalls: z.ZodNullable<z.ZodNumber>;
|
|
229
|
+
usage: z.ZodNullable<z.ZodObject<{
|
|
230
|
+
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
231
|
+
outputTokens: z.ZodNullable<z.ZodNumber>;
|
|
232
|
+
cacheReadTokens: z.ZodNullable<z.ZodNumber>;
|
|
233
|
+
cacheCreationTokens: z.ZodNullable<z.ZodNumber>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
available: z.ZodBoolean;
|
|
236
|
+
}, z.core.$strip>>>;
|
|
237
|
+
}, z.core.$strip>>;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
export declare const ExternalInventoryJsonSchema: z.ZodObject<{
|
|
240
|
+
version: z.ZodString;
|
|
241
|
+
generatedAt: z.ZodISODateTime;
|
|
242
|
+
rcPrefix: z.ZodString;
|
|
243
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
244
|
+
key: z.ZodString;
|
|
245
|
+
plane: z.ZodLiteral<"external">;
|
|
246
|
+
provider: z.ZodEnum<{
|
|
247
|
+
antigravity: "antigravity";
|
|
248
|
+
claude: "claude";
|
|
249
|
+
codex: "codex";
|
|
250
|
+
custom: "custom";
|
|
251
|
+
opencode: "opencode";
|
|
252
|
+
}>;
|
|
253
|
+
host: z.ZodString;
|
|
254
|
+
threadId: z.ZodUUID;
|
|
255
|
+
dir: z.ZodNullable<z.ZodString>;
|
|
256
|
+
path: z.ZodNullable<z.ZodString>;
|
|
257
|
+
origin: z.ZodEnum<{
|
|
258
|
+
"app-server": "app-server";
|
|
259
|
+
cli: "cli";
|
|
260
|
+
desktop: "desktop";
|
|
261
|
+
exec: "exec";
|
|
262
|
+
subagent: "subagent";
|
|
263
|
+
unknown: "unknown";
|
|
264
|
+
vscode: "vscode";
|
|
265
|
+
}>;
|
|
266
|
+
storage: z.ZodEnum<{
|
|
267
|
+
missing: "missing";
|
|
268
|
+
stored: "stored";
|
|
269
|
+
unknown: "unknown";
|
|
270
|
+
}>;
|
|
271
|
+
writerEvidence: z.ZodEnum<{
|
|
272
|
+
"none-observed": "none-observed";
|
|
273
|
+
observed: "observed";
|
|
274
|
+
unknown: "unknown";
|
|
275
|
+
}>;
|
|
276
|
+
writerRuntime: z.ZodNullable<z.ZodObject<{
|
|
277
|
+
kind: z.ZodEnum<{
|
|
278
|
+
"app-server": "app-server";
|
|
279
|
+
"dedicated-cli": "dedicated-cli";
|
|
280
|
+
desktop: "desktop";
|
|
281
|
+
managed: "managed";
|
|
282
|
+
self: "self";
|
|
283
|
+
shared: "shared";
|
|
284
|
+
unknown: "unknown";
|
|
285
|
+
vscode: "vscode";
|
|
286
|
+
}>;
|
|
287
|
+
pid: z.ZodNullable<z.ZodNumber>;
|
|
288
|
+
startTime: z.ZodNullable<z.ZodString>;
|
|
289
|
+
processGroup: z.ZodNullable<z.ZodNumber>;
|
|
290
|
+
reason: z.ZodString;
|
|
291
|
+
}, z.core.$strict>>;
|
|
292
|
+
turnState: z.ZodObject<{
|
|
293
|
+
state: z.ZodEnum<{
|
|
294
|
+
idle: "idle";
|
|
295
|
+
unknown: "unknown";
|
|
296
|
+
"waiting-approval": "waiting-approval";
|
|
297
|
+
"waiting-input": "waiting-input";
|
|
298
|
+
working: "working";
|
|
299
|
+
}>;
|
|
300
|
+
evidence: z.ZodEnum<{
|
|
301
|
+
observed: "observed";
|
|
302
|
+
stale: "stale";
|
|
303
|
+
unavailable: "unavailable";
|
|
304
|
+
unknown: "unknown";
|
|
305
|
+
}>;
|
|
306
|
+
source: z.ZodEnum<{
|
|
307
|
+
"codex-app-server": "codex-app-server";
|
|
308
|
+
unsupported: "unsupported";
|
|
309
|
+
}>;
|
|
310
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
311
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
312
|
+
observedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
313
|
+
expiresAt: z.ZodNullable<z.ZodISODateTime>;
|
|
314
|
+
reason: z.ZodEnum<{
|
|
315
|
+
"connection-lost": "connection-lost";
|
|
316
|
+
"connection-unavailable": "connection-unavailable";
|
|
317
|
+
deadline: "deadline";
|
|
318
|
+
"endpoint-absent": "endpoint-absent";
|
|
319
|
+
"endpoint-not-listening": "endpoint-not-listening";
|
|
320
|
+
"native-status": "native-status";
|
|
321
|
+
"not-loaded": "not-loaded";
|
|
322
|
+
"not-observed": "not-observed";
|
|
323
|
+
"not-reported": "not-reported";
|
|
324
|
+
"read-limit": "read-limit";
|
|
325
|
+
"system-error": "system-error";
|
|
326
|
+
"unsupported-provider": "unsupported-provider";
|
|
327
|
+
"unsupported-runtime": "unsupported-runtime";
|
|
328
|
+
"unsupported-status": "unsupported-status";
|
|
329
|
+
"upgrade-refused": "upgrade-refused";
|
|
330
|
+
}>;
|
|
331
|
+
remedy: z.ZodNullable<z.ZodString>;
|
|
332
|
+
}, z.core.$strict>;
|
|
333
|
+
capabilities: z.ZodObject<{
|
|
334
|
+
inspect: z.ZodBoolean;
|
|
335
|
+
attemptAdopt: z.ZodBoolean;
|
|
336
|
+
fork: z.ZodBoolean;
|
|
337
|
+
terminateAndAdopt: z.ZodBoolean;
|
|
338
|
+
releaseAtSource: z.ZodBoolean;
|
|
339
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
340
|
+
}, z.core.$strict>;
|
|
341
|
+
lastActivityMs: z.ZodNullable<z.ZodNumber>;
|
|
342
|
+
lastModel: z.ZodNullable<z.ZodString>;
|
|
343
|
+
usedTokens: z.ZodNullable<z.ZodNumber>;
|
|
344
|
+
lastMessage: z.ZodNullable<z.ZodObject<{
|
|
345
|
+
id: z.ZodString;
|
|
346
|
+
seq: z.ZodNumber;
|
|
347
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
348
|
+
role: z.ZodEnum<{
|
|
349
|
+
assistant: "assistant";
|
|
350
|
+
system: "system";
|
|
351
|
+
tool: "tool";
|
|
352
|
+
unknown: "unknown";
|
|
353
|
+
user: "user";
|
|
354
|
+
}>;
|
|
355
|
+
kind: z.ZodEnum<{
|
|
356
|
+
event: "event";
|
|
357
|
+
image: "image";
|
|
358
|
+
message: "message";
|
|
359
|
+
thinking: "thinking";
|
|
360
|
+
tool_call: "tool_call";
|
|
361
|
+
tool_result: "tool_result";
|
|
362
|
+
unknown: "unknown";
|
|
363
|
+
}>;
|
|
364
|
+
text: z.ZodNullable<z.ZodString>;
|
|
365
|
+
title: z.ZodNullable<z.ZodString>;
|
|
366
|
+
toolName: z.ZodNullable<z.ZodString>;
|
|
367
|
+
toolCallId: z.ZodNullable<z.ZodString>;
|
|
368
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
369
|
+
error: "error";
|
|
370
|
+
}>>;
|
|
371
|
+
rawType: z.ZodNullable<z.ZodString>;
|
|
372
|
+
done: z.ZodBoolean;
|
|
373
|
+
result: z.ZodNullable<z.ZodString>;
|
|
374
|
+
input: z.ZodNullable<z.ZodString>;
|
|
375
|
+
image: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
376
|
+
address: z.ZodString;
|
|
377
|
+
mediaType: z.ZodNullable<z.ZodString>;
|
|
378
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
379
|
+
digest: z.ZodNullable<z.ZodString>;
|
|
380
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
381
|
+
malformed: "malformed";
|
|
382
|
+
"too-large": "too-large";
|
|
383
|
+
"unsupported-source": "unsupported-source";
|
|
384
|
+
}>>;
|
|
385
|
+
}, z.core.$strip>>>;
|
|
386
|
+
resultImages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
387
|
+
address: z.ZodString;
|
|
388
|
+
mediaType: z.ZodNullable<z.ZodString>;
|
|
389
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
390
|
+
digest: z.ZodNullable<z.ZodString>;
|
|
391
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
392
|
+
malformed: "malformed";
|
|
393
|
+
"too-large": "too-large";
|
|
394
|
+
"unsupported-source": "unsupported-source";
|
|
395
|
+
}>>;
|
|
396
|
+
}, z.core.$strip>>>;
|
|
397
|
+
usage: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
398
|
+
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
399
|
+
outputTokens: z.ZodNullable<z.ZodNumber>;
|
|
400
|
+
cacheReadTokens: z.ZodNullable<z.ZodNumber>;
|
|
401
|
+
cacheCreationTokens: z.ZodNullable<z.ZodNumber>;
|
|
402
|
+
}, z.core.$strip>>>;
|
|
403
|
+
resultText: z.ZodNullable<z.ZodString>;
|
|
404
|
+
doneAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
405
|
+
agent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
406
|
+
id: z.ZodString;
|
|
407
|
+
type: z.ZodNullable<z.ZodString>;
|
|
408
|
+
description: z.ZodNullable<z.ZodString>;
|
|
409
|
+
model: z.ZodNullable<z.ZodString>;
|
|
410
|
+
state: z.ZodEnum<{
|
|
411
|
+
finished: "finished";
|
|
412
|
+
running: "running";
|
|
413
|
+
}>;
|
|
414
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
415
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
416
|
+
toolCalls: z.ZodNullable<z.ZodNumber>;
|
|
417
|
+
usage: z.ZodNullable<z.ZodObject<{
|
|
418
|
+
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
419
|
+
outputTokens: z.ZodNullable<z.ZodNumber>;
|
|
420
|
+
cacheReadTokens: z.ZodNullable<z.ZodNumber>;
|
|
421
|
+
cacheCreationTokens: z.ZodNullable<z.ZodNumber>;
|
|
422
|
+
}, z.core.$strip>>;
|
|
423
|
+
available: z.ZodBoolean;
|
|
424
|
+
}, z.core.$strip>>>;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
}, z.core.$strict>>;
|
|
427
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The ways the control endpoint itself fails — one list, because two places need it and a second
|
|
4
|
+
* copy would drift: the turn state a consumer reads, and the snapshot reason the resident observer
|
|
5
|
+
* publishes. Each has a different answer for a person, which is the whole point of keeping them
|
|
6
|
+
* apart; the last is the honest fallback for a failure this build cannot name.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CONNECTION_REASONS: readonly ['endpoint-absent', 'endpoint-not-listening', 'upgrade-refused', 'connection-lost', 'connection-unavailable'];
|
|
9
|
+
export type ConnectionReason = (typeof CONNECTION_REASONS)[number];
|
|
10
|
+
/** Receipt timestamps describe a short-lived observation, never the start time of a turn. */
|
|
11
|
+
export declare const ExternalTurnStateSchema: z.ZodObject<{
|
|
12
|
+
state: z.ZodEnum<{
|
|
13
|
+
idle: "idle";
|
|
14
|
+
unknown: "unknown";
|
|
15
|
+
"waiting-approval": "waiting-approval";
|
|
16
|
+
"waiting-input": "waiting-input";
|
|
17
|
+
working: "working";
|
|
18
|
+
}>;
|
|
19
|
+
evidence: z.ZodEnum<{
|
|
20
|
+
observed: "observed";
|
|
21
|
+
stale: "stale";
|
|
22
|
+
unavailable: "unavailable";
|
|
23
|
+
unknown: "unknown";
|
|
24
|
+
}>;
|
|
25
|
+
source: z.ZodEnum<{
|
|
26
|
+
"codex-app-server": "codex-app-server";
|
|
27
|
+
unsupported: "unsupported";
|
|
28
|
+
}>;
|
|
29
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
30
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
31
|
+
observedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
32
|
+
expiresAt: z.ZodNullable<z.ZodISODateTime>;
|
|
33
|
+
reason: z.ZodEnum<{
|
|
34
|
+
"connection-lost": "connection-lost";
|
|
35
|
+
"connection-unavailable": "connection-unavailable";
|
|
36
|
+
deadline: "deadline";
|
|
37
|
+
"endpoint-absent": "endpoint-absent";
|
|
38
|
+
"endpoint-not-listening": "endpoint-not-listening";
|
|
39
|
+
"native-status": "native-status";
|
|
40
|
+
"not-loaded": "not-loaded";
|
|
41
|
+
"not-observed": "not-observed";
|
|
42
|
+
"not-reported": "not-reported";
|
|
43
|
+
"read-limit": "read-limit";
|
|
44
|
+
"system-error": "system-error";
|
|
45
|
+
"unsupported-provider": "unsupported-provider";
|
|
46
|
+
"unsupported-runtime": "unsupported-runtime";
|
|
47
|
+
"unsupported-status": "unsupported-status";
|
|
48
|
+
"upgrade-refused": "upgrade-refused";
|
|
49
|
+
}>;
|
|
50
|
+
remedy: z.ZodNullable<z.ZodString>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export type ExternalTurnState = z.infer<typeof ExternalTurnStateSchema>;
|
|
53
|
+
/** One table, so the reason and its cure cannot drift apart into two sources of truth. */
|
|
54
|
+
export declare function remedyFor(reason: ExternalTurnState['reason']): string | null;
|
|
55
|
+
export declare function unknownTurnState(source: ExternalTurnState['source'], reason?: ExternalTurnState['reason'], evidence?: ExternalTurnState['evidence']): ExternalTurnState;
|