agent-console-server 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +56 -0
- package/bin/cli.js +2 -0
- package/dist/EphemeralAgentEventTypes-Cm5oNQXu.js +274 -0
- package/dist/ServerMessage-Deh-bExC.js +363 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +36 -0
- package/dist/constants-eNCfNezp.d.ts +902 -0
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js +3 -0
- package/dist/index.d.ts +323 -0
- package/dist/index.js +4 -0
- package/dist/readToken-CAukYBGj.js +1377 -0
- package/package.json +75 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as SubagentStatus, $t as SlashCommandCommand, A as unknownEventSchema, An as sessionIdSchema, At as compactionEventSchema, B as toolResultEventSchema, Bt as modelSchema, C as serverMessageTypeSchema, Cn as ForkCommand, Ct as HookPhase, D as UserMessageEvent, Dn as CloseSessionCommand, Dt as ContextUsageEvent, E as agentEventSchema, En as createSessionCommandSchema, Et as fileRewindEventSchema, F as TokenUsage, Fn as Attachment, Ft as CapabilitiesEvent, G as Todo, Gt as MessageUuid, H as toolProgressEventSchema, Ht as assistantMessageEventSchema, I as tokenUsageSchema, In as attachmentSchema, It as capabilitiesEventSchema, J as todoStatusSchema, Jt as createBaseAgentEventSchema, K as todoSchema, Kt as messageUuidSchema, L as ToolUseEvent, Ln as AttachmentMediaType, Lt as SlashCommand, M as turnUsageEventSchema, Mn as createBaseCommandSchema, Mt as compactionTriggerSchema, N as TurnResultEvent, Nn as CommandType, Nt as CommandOutputEvent, O as userMessageEventSchema, On as closeSessionCommandSchema, Ot as contextUsageEventSchema, P as turnResultEventSchema, Pn as commandTypeSchema, Pt as commandOutputEventSchema, Q as subagentEventSchema, Qt as commandSchema, R as toolUseEventSchema, Rn as attachmentMediaTypeSchema, Rt as slashCommandSchema, S as ServerMessageType, Sn as interruptCommandSchema, St as hookEventSchema, T as AgentEvent, Tn as CreateSessionCommand, Tt as FileRewindEvent, U as TodoUpdateEvent, Ut as ParentToolUseId, V as ToolProgressEvent, Vt as AssistantMessageEvent, W as todoUpdateEventSchema, Wt as parentToolUseIdSchema, X as thinkingEventSchema, Xt as agentEventTypeSchema, Y as ThinkingEvent, Yt as AgentEventType, Z as SubagentEvent, Zt as Command, _ as eventsMessageSchema, _n as PermissionBehavior, _t as PermissionRequestEvent, a as TOKEN_QUERY_PARAMETER, an as SetModelCommand, at as SessionState, b as BaseServerMessage, bn as listSessionsCommandSchema, bt as hostErrorEventSchema, c as SessionsMessage, cn as rewindFilesCommandSchema, ct as sessionSettingsEventSchema, d as sessionSummarySchema, dn as ResumeAtCommand, dt as McpServer, en as slashCommandCommandSchema, et as subagentStatusSchema, f as SessionResetMessage, fn as resumeAtCommandSchema, ft as mcpServerSchema, g as EventsMessage, gn as permissionVerdictCommandSchema, gt as permissionResolutionEventSchema, h as sessionOpenedMessageSchema, hn as PermissionVerdictCommand, ht as PermissionResolutionEvent, i as PAIRING_HASH_PARAMETER, in as permissionModeSchema, it as sessionStateEventSchema, j as TurnUsageEvent, jn as BaseCommand, jt as CompactionTrigger, k as UnknownEvent, kn as SessionId, kt as CompactionEvent, l as sessionsMessageSchema, ln as ResumeCommand, lt as SessionInitEvent, m as SessionOpenedMessage, mn as promptCommandSchema, mt as rateLimitEventSchema, n as DEFAULT_HOSTNAME, nn as setPermissionModeCommandSchema, nt as streamDeltaEventSchema, o as ServerMessage, on as setModelCommandSchema, ot as sessionStateSchema, p as sessionResetMessageSchema, pn as PromptCommand, pt as RateLimitEvent, q as TodoStatus, qt as BaseAgentEvent, r as DEFAULT_PORT, rn as PermissionMode, rt as SessionStateEvent, s as serverMessageSchema, sn as RewindFilesCommand, st as SessionSettingsEvent, t as DEFAULT_APP_ORIGIN, tn as SetPermissionModeCommand, tt as StreamDeltaEvent, u as SessionSummary, un as resumeCommandSchema, ut as sessionInitEventSchema, v as CommandErrorMessage, vn as permissionBehaviorSchema, vt as permissionRequestEventSchema, w as EphemeralAgentEventTypes, wn as forkCommandSchema, wt as hookPhaseSchema, x as createBaseServerMessageSchema, xn as InterruptCommand, xt as HookEvent, y as commandErrorMessageSchema, yn as ListSessionsCommand, yt as HostErrorEvent, z as ToolResultEvent, zt as Model } from "./constants-eNCfNezp.js";
|
|
2
|
+
export { AgentEvent, AgentEventType, AssistantMessageEvent, Attachment, AttachmentMediaType, BaseAgentEvent, BaseCommand, BaseServerMessage, CapabilitiesEvent, CloseSessionCommand, Command, CommandErrorMessage, CommandOutputEvent, CommandType, CompactionEvent, CompactionTrigger, ContextUsageEvent, CreateSessionCommand, DEFAULT_APP_ORIGIN, DEFAULT_HOSTNAME, DEFAULT_PORT, EphemeralAgentEventTypes, EventsMessage, FileRewindEvent, ForkCommand, HookEvent, HookPhase, HostErrorEvent, InterruptCommand, ListSessionsCommand, McpServer, MessageUuid, Model, PAIRING_HASH_PARAMETER, ParentToolUseId, PermissionBehavior, PermissionMode, PermissionRequestEvent, PermissionResolutionEvent, PermissionVerdictCommand, PromptCommand, RateLimitEvent, ResumeAtCommand, ResumeCommand, RewindFilesCommand, ServerMessage, ServerMessageType, SessionId, SessionInitEvent, SessionOpenedMessage, SessionResetMessage, SessionSettingsEvent, SessionState, SessionStateEvent, SessionSummary, SessionsMessage, SetModelCommand, SetPermissionModeCommand, SlashCommand, SlashCommandCommand, StreamDeltaEvent, SubagentEvent, SubagentStatus, TOKEN_QUERY_PARAMETER, ThinkingEvent, Todo, TodoStatus, TodoUpdateEvent, TokenUsage, ToolProgressEvent, ToolResultEvent, ToolUseEvent, TurnResultEvent, TurnUsageEvent, UnknownEvent, UserMessageEvent, agentEventSchema, agentEventTypeSchema, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, capabilitiesEventSchema, closeSessionCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createBaseAgentEventSchema, createBaseCommandSchema, createBaseServerMessageSchema, createSessionCommandSchema, eventsMessageSchema, fileRewindEventSchema, forkCommandSchema, hookEventSchema, hookPhaseSchema, hostErrorEventSchema, interruptCommandSchema, listSessionsCommandSchema, mcpServerSchema, messageUuidSchema, modelSchema, parentToolUseIdSchema, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, rateLimitEventSchema, resumeAtCommandSchema, resumeCommandSchema, rewindFilesCommandSchema, serverMessageSchema, serverMessageTypeSchema, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, slashCommandCommandSchema, slashCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, thinkingEventSchema, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, unknownEventSchema, userMessageEventSchema };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { A as compactionTriggerSchema, B as agentEventTypeSchema, C as AttachmentMediaType, D as HookPhase, E as subagentStatusSchema, F as PermissionBehavior, G as TOKEN_QUERY_PARAMETER, H as DEFAULT_HOSTNAME, I as permissionBehaviorSchema, L as SessionState, M as todoStatusSchema, N as PermissionMode, O as hookPhaseSchema, P as permissionModeSchema, R as sessionStateSchema, S as createBaseCommandSchema, T as SubagentStatus, U as DEFAULT_PORT, V as DEFAULT_APP_ORIGIN, W as PAIRING_HASH_PARAMETER, _ as createSessionCommandSchema, a as slashCommandCommandSchema, b as CommandType, c as rewindFilesCommandSchema, d as promptCommandSchema, f as attachmentSchema, g as forkCommandSchema, h as interruptCommandSchema, i as commandSchema, j as TodoStatus, k as CompactionTrigger, l as resumeCommandSchema, m as listSessionsCommandSchema, n as ServerMessageType, o as setPermissionModeCommandSchema, p as permissionVerdictCommandSchema, r as serverMessageTypeSchema, s as setModelCommandSchema, t as EphemeralAgentEventTypes, u as resumeAtCommandSchema, v as closeSessionCommandSchema, w as attachmentMediaTypeSchema, x as commandTypeSchema, y as sessionIdSchema, z as AgentEventType } from "./EphemeralAgentEventTypes-Cm5oNQXu.js";
|
|
2
|
+
import { A as hostErrorEventSchema, B as parentToolUseIdSchema, C as sessionStateEventSchema, D as rateLimitEventSchema, E as mcpServerSchema, F as commandOutputEventSchema, H as createBaseAgentEventSchema, I as capabilitiesEventSchema, L as slashCommandSchema, M as fileRewindEventSchema, N as contextUsageEventSchema, O as permissionResolutionEventSchema, P as compactionEventSchema, R as modelSchema, S as streamDeltaEventSchema, T as sessionInitEventSchema, V as messageUuidSchema, _ as toolProgressEventSchema, a as sessionOpenedMessageSchema, b as thinkingEventSchema, c as createBaseServerMessageSchema, d as unknownEventSchema, f as turnUsageEventSchema, g as toolResultEventSchema, h as toolUseEventSchema, i as sessionResetMessageSchema, j as hookEventSchema, k as permissionRequestEventSchema, l as agentEventSchema, m as tokenUsageSchema, n as sessionsMessageSchema, o as eventsMessageSchema, p as turnResultEventSchema, r as sessionSummarySchema, s as commandErrorMessageSchema, t as serverMessageSchema, u as userMessageEventSchema, v as todoUpdateEventSchema, w as sessionSettingsEventSchema, x as subagentEventSchema, y as todoSchema, z as assistantMessageEventSchema } from "./ServerMessage-Deh-bExC.js";
|
|
3
|
+
export { AgentEventType, AttachmentMediaType, CommandType, CompactionTrigger, DEFAULT_APP_ORIGIN, DEFAULT_HOSTNAME, DEFAULT_PORT, EphemeralAgentEventTypes, HookPhase, PAIRING_HASH_PARAMETER, PermissionBehavior, PermissionMode, ServerMessageType, SessionState, SubagentStatus, TOKEN_QUERY_PARAMETER, TodoStatus, agentEventSchema, agentEventTypeSchema, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, capabilitiesEventSchema, closeSessionCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createBaseAgentEventSchema, createBaseCommandSchema, createBaseServerMessageSchema, createSessionCommandSchema, eventsMessageSchema, fileRewindEventSchema, forkCommandSchema, hookEventSchema, hookPhaseSchema, hostErrorEventSchema, interruptCommandSchema, listSessionsCommandSchema, mcpServerSchema, messageUuidSchema, modelSchema, parentToolUseIdSchema, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, rateLimitEventSchema, resumeAtCommandSchema, resumeCommandSchema, rewindFilesCommandSchema, serverMessageSchema, serverMessageTypeSchema, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, slashCommandCommandSchema, slashCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, thinkingEventSchema, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, unknownEventSchema, userMessageEventSchema };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { $ as SubagentStatus, $t as SlashCommandCommand, A as unknownEventSchema, An as sessionIdSchema, At as compactionEventSchema, B as toolResultEventSchema, Bt as modelSchema, C as serverMessageTypeSchema, Cn as ForkCommand, Ct as HookPhase, D as UserMessageEvent, Dn as CloseSessionCommand, Dt as ContextUsageEvent, E as agentEventSchema, En as createSessionCommandSchema, Et as fileRewindEventSchema, F as TokenUsage, Fn as Attachment, Ft as CapabilitiesEvent, G as Todo, Gt as MessageUuid, H as toolProgressEventSchema, Ht as assistantMessageEventSchema, I as tokenUsageSchema, In as attachmentSchema, It as capabilitiesEventSchema, J as todoStatusSchema, Jt as createBaseAgentEventSchema, K as todoSchema, Kt as messageUuidSchema, L as ToolUseEvent, Ln as AttachmentMediaType, Lt as SlashCommand, M as turnUsageEventSchema, Mn as createBaseCommandSchema, Mt as compactionTriggerSchema, N as TurnResultEvent, Nn as CommandType, Nt as CommandOutputEvent, O as userMessageEventSchema, On as closeSessionCommandSchema, Ot as contextUsageEventSchema, P as turnResultEventSchema, Pn as commandTypeSchema, Pt as commandOutputEventSchema, Q as subagentEventSchema, Qt as commandSchema, R as toolUseEventSchema, Rn as attachmentMediaTypeSchema, Rt as slashCommandSchema, S as ServerMessageType, Sn as interruptCommandSchema, St as hookEventSchema, T as AgentEvent, Tn as CreateSessionCommand, Tt as FileRewindEvent, U as TodoUpdateEvent, Ut as ParentToolUseId, V as ToolProgressEvent, Vt as AssistantMessageEvent, W as todoUpdateEventSchema, Wt as parentToolUseIdSchema, X as thinkingEventSchema, Xt as agentEventTypeSchema, Y as ThinkingEvent, Yt as AgentEventType, Z as SubagentEvent, Zt as Command, _ as eventsMessageSchema, _n as PermissionBehavior, _t as PermissionRequestEvent, a as TOKEN_QUERY_PARAMETER, an as SetModelCommand, at as SessionState, b as BaseServerMessage, bn as listSessionsCommandSchema, bt as hostErrorEventSchema, c as SessionsMessage, cn as rewindFilesCommandSchema, ct as sessionSettingsEventSchema, d as sessionSummarySchema, dn as ResumeAtCommand, dt as McpServer, en as slashCommandCommandSchema, et as subagentStatusSchema, f as SessionResetMessage, fn as resumeAtCommandSchema, ft as mcpServerSchema, g as EventsMessage, gn as permissionVerdictCommandSchema, gt as permissionResolutionEventSchema, h as sessionOpenedMessageSchema, hn as PermissionVerdictCommand, ht as PermissionResolutionEvent, i as PAIRING_HASH_PARAMETER, in as permissionModeSchema, it as sessionStateEventSchema, j as TurnUsageEvent, jn as BaseCommand, jt as CompactionTrigger, k as UnknownEvent, kn as SessionId, kt as CompactionEvent, l as sessionsMessageSchema, ln as ResumeCommand, lt as SessionInitEvent, m as SessionOpenedMessage, mn as promptCommandSchema, mt as rateLimitEventSchema, n as DEFAULT_HOSTNAME, nn as setPermissionModeCommandSchema, nt as streamDeltaEventSchema, o as ServerMessage, on as setModelCommandSchema, ot as sessionStateSchema, p as sessionResetMessageSchema, pn as PromptCommand, pt as RateLimitEvent, q as TodoStatus, qt as BaseAgentEvent, r as DEFAULT_PORT, rn as PermissionMode, rt as SessionStateEvent, s as serverMessageSchema, sn as RewindFilesCommand, st as SessionSettingsEvent, t as DEFAULT_APP_ORIGIN, tn as SetPermissionModeCommand, tt as StreamDeltaEvent, u as SessionSummary, un as resumeCommandSchema, ut as sessionInitEventSchema, v as CommandErrorMessage, vn as permissionBehaviorSchema, vt as permissionRequestEventSchema, w as EphemeralAgentEventTypes, wn as forkCommandSchema, wt as hookPhaseSchema, x as createBaseServerMessageSchema, xn as InterruptCommand, xt as HookEvent, y as commandErrorMessageSchema, yn as ListSessionsCommand, yt as HostErrorEvent, z as ToolResultEvent, zt as Model } from "./constants-eNCfNezp.js";
|
|
2
|
+
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
|
+
import { IncomingMessage, ServerResponse } from "node:http";
|
|
5
|
+
//#region src/models/claudeAgentSdk/ContentBlock.d.ts
|
|
6
|
+
export type ContentBlock = DocumentBlock | ImageBlock | OtherBlock | TextBlock | ThinkingBlock | ToolResultBlock | ToolUseBlock;
|
|
7
|
+
interface DocumentBlock {
|
|
8
|
+
type: "document";
|
|
9
|
+
}
|
|
10
|
+
interface ImageBlock {
|
|
11
|
+
type: "image";
|
|
12
|
+
}
|
|
13
|
+
interface OtherBlock {
|
|
14
|
+
blockType: string;
|
|
15
|
+
raw: string;
|
|
16
|
+
type: "other";
|
|
17
|
+
}
|
|
18
|
+
interface TextBlock {
|
|
19
|
+
text: string;
|
|
20
|
+
type: "text";
|
|
21
|
+
}
|
|
22
|
+
interface ThinkingBlock {
|
|
23
|
+
thinking: string;
|
|
24
|
+
type: "thinking";
|
|
25
|
+
}
|
|
26
|
+
interface ToolResultBlock {
|
|
27
|
+
content: string | {
|
|
28
|
+
text?: string;
|
|
29
|
+
type: string;
|
|
30
|
+
}[];
|
|
31
|
+
is_error?: boolean;
|
|
32
|
+
tool_use_id: string;
|
|
33
|
+
type: "tool_result";
|
|
34
|
+
}
|
|
35
|
+
interface ToolUseBlock {
|
|
36
|
+
id: string;
|
|
37
|
+
input: Record<string, unknown>;
|
|
38
|
+
name: string;
|
|
39
|
+
type: "tool_use";
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/models/claudeAgentSdk/ContentMessage.d.ts
|
|
43
|
+
export interface ContentMessage {
|
|
44
|
+
body: unknown;
|
|
45
|
+
error: string;
|
|
46
|
+
messageType: Extract<SessionMessage["type"], "assistant" | "user">;
|
|
47
|
+
messageUuid: string;
|
|
48
|
+
parentToolUseId: string;
|
|
49
|
+
toolUseResult: unknown;
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/models/claudeAgentSdk/FileOriginTracker.d.ts
|
|
53
|
+
export interface FileOriginTracker {
|
|
54
|
+
readToolResult: (event: ToolResultEvent, toolUseResult: unknown) => ToolResultEvent;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/models/claudeAgentSdk/InputQueue.d.ts
|
|
58
|
+
export interface InputQueue<T> {
|
|
59
|
+
close: () => void;
|
|
60
|
+
iterable: AsyncIterable<T>;
|
|
61
|
+
push: (item: T) => void;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/models/claudeAgentSdk/MessageBody.d.ts
|
|
65
|
+
export interface MessageBody {
|
|
66
|
+
content: ContentBlock[] | string;
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/models/claudeAgentSdk/MessageContext.d.ts
|
|
70
|
+
export interface MessageContext extends MessageUuid, ParentToolUseId {
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/models/claudeAgentSdk/PendingPermission.d.ts
|
|
75
|
+
export interface PendingPermission {
|
|
76
|
+
settle: (behavior: PermissionBehavior, message: string) => void;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/models/claudeAgentSdk/SessionSettingsUpdate.d.ts
|
|
80
|
+
export interface SessionSettingsUpdate {
|
|
81
|
+
model?: string;
|
|
82
|
+
permissionMode?: string;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/models/claudeAgentSdk/SdkMessageMapper.d.ts
|
|
86
|
+
export interface SdkMessageMapper {
|
|
87
|
+
mapHistory: (message: SessionMessage, createdAt: Date, toolUseResult?: unknown) => AgentEvent[];
|
|
88
|
+
mapMessage: (message: SDKMessage, createdAt: Date) => AgentEvent[];
|
|
89
|
+
updateSettings: (id: string, createdAt: Date, update: SessionSettingsUpdate) => SessionSettingsEvent;
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/models/claudeAgentSdk/OpenSession.d.ts
|
|
93
|
+
export interface OpenSession {
|
|
94
|
+
cwd: string;
|
|
95
|
+
input: InputQueue<SDKUserMessage>;
|
|
96
|
+
lastActivityAt: Date;
|
|
97
|
+
mapper: SdkMessageMapper;
|
|
98
|
+
pendingPermissionMap: Map<string, PendingPermission>;
|
|
99
|
+
query: Query;
|
|
100
|
+
state: SessionState;
|
|
101
|
+
title: string;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/models/claudeAgentSdk/OpenSessionOptions.d.ts
|
|
105
|
+
export interface OpenSessionOptions {
|
|
106
|
+
cwd: string;
|
|
107
|
+
isFork: boolean;
|
|
108
|
+
resumeAt: string;
|
|
109
|
+
resumeFrom: string;
|
|
110
|
+
sessionId: string;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/models/driver/DriverCallbacks.d.ts
|
|
114
|
+
export interface DriverCallbacks {
|
|
115
|
+
onEvents: (sessionId: string, events: AgentEvent[]) => void;
|
|
116
|
+
onSessionOpen: (sessionId: string) => void;
|
|
117
|
+
onSessionsChange: () => void;
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/models/shared/TaskRegistry.d.ts
|
|
121
|
+
export interface TaskRegistry {
|
|
122
|
+
drain: () => Promise<void>;
|
|
123
|
+
run: (task: () => Promise<void>) => void;
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/models/claudeAgentSdk/SessionOpenerContext.d.ts
|
|
127
|
+
export interface SessionOpenerContext extends Pick<DriverCallbacks, "onSessionOpen" | "onSessionsChange"> {
|
|
128
|
+
emit: (sessionId: string, events: AgentEvent[]) => void;
|
|
129
|
+
openSessionMap: Map<string, OpenSession>;
|
|
130
|
+
taskRegistry: TaskRegistry;
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/models/claudeAgentSdk/StreamTracker.d.ts
|
|
134
|
+
export interface StreamTracker {
|
|
135
|
+
readStreamEvent: (message: SDKPartialAssistantMessage, createdAt: Date) => AgentEvent[];
|
|
136
|
+
readThinkingTokens: (message: SDKThinkingTokensMessage, createdAt: Date) => AgentEvent[];
|
|
137
|
+
reset: () => void;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/models/claudeAgentSdk/TodoToolName.d.ts
|
|
141
|
+
export declare enum TodoToolName {
|
|
142
|
+
TaskCreate = "TaskCreate",
|
|
143
|
+
TaskUpdate = "TaskUpdate",
|
|
144
|
+
TodoWrite = "TodoWrite"
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/models/claudeAgentSdk/TodoTracker.d.ts
|
|
148
|
+
export interface TodoTracker {
|
|
149
|
+
readToolResult: (event: ToolResultEvent, toolUseResult: unknown) => TodoUpdateEvent | undefined;
|
|
150
|
+
readToolUse: (event: ToolUseEvent) => TodoUpdateEvent | undefined;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/models/driver/Driver.d.ts
|
|
154
|
+
export interface Driver {
|
|
155
|
+
close: () => Promise<void>;
|
|
156
|
+
closeSession: (sessionId: string) => void;
|
|
157
|
+
createSession: (cwd: string) => Promise<string>;
|
|
158
|
+
forkSession: (sessionId: string, messageUuid: string) => Promise<string>;
|
|
159
|
+
interrupt: (sessionId: string) => Promise<void>;
|
|
160
|
+
listSessions: () => Promise<SessionSummary[]>;
|
|
161
|
+
prompt: (sessionId: string, text: string, attachments: Attachment[]) => void;
|
|
162
|
+
resolvePermission: (sessionId: string, requestId: string, behavior: PermissionBehavior, message: string) => void;
|
|
163
|
+
resumeAt: (sessionId: string, messageUuid: string) => Promise<string>;
|
|
164
|
+
resumeSession: (sessionId: string) => Promise<string>;
|
|
165
|
+
rewindFiles: (sessionId: string, messageUuid: string) => Promise<void>;
|
|
166
|
+
runSlashCommand: (sessionId: string, name: string, commandArguments: string) => void;
|
|
167
|
+
setModel: (sessionId: string, model: string) => Promise<void>;
|
|
168
|
+
setPermissionMode: (sessionId: string, permissionMode: PermissionMode) => Promise<void>;
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/models/server/AgentConsoleServer.d.ts
|
|
172
|
+
export interface AgentConsoleServer {
|
|
173
|
+
close: () => Promise<void>;
|
|
174
|
+
port: number;
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/models/server/AgentConsoleServerOptions.d.ts
|
|
178
|
+
export interface AgentConsoleServerOptions {
|
|
179
|
+
createDriver: (callbacks: DriverCallbacks) => Driver;
|
|
180
|
+
hostname: string;
|
|
181
|
+
port: number;
|
|
182
|
+
token: string;
|
|
183
|
+
}
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region src/models/server/EventLog.d.ts
|
|
186
|
+
export interface EventLog {
|
|
187
|
+
append: (sessionId: string, events: AgentEvent[]) => AgentEvent[];
|
|
188
|
+
entries: () => (readonly [string, AgentEvent[]])[];
|
|
189
|
+
reset: (sessionId: string) => void;
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/services/server/answerHttpRequest.d.ts
|
|
193
|
+
export declare const answerHttpRequest: ({ headers, method }: IncomingMessage, response: ServerResponse) => void;
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/services/server/checkIsTokenValid.d.ts
|
|
196
|
+
export declare const checkIsTokenValid: (candidate: string, token: string) => boolean;
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/services/server/constants.d.ts
|
|
199
|
+
export declare const HOST_NAME = "agent-console-server";
|
|
200
|
+
export declare const TOKEN_DIRECTORY_NAME = ".agent-console-server";
|
|
201
|
+
export declare const TOKEN_FILENAME = "token";
|
|
202
|
+
export declare const TOKEN_BYTE_LENGTH = 32;
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/services/server/createAgentConsoleServer.d.ts
|
|
205
|
+
export declare const createAgentConsoleServer: ({ createDriver, hostname, port, token }: AgentConsoleServerOptions) => Promise<AgentConsoleServer>;
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/services/server/createEventLog.d.ts
|
|
208
|
+
export declare const createEventLog: () => EventLog;
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/services/server/handleCommand.d.ts
|
|
211
|
+
export declare const handleCommand: (driver: Driver, command: Command) => Promise<string>;
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/services/server/readToken.d.ts
|
|
214
|
+
export declare const readToken: () => string;
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/services/server/sendServerMessage.d.ts
|
|
217
|
+
export declare const sendServerMessage: (webSocket: WebSocket, message: ServerMessage) => void;
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/services/shared/createTaskRegistry.d.ts
|
|
220
|
+
export declare const createTaskRegistry: () => TaskRegistry;
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/services/drivers/claudeAgentSdk/closeOpenSession.d.ts
|
|
223
|
+
export declare const closeOpenSession: (sessionId: string, openSession: OpenSession, message: string, { emit, onSessionsChange, openSessionMap }: Pick<SessionOpenerContext, "emit" | "onSessionsChange" | "openSessionMap">) => void;
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/services/drivers/claudeAgentSdk/constants.d.ts
|
|
226
|
+
export declare const IGNORED_SDK_MESSAGE_TYPES: string[];
|
|
227
|
+
export declare const DEFAULT_DENY_MESSAGE = "The user denied this tool call.";
|
|
228
|
+
export declare const SETTING_SOURCES: SettingSource[];
|
|
229
|
+
export declare const SESSION_LIST_LIMIT = 50;
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/services/drivers/claudeAgentSdk/createClaudeAgentSdkDriver.d.ts
|
|
232
|
+
export declare const createClaudeAgentSdkDriver: ({ onEvents, onSessionOpen, onSessionsChange }: DriverCallbacks) => Driver;
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/services/drivers/claudeAgentSdk/createFileOriginTracker.d.ts
|
|
235
|
+
export declare const createFileOriginTracker: () => FileOriginTracker;
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/services/drivers/claudeAgentSdk/createInputQueue.d.ts
|
|
238
|
+
export declare const createInputQueue: <T>() => InputQueue<T>;
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/services/drivers/claudeAgentSdk/createPermissionBridge.d.ts
|
|
241
|
+
export declare const createPermissionBridge: (sessionId: string, pendingPermissionMap: OpenSession["pendingPermissionMap"], emit: SessionOpenerContext["emit"]) => CanUseTool;
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region src/services/drivers/claudeAgentSdk/createSdkMessageMapper.d.ts
|
|
244
|
+
export declare const createSdkMessageMapper: () => SdkMessageMapper;
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/services/drivers/claudeAgentSdk/createSessionOpener.d.ts
|
|
247
|
+
export declare const createSessionOpener: ({ emit, onSessionOpen, onSessionsChange, openSessionMap, taskRegistry }: SessionOpenerContext) => ({ cwd, isFork, resumeAt, resumeFrom, sessionId }: OpenSessionOptions) => Promise<string>;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/services/drivers/claudeAgentSdk/createStreamTracker.d.ts
|
|
250
|
+
export declare const createStreamTracker: () => StreamTracker;
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/services/drivers/claudeAgentSdk/createTodoTracker.d.ts
|
|
253
|
+
export declare const createTodoTracker: () => TodoTracker;
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/services/drivers/claudeAgentSdk/getEventId.d.ts
|
|
256
|
+
export declare const getEventId: (sourceId: string, suffix: number | string) => string;
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/services/drivers/claudeAgentSdk/getSessionTitle.d.ts
|
|
259
|
+
export declare const getSessionTitle: ({ customTitle, firstPrompt, summary }: SDKSessionInfo) => string;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/services/drivers/claudeAgentSdk/mapAssistantContent.d.ts
|
|
262
|
+
export declare const mapAssistantContent: (content: ContentBlock[], context: MessageContext) => AgentEvent[];
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/services/drivers/claudeAgentSdk/mapHookMessage.d.ts
|
|
265
|
+
export declare const mapHookMessage: (message: SDKHookProgressMessage | SDKHookResponseMessage | SDKHookStartedMessage, createdAt: Date) => HookEvent;
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/services/drivers/claudeAgentSdk/mapSystemMessage.d.ts
|
|
268
|
+
export declare const mapSystemMessage: (message: Exclude<Extract<SDKMessage, {
|
|
269
|
+
type: "system";
|
|
270
|
+
}>, SDKStatusMessage | SDKSystemMessage | SDKThinkingTokensMessage>, createdAt: Date) => AgentEvent[];
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/services/drivers/claudeAgentSdk/mapTaskMessage.d.ts
|
|
273
|
+
export declare const mapTaskMessage: (message: SDKTaskNotificationMessage | SDKTaskProgressMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage, createdAt: Date) => SubagentEvent;
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region src/services/drivers/claudeAgentSdk/mapUserContent.d.ts
|
|
276
|
+
export declare const mapUserContent: (content: ContentBlock[] | string, context: MessageContext) => AgentEvent[];
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/services/drivers/claudeAgentSdk/parseMessageBody.d.ts
|
|
279
|
+
export declare const parseMessageBody: (value: unknown) => MessageBody | undefined;
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region src/services/drivers/claudeAgentSdk/readSessionCwd.d.ts
|
|
282
|
+
export declare const readSessionCwd: (sessionId: string) => Promise<string>;
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/services/drivers/claudeAgentSdk/readSessionHistory.d.ts
|
|
285
|
+
export declare const readSessionHistory: (sessionId: string, cwd: string, resumeAt: string) => Promise<SessionMessage[]>;
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region src/services/drivers/claudeAgentSdk/readToolUseResultMap.d.ts
|
|
288
|
+
export declare const readToolUseResultMap: (sessionId: string) => Promise<Map<string, unknown>>;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/services/drivers/claudeAgentSdk/toCapabilitiesEvent.d.ts
|
|
291
|
+
export declare const toCapabilitiesEvent: (id: string, slashCommands: SlashCommand$1[], models: ModelInfo[], createdAt: Date) => CapabilitiesEvent;
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region src/services/drivers/claudeAgentSdk/toContentBlockParam.d.ts
|
|
294
|
+
type ContentBlockParam = Exclude<SDKUserMessage["message"]["content"], string>[number];
|
|
295
|
+
export declare const toContentBlockParam: ({ data, mediaType, name }: Attachment) => ContentBlockParam;
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/services/drivers/claudeAgentSdk/toContextUsageEvent.d.ts
|
|
298
|
+
export declare const toContextUsageEvent: (id: string, { autoCompactThreshold, isAutoCompactEnabled, maxTokens, percentage, totalTokens }: Pick<SDKControlGetContextUsageResponse, "autoCompactThreshold" | "isAutoCompactEnabled" | "maxTokens" | "percentage" | "totalTokens">, createdAt: Date) => ContextUsageEvent;
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/services/drivers/claudeAgentSdk/toPermissionRequestEvent.d.ts
|
|
301
|
+
export declare const toPermissionRequestEvent: (toolName: string, input: Record<string, unknown>, options: Parameters<CanUseTool>[2], createdAt: Date) => PermissionRequestEvent;
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/services/drivers/claudeAgentSdk/toPermissionResult.d.ts
|
|
304
|
+
export declare const toPermissionResult: (input: Record<string, unknown>, suggestions: PermissionUpdate[], behavior: PermissionBehavior, message: string) => PermissionResult;
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/services/drivers/claudeAgentSdk/toSessionInitEvent.d.ts
|
|
307
|
+
export declare const toSessionInitEvent: (message: SDKSystemMessage, permissionMode: PermissionMode, createdAt: Date) => SessionInitEvent;
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/services/drivers/claudeAgentSdk/toToolResultText.d.ts
|
|
310
|
+
export declare const toToolResultText: (content: Extract<ContentBlock, {
|
|
311
|
+
type: "tool_result";
|
|
312
|
+
}>["content"]) => string;
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/services/drivers/claudeAgentSdk/toTurnResultEvents.d.ts
|
|
315
|
+
export declare const toTurnResultEvents: (message: SDKResultMessage, createdAt: Date) => AgentEvent[];
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region src/services/drivers/claudeAgentSdk/toUnknownEvent.d.ts
|
|
318
|
+
export declare const toUnknownEvent: (id: string, sdkType: string, raw: string, createdAt: Date) => UnknownEvent;
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/services/drivers/claudeAgentSdk/watchSession.d.ts
|
|
321
|
+
export declare const watchSession: (sessionId: string, openSession: OpenSession, { emit, onSessionsChange, openSessionMap }: Pick<SessionOpenerContext, "emit" | "onSessionsChange" | "openSessionMap">) => Promise<void>;
|
|
322
|
+
//#endregion
|
|
323
|
+
export { AgentEvent, AgentEventType, AssistantMessageEvent, Attachment, AttachmentMediaType, BaseAgentEvent, BaseCommand, BaseServerMessage, CapabilitiesEvent, CloseSessionCommand, Command, CommandErrorMessage, CommandOutputEvent, CommandType, CompactionEvent, CompactionTrigger, ContextUsageEvent, CreateSessionCommand, DEFAULT_APP_ORIGIN, DEFAULT_HOSTNAME, DEFAULT_PORT, EphemeralAgentEventTypes, EventsMessage, FileRewindEvent, ForkCommand, HookEvent, HookPhase, HostErrorEvent, InterruptCommand, ListSessionsCommand, McpServer, MessageUuid, Model, PAIRING_HASH_PARAMETER, ParentToolUseId, PermissionBehavior, PermissionMode, PermissionRequestEvent, PermissionResolutionEvent, PermissionVerdictCommand, PromptCommand, RateLimitEvent, ResumeAtCommand, ResumeCommand, RewindFilesCommand, ServerMessage, ServerMessageType, SessionId, SessionInitEvent, SessionOpenedMessage, SessionResetMessage, SessionSettingsEvent, SessionState, SessionStateEvent, SessionSummary, SessionsMessage, SetModelCommand, SetPermissionModeCommand, SlashCommand, SlashCommandCommand, StreamDeltaEvent, SubagentEvent, SubagentStatus, TOKEN_QUERY_PARAMETER, ThinkingEvent, Todo, TodoStatus, TodoUpdateEvent, TokenUsage, ToolProgressEvent, ToolResultEvent, ToolUseEvent, TurnResultEvent, TurnUsageEvent, UnknownEvent, UserMessageEvent, agentEventSchema, agentEventTypeSchema, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, capabilitiesEventSchema, closeSessionCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createBaseAgentEventSchema, createBaseCommandSchema, createBaseServerMessageSchema, createSessionCommandSchema, eventsMessageSchema, fileRewindEventSchema, forkCommandSchema, hookEventSchema, hookPhaseSchema, hostErrorEventSchema, interruptCommandSchema, listSessionsCommandSchema, mcpServerSchema, messageUuidSchema, modelSchema, parentToolUseIdSchema, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, rateLimitEventSchema, resumeAtCommandSchema, resumeCommandSchema, rewindFilesCommandSchema, serverMessageSchema, serverMessageTypeSchema, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, slashCommandCommandSchema, slashCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, thinkingEventSchema, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, unknownEventSchema, userMessageEventSchema };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { A as compactionTriggerSchema, B as agentEventTypeSchema, C as AttachmentMediaType, D as HookPhase, E as subagentStatusSchema, F as PermissionBehavior, G as TOKEN_QUERY_PARAMETER, H as DEFAULT_HOSTNAME, I as permissionBehaviorSchema, L as SessionState, M as todoStatusSchema, N as PermissionMode, O as hookPhaseSchema, P as permissionModeSchema, R as sessionStateSchema, S as createBaseCommandSchema, T as SubagentStatus, U as DEFAULT_PORT, V as DEFAULT_APP_ORIGIN, W as PAIRING_HASH_PARAMETER, _ as createSessionCommandSchema, a as slashCommandCommandSchema, b as CommandType, c as rewindFilesCommandSchema, d as promptCommandSchema, f as attachmentSchema, g as forkCommandSchema, h as interruptCommandSchema, i as commandSchema, j as TodoStatus, k as CompactionTrigger, l as resumeCommandSchema, m as listSessionsCommandSchema, n as ServerMessageType, o as setPermissionModeCommandSchema, p as permissionVerdictCommandSchema, r as serverMessageTypeSchema, s as setModelCommandSchema, t as EphemeralAgentEventTypes, u as resumeAtCommandSchema, v as closeSessionCommandSchema, w as attachmentMediaTypeSchema, x as commandTypeSchema, y as sessionIdSchema, z as AgentEventType } from "./EphemeralAgentEventTypes-Cm5oNQXu.js";
|
|
2
|
+
import { A as mapTaskMessage, B as toPermissionRequestEvent, C as createSdkMessageMapper, D as mapUserContent, E as parseMessageBody, F as TodoToolName, G as SETTING_SOURCES, H as DEFAULT_DENY_MESSAGE, I as createStreamTracker, K as closeOpenSession, L as createFileOriginTracker, M as mapAssistantContent, N as toUnknownEvent, O as toToolResultText, P as createTodoTracker, R as createPermissionBridge, S as readSessionHistory, T as toSessionInitEvent, U as IGNORED_SDK_MESSAGE_TYPES, V as createInputQueue, W as SESSION_LIST_LIMIT, _ as watchSession, a as createEventLog, b as getSessionTitle, c as HOST_NAME, d as TOKEN_FILENAME, f as createClaudeAgentSdkDriver, g as createSessionOpener, h as readSessionCwd, i as handleCommand, j as mapHookMessage, k as mapSystemMessage, l as TOKEN_BYTE_LENGTH, m as toContentBlockParam, n as createAgentConsoleServer, o as checkIsTokenValid, p as createTaskRegistry, q as getEventId, r as sendServerMessage, s as answerHttpRequest, t as readToken, u as TOKEN_DIRECTORY_NAME, v as toContextUsageEvent, w as toTurnResultEvents, x as readToolUseResultMap, y as toCapabilitiesEvent, z as toPermissionResult } from "./readToken-CAukYBGj.js";
|
|
3
|
+
import { A as hostErrorEventSchema, B as parentToolUseIdSchema, C as sessionStateEventSchema, D as rateLimitEventSchema, E as mcpServerSchema, F as commandOutputEventSchema, H as createBaseAgentEventSchema, I as capabilitiesEventSchema, L as slashCommandSchema, M as fileRewindEventSchema, N as contextUsageEventSchema, O as permissionResolutionEventSchema, P as compactionEventSchema, R as modelSchema, S as streamDeltaEventSchema, T as sessionInitEventSchema, V as messageUuidSchema, _ as toolProgressEventSchema, a as sessionOpenedMessageSchema, b as thinkingEventSchema, c as createBaseServerMessageSchema, d as unknownEventSchema, f as turnUsageEventSchema, g as toolResultEventSchema, h as toolUseEventSchema, i as sessionResetMessageSchema, j as hookEventSchema, k as permissionRequestEventSchema, l as agentEventSchema, m as tokenUsageSchema, n as sessionsMessageSchema, o as eventsMessageSchema, p as turnResultEventSchema, r as sessionSummarySchema, s as commandErrorMessageSchema, t as serverMessageSchema, u as userMessageEventSchema, v as todoUpdateEventSchema, w as sessionSettingsEventSchema, x as subagentEventSchema, y as todoSchema, z as assistantMessageEventSchema } from "./ServerMessage-Deh-bExC.js";
|
|
4
|
+
export { AgentEventType, AttachmentMediaType, CommandType, CompactionTrigger, DEFAULT_APP_ORIGIN, DEFAULT_DENY_MESSAGE, DEFAULT_HOSTNAME, DEFAULT_PORT, EphemeralAgentEventTypes, HOST_NAME, 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 };
|