agent-console-server 4.1.2 → 4.2.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.
@@ -1,1220 +0,0 @@
1
- import { ItemEntityType } from "@esposter/shared";
2
- import { z } from "zod";
3
- //#region src/models/command/AttachmentMediaType.d.ts
4
- declare enum AttachmentMediaType {
5
- Gif = "image/gif",
6
- Jpeg = "image/jpeg",
7
- Pdf = "application/pdf",
8
- Png = "image/png",
9
- Text = "text/plain",
10
- Webp = "image/webp"
11
- }
12
- declare const attachmentMediaTypeSchema: z.ZodEnum<typeof AttachmentMediaType>;
13
- //#endregion
14
- //#region src/models/command/Attachment.d.ts
15
- interface Attachment {
16
- data: string;
17
- mediaType: AttachmentMediaType;
18
- name: string;
19
- }
20
- declare const attachmentSchema: z.ZodObject<{
21
- data: z.ZodString;
22
- mediaType: typeof attachmentMediaTypeSchema;
23
- name: z.ZodString;
24
- }>;
25
- //#endregion
26
- //#region src/models/command/CommandType.d.ts
27
- declare enum CommandType {
28
- BackgroundTasks = "BackgroundTasks",
29
- CloseSession = "CloseSession",
30
- CloseShell = "CloseShell",
31
- CreateSession = "CreateSession",
32
- Fork = "Fork",
33
- Interrupt = "Interrupt",
34
- ListFiles = "ListFiles",
35
- ListSessions = "ListSessions",
36
- OpenShell = "OpenShell",
37
- PermissionVerdict = "PermissionVerdict",
38
- Prompt = "Prompt",
39
- ReadFile = "ReadFile",
40
- Resume = "Resume",
41
- ResumeAt = "ResumeAt",
42
- RewindFiles = "RewindFiles",
43
- SetModel = "SetModel",
44
- SetPermissionMode = "SetPermissionMode",
45
- ShellInput = "ShellInput",
46
- ShellResize = "ShellResize",
47
- SlashCommand = "SlashCommand",
48
- StopTask = "StopTask"
49
- }
50
- declare const commandTypeSchema: z.ZodEnum<typeof CommandType>;
51
- //#endregion
52
- //#region src/models/command/BaseCommand.d.ts
53
- interface BaseCommand<T extends CommandType> extends ItemEntityType<T> {
54
- id: string;
55
- }
56
- declare const createBaseCommandSchema: <T extends z.ZodType<CommandType>>(typeSchema: T) => z.ZodObject<{
57
- id: z.ZodString;
58
- type: T;
59
- }>;
60
- //#endregion
61
- //#region src/models/command/SessionId.d.ts
62
- interface SessionId {
63
- sessionId: string;
64
- }
65
- declare const sessionIdSchema: z.ZodObject<{
66
- sessionId: z.ZodString;
67
- }>;
68
- //#endregion
69
- //#region src/models/command/BackgroundTasksCommand.d.ts
70
- interface BackgroundTasksCommand extends BaseCommand<CommandType.BackgroundTasks>, SessionId {}
71
- declare const backgroundTasksCommandSchema: z.ZodObject<{
72
- id: z.ZodString;
73
- sessionId: z.ZodString;
74
- type: z.ZodLiteral<CommandType.BackgroundTasks>;
75
- }>;
76
- //#endregion
77
- //#region src/models/command/CloseSessionCommand.d.ts
78
- interface CloseSessionCommand extends BaseCommand<CommandType.CloseSession>, SessionId {}
79
- declare const closeSessionCommandSchema: z.ZodObject<{
80
- id: z.ZodString;
81
- sessionId: z.ZodString;
82
- type: z.ZodLiteral<CommandType.CloseSession>;
83
- }>;
84
- //#endregion
85
- //#region src/models/command/ShellId.d.ts
86
- interface ShellId {
87
- shellId: string;
88
- }
89
- declare const shellIdSchema: z.ZodObject<{
90
- shellId: z.ZodString;
91
- }>;
92
- //#endregion
93
- //#region src/models/command/CloseShellCommand.d.ts
94
- interface CloseShellCommand extends BaseCommand<CommandType.CloseShell>, ShellId {}
95
- declare const closeShellCommandSchema: z.ZodObject<{
96
- id: z.ZodString;
97
- shellId: z.ZodString;
98
- type: z.ZodLiteral<CommandType.CloseShell>;
99
- }>;
100
- //#endregion
101
- //#region src/models/command/CreateSessionCommand.d.ts
102
- interface CreateSessionCommand extends BaseCommand<CommandType.CreateSession> {
103
- cwd: string;
104
- }
105
- declare const createSessionCommandSchema: z.ZodObject<{
106
- cwd: z.ZodString;
107
- id: z.ZodString;
108
- type: z.ZodLiteral<CommandType.CreateSession>;
109
- }>;
110
- //#endregion
111
- //#region src/models/command/ForkCommand.d.ts
112
- interface ForkCommand extends BaseCommand<CommandType.Fork>, SessionId {
113
- messageUuid: string;
114
- }
115
- declare const forkCommandSchema: z.ZodObject<{
116
- id: z.ZodString;
117
- messageUuid: z.ZodString;
118
- sessionId: z.ZodString;
119
- type: z.ZodLiteral<CommandType.Fork>;
120
- }>;
121
- //#endregion
122
- //#region src/models/command/InterruptCommand.d.ts
123
- interface InterruptCommand extends BaseCommand<CommandType.Interrupt>, SessionId {}
124
- declare const interruptCommandSchema: z.ZodObject<{
125
- id: z.ZodString;
126
- sessionId: z.ZodString;
127
- type: z.ZodLiteral<CommandType.Interrupt>;
128
- }>;
129
- //#endregion
130
- //#region src/models/command/ListSessionsCommand.d.ts
131
- interface ListSessionsCommand extends BaseCommand<CommandType.ListSessions> {}
132
- declare const listSessionsCommandSchema: z.ZodObject<{
133
- id: z.ZodString;
134
- type: z.ZodLiteral<CommandType.ListSessions>;
135
- }>;
136
- //#endregion
137
- //#region src/models/command/PermissionBehavior.d.ts
138
- declare enum PermissionBehavior {
139
- Allow = "Allow",
140
- AllowAlways = "AllowAlways",
141
- Deny = "Deny"
142
- }
143
- declare const permissionBehaviorSchema: z.ZodEnum<typeof PermissionBehavior>;
144
- //#endregion
145
- //#region src/models/command/PermissionVerdictCommand.d.ts
146
- interface PermissionVerdictCommand extends BaseCommand<CommandType.PermissionVerdict>, SessionId {
147
- behavior: PermissionBehavior;
148
- message: string;
149
- requestId: string;
150
- }
151
- declare const permissionVerdictCommandSchema: z.ZodObject<{
152
- behavior: typeof permissionBehaviorSchema;
153
- id: z.ZodString;
154
- message: z.ZodString;
155
- requestId: z.ZodString;
156
- sessionId: z.ZodString;
157
- type: z.ZodLiteral<CommandType.PermissionVerdict>;
158
- }>;
159
- //#endregion
160
- //#region src/models/command/PromptCommand.d.ts
161
- interface PromptCommand extends BaseCommand<CommandType.Prompt>, SessionId {
162
- attachments: Attachment[];
163
- text: string;
164
- }
165
- declare const promptCommandSchema: z.ZodObject<{
166
- attachments: z.ZodArray<typeof attachmentSchema>;
167
- id: z.ZodString;
168
- sessionId: z.ZodString;
169
- text: z.ZodString;
170
- type: z.ZodLiteral<CommandType.Prompt>;
171
- }>;
172
- //#endregion
173
- //#region src/models/command/ResumeAtCommand.d.ts
174
- interface ResumeAtCommand extends BaseCommand<CommandType.ResumeAt>, SessionId {
175
- messageUuid: string;
176
- }
177
- declare const resumeAtCommandSchema: z.ZodObject<{
178
- id: z.ZodString;
179
- messageUuid: z.ZodString;
180
- sessionId: z.ZodString;
181
- type: z.ZodLiteral<CommandType.ResumeAt>;
182
- }>;
183
- //#endregion
184
- //#region src/models/command/ResumeCommand.d.ts
185
- interface ResumeCommand extends BaseCommand<CommandType.Resume>, SessionId {}
186
- declare const resumeCommandSchema: z.ZodObject<{
187
- id: z.ZodString;
188
- sessionId: z.ZodString;
189
- type: z.ZodLiteral<CommandType.Resume>;
190
- }>;
191
- //#endregion
192
- //#region src/models/command/RewindFilesCommand.d.ts
193
- interface RewindFilesCommand extends BaseCommand<CommandType.RewindFiles>, SessionId {
194
- messageUuid: string;
195
- }
196
- declare const rewindFilesCommandSchema: z.ZodObject<{
197
- id: z.ZodString;
198
- messageUuid: z.ZodString;
199
- sessionId: z.ZodString;
200
- type: z.ZodLiteral<CommandType.RewindFiles>;
201
- }>;
202
- //#endregion
203
- //#region src/models/command/SetModelCommand.d.ts
204
- interface SetModelCommand extends BaseCommand<CommandType.SetModel>, SessionId {
205
- model: string;
206
- }
207
- declare const setModelCommandSchema: z.ZodObject<{
208
- id: z.ZodString;
209
- model: z.ZodString;
210
- sessionId: z.ZodString;
211
- type: z.ZodLiteral<CommandType.SetModel>;
212
- }>;
213
- //#endregion
214
- //#region src/models/session/PermissionMode.d.ts
215
- declare enum PermissionMode {
216
- AcceptEdits = "acceptEdits",
217
- Auto = "auto",
218
- BypassPermissions = "bypassPermissions",
219
- Default = "default",
220
- DontAsk = "dontAsk",
221
- Plan = "plan"
222
- }
223
- declare const permissionModeSchema: z.ZodEnum<typeof PermissionMode>;
224
- //#endregion
225
- //#region src/models/command/SetPermissionModeCommand.d.ts
226
- interface SetPermissionModeCommand extends BaseCommand<CommandType.SetPermissionMode>, SessionId {
227
- permissionMode: PermissionMode;
228
- }
229
- declare const setPermissionModeCommandSchema: z.ZodObject<{
230
- id: z.ZodString;
231
- permissionMode: typeof permissionModeSchema;
232
- sessionId: z.ZodString;
233
- type: z.ZodLiteral<CommandType.SetPermissionMode>;
234
- }>;
235
- //#endregion
236
- //#region src/models/command/SlashCommandCommand.d.ts
237
- interface SlashCommandCommand extends BaseCommand<CommandType.SlashCommand>, SessionId {
238
- arguments: string;
239
- name: string;
240
- }
241
- declare const slashCommandCommandSchema: z.ZodObject<{
242
- arguments: z.ZodString;
243
- id: z.ZodString;
244
- name: z.ZodString;
245
- sessionId: z.ZodString;
246
- type: z.ZodLiteral<CommandType.SlashCommand>;
247
- }>;
248
- //#endregion
249
- //#region src/models/command/StopTaskCommand.d.ts
250
- interface StopTaskCommand extends BaseCommand<CommandType.StopTask>, SessionId {
251
- taskId: string;
252
- }
253
- declare const stopTaskCommandSchema: z.ZodObject<{
254
- id: z.ZodString;
255
- sessionId: z.ZodString;
256
- taskId: z.ZodString;
257
- type: z.ZodLiteral<CommandType.StopTask>;
258
- }>;
259
- //#endregion
260
- //#region src/models/command/DriverCommand.d.ts
261
- type DriverCommand = BackgroundTasksCommand | CloseSessionCommand | CreateSessionCommand | ForkCommand | InterruptCommand | ListSessionsCommand | PermissionVerdictCommand | PromptCommand | ResumeAtCommand | ResumeCommand | RewindFilesCommand | SetModelCommand | SetPermissionModeCommand | SlashCommandCommand | StopTaskCommand;
262
- declare const driverCommandSchema: z.ZodDiscriminatedUnion<[typeof backgroundTasksCommandSchema, typeof closeSessionCommandSchema, typeof createSessionCommandSchema, typeof forkCommandSchema, typeof interruptCommandSchema, typeof listSessionsCommandSchema, typeof permissionVerdictCommandSchema, typeof promptCommandSchema, typeof resumeAtCommandSchema, typeof resumeCommandSchema, typeof rewindFilesCommandSchema, typeof setModelCommandSchema, typeof setPermissionModeCommandSchema, typeof slashCommandCommandSchema, typeof stopTaskCommandSchema], "type">;
263
- //#endregion
264
- //#region src/models/command/ListFilesCommand.d.ts
265
- interface ListFilesCommand extends BaseCommand<CommandType.ListFiles>, SessionId {}
266
- declare const listFilesCommandSchema: z.ZodObject<{
267
- id: z.ZodString;
268
- sessionId: z.ZodString;
269
- type: z.ZodLiteral<CommandType.ListFiles>;
270
- }>;
271
- //#endregion
272
- //#region src/models/command/ReadFileCommand.d.ts
273
- interface ReadFileCommand extends BaseCommand<CommandType.ReadFile>, SessionId {
274
- path: string;
275
- }
276
- declare const readFileCommandSchema: z.ZodObject<{
277
- id: z.ZodString;
278
- path: z.ZodString;
279
- sessionId: z.ZodString;
280
- type: z.ZodLiteral<CommandType.ReadFile>;
281
- }>;
282
- //#endregion
283
- //#region src/models/command/TerminalSize.d.ts
284
- interface TerminalSize {
285
- cols: number;
286
- rows: number;
287
- }
288
- declare const terminalSizeSchema: z.ZodObject<{
289
- cols: z.ZodInt;
290
- rows: z.ZodInt;
291
- }>;
292
- //#endregion
293
- //#region src/models/command/OpenShellCommand.d.ts
294
- interface OpenShellCommand extends BaseCommand<CommandType.OpenShell>, SessionId, TerminalSize {
295
- cwd: string;
296
- }
297
- declare const openShellCommandSchema: z.ZodObject<{
298
- cols: z.ZodInt;
299
- cwd: z.ZodString;
300
- id: z.ZodString;
301
- rows: z.ZodInt;
302
- sessionId: z.ZodString;
303
- type: z.ZodLiteral<CommandType.OpenShell>;
304
- }>;
305
- //#endregion
306
- //#region src/models/command/ShellInputCommand.d.ts
307
- interface ShellInputCommand extends BaseCommand<CommandType.ShellInput>, ShellId {
308
- data: string;
309
- }
310
- declare const shellInputCommandSchema: z.ZodObject<{
311
- data: z.ZodString;
312
- id: z.ZodString;
313
- shellId: z.ZodString;
314
- type: z.ZodLiteral<CommandType.ShellInput>;
315
- }>;
316
- //#endregion
317
- //#region src/models/command/ShellResizeCommand.d.ts
318
- interface ShellResizeCommand extends BaseCommand<CommandType.ShellResize>, ShellId, TerminalSize {}
319
- declare const shellResizeCommandSchema: z.ZodObject<{
320
- cols: z.ZodInt;
321
- id: z.ZodString;
322
- rows: z.ZodInt;
323
- shellId: z.ZodString;
324
- type: z.ZodLiteral<CommandType.ShellResize>;
325
- }>;
326
- //#endregion
327
- //#region src/models/command/ShellCommand.d.ts
328
- type ShellCommand = CloseShellCommand | OpenShellCommand | ShellInputCommand | ShellResizeCommand;
329
- declare const shellCommandSchema: z.ZodDiscriminatedUnion<[typeof closeShellCommandSchema, typeof openShellCommandSchema, typeof shellInputCommandSchema, typeof shellResizeCommandSchema], "type">;
330
- //#endregion
331
- //#region src/models/command/Command.d.ts
332
- type Command = DriverCommand | ListFilesCommand | ReadFileCommand | ShellCommand;
333
- declare const commandSchema: z.ZodDiscriminatedUnion<[...(typeof driverCommandSchema)["options"], ...(typeof shellCommandSchema)["options"], typeof listFilesCommandSchema, typeof readFileCommandSchema], "type">;
334
- //#endregion
335
- //#region src/models/event/AgentEventType.d.ts
336
- declare enum AgentEventType {
337
- AssistantMessage = "AssistantMessage",
338
- Capabilities = "Capabilities",
339
- CommandOutput = "CommandOutput",
340
- Compaction = "Compaction",
341
- ContextUsage = "ContextUsage",
342
- FileRewind = "FileRewind",
343
- Hook = "Hook",
344
- HostError = "HostError",
345
- PermissionRequest = "PermissionRequest",
346
- PermissionResolution = "PermissionResolution",
347
- RateLimit = "RateLimit",
348
- SessionInit = "SessionInit",
349
- SessionSettings = "SessionSettings",
350
- SessionState = "SessionState",
351
- StreamDelta = "StreamDelta",
352
- Subagent = "Subagent",
353
- Thinking = "Thinking",
354
- TodoUpdate = "TodoUpdate",
355
- ToolProgress = "ToolProgress",
356
- ToolResult = "ToolResult",
357
- ToolUse = "ToolUse",
358
- TurnResult = "TurnResult",
359
- TurnUsage = "TurnUsage",
360
- Unknown = "Unknown",
361
- UserMessage = "UserMessage"
362
- }
363
- declare const agentEventTypeSchema: z.ZodEnum<typeof AgentEventType>;
364
- //#endregion
365
- //#region src/models/event/BaseAgentEvent.d.ts
366
- interface BaseAgentEvent<T extends AgentEventType> extends ItemEntityType<T> {
367
- createdAt: Date;
368
- id: string;
369
- }
370
- declare const createBaseAgentEventSchema: <T extends z.ZodType<AgentEventType>>(typeSchema: T) => z.ZodObject<{
371
- createdAt: z.ZodCoercedDate;
372
- id: z.ZodString;
373
- type: T;
374
- }>;
375
- //#endregion
376
- //#region src/models/event/MessageUuid.d.ts
377
- interface MessageUuid {
378
- messageUuid: string;
379
- }
380
- declare const messageUuidSchema: z.ZodObject<{
381
- messageUuid: z.ZodString;
382
- }>;
383
- //#endregion
384
- //#region src/models/event/ParentToolUseId.d.ts
385
- interface ParentToolUseId {
386
- parentToolUseId: string;
387
- }
388
- declare const parentToolUseIdSchema: z.ZodObject<{
389
- parentToolUseId: z.ZodString;
390
- }>;
391
- //#endregion
392
- //#region src/models/event/BaseMessageAgentEvent.d.ts
393
- interface BaseMessageAgentEvent<T extends AgentEventType> extends BaseAgentEvent<T>, MessageUuid, ParentToolUseId {}
394
- declare const createBaseMessageAgentEventSchema: <T extends z.ZodType<AgentEventType>>(typeSchema: T) => z.ZodObject<{
395
- createdAt: z.ZodCoercedDate;
396
- id: z.ZodString;
397
- messageUuid: z.ZodString;
398
- parentToolUseId: z.ZodString;
399
- type: T;
400
- }>;
401
- //#endregion
402
- //#region src/models/event/AssistantMessageEvent.d.ts
403
- interface AssistantMessageEvent extends BaseMessageAgentEvent<AgentEventType.AssistantMessage> {
404
- text: string;
405
- }
406
- declare const assistantMessageEventSchema: z.ZodObject<{
407
- createdAt: z.ZodCoercedDate;
408
- id: z.ZodString;
409
- messageUuid: z.ZodString;
410
- parentToolUseId: z.ZodString;
411
- text: z.ZodString;
412
- type: z.ZodLiteral<AgentEventType.AssistantMessage>;
413
- }>;
414
- //#endregion
415
- //#region src/models/event/Model.d.ts
416
- interface Model {
417
- description: string;
418
- displayName: string;
419
- value: string;
420
- }
421
- declare const modelSchema: z.ZodObject<{
422
- description: z.ZodString;
423
- displayName: z.ZodString;
424
- value: z.ZodString;
425
- }>;
426
- //#endregion
427
- //#region src/models/event/SlashCommand.d.ts
428
- interface SlashCommand {
429
- argumentHint: string;
430
- description: string;
431
- name: string;
432
- }
433
- declare const slashCommandSchema: z.ZodObject<{
434
- argumentHint: z.ZodString;
435
- description: z.ZodString;
436
- name: z.ZodString;
437
- }>;
438
- //#endregion
439
- //#region src/models/event/CapabilitiesEvent.d.ts
440
- interface CapabilitiesEvent extends BaseAgentEvent<AgentEventType.Capabilities> {
441
- commands: SlashCommand[];
442
- models: Model[];
443
- }
444
- declare const capabilitiesEventSchema: z.ZodObject<{
445
- commands: z.ZodArray<typeof slashCommandSchema>;
446
- createdAt: z.ZodCoercedDate;
447
- id: z.ZodString;
448
- models: z.ZodArray<typeof modelSchema>;
449
- type: z.ZodLiteral<AgentEventType.Capabilities>;
450
- }>;
451
- //#endregion
452
- //#region src/models/event/CommandOutputEvent.d.ts
453
- interface CommandOutputEvent extends BaseAgentEvent<AgentEventType.CommandOutput> {
454
- content: string;
455
- }
456
- declare const commandOutputEventSchema: z.ZodObject<{
457
- content: z.ZodString;
458
- createdAt: z.ZodCoercedDate;
459
- id: z.ZodString;
460
- type: z.ZodLiteral<AgentEventType.CommandOutput>;
461
- }>;
462
- //#endregion
463
- //#region src/models/event/CompactionTrigger.d.ts
464
- declare enum CompactionTrigger {
465
- Auto = "auto",
466
- Manual = "manual"
467
- }
468
- declare const compactionTriggerSchema: z.ZodEnum<typeof CompactionTrigger>;
469
- //#endregion
470
- //#region src/models/event/CompactionEvent.d.ts
471
- interface CompactionEvent extends BaseAgentEvent<AgentEventType.Compaction> {
472
- postTokens: number;
473
- preTokens: number;
474
- trigger: CompactionTrigger;
475
- }
476
- declare const compactionEventSchema: z.ZodObject<{
477
- createdAt: z.ZodCoercedDate;
478
- id: z.ZodString;
479
- postTokens: z.ZodInt;
480
- preTokens: z.ZodInt;
481
- trigger: typeof compactionTriggerSchema;
482
- type: z.ZodLiteral<AgentEventType.Compaction>;
483
- }>;
484
- //#endregion
485
- //#region src/models/event/ContextUsageEvent.d.ts
486
- interface ContextUsageEvent extends BaseAgentEvent<AgentEventType.ContextUsage> {
487
- autoCompactThreshold: number;
488
- isAutoCompactEnabled: boolean;
489
- maxTokens: number;
490
- percentage: number;
491
- totalTokens: number;
492
- }
493
- declare const contextUsageEventSchema: z.ZodObject<{
494
- autoCompactThreshold: z.ZodInt;
495
- createdAt: z.ZodCoercedDate;
496
- id: z.ZodString;
497
- isAutoCompactEnabled: z.ZodBoolean;
498
- maxTokens: z.ZodInt;
499
- percentage: z.ZodNumber;
500
- totalTokens: z.ZodInt;
501
- type: z.ZodLiteral<AgentEventType.ContextUsage>;
502
- }>;
503
- //#endregion
504
- //#region src/models/event/FileRewindEvent.d.ts
505
- interface FileRewindEvent extends BaseAgentEvent<AgentEventType.FileRewind>, MessageUuid {
506
- deletions: number;
507
- filePaths: string[];
508
- insertions: number;
509
- }
510
- declare const fileRewindEventSchema: z.ZodObject<{
511
- createdAt: z.ZodCoercedDate;
512
- deletions: z.ZodInt;
513
- filePaths: z.ZodArray<z.ZodString>;
514
- id: z.ZodString;
515
- insertions: z.ZodInt;
516
- messageUuid: z.ZodString;
517
- type: z.ZodLiteral<AgentEventType.FileRewind>;
518
- }>;
519
- //#endregion
520
- //#region src/models/event/HookPhase.d.ts
521
- declare enum HookPhase {
522
- Progress = "Progress",
523
- Response = "Response",
524
- Started = "Started"
525
- }
526
- declare const hookPhaseSchema: z.ZodEnum<typeof HookPhase>;
527
- //#endregion
528
- //#region src/models/event/HookEvent.d.ts
529
- interface HookEvent extends BaseAgentEvent<AgentEventType.Hook> {
530
- exitCode: number;
531
- hookEvent: string;
532
- hookId: string;
533
- hookName: string;
534
- outcome: string;
535
- output: string;
536
- phase: HookPhase;
537
- stderr: string;
538
- stdout: string;
539
- }
540
- declare const hookEventSchema: z.ZodObject<{
541
- createdAt: z.ZodCoercedDate;
542
- exitCode: z.ZodInt;
543
- hookEvent: z.ZodString;
544
- hookId: z.ZodString;
545
- hookName: z.ZodString;
546
- id: z.ZodString;
547
- outcome: z.ZodString;
548
- output: z.ZodString;
549
- phase: typeof hookPhaseSchema;
550
- stderr: z.ZodString;
551
- stdout: z.ZodString;
552
- type: z.ZodLiteral<AgentEventType.Hook>;
553
- }>;
554
- //#endregion
555
- //#region src/models/event/HostErrorEvent.d.ts
556
- interface HostErrorEvent extends BaseAgentEvent<AgentEventType.HostError> {
557
- message: string;
558
- }
559
- declare const hostErrorEventSchema: z.ZodObject<{
560
- createdAt: z.ZodCoercedDate;
561
- id: z.ZodString;
562
- message: z.ZodString;
563
- type: z.ZodLiteral<AgentEventType.HostError>;
564
- }>;
565
- //#endregion
566
- //#region src/models/event/PermissionRequestEvent.d.ts
567
- interface PermissionRequestEvent extends BaseAgentEvent<AgentEventType.PermissionRequest> {
568
- blockedPath: string;
569
- decisionReason: string;
570
- hasSuggestions: boolean;
571
- input: Record<string, unknown>;
572
- requestId: string;
573
- title: string;
574
- toolName: string;
575
- toolUseId: string;
576
- }
577
- declare const permissionRequestEventSchema: z.ZodObject<{
578
- blockedPath: z.ZodString;
579
- createdAt: z.ZodCoercedDate;
580
- decisionReason: z.ZodString;
581
- hasSuggestions: z.ZodBoolean;
582
- id: z.ZodString;
583
- input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
584
- requestId: z.ZodString;
585
- title: z.ZodString;
586
- toolName: z.ZodString;
587
- toolUseId: z.ZodString;
588
- type: z.ZodLiteral<AgentEventType.PermissionRequest>;
589
- }>;
590
- //#endregion
591
- //#region src/models/event/PermissionResolutionEvent.d.ts
592
- interface PermissionResolutionEvent extends BaseAgentEvent<AgentEventType.PermissionResolution> {
593
- behavior: PermissionBehavior;
594
- requestId: string;
595
- }
596
- declare const permissionResolutionEventSchema: z.ZodObject<{
597
- behavior: typeof permissionBehaviorSchema;
598
- createdAt: z.ZodCoercedDate;
599
- id: z.ZodString;
600
- requestId: z.ZodString;
601
- type: z.ZodLiteral<AgentEventType.PermissionResolution>;
602
- }>;
603
- //#endregion
604
- //#region src/models/event/RateLimitEvent.d.ts
605
- interface RateLimitEvent extends BaseAgentEvent<AgentEventType.RateLimit> {
606
- rateLimitType: string;
607
- resetsAt?: Date;
608
- status: string;
609
- utilization?: number;
610
- }
611
- declare const rateLimitEventSchema: z.ZodObject<{
612
- createdAt: z.ZodCoercedDate;
613
- id: z.ZodString;
614
- rateLimitType: z.ZodString;
615
- resetsAt: z.ZodOptional<z.ZodCoercedDate>;
616
- status: z.ZodString;
617
- type: z.ZodLiteral<AgentEventType.RateLimit>;
618
- utilization: z.ZodOptional<z.ZodNumber>;
619
- }>;
620
- //#endregion
621
- //#region src/models/event/McpServer.d.ts
622
- interface McpServer {
623
- name: string;
624
- status: string;
625
- }
626
- declare const mcpServerSchema: z.ZodObject<{
627
- name: z.ZodString;
628
- status: z.ZodString;
629
- }>;
630
- //#endregion
631
- //#region src/models/event/SessionInitEvent.d.ts
632
- interface SessionInitEvent extends BaseAgentEvent<AgentEventType.SessionInit> {
633
- agents: string[];
634
- claudeCodeVersion: string;
635
- cwd: string;
636
- mcpServers: McpServer[];
637
- model: string;
638
- outputStyle: string;
639
- permissionMode: PermissionMode;
640
- plugins: string[];
641
- skills: string[];
642
- slashCommands: string[];
643
- tools: string[];
644
- }
645
- declare const sessionInitEventSchema: z.ZodObject<{
646
- agents: z.ZodArray<z.ZodString>;
647
- claudeCodeVersion: z.ZodString;
648
- createdAt: z.ZodCoercedDate;
649
- cwd: z.ZodString;
650
- id: z.ZodString;
651
- mcpServers: z.ZodArray<typeof mcpServerSchema>;
652
- model: z.ZodString;
653
- outputStyle: z.ZodString;
654
- permissionMode: typeof permissionModeSchema;
655
- plugins: z.ZodArray<z.ZodString>;
656
- skills: z.ZodArray<z.ZodString>;
657
- slashCommands: z.ZodArray<z.ZodString>;
658
- tools: z.ZodArray<z.ZodString>;
659
- type: z.ZodLiteral<AgentEventType.SessionInit>;
660
- }>;
661
- //#endregion
662
- //#region src/models/event/SessionSettingsEvent.d.ts
663
- interface SessionSettingsEvent extends BaseAgentEvent<AgentEventType.SessionSettings> {
664
- model: string;
665
- permissionMode: PermissionMode;
666
- }
667
- declare const sessionSettingsEventSchema: z.ZodObject<{
668
- createdAt: z.ZodCoercedDate;
669
- id: z.ZodString;
670
- model: z.ZodString;
671
- permissionMode: typeof permissionModeSchema;
672
- type: z.ZodLiteral<AgentEventType.SessionSettings>;
673
- }>;
674
- //#endregion
675
- //#region src/models/session/SessionState.d.ts
676
- declare enum SessionState {
677
- Closed = "Closed",
678
- Compacting = "Compacting",
679
- Idle = "Idle",
680
- RequiresAction = "RequiresAction",
681
- Running = "Running"
682
- }
683
- declare const sessionStateSchema: z.ZodEnum<typeof SessionState>;
684
- //#endregion
685
- //#region src/models/event/SessionStateEvent.d.ts
686
- interface SessionStateEvent extends BaseAgentEvent<AgentEventType.SessionState> {
687
- state: SessionState;
688
- }
689
- declare const sessionStateEventSchema: z.ZodObject<{
690
- createdAt: z.ZodCoercedDate;
691
- id: z.ZodString;
692
- state: typeof sessionStateSchema;
693
- type: z.ZodLiteral<AgentEventType.SessionState>;
694
- }>;
695
- //#endregion
696
- //#region src/models/event/StreamDeltaEvent.d.ts
697
- interface StreamDeltaEvent extends BaseAgentEvent<AgentEventType.StreamDelta> {
698
- blockId: string;
699
- isThinking: boolean;
700
- text: string;
701
- }
702
- declare const streamDeltaEventSchema: z.ZodObject<{
703
- blockId: z.ZodString;
704
- createdAt: z.ZodCoercedDate;
705
- id: z.ZodString;
706
- isThinking: z.ZodBoolean;
707
- text: z.ZodString;
708
- type: z.ZodLiteral<AgentEventType.StreamDelta>;
709
- }>;
710
- //#endregion
711
- //#region src/models/event/SubagentStatus.d.ts
712
- declare enum SubagentStatus {
713
- Completed = "Completed",
714
- Failed = "Failed",
715
- Running = "Running",
716
- Started = "Started",
717
- Stopped = "Stopped"
718
- }
719
- declare const subagentStatusSchema: z.ZodEnum<typeof SubagentStatus>;
720
- //#endregion
721
- //#region src/models/event/SubagentEvent.d.ts
722
- interface SubagentEvent extends BaseAgentEvent<AgentEventType.Subagent> {
723
- description: string;
724
- durationMs: number;
725
- lastToolName: string;
726
- status: SubagentStatus;
727
- subagentType: string;
728
- summary: string;
729
- taskId: string;
730
- toolUseId: string;
731
- toolUses: number;
732
- totalTokens: number;
733
- }
734
- declare const subagentEventSchema: z.ZodObject<{
735
- createdAt: z.ZodCoercedDate;
736
- description: z.ZodString;
737
- durationMs: z.ZodNumber;
738
- id: z.ZodString;
739
- lastToolName: z.ZodString;
740
- status: typeof subagentStatusSchema;
741
- subagentType: z.ZodString;
742
- summary: z.ZodString;
743
- taskId: z.ZodString;
744
- toolUseId: z.ZodString;
745
- toolUses: z.ZodInt;
746
- totalTokens: z.ZodInt;
747
- type: z.ZodLiteral<AgentEventType.Subagent>;
748
- }>;
749
- //#endregion
750
- //#region src/models/event/ThinkingEvent.d.ts
751
- interface ThinkingEvent extends BaseMessageAgentEvent<AgentEventType.Thinking> {
752
- thinking: string;
753
- }
754
- declare const thinkingEventSchema: z.ZodObject<{
755
- createdAt: z.ZodCoercedDate;
756
- id: z.ZodString;
757
- messageUuid: z.ZodString;
758
- parentToolUseId: z.ZodString;
759
- thinking: z.ZodString;
760
- type: z.ZodLiteral<AgentEventType.Thinking>;
761
- }>;
762
- //#endregion
763
- //#region src/models/event/TodoStatus.d.ts
764
- declare enum TodoStatus {
765
- Completed = "completed",
766
- InProgress = "in_progress",
767
- Pending = "pending"
768
- }
769
- declare const todoStatusSchema: z.ZodEnum<typeof TodoStatus>;
770
- //#endregion
771
- //#region src/models/event/Todo.d.ts
772
- interface Todo {
773
- activeForm: string;
774
- content: string;
775
- id: string;
776
- status: TodoStatus;
777
- }
778
- declare const todoSchema: z.ZodObject<{
779
- activeForm: z.ZodString;
780
- content: z.ZodString;
781
- id: z.ZodString;
782
- status: typeof todoStatusSchema;
783
- }>;
784
- //#endregion
785
- //#region src/models/event/TodoUpdateEvent.d.ts
786
- interface TodoUpdateEvent extends BaseAgentEvent<AgentEventType.TodoUpdate> {
787
- todos: Todo[];
788
- }
789
- declare const todoUpdateEventSchema: z.ZodObject<{
790
- createdAt: z.ZodCoercedDate;
791
- id: z.ZodString;
792
- todos: z.ZodArray<typeof todoSchema>;
793
- type: z.ZodLiteral<AgentEventType.TodoUpdate>;
794
- }>;
795
- //#endregion
796
- //#region src/models/event/ToolProgressEvent.d.ts
797
- interface ToolProgressEvent extends BaseAgentEvent<AgentEventType.ToolProgress>, ParentToolUseId {
798
- elapsedSeconds: number;
799
- toolUseId: string;
800
- }
801
- declare const toolProgressEventSchema: z.ZodObject<{
802
- createdAt: z.ZodCoercedDate;
803
- elapsedSeconds: z.ZodNumber;
804
- id: z.ZodString;
805
- parentToolUseId: z.ZodString;
806
- toolUseId: z.ZodString;
807
- type: z.ZodLiteral<AgentEventType.ToolProgress>;
808
- }>;
809
- //#endregion
810
- //#region src/models/event/ToolResultEvent.d.ts
811
- interface ToolResultEvent extends BaseAgentEvent<AgentEventType.ToolResult>, ParentToolUseId {
812
- content: string;
813
- isError: boolean;
814
- originalText?: string;
815
- toolUseId: string;
816
- }
817
- declare const toolResultEventSchema: z.ZodObject<{
818
- content: z.ZodString;
819
- createdAt: z.ZodCoercedDate;
820
- id: z.ZodString;
821
- isError: z.ZodBoolean;
822
- originalText: z.ZodOptional<z.ZodString>;
823
- parentToolUseId: z.ZodString;
824
- toolUseId: z.ZodString;
825
- type: z.ZodLiteral<AgentEventType.ToolResult>;
826
- }>;
827
- //#endregion
828
- //#region src/models/event/ToolUseEvent.d.ts
829
- interface ToolUseEvent extends BaseMessageAgentEvent<AgentEventType.ToolUse> {
830
- input: Record<string, unknown>;
831
- name: string;
832
- toolUseId: string;
833
- }
834
- declare const toolUseEventSchema: z.ZodObject<{
835
- createdAt: z.ZodCoercedDate;
836
- id: z.ZodString;
837
- input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
838
- messageUuid: z.ZodString;
839
- name: z.ZodString;
840
- parentToolUseId: z.ZodString;
841
- toolUseId: z.ZodString;
842
- type: z.ZodLiteral<AgentEventType.ToolUse>;
843
- }>;
844
- //#endregion
845
- //#region src/models/event/TokenUsage.d.ts
846
- interface TokenUsage {
847
- cacheCreationInputTokens: number;
848
- cacheReadInputTokens: number;
849
- inputTokens: number;
850
- outputTokens: number;
851
- }
852
- declare const tokenUsageSchema: z.ZodObject<{
853
- cacheCreationInputTokens: z.ZodInt;
854
- cacheReadInputTokens: z.ZodInt;
855
- inputTokens: z.ZodInt;
856
- outputTokens: z.ZodInt;
857
- }>;
858
- //#endregion
859
- //#region src/models/event/TurnResultEvent.d.ts
860
- interface TurnResultEvent extends BaseAgentEvent<AgentEventType.TurnResult> {
861
- durationApiMs: number;
862
- durationMs: number;
863
- errors: string[];
864
- isError: boolean;
865
- numTurns: number;
866
- result: string;
867
- subtype: string;
868
- totalCostUsd: number;
869
- usage: TokenUsage;
870
- }
871
- declare const turnResultEventSchema: z.ZodObject<{
872
- createdAt: z.ZodCoercedDate;
873
- durationApiMs: z.ZodNumber;
874
- durationMs: z.ZodNumber;
875
- errors: z.ZodArray<z.ZodString>;
876
- id: z.ZodString;
877
- isError: z.ZodBoolean;
878
- numTurns: z.ZodInt;
879
- result: z.ZodString;
880
- subtype: z.ZodString;
881
- totalCostUsd: z.ZodNumber;
882
- type: z.ZodLiteral<AgentEventType.TurnResult>;
883
- usage: typeof tokenUsageSchema;
884
- }>;
885
- //#endregion
886
- //#region src/models/event/TurnUsageEvent.d.ts
887
- interface TurnUsageEvent extends BaseAgentEvent<AgentEventType.TurnUsage> {
888
- outputTokens: number;
889
- }
890
- declare const turnUsageEventSchema: z.ZodObject<{
891
- createdAt: z.ZodCoercedDate;
892
- id: z.ZodString;
893
- outputTokens: z.ZodInt;
894
- type: z.ZodLiteral<AgentEventType.TurnUsage>;
895
- }>;
896
- //#endregion
897
- //#region src/models/event/UnknownEvent.d.ts
898
- interface UnknownEvent extends BaseAgentEvent<AgentEventType.Unknown> {
899
- raw: string;
900
- sdkType: string;
901
- }
902
- declare const unknownEventSchema: z.ZodObject<{
903
- createdAt: z.ZodCoercedDate;
904
- id: z.ZodString;
905
- raw: z.ZodString;
906
- sdkType: z.ZodString;
907
- type: z.ZodLiteral<AgentEventType.Unknown>;
908
- }>;
909
- //#endregion
910
- //#region src/models/event/UserMessageEvent.d.ts
911
- interface UserMessageEvent extends BaseMessageAgentEvent<AgentEventType.UserMessage> {
912
- attachmentCount: number;
913
- text: string;
914
- }
915
- declare const userMessageEventSchema: z.ZodObject<{
916
- attachmentCount: z.ZodInt;
917
- createdAt: z.ZodCoercedDate;
918
- id: z.ZodString;
919
- messageUuid: z.ZodString;
920
- parentToolUseId: z.ZodString;
921
- text: z.ZodString;
922
- type: z.ZodLiteral<AgentEventType.UserMessage>;
923
- }>;
924
- //#endregion
925
- //#region src/models/event/AgentEvent.d.ts
926
- type AgentEvent = AssistantMessageEvent | CapabilitiesEvent | CommandOutputEvent | CompactionEvent | ContextUsageEvent | FileRewindEvent | HookEvent | HostErrorEvent | PermissionRequestEvent | PermissionResolutionEvent | RateLimitEvent | SessionInitEvent | SessionSettingsEvent | SessionStateEvent | StreamDeltaEvent | SubagentEvent | ThinkingEvent | TodoUpdateEvent | ToolProgressEvent | ToolResultEvent | ToolUseEvent | TurnResultEvent | TurnUsageEvent | UnknownEvent | UserMessageEvent;
927
- declare const agentEventSchema: z.ZodDiscriminatedUnion<[typeof assistantMessageEventSchema, typeof capabilitiesEventSchema, typeof commandOutputEventSchema, typeof compactionEventSchema, typeof contextUsageEventSchema, typeof fileRewindEventSchema, typeof hookEventSchema, typeof hostErrorEventSchema, typeof permissionRequestEventSchema, typeof permissionResolutionEventSchema, typeof rateLimitEventSchema, typeof sessionInitEventSchema, typeof sessionSettingsEventSchema, typeof sessionStateEventSchema, typeof streamDeltaEventSchema, typeof subagentEventSchema, typeof thinkingEventSchema, typeof todoUpdateEventSchema, typeof toolProgressEventSchema, typeof toolResultEventSchema, typeof toolUseEventSchema, typeof turnResultEventSchema, typeof turnUsageEventSchema, typeof unknownEventSchema, typeof userMessageEventSchema], "type">;
928
- //#endregion
929
- //#region src/models/event/EphemeralAgentEventTypes.d.ts
930
- declare const EphemeralAgentEventTypes: readonly AgentEventType[];
931
- //#endregion
932
- //#region src/models/handshake/HandshakeMessageType.d.ts
933
- declare enum HandshakeMessageType {
934
- Authenticate = "Authenticate",
935
- Challenge = "Challenge",
936
- HandOff = "HandOff",
937
- Pair = "Pair",
938
- Revoke = "Revoke"
939
- }
940
- declare const handshakeMessageTypeSchema: z.ZodEnum<typeof HandshakeMessageType>;
941
- //#endregion
942
- //#region src/models/handshake/BaseHandshakeMessage.d.ts
943
- interface BaseHandshakeMessage<T extends HandshakeMessageType> extends ItemEntityType<T> {}
944
- declare const createBaseHandshakeMessageSchema: <T extends z.ZodType<HandshakeMessageType>>(typeSchema: T) => z.ZodObject<{
945
- type: T;
946
- }>;
947
- //#endregion
948
- //#region src/models/handshake/AuthenticateMessage.d.ts
949
- interface AuthenticateMessage extends BaseHandshakeMessage<HandshakeMessageType.Authenticate> {
950
- credential: string;
951
- }
952
- declare const authenticateMessageSchema: z.ZodObject<{
953
- credential: z.ZodString;
954
- type: z.ZodLiteral<HandshakeMessageType.Authenticate>;
955
- }>;
956
- //#endregion
957
- //#region src/models/handshake/ChallengeMessage.d.ts
958
- interface ChallengeMessage extends BaseHandshakeMessage<HandshakeMessageType.Challenge> {
959
- nonce: string;
960
- }
961
- declare const challengeMessageSchema: z.ZodObject<{
962
- nonce: z.ZodString;
963
- type: z.ZodLiteral<HandshakeMessageType.Challenge>;
964
- }>;
965
- //#endregion
966
- //#region src/models/handshake/HandOffMessage.d.ts
967
- interface HandOffMessage extends BaseHandshakeMessage<HandshakeMessageType.HandOff> {
968
- code: string;
969
- signature: string;
970
- }
971
- declare const handOffMessageSchema: z.ZodObject<{
972
- code: z.ZodString;
973
- signature: z.ZodString;
974
- type: z.ZodLiteral<HandshakeMessageType.HandOff>;
975
- }>;
976
- //#endregion
977
- //#region src/models/handshake/PairMessage.d.ts
978
- interface PairMessage extends BaseHandshakeMessage<HandshakeMessageType.Pair> {
979
- code: string;
980
- }
981
- declare const pairMessageSchema: z.ZodObject<{
982
- code: z.ZodString;
983
- type: z.ZodLiteral<HandshakeMessageType.Pair>;
984
- }>;
985
- //#endregion
986
- //#region src/models/handshake/RevokeMessage.d.ts
987
- interface RevokeMessage extends BaseHandshakeMessage<HandshakeMessageType.Revoke> {
988
- deviceId: string;
989
- signature: string;
990
- }
991
- declare const revokeMessageSchema: z.ZodObject<{
992
- deviceId: z.ZodString;
993
- signature: z.ZodString;
994
- type: z.ZodLiteral<HandshakeMessageType.Revoke>;
995
- }>;
996
- //#endregion
997
- //#region src/models/handshake/HandshakeMessage.d.ts
998
- type HandshakeMessage = AuthenticateMessage | ChallengeMessage | HandOffMessage | PairMessage | RevokeMessage;
999
- declare const handshakeMessageSchema: z.ZodDiscriminatedUnion<[typeof authenticateMessageSchema, typeof challengeMessageSchema, typeof handOffMessageSchema, typeof pairMessageSchema, typeof revokeMessageSchema], "type">;
1000
- //#endregion
1001
- //#region src/models/handshake/SignaturePurpose.d.ts
1002
- declare enum SignaturePurpose {
1003
- HostProof = "HostProof",
1004
- OwnerProof = "OwnerProof"
1005
- }
1006
- declare const signaturePurposeSchema: z.ZodEnum<typeof SignaturePurpose>;
1007
- //#endregion
1008
- //#region src/models/server/ServerMessageType.d.ts
1009
- declare enum ServerMessageType {
1010
- Authenticated = "Authenticated",
1011
- CommandError = "CommandError",
1012
- Events = "Events",
1013
- FileContent = "FileContent",
1014
- Files = "Files",
1015
- HostStopping = "HostStopping",
1016
- Paired = "Paired",
1017
- Proof = "Proof",
1018
- SessionOpened = "SessionOpened",
1019
- SessionReset = "SessionReset",
1020
- Sessions = "Sessions",
1021
- ShellClosed = "ShellClosed",
1022
- ShellOpened = "ShellOpened",
1023
- ShellOutput = "ShellOutput"
1024
- }
1025
- declare const serverMessageTypeSchema: z.ZodEnum<typeof ServerMessageType>;
1026
- //#endregion
1027
- //#region src/models/server/BaseServerMessage.d.ts
1028
- interface BaseServerMessage<T extends ServerMessageType> extends ItemEntityType<T> {}
1029
- declare const createBaseServerMessageSchema: <T extends z.ZodType<ServerMessageType>>(typeSchema: T) => z.ZodObject<{
1030
- type: T;
1031
- }>;
1032
- //#endregion
1033
- //#region src/models/server/AuthenticatedMessage.d.ts
1034
- interface AuthenticatedMessage extends BaseServerMessage<ServerMessageType.Authenticated> {}
1035
- declare const authenticatedMessageSchema: z.ZodObject<{
1036
- type: z.ZodLiteral<ServerMessageType.Authenticated>;
1037
- }>;
1038
- //#endregion
1039
- //#region src/models/server/CommandErrorMessage.d.ts
1040
- interface CommandErrorMessage extends BaseServerMessage<ServerMessageType.CommandError> {
1041
- commandId: string;
1042
- message: string;
1043
- }
1044
- declare const commandErrorMessageSchema: z.ZodObject<{
1045
- commandId: z.ZodString;
1046
- message: z.ZodString;
1047
- type: z.ZodLiteral<ServerMessageType.CommandError>;
1048
- }>;
1049
- //#endregion
1050
- //#region src/models/server/EventsMessage.d.ts
1051
- interface EventsMessage extends BaseServerMessage<ServerMessageType.Events> {
1052
- events: AgentEvent[];
1053
- sessionId: string;
1054
- }
1055
- declare const eventsMessageSchema: z.ZodObject<{
1056
- events: z.ZodArray<typeof agentEventSchema>;
1057
- sessionId: z.ZodString;
1058
- type: z.ZodLiteral<ServerMessageType.Events>;
1059
- }>;
1060
- //#endregion
1061
- //#region src/models/server/FileContentMessage.d.ts
1062
- interface FileContentMessage extends BaseServerMessage<ServerMessageType.FileContent> {
1063
- commandId: string;
1064
- content: string;
1065
- notice: string;
1066
- path: string;
1067
- }
1068
- declare const fileContentMessageSchema: z.ZodObject<{
1069
- commandId: z.ZodString;
1070
- content: z.ZodString;
1071
- notice: z.ZodString;
1072
- path: z.ZodString;
1073
- type: z.ZodLiteral<ServerMessageType.FileContent>;
1074
- }>;
1075
- //#endregion
1076
- //#region src/models/server/FilesMessage.d.ts
1077
- interface FilesMessage extends BaseServerMessage<ServerMessageType.Files> {
1078
- commandId: string;
1079
- files: string[];
1080
- }
1081
- declare const filesMessageSchema: z.ZodObject<{
1082
- commandId: z.ZodString;
1083
- files: z.ZodArray<z.ZodString>;
1084
- type: z.ZodLiteral<ServerMessageType.Files>;
1085
- }>;
1086
- //#endregion
1087
- //#region src/models/server/HostCloseCode.d.ts
1088
- declare enum HostCloseCode {
1089
- HandshakeRefused = 4400,
1090
- CredentialRefused = 4401,
1091
- PairingRefused = 4403,
1092
- SignatureRefused = 4404
1093
- }
1094
- //#endregion
1095
- //#region src/models/server/HostStoppingMessage.d.ts
1096
- interface HostStoppingMessage extends BaseServerMessage<ServerMessageType.HostStopping> {}
1097
- declare const hostStoppingMessageSchema: z.ZodObject<{
1098
- type: z.ZodLiteral<ServerMessageType.HostStopping>;
1099
- }>;
1100
- //#endregion
1101
- //#region src/models/server/PairedMessage.d.ts
1102
- interface PairedMessage extends BaseServerMessage<ServerMessageType.Paired> {
1103
- credential: string;
1104
- deviceId: string;
1105
- publicKey: string;
1106
- }
1107
- declare const pairedMessageSchema: z.ZodObject<{
1108
- credential: z.ZodString;
1109
- deviceId: z.ZodString;
1110
- publicKey: z.ZodString;
1111
- type: z.ZodLiteral<ServerMessageType.Paired>;
1112
- }>;
1113
- //#endregion
1114
- //#region src/models/server/ProofMessage.d.ts
1115
- interface ProofMessage extends BaseServerMessage<ServerMessageType.Proof> {
1116
- nonce: string;
1117
- port: number;
1118
- signature: string;
1119
- }
1120
- declare const proofMessageSchema: z.ZodObject<{
1121
- nonce: z.ZodString;
1122
- port: z.ZodInt;
1123
- signature: z.ZodString;
1124
- type: z.ZodLiteral<ServerMessageType.Proof>;
1125
- }>;
1126
- //#endregion
1127
- //#region src/models/server/SessionOpenedMessage.d.ts
1128
- interface SessionOpenedMessage extends BaseServerMessage<ServerMessageType.SessionOpened> {
1129
- commandId: string;
1130
- sessionId: string;
1131
- }
1132
- declare const sessionOpenedMessageSchema: z.ZodObject<{
1133
- commandId: z.ZodString;
1134
- sessionId: z.ZodString;
1135
- type: z.ZodLiteral<ServerMessageType.SessionOpened>;
1136
- }>;
1137
- //#endregion
1138
- //#region src/models/server/SessionResetMessage.d.ts
1139
- interface SessionResetMessage extends BaseServerMessage<ServerMessageType.SessionReset> {
1140
- sessionId: string;
1141
- }
1142
- declare const sessionResetMessageSchema: z.ZodObject<{
1143
- sessionId: z.ZodString;
1144
- type: z.ZodLiteral<ServerMessageType.SessionReset>;
1145
- }>;
1146
- //#endregion
1147
- //#region src/models/session/SessionSummary.d.ts
1148
- interface SessionSummary {
1149
- cwd: string;
1150
- id: string;
1151
- lastActivityAt: Date;
1152
- state: SessionState;
1153
- title: string;
1154
- }
1155
- declare const sessionSummarySchema: z.ZodObject<{
1156
- cwd: z.ZodString;
1157
- id: z.ZodString;
1158
- lastActivityAt: z.ZodCoercedDate;
1159
- state: typeof sessionStateSchema;
1160
- title: z.ZodString;
1161
- }>;
1162
- //#endregion
1163
- //#region src/models/server/SessionsMessage.d.ts
1164
- interface SessionsMessage extends BaseServerMessage<ServerMessageType.Sessions> {
1165
- sessions: SessionSummary[];
1166
- }
1167
- declare const sessionsMessageSchema: z.ZodObject<{
1168
- sessions: z.ZodArray<typeof sessionSummarySchema>;
1169
- type: z.ZodLiteral<ServerMessageType.Sessions>;
1170
- }>;
1171
- //#endregion
1172
- //#region src/models/server/ShellClosedMessage.d.ts
1173
- interface ShellClosedMessage extends BaseServerMessage<ServerMessageType.ShellClosed>, ShellId {}
1174
- declare const shellClosedMessageSchema: z.ZodObject<{
1175
- shellId: z.ZodString;
1176
- type: z.ZodLiteral<ServerMessageType.ShellClosed>;
1177
- }>;
1178
- //#endregion
1179
- //#region src/models/server/ShellOpenedMessage.d.ts
1180
- interface ShellOpenedMessage extends BaseServerMessage<ServerMessageType.ShellOpened> {
1181
- commandId: string;
1182
- sessionId: string;
1183
- shellId: string;
1184
- }
1185
- declare const shellOpenedMessageSchema: z.ZodObject<{
1186
- commandId: z.ZodString;
1187
- sessionId: z.ZodString;
1188
- shellId: z.ZodString;
1189
- type: z.ZodLiteral<ServerMessageType.ShellOpened>;
1190
- }>;
1191
- //#endregion
1192
- //#region src/models/server/ShellOutputMessage.d.ts
1193
- interface ShellOutputMessage extends BaseServerMessage<ServerMessageType.ShellOutput> {
1194
- data: string;
1195
- shellId: string;
1196
- }
1197
- declare const shellOutputMessageSchema: z.ZodObject<{
1198
- data: z.ZodString;
1199
- shellId: z.ZodString;
1200
- type: z.ZodLiteral<ServerMessageType.ShellOutput>;
1201
- }>;
1202
- //#endregion
1203
- //#region src/models/server/ServerMessage.d.ts
1204
- type ServerMessage = AuthenticatedMessage | CommandErrorMessage | EventsMessage | FileContentMessage | FilesMessage | HostStoppingMessage | PairedMessage | ProofMessage | SessionOpenedMessage | SessionResetMessage | SessionsMessage | ShellClosedMessage | ShellOpenedMessage | ShellOutputMessage;
1205
- declare const serverMessageSchema: z.ZodDiscriminatedUnion<[typeof authenticatedMessageSchema, typeof commandErrorMessageSchema, typeof eventsMessageSchema, typeof fileContentMessageSchema, typeof filesMessageSchema, typeof hostStoppingMessageSchema, typeof pairedMessageSchema, typeof proofMessageSchema, typeof sessionOpenedMessageSchema, typeof sessionResetMessageSchema, typeof sessionsMessageSchema, typeof shellClosedMessageSchema, typeof shellOpenedMessageSchema, typeof shellOutputMessageSchema], "type">;
1206
- //#endregion
1207
- //#region src/services/constants.d.ts
1208
- declare const DEFAULT_APP_ORIGIN = "https://esposter.com";
1209
- declare const DEFAULT_HOSTNAME = "127.0.0.1";
1210
- declare const DEFAULT_PORT = 7437;
1211
- declare const HOST_SCHEME: string;
1212
- declare const PAIRING_CODE_PARAMETER = "code";
1213
- declare const PAIRING_HASH_PARAMETER = "host";
1214
- declare const SHELL_OUTPUT_LENGTH = 1e5;
1215
- declare const SCHEME_PAIRING_CODE_DURATION_MS: number;
1216
- //#endregion
1217
- //#region src/services/handshake/getSignedText.d.ts
1218
- declare const getSignedText: (purpose: SignaturePurpose, port: number, nonce: string) => string;
1219
- //#endregion
1220
- export { PairMessage as $, readFileCommandSchema as $n, mcpServerSchema as $t, HostStoppingMessage as A, BaseMessageAgentEvent as An, ForkCommand as Ar, TodoUpdateEvent as At, commandErrorMessageSchema as B, Command as Bn, BackgroundTasksCommand as Br, SubagentStatus as Bt, sessionResetMessageSchema as C, capabilitiesEventSchema as Cn, permissionVerdictCommandSchema as Cr, tokenUsageSchema as Ct, proofMessageSchema as D, modelSchema as Dn, listSessionsCommandSchema as Dr, toolResultEventSchema as Dt, ProofMessage as E, Model as En, ListSessionsCommand as Er, ToolResultEvent as Et, FileContentMessage as F, messageUuidSchema as Fn, closeShellCommandSchema as Fr, todoStatusSchema as Ft, ServerMessageType as G, shellResizeCommandSchema as Gn, createBaseCommandSchema as Gr, sessionStateEventSchema as Gt, authenticatedMessageSchema as H, ShellCommand as Hn, SessionId as Hr, StreamDeltaEvent as Ht, fileContentMessageSchema as I, BaseAgentEvent as In, ShellId as Ir, ThinkingEvent as It, signaturePurposeSchema as J, OpenShellCommand as Jn, Attachment as Jr, SessionSettingsEvent as Jt, serverMessageTypeSchema as K, ShellInputCommand as Kn, CommandType as Kr, SessionState as Kt, EventsMessage as L, createBaseAgentEventSchema as Ln, shellIdSchema as Lr, thinkingEventSchema as Lt, HostCloseCode as M, ParentToolUseId as Mn, CreateSessionCommand as Mr, Todo as Mt, FilesMessage as N, parentToolUseIdSchema as Nn, createSessionCommandSchema as Nr, todoSchema as Nt, PairedMessage as O, AssistantMessageEvent as On, InterruptCommand as Or, ToolProgressEvent as Ot, filesMessageSchema as P, MessageUuid as Pn, CloseShellCommand as Pr, TodoStatus as Pt, revokeMessageSchema as Q, ReadFileCommand as Qn, McpServer as Qt, eventsMessageSchema as R, AgentEventType as Rn, CloseSessionCommand as Rr, SubagentEvent as Rt, SessionResetMessage as S, CapabilitiesEvent as Sn, PermissionVerdictCommand as Sr, TokenUsage as St, sessionOpenedMessageSchema as T, slashCommandSchema as Tn, permissionBehaviorSchema as Tr, toolUseEventSchema as Tt, BaseServerMessage as U, shellCommandSchema as Un, sessionIdSchema as Ur, streamDeltaEventSchema as Ut, AuthenticatedMessage as V, commandSchema as Vn, backgroundTasksCommandSchema as Vr, subagentStatusSchema as Vt, createBaseServerMessageSchema as W, ShellResizeCommand as Wn, BaseCommand as Wr, SessionStateEvent as Wt, handshakeMessageSchema as X, TerminalSize as Xn, AttachmentMediaType as Xr, SessionInitEvent as Xt, HandshakeMessage as Y, openShellCommandSchema as Yn, attachmentSchema as Yr, sessionSettingsEventSchema as Yt, RevokeMessage as Z, terminalSizeSchema as Zn, attachmentMediaTypeSchema as Zr, sessionInitEventSchema as Zt, shellClosedMessageSchema as _, compactionEventSchema as _n, resumeCommandSchema as _r, unknownEventSchema as _t, HOST_SCHEME as a, permissionRequestEventSchema as an, stopTaskCommandSchema as ar, AuthenticateMessage as at, SessionSummary as b, CommandOutputEvent as bn, PromptCommand as br, TurnResultEvent as bt, SCHEME_PAIRING_CODE_DURATION_MS as c, HookEvent as cn, SetPermissionModeCommand as cr, createBaseHandshakeMessageSchema as ct, serverMessageSchema as d, hookPhaseSchema as dn, permissionModeSchema as dr, EphemeralAgentEventTypes as dt, RateLimitEvent as en, ListFilesCommand as er, pairMessageSchema as et, ShellOutputMessage as f, FileRewindEvent as fn, SetModelCommand as fr, AgentEvent as ft, ShellClosedMessage as g, CompactionEvent as gn, ResumeCommand as gr, UnknownEvent as gt, shellOpenedMessageSchema as h, contextUsageEventSchema as hn, rewindFilesCommandSchema as hr, userMessageEventSchema as ht, DEFAULT_PORT as i, PermissionRequestEvent as in, StopTaskCommand as ir, challengeMessageSchema as it, hostStoppingMessageSchema as j, createBaseMessageAgentEventSchema as jn, forkCommandSchema as jr, todoUpdateEventSchema as jt, pairedMessageSchema as k, assistantMessageEventSchema as kn, interruptCommandSchema as kr, toolProgressEventSchema as kt, SHELL_OUTPUT_LENGTH as l, hookEventSchema as ln, setPermissionModeCommandSchema as lr, HandshakeMessageType as lt, ShellOpenedMessage as m, ContextUsageEvent as mn, RewindFilesCommand as mr, UserMessageEvent as mt, DEFAULT_APP_ORIGIN as n, PermissionResolutionEvent as nn, DriverCommand as nr, handOffMessageSchema as nt, PAIRING_CODE_PARAMETER as o, HostErrorEvent as on, SlashCommandCommand as or, authenticateMessageSchema as ot, shellOutputMessageSchema as p, fileRewindEventSchema as pn, setModelCommandSchema as pr, agentEventSchema as pt, SignaturePurpose as q, shellInputCommandSchema as qn, commandTypeSchema as qr, sessionStateSchema as qt, DEFAULT_HOSTNAME as r, permissionResolutionEventSchema as rn, driverCommandSchema as rr, ChallengeMessage as rt, PAIRING_HASH_PARAMETER as s, hostErrorEventSchema as sn, slashCommandCommandSchema as sr, BaseHandshakeMessage as st, getSignedText as t, rateLimitEventSchema as tn, listFilesCommandSchema as tr, HandOffMessage as tt, ServerMessage as u, HookPhase as un, PermissionMode as ur, handshakeMessageTypeSchema as ut, SessionsMessage as v, CompactionTrigger as vn, ResumeAtCommand as vr, TurnUsageEvent as vt, SessionOpenedMessage as w, SlashCommand as wn, PermissionBehavior as wr, ToolUseEvent as wt, sessionSummarySchema as x, commandOutputEventSchema as xn, promptCommandSchema as xr, turnResultEventSchema as xt, sessionsMessageSchema as y, compactionTriggerSchema as yn, resumeAtCommandSchema as yr, turnUsageEventSchema as yt, CommandErrorMessage as z, agentEventTypeSchema as zn, closeSessionCommandSchema as zr, subagentEventSchema as zt };