@dexto/server 1.6.19 → 1.6.21
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/a2a/jsonrpc/methods.cjs +1 -1
- package/dist/a2a/jsonrpc/methods.d.ts +14 -4
- package/dist/a2a/jsonrpc/methods.d.ts.map +1 -1
- package/dist/a2a/jsonrpc/methods.js +1 -1
- package/dist/hono/index.cjs +39 -8
- package/dist/hono/index.d.ts +43 -4503
- package/dist/hono/index.d.ts.map +1 -1
- package/dist/hono/index.js +42 -9
- package/dist/hono/routes/a2a-jsonrpc.d.ts.map +1 -1
- package/dist/hono/routes/a2a-tasks.cjs +173 -34
- package/dist/hono/routes/a2a-tasks.d.ts +1 -498
- package/dist/hono/routes/a2a-tasks.d.ts.map +1 -1
- package/dist/hono/routes/a2a-tasks.js +177 -34
- package/dist/hono/routes/a2a.d.ts.map +1 -1
- package/dist/hono/routes/agents.cjs +410 -329
- package/dist/hono/routes/agents.d.ts +16048 -73
- package/dist/hono/routes/agents.d.ts.map +1 -1
- package/dist/hono/routes/agents.js +418 -330
- package/dist/hono/routes/approvals.cjs +103 -78
- package/dist/hono/routes/approvals.d.ts +2090 -112
- package/dist/hono/routes/approvals.d.ts.map +1 -1
- package/dist/hono/routes/approvals.js +108 -78
- package/dist/hono/routes/dexto-auth.cjs +40 -33
- package/dist/hono/routes/dexto-auth.d.ts +401 -2
- package/dist/hono/routes/dexto-auth.d.ts.map +1 -1
- package/dist/hono/routes/dexto-auth.js +40 -33
- package/dist/hono/routes/discovery.cjs +16 -14
- package/dist/hono/routes/discovery.d.ts +586 -1
- package/dist/hono/routes/discovery.d.ts.map +1 -1
- package/dist/hono/routes/discovery.js +16 -14
- package/dist/hono/routes/greeting.cjs +26 -22
- package/dist/hono/routes/greeting.d.ts +787 -3
- package/dist/hono/routes/greeting.d.ts.map +1 -1
- package/dist/hono/routes/greeting.js +26 -22
- package/dist/hono/routes/health.d.ts +1 -1
- package/dist/hono/routes/key.cjs +60 -52
- package/dist/hono/routes/key.d.ts +1597 -1
- package/dist/hono/routes/key.d.ts.map +1 -1
- package/dist/hono/routes/key.js +60 -52
- package/dist/hono/routes/llm.cjs +381 -348
- package/dist/hono/routes/llm.d.ts +12137 -87
- package/dist/hono/routes/llm.d.ts.map +1 -1
- package/dist/hono/routes/llm.js +385 -348
- package/dist/hono/routes/mcp.cjs +273 -212
- package/dist/hono/routes/mcp.d.ts +6605 -316
- package/dist/hono/routes/mcp.d.ts.map +1 -1
- package/dist/hono/routes/mcp.js +287 -213
- package/dist/hono/routes/memory.cjs +102 -89
- package/dist/hono/routes/memory.d.ts +5368 -4
- package/dist/hono/routes/memory.d.ts.map +1 -1
- package/dist/hono/routes/memory.js +108 -90
- package/dist/hono/routes/messages.cjs +171 -164
- package/dist/hono/routes/messages.d.ts +3899 -10
- package/dist/hono/routes/messages.d.ts.map +1 -1
- package/dist/hono/routes/messages.js +181 -165
- package/dist/hono/routes/models.cjs +106 -64
- package/dist/hono/routes/models.d.ts +2874 -1
- package/dist/hono/routes/models.d.ts.map +1 -1
- package/dist/hono/routes/models.js +108 -64
- package/dist/hono/routes/openrouter.cjs +79 -65
- package/dist/hono/routes/openrouter.d.ts +854 -1
- package/dist/hono/routes/openrouter.d.ts.map +1 -1
- package/dist/hono/routes/openrouter.js +79 -65
- package/dist/hono/routes/prompts.cjs +137 -104
- package/dist/hono/routes/prompts.d.ts +2820 -12
- package/dist/hono/routes/prompts.d.ts.map +1 -1
- package/dist/hono/routes/prompts.js +144 -105
- package/dist/hono/routes/queue.cjs +158 -132
- package/dist/hono/routes/queue.d.ts +5148 -13
- package/dist/hono/routes/queue.d.ts.map +1 -1
- package/dist/hono/routes/queue.js +168 -133
- package/dist/hono/routes/resources.cjs +65 -46
- package/dist/hono/routes/resources.d.ts +1983 -5
- package/dist/hono/routes/resources.d.ts.map +1 -1
- package/dist/hono/routes/resources.js +72 -47
- package/dist/hono/routes/schedules.cjs +233 -226
- package/dist/hono/routes/schedules.d.ts +4202 -26
- package/dist/hono/routes/schedules.d.ts.map +1 -1
- package/dist/hono/routes/schedules.js +233 -226
- package/dist/hono/routes/search.cjs +34 -30
- package/dist/hono/routes/search.d.ts +2837 -14
- package/dist/hono/routes/search.d.ts.map +1 -1
- package/dist/hono/routes/search.js +40 -31
- package/dist/hono/routes/sessions.cjs +404 -392
- package/dist/hono/routes/sessions.d.ts +16585 -30
- package/dist/hono/routes/sessions.d.ts.map +1 -1
- package/dist/hono/routes/sessions.js +408 -393
- package/dist/hono/routes/static.d.ts.map +1 -1
- package/dist/hono/routes/system-prompt.cjs +57 -61
- package/dist/hono/routes/system-prompt.d.ts +1228 -2
- package/dist/hono/routes/system-prompt.d.ts.map +1 -1
- package/dist/hono/routes/system-prompt.js +58 -62
- package/dist/hono/routes/tools.cjs +29 -34
- package/dist/hono/routes/tools.d.ts +1756 -7
- package/dist/hono/routes/tools.d.ts.map +1 -1
- package/dist/hono/routes/tools.js +33 -33
- package/dist/hono/routes/webhooks.cjs +159 -132
- package/dist/hono/routes/webhooks.d.ts +2504 -14
- package/dist/hono/routes/webhooks.d.ts.map +1 -1
- package/dist/hono/routes/webhooks.js +163 -132
- package/dist/hono/routes/workspaces.cjs +84 -79
- package/dist/hono/routes/workspaces.d.ts +2093 -2
- package/dist/hono/routes/workspaces.d.ts.map +1 -1
- package/dist/hono/routes/workspaces.js +89 -80
- package/dist/hono/schemas/responses.cjs +492 -235
- package/dist/hono/schemas/responses.d.ts +1461 -146
- package/dist/hono/schemas/responses.d.ts.map +1 -1
- package/dist/hono/schemas/responses.js +247 -9
- package/dist/hono/types.d.ts +11 -0
- package/dist/hono/types.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -20,15 +20,24 @@ var responses_exports = {};
|
|
|
20
20
|
__export(responses_exports, {
|
|
21
21
|
AgentCardSchema: () => import_core4.AgentCardSchema,
|
|
22
22
|
AgentRegistryEntrySchema: () => AgentRegistryEntrySchema,
|
|
23
|
+
ApiErrorResponseSchema: () => ApiErrorResponseSchema,
|
|
24
|
+
BadRequestErrorResponse: () => BadRequestErrorResponse,
|
|
23
25
|
CatalogModelInfoSchema: () => CatalogModelInfoSchema,
|
|
26
|
+
ConflictErrorResponse: () => ConflictErrorResponse,
|
|
24
27
|
ContentPartSchema: () => ContentPartSchema,
|
|
25
28
|
DeleteResponseSchema: () => DeleteResponseSchema,
|
|
26
29
|
ErrorResponseSchema: () => ErrorResponseSchema,
|
|
27
30
|
ExecutionLogSchema: () => ExecutionLogSchema,
|
|
28
31
|
FilePartSchema: () => FilePartSchema,
|
|
32
|
+
ForbiddenErrorResponse: () => ForbiddenErrorResponse,
|
|
29
33
|
HttpServerConfigSchema: () => import_core5.HttpServerConfigSchema,
|
|
30
34
|
ImagePartSchema: () => ImagePartSchema,
|
|
35
|
+
InternalErrorResponse: () => InternalErrorResponse,
|
|
31
36
|
InternalMessageSchema: () => InternalMessageSchema,
|
|
37
|
+
IssueSchema: () => IssueSchema,
|
|
38
|
+
JsonObjectSchema: () => JsonObjectSchema,
|
|
39
|
+
JsonSchemaPropertySchema: () => JsonSchemaPropertySchema,
|
|
40
|
+
JsonValueSchema: () => JsonValueSchema,
|
|
32
41
|
LLMConfigBaseSchema: () => import_core3.LLMConfigBaseSchema,
|
|
33
42
|
LLMConfigResponseSchema: () => LLMConfigResponseSchema,
|
|
34
43
|
LLMConfigSchema: () => LLMConfigSchema,
|
|
@@ -37,7 +46,9 @@ __export(responses_exports, {
|
|
|
37
46
|
MessageSearchResponseSchema: () => MessageSearchResponseSchema,
|
|
38
47
|
ModelFlatSchema: () => ModelFlatSchema,
|
|
39
48
|
ModelStatisticsSchema: () => ModelStatisticsSchema,
|
|
49
|
+
NotFoundErrorResponse: () => NotFoundErrorResponse,
|
|
40
50
|
OkResponseSchema: () => OkResponseSchema,
|
|
51
|
+
PaymentRequiredErrorResponse: () => PaymentRequiredErrorResponse,
|
|
41
52
|
PermissionsConfigSchema: () => import_core6.PermissionsConfigSchema,
|
|
42
53
|
PricingStatusSchema: () => PricingStatusSchema,
|
|
43
54
|
PromptArgumentSchema: () => PromptArgumentSchema,
|
|
@@ -45,6 +56,9 @@ __export(responses_exports, {
|
|
|
45
56
|
PromptInfoSchema: () => PromptInfoSchema,
|
|
46
57
|
PromptSchema: () => PromptSchema,
|
|
47
58
|
ProviderCatalogSchema: () => ProviderCatalogSchema,
|
|
59
|
+
RateLimitErrorResponse: () => RateLimitErrorResponse,
|
|
60
|
+
RequestContentPartSchema: () => RequestContentPartSchema,
|
|
61
|
+
RequestContentSchema: () => RequestContentSchema,
|
|
48
62
|
ResourceConfigSchema: () => import_core7.ResourceConfigSchema,
|
|
49
63
|
ResourceSchema: () => ResourceSchema,
|
|
50
64
|
ScheduleSchema: () => ScheduleSchema,
|
|
@@ -61,16 +75,21 @@ __export(responses_exports, {
|
|
|
61
75
|
StatusResponseSchema: () => StatusResponseSchema,
|
|
62
76
|
StdioServerConfigSchema: () => import_core5.StdioServerConfigSchema,
|
|
63
77
|
TextPartSchema: () => TextPartSchema,
|
|
78
|
+
TimeoutErrorResponse: () => TimeoutErrorResponse,
|
|
64
79
|
TokenUsageSchema: () => TokenUsageSchema,
|
|
65
80
|
ToolCallSchema: () => ToolCallSchema,
|
|
81
|
+
ToolInputSchema: () => ToolInputSchema,
|
|
66
82
|
ToolSchema: () => ToolSchema,
|
|
67
83
|
UIResourcePartSchema: () => UIResourcePartSchema,
|
|
84
|
+
UpstreamErrorResponse: () => UpstreamErrorResponse,
|
|
68
85
|
UsageSummarySchema: () => UsageSummarySchema,
|
|
69
86
|
WebhookSchema: () => WebhookSchema,
|
|
70
|
-
WorkspaceSchema: () => WorkspaceSchema
|
|
87
|
+
WorkspaceSchema: () => WorkspaceSchema,
|
|
88
|
+
toApiContentPart: () => toApiContentPart,
|
|
89
|
+
toContentInput: () => toContentInput
|
|
71
90
|
});
|
|
72
91
|
module.exports = __toCommonJS(responses_exports);
|
|
73
|
-
var
|
|
92
|
+
var import_zod_openapi = require("@hono/zod-openapi");
|
|
74
93
|
var import_core = require("@dexto/core");
|
|
75
94
|
var import_core2 = require("@dexto/core");
|
|
76
95
|
var import_core3 = require("@dexto/core");
|
|
@@ -78,333 +97,561 @@ var import_core4 = require("@dexto/core");
|
|
|
78
97
|
var import_core5 = require("@dexto/core");
|
|
79
98
|
var import_core6 = require("@dexto/core");
|
|
80
99
|
var import_core7 = require("@dexto/core");
|
|
81
|
-
const
|
|
82
|
-
type:
|
|
83
|
-
|
|
100
|
+
const JsonValueOpenApiPlaceholder = {
|
|
101
|
+
type: "object",
|
|
102
|
+
additionalProperties: true,
|
|
103
|
+
description: "Any JSON-serializable value"
|
|
104
|
+
};
|
|
105
|
+
const JsonValueSchema = import_zod_openapi.z.lazy(
|
|
106
|
+
() => import_zod_openapi.z.union([
|
|
107
|
+
import_zod_openapi.z.string(),
|
|
108
|
+
import_zod_openapi.z.number(),
|
|
109
|
+
import_zod_openapi.z.boolean(),
|
|
110
|
+
import_zod_openapi.z.null(),
|
|
111
|
+
import_zod_openapi.z.array(JsonValueSchema),
|
|
112
|
+
import_zod_openapi.z.record(import_zod_openapi.z.string(), JsonValueSchema)
|
|
113
|
+
])
|
|
114
|
+
).openapi("JsonValue", JsonValueOpenApiPlaceholder).describe("Any JSON-serializable value");
|
|
115
|
+
const JsonObjectSchema = import_zod_openapi.z.record(import_zod_openapi.z.string(), JsonValueSchema).openapi("JsonObject", {
|
|
116
|
+
type: "object",
|
|
117
|
+
additionalProperties: true
|
|
118
|
+
}).describe("JSON object with arbitrary serializable values");
|
|
119
|
+
const JsonSchemaPrimitiveTypeSchema = import_zod_openapi.z.enum(["string", "number", "integer", "boolean", "object", "array"]).describe("JSON Schema primitive type");
|
|
120
|
+
const JsonSchemaEnumValueSchema = import_zod_openapi.z.union([import_zod_openapi.z.string(), import_zod_openapi.z.number(), import_zod_openapi.z.boolean(), import_zod_openapi.z.null()]).describe("Allowed JSON Schema enum value");
|
|
121
|
+
const JsonSchemaPropertySchema = import_zod_openapi.z.object({
|
|
122
|
+
type: JsonSchemaPrimitiveTypeSchema.optional().describe("Property type"),
|
|
123
|
+
description: import_zod_openapi.z.string().optional().describe("Property description"),
|
|
124
|
+
enum: import_zod_openapi.z.array(JsonSchemaEnumValueSchema).optional().describe("Enum values"),
|
|
125
|
+
default: JsonValueSchema.optional().describe("Default value"),
|
|
126
|
+
format: import_zod_openapi.z.string().optional().describe("JSON Schema format hint")
|
|
127
|
+
}).passthrough().describe("JSON Schema property definition");
|
|
128
|
+
const ToolInputSchema = import_zod_openapi.z.object({
|
|
129
|
+
type: import_zod_openapi.z.literal("object").optional().describe('Schema type, always "object" when present'),
|
|
130
|
+
properties: import_zod_openapi.z.record(import_zod_openapi.z.string(), JsonSchemaPropertySchema).optional().describe("Property definitions"),
|
|
131
|
+
required: import_zod_openapi.z.array(import_zod_openapi.z.string()).optional().describe("Required property names")
|
|
132
|
+
}).passthrough().describe("JSON Schema for tool input parameters");
|
|
133
|
+
const IssueSchema = import_zod_openapi.z.object({
|
|
134
|
+
code: import_zod_openapi.z.string().describe("Machine-readable issue code"),
|
|
135
|
+
message: import_zod_openapi.z.string().describe("Human-readable issue message"),
|
|
136
|
+
scope: import_zod_openapi.z.string().describe("Domain that produced the issue"),
|
|
137
|
+
type: import_zod_openapi.z.string().describe("Error type used for HTTP status mapping"),
|
|
138
|
+
severity: import_zod_openapi.z.enum(["error", "warning"]).describe("Issue severity"),
|
|
139
|
+
path: import_zod_openapi.z.array(import_zod_openapi.z.union([import_zod_openapi.z.string(), import_zod_openapi.z.number()])).optional().describe("Optional location for the issue"),
|
|
140
|
+
context: JsonValueSchema.optional().describe("Optional structured issue context")
|
|
141
|
+
}).strict().describe("Structured validation or runtime issue");
|
|
142
|
+
const ApiErrorResponseSchema = import_zod_openapi.z.object({
|
|
143
|
+
name: import_zod_openapi.z.string().optional().describe("Optional error class name"),
|
|
144
|
+
message: import_zod_openapi.z.string().describe("Human-readable error message"),
|
|
145
|
+
code: import_zod_openapi.z.string().optional().describe("Machine-readable error code"),
|
|
146
|
+
scope: import_zod_openapi.z.string().optional().describe("Domain that produced the error"),
|
|
147
|
+
type: import_zod_openapi.z.string().optional().describe("Error type used for HTTP status mapping"),
|
|
148
|
+
severity: import_zod_openapi.z.enum(["error", "warning"]).optional().describe("Optional error severity for lightweight failures"),
|
|
149
|
+
endpoint: import_zod_openapi.z.string().describe("Request path that failed"),
|
|
150
|
+
method: import_zod_openapi.z.string().describe("HTTP method for the failed request"),
|
|
151
|
+
traceId: import_zod_openapi.z.string().optional().describe("Optional trace identifier"),
|
|
152
|
+
recovery: import_zod_openapi.z.union([import_zod_openapi.z.string(), import_zod_openapi.z.array(import_zod_openapi.z.string())]).optional().describe("Optional recovery guidance"),
|
|
153
|
+
context: JsonValueSchema.optional().describe("Optional structured error context"),
|
|
154
|
+
issues: import_zod_openapi.z.array(IssueSchema).optional().describe("Validation issues when present"),
|
|
155
|
+
errorCount: import_zod_openapi.z.number().int().nonnegative().optional().describe("Number of errors"),
|
|
156
|
+
warningCount: import_zod_openapi.z.number().int().nonnegative().optional().describe("Number of warnings"),
|
|
157
|
+
stack: import_zod_openapi.z.string().optional().describe("Development-only stack trace")
|
|
158
|
+
}).strict().describe("Standard API error response");
|
|
159
|
+
const BadRequestErrorResponse = {
|
|
160
|
+
description: "Validation or request error",
|
|
161
|
+
content: {
|
|
162
|
+
"application/json": {
|
|
163
|
+
schema: ApiErrorResponseSchema
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const PaymentRequiredErrorResponse = {
|
|
168
|
+
description: "Payment required",
|
|
169
|
+
content: {
|
|
170
|
+
"application/json": {
|
|
171
|
+
schema: ApiErrorResponseSchema
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const ForbiddenErrorResponse = {
|
|
176
|
+
description: "Forbidden",
|
|
177
|
+
content: {
|
|
178
|
+
"application/json": {
|
|
179
|
+
schema: ApiErrorResponseSchema
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const NotFoundErrorResponse = {
|
|
184
|
+
description: "Resource not found",
|
|
185
|
+
content: {
|
|
186
|
+
"application/json": {
|
|
187
|
+
schema: ApiErrorResponseSchema
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
const TimeoutErrorResponse = {
|
|
192
|
+
description: "Request timed out",
|
|
193
|
+
content: {
|
|
194
|
+
"application/json": {
|
|
195
|
+
schema: ApiErrorResponseSchema
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const ConflictErrorResponse = {
|
|
200
|
+
description: "Conflict",
|
|
201
|
+
content: {
|
|
202
|
+
"application/json": {
|
|
203
|
+
schema: ApiErrorResponseSchema
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const RateLimitErrorResponse = {
|
|
208
|
+
description: "Rate limited",
|
|
209
|
+
content: {
|
|
210
|
+
"application/json": {
|
|
211
|
+
schema: ApiErrorResponseSchema
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
const InternalErrorResponse = {
|
|
216
|
+
description: "Internal server error",
|
|
217
|
+
content: {
|
|
218
|
+
"application/json": {
|
|
219
|
+
schema: ApiErrorResponseSchema
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const UpstreamErrorResponse = {
|
|
224
|
+
description: "Upstream service failure",
|
|
225
|
+
content: {
|
|
226
|
+
"application/json": {
|
|
227
|
+
schema: ApiErrorResponseSchema
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
const TextPartSchema = import_zod_openapi.z.object({
|
|
232
|
+
type: import_zod_openapi.z.literal("text").describe("Part type: text"),
|
|
233
|
+
text: import_zod_openapi.z.string().describe("Text content")
|
|
84
234
|
}).strict().describe("Text content part");
|
|
85
|
-
const ImagePartSchema =
|
|
86
|
-
type:
|
|
87
|
-
image:
|
|
88
|
-
mimeType:
|
|
235
|
+
const ImagePartSchema = import_zod_openapi.z.object({
|
|
236
|
+
type: import_zod_openapi.z.literal("image").describe("Part type: image"),
|
|
237
|
+
image: import_zod_openapi.z.string().describe("Base64-encoded image data"),
|
|
238
|
+
mimeType: import_zod_openapi.z.string().optional().describe("MIME type of the image")
|
|
89
239
|
}).strict().describe("Image content part");
|
|
90
|
-
const FilePartSchema =
|
|
91
|
-
type:
|
|
92
|
-
data:
|
|
93
|
-
mimeType:
|
|
94
|
-
filename:
|
|
240
|
+
const FilePartSchema = import_zod_openapi.z.object({
|
|
241
|
+
type: import_zod_openapi.z.literal("file").describe("Part type: file"),
|
|
242
|
+
data: import_zod_openapi.z.string().describe("Base64-encoded file data"),
|
|
243
|
+
mimeType: import_zod_openapi.z.string().describe("MIME type of the file"),
|
|
244
|
+
filename: import_zod_openapi.z.string().optional().describe("Optional filename")
|
|
95
245
|
}).strict().describe("File content part");
|
|
96
|
-
const UIResourcePartSchema =
|
|
97
|
-
type:
|
|
98
|
-
uri:
|
|
99
|
-
mimeType:
|
|
100
|
-
content:
|
|
101
|
-
blob:
|
|
102
|
-
metadata:
|
|
103
|
-
title:
|
|
104
|
-
preferredSize:
|
|
105
|
-
width:
|
|
106
|
-
height:
|
|
246
|
+
const UIResourcePartSchema = import_zod_openapi.z.object({
|
|
247
|
+
type: import_zod_openapi.z.literal("ui-resource").describe("Part type: ui-resource"),
|
|
248
|
+
uri: import_zod_openapi.z.string().describe("URI identifying the UI resource (must start with ui://)"),
|
|
249
|
+
mimeType: import_zod_openapi.z.string().describe("MIME type: text/html, text/uri-list, or application/vnd.mcp-ui.remote-dom"),
|
|
250
|
+
content: import_zod_openapi.z.string().optional().describe("Inline HTML content or URL"),
|
|
251
|
+
blob: import_zod_openapi.z.string().optional().describe("Base64-encoded content (alternative to content)"),
|
|
252
|
+
metadata: import_zod_openapi.z.object({
|
|
253
|
+
title: import_zod_openapi.z.string().optional().describe("Display title for the UI resource"),
|
|
254
|
+
preferredSize: import_zod_openapi.z.object({
|
|
255
|
+
width: import_zod_openapi.z.number().describe("Preferred width in pixels"),
|
|
256
|
+
height: import_zod_openapi.z.number().describe("Preferred height in pixels")
|
|
107
257
|
}).strict().optional().describe("Preferred rendering size")
|
|
108
258
|
}).strict().optional().describe("Optional metadata for the UI resource")
|
|
109
259
|
}).strict().describe("UI Resource content part for MCP-UI interactive components");
|
|
110
|
-
const ContentPartSchema =
|
|
260
|
+
const ContentPartSchema = import_zod_openapi.z.discriminatedUnion("type", [
|
|
111
261
|
TextPartSchema,
|
|
112
262
|
ImagePartSchema,
|
|
113
263
|
FilePartSchema,
|
|
114
264
|
UIResourcePartSchema
|
|
115
265
|
]).describe("Message content part (text, image, file, or UI resource)");
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
266
|
+
const RequestContentPartSchema = import_zod_openapi.z.discriminatedUnion("type", [TextPartSchema, ImagePartSchema, FilePartSchema]).describe("Request message content part (text, image, or file)");
|
|
267
|
+
const RequestContentSchema = import_zod_openapi.z.union([import_zod_openapi.z.string(), import_zod_openapi.z.array(RequestContentPartSchema)]).describe("Message content - string for text, or ContentPart[] for multimodal");
|
|
268
|
+
function serializeBinaryValue(value) {
|
|
269
|
+
if (typeof value === "string") {
|
|
270
|
+
return value;
|
|
271
|
+
}
|
|
272
|
+
if (value instanceof URL) {
|
|
273
|
+
return value.toString();
|
|
274
|
+
}
|
|
275
|
+
if (value instanceof ArrayBuffer) {
|
|
276
|
+
return Buffer.from(new Uint8Array(value)).toString("base64");
|
|
277
|
+
}
|
|
278
|
+
return Buffer.from(value).toString("base64");
|
|
279
|
+
}
|
|
280
|
+
function toContentInput(rawContent) {
|
|
281
|
+
if (typeof rawContent === "string") {
|
|
282
|
+
return [{ type: "text", text: rawContent }];
|
|
283
|
+
}
|
|
284
|
+
return rawContent.map((part) => {
|
|
285
|
+
switch (part.type) {
|
|
286
|
+
case "text":
|
|
287
|
+
return {
|
|
288
|
+
type: "text",
|
|
289
|
+
text: part.text
|
|
290
|
+
};
|
|
291
|
+
case "image":
|
|
292
|
+
return {
|
|
293
|
+
type: "image",
|
|
294
|
+
image: part.image,
|
|
295
|
+
...part.mimeType !== void 0 ? { mimeType: part.mimeType } : {}
|
|
296
|
+
};
|
|
297
|
+
case "file":
|
|
298
|
+
return {
|
|
299
|
+
type: "file",
|
|
300
|
+
data: part.data,
|
|
301
|
+
mimeType: part.mimeType,
|
|
302
|
+
...part.filename !== void 0 ? { filename: part.filename } : {}
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
function toApiContentPart(part) {
|
|
308
|
+
switch (part.type) {
|
|
309
|
+
case "text":
|
|
310
|
+
return {
|
|
311
|
+
type: "text",
|
|
312
|
+
text: part.text
|
|
313
|
+
};
|
|
314
|
+
case "image":
|
|
315
|
+
return {
|
|
316
|
+
type: "image",
|
|
317
|
+
image: serializeBinaryValue(part.image),
|
|
318
|
+
...part.mimeType !== void 0 ? { mimeType: part.mimeType } : {}
|
|
319
|
+
};
|
|
320
|
+
case "file":
|
|
321
|
+
return {
|
|
322
|
+
type: "file",
|
|
323
|
+
data: serializeBinaryValue(part.data),
|
|
324
|
+
mimeType: part.mimeType,
|
|
325
|
+
...part.filename !== void 0 ? { filename: part.filename } : {}
|
|
326
|
+
};
|
|
327
|
+
case "ui-resource":
|
|
328
|
+
return {
|
|
329
|
+
type: "ui-resource",
|
|
330
|
+
uri: part.uri,
|
|
331
|
+
mimeType: part.mimeType,
|
|
332
|
+
...part.content !== void 0 ? { content: part.content } : {},
|
|
333
|
+
...part.blob !== void 0 ? { blob: part.blob } : {},
|
|
334
|
+
...part.metadata !== void 0 ? { metadata: part.metadata } : {}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
const ToolCallSchema = import_zod_openapi.z.object({
|
|
339
|
+
id: import_zod_openapi.z.string().describe("Unique identifier for this tool call"),
|
|
340
|
+
type: import_zod_openapi.z.literal("function").describe("Tool call type (currently only function is supported)"),
|
|
341
|
+
function: import_zod_openapi.z.object({
|
|
342
|
+
name: import_zod_openapi.z.string().describe("Name of the function to call"),
|
|
343
|
+
arguments: import_zod_openapi.z.string().describe("Arguments for the function in JSON string format")
|
|
122
344
|
}).strict().describe("Function call details")
|
|
123
345
|
}).strict().describe("Tool call made by the assistant");
|
|
124
|
-
const TokenUsageSchema =
|
|
125
|
-
inputTokens:
|
|
126
|
-
outputTokens:
|
|
127
|
-
reasoningTokens:
|
|
128
|
-
cacheReadTokens:
|
|
129
|
-
cacheWriteTokens:
|
|
130
|
-
totalTokens:
|
|
346
|
+
const TokenUsageSchema = import_zod_openapi.z.object({
|
|
347
|
+
inputTokens: import_zod_openapi.z.number().int().nonnegative().optional().describe("Number of input tokens"),
|
|
348
|
+
outputTokens: import_zod_openapi.z.number().int().nonnegative().optional().describe("Number of output tokens"),
|
|
349
|
+
reasoningTokens: import_zod_openapi.z.number().int().nonnegative().optional().describe("Number of reasoning tokens"),
|
|
350
|
+
cacheReadTokens: import_zod_openapi.z.number().int().nonnegative().optional().describe("Number of cache read tokens"),
|
|
351
|
+
cacheWriteTokens: import_zod_openapi.z.number().int().nonnegative().optional().describe("Number of cache write tokens"),
|
|
352
|
+
totalTokens: import_zod_openapi.z.number().int().nonnegative().optional().describe("Total tokens used")
|
|
131
353
|
}).strict().describe("Token usage accounting");
|
|
132
|
-
const PricingStatusSchema =
|
|
133
|
-
const InternalMessageSchema =
|
|
134
|
-
id:
|
|
135
|
-
role:
|
|
136
|
-
timestamp:
|
|
137
|
-
content:
|
|
138
|
-
reasoning:
|
|
354
|
+
const PricingStatusSchema = import_zod_openapi.z.enum(import_core.LLM_PRICING_STATUSES).describe("Whether pricing was resolved for this response");
|
|
355
|
+
const InternalMessageSchema = import_zod_openapi.z.object({
|
|
356
|
+
id: import_zod_openapi.z.string().uuid().optional().describe("Unique message identifier (UUID)"),
|
|
357
|
+
role: import_zod_openapi.z.enum(["system", "user", "assistant", "tool"]).describe("Role of the message sender"),
|
|
358
|
+
timestamp: import_zod_openapi.z.number().int().positive().optional().describe("Creation timestamp (Unix ms)"),
|
|
359
|
+
content: import_zod_openapi.z.union([import_zod_openapi.z.string(), import_zod_openapi.z.null(), import_zod_openapi.z.array(ContentPartSchema)]).describe("Message content (string, null, or array of parts)"),
|
|
360
|
+
reasoning: import_zod_openapi.z.string().optional().describe("Optional model reasoning text"),
|
|
139
361
|
tokenUsage: TokenUsageSchema.optional().describe("Optional token usage accounting"),
|
|
140
|
-
estimatedCost:
|
|
362
|
+
estimatedCost: import_zod_openapi.z.number().nonnegative().optional().describe("Estimated cost in USD for this response"),
|
|
141
363
|
pricingStatus: PricingStatusSchema.optional().describe(
|
|
142
364
|
"Whether pricing was resolved for this response"
|
|
143
365
|
),
|
|
144
|
-
usageScopeId:
|
|
145
|
-
model:
|
|
146
|
-
provider:
|
|
147
|
-
toolCalls:
|
|
148
|
-
toolCallId:
|
|
149
|
-
name:
|
|
150
|
-
success:
|
|
366
|
+
usageScopeId: import_zod_openapi.z.string().optional().describe("Optional usage scope identifier for runtime-scoped metering"),
|
|
367
|
+
model: import_zod_openapi.z.string().optional().describe("Model identifier for assistant messages"),
|
|
368
|
+
provider: import_zod_openapi.z.enum(import_core.LLM_PROVIDERS).optional().describe("Provider identifier for assistant messages"),
|
|
369
|
+
toolCalls: import_zod_openapi.z.array(ToolCallSchema).optional().describe("Tool calls made by the assistant"),
|
|
370
|
+
toolCallId: import_zod_openapi.z.string().optional().describe("ID of the tool call this message responds to"),
|
|
371
|
+
name: import_zod_openapi.z.string().optional().describe("Name of the tool that produced this result"),
|
|
372
|
+
success: import_zod_openapi.z.boolean().optional().describe("Whether tool execution succeeded (present for role=tool messages)")
|
|
151
373
|
}).strict().describe("Internal message representation");
|
|
152
374
|
const LLMConfigResponseSchema = import_core.LLMConfigBaseSchema.omit({ apiKey: true }).extend({
|
|
153
|
-
hasApiKey:
|
|
375
|
+
hasApiKey: import_zod_openapi.z.boolean().optional().describe("Whether an API key is configured")
|
|
154
376
|
}).describe("LLM configuration (apiKey omitted for security)");
|
|
155
377
|
const LLMConfigSchema = import_core.LLMConfigBaseSchema.describe("LLM configuration with API key");
|
|
156
378
|
const SessionTokenUsageSchema = TokenUsageSchema.required().describe(
|
|
157
379
|
"Session-level token usage (all fields required for cumulative totals)"
|
|
158
380
|
);
|
|
159
|
-
const SessionUsageTrackingSchema =
|
|
160
|
-
hasUntrackedChatGPTLoginUsage:
|
|
381
|
+
const SessionUsageTrackingSchema = import_zod_openapi.z.object({
|
|
382
|
+
hasUntrackedChatGPTLoginUsage: import_zod_openapi.z.boolean().optional().describe("Whether this session includes known untracked ChatGPT Login usage")
|
|
161
383
|
}).strict().describe("Usage tracking caveats for a session");
|
|
162
|
-
const ModelStatisticsSchema =
|
|
163
|
-
provider:
|
|
164
|
-
model:
|
|
165
|
-
messageCount:
|
|
384
|
+
const ModelStatisticsSchema = import_zod_openapi.z.object({
|
|
385
|
+
provider: import_zod_openapi.z.string().describe("LLM provider identifier"),
|
|
386
|
+
model: import_zod_openapi.z.string().describe("Model identifier"),
|
|
387
|
+
messageCount: import_zod_openapi.z.number().int().nonnegative().describe("Number of messages using this model"),
|
|
166
388
|
tokenUsage: SessionTokenUsageSchema.describe("Token usage for this model"),
|
|
167
|
-
estimatedCost:
|
|
168
|
-
firstUsedAt:
|
|
169
|
-
lastUsedAt:
|
|
389
|
+
estimatedCost: import_zod_openapi.z.number().nonnegative().describe("Estimated cost in USD for this model"),
|
|
390
|
+
firstUsedAt: import_zod_openapi.z.number().int().positive().describe("First use timestamp (Unix ms)"),
|
|
391
|
+
lastUsedAt: import_zod_openapi.z.number().int().positive().describe("Last use timestamp (Unix ms)")
|
|
170
392
|
}).strict().describe("Per-model statistics within a session");
|
|
171
|
-
const UsageSummarySchema =
|
|
393
|
+
const UsageSummarySchema = import_zod_openapi.z.object({
|
|
172
394
|
tokenUsage: SessionTokenUsageSchema.describe(
|
|
173
395
|
"Aggregate token usage for the selected scope"
|
|
174
396
|
),
|
|
175
|
-
estimatedCost:
|
|
176
|
-
hasUnpricedResponses:
|
|
397
|
+
estimatedCost: import_zod_openapi.z.number().nonnegative().describe("Total estimated cost in USD for the selected scope"),
|
|
398
|
+
hasUnpricedResponses: import_zod_openapi.z.boolean().describe(
|
|
177
399
|
"Whether any response in the selected scope has usage but no resolved pricing"
|
|
178
400
|
),
|
|
179
|
-
modelStats:
|
|
180
|
-
|
|
181
|
-
provider:
|
|
182
|
-
model:
|
|
183
|
-
messageCount:
|
|
401
|
+
modelStats: import_zod_openapi.z.array(
|
|
402
|
+
import_zod_openapi.z.object({
|
|
403
|
+
provider: import_zod_openapi.z.string().describe("LLM provider identifier"),
|
|
404
|
+
model: import_zod_openapi.z.string().describe("Model identifier"),
|
|
405
|
+
messageCount: import_zod_openapi.z.number().int().nonnegative().describe("Number of responses using this model in the selected scope"),
|
|
184
406
|
tokenUsage: SessionTokenUsageSchema.describe(
|
|
185
407
|
"Token usage for this model in the selected scope"
|
|
186
408
|
),
|
|
187
|
-
estimatedCost:
|
|
409
|
+
estimatedCost: import_zod_openapi.z.number().nonnegative().describe("Estimated cost in USD for this model in the selected scope")
|
|
188
410
|
}).strict()
|
|
189
411
|
).optional().describe("Per-model usage statistics within the selected scope")
|
|
190
412
|
}).strict().describe("Usage summary for a session or session scope");
|
|
191
413
|
const ScopedUsageSummarySchema = UsageSummarySchema.extend({
|
|
192
|
-
scopeId:
|
|
414
|
+
scopeId: import_zod_openapi.z.string().describe("Usage scope identifier")
|
|
193
415
|
}).strict().describe("Usage summary for a specific scope within a session");
|
|
194
|
-
const SessionMetadataSchema =
|
|
195
|
-
id:
|
|
196
|
-
createdAt:
|
|
197
|
-
lastActivity:
|
|
198
|
-
messageCount:
|
|
199
|
-
title:
|
|
416
|
+
const SessionMetadataSchema = import_zod_openapi.z.object({
|
|
417
|
+
id: import_zod_openapi.z.string().describe("Unique session identifier"),
|
|
418
|
+
createdAt: import_zod_openapi.z.number().int().positive().nullable().describe("Creation timestamp (Unix ms, null if unavailable)"),
|
|
419
|
+
lastActivity: import_zod_openapi.z.number().int().positive().nullable().describe("Last activity timestamp (Unix ms, null if unavailable)"),
|
|
420
|
+
messageCount: import_zod_openapi.z.number().int().nonnegative().describe("Total number of messages in session"),
|
|
421
|
+
title: import_zod_openapi.z.string().optional().nullable().describe("Optional session title"),
|
|
200
422
|
tokenUsage: SessionTokenUsageSchema.optional().describe(
|
|
201
423
|
"Aggregate token usage across all models"
|
|
202
424
|
),
|
|
203
|
-
estimatedCost:
|
|
204
|
-
modelStats:
|
|
425
|
+
estimatedCost: import_zod_openapi.z.number().nonnegative().optional().describe("Total estimated cost in USD across all models"),
|
|
426
|
+
modelStats: import_zod_openapi.z.array(ModelStatisticsSchema).optional().describe("Per-model usage statistics (for multi-model sessions)"),
|
|
205
427
|
usageTracking: SessionUsageTrackingSchema.optional().describe(
|
|
206
428
|
"Known caveats or gaps in usage tracking for this session"
|
|
207
429
|
),
|
|
208
|
-
workspaceId:
|
|
209
|
-
parentSessionId:
|
|
430
|
+
workspaceId: import_zod_openapi.z.string().optional().nullable().describe("Associated workspace ID, if any"),
|
|
431
|
+
parentSessionId: import_zod_openapi.z.string().optional().nullable().describe("Parent session ID if this session was forked, otherwise null")
|
|
210
432
|
}).strict().describe("Session metadata");
|
|
211
|
-
const WorkspaceSchema =
|
|
212
|
-
id:
|
|
213
|
-
path:
|
|
214
|
-
name:
|
|
215
|
-
createdAt:
|
|
216
|
-
lastActiveAt:
|
|
433
|
+
const WorkspaceSchema = import_zod_openapi.z.object({
|
|
434
|
+
id: import_zod_openapi.z.string().describe("Workspace identifier"),
|
|
435
|
+
path: import_zod_openapi.z.string().describe("Workspace root path"),
|
|
436
|
+
name: import_zod_openapi.z.string().optional().nullable().describe("Optional workspace display name"),
|
|
437
|
+
createdAt: import_zod_openapi.z.number().int().positive().describe("Creation timestamp (Unix ms)"),
|
|
438
|
+
lastActiveAt: import_zod_openapi.z.number().int().positive().describe("Last active timestamp (Unix ms)")
|
|
217
439
|
}).strict().describe("Workspace metadata");
|
|
218
|
-
const ScheduleTaskSchema =
|
|
219
|
-
instruction:
|
|
220
|
-
metadata:
|
|
440
|
+
const ScheduleTaskSchema = import_zod_openapi.z.object({
|
|
441
|
+
instruction: import_zod_openapi.z.string().describe("Instruction to execute"),
|
|
442
|
+
metadata: JsonObjectSchema.optional().describe("Optional task metadata")
|
|
221
443
|
}).strict().describe("Schedule task definition");
|
|
222
|
-
const ScheduleSchema =
|
|
223
|
-
id:
|
|
224
|
-
name:
|
|
225
|
-
cronExpression:
|
|
226
|
-
timezone:
|
|
227
|
-
enabled:
|
|
444
|
+
const ScheduleSchema = import_zod_openapi.z.object({
|
|
445
|
+
id: import_zod_openapi.z.string().describe("Schedule ID"),
|
|
446
|
+
name: import_zod_openapi.z.string().describe("Schedule name"),
|
|
447
|
+
cronExpression: import_zod_openapi.z.string().describe("Cron expression"),
|
|
448
|
+
timezone: import_zod_openapi.z.string().describe("Timezone for schedule"),
|
|
449
|
+
enabled: import_zod_openapi.z.boolean().describe("Whether the schedule is enabled"),
|
|
228
450
|
task: ScheduleTaskSchema.describe("Schedule task configuration"),
|
|
229
|
-
sessionMode:
|
|
230
|
-
sessionId:
|
|
231
|
-
workspacePath:
|
|
232
|
-
createdAt:
|
|
233
|
-
updatedAt:
|
|
234
|
-
lastRunAt:
|
|
235
|
-
nextRunAt:
|
|
236
|
-
runCount:
|
|
237
|
-
successCount:
|
|
238
|
-
failureCount:
|
|
239
|
-
lastError:
|
|
451
|
+
sessionMode: import_zod_openapi.z.enum(["ephemeral", "dedicated", "inherit", "fixed"]).describe("Session context mode"),
|
|
452
|
+
sessionId: import_zod_openapi.z.string().optional().describe("Session ID when using fixed/inherit mode"),
|
|
453
|
+
workspacePath: import_zod_openapi.z.string().optional().describe("Workspace path override"),
|
|
454
|
+
createdAt: import_zod_openapi.z.number().int().positive().describe("Creation timestamp (Unix ms)"),
|
|
455
|
+
updatedAt: import_zod_openapi.z.number().int().positive().describe("Last update timestamp (Unix ms)"),
|
|
456
|
+
lastRunAt: import_zod_openapi.z.number().int().positive().optional().describe("Last run timestamp (Unix ms)"),
|
|
457
|
+
nextRunAt: import_zod_openapi.z.number().int().positive().optional().describe("Next run timestamp (Unix ms)"),
|
|
458
|
+
runCount: import_zod_openapi.z.number().int().nonnegative().describe("Total executions"),
|
|
459
|
+
successCount: import_zod_openapi.z.number().int().nonnegative().describe("Successful executions"),
|
|
460
|
+
failureCount: import_zod_openapi.z.number().int().nonnegative().describe("Failed executions"),
|
|
461
|
+
lastError: import_zod_openapi.z.string().optional().describe("Last execution error, if any")
|
|
240
462
|
}).strict().describe("Automation schedule");
|
|
241
|
-
const ExecutionLogSchema =
|
|
242
|
-
id:
|
|
243
|
-
scheduleId:
|
|
244
|
-
triggeredAt:
|
|
245
|
-
completedAt:
|
|
246
|
-
status:
|
|
247
|
-
duration:
|
|
248
|
-
error:
|
|
249
|
-
result:
|
|
463
|
+
const ExecutionLogSchema = import_zod_openapi.z.object({
|
|
464
|
+
id: import_zod_openapi.z.string().describe("Execution log ID"),
|
|
465
|
+
scheduleId: import_zod_openapi.z.string().describe("Schedule ID"),
|
|
466
|
+
triggeredAt: import_zod_openapi.z.number().int().positive().describe("Trigger timestamp (Unix ms)"),
|
|
467
|
+
completedAt: import_zod_openapi.z.number().int().positive().optional().describe("Completion timestamp (Unix ms)"),
|
|
468
|
+
status: import_zod_openapi.z.enum(["pending", "success", "failed", "timeout"]).describe("Execution status"),
|
|
469
|
+
duration: import_zod_openapi.z.number().int().nonnegative().optional().describe("Execution duration in ms"),
|
|
470
|
+
error: import_zod_openapi.z.string().optional().describe("Execution error, if any"),
|
|
471
|
+
result: import_zod_openapi.z.string().optional().describe("Execution result, if any")
|
|
250
472
|
}).strict().describe("Schedule execution log");
|
|
251
|
-
const SearchResultSchema =
|
|
252
|
-
sessionId:
|
|
473
|
+
const SearchResultSchema = import_zod_openapi.z.object({
|
|
474
|
+
sessionId: import_zod_openapi.z.string().describe("Session ID where the message was found"),
|
|
253
475
|
message: InternalMessageSchema.describe("The message that matched the search"),
|
|
254
|
-
matchedText:
|
|
255
|
-
context:
|
|
256
|
-
messageIndex:
|
|
476
|
+
matchedText: import_zod_openapi.z.string().describe("The specific text that matched the search query"),
|
|
477
|
+
context: import_zod_openapi.z.string().describe("Context around the match for preview"),
|
|
478
|
+
messageIndex: import_zod_openapi.z.number().int().nonnegative().describe("Index of the message within the session")
|
|
257
479
|
}).strict().describe("Result of a message search");
|
|
258
|
-
const SessionSearchResultSchema =
|
|
259
|
-
sessionId:
|
|
260
|
-
matchCount:
|
|
480
|
+
const SessionSearchResultSchema = import_zod_openapi.z.object({
|
|
481
|
+
sessionId: import_zod_openapi.z.string().describe("Session ID"),
|
|
482
|
+
matchCount: import_zod_openapi.z.number().int().nonnegative().describe("Number of messages that matched in this session"),
|
|
261
483
|
firstMatch: SearchResultSchema.describe("Preview of the first matching message"),
|
|
262
|
-
metadata:
|
|
263
|
-
createdAt:
|
|
264
|
-
lastActivity:
|
|
265
|
-
messageCount:
|
|
484
|
+
metadata: import_zod_openapi.z.object({
|
|
485
|
+
createdAt: import_zod_openapi.z.number().int().positive().describe("Session creation timestamp"),
|
|
486
|
+
lastActivity: import_zod_openapi.z.number().int().positive().describe("Last activity timestamp"),
|
|
487
|
+
messageCount: import_zod_openapi.z.number().int().nonnegative().describe("Total messages in session")
|
|
266
488
|
}).strict().describe("Session metadata")
|
|
267
489
|
}).strict().describe("Result of a session search");
|
|
268
|
-
const MessageSearchResponseSchema =
|
|
269
|
-
results:
|
|
270
|
-
total:
|
|
271
|
-
hasMore:
|
|
272
|
-
query:
|
|
490
|
+
const MessageSearchResponseSchema = import_zod_openapi.z.object({
|
|
491
|
+
results: import_zod_openapi.z.array(SearchResultSchema).describe("Array of search results"),
|
|
492
|
+
total: import_zod_openapi.z.number().int().nonnegative().describe("Total number of results available"),
|
|
493
|
+
hasMore: import_zod_openapi.z.boolean().describe("Whether there are more results beyond the current page"),
|
|
494
|
+
query: import_zod_openapi.z.string().describe("Query that was searched")
|
|
273
495
|
}).strict().describe("Message search response");
|
|
274
|
-
const SessionSearchResponseSchema =
|
|
275
|
-
results:
|
|
276
|
-
total:
|
|
277
|
-
hasMore:
|
|
496
|
+
const SessionSearchResponseSchema = import_zod_openapi.z.object({
|
|
497
|
+
results: import_zod_openapi.z.array(SessionSearchResultSchema).describe("Array of session search results"),
|
|
498
|
+
total: import_zod_openapi.z.number().int().nonnegative().describe("Total number of sessions with matches"),
|
|
499
|
+
hasMore: import_zod_openapi.z.boolean().describe(
|
|
278
500
|
"Always false - session search returns all matching sessions without pagination"
|
|
279
501
|
),
|
|
280
|
-
query:
|
|
502
|
+
query: import_zod_openapi.z.string().describe("Query that was searched")
|
|
281
503
|
}).strict().describe("Session search response");
|
|
282
|
-
const WebhookSchema =
|
|
283
|
-
id:
|
|
284
|
-
url:
|
|
285
|
-
events:
|
|
286
|
-
createdAt:
|
|
504
|
+
const WebhookSchema = import_zod_openapi.z.object({
|
|
505
|
+
id: import_zod_openapi.z.string().describe("Unique webhook identifier"),
|
|
506
|
+
url: import_zod_openapi.z.string().url().describe("Webhook URL to send events to"),
|
|
507
|
+
events: import_zod_openapi.z.array(import_zod_openapi.z.string()).describe("Array of event types this webhook subscribes to"),
|
|
508
|
+
createdAt: import_zod_openapi.z.number().int().positive().describe("Creation timestamp (Unix ms)")
|
|
287
509
|
}).strict().describe("Webhook subscription");
|
|
288
|
-
const CatalogModelInfoSchema =
|
|
289
|
-
name:
|
|
290
|
-
maxInputTokens:
|
|
291
|
-
default:
|
|
292
|
-
supportedFileTypes:
|
|
293
|
-
displayName:
|
|
294
|
-
pricing:
|
|
295
|
-
inputPerM:
|
|
296
|
-
outputPerM:
|
|
297
|
-
cacheReadPerM:
|
|
298
|
-
cacheWritePerM:
|
|
299
|
-
currency:
|
|
300
|
-
unit:
|
|
510
|
+
const CatalogModelInfoSchema = import_zod_openapi.z.object({
|
|
511
|
+
name: import_zod_openapi.z.string().describe("Model name identifier"),
|
|
512
|
+
maxInputTokens: import_zod_openapi.z.number().int().positive().describe("Maximum input tokens"),
|
|
513
|
+
default: import_zod_openapi.z.boolean().optional().describe("Whether this is a default model"),
|
|
514
|
+
supportedFileTypes: import_zod_openapi.z.array(import_zod_openapi.z.enum(["audio", "pdf", "image"])).describe("File types this model supports"),
|
|
515
|
+
displayName: import_zod_openapi.z.string().optional().describe("Human-readable display name"),
|
|
516
|
+
pricing: import_zod_openapi.z.object({
|
|
517
|
+
inputPerM: import_zod_openapi.z.number().describe("Input cost per million tokens (USD)"),
|
|
518
|
+
outputPerM: import_zod_openapi.z.number().describe("Output cost per million tokens (USD)"),
|
|
519
|
+
cacheReadPerM: import_zod_openapi.z.number().optional().describe("Cache read cost per million tokens"),
|
|
520
|
+
cacheWritePerM: import_zod_openapi.z.number().optional().describe("Cache write cost per million tokens"),
|
|
521
|
+
currency: import_zod_openapi.z.literal("USD").optional().describe("Currency"),
|
|
522
|
+
unit: import_zod_openapi.z.literal("per_million_tokens").optional().describe("Unit")
|
|
301
523
|
}).optional().describe("Pricing information in USD per million tokens")
|
|
302
524
|
}).strict().describe("Model information from LLM registry");
|
|
303
|
-
const ProviderCatalogSchema =
|
|
304
|
-
name:
|
|
305
|
-
hasApiKey:
|
|
306
|
-
primaryEnvVar:
|
|
307
|
-
supportsBaseURL:
|
|
308
|
-
models:
|
|
309
|
-
supportedFileTypes:
|
|
525
|
+
const ProviderCatalogSchema = import_zod_openapi.z.object({
|
|
526
|
+
name: import_zod_openapi.z.string().describe("Provider display name"),
|
|
527
|
+
hasApiKey: import_zod_openapi.z.boolean().describe("Whether API key is configured"),
|
|
528
|
+
primaryEnvVar: import_zod_openapi.z.string().describe("Primary environment variable for API key"),
|
|
529
|
+
supportsBaseURL: import_zod_openapi.z.boolean().describe("Whether custom base URLs are supported"),
|
|
530
|
+
models: import_zod_openapi.z.array(CatalogModelInfoSchema).describe("Models available from this provider"),
|
|
531
|
+
supportedFileTypes: import_zod_openapi.z.array(import_zod_openapi.z.enum(["audio", "pdf", "image"])).describe("Provider-level file type support")
|
|
310
532
|
}).strict().describe("Provider catalog entry with models and capabilities");
|
|
311
533
|
const ModelFlatSchema = CatalogModelInfoSchema.extend({
|
|
312
|
-
provider:
|
|
534
|
+
provider: import_zod_openapi.z.string().describe("Provider identifier for this model")
|
|
313
535
|
}).describe("Flattened model entry with provider information");
|
|
314
|
-
const AgentRegistryEntrySchema =
|
|
315
|
-
id:
|
|
316
|
-
name:
|
|
317
|
-
description:
|
|
318
|
-
author:
|
|
319
|
-
tags:
|
|
320
|
-
type:
|
|
536
|
+
const AgentRegistryEntrySchema = import_zod_openapi.z.object({
|
|
537
|
+
id: import_zod_openapi.z.string().describe("Unique agent identifier"),
|
|
538
|
+
name: import_zod_openapi.z.string().describe("Agent name"),
|
|
539
|
+
description: import_zod_openapi.z.string().describe("Agent description"),
|
|
540
|
+
author: import_zod_openapi.z.string().optional().describe("Agent author"),
|
|
541
|
+
tags: import_zod_openapi.z.array(import_zod_openapi.z.string()).optional().describe("Agent tags"),
|
|
542
|
+
type: import_zod_openapi.z.enum(["builtin", "custom"]).describe("Agent type")
|
|
321
543
|
}).strict().describe("Agent registry entry");
|
|
322
|
-
const ResourceSchema =
|
|
323
|
-
uri:
|
|
324
|
-
name:
|
|
325
|
-
description:
|
|
326
|
-
mimeType:
|
|
327
|
-
source:
|
|
328
|
-
serverName:
|
|
329
|
-
size:
|
|
330
|
-
lastModified:
|
|
331
|
-
metadata:
|
|
544
|
+
const ResourceSchema = import_zod_openapi.z.object({
|
|
545
|
+
uri: import_zod_openapi.z.string().describe("Resource URI"),
|
|
546
|
+
name: import_zod_openapi.z.string().optional().describe("Resource name"),
|
|
547
|
+
description: import_zod_openapi.z.string().optional().describe("Resource description"),
|
|
548
|
+
mimeType: import_zod_openapi.z.string().optional().describe("MIME type of the resource"),
|
|
549
|
+
source: import_zod_openapi.z.enum(["mcp", "internal"]).describe("Source system that provides this resource"),
|
|
550
|
+
serverName: import_zod_openapi.z.string().optional().describe("Original server/provider name (for MCP resources)"),
|
|
551
|
+
size: import_zod_openapi.z.number().optional().describe("Size of the resource in bytes (if known)"),
|
|
552
|
+
lastModified: import_zod_openapi.z.string().datetime().optional().describe("Last modified timestamp (ISO 8601 string)"),
|
|
553
|
+
metadata: import_zod_openapi.z.record(import_zod_openapi.z.string(), JsonValueSchema).optional().describe("Additional metadata specific to the resource type")
|
|
332
554
|
}).strict().describe("Resource metadata");
|
|
333
|
-
const ToolSchema =
|
|
334
|
-
name:
|
|
335
|
-
description:
|
|
336
|
-
inputSchema:
|
|
555
|
+
const ToolSchema = import_zod_openapi.z.object({
|
|
556
|
+
name: import_zod_openapi.z.string().describe("Tool name"),
|
|
557
|
+
description: import_zod_openapi.z.string().describe("Tool description"),
|
|
558
|
+
inputSchema: ToolInputSchema.describe("JSON Schema for tool input parameters")
|
|
337
559
|
}).strict().describe("Tool metadata");
|
|
338
|
-
const PromptArgumentSchema =
|
|
339
|
-
name:
|
|
340
|
-
description:
|
|
341
|
-
required:
|
|
560
|
+
const PromptArgumentSchema = import_zod_openapi.z.object({
|
|
561
|
+
name: import_zod_openapi.z.string().describe("Argument name"),
|
|
562
|
+
description: import_zod_openapi.z.string().optional().describe("Argument description"),
|
|
563
|
+
required: import_zod_openapi.z.boolean().optional().describe("Whether the argument is required")
|
|
342
564
|
}).strict().describe("Prompt argument definition");
|
|
343
|
-
const PromptDefinitionSchema =
|
|
344
|
-
name:
|
|
345
|
-
title:
|
|
346
|
-
description:
|
|
347
|
-
arguments:
|
|
565
|
+
const PromptDefinitionSchema = import_zod_openapi.z.object({
|
|
566
|
+
name: import_zod_openapi.z.string().describe("Prompt name"),
|
|
567
|
+
title: import_zod_openapi.z.string().optional().describe("Prompt title"),
|
|
568
|
+
description: import_zod_openapi.z.string().optional().describe("Prompt description"),
|
|
569
|
+
arguments: import_zod_openapi.z.array(PromptArgumentSchema).optional().describe("Array of argument definitions"),
|
|
570
|
+
disableModelInvocation: import_zod_openapi.z.boolean().optional().describe("Exclude from auto-invocation list in system prompt"),
|
|
571
|
+
userInvocable: import_zod_openapi.z.boolean().optional().describe("Whether to show in slash command menu"),
|
|
572
|
+
allowedTools: import_zod_openapi.z.array(import_zod_openapi.z.string()).optional().describe("Tools to auto-approve when this prompt is active"),
|
|
573
|
+
toolkits: import_zod_openapi.z.array(import_zod_openapi.z.string()).optional().describe("Toolkits to load when invoked"),
|
|
574
|
+
model: import_zod_openapi.z.string().optional().describe("Model to use when this prompt is invoked"),
|
|
575
|
+
context: import_zod_openapi.z.enum(["inline", "fork"]).optional().describe("Execution context for this prompt"),
|
|
576
|
+
agent: import_zod_openapi.z.string().optional().describe("Agent ID to use for fork execution")
|
|
348
577
|
}).strict().describe("Prompt definition (MCP-compliant)");
|
|
349
|
-
const PromptInfoSchema =
|
|
350
|
-
name:
|
|
351
|
-
title:
|
|
352
|
-
description:
|
|
353
|
-
arguments:
|
|
354
|
-
|
|
355
|
-
|
|
578
|
+
const PromptInfoSchema = import_zod_openapi.z.object({
|
|
579
|
+
name: import_zod_openapi.z.string().describe("Prompt name"),
|
|
580
|
+
title: import_zod_openapi.z.string().optional().describe("Prompt title"),
|
|
581
|
+
description: import_zod_openapi.z.string().optional().describe("Prompt description"),
|
|
582
|
+
arguments: import_zod_openapi.z.array(PromptArgumentSchema).optional().describe("Array of argument definitions"),
|
|
583
|
+
disableModelInvocation: import_zod_openapi.z.boolean().optional().describe("Exclude from auto-invocation list in system prompt"),
|
|
584
|
+
userInvocable: import_zod_openapi.z.boolean().optional().describe("Whether to show in slash command menu"),
|
|
585
|
+
allowedTools: import_zod_openapi.z.array(import_zod_openapi.z.string()).optional().describe("Tools to auto-approve when this prompt is active"),
|
|
586
|
+
toolkits: import_zod_openapi.z.array(import_zod_openapi.z.string()).optional().describe("Toolkits to load when invoked"),
|
|
587
|
+
model: import_zod_openapi.z.string().optional().describe("Model to use when this prompt is invoked"),
|
|
588
|
+
context: import_zod_openapi.z.enum(["inline", "fork"]).optional().describe("Execution context for this prompt"),
|
|
589
|
+
agent: import_zod_openapi.z.string().optional().describe("Agent ID to use for fork execution"),
|
|
590
|
+
source: import_zod_openapi.z.enum(["mcp", "config", "custom"]).describe("Source of the prompt"),
|
|
591
|
+
displayName: import_zod_openapi.z.string().optional().describe("Base display name set by provider"),
|
|
592
|
+
commandName: import_zod_openapi.z.string().optional().describe("Collision-resolved slash command name"),
|
|
593
|
+
metadata: JsonObjectSchema.optional().describe("Additional metadata")
|
|
356
594
|
}).strict().describe("Enhanced prompt information");
|
|
357
|
-
const PromptSchema =
|
|
358
|
-
id:
|
|
359
|
-
name:
|
|
360
|
-
description:
|
|
361
|
-
content:
|
|
362
|
-
variables:
|
|
595
|
+
const PromptSchema = import_zod_openapi.z.object({
|
|
596
|
+
id: import_zod_openapi.z.string().describe("Unique prompt identifier"),
|
|
597
|
+
name: import_zod_openapi.z.string().describe("Prompt name"),
|
|
598
|
+
description: import_zod_openapi.z.string().optional().describe("Prompt description"),
|
|
599
|
+
content: import_zod_openapi.z.string().describe("Prompt template content"),
|
|
600
|
+
variables: import_zod_openapi.z.array(import_zod_openapi.z.string()).optional().describe("List of variable placeholders in the prompt")
|
|
363
601
|
}).strict().describe("Prompt template");
|
|
364
|
-
const OkResponseSchema = (dataSchema) =>
|
|
365
|
-
ok:
|
|
602
|
+
const OkResponseSchema = (dataSchema) => import_zod_openapi.z.object({
|
|
603
|
+
ok: import_zod_openapi.z.literal(true).describe("Indicates successful response"),
|
|
366
604
|
data: dataSchema.describe("Response data")
|
|
367
605
|
}).strict().describe("Successful API response");
|
|
368
|
-
const ErrorResponseSchema =
|
|
369
|
-
ok:
|
|
370
|
-
error:
|
|
371
|
-
message:
|
|
372
|
-
code:
|
|
373
|
-
details:
|
|
606
|
+
const ErrorResponseSchema = import_zod_openapi.z.object({
|
|
607
|
+
ok: import_zod_openapi.z.literal(false).describe("Indicates failed response"),
|
|
608
|
+
error: import_zod_openapi.z.object({
|
|
609
|
+
message: import_zod_openapi.z.string().describe("Error message"),
|
|
610
|
+
code: import_zod_openapi.z.string().optional().describe("Error code"),
|
|
611
|
+
details: JsonValueSchema.optional().describe("Additional error details")
|
|
374
612
|
}).strict().describe("Error details")
|
|
375
613
|
}).strict().describe("Error API response");
|
|
376
|
-
const StandardErrorEnvelopeSchema =
|
|
377
|
-
code:
|
|
378
|
-
message:
|
|
379
|
-
scope:
|
|
380
|
-
type:
|
|
381
|
-
context:
|
|
382
|
-
recovery:
|
|
383
|
-
traceId:
|
|
384
|
-
endpoint:
|
|
385
|
-
method:
|
|
614
|
+
const StandardErrorEnvelopeSchema = import_zod_openapi.z.object({
|
|
615
|
+
code: import_zod_openapi.z.string().describe("Error code"),
|
|
616
|
+
message: import_zod_openapi.z.string().describe("Error message"),
|
|
617
|
+
scope: import_zod_openapi.z.string().describe("Error scope"),
|
|
618
|
+
type: import_zod_openapi.z.string().describe("Error type"),
|
|
619
|
+
context: JsonValueSchema.optional().describe("Error context"),
|
|
620
|
+
recovery: import_zod_openapi.z.union([import_zod_openapi.z.string(), import_zod_openapi.z.array(import_zod_openapi.z.string())]).optional().describe("Recovery guidance"),
|
|
621
|
+
traceId: import_zod_openapi.z.string().describe("Trace identifier"),
|
|
622
|
+
endpoint: import_zod_openapi.z.string().describe("Request endpoint"),
|
|
623
|
+
method: import_zod_openapi.z.string().describe("HTTP method")
|
|
386
624
|
}).strict().describe("Standard API error envelope");
|
|
387
|
-
const StatusResponseSchema =
|
|
388
|
-
status:
|
|
389
|
-
message:
|
|
625
|
+
const StatusResponseSchema = import_zod_openapi.z.object({
|
|
626
|
+
status: import_zod_openapi.z.string().describe("Operation status"),
|
|
627
|
+
message: import_zod_openapi.z.string().optional().describe("Optional status message")
|
|
390
628
|
}).strict().describe("Status response");
|
|
391
|
-
const DeleteResponseSchema =
|
|
392
|
-
status:
|
|
393
|
-
id:
|
|
629
|
+
const DeleteResponseSchema = import_zod_openapi.z.object({
|
|
630
|
+
status: import_zod_openapi.z.literal("deleted").describe("Indicates successful deletion"),
|
|
631
|
+
id: import_zod_openapi.z.string().optional().describe("ID of the deleted resource")
|
|
394
632
|
}).strict().describe("Delete operation response");
|
|
395
633
|
// Annotate the CommonJS export names for ESM import in node:
|
|
396
634
|
0 && (module.exports = {
|
|
397
635
|
AgentCardSchema,
|
|
398
636
|
AgentRegistryEntrySchema,
|
|
637
|
+
ApiErrorResponseSchema,
|
|
638
|
+
BadRequestErrorResponse,
|
|
399
639
|
CatalogModelInfoSchema,
|
|
640
|
+
ConflictErrorResponse,
|
|
400
641
|
ContentPartSchema,
|
|
401
642
|
DeleteResponseSchema,
|
|
402
643
|
ErrorResponseSchema,
|
|
403
644
|
ExecutionLogSchema,
|
|
404
645
|
FilePartSchema,
|
|
646
|
+
ForbiddenErrorResponse,
|
|
405
647
|
HttpServerConfigSchema,
|
|
406
648
|
ImagePartSchema,
|
|
649
|
+
InternalErrorResponse,
|
|
407
650
|
InternalMessageSchema,
|
|
651
|
+
IssueSchema,
|
|
652
|
+
JsonObjectSchema,
|
|
653
|
+
JsonSchemaPropertySchema,
|
|
654
|
+
JsonValueSchema,
|
|
408
655
|
LLMConfigBaseSchema,
|
|
409
656
|
LLMConfigResponseSchema,
|
|
410
657
|
LLMConfigSchema,
|
|
@@ -413,7 +660,9 @@ const DeleteResponseSchema = import_zod.z.object({
|
|
|
413
660
|
MessageSearchResponseSchema,
|
|
414
661
|
ModelFlatSchema,
|
|
415
662
|
ModelStatisticsSchema,
|
|
663
|
+
NotFoundErrorResponse,
|
|
416
664
|
OkResponseSchema,
|
|
665
|
+
PaymentRequiredErrorResponse,
|
|
417
666
|
PermissionsConfigSchema,
|
|
418
667
|
PricingStatusSchema,
|
|
419
668
|
PromptArgumentSchema,
|
|
@@ -421,6 +670,9 @@ const DeleteResponseSchema = import_zod.z.object({
|
|
|
421
670
|
PromptInfoSchema,
|
|
422
671
|
PromptSchema,
|
|
423
672
|
ProviderCatalogSchema,
|
|
673
|
+
RateLimitErrorResponse,
|
|
674
|
+
RequestContentPartSchema,
|
|
675
|
+
RequestContentSchema,
|
|
424
676
|
ResourceConfigSchema,
|
|
425
677
|
ResourceSchema,
|
|
426
678
|
ScheduleSchema,
|
|
@@ -437,11 +689,16 @@ const DeleteResponseSchema = import_zod.z.object({
|
|
|
437
689
|
StatusResponseSchema,
|
|
438
690
|
StdioServerConfigSchema,
|
|
439
691
|
TextPartSchema,
|
|
692
|
+
TimeoutErrorResponse,
|
|
440
693
|
TokenUsageSchema,
|
|
441
694
|
ToolCallSchema,
|
|
695
|
+
ToolInputSchema,
|
|
442
696
|
ToolSchema,
|
|
443
697
|
UIResourcePartSchema,
|
|
698
|
+
UpstreamErrorResponse,
|
|
444
699
|
UsageSummarySchema,
|
|
445
700
|
WebhookSchema,
|
|
446
|
-
WorkspaceSchema
|
|
701
|
+
WorkspaceSchema,
|
|
702
|
+
toApiContentPart,
|
|
703
|
+
toContentInput
|
|
447
704
|
});
|