@intentic/sandbox-contract 1.125.1 → 1.132.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/dist/agent-catalog.d.ts +17 -0
- package/dist/agent-catalog.d.ts.map +1 -0
- package/dist/agent-catalog.js +28 -0
- package/dist/agent-catalog.js.map +1 -0
- package/dist/contracts/activity.contract.d.ts +4 -2
- package/dist/contracts/activity.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +321 -154
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +6 -3
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +193 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -0
- package/dist/contracts/agents.contract.js +12 -0
- package/dist/contracts/agents.contract.js.map +1 -0
- package/dist/contracts/automations.contract.d.ts +16 -16
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +48 -85
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +2 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/claude.contract.d.ts +26 -5
- package/dist/contracts/claude.contract.d.ts.map +1 -1
- package/dist/contracts/claude.contract.js +4 -3
- package/dist/contracts/claude.contract.js.map +1 -1
- package/dist/contracts/codex.contract.d.ts +30 -6
- package/dist/contracts/codex.contract.d.ts.map +1 -1
- package/dist/contracts/codex.contract.js +5 -4
- package/dist/contracts/codex.contract.js.map +1 -1
- package/dist/contracts/drafts.contract.d.ts +6 -6
- package/dist/contracts/drafts.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +153 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -0
- package/dist/contracts/extensions.contract.js +14 -0
- package/dist/contracts/extensions.contract.js.map +1 -0
- package/dist/contracts/git.contract.d.ts +153 -0
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.js +17 -1
- package/dist/contracts/git.contract.js.map +1 -1
- package/dist/contracts/grok.contract.d.ts +20 -11
- package/dist/contracts/grok.contract.d.ts.map +1 -1
- package/dist/contracts/grok.contract.js +5 -5
- package/dist/contracts/grok.contract.js.map +1 -1
- package/dist/contracts/history.contract.d.ts +4 -10
- package/dist/contracts/history.contract.d.ts.map +1 -1
- package/dist/contracts/history.contract.js +3 -4
- package/dist/contracts/history.contract.js.map +1 -1
- package/dist/contracts/intentic.contract.d.ts +7 -0
- package/dist/contracts/intentic.contract.d.ts.map +1 -1
- package/dist/contracts/intentic.contract.js +1 -0
- package/dist/contracts/intentic.contract.js.map +1 -1
- package/dist/contracts/inventory.contract.d.ts +20 -20
- package/dist/contracts/inventory.contract.d.ts.map +1 -1
- package/dist/contracts/logs.contract.d.ts.map +1 -1
- package/dist/contracts/panels.contract.d.ts +1 -1
- package/dist/contracts/panels.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.d.ts +31 -0
- package/dist/contracts/ports.contract.d.ts.map +1 -0
- package/dist/contracts/ports.contract.js +8 -0
- package/dist/contracts/ports.contract.js.map +1 -0
- package/dist/contracts/secrets.contract.d.ts +4 -3
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +1 -1
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/sessions.contract.js +4 -1
- package/dist/contracts/sessions.contract.js.map +1 -1
- package/dist/contracts/settings.contract.d.ts +41 -2
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +2 -1
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +105 -5
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +2 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/translator.contract.d.ts +25 -0
- package/dist/contracts/translator.contract.d.ts.map +1 -0
- package/dist/contracts/translator.contract.js +15 -0
- package/dist/contracts/translator.contract.js.map +1 -0
- package/dist/contracts/workspace.contract.d.ts +93 -12
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +5 -3
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/effects.d.ts +42 -0
- package/dist/effects.d.ts.map +1 -0
- package/dist/effects.js +79 -0
- package/dist/effects.js.map +1 -0
- package/dist/events.d.ts +421 -11
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +77 -6
- package/dist/events.js.map +1 -1
- package/dist/hostnames.d.ts +20 -0
- package/dist/hostnames.d.ts.map +1 -0
- package/dist/hostnames.js +47 -0
- package/dist/hostnames.js.map +1 -0
- package/dist/index.d.ts +1307 -339
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/model-metadata.d.ts +7 -0
- package/dist/model-metadata.d.ts.map +1 -0
- package/dist/model-metadata.js +18 -0
- package/dist/model-metadata.js.map +1 -0
- package/dist/schemas.d.ts +1179 -349
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +306 -65
- package/dist/schemas.js.map +1 -1
- package/dist/sse.d.ts +3 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +35 -0
- package/dist/sse.js.map +1 -0
- package/dist/terminal-protocol.d.ts +20 -0
- package/dist/terminal-protocol.d.ts.map +1 -0
- package/dist/terminal-protocol.js +2 -0
- package/dist/terminal-protocol.js.map +1 -0
- package/dist/tunnel-ids.d.ts +2 -0
- package/dist/tunnel-ids.d.ts.map +1 -1
- package/dist/tunnel-ids.js +3 -1
- package/dist/tunnel-ids.js.map +1 -1
- package/package.json +13 -7
- package/src/agent-catalog.ts +62 -0
- package/src/contracts/activity.contract.ts +9 -0
- package/src/contracts/agent.contract.ts +17 -0
- package/src/contracts/agents.contract.ts +28 -0
- package/src/contracts/automations.contract.ts +23 -0
- package/src/contracts/capabilities.contract.ts +31 -0
- package/src/contracts/claude.contract.ts +22 -0
- package/src/contracts/codex.contract.ts +23 -0
- package/src/contracts/drafts.contract.ts +11 -0
- package/src/contracts/extensions.contract.ts +28 -0
- package/src/contracts/git.contract.ts +64 -0
- package/src/contracts/grok.contract.ts +16 -0
- package/src/contracts/history.contract.ts +12 -0
- package/src/contracts/intentic.contract.ts +17 -0
- package/src/contracts/inventory.contract.ts +11 -0
- package/src/contracts/logs.contract.ts +9 -0
- package/src/contracts/panels.contract.ts +12 -0
- package/src/contracts/ports.contract.ts +11 -0
- package/src/contracts/secrets.contract.ts +15 -0
- package/src/contracts/sessions.contract.ts +14 -0
- package/src/contracts/settings.contract.ts +11 -0
- package/src/contracts/system.contract.ts +37 -0
- package/src/contracts/translator.contract.ts +20 -0
- package/src/contracts/workspace.contract.ts +74 -0
- package/src/effects.test.ts +132 -0
- package/src/effects.ts +138 -0
- package/src/events.ts +277 -0
- package/src/hostnames.test.ts +44 -0
- package/src/hostnames.ts +97 -0
- package/src/index.ts +84 -0
- package/src/model-metadata.ts +30 -0
- package/src/schemas.ts +1407 -0
- package/src/sse.ts +43 -0
- package/src/terminal-protocol.ts +16 -0
- package/src/tunnel-ids.ts +19 -0
package/dist/events.d.ts
CHANGED
|
@@ -16,12 +16,18 @@ export declare const AskQuestionSchema: z.ZodObject<{
|
|
|
16
16
|
}, z.core.$strip>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
export type AskQuestion = z.infer<typeof AskQuestionSchema>;
|
|
19
|
+
export declare const AgentCommandSchema: z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
description: z.ZodString;
|
|
22
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type AgentCommand = z.infer<typeof AgentCommandSchema>;
|
|
19
25
|
export declare const TodoItemSchema: z.ZodObject<{
|
|
20
26
|
content: z.ZodString;
|
|
21
27
|
status: z.ZodEnum<{
|
|
22
|
-
pending: "pending";
|
|
23
|
-
in_progress: "in_progress";
|
|
24
28
|
completed: "completed";
|
|
29
|
+
in_progress: "in_progress";
|
|
30
|
+
pending: "pending";
|
|
25
31
|
}>;
|
|
26
32
|
activeForm: z.ZodOptional<z.ZodString>;
|
|
27
33
|
}, z.core.$strip>;
|
|
@@ -42,12 +48,61 @@ export declare const ContextUsageSchema: z.ZodObject<{
|
|
|
42
48
|
contextWindow: z.ZodNumber;
|
|
43
49
|
}, z.core.$strip>;
|
|
44
50
|
export type ContextUsage = z.infer<typeof ContextUsageSchema>;
|
|
51
|
+
export declare const ToolKindSchema: z.ZodEnum<{
|
|
52
|
+
delete: "delete";
|
|
53
|
+
edit: "edit";
|
|
54
|
+
execute: "execute";
|
|
55
|
+
fetch: "fetch";
|
|
56
|
+
move: "move";
|
|
57
|
+
other: "other";
|
|
58
|
+
read: "read";
|
|
59
|
+
search: "search";
|
|
60
|
+
think: "think";
|
|
61
|
+
}>;
|
|
62
|
+
export type ToolKind = z.infer<typeof ToolKindSchema>;
|
|
63
|
+
export declare const ToolCallStatusSchema: z.ZodEnum<{
|
|
64
|
+
completed: "completed";
|
|
65
|
+
failed: "failed";
|
|
66
|
+
in_progress: "in_progress";
|
|
67
|
+
pending: "pending";
|
|
68
|
+
}>;
|
|
69
|
+
export type ToolCallStatus = z.infer<typeof ToolCallStatusSchema>;
|
|
70
|
+
export declare const ToolCallLocationSchema: z.ZodObject<{
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export type ToolCallLocation = z.infer<typeof ToolCallLocationSchema>;
|
|
75
|
+
export declare const ToolCallContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
76
|
+
type: z.ZodLiteral<"text">;
|
|
77
|
+
text: z.ZodString;
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
type: z.ZodLiteral<"diff">;
|
|
80
|
+
path: z.ZodString;
|
|
81
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
82
|
+
newText: z.ZodString;
|
|
83
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
}, z.core.$strip>], "type">;
|
|
85
|
+
export type ToolCallContent = z.infer<typeof ToolCallContentSchema>;
|
|
45
86
|
export declare const AgentEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
87
|
kind: z.ZodLiteral<"session">;
|
|
47
88
|
sessionId: z.ZodString;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<"worktree">;
|
|
91
|
+
branch: z.ZodString;
|
|
92
|
+
base: z.ZodString;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
kind: z.ZodLiteral<"landed">;
|
|
95
|
+
landed: z.ZodBoolean;
|
|
96
|
+
conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
|
+
repo: z.ZodString;
|
|
98
|
+
paths: z.ZodArray<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>>;
|
|
48
100
|
}, z.core.$strip>, z.ZodObject<{
|
|
49
101
|
kind: z.ZodLiteral<"init">;
|
|
50
102
|
model: z.ZodString;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"checkpoint">;
|
|
105
|
+
id: z.ZodString;
|
|
51
106
|
}, z.core.$strip>, z.ZodObject<{
|
|
52
107
|
kind: z.ZodLiteral<"delta">;
|
|
53
108
|
text: z.ZodString;
|
|
@@ -57,16 +112,65 @@ export declare const AgentEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
57
112
|
text: z.ZodString;
|
|
58
113
|
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
59
114
|
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
-
kind: z.ZodLiteral<"
|
|
61
|
-
id: z.
|
|
115
|
+
kind: z.ZodLiteral<"tool_call">;
|
|
116
|
+
id: z.ZodString;
|
|
62
117
|
name: z.ZodString;
|
|
118
|
+
category: z.ZodEnum<{
|
|
119
|
+
delete: "delete";
|
|
120
|
+
edit: "edit";
|
|
121
|
+
execute: "execute";
|
|
122
|
+
fetch: "fetch";
|
|
123
|
+
move: "move";
|
|
124
|
+
other: "other";
|
|
125
|
+
read: "read";
|
|
126
|
+
search: "search";
|
|
127
|
+
think: "think";
|
|
128
|
+
}>;
|
|
129
|
+
status: z.ZodEnum<{
|
|
130
|
+
completed: "completed";
|
|
131
|
+
failed: "failed";
|
|
132
|
+
in_progress: "in_progress";
|
|
133
|
+
pending: "pending";
|
|
134
|
+
}>;
|
|
63
135
|
target: z.ZodOptional<z.ZodString>;
|
|
136
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
137
|
+
path: z.ZodString;
|
|
138
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strip>>>;
|
|
140
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
141
|
+
type: z.ZodLiteral<"text">;
|
|
142
|
+
text: z.ZodString;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"diff">;
|
|
145
|
+
path: z.ZodString;
|
|
146
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
147
|
+
newText: z.ZodString;
|
|
148
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
}, z.core.$strip>], "type">>>;
|
|
64
150
|
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
65
151
|
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
-
kind: z.ZodLiteral<"
|
|
67
|
-
id: z.
|
|
68
|
-
|
|
69
|
-
|
|
152
|
+
kind: z.ZodLiteral<"tool_call_update">;
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
completed: "completed";
|
|
156
|
+
failed: "failed";
|
|
157
|
+
in_progress: "in_progress";
|
|
158
|
+
pending: "pending";
|
|
159
|
+
}>>;
|
|
160
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
161
|
+
type: z.ZodLiteral<"text">;
|
|
162
|
+
text: z.ZodString;
|
|
163
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
164
|
+
type: z.ZodLiteral<"diff">;
|
|
165
|
+
path: z.ZodString;
|
|
166
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
167
|
+
newText: z.ZodString;
|
|
168
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
+
}, z.core.$strip>], "type">>>;
|
|
170
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
+
path: z.ZodString;
|
|
172
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
}, z.core.$strip>>>;
|
|
70
174
|
}, z.core.$strip>, z.ZodObject<{
|
|
71
175
|
kind: z.ZodLiteral<"terminal">;
|
|
72
176
|
session: z.ZodString;
|
|
@@ -75,17 +179,27 @@ export declare const AgentEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
75
179
|
items: z.ZodArray<z.ZodObject<{
|
|
76
180
|
content: z.ZodString;
|
|
77
181
|
status: z.ZodEnum<{
|
|
78
|
-
pending: "pending";
|
|
79
|
-
in_progress: "in_progress";
|
|
80
182
|
completed: "completed";
|
|
183
|
+
in_progress: "in_progress";
|
|
184
|
+
pending: "pending";
|
|
81
185
|
}>;
|
|
82
186
|
activeForm: z.ZodOptional<z.ZodString>;
|
|
83
187
|
}, z.core.$strip>>;
|
|
188
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
189
|
+
kind: z.ZodLiteral<"commands">;
|
|
190
|
+
items: z.ZodArray<z.ZodObject<{
|
|
191
|
+
name: z.ZodString;
|
|
192
|
+
description: z.ZodString;
|
|
193
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
84
195
|
}, z.core.$strip>, z.ZodObject<{
|
|
85
196
|
kind: z.ZodLiteral<"usage">;
|
|
197
|
+
account: z.ZodOptional<z.ZodString>;
|
|
86
198
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
87
199
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
88
200
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
cacheReadTokens: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
cacheCreationTokens: z.ZodOptional<z.ZodNumber>;
|
|
89
203
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
90
204
|
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
91
205
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -98,6 +212,7 @@ export declare const AgentEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
98
212
|
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
99
213
|
utilization: z.ZodOptional<z.ZodNumber>;
|
|
100
214
|
kind: z.ZodLiteral<"rate_limit_info">;
|
|
215
|
+
account: z.ZodOptional<z.ZodString>;
|
|
101
216
|
}, z.core.$strip>, z.ZodObject<{
|
|
102
217
|
tokens: z.ZodNumber;
|
|
103
218
|
contextWindow: z.ZodNumber;
|
|
@@ -128,13 +243,202 @@ export declare const AgentEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
128
243
|
kind: z.ZodLiteral<"error">;
|
|
129
244
|
message: z.ZodString;
|
|
130
245
|
code: z.ZodOptional<z.ZodEnum<{
|
|
131
|
-
"
|
|
246
|
+
"agent-busy": "agent-busy";
|
|
247
|
+
"codex-model-invalid": "codex-model-invalid";
|
|
248
|
+
"codex-reauth": "codex-reauth";
|
|
249
|
+
"grok-model-invalid": "grok-model-invalid";
|
|
132
250
|
rate_limit: "rate_limit";
|
|
251
|
+
"session-not-found": "session-not-found";
|
|
252
|
+
"subscription-required": "subscription-required";
|
|
133
253
|
}>>;
|
|
134
254
|
}, z.core.$strip>, z.ZodObject<{
|
|
135
255
|
kind: z.ZodLiteral<"done">;
|
|
136
256
|
}, z.core.$strip>], "kind">;
|
|
137
257
|
export type AgentEvent = z.infer<typeof AgentEventSchema>;
|
|
258
|
+
export declare const AttachFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
259
|
+
kind: z.ZodLiteral<"attached">;
|
|
260
|
+
run: z.ZodString;
|
|
261
|
+
prompt: z.ZodString;
|
|
262
|
+
startedAt: z.ZodNumber;
|
|
263
|
+
seq: z.ZodNumber;
|
|
264
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
265
|
+
kind: z.ZodLiteral<"frame">;
|
|
266
|
+
seq: z.ZodNumber;
|
|
267
|
+
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"session">;
|
|
269
|
+
sessionId: z.ZodString;
|
|
270
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
271
|
+
kind: z.ZodLiteral<"worktree">;
|
|
272
|
+
branch: z.ZodString;
|
|
273
|
+
base: z.ZodString;
|
|
274
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
+
kind: z.ZodLiteral<"landed">;
|
|
276
|
+
landed: z.ZodBoolean;
|
|
277
|
+
conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
278
|
+
repo: z.ZodString;
|
|
279
|
+
paths: z.ZodArray<z.ZodString>;
|
|
280
|
+
}, z.core.$strip>>>;
|
|
281
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
282
|
+
kind: z.ZodLiteral<"init">;
|
|
283
|
+
model: z.ZodString;
|
|
284
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
285
|
+
kind: z.ZodLiteral<"checkpoint">;
|
|
286
|
+
id: z.ZodString;
|
|
287
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
288
|
+
kind: z.ZodLiteral<"delta">;
|
|
289
|
+
text: z.ZodString;
|
|
290
|
+
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
291
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
292
|
+
kind: z.ZodLiteral<"thinking">;
|
|
293
|
+
text: z.ZodString;
|
|
294
|
+
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
295
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
296
|
+
kind: z.ZodLiteral<"tool_call">;
|
|
297
|
+
id: z.ZodString;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
category: z.ZodEnum<{
|
|
300
|
+
delete: "delete";
|
|
301
|
+
edit: "edit";
|
|
302
|
+
execute: "execute";
|
|
303
|
+
fetch: "fetch";
|
|
304
|
+
move: "move";
|
|
305
|
+
other: "other";
|
|
306
|
+
read: "read";
|
|
307
|
+
search: "search";
|
|
308
|
+
think: "think";
|
|
309
|
+
}>;
|
|
310
|
+
status: z.ZodEnum<{
|
|
311
|
+
completed: "completed";
|
|
312
|
+
failed: "failed";
|
|
313
|
+
in_progress: "in_progress";
|
|
314
|
+
pending: "pending";
|
|
315
|
+
}>;
|
|
316
|
+
target: z.ZodOptional<z.ZodString>;
|
|
317
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
318
|
+
path: z.ZodString;
|
|
319
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
320
|
+
}, z.core.$strip>>>;
|
|
321
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
322
|
+
type: z.ZodLiteral<"text">;
|
|
323
|
+
text: z.ZodString;
|
|
324
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
325
|
+
type: z.ZodLiteral<"diff">;
|
|
326
|
+
path: z.ZodString;
|
|
327
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
328
|
+
newText: z.ZodString;
|
|
329
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
330
|
+
}, z.core.$strip>], "type">>>;
|
|
331
|
+
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
332
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
333
|
+
kind: z.ZodLiteral<"tool_call_update">;
|
|
334
|
+
id: z.ZodString;
|
|
335
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
336
|
+
completed: "completed";
|
|
337
|
+
failed: "failed";
|
|
338
|
+
in_progress: "in_progress";
|
|
339
|
+
pending: "pending";
|
|
340
|
+
}>>;
|
|
341
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
342
|
+
type: z.ZodLiteral<"text">;
|
|
343
|
+
text: z.ZodString;
|
|
344
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
345
|
+
type: z.ZodLiteral<"diff">;
|
|
346
|
+
path: z.ZodString;
|
|
347
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
348
|
+
newText: z.ZodString;
|
|
349
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
+
}, z.core.$strip>], "type">>>;
|
|
351
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
|
+
path: z.ZodString;
|
|
353
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
354
|
+
}, z.core.$strip>>>;
|
|
355
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
356
|
+
kind: z.ZodLiteral<"terminal">;
|
|
357
|
+
session: z.ZodString;
|
|
358
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
359
|
+
kind: z.ZodLiteral<"todos">;
|
|
360
|
+
items: z.ZodArray<z.ZodObject<{
|
|
361
|
+
content: z.ZodString;
|
|
362
|
+
status: z.ZodEnum<{
|
|
363
|
+
completed: "completed";
|
|
364
|
+
in_progress: "in_progress";
|
|
365
|
+
pending: "pending";
|
|
366
|
+
}>;
|
|
367
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
368
|
+
}, z.core.$strip>>;
|
|
369
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
370
|
+
kind: z.ZodLiteral<"commands">;
|
|
371
|
+
items: z.ZodArray<z.ZodObject<{
|
|
372
|
+
name: z.ZodString;
|
|
373
|
+
description: z.ZodString;
|
|
374
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
375
|
+
}, z.core.$strip>>;
|
|
376
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
377
|
+
kind: z.ZodLiteral<"usage">;
|
|
378
|
+
account: z.ZodOptional<z.ZodString>;
|
|
379
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
380
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
381
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
cacheReadTokens: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
cacheCreationTokens: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
385
|
+
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
386
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
387
|
+
status: z.ZodEnum<{
|
|
388
|
+
allowed: "allowed";
|
|
389
|
+
allowed_warning: "allowed_warning";
|
|
390
|
+
rejected: "rejected";
|
|
391
|
+
}>;
|
|
392
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
394
|
+
utilization: z.ZodOptional<z.ZodNumber>;
|
|
395
|
+
kind: z.ZodLiteral<"rate_limit_info">;
|
|
396
|
+
account: z.ZodOptional<z.ZodString>;
|
|
397
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
398
|
+
tokens: z.ZodNumber;
|
|
399
|
+
contextWindow: z.ZodNumber;
|
|
400
|
+
kind: z.ZodLiteral<"context_usage">;
|
|
401
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
402
|
+
kind: z.ZodLiteral<"compact">;
|
|
403
|
+
trigger: z.ZodString;
|
|
404
|
+
preTokens: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
+
kind: z.ZodLiteral<"plan">;
|
|
408
|
+
decisionId: z.ZodString;
|
|
409
|
+
text: z.ZodString;
|
|
410
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
411
|
+
kind: z.ZodLiteral<"question">;
|
|
412
|
+
requestId: z.ZodString;
|
|
413
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
414
|
+
question: z.ZodString;
|
|
415
|
+
header: z.ZodString;
|
|
416
|
+
multiSelect: z.ZodBoolean;
|
|
417
|
+
options: z.ZodArray<z.ZodObject<{
|
|
418
|
+
label: z.ZodString;
|
|
419
|
+
description: z.ZodString;
|
|
420
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
}, z.core.$strip>>;
|
|
423
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
424
|
+
kind: z.ZodLiteral<"error">;
|
|
425
|
+
message: z.ZodString;
|
|
426
|
+
code: z.ZodOptional<z.ZodEnum<{
|
|
427
|
+
"agent-busy": "agent-busy";
|
|
428
|
+
"codex-model-invalid": "codex-model-invalid";
|
|
429
|
+
"codex-reauth": "codex-reauth";
|
|
430
|
+
"grok-model-invalid": "grok-model-invalid";
|
|
431
|
+
rate_limit: "rate_limit";
|
|
432
|
+
"session-not-found": "session-not-found";
|
|
433
|
+
"subscription-required": "subscription-required";
|
|
434
|
+
}>>;
|
|
435
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
436
|
+
kind: z.ZodLiteral<"done">;
|
|
437
|
+
}, z.core.$strip>], "kind">;
|
|
438
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
439
|
+
kind: z.ZodLiteral<"end">;
|
|
440
|
+
}, z.core.$strip>], "kind">;
|
|
441
|
+
export type AttachFrame = z.infer<typeof AttachFrameSchema>;
|
|
138
442
|
export declare const IntenticLineSchema: z.ZodObject<{
|
|
139
443
|
kind: z.ZodString;
|
|
140
444
|
}, z.core.$loose>;
|
|
@@ -148,6 +452,11 @@ export declare const HelloSchema: z.ZodObject<{
|
|
|
148
452
|
workspaceId: z.ZodString;
|
|
149
453
|
}, z.core.$strip>;
|
|
150
454
|
export type Hello = z.infer<typeof HelloSchema>;
|
|
455
|
+
export declare const ReposChangedSchema: z.ZodObject<{
|
|
456
|
+
kind: z.ZodLiteral<"reposChanged">;
|
|
457
|
+
repos: z.ZodArray<z.ZodString>;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
export type ReposChanged = z.infer<typeof ReposChangedSchema>;
|
|
151
460
|
export declare const WorkspaceChangedSchema: z.ZodObject<{
|
|
152
461
|
kind: z.ZodLiteral<"workspaceChanged">;
|
|
153
462
|
paths: z.ZodArray<z.ZodString>;
|
|
@@ -178,6 +487,56 @@ export declare const PresenceSchema: z.ZodObject<{
|
|
|
178
487
|
}, z.core.$strip>>;
|
|
179
488
|
}, z.core.$strip>;
|
|
180
489
|
export type Presence = z.infer<typeof PresenceSchema>;
|
|
490
|
+
export declare const AgentsSchema: z.ZodObject<{
|
|
491
|
+
kind: z.ZodLiteral<"agents">;
|
|
492
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
493
|
+
id: z.ZodString;
|
|
494
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
495
|
+
title: z.ZodOptional<z.ZodString>;
|
|
496
|
+
status: z.ZodEnum<{
|
|
497
|
+
awaiting: "awaiting";
|
|
498
|
+
conflict: "conflict";
|
|
499
|
+
error: "error";
|
|
500
|
+
idle: "idle";
|
|
501
|
+
landed: "landed";
|
|
502
|
+
running: "running";
|
|
503
|
+
}>;
|
|
504
|
+
provider: z.ZodString;
|
|
505
|
+
harness: z.ZodEnum<{
|
|
506
|
+
"claude-code": "claude-code";
|
|
507
|
+
native: "native";
|
|
508
|
+
}>;
|
|
509
|
+
model: z.ZodOptional<z.ZodString>;
|
|
510
|
+
account: z.ZodOptional<z.ZodString>;
|
|
511
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
512
|
+
base: z.ZodOptional<z.ZodString>;
|
|
513
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
514
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
516
|
+
contextTokens: z.ZodOptional<z.ZodNumber>;
|
|
517
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
518
|
+
activity: z.ZodOptional<z.ZodObject<{
|
|
519
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
520
|
+
target: z.ZodOptional<z.ZodString>;
|
|
521
|
+
todo: z.ZodOptional<z.ZodString>;
|
|
522
|
+
}, z.core.$strip>>;
|
|
523
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
524
|
+
updatedAt: z.ZodNumber;
|
|
525
|
+
attention: z.ZodObject<{
|
|
526
|
+
plan: z.ZodBoolean;
|
|
527
|
+
question: z.ZodBoolean;
|
|
528
|
+
conflict: z.ZodBoolean;
|
|
529
|
+
}, z.core.$strip>;
|
|
530
|
+
turns: z.ZodOptional<z.ZodNumber>;
|
|
531
|
+
toolUses: z.ZodOptional<z.ZodNumber>;
|
|
532
|
+
diff: z.ZodOptional<z.ZodObject<{
|
|
533
|
+
files: z.ZodNumber;
|
|
534
|
+
insertions: z.ZodNumber;
|
|
535
|
+
deletions: z.ZodNumber;
|
|
536
|
+
}, z.core.$strip>>;
|
|
537
|
+
}, z.core.$strip>>;
|
|
538
|
+
}, z.core.$strip>;
|
|
539
|
+
export type Agents = z.infer<typeof AgentsSchema>;
|
|
181
540
|
export declare const SystemEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
182
541
|
kind: z.ZodLiteral<"hello">;
|
|
183
542
|
workspaceId: z.ZodString;
|
|
@@ -186,6 +545,9 @@ export declare const SystemEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
186
545
|
}, z.core.$strip>, z.ZodObject<{
|
|
187
546
|
kind: z.ZodLiteral<"workspaceChanged">;
|
|
188
547
|
paths: z.ZodArray<z.ZodString>;
|
|
548
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
549
|
+
kind: z.ZodLiteral<"reposChanged">;
|
|
550
|
+
repos: z.ZodArray<z.ZodString>;
|
|
189
551
|
}, z.core.$strip>, z.ZodObject<{
|
|
190
552
|
kind: z.ZodLiteral<"presence">;
|
|
191
553
|
users: z.ZodArray<z.ZodObject<{
|
|
@@ -198,6 +560,54 @@ export declare const SystemEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
198
560
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
199
561
|
path: z.ZodOptional<z.ZodString>;
|
|
200
562
|
}, z.core.$strip>>;
|
|
563
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
564
|
+
kind: z.ZodLiteral<"agents">;
|
|
565
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
566
|
+
id: z.ZodString;
|
|
567
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
568
|
+
title: z.ZodOptional<z.ZodString>;
|
|
569
|
+
status: z.ZodEnum<{
|
|
570
|
+
awaiting: "awaiting";
|
|
571
|
+
conflict: "conflict";
|
|
572
|
+
error: "error";
|
|
573
|
+
idle: "idle";
|
|
574
|
+
landed: "landed";
|
|
575
|
+
running: "running";
|
|
576
|
+
}>;
|
|
577
|
+
provider: z.ZodString;
|
|
578
|
+
harness: z.ZodEnum<{
|
|
579
|
+
"claude-code": "claude-code";
|
|
580
|
+
native: "native";
|
|
581
|
+
}>;
|
|
582
|
+
model: z.ZodOptional<z.ZodString>;
|
|
583
|
+
account: z.ZodOptional<z.ZodString>;
|
|
584
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
585
|
+
base: z.ZodOptional<z.ZodString>;
|
|
586
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
587
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
588
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
589
|
+
contextTokens: z.ZodOptional<z.ZodNumber>;
|
|
590
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
591
|
+
activity: z.ZodOptional<z.ZodObject<{
|
|
592
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
593
|
+
target: z.ZodOptional<z.ZodString>;
|
|
594
|
+
todo: z.ZodOptional<z.ZodString>;
|
|
595
|
+
}, z.core.$strip>>;
|
|
596
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
597
|
+
updatedAt: z.ZodNumber;
|
|
598
|
+
attention: z.ZodObject<{
|
|
599
|
+
plan: z.ZodBoolean;
|
|
600
|
+
question: z.ZodBoolean;
|
|
601
|
+
conflict: z.ZodBoolean;
|
|
602
|
+
}, z.core.$strip>;
|
|
603
|
+
turns: z.ZodOptional<z.ZodNumber>;
|
|
604
|
+
toolUses: z.ZodOptional<z.ZodNumber>;
|
|
605
|
+
diff: z.ZodOptional<z.ZodObject<{
|
|
606
|
+
files: z.ZodNumber;
|
|
607
|
+
insertions: z.ZodNumber;
|
|
608
|
+
deletions: z.ZodNumber;
|
|
609
|
+
}, z.core.$strip>>;
|
|
610
|
+
}, z.core.$strip>>;
|
|
201
611
|
}, z.core.$strip>], "kind">;
|
|
202
612
|
export type SystemEvent = z.infer<typeof SystemEventSchema>;
|
|
203
613
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,iBAAiB;;;;;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAI5D,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG9D,eAAO,MAAM,cAAc;;;;;;;;iBAIzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAKtD,eAAO,MAAM,mBAAmB;;;;;;;;;iBAK9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,cAAc;;;;;;;;;;EAA6F,CAAC;AACzH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,oBAAoB;;;;;EAA4D,CAAC;AAC9F,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAKtE,eAAO,MAAM,qBAAqB;;;;;;;;;2BAShC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAOpE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyF3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAQ1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAI5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,kBAAkB;;iBAAsC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,eAAe;;iBAA6C,CAAC;AAC1E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAMxD,eAAO,MAAM,WAAW;;;iBAAkE,CAAC;AAC3F,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAKhD,eAAO,MAAM,kBAAkB;;;iBAA4E,CAAC;AAC5G,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAO9D,eAAO,MAAM,sBAAsB;;;iBAAgF,CAAC;AACpH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAKtE,eAAO,MAAM,kBAAkB;;;;;;;;;iBAa7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,cAAc;;;;;;;;;;;;iBAAgF,CAAC;AAC5G,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAItD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA+E,CAAC;AACzG,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAKlD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAO5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/events.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { AgentSummarySchema } from "./schemas.js";
|
|
2
3
|
export const AskOptionSchema = z.object({
|
|
3
4
|
label: z.string(),
|
|
4
5
|
description: z.string(),
|
|
@@ -10,6 +11,11 @@ export const AskQuestionSchema = z.object({
|
|
|
10
11
|
multiSelect: z.boolean(),
|
|
11
12
|
options: z.array(AskOptionSchema),
|
|
12
13
|
});
|
|
14
|
+
export const AgentCommandSchema = z.object({
|
|
15
|
+
name: z.string(),
|
|
16
|
+
description: z.string(),
|
|
17
|
+
hint: z.string().optional(),
|
|
18
|
+
});
|
|
13
19
|
export const TodoItemSchema = z.object({
|
|
14
20
|
content: z.string(),
|
|
15
21
|
status: z.enum(["pending", "in_progress", "completed"]),
|
|
@@ -25,40 +31,97 @@ export const ContextUsageSchema = z.object({
|
|
|
25
31
|
tokens: z.number(),
|
|
26
32
|
contextWindow: z.number(),
|
|
27
33
|
});
|
|
34
|
+
export const ToolKindSchema = z.enum(["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]);
|
|
35
|
+
export const ToolCallStatusSchema = z.enum(["pending", "in_progress", "completed", "failed"]);
|
|
36
|
+
export const ToolCallLocationSchema = z.object({
|
|
37
|
+
path: z.string(),
|
|
38
|
+
line: z.number().optional(),
|
|
39
|
+
});
|
|
40
|
+
export const ToolCallContentSchema = z.discriminatedUnion("type", [
|
|
41
|
+
z.object({ type: z.literal("text"), text: z.string() }),
|
|
42
|
+
z.object({
|
|
43
|
+
type: z.literal("diff"),
|
|
44
|
+
path: z.string(),
|
|
45
|
+
oldText: z.string().optional(),
|
|
46
|
+
newText: z.string(),
|
|
47
|
+
truncated: z.boolean().optional(),
|
|
48
|
+
}),
|
|
49
|
+
]);
|
|
28
50
|
export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
29
51
|
z.object({ kind: z.literal("session"), sessionId: z.string() }),
|
|
52
|
+
z.object({ kind: z.literal("worktree"), branch: z.string(), base: z.string() }),
|
|
53
|
+
z.object({
|
|
54
|
+
kind: z.literal("landed"),
|
|
55
|
+
landed: z.boolean(),
|
|
56
|
+
conflicts: z.array(z.object({ repo: z.string(), paths: z.array(z.string()) })).optional(),
|
|
57
|
+
}),
|
|
30
58
|
z.object({ kind: z.literal("init"), model: z.string() }),
|
|
59
|
+
z.object({ kind: z.literal("checkpoint"), id: z.string() }),
|
|
31
60
|
z.object({ kind: z.literal("delta"), text: z.string(), parentToolUseId: z.string().optional() }),
|
|
32
61
|
z.object({ kind: z.literal("thinking"), text: z.string(), parentToolUseId: z.string().optional() }),
|
|
33
62
|
z.object({
|
|
34
|
-
kind: z.literal("
|
|
35
|
-
id: z.string()
|
|
63
|
+
kind: z.literal("tool_call"),
|
|
64
|
+
id: z.string(),
|
|
36
65
|
name: z.string(),
|
|
66
|
+
category: ToolKindSchema,
|
|
67
|
+
status: ToolCallStatusSchema,
|
|
37
68
|
target: z.string().optional(),
|
|
69
|
+
locations: z.array(ToolCallLocationSchema).optional(),
|
|
70
|
+
content: z.array(ToolCallContentSchema).optional(),
|
|
38
71
|
parentToolUseId: z.string().optional(),
|
|
39
72
|
}),
|
|
40
|
-
z.object({
|
|
73
|
+
z.object({
|
|
74
|
+
kind: z.literal("tool_call_update"),
|
|
75
|
+
id: z.string(),
|
|
76
|
+
status: ToolCallStatusSchema.optional(),
|
|
77
|
+
content: z.array(ToolCallContentSchema).optional(),
|
|
78
|
+
locations: z.array(ToolCallLocationSchema).optional(),
|
|
79
|
+
}),
|
|
41
80
|
z.object({ kind: z.literal("terminal"), session: z.string() }),
|
|
42
81
|
z.object({ kind: z.literal("todos"), items: z.array(TodoItemSchema) }),
|
|
82
|
+
z.object({ kind: z.literal("commands"), items: z.array(AgentCommandSchema) }),
|
|
43
83
|
z.object({
|
|
44
84
|
kind: z.literal("usage"),
|
|
85
|
+
account: z.string().optional(),
|
|
45
86
|
costUsd: z.number().optional(),
|
|
46
87
|
inputTokens: z.number().optional(),
|
|
47
88
|
outputTokens: z.number().optional(),
|
|
89
|
+
cacheReadTokens: z.number().optional(),
|
|
90
|
+
cacheCreationTokens: z.number().optional(),
|
|
48
91
|
durationMs: z.number().optional(),
|
|
49
92
|
numTurns: z.number().optional(),
|
|
50
93
|
}),
|
|
51
|
-
RateLimitInfoSchema.extend({ kind: z.literal("rate_limit_info") }),
|
|
94
|
+
RateLimitInfoSchema.extend({ kind: z.literal("rate_limit_info"), account: z.string().optional() }),
|
|
52
95
|
ContextUsageSchema.extend({ kind: z.literal("context_usage") }),
|
|
53
96
|
z.object({ kind: z.literal("compact"), trigger: z.string(), preTokens: z.number().optional(), postTokens: z.number().optional() }),
|
|
54
97
|
z.object({ kind: z.literal("plan"), decisionId: z.string(), text: z.string() }),
|
|
55
98
|
z.object({ kind: z.literal("question"), requestId: z.string(), questions: z.array(AskQuestionSchema) }),
|
|
56
|
-
z.object({
|
|
99
|
+
z.object({
|
|
100
|
+
kind: z.literal("error"),
|
|
101
|
+
message: z.string(),
|
|
102
|
+
code: z
|
|
103
|
+
.enum([
|
|
104
|
+
"session-not-found",
|
|
105
|
+
"rate_limit",
|
|
106
|
+
"codex-reauth",
|
|
107
|
+
"grok-model-invalid",
|
|
108
|
+
"codex-model-invalid",
|
|
109
|
+
"subscription-required",
|
|
110
|
+
"agent-busy",
|
|
111
|
+
])
|
|
112
|
+
.optional(),
|
|
113
|
+
}),
|
|
57
114
|
z.object({ kind: z.literal("done") }),
|
|
58
115
|
]);
|
|
116
|
+
export const AttachFrameSchema = z.discriminatedUnion("kind", [
|
|
117
|
+
z.object({ kind: z.literal("attached"), run: z.string(), prompt: z.string(), startedAt: z.number(), seq: z.number() }),
|
|
118
|
+
z.object({ kind: z.literal("frame"), seq: z.number(), event: AgentEventSchema }),
|
|
119
|
+
z.object({ kind: z.literal("end") }),
|
|
120
|
+
]);
|
|
59
121
|
export const IntenticLineSchema = z.looseObject({ kind: z.string() });
|
|
60
122
|
export const HeartbeatSchema = z.object({ kind: z.literal("heartbeat") });
|
|
61
123
|
export const HelloSchema = z.object({ kind: z.literal("hello"), workspaceId: z.string() });
|
|
124
|
+
export const ReposChangedSchema = z.object({ kind: z.literal("reposChanged"), repos: z.array(z.string()) });
|
|
62
125
|
export const WorkspaceChangedSchema = z.object({ kind: z.literal("workspaceChanged"), paths: z.array(z.string()) });
|
|
63
126
|
export const PresenceUserSchema = z.object({
|
|
64
127
|
clientId: z.string(),
|
|
@@ -71,5 +134,13 @@ export const PresenceUserSchema = z.object({
|
|
|
71
134
|
path: z.string().optional(),
|
|
72
135
|
});
|
|
73
136
|
export const PresenceSchema = z.object({ kind: z.literal("presence"), users: z.array(PresenceUserSchema) });
|
|
74
|
-
export const
|
|
137
|
+
export const AgentsSchema = z.object({ kind: z.literal("agents"), agents: z.array(AgentSummarySchema) });
|
|
138
|
+
export const SystemEventSchema = z.discriminatedUnion("kind", [
|
|
139
|
+
HelloSchema,
|
|
140
|
+
HeartbeatSchema,
|
|
141
|
+
WorkspaceChangedSchema,
|
|
142
|
+
ReposChangedSchema,
|
|
143
|
+
PresenceSchema,
|
|
144
|
+
AgentsSchema,
|
|
145
|
+
]);
|
|
75
146
|
//# sourceMappingURL=events.js.map
|