agent-console-server 3.4.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -12
- package/dist/EphemeralAgentEventTypes-DGkHIIcW.js +838 -0
- package/dist/cli.js +104 -26
- package/dist/contracts.d.ts +2 -2
- package/dist/contracts.js +2 -3
- package/dist/{constants-eNCfNezp.d.ts → getSignedText-DQwqr8CH.d.ts} +267 -8
- package/dist/index.d.ts +321 -11
- package/dist/index.js +3 -4
- package/dist/{readToken-BSQZ8ZVf.js → spawnPtyShell-CtAiD2BH.js} +1105 -116
- package/package.json +9 -5
- package/dist/EphemeralAgentEventTypes-Cm5oNQXu.js +0 -274
- package/dist/ServerMessage-Deh-bExC.js +0 -363
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ChallengeMessage, $n as setPermissionModeCommandSchema, $t as permissionResolutionEventSchema, A as HostStoppingMessage, An as BaseAgentEvent, Ar as BackgroundTasksCommand, At as TodoStatus, B as createBaseServerMessageSchema, Bn as ShellInputCommand, Br as AttachmentMediaType, Bt as SessionStateEvent, C as sessionResetMessageSchema, Cn as modelSchema, Cr as createSessionCommandSchema, Ct as toolResultEventSchema, D as proofMessageSchema, Dn as parentToolUseIdSchema, Dr as shellIdSchema, Dt as todoUpdateEventSchema, E as ProofMessage, En as ParentToolUseId, Er as ShellId, Et as TodoUpdateEvent, F as CommandErrorMessage, Fn as commandSchema, Fr as createBaseCommandSchema, Ft as subagentEventSchema, G as HandshakeMessage, Gn as terminalSizeSchema, Gt as sessionSettingsEventSchema, H as serverMessageTypeSchema, Hn as OpenShellCommand, Ht as SessionState, I as commandErrorMessageSchema, In as ShellCommand, Ir as CommandType, It as SubagentStatus, J as revokeMessageSchema, Jn as StopTaskCommand, Jt as McpServer, K as handshakeMessageSchema, Kn as DriverCommand, Kt as SessionInitEvent, L as AuthenticatedMessage, Ln as shellCommandSchema, Lr as commandTypeSchema, Lt as subagentStatusSchema, M as HostCloseCode, Mn as AgentEventType, Mr as SessionId, Mt as ThinkingEvent, N as EventsMessage, Nn as agentEventTypeSchema, Nr as sessionIdSchema, Nt as thinkingEventSchema, O as PairedMessage, On as MessageUuid, Or as CloseSessionCommand, Ot as Todo, P as eventsMessageSchema, Pn as Command, Pr as BaseCommand, Pt as SubagentEvent, Q as handOffMessageSchema, Qn as SetPermissionModeCommand, Qt as PermissionResolutionEvent, R as authenticatedMessageSchema, Rn as ShellResizeCommand, Rr as Attachment, Rt as StreamDeltaEvent, S as SessionResetMessage, Sn as Model, Sr as CreateSessionCommand, St as ToolResultEvent, T as sessionOpenedMessageSchema, Tn as assistantMessageEventSchema, Tr as closeShellCommandSchema, Tt as toolProgressEventSchema, U as SignaturePurpose, Un as openShellCommandSchema, Ut as sessionStateSchema, V as ServerMessageType, Vn as shellInputCommandSchema, Vr as attachmentMediaTypeSchema, Vt as sessionStateEventSchema, W as signaturePurposeSchema, Wn as TerminalSize, Wt as SessionSettingsEvent, X as pairMessageSchema, Xn as SlashCommandCommand, Xt as RateLimitEvent, Y as PairMessage, Yn as stopTaskCommandSchema, Yt as mcpServerSchema, Z as HandOffMessage, Zn as slashCommandCommandSchema, Zt as rateLimitEventSchema, _ as shellClosedMessageSchema, _n as commandOutputEventSchema, _r as listSessionsCommandSchema, _t as turnResultEventSchema, a as HOST_SCHEME, an as hookEventSchema, ar as rewindFilesCommandSchema, at as HandshakeMessageType, b as SessionSummary, bn as SlashCommand, br as ForkCommand, bt as ToolUseEvent, c as SCHEME_PAIRING_CODE_DURATION, cn as FileRewindEvent, cr as ResumeAtCommand, ct as AgentEvent, d as serverMessageSchema, dn as contextUsageEventSchema, dr as promptCommandSchema, dt as userMessageEventSchema, en as PermissionRequestEvent, er as PermissionMode, et as challengeMessageSchema, f as ShellOutputMessage, fn as CompactionEvent, fr as PermissionVerdictCommand, ft as UnknownEvent, g as ShellClosedMessage, gn as CommandOutputEvent, gr as ListSessionsCommand, gt as TurnResultEvent, h as shellOpenedMessageSchema, hn as compactionTriggerSchema, hr as permissionBehaviorSchema, ht as turnUsageEventSchema, i as DEFAULT_PORT, in as HookEvent, ir as RewindFilesCommand, it as createBaseHandshakeMessageSchema, j as hostStoppingMessageSchema, jn as createBaseAgentEventSchema, jr as backgroundTasksCommandSchema, jt as todoStatusSchema, k as pairedMessageSchema, kn as messageUuidSchema, kr as closeSessionCommandSchema, kt as todoSchema, l as SHELL_OUTPUT_LENGTH, ln as fileRewindEventSchema, lr as resumeAtCommandSchema, lt as agentEventSchema, m as ShellOpenedMessage, mn as CompactionTrigger, mr as PermissionBehavior, mt as TurnUsageEvent, n as DEFAULT_APP_ORIGIN, nn as HostErrorEvent, nr as SetModelCommand, nt as authenticateMessageSchema, o as PAIRING_CODE_PARAMETER, on as HookPhase, or as ResumeCommand, ot as handshakeMessageTypeSchema, p as shellOutputMessageSchema, pn as compactionEventSchema, pr as permissionVerdictCommandSchema, pt as unknownEventSchema, q as RevokeMessage, qn as driverCommandSchema, qt as sessionInitEventSchema, r as DEFAULT_HOSTNAME, rn as hostErrorEventSchema, rr as setModelCommandSchema, rt as BaseHandshakeMessage, s as PAIRING_HASH_PARAMETER, sn as hookPhaseSchema, sr as resumeCommandSchema, st as EphemeralAgentEventTypes, t as getSignedText, tn as permissionRequestEventSchema, tr as permissionModeSchema, tt as AuthenticateMessage, u as ServerMessage, un as ContextUsageEvent, ur as PromptCommand, ut as UserMessageEvent, v as SessionsMessage, vn as CapabilitiesEvent, vr as InterruptCommand, vt as TokenUsage, w as SessionOpenedMessage, wn as AssistantMessageEvent, wr as CloseShellCommand, wt as ToolProgressEvent, x as sessionSummarySchema, xn as slashCommandSchema, xr as forkCommandSchema, xt as toolUseEventSchema, y as sessionsMessageSchema, yn as capabilitiesEventSchema, yr as interruptCommandSchema, yt as tokenUsageSchema, z as BaseServerMessage, zn as shellResizeCommandSchema, zr as attachmentSchema, zt as streamDeltaEventSchema } from "./getSignedText-DQwqr8CH.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { ItemEntityType } from "@esposter/shared";
|
|
4
|
+
import { KeyObject } from "node:crypto";
|
|
5
|
+
import { RawData, WebSocket } from "ws";
|
|
2
6
|
import { CanUseTool, ModelInfo, PermissionResult, PermissionUpdate, Query, SDKControlGetContextUsageResponse, SDKHookProgressMessage, SDKHookResponseMessage, SDKHookStartedMessage, SDKMessage, SDKPartialAssistantMessage, SDKResultMessage, SDKSessionInfo, SDKStatusMessage, SDKSystemMessage, SDKTaskNotificationMessage, SDKTaskProgressMessage, SDKTaskStartedMessage, SDKTaskUpdatedMessage, SDKThinkingTokensMessage, SDKUserMessage, SessionMessage, SettingSource, SlashCommand as SlashCommand$1 } from "@anthropic-ai/claude-agent-sdk";
|
|
3
|
-
import { WebSocket } from "ws";
|
|
4
7
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
8
|
+
import * as NodePty from "node-pty";
|
|
5
9
|
//#region src/models/claudeAgentSdk/ContentBlock.d.ts
|
|
6
10
|
export type ContentBlock = DocumentBlock | ImageBlock | OtherBlock | TextBlock | ThinkingBlock | ToolResultBlock | ToolUseBlock;
|
|
7
11
|
interface DocumentBlock {
|
|
@@ -150,8 +154,34 @@ export interface TodoTracker {
|
|
|
150
154
|
readToolUse: (event: ToolUseEvent) => TodoUpdateEvent | undefined;
|
|
151
155
|
}
|
|
152
156
|
//#endregion
|
|
157
|
+
//#region src/models/device/Device.d.ts
|
|
158
|
+
export interface Device {
|
|
159
|
+
createdAt: Date;
|
|
160
|
+
credentialHash: string;
|
|
161
|
+
id: string;
|
|
162
|
+
name: string;
|
|
163
|
+
origin: string;
|
|
164
|
+
}
|
|
165
|
+
export declare const deviceSchema: z.ZodObject<{
|
|
166
|
+
createdAt: z.ZodCoercedDate;
|
|
167
|
+
credentialHash: z.ZodString;
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
origin: z.ZodString;
|
|
171
|
+
}>;
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/models/device/DevicesCommandOptions.d.ts
|
|
174
|
+
export interface DevicesCommandOptions {
|
|
175
|
+
hostKey: KeyObject;
|
|
176
|
+
hostname: string;
|
|
177
|
+
port: number;
|
|
178
|
+
revokeDeviceId: string;
|
|
179
|
+
stateDirectory: string;
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
153
182
|
//#region src/models/driver/Driver.d.ts
|
|
154
183
|
export interface Driver {
|
|
184
|
+
backgroundTasks: (sessionId: string) => Promise<void>;
|
|
155
185
|
close: () => Promise<void>;
|
|
156
186
|
closeSession: (sessionId: string) => void;
|
|
157
187
|
createSession: (cwd: string) => Promise<string>;
|
|
@@ -166,20 +196,45 @@ export interface Driver {
|
|
|
166
196
|
runSlashCommand: (sessionId: string, name: string, commandArguments: string) => void;
|
|
167
197
|
setModel: (sessionId: string, model: string) => Promise<void>;
|
|
168
198
|
setPermissionMode: (sessionId: string, permissionMode: PermissionMode) => Promise<void>;
|
|
199
|
+
stopTask: (sessionId: string, taskId: string) => Promise<void>;
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/models/installer/SchemeLaunch.d.ts
|
|
203
|
+
export interface SchemeLaunch {
|
|
204
|
+
code: string;
|
|
169
205
|
}
|
|
170
206
|
//#endregion
|
|
171
207
|
//#region src/models/server/AgentConsoleServer.d.ts
|
|
172
208
|
export interface AgentConsoleServer {
|
|
209
|
+
addPairingCode: (code: string, duration: number) => void;
|
|
173
210
|
close: () => Promise<void>;
|
|
174
211
|
port: number;
|
|
175
212
|
}
|
|
176
213
|
//#endregion
|
|
214
|
+
//#region src/models/shell/ShellTerminal.d.ts
|
|
215
|
+
export interface ShellTerminal {
|
|
216
|
+
kill: () => void;
|
|
217
|
+
onData: (listener: (data: string) => void) => unknown;
|
|
218
|
+
onExit: (listener: () => void) => unknown;
|
|
219
|
+
resize: (cols: number, rows: number) => void;
|
|
220
|
+
write: (data: string) => void;
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/models/shell/ShellTerminalOptions.d.ts
|
|
224
|
+
export interface ShellTerminalOptions extends TerminalSize {
|
|
225
|
+
cwd: string;
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
177
228
|
//#region src/models/server/AgentConsoleServerOptions.d.ts
|
|
178
229
|
export interface AgentConsoleServerOptions {
|
|
179
230
|
createDriver: (callbacks: DriverCallbacks) => Driver;
|
|
231
|
+
hostKey: KeyObject;
|
|
180
232
|
hostname: string;
|
|
233
|
+
origin: string;
|
|
181
234
|
port: number;
|
|
182
|
-
|
|
235
|
+
spawnShell: (options: ShellTerminalOptions) => Promise<ShellTerminal>;
|
|
236
|
+
stateDirectory: string;
|
|
237
|
+
writeLine: (line: string) => void;
|
|
183
238
|
}
|
|
184
239
|
//#endregion
|
|
185
240
|
//#region src/models/server/EventLog.d.ts
|
|
@@ -189,6 +244,203 @@ export interface EventLog {
|
|
|
189
244
|
reset: (sessionId: string) => void;
|
|
190
245
|
}
|
|
191
246
|
//#endregion
|
|
247
|
+
//#region src/models/server/PairingCodes.d.ts
|
|
248
|
+
export interface PairingCodes {
|
|
249
|
+
add: (code: string, duration: number) => void;
|
|
250
|
+
clear: () => void;
|
|
251
|
+
take: (code: string) => boolean;
|
|
252
|
+
}
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/models/shell/ShellEntry.d.ts
|
|
255
|
+
export interface ShellEntry {
|
|
256
|
+
output: string;
|
|
257
|
+
sessionId: string;
|
|
258
|
+
shellId: string;
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/models/shell/ShellRegistry.d.ts
|
|
262
|
+
export interface ShellRegistry {
|
|
263
|
+
close: (shellId: string) => void;
|
|
264
|
+
closeAll: () => void;
|
|
265
|
+
closeSession: (sessionId: string) => void;
|
|
266
|
+
entries: () => ShellEntry[];
|
|
267
|
+
open: (sessionId: string, options: ShellTerminalOptions) => Promise<string>;
|
|
268
|
+
openSession: (sessionId: string) => void;
|
|
269
|
+
resize: (shellId: string, cols: number, rows: number) => void;
|
|
270
|
+
write: (shellId: string, data: string) => void;
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/models/shell/ShellRegistryOptions.d.ts
|
|
274
|
+
export interface ShellRegistryOptions {
|
|
275
|
+
onClose: (shellId: string) => void;
|
|
276
|
+
onOutput: (shellId: string, data: string) => void;
|
|
277
|
+
spawnShell: (options: ShellTerminalOptions) => Promise<ShellTerminal>;
|
|
278
|
+
}
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region src/models/window/ChildMessageType.d.ts
|
|
281
|
+
export declare enum ChildMessageType {
|
|
282
|
+
CommandError = "CommandError",
|
|
283
|
+
CommandResult = "CommandResult",
|
|
284
|
+
Events = "Events",
|
|
285
|
+
SessionOpen = "SessionOpen",
|
|
286
|
+
SessionsChange = "SessionsChange"
|
|
287
|
+
}
|
|
288
|
+
export declare const childMessageTypeSchema: z.ZodEnum<typeof ChildMessageType>;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/models/window/BaseChildMessage.d.ts
|
|
291
|
+
export interface BaseChildMessage<T extends ChildMessageType> extends ItemEntityType<T> {}
|
|
292
|
+
export declare const createBaseChildMessageSchema: <T extends z.ZodType<ChildMessageType>>(typeSchema: T) => z.ZodObject<{
|
|
293
|
+
type: T;
|
|
294
|
+
}>;
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/models/window/ChildCommandErrorMessage.d.ts
|
|
297
|
+
export interface ChildCommandErrorMessage extends BaseChildMessage<ChildMessageType.CommandError> {
|
|
298
|
+
commandId: string;
|
|
299
|
+
message: string;
|
|
300
|
+
}
|
|
301
|
+
export declare const childCommandErrorMessageSchema: z.ZodObject<{
|
|
302
|
+
commandId: z.ZodString;
|
|
303
|
+
message: z.ZodString;
|
|
304
|
+
type: z.ZodLiteral<ChildMessageType.CommandError>;
|
|
305
|
+
}>;
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region src/models/window/ChildCommandResultMessage.d.ts
|
|
308
|
+
export interface ChildCommandResultMessage extends BaseChildMessage<ChildMessageType.CommandResult> {
|
|
309
|
+
commandId: string;
|
|
310
|
+
sessionId: string;
|
|
311
|
+
}
|
|
312
|
+
export declare const childCommandResultMessageSchema: z.ZodObject<{
|
|
313
|
+
commandId: z.ZodString;
|
|
314
|
+
sessionId: z.ZodString;
|
|
315
|
+
type: z.ZodLiteral<ChildMessageType.CommandResult>;
|
|
316
|
+
}>;
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region src/models/window/ChildEventsMessage.d.ts
|
|
319
|
+
export interface ChildEventsMessage extends BaseChildMessage<ChildMessageType.Events> {
|
|
320
|
+
events: AgentEvent[];
|
|
321
|
+
sessionId: string;
|
|
322
|
+
}
|
|
323
|
+
export declare const childEventsMessageSchema: z.ZodObject<{
|
|
324
|
+
events: z.ZodArray<typeof agentEventSchema>;
|
|
325
|
+
sessionId: z.ZodString;
|
|
326
|
+
type: z.ZodLiteral<ChildMessageType.Events>;
|
|
327
|
+
}>;
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/models/window/ChildSessionOpenMessage.d.ts
|
|
330
|
+
export interface ChildSessionOpenMessage extends BaseChildMessage<ChildMessageType.SessionOpen> {
|
|
331
|
+
sessionId: string;
|
|
332
|
+
}
|
|
333
|
+
export declare const childSessionOpenMessageSchema: z.ZodObject<{
|
|
334
|
+
sessionId: z.ZodString;
|
|
335
|
+
type: z.ZodLiteral<ChildMessageType.SessionOpen>;
|
|
336
|
+
}>;
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region src/models/window/ChildSessionsChangeMessage.d.ts
|
|
339
|
+
export interface ChildSessionsChangeMessage extends BaseChildMessage<ChildMessageType.SessionsChange> {}
|
|
340
|
+
export declare const childSessionsChangeMessageSchema: z.ZodObject<{
|
|
341
|
+
type: z.ZodLiteral<ChildMessageType.SessionsChange>;
|
|
342
|
+
}>;
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/models/window/ChildMessage.d.ts
|
|
345
|
+
export type ChildMessage = ChildCommandErrorMessage | ChildCommandResultMessage | ChildEventsMessage | ChildSessionOpenMessage | ChildSessionsChangeMessage;
|
|
346
|
+
export declare const childMessageSchema: z.ZodDiscriminatedUnion<[typeof childCommandErrorMessageSchema, typeof childCommandResultMessageSchema, typeof childEventsMessageSchema, typeof childSessionOpenMessageSchema, typeof childSessionsChangeMessageSchema], "type">;
|
|
347
|
+
//#endregion
|
|
348
|
+
//#region src/models/window/SessionChild.d.ts
|
|
349
|
+
export interface SessionChild {
|
|
350
|
+
cwd: string;
|
|
351
|
+
pendingReplyMap: Map<string, PromiseWithResolvers<string>>;
|
|
352
|
+
webSocket: WebSocket;
|
|
353
|
+
}
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region src/models/window/SessionWindowLaunch.d.ts
|
|
356
|
+
export interface SessionWindowLaunch {
|
|
357
|
+
port: number;
|
|
358
|
+
secret: string;
|
|
359
|
+
}
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/models/window/WindowDriverOptions.d.ts
|
|
362
|
+
export interface WindowDriverOptions {
|
|
363
|
+
launchSessionWindow: (sessionWindowLaunch: SessionWindowLaunch) => void;
|
|
364
|
+
writeLine: (line: string) => void;
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/models/window/WindowSession.d.ts
|
|
368
|
+
export interface WindowSession extends Pick<SessionSummary, "cwd" | "lastActivityAt" | "state" | "title"> {
|
|
369
|
+
child: SessionChild;
|
|
370
|
+
}
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region src/services/device/constants.d.ts
|
|
373
|
+
export declare const STATE_DIRECTORY_NAME = ".agent-console-server";
|
|
374
|
+
export declare const DEVICES_FILENAME = "devices.json";
|
|
375
|
+
export declare const HOST_KEY_FILENAME = "host-key.pem";
|
|
376
|
+
export declare const SECRET_BYTE_LENGTH = 32;
|
|
377
|
+
export declare const PRINTED_PAIRING_CODE_DURATION: number;
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/services/device/findDevice.d.ts
|
|
380
|
+
export declare const findDevice: (devices: Device[], credential: string) => Device | undefined;
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/services/device/getDeviceName.d.ts
|
|
383
|
+
export declare const getDeviceName: (userAgent: string) => string;
|
|
384
|
+
//#endregion
|
|
385
|
+
//#region src/services/device/getStateDirectory.d.ts
|
|
386
|
+
export declare const getStateDirectory: () => string;
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/services/device/hashCredential.d.ts
|
|
389
|
+
export declare const hashCredential: (credential: string) => string;
|
|
390
|
+
//#endregion
|
|
391
|
+
//#region src/services/device/readDevices.d.ts
|
|
392
|
+
export declare const readDevices: (stateDirectory: string) => Device[];
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region src/services/device/readHostKey.d.ts
|
|
395
|
+
export declare const readHostKey: (stateDirectory: string) => KeyObject;
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region src/services/device/runDevicesCommand.d.ts
|
|
398
|
+
export declare const runDevicesCommand: ({ hostKey, hostname, port, revokeDeviceId, stateDirectory }: DevicesCommandOptions, writeLine: (line: string) => void) => Promise<boolean>;
|
|
399
|
+
//#endregion
|
|
400
|
+
//#region src/services/device/writeDevices.d.ts
|
|
401
|
+
export declare const writeDevices: (stateDirectory: string, devices: Device[]) => void;
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/services/device/writeStateFile.d.ts
|
|
404
|
+
export declare const writeStateFile: (stateDirectory: string, filename: string, content: string) => void;
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region src/services/handshake/checkIsSignatureValid.d.ts
|
|
407
|
+
export declare const checkIsSignatureValid: (key: KeyObject, purpose: SignaturePurpose, port: number, nonce: string, signature: string) => boolean;
|
|
408
|
+
//#endregion
|
|
409
|
+
//#region src/services/handshake/getPublicKeyText.d.ts
|
|
410
|
+
export declare const getPublicKeyText: (privateKey: KeyObject) => string;
|
|
411
|
+
//#endregion
|
|
412
|
+
//#region src/services/handshake/signNonce.d.ts
|
|
413
|
+
export declare const signNonce: (privateKey: KeyObject, purpose: SignaturePurpose, port: number, nonce: string) => string;
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/services/installer/checkIsHostInstalled.d.ts
|
|
416
|
+
export declare const checkIsHostInstalled: () => boolean;
|
|
417
|
+
//#endregion
|
|
418
|
+
//#region src/services/installer/checkIsSchemeLaunchTampered.d.ts
|
|
419
|
+
export declare const checkIsSchemeLaunchTampered: (commandLineArguments: string[]) => boolean;
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/services/installer/constants.d.ts
|
|
422
|
+
export declare const HOST_EXECUTABLE_FILENAME = "agent-console-host.exe";
|
|
423
|
+
export declare const CLAUDE_CODE_EXECUTABLE_FILENAME = "claude.exe";
|
|
424
|
+
export declare const HOST_SCHEME_REGISTRY_KEY: string;
|
|
425
|
+
export declare const HOST_DIRECTORY_ENVIRONMENT_VARIABLE: string;
|
|
426
|
+
export declare const HOST_INSTALL_DIRECTORY_SEGMENTS: readonly [string, string];
|
|
427
|
+
export declare const NODE_PTY_DIRECTORY_NAME = "node-pty";
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/services/installer/getClaudeCodeExecutablePath.d.ts
|
|
430
|
+
export declare const getClaudeCodeExecutablePath: () => string | undefined;
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region src/services/installer/getHostInstallDirectory.d.ts
|
|
433
|
+
export declare const getHostInstallDirectory: () => string;
|
|
434
|
+
//#endregion
|
|
435
|
+
//#region src/services/installer/getSchemeLaunch.d.ts
|
|
436
|
+
export declare const getSchemeLaunch: (argument: string) => SchemeLaunch | undefined;
|
|
437
|
+
//#endregion
|
|
438
|
+
//#region src/services/installer/installHost.d.ts
|
|
439
|
+
export declare const installHost: () => string;
|
|
440
|
+
//#endregion
|
|
441
|
+
//#region src/services/installer/uninstallHost.d.ts
|
|
442
|
+
export declare const uninstallHost: () => void;
|
|
443
|
+
//#endregion
|
|
192
444
|
//#region src/services/server/answerHttpRequest.d.ts
|
|
193
445
|
export declare const answerHttpRequest: ({ headers, method }: IncomingMessage, response: ServerResponse) => void;
|
|
194
446
|
//#endregion
|
|
@@ -196,28 +448,53 @@ export declare const answerHttpRequest: ({ headers, method }: IncomingMessage, r
|
|
|
196
448
|
export declare const checkIsTokenValid: (candidate: string, token: string) => boolean;
|
|
197
449
|
//#endregion
|
|
198
450
|
//#region src/services/server/constants.d.ts
|
|
199
|
-
export declare const
|
|
200
|
-
export declare const TOKEN_FILENAME = "token";
|
|
201
|
-
export declare const TOKEN_BYTE_LENGTH = 32;
|
|
451
|
+
export declare const HOST_PROBE_TIMEOUT_MS = 2e3;
|
|
202
452
|
//#endregion
|
|
203
453
|
//#region src/services/server/createAgentConsoleServer.d.ts
|
|
204
|
-
export declare const createAgentConsoleServer: ({ createDriver, hostname, port,
|
|
454
|
+
export declare const createAgentConsoleServer: ({ createDriver, hostKey, hostname, origin, port, spawnShell, stateDirectory, writeLine }: AgentConsoleServerOptions) => Promise<AgentConsoleServer>;
|
|
205
455
|
//#endregion
|
|
206
456
|
//#region src/services/server/createEventLog.d.ts
|
|
207
457
|
export declare const createEventLog: () => EventLog;
|
|
208
458
|
//#endregion
|
|
459
|
+
//#region src/services/server/createPairingCodes.d.ts
|
|
460
|
+
export declare const createPairingCodes: () => PairingCodes;
|
|
461
|
+
//#endregion
|
|
209
462
|
//#region src/services/server/handleCommand.d.ts
|
|
210
|
-
export declare const handleCommand: (driver: Driver, command:
|
|
463
|
+
export declare const handleCommand: (driver: Driver, command: DriverCommand) => Promise<string>;
|
|
211
464
|
//#endregion
|
|
212
|
-
//#region src/services/server/
|
|
213
|
-
export declare const
|
|
465
|
+
//#region src/services/server/handleShellCommand.d.ts
|
|
466
|
+
export declare const handleShellCommand: (shellRegistry: ShellRegistry, command: ShellCommand) => Promise<string>;
|
|
214
467
|
//#endregion
|
|
215
468
|
//#region src/services/server/sendServerMessage.d.ts
|
|
216
469
|
export declare const sendServerMessage: (webSocket: WebSocket, message: ServerMessage) => void;
|
|
217
470
|
//#endregion
|
|
471
|
+
//#region src/services/server/sendToRunningHost.d.ts
|
|
472
|
+
export declare const sendToRunningHost: (hostname: string, port: number, hostKey: KeyObject, createMessage?: (signature: string) => HandOffMessage | RevokeMessage) => Promise<boolean>;
|
|
473
|
+
//#endregion
|
|
218
474
|
//#region src/services/shared/createTaskRegistry.d.ts
|
|
219
475
|
export declare const createTaskRegistry: () => TaskRegistry;
|
|
220
476
|
//#endregion
|
|
477
|
+
//#region src/services/shared/readMessageText.d.ts
|
|
478
|
+
export declare const readMessageText: (data: RawData) => string;
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/services/shell/constants.d.ts
|
|
481
|
+
export declare const CONSOLE_LIST_AGENT_NAME = "conpty_console_list_agent";
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/services/shell/createShellRegistry.d.ts
|
|
484
|
+
export declare const createShellRegistry: ({ onClose, onOutput, spawnShell }: ShellRegistryOptions) => ShellRegistry;
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region src/services/shell/getShellFile.d.ts
|
|
487
|
+
export declare const getShellFile: () => string;
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/services/shell/loadNodePty.d.ts
|
|
490
|
+
export declare const loadNodePty: () => Promise<typeof NodePty>;
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region src/services/shell/runConsoleListAgent.d.ts
|
|
493
|
+
export declare const runConsoleListAgent: (shellPid: number) => void;
|
|
494
|
+
//#endregion
|
|
495
|
+
//#region src/services/shell/spawnPtyShell.d.ts
|
|
496
|
+
export declare const spawnPtyShell: ({ cols, cwd, rows }: ShellTerminalOptions) => Promise<ShellTerminal>;
|
|
497
|
+
//#endregion
|
|
221
498
|
//#region src/services/drivers/claudeAgentSdk/closeOpenSession.d.ts
|
|
222
499
|
export declare const closeOpenSession: (sessionId: string, openSession: OpenSession, message: string, { emit, onSessionsChange, openSessionMap }: Pick<SessionOpenerContext, "emit" | "onSessionsChange" | "openSessionMap">) => void;
|
|
223
500
|
//#endregion
|
|
@@ -257,6 +534,9 @@ export declare const getEventId: (sourceId: string, suffix: number | string) =>
|
|
|
257
534
|
//#region src/services/drivers/claudeAgentSdk/getSessionTitle.d.ts
|
|
258
535
|
export declare const getSessionTitle: ({ customTitle, firstPrompt, summary }: SDKSessionInfo) => string;
|
|
259
536
|
//#endregion
|
|
537
|
+
//#region src/services/drivers/claudeAgentSdk/listSessionSummaries.d.ts
|
|
538
|
+
export declare const listSessionSummaries: (openSessionMap: ReadonlyMap<string, Pick<SessionSummary, "cwd" | "lastActivityAt" | "state" | "title">>) => Promise<SessionSummary[]>;
|
|
539
|
+
//#endregion
|
|
260
540
|
//#region src/services/drivers/claudeAgentSdk/mapAssistantContent.d.ts
|
|
261
541
|
export declare const mapAssistantContent: (content: ContentBlock[], context: MessageContext) => AgentEvent[];
|
|
262
542
|
//#endregion
|
|
@@ -302,6 +582,9 @@ export declare const toPermissionRequestEvent: (toolName: string, input: Record<
|
|
|
302
582
|
//#region src/services/drivers/claudeAgentSdk/toPermissionResult.d.ts
|
|
303
583
|
export declare const toPermissionResult: (input: Record<string, unknown>, suggestions: PermissionUpdate[], behavior: PermissionBehavior, message: string) => PermissionResult;
|
|
304
584
|
//#endregion
|
|
585
|
+
//#region src/services/drivers/claudeAgentSdk/toSessionClosedEvents.d.ts
|
|
586
|
+
export declare const toSessionClosedEvents: (message: string) => AgentEvent[];
|
|
587
|
+
//#endregion
|
|
305
588
|
//#region src/services/drivers/claudeAgentSdk/toSessionInitEvent.d.ts
|
|
306
589
|
export declare const toSessionInitEvent: (message: SDKSystemMessage, permissionMode: PermissionMode, createdAt: Date) => SessionInitEvent;
|
|
307
590
|
//#endregion
|
|
@@ -319,4 +602,31 @@ export declare const toUnknownEvent: (id: string, sdkType: string, raw: string,
|
|
|
319
602
|
//#region src/services/drivers/claudeAgentSdk/watchSession.d.ts
|
|
320
603
|
export declare const watchSession: (sessionId: string, openSession: OpenSession, { emit, onSessionsChange, openSessionMap }: Pick<SessionOpenerContext, "emit" | "onSessionsChange" | "openSessionMap">) => Promise<void>;
|
|
321
604
|
//#endregion
|
|
322
|
-
|
|
605
|
+
//#region src/services/drivers/window/constants.d.ts
|
|
606
|
+
export declare const SESSION_SUBCOMMAND = "session";
|
|
607
|
+
export declare const SESSION_SECRET_ENVIRONMENT_VARIABLE: string;
|
|
608
|
+
export declare const SESSION_SECRET_BYTE_LENGTH = 32;
|
|
609
|
+
export declare const SESSION_WINDOW_CONNECT_TIMEOUT: number;
|
|
610
|
+
//#endregion
|
|
611
|
+
//#region src/services/drivers/window/createWindowDriver.d.ts
|
|
612
|
+
export declare const createWindowDriver: ({ onEvents, onSessionOpen, onSessionsChange }: DriverCallbacks, { launchSessionWindow, writeLine }: WindowDriverOptions) => Driver;
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region src/services/drivers/window/formatSessionLogLine.d.ts
|
|
615
|
+
export declare const formatSessionLogLine: (event: AgentEvent) => string;
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region src/services/drivers/window/launchSessionWindow.d.ts
|
|
618
|
+
declare const launchSessionWindow$1: ({ port, secret }: SessionWindowLaunch) => void;
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region src/services/drivers/window/runSessionChild.d.ts
|
|
621
|
+
export declare const runSessionChild: (port: number, writeLine: (line: string) => void) => Promise<void>;
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region src/services/drivers/window/sendChildCommand.d.ts
|
|
624
|
+
export declare const sendChildCommand: (child: SessionChild, command: DriverCommand) => Promise<string>;
|
|
625
|
+
//#endregion
|
|
626
|
+
//#region src/services/drivers/window/serveSessionChild.d.ts
|
|
627
|
+
export declare const serveSessionChild: (webSocket: WebSocket, createDriver: (callbacks: DriverCallbacks) => Driver, writeLine: (line: string) => void) => Promise<void>;
|
|
628
|
+
//#endregion
|
|
629
|
+
//#region src/services/drivers/window/takeChildReply.d.ts
|
|
630
|
+
export declare const takeChildReply: ({ pendingReplyMap }: SessionChild, commandId: string) => PromiseWithResolvers<string> | undefined;
|
|
631
|
+
//#endregion
|
|
632
|
+
export { AgentEvent, AgentEventType, AssistantMessageEvent, Attachment, AttachmentMediaType, AuthenticateMessage, AuthenticatedMessage, BackgroundTasksCommand, BaseAgentEvent, BaseCommand, BaseHandshakeMessage, BaseServerMessage, CapabilitiesEvent, ChallengeMessage, CloseSessionCommand, CloseShellCommand, Command, CommandErrorMessage, CommandOutputEvent, CommandType, CompactionEvent, CompactionTrigger, ContextUsageEvent, CreateSessionCommand, DEFAULT_APP_ORIGIN, DEFAULT_HOSTNAME, DEFAULT_PORT, DriverCommand, EphemeralAgentEventTypes, EventsMessage, FileRewindEvent, ForkCommand, HOST_SCHEME, HandOffMessage, HandshakeMessage, HandshakeMessageType, HookEvent, HookPhase, HostCloseCode, HostErrorEvent, HostStoppingMessage, InterruptCommand, ListSessionsCommand, McpServer, MessageUuid, Model, OpenShellCommand, PAIRING_CODE_PARAMETER, PAIRING_HASH_PARAMETER, PairMessage, PairedMessage, ParentToolUseId, PermissionBehavior, PermissionMode, PermissionRequestEvent, PermissionResolutionEvent, PermissionVerdictCommand, PromptCommand, ProofMessage, RateLimitEvent, ResumeAtCommand, ResumeCommand, RevokeMessage, RewindFilesCommand, SCHEME_PAIRING_CODE_DURATION, SHELL_OUTPUT_LENGTH, ServerMessage, ServerMessageType, SessionId, SessionInitEvent, SessionOpenedMessage, SessionResetMessage, SessionSettingsEvent, SessionState, SessionStateEvent, SessionSummary, SessionsMessage, SetModelCommand, SetPermissionModeCommand, ShellClosedMessage, ShellCommand, ShellId, ShellInputCommand, ShellOpenedMessage, ShellOutputMessage, ShellResizeCommand, SignaturePurpose, SlashCommand, SlashCommandCommand, StopTaskCommand, StreamDeltaEvent, SubagentEvent, SubagentStatus, TerminalSize, ThinkingEvent, Todo, TodoStatus, TodoUpdateEvent, TokenUsage, ToolProgressEvent, ToolResultEvent, ToolUseEvent, TurnResultEvent, TurnUsageEvent, UnknownEvent, UserMessageEvent, agentEventSchema, agentEventTypeSchema, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, authenticateMessageSchema, authenticatedMessageSchema, backgroundTasksCommandSchema, capabilitiesEventSchema, challengeMessageSchema, closeSessionCommandSchema, closeShellCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createBaseAgentEventSchema, createBaseCommandSchema, createBaseHandshakeMessageSchema, createBaseServerMessageSchema, createSessionCommandSchema, driverCommandSchema, eventsMessageSchema, fileRewindEventSchema, forkCommandSchema, getSignedText, handOffMessageSchema, handshakeMessageSchema, handshakeMessageTypeSchema, hookEventSchema, hookPhaseSchema, hostErrorEventSchema, hostStoppingMessageSchema, interruptCommandSchema, launchSessionWindow$1 as launchSessionWindow, listSessionsCommandSchema, mcpServerSchema, messageUuidSchema, modelSchema, openShellCommandSchema, pairMessageSchema, pairedMessageSchema, parentToolUseIdSchema, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, proofMessageSchema, rateLimitEventSchema, resumeAtCommandSchema, resumeCommandSchema, revokeMessageSchema, rewindFilesCommandSchema, serverMessageSchema, serverMessageTypeSchema, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, shellClosedMessageSchema, shellCommandSchema, shellIdSchema, shellInputCommandSchema, shellOpenedMessageSchema, shellOutputMessageSchema, shellResizeCommandSchema, signaturePurposeSchema, slashCommandCommandSchema, slashCommandSchema, stopTaskCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, terminalSizeSchema, thinkingEventSchema, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, unknownEventSchema, userMessageEventSchema };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { A as
|
|
3
|
-
|
|
4
|
-
export { AgentEventType, AttachmentMediaType, CommandType, CompactionTrigger, DEFAULT_APP_ORIGIN, DEFAULT_DENY_MESSAGE, DEFAULT_HOSTNAME, DEFAULT_PORT, EphemeralAgentEventTypes, HookPhase, IGNORED_SDK_MESSAGE_TYPES, PAIRING_HASH_PARAMETER, PermissionBehavior, PermissionMode, SESSION_LIST_LIMIT, SETTING_SOURCES, ServerMessageType, SessionState, SubagentStatus, TOKEN_BYTE_LENGTH, TOKEN_DIRECTORY_NAME, TOKEN_FILENAME, TOKEN_QUERY_PARAMETER, TodoStatus, TodoToolName, agentEventSchema, agentEventTypeSchema, answerHttpRequest, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, capabilitiesEventSchema, checkIsTokenValid, closeOpenSession, closeSessionCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createAgentConsoleServer, createBaseAgentEventSchema, createBaseCommandSchema, createBaseServerMessageSchema, createClaudeAgentSdkDriver, createEventLog, createFileOriginTracker, createInputQueue, createPermissionBridge, createSdkMessageMapper, createSessionCommandSchema, createSessionOpener, createStreamTracker, createTaskRegistry, createTodoTracker, eventsMessageSchema, fileRewindEventSchema, forkCommandSchema, getEventId, getSessionTitle, handleCommand, hookEventSchema, hookPhaseSchema, hostErrorEventSchema, interruptCommandSchema, listSessionsCommandSchema, mapAssistantContent, mapHookMessage, mapSystemMessage, mapTaskMessage, mapUserContent, mcpServerSchema, messageUuidSchema, modelSchema, parentToolUseIdSchema, parseMessageBody, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, rateLimitEventSchema, readSessionCwd, readSessionHistory, readToken, readToolUseResultMap, resumeAtCommandSchema, resumeCommandSchema, rewindFilesCommandSchema, sendServerMessage, serverMessageSchema, serverMessageTypeSchema, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, slashCommandCommandSchema, slashCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, thinkingEventSchema, toCapabilitiesEvent, toContentBlockParam, toContextUsageEvent, toPermissionRequestEvent, toPermissionResult, toSessionInitEvent, toToolResultText, toTurnResultEvents, toUnknownEvent, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, unknownEventSchema, userMessageEventSchema, watchSession };
|
|
1
|
+
import { $ as eventsMessageSchema, $t as serverMessageTypeSchema, A as forkCommandSchema, At as permissionRequestEventSchema, B as getSignedText, Bt as commandOutputEventSchema, C as resumeCommandSchema, Ct as PermissionMode, D as permissionVerdictCommandSchema, Dt as permissionResolutionEventSchema, E as attachmentSchema, Et as rateLimitEventSchema, F as createBaseCommandSchema, Ft as fileRewindEventSchema, G as shellIdSchema, Gt as parentToolUseIdSchema, H as shellOutputMessageSchema, Ht as slashCommandSchema, I as CommandType, It as contextUsageEventSchema, J as sessionResetMessageSchema, Jt as AgentEventType, K as sessionsMessageSchema, Kt as messageUuidSchema, L as commandTypeSchema, Lt as compactionEventSchema, M as closeSessionCommandSchema, Mt as hookEventSchema, N as backgroundTasksCommandSchema, Nt as HookPhase, O as listSessionsCommandSchema, Ot as PermissionBehavior, P as sessionIdSchema, Pt as hookPhaseSchema, Q as hostStoppingMessageSchema, Qt as ServerMessageType, R as AttachmentMediaType, Rt as CompactionTrigger, S as rewindFilesCommandSchema, St as sessionInitEventSchema, T as promptCommandSchema, Tt as mcpServerSchema, U as shellOpenedMessageSchema, Ut as modelSchema, V as serverMessageSchema, Vt as capabilitiesEventSchema, W as shellClosedMessageSchema, Wt as assistantMessageEventSchema, X as proofMessageSchema, Xt as commandErrorMessageSchema, Y as sessionOpenedMessageSchema, Yt as agentEventTypeSchema, Z as pairedMessageSchema, Zt as authenticatedMessageSchema, _ as driverCommandSchema, _t as streamDeltaEventSchema, a as pairMessageSchema, an as DEFAULT_PORT, at as tokenUsageSchema, b as setPermissionModeCommandSchema, bt as sessionStateSchema, c as authenticateMessageSchema, cn as PAIRING_HASH_PARAMETER, ct as toolProgressEventSchema, d as shellCommandSchema, dn as HandshakeMessageType, dt as TodoStatus, en as createBaseServerMessageSchema, et as agentEventSchema, f as shellResizeCommandSchema, fn as handshakeMessageTypeSchema, ft as todoStatusSchema, g as closeShellCommandSchema, gt as subagentStatusSchema, h as terminalSizeSchema, ht as SubagentStatus, i as revokeMessageSchema, in as DEFAULT_HOSTNAME, it as turnResultEventSchema, j as createSessionCommandSchema, jt as hostErrorEventSchema, k as interruptCommandSchema, kt as permissionBehaviorSchema, l as createBaseHandshakeMessageSchema, ln as SCHEME_PAIRING_CODE_DURATION, lt as todoUpdateEventSchema, m as openShellCommandSchema, mt as subagentEventSchema, n as HostCloseCode, nn as signaturePurposeSchema, nt as unknownEventSchema, o as handOffMessageSchema, on as HOST_SCHEME, ot as toolUseEventSchema, p as shellInputCommandSchema, pt as thinkingEventSchema, q as sessionSummarySchema, qt as createBaseAgentEventSchema, r as handshakeMessageSchema, rn as DEFAULT_APP_ORIGIN, rt as turnUsageEventSchema, s as challengeMessageSchema, sn as PAIRING_CODE_PARAMETER, st as toolResultEventSchema, t as EphemeralAgentEventTypes, tn as SignaturePurpose, tt as userMessageEventSchema, u as commandSchema, un as SHELL_OUTPUT_LENGTH, ut as todoSchema, v as stopTaskCommandSchema, vt as sessionStateEventSchema, w as resumeAtCommandSchema, wt as permissionModeSchema, x as setModelCommandSchema, xt as sessionSettingsEventSchema, y as slashCommandCommandSchema, yt as SessionState, z as attachmentMediaTypeSchema, zt as compactionTriggerSchema } from "./EphemeralAgentEventTypes-DGkHIIcW.js";
|
|
2
|
+
import { $ as HOST_DIRECTORY_ENVIRONMENT_VARIABLE, A as sendChildCommand, At as IGNORED_SDK_MESSAGE_TYPES, B as SESSION_SECRET_BYTE_LENGTH, Bt as signNonce, C as serveSessionChild, Ct as createStreamTracker, D as createWindowDriver, Dt as toPermissionRequestEvent, E as launchSessionWindow, Et as toPermissionResult, F as childCommandResultMessageSchema, Ft as getEventId, G as createTaskRegistry, Gt as readHostKey, H as SESSION_SUBCOMMAND, Ht as writeDevices, I as childCommandErrorMessageSchema, It as runDevicesCommand, J as listSessionSummaries, Jt as DEVICES_FILENAME, K as toContentBlockParam, Kt as writeStateFile, L as ChildMessageType, Lt as sendToRunningHost, M as childSessionsChangeMessageSchema, Mt as SETTING_SOURCES, N as childSessionOpenMessageSchema, Nt as closeOpenSession, O as checkIsTokenValid, Ot as createInputQueue, P as childEventsMessageSchema, Pt as toSessionClosedEvents, Q as CLAUDE_CODE_EXECUTABLE_FILENAME, Qt as STATE_DIRECTORY_NAME, R as childMessageTypeSchema, Rt as readMessageText, S as runSessionChild, St as TodoToolName, T as formatSessionLogLine, Tt as createPermissionBridge, U as SESSION_WINDOW_CONNECT_TIMEOUT, Ut as readDevices, V as SESSION_SECRET_ENVIRONMENT_VARIABLE, Vt as checkIsSignatureValid, W as createClaudeAgentSdkDriver, Wt as deviceSchema, X as getClaudeCodeExecutablePath, Xt as PRINTED_PAIRING_CODE_DURATION, Y as createSessionOpener, Yt as HOST_KEY_FILENAME, Z as getHostInstallDirectory, Zt as SECRET_BYTE_LENGTH, _ as uninstallHost, _t as mapTaskMessage, a as CONSOLE_LIST_AGENT_NAME, at as toContextUsageEvent, b as checkIsSchemeLaunchTampered, bt as toUnknownEvent, c as sendServerMessage, ct as readToolUseResultMap, d as createEventLog, dt as toTurnResultEvents, et as HOST_EXECUTABLE_FILENAME, f as answerHttpRequest, ft as toSessionInitEvent, g as hashCredential, gt as mapSystemMessage, h as findDevice, ht as toToolResultText, i as runConsoleListAgent, it as watchSession, j as childMessageSchema, jt as SESSION_LIST_LIMIT, k as takeChildReply, kt as DEFAULT_DENY_MESSAGE, l as handleShellCommand, lt as readSessionHistory, m as getDeviceName, mt as mapUserContent, n as loadNodePty, nt as HOST_SCHEME_REGISTRY_KEY, o as createAgentConsoleServer, ot as toCapabilitiesEvent, p as getPublicKeyText, pt as parseMessageBody, q as readSessionCwd, qt as getStateDirectory, r as getShellFile, rt as NODE_PTY_DIRECTORY_NAME, s as createShellRegistry, st as getSessionTitle, t as spawnPtyShell, tt as HOST_INSTALL_DIRECTORY_SEGMENTS, u as createPairingCodes, ut as createSdkMessageMapper, v as installHost, vt as mapHookMessage, w as handleCommand, wt as createFileOriginTracker, x as checkIsHostInstalled, xt as createTodoTracker, y as getSchemeLaunch, yt as mapAssistantContent, z as createBaseChildMessageSchema, zt as HOST_PROBE_TIMEOUT_MS } from "./spawnPtyShell-CtAiD2BH.js";
|
|
3
|
+
export { AgentEventType, AttachmentMediaType, CLAUDE_CODE_EXECUTABLE_FILENAME, CONSOLE_LIST_AGENT_NAME, ChildMessageType, CommandType, CompactionTrigger, DEFAULT_APP_ORIGIN, DEFAULT_DENY_MESSAGE, DEFAULT_HOSTNAME, DEFAULT_PORT, DEVICES_FILENAME, EphemeralAgentEventTypes, HOST_DIRECTORY_ENVIRONMENT_VARIABLE, HOST_EXECUTABLE_FILENAME, HOST_INSTALL_DIRECTORY_SEGMENTS, HOST_KEY_FILENAME, HOST_PROBE_TIMEOUT_MS, HOST_SCHEME, HOST_SCHEME_REGISTRY_KEY, HandshakeMessageType, HookPhase, HostCloseCode, IGNORED_SDK_MESSAGE_TYPES, NODE_PTY_DIRECTORY_NAME, PAIRING_CODE_PARAMETER, PAIRING_HASH_PARAMETER, PRINTED_PAIRING_CODE_DURATION, PermissionBehavior, PermissionMode, SCHEME_PAIRING_CODE_DURATION, SECRET_BYTE_LENGTH, SESSION_LIST_LIMIT, SESSION_SECRET_BYTE_LENGTH, SESSION_SECRET_ENVIRONMENT_VARIABLE, SESSION_SUBCOMMAND, SESSION_WINDOW_CONNECT_TIMEOUT, SETTING_SOURCES, SHELL_OUTPUT_LENGTH, STATE_DIRECTORY_NAME, ServerMessageType, SessionState, SignaturePurpose, SubagentStatus, TodoStatus, TodoToolName, agentEventSchema, agentEventTypeSchema, answerHttpRequest, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, authenticateMessageSchema, authenticatedMessageSchema, backgroundTasksCommandSchema, capabilitiesEventSchema, challengeMessageSchema, checkIsHostInstalled, checkIsSchemeLaunchTampered, checkIsSignatureValid, checkIsTokenValid, childCommandErrorMessageSchema, childCommandResultMessageSchema, childEventsMessageSchema, childMessageSchema, childMessageTypeSchema, childSessionOpenMessageSchema, childSessionsChangeMessageSchema, closeOpenSession, closeSessionCommandSchema, closeShellCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createAgentConsoleServer, createBaseAgentEventSchema, createBaseChildMessageSchema, createBaseCommandSchema, createBaseHandshakeMessageSchema, createBaseServerMessageSchema, createClaudeAgentSdkDriver, createEventLog, createFileOriginTracker, createInputQueue, createPairingCodes, createPermissionBridge, createSdkMessageMapper, createSessionCommandSchema, createSessionOpener, createShellRegistry, createStreamTracker, createTaskRegistry, createTodoTracker, createWindowDriver, deviceSchema, driverCommandSchema, eventsMessageSchema, fileRewindEventSchema, findDevice, forkCommandSchema, formatSessionLogLine, getClaudeCodeExecutablePath, getDeviceName, getEventId, getHostInstallDirectory, getPublicKeyText, getSchemeLaunch, getSessionTitle, getShellFile, getSignedText, getStateDirectory, handOffMessageSchema, handleCommand, handleShellCommand, handshakeMessageSchema, handshakeMessageTypeSchema, hashCredential, hookEventSchema, hookPhaseSchema, hostErrorEventSchema, hostStoppingMessageSchema, installHost, interruptCommandSchema, launchSessionWindow, listSessionSummaries, listSessionsCommandSchema, loadNodePty, mapAssistantContent, mapHookMessage, mapSystemMessage, mapTaskMessage, mapUserContent, mcpServerSchema, messageUuidSchema, modelSchema, openShellCommandSchema, pairMessageSchema, pairedMessageSchema, parentToolUseIdSchema, parseMessageBody, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, proofMessageSchema, rateLimitEventSchema, readDevices, readHostKey, readMessageText, readSessionCwd, readSessionHistory, readToolUseResultMap, resumeAtCommandSchema, resumeCommandSchema, revokeMessageSchema, rewindFilesCommandSchema, runConsoleListAgent, runDevicesCommand, runSessionChild, sendChildCommand, sendServerMessage, sendToRunningHost, serveSessionChild, serverMessageSchema, serverMessageTypeSchema, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, shellClosedMessageSchema, shellCommandSchema, shellIdSchema, shellInputCommandSchema, shellOpenedMessageSchema, shellOutputMessageSchema, shellResizeCommandSchema, signNonce, signaturePurposeSchema, slashCommandCommandSchema, slashCommandSchema, spawnPtyShell, stopTaskCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, takeChildReply, terminalSizeSchema, thinkingEventSchema, toCapabilitiesEvent, toContentBlockParam, toContextUsageEvent, toPermissionRequestEvent, toPermissionResult, toSessionClosedEvents, toSessionInitEvent, toToolResultText, toTurnResultEvents, toUnknownEvent, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, uninstallHost, unknownEventSchema, userMessageEventSchema, watchSession, writeDevices, writeStateFile };
|