@dexto/server 1.2.5
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 +44 -0
- package/dist/a2a/adapters/index.cjs +42 -0
- package/dist/a2a/adapters/index.d.ts +10 -0
- package/dist/a2a/adapters/index.d.ts.map +1 -0
- package/dist/a2a/adapters/index.js +12 -0
- package/dist/a2a/adapters/message.cjs +193 -0
- package/dist/a2a/adapters/message.d.ts +50 -0
- package/dist/a2a/adapters/message.d.ts.map +1 -0
- package/dist/a2a/adapters/message.js +167 -0
- package/dist/a2a/adapters/state.cjs +57 -0
- package/dist/a2a/adapters/state.d.ts +36 -0
- package/dist/a2a/adapters/state.d.ts.map +1 -0
- package/dist/a2a/adapters/state.js +32 -0
- package/dist/a2a/adapters/task-view.cjs +85 -0
- package/dist/a2a/adapters/task-view.d.ts +58 -0
- package/dist/a2a/adapters/task-view.d.ts.map +1 -0
- package/dist/a2a/adapters/task-view.js +60 -0
- package/dist/a2a/index.cjs +51 -0
- package/dist/a2a/index.d.ts +15 -0
- package/dist/a2a/index.d.ts.map +1 -0
- package/dist/a2a/index.js +30 -0
- package/dist/a2a/jsonrpc/index.cjs +38 -0
- package/dist/a2a/jsonrpc/index.d.ts +11 -0
- package/dist/a2a/jsonrpc/index.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/index.js +10 -0
- package/dist/a2a/jsonrpc/methods.cjs +183 -0
- package/dist/a2a/jsonrpc/methods.d.ts +110 -0
- package/dist/a2a/jsonrpc/methods.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/methods.js +159 -0
- package/dist/a2a/jsonrpc/server.cjs +199 -0
- package/dist/a2a/jsonrpc/server.d.ts +100 -0
- package/dist/a2a/jsonrpc/server.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/server.js +175 -0
- package/dist/a2a/jsonrpc/types.cjs +47 -0
- package/dist/a2a/jsonrpc/types.d.ts +91 -0
- package/dist/a2a/jsonrpc/types.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/types.js +21 -0
- package/dist/a2a/types.cjs +16 -0
- package/dist/a2a/types.d.ts +250 -0
- package/dist/a2a/types.d.ts.map +1 -0
- package/dist/a2a/types.js +0 -0
- package/dist/approval/approval-coordinator.cjs +87 -0
- package/dist/approval/approval-coordinator.d.ts +52 -0
- package/dist/approval/approval-coordinator.d.ts.map +1 -0
- package/dist/approval/approval-coordinator.js +63 -0
- package/dist/approval/manual-approval-handler.cjs +100 -0
- package/dist/approval/manual-approval-handler.d.ts +32 -0
- package/dist/approval/manual-approval-handler.d.ts.map +1 -0
- package/dist/approval/manual-approval-handler.js +76 -0
- package/dist/events/a2a-sse-subscriber.cjs +271 -0
- package/dist/events/a2a-sse-subscriber.d.ts +94 -0
- package/dist/events/a2a-sse-subscriber.d.ts.map +1 -0
- package/dist/events/a2a-sse-subscriber.js +247 -0
- package/dist/events/types.cjs +16 -0
- package/dist/events/types.d.ts +15 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +0 -0
- package/dist/events/webhook-subscriber.cjs +301 -0
- package/dist/events/webhook-subscriber.d.ts +64 -0
- package/dist/events/webhook-subscriber.d.ts.map +1 -0
- package/dist/events/webhook-subscriber.js +269 -0
- package/dist/events/webhook-types.cjs +16 -0
- package/dist/events/webhook-types.d.ts +91 -0
- package/dist/events/webhook-types.d.ts.map +1 -0
- package/dist/events/webhook-types.js +0 -0
- package/dist/hono/__tests__/test-fixtures.cjs +236 -0
- package/dist/hono/__tests__/test-fixtures.d.ts +65 -0
- package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -0
- package/dist/hono/__tests__/test-fixtures.js +197 -0
- package/dist/hono/index.cjs +166 -0
- package/dist/hono/index.d.ts +2783 -0
- package/dist/hono/index.d.ts.map +1 -0
- package/dist/hono/index.js +141 -0
- package/dist/hono/middleware/auth.cjs +75 -0
- package/dist/hono/middleware/auth.d.ts +3 -0
- package/dist/hono/middleware/auth.d.ts.map +1 -0
- package/dist/hono/middleware/auth.js +51 -0
- package/dist/hono/middleware/cors.cjs +57 -0
- package/dist/hono/middleware/cors.d.ts +9 -0
- package/dist/hono/middleware/cors.d.ts.map +1 -0
- package/dist/hono/middleware/cors.js +33 -0
- package/dist/hono/middleware/error.cjs +131 -0
- package/dist/hono/middleware/error.d.ts +5 -0
- package/dist/hono/middleware/error.d.ts.map +1 -0
- package/dist/hono/middleware/error.js +105 -0
- package/dist/hono/middleware/redaction.cjs +45 -0
- package/dist/hono/middleware/redaction.d.ts +4 -0
- package/dist/hono/middleware/redaction.d.ts.map +1 -0
- package/dist/hono/middleware/redaction.js +20 -0
- package/dist/hono/node/index.cjs +139 -0
- package/dist/hono/node/index.d.ts +19 -0
- package/dist/hono/node/index.d.ts.map +1 -0
- package/dist/hono/node/index.js +115 -0
- package/dist/hono/routes/a2a-jsonrpc.cjs +119 -0
- package/dist/hono/routes/a2a-jsonrpc.d.ts +46 -0
- package/dist/hono/routes/a2a-jsonrpc.d.ts.map +1 -0
- package/dist/hono/routes/a2a-jsonrpc.js +95 -0
- package/dist/hono/routes/a2a-tasks.cjs +315 -0
- package/dist/hono/routes/a2a-tasks.d.ts +530 -0
- package/dist/hono/routes/a2a-tasks.d.ts.map +1 -0
- package/dist/hono/routes/a2a-tasks.js +291 -0
- package/dist/hono/routes/a2a.cjs +36 -0
- package/dist/hono/routes/a2a.d.ts +4 -0
- package/dist/hono/routes/a2a.d.ts.map +1 -0
- package/dist/hono/routes/a2a.js +12 -0
- package/dist/hono/routes/agents.cjs +735 -0
- package/dist/hono/routes/agents.d.ts +650 -0
- package/dist/hono/routes/agents.d.ts.map +1 -0
- package/dist/hono/routes/agents.js +711 -0
- package/dist/hono/routes/approvals.cjs +125 -0
- package/dist/hono/routes/approvals.d.ts +89 -0
- package/dist/hono/routes/approvals.d.ts.map +1 -0
- package/dist/hono/routes/approvals.js +101 -0
- package/dist/hono/routes/greeting.cjs +60 -0
- package/dist/hono/routes/greeting.d.ts +19 -0
- package/dist/hono/routes/greeting.d.ts.map +1 -0
- package/dist/hono/routes/greeting.js +36 -0
- package/dist/hono/routes/health.cjs +45 -0
- package/dist/hono/routes/health.d.ts +17 -0
- package/dist/hono/routes/health.d.ts.map +1 -0
- package/dist/hono/routes/health.js +21 -0
- package/dist/hono/routes/llm.cjs +298 -0
- package/dist/hono/routes/llm.d.ts +294 -0
- package/dist/hono/routes/llm.d.ts.map +1 -0
- package/dist/hono/routes/llm.js +287 -0
- package/dist/hono/routes/mcp.cjs +356 -0
- package/dist/hono/routes/mcp.d.ts +246 -0
- package/dist/hono/routes/mcp.d.ts.map +1 -0
- package/dist/hono/routes/mcp.js +332 -0
- package/dist/hono/routes/memory.cjs +192 -0
- package/dist/hono/routes/memory.d.ts +146 -0
- package/dist/hono/routes/memory.d.ts.map +1 -0
- package/dist/hono/routes/memory.js +168 -0
- package/dist/hono/routes/messages.cjs +320 -0
- package/dist/hono/routes/messages.d.ts +163 -0
- package/dist/hono/routes/messages.d.ts.map +1 -0
- package/dist/hono/routes/messages.js +296 -0
- package/dist/hono/routes/prompts.cjs +228 -0
- package/dist/hono/routes/prompts.d.ts +150 -0
- package/dist/hono/routes/prompts.d.ts.map +1 -0
- package/dist/hono/routes/prompts.js +204 -0
- package/dist/hono/routes/resources.cjs +110 -0
- package/dist/hono/routes/resources.d.ts +76 -0
- package/dist/hono/routes/resources.d.ts.map +1 -0
- package/dist/hono/routes/resources.js +86 -0
- package/dist/hono/routes/search.cjs +109 -0
- package/dist/hono/routes/search.d.ts +137 -0
- package/dist/hono/routes/search.d.ts.map +1 -0
- package/dist/hono/routes/search.js +85 -0
- package/dist/hono/routes/sessions.cjs +366 -0
- package/dist/hono/routes/sessions.d.ts +229 -0
- package/dist/hono/routes/sessions.d.ts.map +1 -0
- package/dist/hono/routes/sessions.js +342 -0
- package/dist/hono/routes/webhooks.cjs +228 -0
- package/dist/hono/routes/webhooks.d.ts +127 -0
- package/dist/hono/routes/webhooks.d.ts.map +1 -0
- package/dist/hono/routes/webhooks.js +204 -0
- package/dist/hono/schemas/responses.cjs +276 -0
- package/dist/hono/schemas/responses.d.ts +1418 -0
- package/dist/hono/schemas/responses.d.ts.map +1 -0
- package/dist/hono/schemas/responses.js +227 -0
- package/dist/hono/types.cjs +16 -0
- package/dist/hono/types.d.ts +6 -0
- package/dist/hono/types.d.ts.map +1 -0
- package/dist/hono/types.js +0 -0
- package/dist/index.cjs +38 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/mcp/mcp-handler.cjs +145 -0
- package/dist/mcp/mcp-handler.d.ts +14 -0
- package/dist/mcp/mcp-handler.d.ts.map +1 -0
- package/dist/mcp/mcp-handler.js +118 -0
- package/package.json +59 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var responses_exports = {};
|
|
20
|
+
__export(responses_exports, {
|
|
21
|
+
AgentCardSchema: () => import_core4.AgentCardSchema,
|
|
22
|
+
AgentRegistryEntrySchema: () => AgentRegistryEntrySchema,
|
|
23
|
+
CatalogModelInfoSchema: () => CatalogModelInfoSchema,
|
|
24
|
+
DeleteResponseSchema: () => DeleteResponseSchema,
|
|
25
|
+
ErrorResponseSchema: () => ErrorResponseSchema,
|
|
26
|
+
HttpServerConfigSchema: () => import_core5.HttpServerConfigSchema,
|
|
27
|
+
InternalMessageSchema: () => InternalMessageSchema,
|
|
28
|
+
InternalResourceConfigSchema: () => import_core7.InternalResourceConfigSchema,
|
|
29
|
+
LLMConfigBaseSchema: () => import_core3.LLMConfigBaseSchema,
|
|
30
|
+
LLMConfigResponseSchema: () => LLMConfigResponseSchema,
|
|
31
|
+
LLMConfigSchema: () => LLMConfigSchema,
|
|
32
|
+
McpServerConfigSchema: () => import_core5.McpServerConfigSchema,
|
|
33
|
+
MemorySchema: () => import_core2.MemorySchema,
|
|
34
|
+
ModelFlatSchema: () => ModelFlatSchema,
|
|
35
|
+
OkResponseSchema: () => OkResponseSchema,
|
|
36
|
+
PromptArgumentSchema: () => PromptArgumentSchema,
|
|
37
|
+
PromptDefinitionSchema: () => PromptDefinitionSchema,
|
|
38
|
+
PromptInfoSchema: () => PromptInfoSchema,
|
|
39
|
+
PromptSchema: () => PromptSchema,
|
|
40
|
+
ProviderCatalogSchema: () => ProviderCatalogSchema,
|
|
41
|
+
ResourceSchema: () => ResourceSchema,
|
|
42
|
+
SearchResultSchema: () => SearchResultSchema,
|
|
43
|
+
SessionMetadataSchema: () => SessionMetadataSchema,
|
|
44
|
+
SessionSearchResultSchema: () => SessionSearchResultSchema,
|
|
45
|
+
SseServerConfigSchema: () => import_core5.SseServerConfigSchema,
|
|
46
|
+
StatusResponseSchema: () => StatusResponseSchema,
|
|
47
|
+
StdioServerConfigSchema: () => import_core5.StdioServerConfigSchema,
|
|
48
|
+
TokenUsageSchema: () => TokenUsageSchema,
|
|
49
|
+
ToolConfirmationConfigSchema: () => import_core6.ToolConfirmationConfigSchema,
|
|
50
|
+
ToolSchema: () => ToolSchema,
|
|
51
|
+
WebhookSchema: () => WebhookSchema
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(responses_exports);
|
|
54
|
+
var import_zod = require("zod");
|
|
55
|
+
var import_core = require("@dexto/core");
|
|
56
|
+
var import_core2 = require("@dexto/core");
|
|
57
|
+
var import_core3 = require("@dexto/core");
|
|
58
|
+
var import_core4 = require("@dexto/core");
|
|
59
|
+
var import_core5 = require("@dexto/core");
|
|
60
|
+
var import_core6 = require("@dexto/core");
|
|
61
|
+
var import_core7 = require("@dexto/core");
|
|
62
|
+
const LLMConfigResponseSchema = import_core.LLMConfigBaseSchema.omit({ apiKey: true }).extend({
|
|
63
|
+
hasApiKey: import_zod.z.boolean().optional().describe("Whether an API key is configured")
|
|
64
|
+
}).describe("LLM configuration (apiKey omitted for security)");
|
|
65
|
+
const LLMConfigSchema = import_core.LLMConfigBaseSchema.describe("LLM configuration with API key");
|
|
66
|
+
const BinaryDataSchema = import_zod.z.custom(
|
|
67
|
+
(val) => {
|
|
68
|
+
return typeof val === "string" || val instanceof Buffer || val instanceof Uint8Array || val instanceof URL;
|
|
69
|
+
},
|
|
70
|
+
{ message: "Must be string, Buffer, Uint8Array, or URL" }
|
|
71
|
+
);
|
|
72
|
+
const SessionMetadataSchema = import_zod.z.object({
|
|
73
|
+
id: import_zod.z.string().describe("Unique session identifier"),
|
|
74
|
+
createdAt: import_zod.z.number().int().positive().nullable().describe("Creation timestamp (Unix ms, null if unavailable)"),
|
|
75
|
+
lastActivity: import_zod.z.number().int().positive().nullable().describe("Last activity timestamp (Unix ms, null if unavailable)"),
|
|
76
|
+
messageCount: import_zod.z.number().int().nonnegative().describe("Total number of messages in session"),
|
|
77
|
+
title: import_zod.z.string().optional().nullable().describe("Optional session title")
|
|
78
|
+
}).strict().describe("Session metadata");
|
|
79
|
+
const TextPartSchema = import_zod.z.object({
|
|
80
|
+
type: import_zod.z.literal("text").describe("Part type: text"),
|
|
81
|
+
text: import_zod.z.string().describe("Text content")
|
|
82
|
+
}).strict().describe("Text content part");
|
|
83
|
+
const ImagePartSchema = import_zod.z.object({
|
|
84
|
+
type: import_zod.z.literal("image").describe("Part type: image"),
|
|
85
|
+
image: BinaryDataSchema.describe("Image data (string, binary, or URL)"),
|
|
86
|
+
mimeType: import_zod.z.string().optional().describe("MIME type of the image")
|
|
87
|
+
}).strict().describe("Image content part");
|
|
88
|
+
const FilePartSchema = import_zod.z.object({
|
|
89
|
+
type: import_zod.z.literal("file").describe("Part type: file"),
|
|
90
|
+
data: BinaryDataSchema.describe("File data (string, binary, or URL)"),
|
|
91
|
+
mimeType: import_zod.z.string().describe("MIME type of the file"),
|
|
92
|
+
filename: import_zod.z.string().optional().describe("Optional filename")
|
|
93
|
+
}).strict().describe("File content part");
|
|
94
|
+
const ContentPartSchema = import_zod.z.discriminatedUnion("type", [TextPartSchema, ImagePartSchema, FilePartSchema]).describe("Message content part (text, image, or file)");
|
|
95
|
+
const ToolCallSchema = import_zod.z.object({
|
|
96
|
+
id: import_zod.z.string().describe("Unique identifier for this tool call"),
|
|
97
|
+
type: import_zod.z.literal("function").describe("Tool call type (currently only function is supported)"),
|
|
98
|
+
function: import_zod.z.object({
|
|
99
|
+
name: import_zod.z.string().describe("Name of the function to call"),
|
|
100
|
+
arguments: import_zod.z.string().describe("Arguments for the function in JSON string format")
|
|
101
|
+
}).strict().describe("Function call details")
|
|
102
|
+
}).strict().describe("Tool call made by the assistant");
|
|
103
|
+
const TokenUsageSchema = import_zod.z.object({
|
|
104
|
+
inputTokens: import_zod.z.number().int().nonnegative().optional().describe("Number of input tokens"),
|
|
105
|
+
outputTokens: import_zod.z.number().int().nonnegative().optional().describe("Number of output tokens"),
|
|
106
|
+
reasoningTokens: import_zod.z.number().int().nonnegative().optional().describe("Number of reasoning tokens"),
|
|
107
|
+
totalTokens: import_zod.z.number().int().nonnegative().optional().describe("Total tokens used")
|
|
108
|
+
}).strict().describe("Token usage accounting");
|
|
109
|
+
const InternalMessageSchema = import_zod.z.object({
|
|
110
|
+
role: import_zod.z.enum(["system", "user", "assistant", "tool"]).describe("Role of the message sender"),
|
|
111
|
+
timestamp: import_zod.z.number().int().positive().optional().describe("Creation timestamp (Unix ms)"),
|
|
112
|
+
content: import_zod.z.union([import_zod.z.string(), import_zod.z.null(), import_zod.z.array(ContentPartSchema)]).describe("Message content (string, null, or array of parts)"),
|
|
113
|
+
reasoning: import_zod.z.string().optional().describe("Optional model reasoning text"),
|
|
114
|
+
tokenUsage: TokenUsageSchema.optional().describe("Optional token usage accounting"),
|
|
115
|
+
model: import_zod.z.string().optional().describe("Model identifier for assistant messages"),
|
|
116
|
+
provider: import_zod.z.string().optional().describe("Provider identifier for assistant messages"),
|
|
117
|
+
router: import_zod.z.string().optional().describe("Router metadata for assistant messages"),
|
|
118
|
+
toolCalls: import_zod.z.array(ToolCallSchema).optional().describe("Tool calls made by the assistant"),
|
|
119
|
+
toolCallId: import_zod.z.string().optional().describe("ID of the tool call this message responds to"),
|
|
120
|
+
name: import_zod.z.string().optional().describe("Name of the tool that produced this result")
|
|
121
|
+
}).strict().describe("Internal message representation");
|
|
122
|
+
const SearchResultSchema = import_zod.z.object({
|
|
123
|
+
sessionId: import_zod.z.string().describe("Session ID where the message was found"),
|
|
124
|
+
message: InternalMessageSchema.describe("The message that matched the search"),
|
|
125
|
+
matchedText: import_zod.z.string().describe("The specific text that matched the search query"),
|
|
126
|
+
context: import_zod.z.string().describe("Context around the match for preview"),
|
|
127
|
+
messageIndex: import_zod.z.number().int().nonnegative().describe("Index of the message within the session")
|
|
128
|
+
}).strict().describe("Result of a message search");
|
|
129
|
+
const SessionSearchResultSchema = import_zod.z.object({
|
|
130
|
+
sessionId: import_zod.z.string().describe("Session ID"),
|
|
131
|
+
matchCount: import_zod.z.number().int().nonnegative().describe("Number of messages that matched in this session"),
|
|
132
|
+
firstMatch: SearchResultSchema.describe("Preview of the first matching message"),
|
|
133
|
+
metadata: import_zod.z.object({
|
|
134
|
+
createdAt: import_zod.z.number().int().positive().describe("Session creation timestamp"),
|
|
135
|
+
lastActivity: import_zod.z.number().int().positive().describe("Last activity timestamp"),
|
|
136
|
+
messageCount: import_zod.z.number().int().nonnegative().describe("Total messages in session")
|
|
137
|
+
}).strict().describe("Session metadata")
|
|
138
|
+
}).strict().describe("Result of a session search");
|
|
139
|
+
const WebhookSchema = import_zod.z.object({
|
|
140
|
+
id: import_zod.z.string().describe("Unique webhook identifier"),
|
|
141
|
+
url: import_zod.z.string().url().describe("Webhook URL to send events to"),
|
|
142
|
+
events: import_zod.z.array(import_zod.z.string()).describe("Array of event types this webhook subscribes to"),
|
|
143
|
+
createdAt: import_zod.z.number().int().positive().describe("Creation timestamp (Unix ms)")
|
|
144
|
+
}).strict().describe("Webhook subscription");
|
|
145
|
+
const CatalogModelInfoSchema = import_zod.z.object({
|
|
146
|
+
name: import_zod.z.string().describe("Model name identifier"),
|
|
147
|
+
maxInputTokens: import_zod.z.number().int().positive().describe("Maximum input tokens"),
|
|
148
|
+
default: import_zod.z.boolean().optional().describe("Whether this is a default model"),
|
|
149
|
+
supportedFileTypes: import_zod.z.array(import_zod.z.enum(["audio", "pdf", "image"])).describe("File types this model supports"),
|
|
150
|
+
supportedRouters: import_zod.z.array(import_zod.z.enum(["vercel", "in-built"])).optional().describe("Routing strategies this model supports"),
|
|
151
|
+
displayName: import_zod.z.string().optional().describe("Human-readable display name"),
|
|
152
|
+
pricing: import_zod.z.object({
|
|
153
|
+
inputPerM: import_zod.z.number().describe("Input cost per million tokens (USD)"),
|
|
154
|
+
outputPerM: import_zod.z.number().describe("Output cost per million tokens (USD)"),
|
|
155
|
+
cacheReadPerM: import_zod.z.number().optional().describe("Cache read cost per million tokens"),
|
|
156
|
+
cacheWritePerM: import_zod.z.number().optional().describe("Cache write cost per million tokens"),
|
|
157
|
+
currency: import_zod.z.literal("USD").optional().describe("Currency"),
|
|
158
|
+
unit: import_zod.z.literal("per_million_tokens").optional().describe("Unit")
|
|
159
|
+
}).optional().describe("Pricing information in USD per million tokens")
|
|
160
|
+
}).strict().describe("Model information from LLM registry");
|
|
161
|
+
const ProviderCatalogSchema = import_zod.z.object({
|
|
162
|
+
name: import_zod.z.string().describe("Provider display name"),
|
|
163
|
+
hasApiKey: import_zod.z.boolean().describe("Whether API key is configured"),
|
|
164
|
+
primaryEnvVar: import_zod.z.string().describe("Primary environment variable for API key"),
|
|
165
|
+
supportedRouters: import_zod.z.array(import_zod.z.enum(["vercel", "in-built"])).describe("Routing strategies supported by this provider"),
|
|
166
|
+
supportsBaseURL: import_zod.z.boolean().describe("Whether custom base URLs are supported"),
|
|
167
|
+
models: import_zod.z.array(CatalogModelInfoSchema).describe("Models available from this provider"),
|
|
168
|
+
supportedFileTypes: import_zod.z.array(import_zod.z.enum(["audio", "pdf", "image"])).describe("Provider-level file type support")
|
|
169
|
+
}).strict().describe("Provider catalog entry with models and capabilities");
|
|
170
|
+
const ModelFlatSchema = CatalogModelInfoSchema.extend({
|
|
171
|
+
provider: import_zod.z.string().describe("Provider identifier for this model")
|
|
172
|
+
}).describe("Flattened model entry with provider information");
|
|
173
|
+
const AgentRegistryEntrySchema = import_zod.z.object({
|
|
174
|
+
id: import_zod.z.string().describe("Unique agent identifier"),
|
|
175
|
+
name: import_zod.z.string().describe("Agent name"),
|
|
176
|
+
description: import_zod.z.string().describe("Agent description"),
|
|
177
|
+
author: import_zod.z.string().optional().describe("Agent author"),
|
|
178
|
+
tags: import_zod.z.array(import_zod.z.string()).optional().describe("Agent tags"),
|
|
179
|
+
type: import_zod.z.enum(["builtin", "custom"]).describe("Agent type")
|
|
180
|
+
}).strict().describe("Agent registry entry");
|
|
181
|
+
const ResourceSchema = import_zod.z.object({
|
|
182
|
+
uri: import_zod.z.string().describe("Resource URI"),
|
|
183
|
+
name: import_zod.z.string().optional().describe("Resource name"),
|
|
184
|
+
description: import_zod.z.string().optional().describe("Resource description"),
|
|
185
|
+
mimeType: import_zod.z.string().optional().describe("MIME type of the resource"),
|
|
186
|
+
source: import_zod.z.enum(["mcp", "internal"]).describe("Source system that provides this resource"),
|
|
187
|
+
serverName: import_zod.z.string().optional().describe("Original server/provider name (for MCP resources)"),
|
|
188
|
+
size: import_zod.z.number().optional().describe("Size of the resource in bytes (if known)"),
|
|
189
|
+
lastModified: import_zod.z.string().datetime().optional().describe("Last modified timestamp (ISO 8601 string)"),
|
|
190
|
+
metadata: import_zod.z.record(import_zod.z.unknown()).optional().describe("Additional metadata specific to the resource type")
|
|
191
|
+
}).strict().describe("Resource metadata");
|
|
192
|
+
const ToolSchema = import_zod.z.object({
|
|
193
|
+
name: import_zod.z.string().describe("Tool name"),
|
|
194
|
+
description: import_zod.z.string().describe("Tool description"),
|
|
195
|
+
inputSchema: import_zod.z.record(import_zod.z.unknown()).describe("JSON Schema for tool input parameters")
|
|
196
|
+
}).strict().describe("Tool metadata");
|
|
197
|
+
const PromptArgumentSchema = import_zod.z.object({
|
|
198
|
+
name: import_zod.z.string().describe("Argument name"),
|
|
199
|
+
description: import_zod.z.string().optional().describe("Argument description"),
|
|
200
|
+
required: import_zod.z.boolean().optional().describe("Whether the argument is required")
|
|
201
|
+
}).strict().describe("Prompt argument definition");
|
|
202
|
+
const PromptDefinitionSchema = import_zod.z.object({
|
|
203
|
+
name: import_zod.z.string().describe("Prompt name"),
|
|
204
|
+
title: import_zod.z.string().optional().describe("Prompt title"),
|
|
205
|
+
description: import_zod.z.string().optional().describe("Prompt description"),
|
|
206
|
+
arguments: import_zod.z.array(PromptArgumentSchema).optional().describe("Array of argument definitions")
|
|
207
|
+
}).strict().describe("Prompt definition (MCP-compliant)");
|
|
208
|
+
const PromptInfoSchema = import_zod.z.object({
|
|
209
|
+
name: import_zod.z.string().describe("Prompt name"),
|
|
210
|
+
title: import_zod.z.string().optional().describe("Prompt title"),
|
|
211
|
+
description: import_zod.z.string().optional().describe("Prompt description"),
|
|
212
|
+
arguments: import_zod.z.array(PromptArgumentSchema).optional().describe("Array of argument definitions"),
|
|
213
|
+
source: import_zod.z.enum(["mcp", "file", "starter", "custom"]).describe("Source of the prompt"),
|
|
214
|
+
metadata: import_zod.z.record(import_zod.z.unknown()).optional().describe("Additional metadata")
|
|
215
|
+
}).strict().describe("Enhanced prompt information");
|
|
216
|
+
const PromptSchema = import_zod.z.object({
|
|
217
|
+
id: import_zod.z.string().describe("Unique prompt identifier"),
|
|
218
|
+
name: import_zod.z.string().describe("Prompt name"),
|
|
219
|
+
description: import_zod.z.string().optional().describe("Prompt description"),
|
|
220
|
+
content: import_zod.z.string().describe("Prompt template content"),
|
|
221
|
+
variables: import_zod.z.array(import_zod.z.string()).optional().describe("List of variable placeholders in the prompt")
|
|
222
|
+
}).strict().describe("Prompt template");
|
|
223
|
+
const OkResponseSchema = (dataSchema) => import_zod.z.object({
|
|
224
|
+
ok: import_zod.z.literal(true).describe("Indicates successful response"),
|
|
225
|
+
data: dataSchema.describe("Response data")
|
|
226
|
+
}).strict().describe("Successful API response");
|
|
227
|
+
const ErrorResponseSchema = import_zod.z.object({
|
|
228
|
+
ok: import_zod.z.literal(false).describe("Indicates failed response"),
|
|
229
|
+
error: import_zod.z.object({
|
|
230
|
+
message: import_zod.z.string().describe("Error message"),
|
|
231
|
+
code: import_zod.z.string().optional().describe("Error code"),
|
|
232
|
+
details: import_zod.z.unknown().optional().describe("Additional error details")
|
|
233
|
+
}).strict().describe("Error details")
|
|
234
|
+
}).strict().describe("Error API response");
|
|
235
|
+
const StatusResponseSchema = import_zod.z.object({
|
|
236
|
+
status: import_zod.z.string().describe("Operation status"),
|
|
237
|
+
message: import_zod.z.string().optional().describe("Optional status message")
|
|
238
|
+
}).strict().describe("Status response");
|
|
239
|
+
const DeleteResponseSchema = import_zod.z.object({
|
|
240
|
+
status: import_zod.z.literal("deleted").describe("Indicates successful deletion"),
|
|
241
|
+
id: import_zod.z.string().optional().describe("ID of the deleted resource")
|
|
242
|
+
}).strict().describe("Delete operation response");
|
|
243
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
244
|
+
0 && (module.exports = {
|
|
245
|
+
AgentCardSchema,
|
|
246
|
+
AgentRegistryEntrySchema,
|
|
247
|
+
CatalogModelInfoSchema,
|
|
248
|
+
DeleteResponseSchema,
|
|
249
|
+
ErrorResponseSchema,
|
|
250
|
+
HttpServerConfigSchema,
|
|
251
|
+
InternalMessageSchema,
|
|
252
|
+
InternalResourceConfigSchema,
|
|
253
|
+
LLMConfigBaseSchema,
|
|
254
|
+
LLMConfigResponseSchema,
|
|
255
|
+
LLMConfigSchema,
|
|
256
|
+
McpServerConfigSchema,
|
|
257
|
+
MemorySchema,
|
|
258
|
+
ModelFlatSchema,
|
|
259
|
+
OkResponseSchema,
|
|
260
|
+
PromptArgumentSchema,
|
|
261
|
+
PromptDefinitionSchema,
|
|
262
|
+
PromptInfoSchema,
|
|
263
|
+
PromptSchema,
|
|
264
|
+
ProviderCatalogSchema,
|
|
265
|
+
ResourceSchema,
|
|
266
|
+
SearchResultSchema,
|
|
267
|
+
SessionMetadataSchema,
|
|
268
|
+
SessionSearchResultSchema,
|
|
269
|
+
SseServerConfigSchema,
|
|
270
|
+
StatusResponseSchema,
|
|
271
|
+
StdioServerConfigSchema,
|
|
272
|
+
TokenUsageSchema,
|
|
273
|
+
ToolConfirmationConfigSchema,
|
|
274
|
+
ToolSchema,
|
|
275
|
+
WebhookSchema
|
|
276
|
+
});
|