@townco/ui 0.1.48 → 0.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/hooks/index.d.ts +1 -0
- package/dist/core/hooks/index.js +1 -0
- package/dist/core/hooks/use-chat-input.d.ts +2 -0
- package/dist/core/hooks/use-chat-input.js +11 -1
- package/dist/core/hooks/use-chat-messages.d.ts +22 -1
- package/dist/core/hooks/use-chat-messages.js +19 -4
- package/dist/core/hooks/use-chat-session.d.ts +1 -1
- package/dist/core/hooks/use-chat-session.js +22 -0
- package/dist/core/hooks/use-message-history.d.ts +12 -0
- package/dist/core/hooks/use-message-history.js +113 -0
- package/dist/core/hooks/use-tool-calls.d.ts +11 -0
- package/dist/core/schemas/chat.d.ts +40 -0
- package/dist/core/schemas/chat.js +9 -0
- package/dist/core/schemas/tool-call.d.ts +34 -0
- package/dist/core/schemas/tool-call.js +27 -0
- package/dist/core/store/chat-store.d.ts +5 -0
- package/dist/core/store/chat-store.js +46 -0
- package/dist/gui/components/ChatEmptyState.d.ts +4 -0
- package/dist/gui/components/ChatEmptyState.js +2 -2
- package/dist/gui/components/ChatInput.d.ts +21 -1
- package/dist/gui/components/ChatInput.js +184 -7
- package/dist/gui/components/ChatLayout.d.ts +3 -2
- package/dist/gui/components/ChatLayout.js +7 -7
- package/dist/gui/components/ChatPanelTabContent.d.ts +17 -0
- package/dist/gui/components/ChatPanelTabContent.js +6 -5
- package/dist/gui/components/ChatView.d.ts +3 -1
- package/dist/gui/components/ChatView.js +81 -49
- package/dist/gui/components/InvokingGroup.d.ts +9 -0
- package/dist/gui/components/InvokingGroup.js +16 -0
- package/dist/gui/components/MessageContent.js +122 -6
- package/dist/gui/components/PanelTabsHeader.d.ts +1 -1
- package/dist/gui/components/PanelTabsHeader.js +6 -1
- package/dist/gui/components/Response.js +2 -0
- package/dist/gui/components/Task.js +3 -3
- package/dist/gui/components/TodoListItem.js +1 -1
- package/dist/gui/components/ToolCall.js +57 -5
- package/dist/gui/components/ToolCallGroup.d.ts +8 -0
- package/dist/gui/components/ToolCallGroup.js +29 -0
- package/dist/gui/components/index.d.ts +1 -2
- package/dist/gui/components/index.js +1 -2
- package/dist/sdk/client/acp-client.d.ts +24 -1
- package/dist/sdk/client/acp-client.js +28 -7
- package/dist/sdk/schemas/message.d.ts +41 -9
- package/dist/sdk/schemas/message.js +15 -3
- package/dist/sdk/schemas/session.d.ts +81 -16
- package/dist/sdk/transports/http.d.ts +14 -0
- package/dist/sdk/transports/http.js +130 -36
- package/dist/sdk/transports/stdio.d.ts +14 -0
- package/dist/sdk/transports/stdio.js +27 -10
- package/dist/sdk/transports/types.d.ts +29 -0
- package/package.json +7 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown, ListVideo } from "lucide-react";
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import { ToolCall } from "./ToolCall.js";
|
|
5
|
+
/**
|
|
6
|
+
* ToolCallGroup component - displays a group of parallel tool calls with collapsible details
|
|
7
|
+
*/
|
|
8
|
+
export function ToolCallGroup({ toolCalls }) {
|
|
9
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
10
|
+
// Calculate group status based on individual tool call statuses
|
|
11
|
+
const getGroupStatus = () => {
|
|
12
|
+
const statuses = toolCalls.map((tc) => tc.status);
|
|
13
|
+
if (statuses.some((s) => s === "failed"))
|
|
14
|
+
return "failed";
|
|
15
|
+
if (statuses.some((s) => s === "in_progress"))
|
|
16
|
+
return "in_progress";
|
|
17
|
+
if (statuses.every((s) => s === "completed"))
|
|
18
|
+
return "completed";
|
|
19
|
+
return "pending";
|
|
20
|
+
};
|
|
21
|
+
const groupStatus = getGroupStatus();
|
|
22
|
+
// Generate summary of tool names
|
|
23
|
+
const toolNames = toolCalls.map((tc) => tc.prettyName || tc.title);
|
|
24
|
+
const uniqueNames = [...new Set(toolNames)];
|
|
25
|
+
const summary = uniqueNames.length <= 2
|
|
26
|
+
? uniqueNames.join(", ")
|
|
27
|
+
: `${uniqueNames.slice(0, 2).join(", ")} +${uniqueNames.length - 2} more`;
|
|
28
|
+
return (_jsxs("div", { className: "flex flex-col my-4", children: [_jsxs("button", { type: "button", className: "flex flex-col items-start gap-0.5 cursor-pointer bg-transparent border-none p-0 text-left group w-fit", onClick: () => setIsExpanded(!isExpanded), "aria-expanded": isExpanded, children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground", children: [_jsx("div", { className: "text-muted-foreground", children: _jsx(ListVideo, { className: "h-3 w-3" }) }), _jsx("span", { className: "text-paragraph-sm text-muted-foreground", children: "Parallel operation" }), _jsx("span", { className: "text-[10px] bg-muted px-1.5 py-0.5 rounded text-muted-foreground/70", children: toolCalls.length }), _jsx(ChevronDown, { className: `h-3 w-3 text-muted-foreground/70 transition-transform duration-200 ${isExpanded ? "rotate-180" : ""}` })] }), !isExpanded && (_jsx("span", { className: "text-paragraph-sm text-muted-foreground/70 pl-4.5", children: summary }))] }), isExpanded && (_jsx("div", { className: "mt-1", children: toolCalls.map((toolCall) => (_jsxs("div", { className: "flex items-start", children: [_jsx("div", { className: "w-2.5 h-4 border-l-2 border-b-2 border-border rounded-bl-[6px] mt-1 mr-0.5 shrink-0" }), _jsx("div", { className: "flex-1 -mt-2", children: _jsx(ToolCall, { toolCall: toolCall }) })] }, toolCall.id))) }))] }));
|
|
29
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { toast } from "sonner";
|
|
2
2
|
export { MockFileSystemProvider, mockFileSystemData, } from "../data/mockFileSystemData.js";
|
|
3
3
|
export { mockSourceData } from "../data/mockSourceData.js";
|
|
4
|
-
export { mockTodoData } from "../data/mockTodoData.js";
|
|
5
4
|
export type { FileSystemData, FileSystemItem as FileSystemItemData, FileSystemItemType, FileSystemProvider, } from "../types/filesystem.js";
|
|
6
5
|
export { Button, type ButtonProps, buttonVariants } from "./Button.js";
|
|
7
6
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./Card.js";
|
|
@@ -10,7 +9,7 @@ export type { ConnectionStatus } from "./ChatHeader.js";
|
|
|
10
9
|
export * as ChatHeader from "./ChatHeader.js";
|
|
11
10
|
export { Actions as ChatInputActions, Attachment as ChatInputAttachment, type ChatInputActionsProps, type ChatInputAttachmentProps, type ChatInputCommandMenuProps, type ChatInputFieldProps, type ChatInputRootProps, type ChatInputSubmitProps, type ChatInputToolbarProps, type ChatInputVoiceInputProps, CommandMenu as ChatInputCommandMenu, type CommandMenuItem, Field as ChatInputField, Root as ChatInputRoot, Submit as ChatInputSubmit, Toolbar as ChatInputToolbar, VoiceInput as ChatInputVoiceInput, } from "./ChatInput.js";
|
|
12
11
|
export * as ChatLayout from "./ChatLayout.js";
|
|
13
|
-
export { DatabaseTabContent, type DatabaseTabContentProps, FilesTabContent, type FilesTabContentProps, SourcesTabContent, type SourcesTabContentProps, TodoTabContent, type TodoTabContentProps, } from "./ChatPanelTabContent.js";
|
|
12
|
+
export { DatabaseTabContent, type DatabaseTabContentProps, FilesTabContent, type FilesTabContentProps, SettingsTabContent, type SettingsTabContentProps, SourcesTabContent, type SourcesTabContentProps, TodoTabContent, type TodoTabContentProps, } from "./ChatPanelTabContent.js";
|
|
14
13
|
export { ChatSecondaryPanel, type ChatSecondaryPanelProps, } from "./ChatSecondaryPanel.js";
|
|
15
14
|
export * as ChatSidebar from "./ChatSidebar.js";
|
|
16
15
|
export { ChatStatus, type ChatStatusProps } from "./ChatStatus.js";
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
export { toast } from "sonner";
|
|
3
3
|
export { MockFileSystemProvider, mockFileSystemData, } from "../data/mockFileSystemData.js";
|
|
4
4
|
export { mockSourceData } from "../data/mockSourceData.js";
|
|
5
|
-
export { mockTodoData } from "../data/mockTodoData.js";
|
|
6
5
|
export { Button, buttonVariants } from "./Button.js";
|
|
7
6
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./Card.js";
|
|
8
7
|
export { ChatEmptyState } from "./ChatEmptyState.js";
|
|
@@ -11,7 +10,7 @@ export * as ChatHeader from "./ChatHeader.js";
|
|
|
11
10
|
export { Actions as ChatInputActions, Attachment as ChatInputAttachment, CommandMenu as ChatInputCommandMenu, Field as ChatInputField, Root as ChatInputRoot, Submit as ChatInputSubmit, Toolbar as ChatInputToolbar, VoiceInput as ChatInputVoiceInput, } from "./ChatInput.js";
|
|
12
11
|
// Chat layout components
|
|
13
12
|
export * as ChatLayout from "./ChatLayout.js";
|
|
14
|
-
export { DatabaseTabContent, FilesTabContent, SourcesTabContent, TodoTabContent, } from "./ChatPanelTabContent.js";
|
|
13
|
+
export { DatabaseTabContent, FilesTabContent, SettingsTabContent, SourcesTabContent, TodoTabContent, } from "./ChatPanelTabContent.js";
|
|
15
14
|
export { ChatSecondaryPanel, } from "./ChatSecondaryPanel.js";
|
|
16
15
|
export * as ChatSidebar from "./ChatSidebar.js";
|
|
17
16
|
export { ChatStatus } from "./ChatStatus.js";
|
|
@@ -51,7 +51,13 @@ export declare class AcpClient {
|
|
|
51
51
|
/**
|
|
52
52
|
* Send a message in the current session
|
|
53
53
|
*/
|
|
54
|
-
sendMessage(content: string, sessionId?: string
|
|
54
|
+
sendMessage(content: string, sessionId?: string, attachments?: Array<{
|
|
55
|
+
name: string;
|
|
56
|
+
path: string;
|
|
57
|
+
size: number;
|
|
58
|
+
mimeType: string;
|
|
59
|
+
data: string;
|
|
60
|
+
}>): Promise<void>;
|
|
55
61
|
/**
|
|
56
62
|
* Receive messages from the agent (streaming)
|
|
57
63
|
*/
|
|
@@ -80,6 +86,9 @@ export declare class AcpClient {
|
|
|
80
86
|
* Get agent information
|
|
81
87
|
* - displayName: Human-readable name for UI (preferred)
|
|
82
88
|
* - name: Programmatic name (fallback if displayName not set)
|
|
89
|
+
* - tools: List of tools available to the agent
|
|
90
|
+
* - mcps: List of MCP servers connected to the agent
|
|
91
|
+
* - subagents: List of subagents available via Task tool
|
|
83
92
|
*/
|
|
84
93
|
getAgentInfo(): {
|
|
85
94
|
name?: string;
|
|
@@ -87,6 +96,20 @@ export declare class AcpClient {
|
|
|
87
96
|
version?: string;
|
|
88
97
|
description?: string;
|
|
89
98
|
suggestedPrompts?: string[];
|
|
99
|
+
tools?: Array<{
|
|
100
|
+
name: string;
|
|
101
|
+
description?: string;
|
|
102
|
+
prettyName?: string;
|
|
103
|
+
icon?: string;
|
|
104
|
+
}>;
|
|
105
|
+
mcps?: Array<{
|
|
106
|
+
name: string;
|
|
107
|
+
transport: string;
|
|
108
|
+
}>;
|
|
109
|
+
subagents?: Array<{
|
|
110
|
+
name: string;
|
|
111
|
+
description: string;
|
|
112
|
+
}>;
|
|
90
113
|
};
|
|
91
114
|
/**
|
|
92
115
|
* Create transport based on explicit configuration
|
|
@@ -134,7 +134,7 @@ export class AcpClient {
|
|
|
134
134
|
/**
|
|
135
135
|
* Send a message in the current session
|
|
136
136
|
*/
|
|
137
|
-
async sendMessage(content, sessionId) {
|
|
137
|
+
async sendMessage(content, sessionId, attachments) {
|
|
138
138
|
const targetSessionId = sessionId || this.currentSessionId;
|
|
139
139
|
if (!targetSessionId) {
|
|
140
140
|
throw new Error("No active session. Start a session first.");
|
|
@@ -146,16 +146,34 @@ export class AcpClient {
|
|
|
146
146
|
if (!session) {
|
|
147
147
|
throw new Error(`Session ${targetSessionId} not found`);
|
|
148
148
|
}
|
|
149
|
+
// Create content blocks (images first, then text)
|
|
150
|
+
const contentBlocks = [];
|
|
151
|
+
// Add image attachments
|
|
152
|
+
if (attachments && attachments.length > 0) {
|
|
153
|
+
for (const attachment of attachments) {
|
|
154
|
+
// Only process image attachments
|
|
155
|
+
if (attachment.mimeType.startsWith("image/")) {
|
|
156
|
+
contentBlocks.push({
|
|
157
|
+
type: "image",
|
|
158
|
+
source: {
|
|
159
|
+
type: "base64",
|
|
160
|
+
media_type: attachment.mimeType,
|
|
161
|
+
data: attachment.data,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// Add text content
|
|
168
|
+
contentBlocks.push({
|
|
169
|
+
type: "text",
|
|
170
|
+
text: content,
|
|
171
|
+
});
|
|
149
172
|
// Create message
|
|
150
173
|
const message = {
|
|
151
174
|
id: this.generateMessageId(),
|
|
152
175
|
role: "user",
|
|
153
|
-
content:
|
|
154
|
-
{
|
|
155
|
-
type: "text",
|
|
156
|
-
text: content,
|
|
157
|
-
},
|
|
158
|
-
],
|
|
176
|
+
content: contentBlocks,
|
|
159
177
|
timestamp: new Date().toISOString(),
|
|
160
178
|
};
|
|
161
179
|
// Add to session
|
|
@@ -215,6 +233,9 @@ export class AcpClient {
|
|
|
215
233
|
* Get agent information
|
|
216
234
|
* - displayName: Human-readable name for UI (preferred)
|
|
217
235
|
* - name: Programmatic name (fallback if displayName not set)
|
|
236
|
+
* - tools: List of tools available to the agent
|
|
237
|
+
* - mcps: List of MCP servers connected to the agent
|
|
238
|
+
* - subagents: List of subagents available via Task tool
|
|
218
239
|
*/
|
|
219
240
|
getAgentInfo() {
|
|
220
241
|
return this.transport.getAgentInfo?.() || {};
|
|
@@ -41,13 +41,21 @@ export declare const TextContent: z.ZodObject<{
|
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
export type TextContent = z.infer<typeof TextContent>;
|
|
43
43
|
/**
|
|
44
|
-
* Image content
|
|
44
|
+
* Image content (supports both URLs and base64 data, matching Claude's API format)
|
|
45
45
|
*/
|
|
46
46
|
export declare const ImageContent: z.ZodObject<{
|
|
47
47
|
type: z.ZodLiteral<"image">;
|
|
48
48
|
url: z.ZodOptional<z.ZodString>;
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"base64">;
|
|
51
|
+
media_type: z.ZodEnum<{
|
|
52
|
+
"image/jpeg": "image/jpeg";
|
|
53
|
+
"image/png": "image/png";
|
|
54
|
+
"image/gif": "image/gif";
|
|
55
|
+
"image/webp": "image/webp";
|
|
56
|
+
}>;
|
|
57
|
+
data: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>;
|
|
51
59
|
}, z.core.$strip>;
|
|
52
60
|
export type ImageContent = z.infer<typeof ImageContent>;
|
|
53
61
|
/**
|
|
@@ -91,8 +99,16 @@ export declare const Content: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
91
99
|
}, z.core.$strip>, z.ZodObject<{
|
|
92
100
|
type: z.ZodLiteral<"image">;
|
|
93
101
|
url: z.ZodOptional<z.ZodString>;
|
|
94
|
-
|
|
95
|
-
|
|
102
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<"base64">;
|
|
104
|
+
media_type: z.ZodEnum<{
|
|
105
|
+
"image/jpeg": "image/jpeg";
|
|
106
|
+
"image/png": "image/png";
|
|
107
|
+
"image/gif": "image/gif";
|
|
108
|
+
"image/webp": "image/webp";
|
|
109
|
+
}>;
|
|
110
|
+
data: z.ZodString;
|
|
111
|
+
}, z.core.$strip>>;
|
|
96
112
|
}, z.core.$strip>, z.ZodObject<{
|
|
97
113
|
type: z.ZodLiteral<"file">;
|
|
98
114
|
name: z.ZodString;
|
|
@@ -129,8 +145,16 @@ export declare const Message: z.ZodObject<{
|
|
|
129
145
|
}, z.core.$strip>, z.ZodObject<{
|
|
130
146
|
type: z.ZodLiteral<"image">;
|
|
131
147
|
url: z.ZodOptional<z.ZodString>;
|
|
132
|
-
|
|
133
|
-
|
|
148
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
type: z.ZodLiteral<"base64">;
|
|
150
|
+
media_type: z.ZodEnum<{
|
|
151
|
+
"image/jpeg": "image/jpeg";
|
|
152
|
+
"image/png": "image/png";
|
|
153
|
+
"image/gif": "image/gif";
|
|
154
|
+
"image/webp": "image/webp";
|
|
155
|
+
}>;
|
|
156
|
+
data: z.ZodString;
|
|
157
|
+
}, z.core.$strip>>;
|
|
134
158
|
}, z.core.$strip>, z.ZodObject<{
|
|
135
159
|
type: z.ZodLiteral<"file">;
|
|
136
160
|
name: z.ZodString;
|
|
@@ -170,8 +194,16 @@ export declare const MessageChunk: z.ZodObject<{
|
|
|
170
194
|
}, z.core.$strip>, z.ZodObject<{
|
|
171
195
|
type: z.ZodLiteral<"image">;
|
|
172
196
|
url: z.ZodOptional<z.ZodString>;
|
|
173
|
-
|
|
174
|
-
|
|
197
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
type: z.ZodLiteral<"base64">;
|
|
199
|
+
media_type: z.ZodEnum<{
|
|
200
|
+
"image/jpeg": "image/jpeg";
|
|
201
|
+
"image/png": "image/png";
|
|
202
|
+
"image/gif": "image/gif";
|
|
203
|
+
"image/webp": "image/webp";
|
|
204
|
+
}>;
|
|
205
|
+
data: z.ZodString;
|
|
206
|
+
}, z.core.$strip>>;
|
|
175
207
|
}, z.core.$strip>, z.ZodObject<{
|
|
176
208
|
type: z.ZodLiteral<"file">;
|
|
177
209
|
name: z.ZodString;
|
|
@@ -27,13 +27,25 @@ export const TextContent = BaseContent.extend({
|
|
|
27
27
|
text: z.string(),
|
|
28
28
|
});
|
|
29
29
|
/**
|
|
30
|
-
* Image content
|
|
30
|
+
* Image content (supports both URLs and base64 data, matching Claude's API format)
|
|
31
31
|
*/
|
|
32
32
|
export const ImageContent = BaseContent.extend({
|
|
33
33
|
type: z.literal("image"),
|
|
34
|
+
// URL format
|
|
34
35
|
url: z.string().url().optional(),
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
// Base64 format (Claude API format)
|
|
37
|
+
source: z
|
|
38
|
+
.object({
|
|
39
|
+
type: z.literal("base64"),
|
|
40
|
+
media_type: z.enum([
|
|
41
|
+
"image/jpeg",
|
|
42
|
+
"image/png",
|
|
43
|
+
"image/gif",
|
|
44
|
+
"image/webp",
|
|
45
|
+
]),
|
|
46
|
+
data: z.string(),
|
|
47
|
+
})
|
|
48
|
+
.optional(),
|
|
37
49
|
});
|
|
38
50
|
/**
|
|
39
51
|
* File attachment content
|
|
@@ -3,12 +3,12 @@ import { z } from "zod";
|
|
|
3
3
|
* Session status
|
|
4
4
|
*/
|
|
5
5
|
export declare const SessionStatus: z.ZodEnum<{
|
|
6
|
+
error: "error";
|
|
6
7
|
idle: "idle";
|
|
7
8
|
connecting: "connecting";
|
|
8
9
|
connected: "connected";
|
|
9
10
|
active: "active";
|
|
10
11
|
streaming: "streaming";
|
|
11
|
-
error: "error";
|
|
12
12
|
disconnected: "disconnected";
|
|
13
13
|
}>;
|
|
14
14
|
export type SessionStatus = z.infer<typeof SessionStatus>;
|
|
@@ -40,12 +40,12 @@ export type SessionMetadata = z.infer<typeof SessionMetadata>;
|
|
|
40
40
|
export declare const Session: z.ZodObject<{
|
|
41
41
|
id: z.ZodString;
|
|
42
42
|
status: z.ZodEnum<{
|
|
43
|
+
error: "error";
|
|
43
44
|
idle: "idle";
|
|
44
45
|
connecting: "connecting";
|
|
45
46
|
connected: "connected";
|
|
46
47
|
active: "active";
|
|
47
48
|
streaming: "streaming";
|
|
48
|
-
error: "error";
|
|
49
49
|
disconnected: "disconnected";
|
|
50
50
|
}>;
|
|
51
51
|
config: z.ZodObject<{
|
|
@@ -76,8 +76,16 @@ export declare const Session: z.ZodObject<{
|
|
|
76
76
|
}, z.core.$strip>, z.ZodObject<{
|
|
77
77
|
type: z.ZodLiteral<"image">;
|
|
78
78
|
url: z.ZodOptional<z.ZodString>;
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"base64">;
|
|
81
|
+
media_type: z.ZodEnum<{
|
|
82
|
+
"image/jpeg": "image/jpeg";
|
|
83
|
+
"image/png": "image/png";
|
|
84
|
+
"image/gif": "image/gif";
|
|
85
|
+
"image/webp": "image/webp";
|
|
86
|
+
}>;
|
|
87
|
+
data: z.ZodString;
|
|
88
|
+
}, z.core.$strip>>;
|
|
81
89
|
}, z.core.$strip>, z.ZodObject<{
|
|
82
90
|
type: z.ZodLiteral<"file">;
|
|
83
91
|
name: z.ZodString;
|
|
@@ -108,12 +116,12 @@ export type Session = z.infer<typeof Session>;
|
|
|
108
116
|
export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
109
117
|
sessionId: z.ZodString;
|
|
110
118
|
status: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
error: "error";
|
|
111
120
|
idle: "idle";
|
|
112
121
|
connecting: "connecting";
|
|
113
122
|
connected: "connected";
|
|
114
123
|
active: "active";
|
|
115
124
|
streaming: "streaming";
|
|
116
|
-
error: "error";
|
|
117
125
|
disconnected: "disconnected";
|
|
118
126
|
}>>;
|
|
119
127
|
message: z.ZodOptional<z.ZodObject<{
|
|
@@ -130,8 +138,16 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
130
138
|
}, z.core.$strip>, z.ZodObject<{
|
|
131
139
|
type: z.ZodLiteral<"image">;
|
|
132
140
|
url: z.ZodOptional<z.ZodString>;
|
|
133
|
-
|
|
134
|
-
|
|
141
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
type: z.ZodLiteral<"base64">;
|
|
143
|
+
media_type: z.ZodEnum<{
|
|
144
|
+
"image/jpeg": "image/jpeg";
|
|
145
|
+
"image/png": "image/png";
|
|
146
|
+
"image/gif": "image/gif";
|
|
147
|
+
"image/webp": "image/webp";
|
|
148
|
+
}>;
|
|
149
|
+
data: z.ZodString;
|
|
150
|
+
}, z.core.$strip>>;
|
|
135
151
|
}, z.core.$strip>, z.ZodObject<{
|
|
136
152
|
type: z.ZodLiteral<"file">;
|
|
137
153
|
name: z.ZodString;
|
|
@@ -158,9 +174,11 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
158
174
|
type: z.ZodLiteral<"tool_call">;
|
|
159
175
|
toolCall: z.ZodObject<{
|
|
160
176
|
id: z.ZodString;
|
|
177
|
+
batchId: z.ZodOptional<z.ZodString>;
|
|
161
178
|
title: z.ZodString;
|
|
162
179
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
163
180
|
icon: z.ZodOptional<z.ZodString>;
|
|
181
|
+
subline: z.ZodOptional<z.ZodString>;
|
|
164
182
|
kind: z.ZodEnum<{
|
|
165
183
|
read: "read";
|
|
166
184
|
edit: "edit";
|
|
@@ -195,6 +213,15 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
195
213
|
}, z.core.$strip>, z.ZodObject<{
|
|
196
214
|
type: z.ZodLiteral<"text">;
|
|
197
215
|
text: z.ZodString;
|
|
216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
217
|
+
type: z.ZodLiteral<"image">;
|
|
218
|
+
data: z.ZodString;
|
|
219
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
220
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
type: z.ZodLiteral<"image">;
|
|
223
|
+
url: z.ZodString;
|
|
224
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
198
225
|
}, z.core.$strip>, z.ZodObject<{
|
|
199
226
|
type: z.ZodLiteral<"diff">;
|
|
200
227
|
path: z.ZodString;
|
|
@@ -227,12 +254,12 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
227
254
|
}, z.core.$strip>, z.ZodObject<{
|
|
228
255
|
sessionId: z.ZodString;
|
|
229
256
|
status: z.ZodOptional<z.ZodEnum<{
|
|
257
|
+
error: "error";
|
|
230
258
|
idle: "idle";
|
|
231
259
|
connecting: "connecting";
|
|
232
260
|
connected: "connected";
|
|
233
261
|
active: "active";
|
|
234
262
|
streaming: "streaming";
|
|
235
|
-
error: "error";
|
|
236
263
|
disconnected: "disconnected";
|
|
237
264
|
}>>;
|
|
238
265
|
message: z.ZodOptional<z.ZodObject<{
|
|
@@ -249,8 +276,16 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
249
276
|
}, z.core.$strip>, z.ZodObject<{
|
|
250
277
|
type: z.ZodLiteral<"image">;
|
|
251
278
|
url: z.ZodOptional<z.ZodString>;
|
|
252
|
-
|
|
253
|
-
|
|
279
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
280
|
+
type: z.ZodLiteral<"base64">;
|
|
281
|
+
media_type: z.ZodEnum<{
|
|
282
|
+
"image/jpeg": "image/jpeg";
|
|
283
|
+
"image/png": "image/png";
|
|
284
|
+
"image/gif": "image/gif";
|
|
285
|
+
"image/webp": "image/webp";
|
|
286
|
+
}>;
|
|
287
|
+
data: z.ZodString;
|
|
288
|
+
}, z.core.$strip>>;
|
|
254
289
|
}, z.core.$strip>, z.ZodObject<{
|
|
255
290
|
type: z.ZodLiteral<"file">;
|
|
256
291
|
name: z.ZodString;
|
|
@@ -283,6 +318,11 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
283
318
|
completed: "completed";
|
|
284
319
|
failed: "failed";
|
|
285
320
|
}>>;
|
|
321
|
+
title: z.ZodOptional<z.ZodString>;
|
|
322
|
+
prettyName: z.ZodOptional<z.ZodString>;
|
|
323
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
324
|
+
batchId: z.ZodOptional<z.ZodString>;
|
|
325
|
+
rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
286
326
|
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
327
|
path: z.ZodString;
|
|
288
328
|
line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -297,6 +337,15 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
297
337
|
}, z.core.$strip>, z.ZodObject<{
|
|
298
338
|
type: z.ZodLiteral<"text">;
|
|
299
339
|
text: z.ZodString;
|
|
340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
341
|
+
type: z.ZodLiteral<"image">;
|
|
342
|
+
data: z.ZodString;
|
|
343
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
344
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
345
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
346
|
+
type: z.ZodLiteral<"image">;
|
|
347
|
+
url: z.ZodString;
|
|
348
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
300
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
301
350
|
type: z.ZodLiteral<"diff">;
|
|
302
351
|
path: z.ZodString;
|
|
@@ -319,12 +368,12 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
319
368
|
}, z.core.$strip>, z.ZodObject<{
|
|
320
369
|
sessionId: z.ZodString;
|
|
321
370
|
status: z.ZodOptional<z.ZodEnum<{
|
|
371
|
+
error: "error";
|
|
322
372
|
idle: "idle";
|
|
323
373
|
connecting: "connecting";
|
|
324
374
|
connected: "connected";
|
|
325
375
|
active: "active";
|
|
326
376
|
streaming: "streaming";
|
|
327
|
-
error: "error";
|
|
328
377
|
disconnected: "disconnected";
|
|
329
378
|
}>>;
|
|
330
379
|
message: z.ZodOptional<z.ZodObject<{
|
|
@@ -341,8 +390,16 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
341
390
|
}, z.core.$strip>, z.ZodObject<{
|
|
342
391
|
type: z.ZodLiteral<"image">;
|
|
343
392
|
url: z.ZodOptional<z.ZodString>;
|
|
344
|
-
|
|
345
|
-
|
|
393
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
type: z.ZodLiteral<"base64">;
|
|
395
|
+
media_type: z.ZodEnum<{
|
|
396
|
+
"image/jpeg": "image/jpeg";
|
|
397
|
+
"image/png": "image/png";
|
|
398
|
+
"image/gif": "image/gif";
|
|
399
|
+
"image/webp": "image/webp";
|
|
400
|
+
}>;
|
|
401
|
+
data: z.ZodString;
|
|
402
|
+
}, z.core.$strip>>;
|
|
346
403
|
}, z.core.$strip>, z.ZodObject<{
|
|
347
404
|
type: z.ZodLiteral<"file">;
|
|
348
405
|
name: z.ZodString;
|
|
@@ -376,12 +433,12 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
376
433
|
}, z.core.$strip>, z.ZodObject<{
|
|
377
434
|
sessionId: z.ZodString;
|
|
378
435
|
status: z.ZodOptional<z.ZodEnum<{
|
|
436
|
+
error: "error";
|
|
379
437
|
idle: "idle";
|
|
380
438
|
connecting: "connecting";
|
|
381
439
|
connected: "connected";
|
|
382
440
|
active: "active";
|
|
383
441
|
streaming: "streaming";
|
|
384
|
-
error: "error";
|
|
385
442
|
disconnected: "disconnected";
|
|
386
443
|
}>>;
|
|
387
444
|
message: z.ZodOptional<z.ZodObject<{
|
|
@@ -398,8 +455,16 @@ export declare const SessionUpdate: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
398
455
|
}, z.core.$strip>, z.ZodObject<{
|
|
399
456
|
type: z.ZodLiteral<"image">;
|
|
400
457
|
url: z.ZodOptional<z.ZodString>;
|
|
401
|
-
|
|
402
|
-
|
|
458
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
459
|
+
type: z.ZodLiteral<"base64">;
|
|
460
|
+
media_type: z.ZodEnum<{
|
|
461
|
+
"image/jpeg": "image/jpeg";
|
|
462
|
+
"image/png": "image/png";
|
|
463
|
+
"image/gif": "image/gif";
|
|
464
|
+
"image/webp": "image/webp";
|
|
465
|
+
}>;
|
|
466
|
+
data: z.ZodString;
|
|
467
|
+
}, z.core.$strip>>;
|
|
403
468
|
}, z.core.$strip>, z.ZodObject<{
|
|
404
469
|
type: z.ZodLiteral<"file">;
|
|
405
470
|
name: z.ZodString;
|
|
@@ -41,6 +41,20 @@ export declare class HttpTransport implements Transport {
|
|
|
41
41
|
version?: string;
|
|
42
42
|
description?: string;
|
|
43
43
|
suggestedPrompts?: string[];
|
|
44
|
+
tools?: Array<{
|
|
45
|
+
name: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
prettyName?: string;
|
|
48
|
+
icon?: string;
|
|
49
|
+
}>;
|
|
50
|
+
mcps?: Array<{
|
|
51
|
+
name: string;
|
|
52
|
+
transport: string;
|
|
53
|
+
}>;
|
|
54
|
+
subagents?: Array<{
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
}>;
|
|
44
58
|
};
|
|
45
59
|
/**
|
|
46
60
|
* Send an ACP RPC request to the server
|