@dexto/server 1.2.6 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/approval/manual-approval-handler.cjs +23 -15
- package/dist/approval/manual-approval-handler.d.ts.map +1 -1
- package/dist/approval/manual-approval-handler.js +23 -15
- package/dist/events/webhook-subscriber.cjs +1 -1
- package/dist/events/webhook-subscriber.d.ts.map +1 -1
- package/dist/events/webhook-subscriber.js +1 -1
- package/dist/hono/__tests__/test-fixtures.cjs +2 -2
- package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
- package/dist/hono/__tests__/test-fixtures.js +2 -2
- package/dist/hono/index.cjs +14 -2
- package/dist/hono/index.d.ts +486 -132
- package/dist/hono/index.d.ts.map +1 -1
- package/dist/hono/index.js +17 -2
- package/dist/hono/middleware/error.d.ts.map +1 -1
- package/dist/hono/routes/agents.cjs +8 -10
- package/dist/hono/routes/agents.d.ts +15 -8
- package/dist/hono/routes/agents.d.ts.map +1 -1
- package/dist/hono/routes/agents.js +10 -10
- package/dist/hono/routes/approvals.cjs +52 -1
- package/dist/hono/routes/approvals.d.ts +25 -0
- package/dist/hono/routes/approvals.d.ts.map +1 -1
- package/dist/hono/routes/approvals.js +52 -1
- package/dist/hono/routes/llm.cjs +110 -31
- package/dist/hono/routes/llm.d.ts +89 -37
- package/dist/hono/routes/llm.d.ts.map +1 -1
- package/dist/hono/routes/llm.js +108 -25
- package/dist/hono/routes/mcp.cjs +8 -4
- package/dist/hono/routes/mcp.d.ts +4 -1
- package/dist/hono/routes/mcp.d.ts.map +1 -1
- package/dist/hono/routes/mcp.js +9 -5
- package/dist/hono/routes/memory.d.ts +1 -1
- package/dist/hono/routes/messages.cjs +56 -64
- package/dist/hono/routes/messages.d.ts +101 -57
- package/dist/hono/routes/messages.d.ts.map +1 -1
- package/dist/hono/routes/messages.js +57 -65
- package/dist/hono/routes/prompts.cjs +2 -2
- package/dist/hono/routes/prompts.d.ts +7 -7
- package/dist/hono/routes/prompts.js +2 -2
- package/dist/hono/routes/queue.cjs +202 -0
- package/dist/hono/routes/queue.d.ts +171 -0
- package/dist/hono/routes/queue.d.ts.map +1 -0
- package/dist/hono/routes/queue.js +178 -0
- package/dist/hono/routes/resources.d.ts +1 -1
- package/dist/hono/routes/search.cjs +2 -24
- package/dist/hono/routes/search.d.ts +43 -15
- package/dist/hono/routes/search.d.ts.map +1 -1
- package/dist/hono/routes/search.js +3 -25
- package/dist/hono/routes/sessions.cjs +65 -11
- package/dist/hono/routes/sessions.d.ts +27 -5
- package/dist/hono/routes/sessions.d.ts.map +1 -1
- package/dist/hono/routes/sessions.js +65 -11
- package/dist/hono/routes/static.cjs +77 -0
- package/dist/hono/routes/static.d.ts +41 -0
- package/dist/hono/routes/static.d.ts.map +1 -0
- package/dist/hono/routes/static.js +52 -0
- package/dist/hono/schemas/responses.cjs +67 -25
- package/dist/hono/schemas/responses.d.ts +2076 -354
- package/dist/hono/schemas/responses.d.ts.map +1 -1
- package/dist/hono/schemas/responses.js +69 -35
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/hono/schemas/responses.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/hono/schemas/responses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAM3E,eAAO,MAAM,cAAc;;;;;;;;;EAMO,CAAC;AAEnC,eAAO,MAAM,eAAe;;;;;;;;;;;;EAOO,CAAC;AAEpC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAQO,CAAC;AAEn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ERS } from "@dexto/core";
|
|
3
3
|
import { MemorySchema } from "@dexto/core";
|
|
4
4
|
import { LLMConfigBaseSchema } from "@dexto/core";
|
|
5
|
-
const LLMConfigResponseSchema = CoreLLMConfigBaseSchema.omit({ apiKey: true }).extend({
|
|
6
|
-
hasApiKey: z.boolean().optional().describe("Whether an API key is configured")
|
|
7
|
-
}).describe("LLM configuration (apiKey omitted for security)");
|
|
8
|
-
const LLMConfigSchema = CoreLLMConfigBaseSchema.describe("LLM configuration with API key");
|
|
9
|
-
import { AgentCardSchema } from "@dexto/core";
|
|
10
|
-
import {
|
|
11
|
-
McpServerConfigSchema,
|
|
12
|
-
StdioServerConfigSchema,
|
|
13
|
-
SseServerConfigSchema,
|
|
14
|
-
HttpServerConfigSchema
|
|
15
|
-
} from "@dexto/core";
|
|
16
|
-
import { ToolConfirmationConfigSchema } from "@dexto/core";
|
|
17
|
-
import { InternalResourceConfigSchema } from "@dexto/core";
|
|
18
|
-
const BinaryDataSchema = z.custom(
|
|
19
|
-
(val) => {
|
|
20
|
-
return typeof val === "string" || val instanceof Buffer || val instanceof Uint8Array || val instanceof URL;
|
|
21
|
-
},
|
|
22
|
-
{ message: "Must be string, Buffer, Uint8Array, or URL" }
|
|
23
|
-
);
|
|
24
|
-
const SessionMetadataSchema = z.object({
|
|
25
|
-
id: z.string().describe("Unique session identifier"),
|
|
26
|
-
createdAt: z.number().int().positive().nullable().describe("Creation timestamp (Unix ms, null if unavailable)"),
|
|
27
|
-
lastActivity: z.number().int().positive().nullable().describe("Last activity timestamp (Unix ms, null if unavailable)"),
|
|
28
|
-
messageCount: z.number().int().nonnegative().describe("Total number of messages in session"),
|
|
29
|
-
title: z.string().optional().nullable().describe("Optional session title")
|
|
30
|
-
}).strict().describe("Session metadata");
|
|
31
5
|
const TextPartSchema = z.object({
|
|
32
6
|
type: z.literal("text").describe("Part type: text"),
|
|
33
7
|
text: z.string().describe("Text content")
|
|
34
8
|
}).strict().describe("Text content part");
|
|
35
9
|
const ImagePartSchema = z.object({
|
|
36
10
|
type: z.literal("image").describe("Part type: image"),
|
|
37
|
-
image:
|
|
11
|
+
image: z.string().describe("Base64-encoded image data"),
|
|
38
12
|
mimeType: z.string().optional().describe("MIME type of the image")
|
|
39
13
|
}).strict().describe("Image content part");
|
|
40
14
|
const FilePartSchema = z.object({
|
|
41
15
|
type: z.literal("file").describe("Part type: file"),
|
|
42
|
-
data:
|
|
16
|
+
data: z.string().describe("Base64-encoded file data"),
|
|
43
17
|
mimeType: z.string().describe("MIME type of the file"),
|
|
44
18
|
filename: z.string().optional().describe("Optional filename")
|
|
45
19
|
}).strict().describe("File content part");
|
|
46
|
-
const
|
|
20
|
+
const UIResourcePartSchema = z.object({
|
|
21
|
+
type: z.literal("ui-resource").describe("Part type: ui-resource"),
|
|
22
|
+
uri: z.string().describe("URI identifying the UI resource (must start with ui://)"),
|
|
23
|
+
mimeType: z.string().describe("MIME type: text/html, text/uri-list, or application/vnd.mcp-ui.remote-dom"),
|
|
24
|
+
content: z.string().optional().describe("Inline HTML content or URL"),
|
|
25
|
+
blob: z.string().optional().describe("Base64-encoded content (alternative to content)"),
|
|
26
|
+
metadata: z.object({
|
|
27
|
+
title: z.string().optional().describe("Display title for the UI resource"),
|
|
28
|
+
preferredSize: z.object({
|
|
29
|
+
width: z.number().describe("Preferred width in pixels"),
|
|
30
|
+
height: z.number().describe("Preferred height in pixels")
|
|
31
|
+
}).strict().optional().describe("Preferred rendering size")
|
|
32
|
+
}).strict().optional().describe("Optional metadata for the UI resource")
|
|
33
|
+
}).strict().describe("UI Resource content part for MCP-UI interactive components");
|
|
34
|
+
const ContentPartSchema = z.discriminatedUnion("type", [
|
|
35
|
+
TextPartSchema,
|
|
36
|
+
ImagePartSchema,
|
|
37
|
+
FilePartSchema,
|
|
38
|
+
UIResourcePartSchema
|
|
39
|
+
]).describe("Message content part (text, image, file, or UI resource)");
|
|
47
40
|
const ToolCallSchema = z.object({
|
|
48
41
|
id: z.string().describe("Unique identifier for this tool call"),
|
|
49
42
|
type: z.literal("function").describe("Tool call type (currently only function is supported)"),
|
|
@@ -59,18 +52,39 @@ const TokenUsageSchema = z.object({
|
|
|
59
52
|
totalTokens: z.number().int().nonnegative().optional().describe("Total tokens used")
|
|
60
53
|
}).strict().describe("Token usage accounting");
|
|
61
54
|
const InternalMessageSchema = z.object({
|
|
55
|
+
id: z.string().uuid().optional().describe("Unique message identifier (UUID)"),
|
|
62
56
|
role: z.enum(["system", "user", "assistant", "tool"]).describe("Role of the message sender"),
|
|
63
57
|
timestamp: z.number().int().positive().optional().describe("Creation timestamp (Unix ms)"),
|
|
64
58
|
content: z.union([z.string(), z.null(), z.array(ContentPartSchema)]).describe("Message content (string, null, or array of parts)"),
|
|
65
59
|
reasoning: z.string().optional().describe("Optional model reasoning text"),
|
|
66
60
|
tokenUsage: TokenUsageSchema.optional().describe("Optional token usage accounting"),
|
|
67
61
|
model: z.string().optional().describe("Model identifier for assistant messages"),
|
|
68
|
-
provider: z.
|
|
69
|
-
router: z.string().optional().describe("Router metadata for assistant messages"),
|
|
62
|
+
provider: z.enum(LLM_PROVIDERS).optional().describe("Provider identifier for assistant messages"),
|
|
70
63
|
toolCalls: z.array(ToolCallSchema).optional().describe("Tool calls made by the assistant"),
|
|
71
64
|
toolCallId: z.string().optional().describe("ID of the tool call this message responds to"),
|
|
72
|
-
name: z.string().optional().describe("Name of the tool that produced this result")
|
|
65
|
+
name: z.string().optional().describe("Name of the tool that produced this result"),
|
|
66
|
+
success: z.boolean().optional().describe("Whether tool execution succeeded (present for role=tool messages)")
|
|
73
67
|
}).strict().describe("Internal message representation");
|
|
68
|
+
const LLMConfigResponseSchema = CoreLLMConfigBaseSchema.omit({ apiKey: true }).extend({
|
|
69
|
+
hasApiKey: z.boolean().optional().describe("Whether an API key is configured")
|
|
70
|
+
}).describe("LLM configuration (apiKey omitted for security)");
|
|
71
|
+
const LLMConfigSchema = CoreLLMConfigBaseSchema.describe("LLM configuration with API key");
|
|
72
|
+
import { AgentCardSchema } from "@dexto/core";
|
|
73
|
+
import {
|
|
74
|
+
McpServerConfigSchema,
|
|
75
|
+
StdioServerConfigSchema,
|
|
76
|
+
SseServerConfigSchema,
|
|
77
|
+
HttpServerConfigSchema
|
|
78
|
+
} from "@dexto/core";
|
|
79
|
+
import { ToolConfirmationConfigSchema } from "@dexto/core";
|
|
80
|
+
import { InternalResourceConfigSchema } from "@dexto/core";
|
|
81
|
+
const SessionMetadataSchema = z.object({
|
|
82
|
+
id: z.string().describe("Unique session identifier"),
|
|
83
|
+
createdAt: z.number().int().positive().nullable().describe("Creation timestamp (Unix ms, null if unavailable)"),
|
|
84
|
+
lastActivity: z.number().int().positive().nullable().describe("Last activity timestamp (Unix ms, null if unavailable)"),
|
|
85
|
+
messageCount: z.number().int().nonnegative().describe("Total number of messages in session"),
|
|
86
|
+
title: z.string().optional().nullable().describe("Optional session title")
|
|
87
|
+
}).strict().describe("Session metadata");
|
|
74
88
|
const SearchResultSchema = z.object({
|
|
75
89
|
sessionId: z.string().describe("Session ID where the message was found"),
|
|
76
90
|
message: InternalMessageSchema.describe("The message that matched the search"),
|
|
@@ -88,6 +102,20 @@ const SessionSearchResultSchema = z.object({
|
|
|
88
102
|
messageCount: z.number().int().nonnegative().describe("Total messages in session")
|
|
89
103
|
}).strict().describe("Session metadata")
|
|
90
104
|
}).strict().describe("Result of a session search");
|
|
105
|
+
const MessageSearchResponseSchema = z.object({
|
|
106
|
+
results: z.array(SearchResultSchema).describe("Array of search results"),
|
|
107
|
+
total: z.number().int().nonnegative().describe("Total number of results available"),
|
|
108
|
+
hasMore: z.boolean().describe("Whether there are more results beyond the current page"),
|
|
109
|
+
query: z.string().describe("Query that was searched")
|
|
110
|
+
}).strict().describe("Message search response");
|
|
111
|
+
const SessionSearchResponseSchema = z.object({
|
|
112
|
+
results: z.array(SessionSearchResultSchema).describe("Array of session search results"),
|
|
113
|
+
total: z.number().int().nonnegative().describe("Total number of sessions with matches"),
|
|
114
|
+
hasMore: z.boolean().describe(
|
|
115
|
+
"Always false - session search returns all matching sessions without pagination"
|
|
116
|
+
),
|
|
117
|
+
query: z.string().describe("Query that was searched")
|
|
118
|
+
}).strict().describe("Session search response");
|
|
91
119
|
const WebhookSchema = z.object({
|
|
92
120
|
id: z.string().describe("Unique webhook identifier"),
|
|
93
121
|
url: z.string().url().describe("Webhook URL to send events to"),
|
|
@@ -99,7 +127,6 @@ const CatalogModelInfoSchema = z.object({
|
|
|
99
127
|
maxInputTokens: z.number().int().positive().describe("Maximum input tokens"),
|
|
100
128
|
default: z.boolean().optional().describe("Whether this is a default model"),
|
|
101
129
|
supportedFileTypes: z.array(z.enum(["audio", "pdf", "image"])).describe("File types this model supports"),
|
|
102
|
-
supportedRouters: z.array(z.enum(["vercel", "in-built"])).optional().describe("Routing strategies this model supports"),
|
|
103
130
|
displayName: z.string().optional().describe("Human-readable display name"),
|
|
104
131
|
pricing: z.object({
|
|
105
132
|
inputPerM: z.number().describe("Input cost per million tokens (USD)"),
|
|
@@ -114,7 +141,6 @@ const ProviderCatalogSchema = z.object({
|
|
|
114
141
|
name: z.string().describe("Provider display name"),
|
|
115
142
|
hasApiKey: z.boolean().describe("Whether API key is configured"),
|
|
116
143
|
primaryEnvVar: z.string().describe("Primary environment variable for API key"),
|
|
117
|
-
supportedRouters: z.array(z.enum(["vercel", "in-built"])).describe("Routing strategies supported by this provider"),
|
|
118
144
|
supportsBaseURL: z.boolean().describe("Whether custom base URLs are supported"),
|
|
119
145
|
models: z.array(CatalogModelInfoSchema).describe("Models available from this provider"),
|
|
120
146
|
supportedFileTypes: z.array(z.enum(["audio", "pdf", "image"])).describe("Provider-level file type support")
|
|
@@ -196,9 +222,12 @@ export {
|
|
|
196
222
|
AgentCardSchema,
|
|
197
223
|
AgentRegistryEntrySchema,
|
|
198
224
|
CatalogModelInfoSchema,
|
|
225
|
+
ContentPartSchema,
|
|
199
226
|
DeleteResponseSchema,
|
|
200
227
|
ErrorResponseSchema,
|
|
228
|
+
FilePartSchema,
|
|
201
229
|
HttpServerConfigSchema,
|
|
230
|
+
ImagePartSchema,
|
|
202
231
|
InternalMessageSchema,
|
|
203
232
|
InternalResourceConfigSchema,
|
|
204
233
|
LLMConfigBaseSchema,
|
|
@@ -206,6 +235,7 @@ export {
|
|
|
206
235
|
LLMConfigSchema,
|
|
207
236
|
McpServerConfigSchema,
|
|
208
237
|
MemorySchema,
|
|
238
|
+
MessageSearchResponseSchema,
|
|
209
239
|
ModelFlatSchema,
|
|
210
240
|
OkResponseSchema,
|
|
211
241
|
PromptArgumentSchema,
|
|
@@ -216,12 +246,16 @@ export {
|
|
|
216
246
|
ResourceSchema,
|
|
217
247
|
SearchResultSchema,
|
|
218
248
|
SessionMetadataSchema,
|
|
249
|
+
SessionSearchResponseSchema,
|
|
219
250
|
SessionSearchResultSchema,
|
|
220
251
|
SseServerConfigSchema,
|
|
221
252
|
StatusResponseSchema,
|
|
222
253
|
StdioServerConfigSchema,
|
|
254
|
+
TextPartSchema,
|
|
223
255
|
TokenUsageSchema,
|
|
256
|
+
ToolCallSchema,
|
|
224
257
|
ToolConfirmationConfigSchema,
|
|
225
258
|
ToolSchema,
|
|
259
|
+
UIResourcePartSchema,
|
|
226
260
|
WebhookSchema
|
|
227
261
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"ws": "^8.18.1",
|
|
32
32
|
"yaml": "^2.7.1",
|
|
33
33
|
"@modelcontextprotocol/sdk": "^1.17.2",
|
|
34
|
-
"@dexto/agent-management": "1.
|
|
35
|
-
"@dexto/core": "1.
|
|
34
|
+
"@dexto/agent-management": "1.4.0",
|
|
35
|
+
"@dexto/core": "1.4.0"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist",
|