@dexto/server 1.6.20 → 1.6.22

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.
Files changed (133) hide show
  1. package/dist/a2a/jsonrpc/methods.cjs +1 -1
  2. package/dist/a2a/jsonrpc/methods.d.ts +14 -4
  3. package/dist/a2a/jsonrpc/methods.d.ts.map +1 -1
  4. package/dist/a2a/jsonrpc/methods.js +1 -1
  5. package/dist/approval/wire-approval-events.cjs +44 -0
  6. package/dist/approval/wire-approval-events.d.ts +4 -0
  7. package/dist/approval/wire-approval-events.d.ts.map +1 -0
  8. package/dist/approval/wire-approval-events.js +20 -0
  9. package/dist/events/session-sse-subscriber.cjs +167 -0
  10. package/dist/events/session-sse-subscriber.d.ts +13 -0
  11. package/dist/events/session-sse-subscriber.d.ts.map +1 -0
  12. package/dist/events/session-sse-subscriber.js +143 -0
  13. package/dist/hono/__tests__/test-fixtures.cjs +8 -0
  14. package/dist/hono/__tests__/test-fixtures.d.ts +1 -0
  15. package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
  16. package/dist/hono/__tests__/test-fixtures.js +8 -0
  17. package/dist/hono/index.cjs +40 -8
  18. package/dist/hono/index.d.ts +45 -4531
  19. package/dist/hono/index.d.ts.map +1 -1
  20. package/dist/hono/index.js +43 -9
  21. package/dist/hono/node/index.cjs +51 -6
  22. package/dist/hono/node/index.d.ts.map +1 -1
  23. package/dist/hono/node/index.js +51 -6
  24. package/dist/hono/routes/a2a-jsonrpc.d.ts.map +1 -1
  25. package/dist/hono/routes/a2a-tasks.cjs +158 -32
  26. package/dist/hono/routes/a2a-tasks.d.ts +1 -502
  27. package/dist/hono/routes/a2a-tasks.d.ts.map +1 -1
  28. package/dist/hono/routes/a2a-tasks.js +162 -32
  29. package/dist/hono/routes/a2a.d.ts.map +1 -1
  30. package/dist/hono/routes/agents.cjs +410 -329
  31. package/dist/hono/routes/agents.d.ts +16043 -68
  32. package/dist/hono/routes/agents.d.ts.map +1 -1
  33. package/dist/hono/routes/agents.js +418 -330
  34. package/dist/hono/routes/approvals.cjs +102 -88
  35. package/dist/hono/routes/approvals.d.ts +2089 -142
  36. package/dist/hono/routes/approvals.d.ts.map +1 -1
  37. package/dist/hono/routes/approvals.js +108 -89
  38. package/dist/hono/routes/dexto-auth.cjs +40 -33
  39. package/dist/hono/routes/dexto-auth.d.ts +401 -2
  40. package/dist/hono/routes/dexto-auth.d.ts.map +1 -1
  41. package/dist/hono/routes/dexto-auth.js +40 -33
  42. package/dist/hono/routes/discovery.cjs +16 -14
  43. package/dist/hono/routes/discovery.d.ts +586 -1
  44. package/dist/hono/routes/discovery.d.ts.map +1 -1
  45. package/dist/hono/routes/discovery.js +16 -14
  46. package/dist/hono/routes/greeting.cjs +26 -22
  47. package/dist/hono/routes/greeting.d.ts +787 -3
  48. package/dist/hono/routes/greeting.d.ts.map +1 -1
  49. package/dist/hono/routes/greeting.js +26 -22
  50. package/dist/hono/routes/health.d.ts +1 -1
  51. package/dist/hono/routes/key.cjs +60 -52
  52. package/dist/hono/routes/key.d.ts +1597 -1
  53. package/dist/hono/routes/key.d.ts.map +1 -1
  54. package/dist/hono/routes/key.js +60 -52
  55. package/dist/hono/routes/llm.cjs +382 -349
  56. package/dist/hono/routes/llm.d.ts +12148 -98
  57. package/dist/hono/routes/llm.d.ts.map +1 -1
  58. package/dist/hono/routes/llm.js +386 -349
  59. package/dist/hono/routes/mcp.cjs +257 -226
  60. package/dist/hono/routes/mcp.d.ts +6605 -309
  61. package/dist/hono/routes/mcp.d.ts.map +1 -1
  62. package/dist/hono/routes/mcp.js +263 -225
  63. package/dist/hono/routes/memory.cjs +102 -89
  64. package/dist/hono/routes/memory.d.ts +5368 -4
  65. package/dist/hono/routes/memory.d.ts.map +1 -1
  66. package/dist/hono/routes/memory.js +108 -90
  67. package/dist/hono/routes/messages.cjs +189 -191
  68. package/dist/hono/routes/messages.d.ts +3900 -12
  69. package/dist/hono/routes/messages.d.ts.map +1 -1
  70. package/dist/hono/routes/messages.js +192 -191
  71. package/dist/hono/routes/models.cjs +106 -64
  72. package/dist/hono/routes/models.d.ts +2875 -2
  73. package/dist/hono/routes/models.d.ts.map +1 -1
  74. package/dist/hono/routes/models.js +108 -64
  75. package/dist/hono/routes/openrouter.cjs +79 -65
  76. package/dist/hono/routes/openrouter.d.ts +854 -1
  77. package/dist/hono/routes/openrouter.d.ts.map +1 -1
  78. package/dist/hono/routes/openrouter.js +79 -65
  79. package/dist/hono/routes/prompts.cjs +136 -109
  80. package/dist/hono/routes/prompts.d.ts +2818 -10
  81. package/dist/hono/routes/prompts.d.ts.map +1 -1
  82. package/dist/hono/routes/prompts.js +138 -109
  83. package/dist/hono/routes/queue.cjs +133 -120
  84. package/dist/hono/routes/queue.d.ts +5240 -11
  85. package/dist/hono/routes/queue.d.ts.map +1 -1
  86. package/dist/hono/routes/queue.js +136 -120
  87. package/dist/hono/routes/resources.cjs +65 -46
  88. package/dist/hono/routes/resources.d.ts +1983 -5
  89. package/dist/hono/routes/resources.d.ts.map +1 -1
  90. package/dist/hono/routes/resources.js +72 -47
  91. package/dist/hono/routes/schedules.cjs +233 -226
  92. package/dist/hono/routes/schedules.d.ts +4198 -22
  93. package/dist/hono/routes/schedules.d.ts.map +1 -1
  94. package/dist/hono/routes/schedules.js +233 -226
  95. package/dist/hono/routes/search.cjs +34 -30
  96. package/dist/hono/routes/search.d.ts +3094 -17
  97. package/dist/hono/routes/search.d.ts.map +1 -1
  98. package/dist/hono/routes/search.js +40 -31
  99. package/dist/hono/routes/sessions.cjs +491 -393
  100. package/dist/hono/routes/sessions.d.ts +18263 -65
  101. package/dist/hono/routes/sessions.d.ts.map +1 -1
  102. package/dist/hono/routes/sessions.js +497 -395
  103. package/dist/hono/routes/static.d.ts.map +1 -1
  104. package/dist/hono/routes/system-prompt.cjs +57 -61
  105. package/dist/hono/routes/system-prompt.d.ts +1228 -2
  106. package/dist/hono/routes/system-prompt.d.ts.map +1 -1
  107. package/dist/hono/routes/system-prompt.js +58 -62
  108. package/dist/hono/routes/tools.cjs +29 -34
  109. package/dist/hono/routes/tools.d.ts +1755 -6
  110. package/dist/hono/routes/tools.d.ts.map +1 -1
  111. package/dist/hono/routes/tools.js +33 -33
  112. package/dist/hono/routes/webhooks.cjs +115 -123
  113. package/dist/hono/routes/webhooks.d.ts +2501 -11
  114. package/dist/hono/routes/webhooks.d.ts.map +1 -1
  115. package/dist/hono/routes/webhooks.js +120 -124
  116. package/dist/hono/routes/workspaces.cjs +84 -79
  117. package/dist/hono/routes/workspaces.d.ts +2093 -2
  118. package/dist/hono/routes/workspaces.d.ts.map +1 -1
  119. package/dist/hono/routes/workspaces.js +89 -80
  120. package/dist/hono/schemas/responses.cjs +463 -260
  121. package/dist/hono/schemas/responses.d.ts +1893 -209
  122. package/dist/hono/schemas/responses.d.ts.map +1 -1
  123. package/dist/hono/schemas/responses.js +203 -14
  124. package/dist/hono/start-server.cjs +9 -0
  125. package/dist/hono/start-server.d.ts.map +1 -1
  126. package/dist/hono/start-server.js +9 -0
  127. package/dist/hono/types.d.ts +11 -0
  128. package/dist/hono/types.d.ts.map +1 -1
  129. package/dist/index.cjs +5 -1
  130. package/dist/index.d.ts +2 -0
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +2 -0
  133. package/package.json +7 -7
@@ -1,13 +1,37 @@
1
- import { OpenAPIHono } from '@hono/zod-openapi';
2
- import type { Context } from 'hono';
3
- import type { DextoAgent, AgentCard } from '@dexto/core';
4
- import { type AgentsRouterContext } from './routes/agents.js';
1
+ import type { Hono } from 'hono';
2
+ import type { BlankEnv, ExtractSchema, MergeSchemaPath } from 'hono/types';
3
+ import type { AgentCard } from '@dexto/core';
4
+ import { createHealthRouter } from './routes/health.js';
5
+ import { type GreetingRouterSchema } from './routes/greeting.js';
6
+ import { type MessagesRouterSchema } from './routes/messages.js';
7
+ import { type LlmRouterSchema } from './routes/llm.js';
8
+ import { type SessionsRouterSchema } from './routes/sessions.js';
9
+ import { type SearchRouterSchema } from './routes/search.js';
10
+ import { type McpRouterSchema } from './routes/mcp.js';
11
+ import { createA2aRouter } from './routes/a2a.js';
12
+ import { createA2AJsonRpcRouter } from './routes/a2a-jsonrpc.js';
13
+ import { type WebhooksRouterSchema } from './routes/webhooks.js';
14
+ import { type PromptsRouterSchema } from './routes/prompts.js';
15
+ import { type ResourcesRouterSchema } from './routes/resources.js';
16
+ import { type MemoryRouterSchema } from './routes/memory.js';
17
+ import { type WorkspacesRouterSchema } from './routes/workspaces.js';
18
+ import { type SchedulesRouterSchema } from './routes/schedules.js';
19
+ import { type AgentsRouterContext, type AgentsRouterSchema } from './routes/agents.js';
20
+ import { type ApprovalsRouterSchema } from './routes/approvals.js';
21
+ import { type QueueRouterSchema } from './routes/queue.js';
22
+ import { type OpenRouterRouterSchema } from './routes/openrouter.js';
23
+ import { type KeyRouterSchema } from './routes/key.js';
24
+ import { type ToolsRouterSchema } from './routes/tools.js';
25
+ import { type DiscoveryRouterSchema } from './routes/discovery.js';
26
+ import { type ModelsRouterSchema } from './routes/models.js';
27
+ import { type DextoAuthRouterSchema } from './routes/dexto-auth.js';
28
+ import { type SystemPromptRouterSchema } from './routes/system-prompt.js';
5
29
  import { type WebUIRuntimeConfig } from './routes/static.js';
6
30
  import { WebhookEventSubscriber } from '../events/webhook-subscriber.js';
7
31
  import { A2ASseEventSubscriber } from '../events/a2a-sse-subscriber.js';
32
+ import { SessionSseEventSubscriber } from '../events/session-sse-subscriber.js';
8
33
  import { ApprovalCoordinator } from '../approval/approval-coordinator.js';
9
- export type GetAgentFn = (ctx: Context) => DextoAgent | Promise<DextoAgent>;
10
- export type GetAgentConfigPathFn = (ctx: Context) => string | undefined | Promise<string | undefined>;
34
+ import type { DextoApp, GetAgentConfigPathFn, GetAgentFn } from './types.js';
11
35
  export type CreateDextoAppOptions = {
12
36
  /**
13
37
  * Prefix for API routes. Defaults to '/api'.
@@ -25,6 +49,7 @@ export type CreateDextoAppOptions = {
25
49
  approvalCoordinator: ApprovalCoordinator;
26
50
  webhookSubscriber: WebhookEventSubscriber;
27
51
  sseSubscriber: A2ASseEventSubscriber;
52
+ sessionSseSubscriber: SessionSseEventSubscriber;
28
53
  agentsContext?: AgentsRouterContext;
29
54
  /** Absolute path to WebUI build output. If provided, static files will be served. */
30
55
  webRoot?: string;
@@ -33,4530 +58,19 @@ export type CreateDextoAppOptions = {
33
58
  /** Disable built-in auth middleware. Use when you have your own auth layer. */
34
59
  disableAuth?: boolean;
35
60
  };
36
- export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIHono<import("hono").Env, import("hono/types").MergeSchemaPath<{
37
- "/dexto-auth/status": {
38
- $get: {
39
- input: {};
40
- output: {
41
- enabled: boolean;
42
- authenticated: boolean;
43
- canUse: boolean;
44
- };
45
- outputFormat: "json";
46
- status: 200;
47
- };
48
- };
49
- }, "/api"> & import("hono/types").MergeSchemaPath<{
50
- "/system-prompt/contributors": {
51
- $get: {
52
- input: {};
53
- output: {
54
- contributors: {
55
- id: string;
56
- priority: number;
57
- }[];
58
- };
59
- outputFormat: "json";
60
- status: 200;
61
- };
62
- };
63
- } & {
64
- "/system-prompt/contributors": {
65
- $post: {
66
- input: {
67
- json: {
68
- id: string;
69
- content?: string | undefined;
70
- enabled?: boolean | undefined;
71
- priority?: number | undefined;
72
- };
73
- };
74
- output: never;
75
- outputFormat: "json";
76
- status: 400;
77
- } | {
78
- input: {
79
- json: {
80
- id: string;
81
- content?: string | undefined;
82
- enabled?: boolean | undefined;
83
- priority?: number | undefined;
84
- };
85
- };
86
- output: {
87
- id: string;
88
- enabled: boolean;
89
- priority?: number | undefined;
90
- replaced?: boolean | undefined;
91
- removed?: boolean | undefined;
92
- contentLength?: number | undefined;
93
- truncated?: boolean | undefined;
94
- };
95
- outputFormat: "json";
96
- status: 200;
97
- };
98
- };
99
- }, "/api"> & import("hono/types").MergeSchemaPath<{
100
- "/models/local": {
101
- $get: {
102
- input: {};
103
- output: {
104
- models: {
105
- id: string;
106
- displayName: string;
107
- filePath: string;
108
- sizeBytes: number;
109
- source?: "huggingface" | "manual" | undefined;
110
- contextLength?: number | undefined;
111
- }[];
112
- };
113
- outputFormat: "json";
114
- status: 200;
115
- };
116
- };
117
- } & {
118
- "/models/ollama": {
119
- $get: {
120
- input: {
121
- query: {
122
- baseURL?: string | undefined;
123
- };
124
- };
125
- output: {
126
- models: {
127
- name: string;
128
- size?: number | undefined;
129
- digest?: string | undefined;
130
- modifiedAt?: string | undefined;
131
- }[];
132
- available: boolean;
133
- error?: string | undefined;
134
- version?: string | undefined;
135
- };
136
- outputFormat: "json";
137
- status: 200;
138
- };
139
- };
140
- } & {
141
- "/models/local/validate": {
142
- $post: {
143
- input: {
144
- json: {
145
- filePath: string;
146
- };
147
- };
148
- output: {
149
- valid: boolean;
150
- error?: string | undefined;
151
- sizeBytes?: number | undefined;
152
- };
153
- outputFormat: "json";
154
- status: 200;
155
- };
156
- };
157
- } & {
158
- "/models/local/:modelId": {
159
- $delete: {
160
- input: {
161
- param: {
162
- modelId: string;
163
- };
164
- } & {
165
- json: {
166
- deleteFile?: boolean | undefined;
167
- };
168
- };
169
- output: {
170
- success: boolean;
171
- modelId: string;
172
- fileDeleted: boolean;
173
- error?: string | undefined;
174
- };
175
- outputFormat: "json";
176
- status: 200;
177
- } | {
178
- input: {
179
- param: {
180
- modelId: string;
181
- };
182
- } & {
183
- json: {
184
- deleteFile?: boolean | undefined;
185
- };
186
- };
187
- output: {
188
- success: boolean;
189
- modelId: string;
190
- fileDeleted: boolean;
191
- error?: string | undefined;
192
- };
193
- outputFormat: "json";
194
- status: 404;
195
- };
196
- };
197
- }, "/api"> & import("hono/types").MergeSchemaPath<{
198
- "/discovery": {
199
- $get: {
200
- input: {};
201
- output: {
202
- blob: {
203
- type: string;
204
- category: "blob" | "tools" | "compaction" | "database";
205
- metadata?: {
206
- [x: string]: import("hono/utils/types").JSONValue;
207
- description?: string | undefined;
208
- displayName?: string | undefined;
209
- } | undefined;
210
- }[];
211
- compaction: {
212
- type: string;
213
- category: "blob" | "tools" | "compaction" | "database";
214
- metadata?: {
215
- [x: string]: import("hono/utils/types").JSONValue;
216
- description?: string | undefined;
217
- displayName?: string | undefined;
218
- } | undefined;
219
- }[];
220
- database: {
221
- type: string;
222
- category: "blob" | "tools" | "compaction" | "database";
223
- metadata?: {
224
- [x: string]: import("hono/utils/types").JSONValue;
225
- description?: string | undefined;
226
- displayName?: string | undefined;
227
- } | undefined;
228
- }[];
229
- toolFactories: {
230
- type: string;
231
- category: "blob" | "tools" | "compaction" | "database";
232
- metadata?: {
233
- [x: string]: import("hono/utils/types").JSONValue;
234
- description?: string | undefined;
235
- displayName?: string | undefined;
236
- } | undefined;
237
- }[];
238
- builtinTools: {
239
- description: string;
240
- name: string;
241
- }[];
242
- };
243
- outputFormat: "json";
244
- status: 200;
245
- };
246
- };
247
- }, "/api"> & import("hono/types").MergeSchemaPath<{
248
- "/tools": {
249
- $get: {
250
- input: {};
251
- output: {
252
- tools: {
253
- description: string;
254
- name: string;
255
- id: string;
256
- source: "local" | "mcp";
257
- serverName?: string | undefined;
258
- inputSchema?: {
259
- [x: string]: import("hono/utils/types").JSONValue;
260
- type?: "object" | undefined;
261
- properties?: {
262
- [x: string]: {
263
- [x: string]: import("hono/utils/types").JSONValue;
264
- description?: string | undefined;
265
- default?: any;
266
- type?: "string" | "number" | "boolean" | "object" | "integer" | "array" | undefined;
267
- enum?: (string | number | boolean)[] | undefined;
268
- };
269
- } | undefined;
270
- required?: string[] | undefined;
271
- } | undefined;
272
- _meta?: {
273
- [x: string]: import("hono/utils/types").JSONValue;
274
- } | undefined;
275
- }[];
276
- totalCount: number;
277
- localCount: number;
278
- mcpCount: number;
279
- };
280
- outputFormat: "json";
281
- status: 200;
282
- };
283
- };
284
- }, "/api"> & import("hono/types").MergeSchemaPath<{
285
- "/llm/key/:provider": {
286
- $get: {
287
- input: {
288
- param: {
289
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
290
- };
291
- };
292
- output: {
293
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
294
- hasKey: boolean;
295
- envVar: string;
296
- keyValue?: string | undefined;
297
- };
298
- outputFormat: "json";
299
- status: 200;
300
- };
301
- };
302
- } & {
303
- "/llm/key": {
304
- $post: {
305
- input: {
306
- json: {
307
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
308
- apiKey: string;
309
- };
310
- };
311
- output: {
312
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
313
- ok: true;
314
- envVar: string;
315
- };
316
- outputFormat: "json";
317
- status: 200;
318
- };
319
- };
320
- }, "/api"> & import("hono/types").MergeSchemaPath<{
321
- "/openrouter/validate/:modelId": {
322
- $get: {
323
- input: {
324
- param: {
325
- modelId: string;
326
- };
327
- };
328
- output: {
329
- valid: boolean;
330
- status: "valid" | "unknown" | "invalid";
331
- modelId: string;
332
- error?: string | undefined;
333
- info?: {
334
- contextLength: number;
335
- } | undefined;
336
- };
337
- outputFormat: "json";
338
- status: 200;
339
- };
340
- };
341
- } & {
342
- "/openrouter/refresh-cache": {
343
- $post: {
344
- input: {};
345
- output: {
346
- message: string;
347
- ok: true;
348
- };
349
- outputFormat: "json";
350
- status: 200;
351
- } | {
352
- input: {};
353
- output: {
354
- message: string;
355
- ok: false;
356
- };
357
- outputFormat: "json";
358
- status: 500;
359
- };
360
- };
361
- }, "/api"> & import("hono/types").MergeSchemaPath<{
362
- "/queue/:sessionId": {
363
- $get: {
364
- input: {
365
- param: {
366
- sessionId: string;
367
- };
368
- };
369
- output: never;
370
- outputFormat: "json";
371
- status: 404;
372
- } | {
373
- input: {
374
- param: {
375
- sessionId: string;
376
- };
377
- };
378
- output: {
379
- messages: {
380
- content: ({
381
- type: "text";
382
- text: string;
383
- } | {
384
- type: "image";
385
- image: string;
386
- mimeType?: string | undefined;
387
- } | {
388
- type: "file";
389
- mimeType: string;
390
- data: string;
391
- filename?: string | undefined;
392
- } | {
393
- type: "ui-resource";
394
- mimeType: string;
395
- uri: string;
396
- content?: string | undefined;
397
- blob?: string | undefined;
398
- metadata?: {
399
- title?: string | undefined;
400
- preferredSize?: {
401
- width: number;
402
- height: number;
403
- } | undefined;
404
- } | undefined;
405
- })[];
406
- id: string;
407
- queuedAt: number;
408
- metadata?: {
409
- [x: string]: import("hono/utils/types").JSONValue;
410
- } | undefined;
411
- kind?: "default" | "background" | undefined;
412
- }[];
413
- count: number;
414
- };
415
- outputFormat: "json";
416
- status: 200;
417
- };
418
- };
419
- } & {
420
- "/queue/:sessionId": {
421
- $post: {
422
- input: {
423
- param: {
424
- sessionId: string;
425
- };
426
- } & {
427
- json: {
428
- content: string | ({
429
- type: "text";
430
- text: string;
431
- } | {
432
- type: "image";
433
- image: string;
434
- mimeType?: string | undefined;
435
- } | {
436
- type: "file";
437
- mimeType: string;
438
- data: string;
439
- filename?: string | undefined;
440
- })[];
441
- kind?: "default" | "background" | undefined;
442
- };
443
- };
444
- output: never;
445
- outputFormat: "json";
446
- status: 404;
447
- } | {
448
- input: {
449
- param: {
450
- sessionId: string;
451
- };
452
- } & {
453
- json: {
454
- content: string | ({
455
- type: "text";
456
- text: string;
457
- } | {
458
- type: "image";
459
- image: string;
460
- mimeType?: string | undefined;
461
- } | {
462
- type: "file";
463
- mimeType: string;
464
- data: string;
465
- filename?: string | undefined;
466
- })[];
467
- kind?: "default" | "background" | undefined;
468
- };
469
- };
470
- output: {
471
- id: string;
472
- queued: true;
473
- position: number;
474
- };
475
- outputFormat: "json";
476
- status: 201;
477
- };
478
- };
479
- } & {
480
- "/queue/:sessionId/:messageId": {
481
- $delete: {
482
- input: {
483
- param: {
484
- sessionId: string;
485
- messageId: string;
486
- };
487
- };
488
- output: never;
489
- outputFormat: "json";
490
- status: 404;
491
- } | {
492
- input: {
493
- param: {
494
- sessionId: string;
495
- messageId: string;
496
- };
497
- };
498
- output: {
499
- id: string;
500
- removed: true;
501
- };
502
- outputFormat: "json";
503
- status: 200;
504
- };
505
- };
506
- } & {
507
- "/queue/:sessionId": {
508
- $delete: {
509
- input: {
510
- param: {
511
- sessionId: string;
512
- };
513
- };
514
- output: never;
515
- outputFormat: "json";
516
- status: 404;
517
- } | {
518
- input: {
519
- param: {
520
- sessionId: string;
521
- };
522
- };
523
- output: {
524
- count: number;
525
- cleared: true;
526
- };
527
- outputFormat: "json";
528
- status: 200;
529
- };
530
- };
531
- }, "/api"> & import("hono/types").MergeSchemaPath<{
532
- "/agents": {
533
- $get: {
534
- input: {};
535
- output: {
536
- installed: {
537
- description: string;
538
- type: "custom" | "builtin";
539
- name: string;
540
- id: string;
541
- tags?: string[] | undefined;
542
- author?: string | undefined;
543
- }[];
544
- available: {
545
- description: string;
546
- type: "custom" | "builtin";
547
- name: string;
548
- id: string;
549
- tags?: string[] | undefined;
550
- author?: string | undefined;
551
- }[];
552
- current: {
553
- name: string | null;
554
- id: string | null;
555
- };
556
- };
557
- outputFormat: "json";
558
- status: 200;
559
- };
560
- };
561
- } & {
562
- "/agents/current": {
563
- $get: {
564
- input: {};
565
- output: {
566
- name: string | null;
567
- id: string | null;
568
- };
569
- outputFormat: "json";
570
- status: 200;
571
- };
572
- };
573
- } & {
574
- "/agents/install": {
575
- $post: {
576
- input: {
577
- json: {
578
- id: string;
579
- path?: string | undefined;
580
- } | {
581
- metadata: {
582
- tags: string[];
583
- description: string;
584
- author: string;
585
- main?: string | undefined;
586
- };
587
- id: string;
588
- sourcePath: string;
589
- name?: string | undefined;
590
- };
591
- };
592
- output: {
593
- type: "custom" | "builtin";
594
- name: string;
595
- id: string;
596
- installed: true;
597
- };
598
- outputFormat: "json";
599
- status: 201;
600
- };
601
- };
602
- } & {
603
- "/agents/switch": {
604
- $post: {
605
- input: {
606
- json: {
607
- id: string;
608
- path?: string | undefined;
609
- };
610
- };
611
- output: {
612
- name: string;
613
- id: string;
614
- switched: true;
615
- };
616
- outputFormat: "json";
617
- status: 200;
618
- };
619
- };
620
- } & {
621
- "/agents/validate-name": {
622
- $post: {
623
- input: {
624
- json: {
625
- id: string;
626
- path?: string | undefined;
627
- };
628
- };
629
- output: {
630
- valid: boolean;
631
- message?: string | undefined;
632
- conflict?: string | undefined;
633
- };
634
- outputFormat: "json";
635
- status: 200;
636
- };
637
- };
638
- } & {
639
- "/agents/uninstall": {
640
- $post: {
641
- input: {
642
- json: {
643
- id: string;
644
- force?: boolean | undefined;
645
- };
646
- };
647
- output: {
648
- id: string;
649
- uninstalled: true;
650
- };
651
- outputFormat: "json";
652
- status: 200;
653
- };
654
- };
655
- } & {
656
- "/agents/custom/create": {
657
- $post: {
658
- input: {
659
- json: {
660
- description: string;
661
- config: Record<string, any>;
662
- name: string;
663
- id: string;
664
- tags?: string[] | undefined;
665
- author?: string | undefined;
666
- };
667
- };
668
- output: {
669
- name: string;
670
- id: string;
671
- created: true;
672
- };
673
- outputFormat: "json";
674
- status: 201;
675
- };
676
- };
677
- } & {
678
- "/agent/path": {
679
- $get: {
680
- input: {};
681
- output: {
682
- path: string;
683
- name: string;
684
- relativePath: string;
685
- isDefault: boolean;
686
- };
687
- outputFormat: "json";
688
- status: 200;
689
- };
690
- };
691
- } & {
692
- "/agent/config": {
693
- $get: {
694
- input: {};
695
- output: {
696
- path: string;
697
- lastModified: string;
698
- yaml: string;
699
- relativePath: string;
700
- warnings: string[];
701
- };
702
- outputFormat: "json";
703
- status: 200;
704
- };
705
- };
706
- } & {
707
- "/agent/validate": {
708
- $post: {
709
- input: {
710
- json: {
711
- yaml: string;
712
- };
713
- };
714
- output: {
715
- valid: boolean;
716
- warnings: {
717
- path: string;
718
- code: string;
719
- message: string;
720
- }[];
721
- errors: {
722
- [x: string]: import("hono/utils/types").JSONValue;
723
- code: string;
724
- message: string;
725
- path?: string | undefined;
726
- line?: number | undefined;
727
- column?: number | undefined;
728
- }[];
729
- };
730
- outputFormat: "json";
731
- status: 200;
732
- };
733
- };
734
- } & {
735
- "/agent/config": {
736
- $post: {
737
- input: {
738
- json: {
739
- yaml: string;
740
- };
741
- };
742
- output: {
743
- path: string;
744
- message: string;
745
- ok: true;
746
- restarted: boolean;
747
- reloaded: boolean;
748
- changesApplied: string[];
749
- };
750
- outputFormat: "json";
751
- status: 200;
752
- };
753
- };
754
- } & {
755
- "/agent/config/export": {
756
- $get: {
757
- input: {
758
- query: {
759
- sessionId?: string | undefined;
760
- };
761
- };
762
- output: Response;
763
- outputFormat: "json";
764
- status: import("hono/utils/http-status").StatusCode;
765
- };
766
- };
767
- }, "/api"> & import("hono/types").MergeSchemaPath<{
768
- "/approvals": {
769
- $get: {
770
- input: {
771
- query: {
772
- sessionId: string;
773
- };
774
- };
775
- output: {
776
- ok: true;
777
- approvals: {
778
- type: string;
779
- metadata: {
780
- [x: string]: import("hono/utils/types").JSONValue;
781
- };
782
- timestamp: string;
783
- approvalId: string;
784
- sessionId?: string | undefined;
785
- timeout?: number | undefined;
786
- }[];
787
- };
788
- outputFormat: "json";
789
- status: 200;
790
- };
791
- };
792
- } & {
793
- "/approvals/:approvalId": {
794
- $post: {
795
- input: {
796
- param: {
797
- approvalId: string;
798
- };
799
- } & {
800
- header: {
801
- 'Idempotency-Key'?: string | undefined;
802
- };
803
- } & {
804
- json: {
805
- status: "approved" | "denied" | "cancelled";
806
- message?: string | undefined;
807
- formData?: Record<string, unknown> | undefined;
808
- rememberChoice?: boolean | undefined;
809
- rememberPattern?: string | undefined;
810
- rememberDirectory?: boolean | undefined;
811
- reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
812
- };
813
- };
814
- output: never;
815
- outputFormat: "json";
816
- status: 400;
817
- } | {
818
- input: {
819
- param: {
820
- approvalId: string;
821
- };
822
- } & {
823
- header: {
824
- 'Idempotency-Key'?: string | undefined;
825
- };
826
- } & {
827
- json: {
828
- status: "approved" | "denied" | "cancelled";
829
- message?: string | undefined;
830
- formData?: Record<string, unknown> | undefined;
831
- rememberChoice?: boolean | undefined;
832
- rememberPattern?: string | undefined;
833
- rememberDirectory?: boolean | undefined;
834
- reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
835
- };
836
- };
837
- output: never;
838
- outputFormat: "json";
839
- status: 404;
840
- } | {
841
- input: {
842
- param: {
843
- approvalId: string;
844
- };
845
- } & {
846
- header: {
847
- 'Idempotency-Key'?: string | undefined;
848
- };
849
- } & {
850
- json: {
851
- status: "approved" | "denied" | "cancelled";
852
- message?: string | undefined;
853
- formData?: Record<string, unknown> | undefined;
854
- rememberChoice?: boolean | undefined;
855
- rememberPattern?: string | undefined;
856
- rememberDirectory?: boolean | undefined;
857
- reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
858
- };
859
- };
860
- output: {
861
- status: "approved" | "denied" | "cancelled";
862
- ok: boolean;
863
- approvalId: string;
864
- };
865
- outputFormat: "json";
866
- status: 200;
867
- } | {
868
- input: {
869
- param: {
870
- approvalId: string;
871
- };
872
- } & {
873
- header: {
874
- 'Idempotency-Key'?: string | undefined;
875
- };
876
- } & {
877
- json: {
878
- status: "approved" | "denied" | "cancelled";
879
- message?: string | undefined;
880
- formData?: Record<string, unknown> | undefined;
881
- rememberChoice?: boolean | undefined;
882
- rememberPattern?: string | undefined;
883
- rememberDirectory?: boolean | undefined;
884
- reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
885
- };
886
- };
887
- output: {
888
- status: "approved" | "denied" | "cancelled";
889
- ok: boolean;
890
- approvalId: string;
891
- };
892
- outputFormat: "json";
893
- status: 500;
894
- } | {
895
- input: {
896
- param: {
897
- approvalId: string;
898
- };
899
- } & {
900
- header: {
901
- 'Idempotency-Key'?: string | undefined;
902
- };
903
- } & {
904
- json: {
905
- status: "approved" | "denied" | "cancelled";
906
- message?: string | undefined;
907
- formData?: Record<string, unknown> | undefined;
908
- rememberChoice?: boolean | undefined;
909
- rememberPattern?: string | undefined;
910
- rememberDirectory?: boolean | undefined;
911
- reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
912
- };
913
- };
914
- output: {
915
- status: "approved" | "denied" | "cancelled";
916
- ok: boolean;
917
- approvalId: string;
918
- };
919
- outputFormat: "json";
920
- status: 503;
921
- };
922
- };
923
- }, "/api"> & import("hono/types").MergeSchemaPath<{
924
- "/schedules": {
925
- $get: {
926
- input: {};
927
- output: {
928
- schedules: {
929
- name: string;
930
- id: string;
931
- createdAt: number;
932
- cronExpression: string;
933
- timezone: string;
934
- enabled: boolean;
935
- task: {
936
- instruction: string;
937
- metadata?: {
938
- [x: string]: import("hono/utils/types").JSONValue;
939
- } | undefined;
940
- };
941
- sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
942
- updatedAt: number;
943
- runCount: number;
944
- successCount: number;
945
- failureCount: number;
946
- sessionId?: string | undefined;
947
- workspacePath?: string | undefined;
948
- lastRunAt?: number | undefined;
949
- nextRunAt?: number | undefined;
950
- lastError?: string | undefined;
951
- }[];
952
- };
953
- outputFormat: "json";
954
- status: 200;
955
- } | {
956
- input: {};
957
- output: {
958
- error: {
959
- message: string;
960
- code?: string | undefined;
961
- details?: import("hono/utils/types").JSONValue;
962
- };
963
- ok: false;
964
- };
965
- outputFormat: "json";
966
- status: 500;
967
- } | {
968
- input: {};
969
- output: {
970
- error: {
971
- message: string;
972
- code?: string | undefined;
973
- details?: import("hono/utils/types").JSONValue;
974
- };
975
- ok: false;
976
- };
977
- outputFormat: "json";
978
- status: 503;
979
- };
980
- };
981
- } & {
982
- "/schedules": {
983
- $post: {
984
- input: {
985
- json: {
986
- name: string;
987
- instruction: string;
988
- cronExpression: string;
989
- timezone?: string | undefined;
990
- enabled?: boolean | undefined;
991
- workspacePath?: string | null | undefined;
992
- };
993
- };
994
- output: {
995
- error: {
996
- message: string;
997
- code?: string | undefined;
998
- details?: import("hono/utils/types").JSONValue;
999
- };
1000
- ok: false;
1001
- };
1002
- outputFormat: "json";
1003
- status: 500;
1004
- } | {
1005
- input: {
1006
- json: {
1007
- name: string;
1008
- instruction: string;
1009
- cronExpression: string;
1010
- timezone?: string | undefined;
1011
- enabled?: boolean | undefined;
1012
- workspacePath?: string | null | undefined;
1013
- };
1014
- };
1015
- output: {
1016
- error: {
1017
- message: string;
1018
- code?: string | undefined;
1019
- details?: import("hono/utils/types").JSONValue;
1020
- };
1021
- ok: false;
1022
- };
1023
- outputFormat: "json";
1024
- status: 503;
1025
- } | {
1026
- input: {
1027
- json: {
1028
- name: string;
1029
- instruction: string;
1030
- cronExpression: string;
1031
- timezone?: string | undefined;
1032
- enabled?: boolean | undefined;
1033
- workspacePath?: string | null | undefined;
1034
- };
1035
- };
1036
- output: {
1037
- schedule: {
1038
- name: string;
1039
- id: string;
1040
- createdAt: number;
1041
- cronExpression: string;
1042
- timezone: string;
1043
- enabled: boolean;
1044
- task: {
1045
- instruction: string;
1046
- metadata?: {
1047
- [x: string]: import("hono/utils/types").JSONValue;
1048
- } | undefined;
1049
- };
1050
- sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
1051
- updatedAt: number;
1052
- runCount: number;
1053
- successCount: number;
1054
- failureCount: number;
1055
- sessionId?: string | undefined;
1056
- workspacePath?: string | undefined;
1057
- lastRunAt?: number | undefined;
1058
- nextRunAt?: number | undefined;
1059
- lastError?: string | undefined;
1060
- };
1061
- };
1062
- outputFormat: "json";
1063
- status: 201;
1064
- } | {
1065
- input: {
1066
- json: {
1067
- name: string;
1068
- instruction: string;
1069
- cronExpression: string;
1070
- timezone?: string | undefined;
1071
- enabled?: boolean | undefined;
1072
- workspacePath?: string | null | undefined;
1073
- };
1074
- };
1075
- output: {
1076
- error: {
1077
- message: string;
1078
- code?: string | undefined;
1079
- details?: import("hono/utils/types").JSONValue;
1080
- };
1081
- ok: false;
1082
- };
1083
- outputFormat: "json";
1084
- status: 400;
1085
- } | {
1086
- input: {
1087
- json: {
1088
- name: string;
1089
- instruction: string;
1090
- cronExpression: string;
1091
- timezone?: string | undefined;
1092
- enabled?: boolean | undefined;
1093
- workspacePath?: string | null | undefined;
1094
- };
1095
- };
1096
- output: {
1097
- error: {
1098
- message: string;
1099
- code?: string | undefined;
1100
- details?: import("hono/utils/types").JSONValue;
1101
- };
1102
- ok: false;
1103
- };
1104
- outputFormat: "json";
1105
- status: 429;
1106
- };
1107
- };
1108
- } & {
1109
- "/schedules/:scheduleId": {
1110
- $patch: {
1111
- input: {
1112
- param: {
1113
- scheduleId: string;
1114
- };
1115
- } & {
1116
- json: {
1117
- name?: string | undefined;
1118
- instruction?: string | undefined;
1119
- cronExpression?: string | undefined;
1120
- timezone?: string | undefined;
1121
- enabled?: boolean | undefined;
1122
- workspacePath?: string | null | undefined;
1123
- };
1124
- };
1125
- output: {
1126
- error: {
1127
- message: string;
1128
- code?: string | undefined;
1129
- details?: import("hono/utils/types").JSONValue;
1130
- };
1131
- ok: false;
1132
- };
1133
- outputFormat: "json";
1134
- status: 500;
1135
- } | {
1136
- input: {
1137
- param: {
1138
- scheduleId: string;
1139
- };
1140
- } & {
1141
- json: {
1142
- name?: string | undefined;
1143
- instruction?: string | undefined;
1144
- cronExpression?: string | undefined;
1145
- timezone?: string | undefined;
1146
- enabled?: boolean | undefined;
1147
- workspacePath?: string | null | undefined;
1148
- };
1149
- };
1150
- output: {
1151
- error: {
1152
- message: string;
1153
- code?: string | undefined;
1154
- details?: import("hono/utils/types").JSONValue;
1155
- };
1156
- ok: false;
1157
- };
1158
- outputFormat: "json";
1159
- status: 503;
1160
- } | {
1161
- input: {
1162
- param: {
1163
- scheduleId: string;
1164
- };
1165
- } & {
1166
- json: {
1167
- name?: string | undefined;
1168
- instruction?: string | undefined;
1169
- cronExpression?: string | undefined;
1170
- timezone?: string | undefined;
1171
- enabled?: boolean | undefined;
1172
- workspacePath?: string | null | undefined;
1173
- };
1174
- };
1175
- output: {
1176
- error: {
1177
- message: string;
1178
- code?: string | undefined;
1179
- details?: import("hono/utils/types").JSONValue;
1180
- };
1181
- ok: false;
1182
- };
1183
- outputFormat: "json";
1184
- status: 400;
1185
- } | {
1186
- input: {
1187
- param: {
1188
- scheduleId: string;
1189
- };
1190
- } & {
1191
- json: {
1192
- name?: string | undefined;
1193
- instruction?: string | undefined;
1194
- cronExpression?: string | undefined;
1195
- timezone?: string | undefined;
1196
- enabled?: boolean | undefined;
1197
- workspacePath?: string | null | undefined;
1198
- };
1199
- };
1200
- output: {
1201
- schedule: {
1202
- name: string;
1203
- id: string;
1204
- createdAt: number;
1205
- cronExpression: string;
1206
- timezone: string;
1207
- enabled: boolean;
1208
- task: {
1209
- instruction: string;
1210
- metadata?: {
1211
- [x: string]: import("hono/utils/types").JSONValue;
1212
- } | undefined;
1213
- };
1214
- sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
1215
- updatedAt: number;
1216
- runCount: number;
1217
- successCount: number;
1218
- failureCount: number;
1219
- sessionId?: string | undefined;
1220
- workspacePath?: string | undefined;
1221
- lastRunAt?: number | undefined;
1222
- nextRunAt?: number | undefined;
1223
- lastError?: string | undefined;
1224
- };
1225
- };
1226
- outputFormat: "json";
1227
- status: 200;
1228
- } | {
1229
- input: {
1230
- param: {
1231
- scheduleId: string;
1232
- };
1233
- } & {
1234
- json: {
1235
- name?: string | undefined;
1236
- instruction?: string | undefined;
1237
- cronExpression?: string | undefined;
1238
- timezone?: string | undefined;
1239
- enabled?: boolean | undefined;
1240
- workspacePath?: string | null | undefined;
1241
- };
1242
- };
1243
- output: {
1244
- error: {
1245
- message: string;
1246
- code?: string | undefined;
1247
- details?: import("hono/utils/types").JSONValue;
1248
- };
1249
- ok: false;
1250
- };
1251
- outputFormat: "json";
1252
- status: 404;
1253
- };
1254
- };
1255
- } & {
1256
- "/schedules/:scheduleId": {
1257
- $delete: {
1258
- input: {
1259
- param: {
1260
- scheduleId: string;
1261
- };
1262
- };
1263
- output: {
1264
- error: {
1265
- message: string;
1266
- code?: string | undefined;
1267
- details?: import("hono/utils/types").JSONValue;
1268
- };
1269
- ok: false;
1270
- };
1271
- outputFormat: "json";
1272
- status: 500;
1273
- } | {
1274
- input: {
1275
- param: {
1276
- scheduleId: string;
1277
- };
1278
- };
1279
- output: {
1280
- error: {
1281
- message: string;
1282
- code?: string | undefined;
1283
- details?: import("hono/utils/types").JSONValue;
1284
- };
1285
- ok: false;
1286
- };
1287
- outputFormat: "json";
1288
- status: 503;
1289
- } | {
1290
- input: {
1291
- param: {
1292
- scheduleId: string;
1293
- };
1294
- };
1295
- output: {
1296
- error: {
1297
- message: string;
1298
- code?: string | undefined;
1299
- details?: import("hono/utils/types").JSONValue;
1300
- };
1301
- ok: false;
1302
- };
1303
- outputFormat: "json";
1304
- status: 404;
1305
- } | {
1306
- input: {
1307
- param: {
1308
- scheduleId: string;
1309
- };
1310
- };
1311
- output: {
1312
- deleted: boolean;
1313
- };
1314
- outputFormat: "json";
1315
- status: 200;
1316
- };
1317
- };
1318
- } & {
1319
- "/schedules/:scheduleId/trigger": {
1320
- $post: {
1321
- input: {
1322
- param: {
1323
- scheduleId: string;
1324
- };
1325
- };
1326
- output: {
1327
- error: {
1328
- message: string;
1329
- code?: string | undefined;
1330
- details?: import("hono/utils/types").JSONValue;
1331
- };
1332
- ok: false;
1333
- };
1334
- outputFormat: "json";
1335
- status: 500;
1336
- } | {
1337
- input: {
1338
- param: {
1339
- scheduleId: string;
1340
- };
1341
- };
1342
- output: {
1343
- error: {
1344
- message: string;
1345
- code?: string | undefined;
1346
- details?: import("hono/utils/types").JSONValue;
1347
- };
1348
- ok: false;
1349
- };
1350
- outputFormat: "json";
1351
- status: 503;
1352
- } | {
1353
- input: {
1354
- param: {
1355
- scheduleId: string;
1356
- };
1357
- };
1358
- output: {
1359
- error: {
1360
- message: string;
1361
- code?: string | undefined;
1362
- details?: import("hono/utils/types").JSONValue;
1363
- };
1364
- ok: false;
1365
- };
1366
- outputFormat: "json";
1367
- status: 404;
1368
- } | {
1369
- input: {
1370
- param: {
1371
- scheduleId: string;
1372
- };
1373
- };
1374
- output: {
1375
- scheduled: boolean;
1376
- execution?: {
1377
- status: "success" | "pending" | "failed" | "timeout";
1378
- id: string;
1379
- scheduleId: string;
1380
- triggeredAt: number;
1381
- error?: string | undefined;
1382
- completedAt?: number | undefined;
1383
- duration?: number | undefined;
1384
- result?: string | undefined;
1385
- } | undefined;
1386
- };
1387
- outputFormat: "json";
1388
- status: 200;
1389
- };
1390
- };
1391
- }, "/api"> & import("hono/types").MergeSchemaPath<{
1392
- "/workspaces": {
1393
- $get: {
1394
- input: {};
1395
- output: {
1396
- workspaces: {
1397
- path: string;
1398
- id: string;
1399
- createdAt: number;
1400
- lastActiveAt: number;
1401
- name?: string | null | undefined;
1402
- }[];
1403
- };
1404
- outputFormat: "json";
1405
- status: 200;
1406
- };
1407
- };
1408
- } & {
1409
- "/workspaces/active": {
1410
- $get: {
1411
- input: {};
1412
- output: {
1413
- workspace: {
1414
- path: string;
1415
- id: string;
1416
- createdAt: number;
1417
- lastActiveAt: number;
1418
- name?: string | null | undefined;
1419
- } | null;
1420
- };
1421
- outputFormat: "json";
1422
- status: 200;
1423
- };
1424
- };
1425
- } & {
1426
- "/workspaces/active": {
1427
- $post: {
1428
- input: {
1429
- json: {
1430
- path: string;
1431
- name?: string | undefined;
1432
- };
1433
- };
1434
- output: {
1435
- workspace: {
1436
- path: string;
1437
- id: string;
1438
- createdAt: number;
1439
- lastActiveAt: number;
1440
- name?: string | null | undefined;
1441
- };
1442
- };
1443
- outputFormat: "json";
1444
- status: 200;
1445
- };
1446
- };
1447
- } & {
1448
- "/workspaces/active": {
1449
- $delete: {
1450
- input: {};
1451
- output: {
1452
- workspace: {
1453
- path: string;
1454
- id: string;
1455
- createdAt: number;
1456
- lastActiveAt: number;
1457
- name?: string | null | undefined;
1458
- } | null;
1459
- };
1460
- outputFormat: "json";
1461
- status: 200;
1462
- };
1463
- };
1464
- }, "/api"> & import("hono/types").MergeSchemaPath<{
1465
- "/memory": {
1466
- $post: {
1467
- input: {
1468
- json: {
1469
- content: string;
1470
- metadata?: import("zod").objectInputType<{
1471
- source: import("zod").ZodOptional<import("zod").ZodEnum<["user", "system"]>>;
1472
- pinned: import("zod").ZodOptional<import("zod").ZodBoolean>;
1473
- }, import("zod").ZodTypeAny, "passthrough"> | undefined;
1474
- tags?: string[] | undefined;
1475
- };
1476
- };
1477
- output: {
1478
- ok: true;
1479
- memory: {
1480
- content: string;
1481
- createdAt: number;
1482
- id: string;
1483
- updatedAt: number;
1484
- metadata?: {
1485
- [x: string]: import("hono/utils/types").JSONValue;
1486
- source?: "system" | "user" | undefined;
1487
- pinned?: boolean | undefined;
1488
- } | undefined;
1489
- tags?: string[] | undefined | undefined;
1490
- };
1491
- };
1492
- outputFormat: "json";
1493
- status: 201;
1494
- };
1495
- };
1496
- } & {
1497
- "/memory": {
1498
- $get: {
1499
- input: {
1500
- query: {
1501
- tags?: string | undefined;
1502
- source?: "system" | "user" | undefined;
1503
- limit?: string | undefined;
1504
- offset?: string | undefined;
1505
- pinned?: string | undefined;
1506
- };
1507
- };
1508
- output: {
1509
- memories: {
1510
- content: string;
1511
- createdAt: number;
1512
- id: string;
1513
- updatedAt: number;
1514
- metadata?: {
1515
- [x: string]: import("hono/utils/types").JSONValue;
1516
- source?: "system" | "user" | undefined;
1517
- pinned?: boolean | undefined;
1518
- } | undefined;
1519
- tags?: string[] | undefined | undefined;
1520
- }[];
1521
- ok: true;
1522
- };
1523
- outputFormat: "json";
1524
- status: 200;
1525
- };
1526
- };
1527
- } & {
1528
- "/memory/:id": {
1529
- $get: {
1530
- input: {
1531
- param: {
1532
- id: string;
1533
- };
1534
- };
1535
- output: {
1536
- ok: true;
1537
- memory: {
1538
- content: string;
1539
- createdAt: number;
1540
- id: string;
1541
- updatedAt: number;
1542
- metadata?: {
1543
- [x: string]: import("hono/utils/types").JSONValue;
1544
- source?: "system" | "user" | undefined;
1545
- pinned?: boolean | undefined;
1546
- } | undefined;
1547
- tags?: string[] | undefined | undefined;
1548
- };
1549
- };
1550
- outputFormat: "json";
1551
- status: 200;
1552
- };
1553
- };
1554
- } & {
1555
- "/memory/:id": {
1556
- $put: {
1557
- input: {
1558
- param: {
1559
- id: string;
1560
- };
1561
- } & {
1562
- json: {
1563
- metadata?: import("zod").objectInputType<{
1564
- source: import("zod").ZodOptional<import("zod").ZodEnum<["user", "system"]>>;
1565
- pinned: import("zod").ZodOptional<import("zod").ZodBoolean>;
1566
- }, import("zod").ZodTypeAny, "passthrough"> | undefined;
1567
- content?: string | undefined;
1568
- tags?: string[] | undefined;
1569
- };
1570
- };
1571
- output: {
1572
- ok: true;
1573
- memory: {
1574
- content: string;
1575
- createdAt: number;
1576
- id: string;
1577
- updatedAt: number;
1578
- metadata?: {
1579
- [x: string]: import("hono/utils/types").JSONValue;
1580
- source?: "system" | "user" | undefined;
1581
- pinned?: boolean | undefined;
1582
- } | undefined;
1583
- tags?: string[] | undefined | undefined;
1584
- };
1585
- };
1586
- outputFormat: "json";
1587
- status: 200;
1588
- };
1589
- };
1590
- } & {
1591
- "/memory/:id": {
1592
- $delete: {
1593
- input: {
1594
- param: {
1595
- id: string;
1596
- };
1597
- };
1598
- output: {
1599
- message: string;
1600
- ok: true;
1601
- };
1602
- outputFormat: "json";
1603
- status: 200;
1604
- };
1605
- };
1606
- }, "/api"> & import("hono/types").MergeSchemaPath<{
1607
- "/resources": {
1608
- $get: {
1609
- input: {};
1610
- output: {
1611
- resources: {
1612
- uri: string;
1613
- source: "mcp" | "internal";
1614
- description?: string | undefined;
1615
- name?: string | undefined;
1616
- mimeType?: string | undefined;
1617
- metadata?: {
1618
- [x: string]: import("hono/utils/types").JSONValue;
1619
- } | undefined;
1620
- serverName?: string | undefined;
1621
- size?: number | undefined;
1622
- lastModified?: string | undefined;
1623
- }[];
1624
- ok: true;
1625
- };
1626
- outputFormat: "json";
1627
- status: 200;
1628
- };
1629
- };
1630
- } & {
1631
- "/resources/:resourceId/content": {
1632
- $get: {
1633
- input: {
1634
- param: {
1635
- resourceId: string;
1636
- };
1637
- };
1638
- output: {
1639
- content: {
1640
- contents: {
1641
- uri: string;
1642
- text?: string | undefined;
1643
- mimeType?: string | undefined;
1644
- blob?: string | undefined;
1645
- }[];
1646
- _meta?: {
1647
- [x: string]: any;
1648
- } | undefined;
1649
- };
1650
- ok: true;
1651
- };
1652
- outputFormat: "json";
1653
- status: 200;
1654
- };
1655
- };
1656
- } & {
1657
- "/resources/:resourceId": {
1658
- $head: {
1659
- input: {
1660
- param: {
1661
- resourceId: string;
1662
- };
1663
- };
1664
- output: {};
1665
- outputFormat: string;
1666
- status: 200;
1667
- } | {
1668
- input: {
1669
- param: {
1670
- resourceId: string;
1671
- };
1672
- };
1673
- output: {};
1674
- outputFormat: string;
1675
- status: 404;
1676
- };
1677
- };
1678
- }, "/api"> & import("hono/types").MergeSchemaPath<{
1679
- "/prompts": {
1680
- $get: {
1681
- input: {};
1682
- output: {
1683
- prompts: {
1684
- name: string;
1685
- source: "config" | "custom" | "mcp";
1686
- description?: string | undefined;
1687
- title?: string | undefined;
1688
- metadata?: {
1689
- [x: string]: import("hono/utils/types").JSONValue;
1690
- } | undefined;
1691
- arguments?: {
1692
- name: string;
1693
- description?: string | undefined;
1694
- required?: boolean | undefined;
1695
- }[] | undefined;
1696
- }[];
1697
- };
1698
- outputFormat: "json";
1699
- status: 200;
1700
- };
1701
- };
1702
- } & {
1703
- "/prompts/custom": {
1704
- $post: {
1705
- input: {
1706
- json: {
1707
- content: string;
1708
- name: string;
1709
- description?: string | undefined;
1710
- title?: string | undefined;
1711
- arguments?: {
1712
- name: string;
1713
- description?: string | undefined;
1714
- required?: boolean | undefined;
1715
- }[] | undefined;
1716
- resource?: {
1717
- mimeType: string;
1718
- data: string;
1719
- filename?: string | undefined;
1720
- } | undefined;
1721
- };
1722
- };
1723
- output: {
1724
- prompt: {
1725
- name: string;
1726
- source: "config" | "custom" | "mcp";
1727
- description?: string | undefined;
1728
- title?: string | undefined;
1729
- metadata?: {
1730
- [x: string]: import("hono/utils/types").JSONValue;
1731
- } | undefined;
1732
- arguments?: {
1733
- name: string;
1734
- description?: string | undefined;
1735
- required?: boolean | undefined;
1736
- }[] | undefined;
1737
- };
1738
- };
1739
- outputFormat: "json";
1740
- status: 201;
1741
- };
1742
- };
1743
- } & {
1744
- "/prompts/custom/:name": {
1745
- $delete: {
1746
- input: {
1747
- param: {
1748
- name: string;
1749
- };
1750
- };
1751
- output: {};
1752
- outputFormat: string;
1753
- status: 204;
1754
- };
1755
- };
1756
- } & {
1757
- "/prompts/:name": {
1758
- $get: {
1759
- input: {
1760
- param: {
1761
- name: string;
1762
- };
1763
- };
1764
- output: never;
1765
- outputFormat: "json";
1766
- status: 404;
1767
- } | {
1768
- input: {
1769
- param: {
1770
- name: string;
1771
- };
1772
- };
1773
- output: {
1774
- definition: {
1775
- name: string;
1776
- description?: string | undefined;
1777
- title?: string | undefined;
1778
- arguments?: {
1779
- name: string;
1780
- description?: string | undefined;
1781
- required?: boolean | undefined;
1782
- }[] | undefined;
1783
- };
1784
- };
1785
- outputFormat: "json";
1786
- status: 200;
1787
- };
1788
- };
1789
- } & {
1790
- "/prompts/:name/resolve": {
1791
- $get: {
1792
- input: {
1793
- param: {
1794
- name: string;
1795
- };
1796
- } & {
1797
- query: {
1798
- context?: string | undefined;
1799
- args?: string | undefined;
1800
- };
1801
- };
1802
- output: never;
1803
- outputFormat: "json";
1804
- status: 404;
1805
- } | {
1806
- input: {
1807
- param: {
1808
- name: string;
1809
- };
1810
- } & {
1811
- query: {
1812
- context?: string | undefined;
1813
- args?: string | undefined;
1814
- };
1815
- };
1816
- output: {
1817
- text: string;
1818
- resources: string[];
1819
- };
1820
- outputFormat: "json";
1821
- status: 200;
1822
- };
1823
- };
1824
- }, "/api"> & import("hono/types").MergeSchemaPath<{
1825
- "/webhooks": {
1826
- $post: {
1827
- input: {
1828
- json: {
1829
- url: string;
1830
- description?: string | undefined;
1831
- secret?: string | undefined;
1832
- };
1833
- };
1834
- output: {
1835
- webhook: {
1836
- id: string;
1837
- createdAt: string | number;
1838
- url: string;
1839
- description?: string | undefined;
1840
- };
1841
- };
1842
- outputFormat: "json";
1843
- status: 201;
1844
- };
1845
- };
1846
- } & {
1847
- "/webhooks": {
1848
- $get: {
1849
- input: {};
1850
- output: {
1851
- webhooks: {
1852
- id: string;
1853
- createdAt: string | number;
1854
- url: string;
1855
- description?: string | undefined;
1856
- }[];
1857
- };
1858
- outputFormat: "json";
1859
- status: 200;
1860
- };
1861
- };
1862
- } & {
1863
- "/webhooks/:webhookId": {
1864
- $get: {
1865
- input: {
1866
- param: {
1867
- webhookId: string;
1868
- };
1869
- };
1870
- output: never;
1871
- outputFormat: "json";
1872
- status: 404;
1873
- } | {
1874
- input: {
1875
- param: {
1876
- webhookId: string;
1877
- };
1878
- };
1879
- output: {
1880
- webhook: {
1881
- id: string;
1882
- createdAt: string | number;
1883
- url: string;
1884
- description?: string | undefined;
1885
- };
1886
- };
1887
- outputFormat: "json";
1888
- status: 200;
1889
- };
1890
- };
1891
- } & {
1892
- "/webhooks/:webhookId": {
1893
- $delete: {
1894
- input: {
1895
- param: {
1896
- webhookId: string;
1897
- };
1898
- };
1899
- output: never;
1900
- outputFormat: "json";
1901
- status: 404;
1902
- } | {
1903
- input: {
1904
- param: {
1905
- webhookId: string;
1906
- };
1907
- };
1908
- output: {
1909
- status: "removed";
1910
- webhookId: string;
1911
- };
1912
- outputFormat: "json";
1913
- status: 200;
1914
- };
1915
- };
1916
- } & {
1917
- "/webhooks/:webhookId/test": {
1918
- $post: {
1919
- input: {
1920
- param: {
1921
- webhookId: string;
1922
- };
1923
- };
1924
- output: never;
1925
- outputFormat: "json";
1926
- status: 404;
1927
- } | {
1928
- input: {
1929
- param: {
1930
- webhookId: string;
1931
- };
1932
- };
1933
- output: {
1934
- result: {
1935
- success: boolean;
1936
- error?: string | undefined;
1937
- responseTime?: number | undefined;
1938
- statusCode?: number | undefined;
1939
- };
1940
- test: "completed";
1941
- };
1942
- outputFormat: "json";
1943
- status: 200;
1944
- };
1945
- };
1946
- }, "/api"> & import("hono/types").MergeSchemaPath<{
1947
- "/mcp/servers": {
1948
- $post: {
1949
- input: {
1950
- json: {
1951
- config: {
1952
- type: "stdio";
1953
- command: string;
1954
- timeout?: number | undefined;
1955
- args?: string[] | undefined;
1956
- enabled?: boolean | undefined;
1957
- env?: Record<string, string> | undefined;
1958
- connectionMode?: "strict" | "lenient" | undefined;
1959
- } | {
1960
- type: "sse";
1961
- url: string;
1962
- timeout?: number | undefined;
1963
- enabled?: boolean | undefined;
1964
- connectionMode?: "strict" | "lenient" | undefined;
1965
- headers?: Record<string, string> | undefined;
1966
- } | {
1967
- type: "http";
1968
- url: string;
1969
- timeout?: number | undefined;
1970
- enabled?: boolean | undefined;
1971
- connectionMode?: "strict" | "lenient" | undefined;
1972
- headers?: Record<string, string> | undefined;
1973
- };
1974
- name: string;
1975
- persistToAgent?: boolean | undefined;
1976
- };
1977
- };
1978
- output: {
1979
- status: string;
1980
- name: string;
1981
- };
1982
- outputFormat: "json";
1983
- status: 200;
1984
- };
1985
- };
1986
- } & {
1987
- "/mcp/servers": {
1988
- $get: {
1989
- input: {};
1990
- output: {
1991
- servers: {
1992
- status: "error" | "connected" | "disconnected" | "auth-required";
1993
- name: string;
1994
- id: string;
1995
- }[];
1996
- };
1997
- outputFormat: "json";
1998
- status: 200;
1999
- };
2000
- };
2001
- } & {
2002
- "/mcp/servers/:serverId/config": {
2003
- $get: {
2004
- input: {
2005
- param: {
2006
- serverId: string;
2007
- };
2008
- };
2009
- output: never;
2010
- outputFormat: "json";
2011
- status: 404;
2012
- } | {
2013
- input: {
2014
- param: {
2015
- serverId: string;
2016
- };
2017
- };
2018
- output: {
2019
- config: {
2020
- timeout: number;
2021
- type: "stdio";
2022
- args: string[];
2023
- command: string;
2024
- enabled: boolean;
2025
- env: {
2026
- [x: string]: string;
2027
- };
2028
- connectionMode: "strict" | "lenient";
2029
- } | {
2030
- timeout: number;
2031
- type: "sse";
2032
- enabled: boolean;
2033
- connectionMode: "strict" | "lenient";
2034
- url: string;
2035
- headers: {
2036
- [x: string]: string;
2037
- };
2038
- } | {
2039
- timeout: number;
2040
- type: "http";
2041
- enabled: boolean;
2042
- connectionMode: "strict" | "lenient";
2043
- url: string;
2044
- headers: {
2045
- [x: string]: string;
2046
- };
2047
- };
2048
- name: string;
2049
- };
2050
- outputFormat: "json";
2051
- status: 200;
2052
- };
2053
- };
2054
- } & {
2055
- "/mcp/servers/:serverId": {
2056
- $put: {
2057
- input: {
2058
- param: {
2059
- serverId: string;
2060
- };
2061
- } & {
2062
- json: {
2063
- config: {
2064
- type: "stdio";
2065
- command: string;
2066
- timeout?: number | undefined;
2067
- args?: string[] | undefined;
2068
- enabled?: boolean | undefined;
2069
- env?: Record<string, string> | undefined;
2070
- connectionMode?: "strict" | "lenient" | undefined;
2071
- } | {
2072
- type: "sse";
2073
- url: string;
2074
- timeout?: number | undefined;
2075
- enabled?: boolean | undefined;
2076
- connectionMode?: "strict" | "lenient" | undefined;
2077
- headers?: Record<string, string> | undefined;
2078
- } | {
2079
- type: "http";
2080
- url: string;
2081
- timeout?: number | undefined;
2082
- enabled?: boolean | undefined;
2083
- connectionMode?: "strict" | "lenient" | undefined;
2084
- headers?: Record<string, string> | undefined;
2085
- };
2086
- persistToAgent?: boolean | undefined;
2087
- };
2088
- };
2089
- output: never;
2090
- outputFormat: "json";
2091
- status: 404;
2092
- } | {
2093
- input: {
2094
- param: {
2095
- serverId: string;
2096
- };
2097
- } & {
2098
- json: {
2099
- config: {
2100
- type: "stdio";
2101
- command: string;
2102
- timeout?: number | undefined;
2103
- args?: string[] | undefined;
2104
- enabled?: boolean | undefined;
2105
- env?: Record<string, string> | undefined;
2106
- connectionMode?: "strict" | "lenient" | undefined;
2107
- } | {
2108
- type: "sse";
2109
- url: string;
2110
- timeout?: number | undefined;
2111
- enabled?: boolean | undefined;
2112
- connectionMode?: "strict" | "lenient" | undefined;
2113
- headers?: Record<string, string> | undefined;
2114
- } | {
2115
- type: "http";
2116
- url: string;
2117
- timeout?: number | undefined;
2118
- enabled?: boolean | undefined;
2119
- connectionMode?: "strict" | "lenient" | undefined;
2120
- headers?: Record<string, string> | undefined;
2121
- };
2122
- persistToAgent?: boolean | undefined;
2123
- };
2124
- };
2125
- output: {
2126
- status: string;
2127
- name: string;
2128
- };
2129
- outputFormat: "json";
2130
- status: 200;
2131
- };
2132
- };
2133
- } & {
2134
- "/mcp/servers/:serverId/tools": {
2135
- $get: {
2136
- input: {
2137
- param: {
2138
- serverId: string;
2139
- };
2140
- };
2141
- output: never;
2142
- outputFormat: "json";
2143
- status: 404;
2144
- } | {
2145
- input: {
2146
- param: {
2147
- serverId: string;
2148
- };
2149
- };
2150
- output: {
2151
- tools: {
2152
- description: string;
2153
- name: string;
2154
- id: string;
2155
- inputSchema?: {
2156
- [x: string]: import("hono/utils/types").JSONValue;
2157
- type?: "object" | undefined;
2158
- properties?: {
2159
- [x: string]: {
2160
- [x: string]: import("hono/utils/types").JSONValue;
2161
- description?: string | undefined;
2162
- default?: any;
2163
- type?: "string" | "number" | "boolean" | "object" | "integer" | "array" | undefined;
2164
- enum?: (string | number | boolean)[] | undefined;
2165
- };
2166
- } | undefined;
2167
- required?: string[] | undefined;
2168
- } | undefined;
2169
- _meta?: {
2170
- [x: string]: import("hono/utils/types").JSONValue;
2171
- } | undefined;
2172
- }[];
2173
- };
2174
- outputFormat: "json";
2175
- status: 200;
2176
- };
2177
- };
2178
- } & {
2179
- "/mcp/servers/:serverId": {
2180
- $delete: {
2181
- input: {
2182
- param: {
2183
- serverId: string;
2184
- };
2185
- };
2186
- output: never;
2187
- outputFormat: "json";
2188
- status: 404;
2189
- } | {
2190
- input: {
2191
- param: {
2192
- serverId: string;
2193
- };
2194
- };
2195
- output: {
2196
- status: "disconnected";
2197
- id: string;
2198
- };
2199
- outputFormat: "json";
2200
- status: 200;
2201
- };
2202
- };
2203
- } & {
2204
- "/mcp/servers/:serverId/restart": {
2205
- $post: {
2206
- input: {
2207
- param: {
2208
- serverId: string;
2209
- };
2210
- };
2211
- output: never;
2212
- outputFormat: "json";
2213
- status: 404;
2214
- } | {
2215
- input: {
2216
- param: {
2217
- serverId: string;
2218
- };
2219
- };
2220
- output: {
2221
- status: "restarted";
2222
- id: string;
2223
- };
2224
- outputFormat: "json";
2225
- status: 200;
2226
- };
2227
- };
2228
- } & {
2229
- "/mcp/servers/:serverId/tools/:toolName/execute": {
2230
- $post: {
2231
- input: {
2232
- param: {
2233
- serverId: string;
2234
- toolName: string;
2235
- };
2236
- } & {
2237
- json: Record<string, unknown>;
2238
- };
2239
- output: never;
2240
- outputFormat: "json";
2241
- status: 404;
2242
- } | {
2243
- input: {
2244
- param: {
2245
- serverId: string;
2246
- toolName: string;
2247
- };
2248
- } & {
2249
- json: Record<string, unknown>;
2250
- };
2251
- output: {
2252
- success: boolean;
2253
- error?: string | undefined;
2254
- data?: any;
2255
- };
2256
- outputFormat: "json";
2257
- status: 200;
2258
- };
2259
- };
2260
- } & {
2261
- "/mcp/servers/:serverId/resources": {
2262
- $get: {
2263
- input: {
2264
- param: {
2265
- serverId: string;
2266
- };
2267
- };
2268
- output: never;
2269
- outputFormat: "json";
2270
- status: 404;
2271
- } | {
2272
- input: {
2273
- param: {
2274
- serverId: string;
2275
- };
2276
- };
2277
- output: {
2278
- resources: {
2279
- name: string;
2280
- uri: string;
2281
- serverName: string;
2282
- originalUri: string;
2283
- }[];
2284
- success: boolean;
2285
- };
2286
- outputFormat: "json";
2287
- status: 200;
2288
- };
2289
- };
2290
- } & {
2291
- "/mcp/servers/:serverId/resources/:resourceId/content": {
2292
- $get: {
2293
- input: {
2294
- param: {
2295
- serverId: string;
2296
- resourceId: string;
2297
- };
2298
- };
2299
- output: never;
2300
- outputFormat: "json";
2301
- status: 404;
2302
- } | {
2303
- input: {
2304
- param: {
2305
- serverId: string;
2306
- resourceId: string;
2307
- };
2308
- };
2309
- output: {
2310
- data: {
2311
- content?: any;
2312
- };
2313
- success: boolean;
2314
- };
2315
- outputFormat: "json";
2316
- status: 200;
2317
- };
2318
- };
2319
- }, "/api"> & import("hono/types").MergeSchemaPath<{
2320
- "/search/messages": {
2321
- $get: {
2322
- input: {
2323
- query: {
2324
- q: string;
2325
- sessionId?: string | undefined;
2326
- role?: "system" | "user" | "assistant" | "tool" | undefined;
2327
- limit?: number | undefined;
2328
- offset?: number | undefined;
2329
- };
2330
- };
2331
- output: {
2332
- query: string;
2333
- results: {
2334
- message: {
2335
- content: string | ({
2336
- type: "text";
2337
- text: string;
2338
- } | {
2339
- type: "image";
2340
- image: string;
2341
- mimeType?: string | undefined;
2342
- } | {
2343
- type: "file";
2344
- mimeType: string;
2345
- data: string;
2346
- filename?: string | undefined;
2347
- } | {
2348
- type: "ui-resource";
2349
- mimeType: string;
2350
- uri: string;
2351
- content?: string | undefined;
2352
- blob?: string | undefined;
2353
- metadata?: {
2354
- title?: string | undefined;
2355
- preferredSize?: {
2356
- width: number;
2357
- height: number;
2358
- } | undefined;
2359
- } | undefined;
2360
- })[] | null;
2361
- role: "system" | "user" | "assistant" | "tool";
2362
- usageScopeId?: string | undefined;
2363
- name?: string | undefined;
2364
- id?: string | undefined;
2365
- timestamp?: number | undefined;
2366
- reasoning?: string | undefined;
2367
- tokenUsage?: {
2368
- inputTokens?: number | undefined;
2369
- outputTokens?: number | undefined;
2370
- reasoningTokens?: number | undefined;
2371
- cacheReadTokens?: number | undefined;
2372
- cacheWriteTokens?: number | undefined;
2373
- totalTokens?: number | undefined;
2374
- } | undefined;
2375
- estimatedCost?: number | undefined;
2376
- pricingStatus?: "estimated" | "unpriced" | undefined;
2377
- model?: string | undefined;
2378
- provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
2379
- toolCalls?: {
2380
- function: {
2381
- name: string;
2382
- arguments: string;
2383
- };
2384
- type: "function";
2385
- id: string;
2386
- }[] | undefined;
2387
- toolCallId?: string | undefined;
2388
- success?: boolean | undefined;
2389
- };
2390
- sessionId: string;
2391
- context: string;
2392
- matchedText: string;
2393
- messageIndex: number;
2394
- }[];
2395
- total: number;
2396
- hasMore: boolean;
2397
- };
2398
- outputFormat: "json";
2399
- status: 200;
2400
- };
2401
- };
2402
- } & {
2403
- "/search/sessions": {
2404
- $get: {
2405
- input: {
2406
- query: {
2407
- q: string;
2408
- };
2409
- };
2410
- output: {
2411
- query: string;
2412
- results: {
2413
- sessionId: string;
2414
- metadata: {
2415
- messageCount: number;
2416
- createdAt: number;
2417
- lastActivity: number;
2418
- };
2419
- matchCount: number;
2420
- firstMatch: {
2421
- message: {
2422
- content: string | ({
2423
- type: "text";
2424
- text: string;
2425
- } | {
2426
- type: "image";
2427
- image: string;
2428
- mimeType?: string | undefined;
2429
- } | {
2430
- type: "file";
2431
- mimeType: string;
2432
- data: string;
2433
- filename?: string | undefined;
2434
- } | {
2435
- type: "ui-resource";
2436
- mimeType: string;
2437
- uri: string;
2438
- content?: string | undefined;
2439
- blob?: string | undefined;
2440
- metadata?: {
2441
- title?: string | undefined;
2442
- preferredSize?: {
2443
- width: number;
2444
- height: number;
2445
- } | undefined;
2446
- } | undefined;
2447
- })[] | null;
2448
- role: "system" | "user" | "assistant" | "tool";
2449
- usageScopeId?: string | undefined;
2450
- name?: string | undefined;
2451
- id?: string | undefined;
2452
- timestamp?: number | undefined;
2453
- reasoning?: string | undefined;
2454
- tokenUsage?: {
2455
- inputTokens?: number | undefined;
2456
- outputTokens?: number | undefined;
2457
- reasoningTokens?: number | undefined;
2458
- cacheReadTokens?: number | undefined;
2459
- cacheWriteTokens?: number | undefined;
2460
- totalTokens?: number | undefined;
2461
- } | undefined;
2462
- estimatedCost?: number | undefined;
2463
- pricingStatus?: "estimated" | "unpriced" | undefined;
2464
- model?: string | undefined;
2465
- provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
2466
- toolCalls?: {
2467
- function: {
2468
- name: string;
2469
- arguments: string;
2470
- };
2471
- type: "function";
2472
- id: string;
2473
- }[] | undefined;
2474
- toolCallId?: string | undefined;
2475
- success?: boolean | undefined;
2476
- };
2477
- sessionId: string;
2478
- context: string;
2479
- matchedText: string;
2480
- messageIndex: number;
2481
- };
2482
- }[];
2483
- total: number;
2484
- hasMore: boolean;
2485
- };
2486
- outputFormat: "json";
2487
- status: 200;
2488
- };
2489
- };
2490
- }, "/api"> & import("hono/types").MergeSchemaPath<{
2491
- "/sessions": {
2492
- $get: {
2493
- input: {};
2494
- output: {
2495
- sessions: {
2496
- id: string;
2497
- messageCount: number;
2498
- createdAt: number | null;
2499
- lastActivity: number | null;
2500
- title?: string | null | undefined;
2501
- tokenUsage?: {
2502
- inputTokens: number;
2503
- outputTokens: number;
2504
- reasoningTokens: number;
2505
- cacheReadTokens: number;
2506
- cacheWriteTokens: number;
2507
- totalTokens: number;
2508
- } | undefined;
2509
- estimatedCost?: number | undefined;
2510
- modelStats?: {
2511
- tokenUsage: {
2512
- inputTokens: number;
2513
- outputTokens: number;
2514
- reasoningTokens: number;
2515
- cacheReadTokens: number;
2516
- cacheWriteTokens: number;
2517
- totalTokens: number;
2518
- };
2519
- estimatedCost: number;
2520
- model: string;
2521
- provider: string;
2522
- messageCount: number;
2523
- firstUsedAt: number;
2524
- lastUsedAt: number;
2525
- }[] | undefined;
2526
- usageTracking?: {
2527
- hasUntrackedChatGPTLoginUsage?: boolean | undefined;
2528
- } | undefined;
2529
- workspaceId?: string | null | undefined;
2530
- parentSessionId?: string | null | undefined;
2531
- }[];
2532
- };
2533
- outputFormat: "json";
2534
- status: 200;
2535
- };
2536
- };
2537
- } & {
2538
- "/sessions": {
2539
- $post: {
2540
- input: {
2541
- json: {
2542
- sessionId?: string | undefined;
2543
- };
2544
- };
2545
- output: {
2546
- session: {
2547
- id: string;
2548
- messageCount: number;
2549
- createdAt: number | null;
2550
- lastActivity: number | null;
2551
- title?: string | null | undefined;
2552
- tokenUsage?: {
2553
- inputTokens: number;
2554
- outputTokens: number;
2555
- reasoningTokens: number;
2556
- cacheReadTokens: number;
2557
- cacheWriteTokens: number;
2558
- totalTokens: number;
2559
- } | undefined;
2560
- estimatedCost?: number | undefined;
2561
- modelStats?: {
2562
- tokenUsage: {
2563
- inputTokens: number;
2564
- outputTokens: number;
2565
- reasoningTokens: number;
2566
- cacheReadTokens: number;
2567
- cacheWriteTokens: number;
2568
- totalTokens: number;
2569
- };
2570
- estimatedCost: number;
2571
- model: string;
2572
- provider: string;
2573
- messageCount: number;
2574
- firstUsedAt: number;
2575
- lastUsedAt: number;
2576
- }[] | undefined;
2577
- usageTracking?: {
2578
- hasUntrackedChatGPTLoginUsage?: boolean | undefined;
2579
- } | undefined;
2580
- workspaceId?: string | null | undefined;
2581
- parentSessionId?: string | null | undefined;
2582
- };
2583
- };
2584
- outputFormat: "json";
2585
- status: 201;
2586
- };
2587
- };
2588
- } & {
2589
- "/sessions/:sessionId/fork": {
2590
- $post: {
2591
- input: {
2592
- param: {
2593
- sessionId: string;
2594
- };
2595
- };
2596
- output: never;
2597
- outputFormat: "json";
2598
- status: 400;
2599
- } | {
2600
- input: {
2601
- param: {
2602
- sessionId: string;
2603
- };
2604
- };
2605
- output: {
2606
- session: {
2607
- id: string;
2608
- messageCount: number;
2609
- createdAt: number | null;
2610
- lastActivity: number | null;
2611
- title?: string | null | undefined;
2612
- tokenUsage?: {
2613
- inputTokens: number;
2614
- outputTokens: number;
2615
- reasoningTokens: number;
2616
- cacheReadTokens: number;
2617
- cacheWriteTokens: number;
2618
- totalTokens: number;
2619
- } | undefined;
2620
- estimatedCost?: number | undefined;
2621
- modelStats?: {
2622
- tokenUsage: {
2623
- inputTokens: number;
2624
- outputTokens: number;
2625
- reasoningTokens: number;
2626
- cacheReadTokens: number;
2627
- cacheWriteTokens: number;
2628
- totalTokens: number;
2629
- };
2630
- estimatedCost: number;
2631
- model: string;
2632
- provider: string;
2633
- messageCount: number;
2634
- firstUsedAt: number;
2635
- lastUsedAt: number;
2636
- }[] | undefined;
2637
- usageTracking?: {
2638
- hasUntrackedChatGPTLoginUsage?: boolean | undefined;
2639
- } | undefined;
2640
- workspaceId?: string | null | undefined;
2641
- parentSessionId?: string | null | undefined;
2642
- };
2643
- };
2644
- outputFormat: "json";
2645
- status: 201;
2646
- } | {
2647
- input: {
2648
- param: {
2649
- sessionId: string;
2650
- };
2651
- };
2652
- output: never;
2653
- outputFormat: "json";
2654
- status: 404;
2655
- };
2656
- };
2657
- } & {
2658
- "/sessions/:sessionId": {
2659
- $get: {
2660
- input: {
2661
- param: {
2662
- sessionId: string;
2663
- };
2664
- };
2665
- output: {
2666
- session: {
2667
- id: string;
2668
- messageCount: number;
2669
- createdAt: number | null;
2670
- lastActivity: number | null;
2671
- history: number;
2672
- title?: string | null | undefined;
2673
- tokenUsage?: {
2674
- inputTokens: number;
2675
- outputTokens: number;
2676
- reasoningTokens: number;
2677
- cacheReadTokens: number;
2678
- cacheWriteTokens: number;
2679
- totalTokens: number;
2680
- } | undefined;
2681
- estimatedCost?: number | undefined;
2682
- modelStats?: {
2683
- tokenUsage: {
2684
- inputTokens: number;
2685
- outputTokens: number;
2686
- reasoningTokens: number;
2687
- cacheReadTokens: number;
2688
- cacheWriteTokens: number;
2689
- totalTokens: number;
2690
- };
2691
- estimatedCost: number;
2692
- model: string;
2693
- provider: string;
2694
- messageCount: number;
2695
- firstUsedAt: number;
2696
- lastUsedAt: number;
2697
- }[] | undefined;
2698
- usageTracking?: {
2699
- hasUntrackedChatGPTLoginUsage?: boolean | undefined;
2700
- } | undefined;
2701
- workspaceId?: string | null | undefined;
2702
- parentSessionId?: string | null | undefined;
2703
- };
2704
- };
2705
- outputFormat: "json";
2706
- status: 200;
2707
- };
2708
- };
2709
- } & {
2710
- "/sessions/:sessionId/history": {
2711
- $get: {
2712
- input: {
2713
- param: {
2714
- sessionId: string;
2715
- };
2716
- };
2717
- output: {
2718
- history: {
2719
- content: string | ({
2720
- type: "text";
2721
- text: string;
2722
- } | {
2723
- type: "image";
2724
- image: string;
2725
- mimeType?: string | undefined;
2726
- } | {
2727
- type: "file";
2728
- mimeType: string;
2729
- data: string;
2730
- filename?: string | undefined;
2731
- } | {
2732
- type: "ui-resource";
2733
- mimeType: string;
2734
- uri: string;
2735
- content?: string | undefined;
2736
- blob?: string | undefined;
2737
- metadata?: {
2738
- title?: string | undefined;
2739
- preferredSize?: {
2740
- width: number;
2741
- height: number;
2742
- } | undefined;
2743
- } | undefined;
2744
- })[] | null;
2745
- role: "system" | "user" | "assistant" | "tool";
2746
- usageScopeId?: string | undefined;
2747
- name?: string | undefined;
2748
- id?: string | undefined;
2749
- timestamp?: number | undefined;
2750
- reasoning?: string | undefined;
2751
- tokenUsage?: {
2752
- inputTokens?: number | undefined;
2753
- outputTokens?: number | undefined;
2754
- reasoningTokens?: number | undefined;
2755
- cacheReadTokens?: number | undefined;
2756
- cacheWriteTokens?: number | undefined;
2757
- totalTokens?: number | undefined;
2758
- } | undefined;
2759
- estimatedCost?: number | undefined;
2760
- pricingStatus?: "estimated" | "unpriced" | undefined;
2761
- model?: string | undefined;
2762
- provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
2763
- toolCalls?: {
2764
- function: {
2765
- name: string;
2766
- arguments: string;
2767
- };
2768
- type: "function";
2769
- id: string;
2770
- }[] | undefined;
2771
- toolCallId?: string | undefined;
2772
- success?: boolean | undefined;
2773
- }[];
2774
- isBusy: boolean;
2775
- };
2776
- outputFormat: "json";
2777
- status: 200;
2778
- };
2779
- };
2780
- } & {
2781
- "/sessions/:sessionId/system-prompt/contributors": {
2782
- $get: {
2783
- input: {
2784
- param: {
2785
- sessionId: string;
2786
- };
2787
- };
2788
- output: never;
2789
- outputFormat: "json";
2790
- status: 404;
2791
- } | {
2792
- input: {
2793
- param: {
2794
- sessionId: string;
2795
- };
2796
- };
2797
- output: {
2798
- contributors: {
2799
- id: string;
2800
- priority: number;
2801
- }[];
2802
- };
2803
- outputFormat: "json";
2804
- status: 200;
2805
- };
2806
- };
2807
- } & {
2808
- "/sessions/:sessionId/system-prompt/contributors": {
2809
- $post: {
2810
- input: {
2811
- param: {
2812
- sessionId: string;
2813
- };
2814
- } & {
2815
- json: {
2816
- id: string;
2817
- content?: string | undefined;
2818
- enabled?: boolean | undefined;
2819
- priority?: number | undefined;
2820
- };
2821
- };
2822
- output: never;
2823
- outputFormat: "json";
2824
- status: 400;
2825
- } | {
2826
- input: {
2827
- param: {
2828
- sessionId: string;
2829
- };
2830
- } & {
2831
- json: {
2832
- id: string;
2833
- content?: string | undefined;
2834
- enabled?: boolean | undefined;
2835
- priority?: number | undefined;
2836
- };
2837
- };
2838
- output: never;
2839
- outputFormat: "json";
2840
- status: 404;
2841
- } | {
2842
- input: {
2843
- param: {
2844
- sessionId: string;
2845
- };
2846
- } & {
2847
- json: {
2848
- id: string;
2849
- content?: string | undefined;
2850
- enabled?: boolean | undefined;
2851
- priority?: number | undefined;
2852
- };
2853
- };
2854
- output: {
2855
- id: string;
2856
- enabled: boolean;
2857
- priority?: number | undefined;
2858
- replaced?: boolean | undefined;
2859
- removed?: boolean | undefined;
2860
- contentLength?: number | undefined;
2861
- truncated?: boolean | undefined;
2862
- };
2863
- outputFormat: "json";
2864
- status: 200;
2865
- };
2866
- };
2867
- } & {
2868
- "/sessions/:sessionId": {
2869
- $delete: {
2870
- input: {
2871
- param: {
2872
- sessionId: string;
2873
- };
2874
- };
2875
- output: {
2876
- status: "deleted";
2877
- sessionId: string;
2878
- };
2879
- outputFormat: "json";
2880
- status: 200;
2881
- };
2882
- };
2883
- } & {
2884
- "/sessions/:sessionId/cancel": {
2885
- $post: {
2886
- input: {
2887
- param: {
2888
- sessionId: string;
2889
- };
2890
- } & {
2891
- json: {
2892
- clearQueue?: boolean | undefined;
2893
- };
2894
- };
2895
- output: {
2896
- sessionId: string;
2897
- cancelled: boolean;
2898
- queueCleared: boolean;
2899
- clearedCount: number;
2900
- };
2901
- outputFormat: "json";
2902
- status: 200;
2903
- };
2904
- };
2905
- } & {
2906
- "/sessions/:sessionId/load": {
2907
- $get: {
2908
- input: {
2909
- param: {
2910
- sessionId: string;
2911
- };
2912
- };
2913
- output: {
2914
- session: {
2915
- id: string;
2916
- messageCount: number;
2917
- createdAt: number | null;
2918
- lastActivity: number | null;
2919
- isBusy: boolean;
2920
- usageSummary: {
2921
- tokenUsage: {
2922
- inputTokens: number;
2923
- outputTokens: number;
2924
- reasoningTokens: number;
2925
- cacheReadTokens: number;
2926
- cacheWriteTokens: number;
2927
- totalTokens: number;
2928
- };
2929
- estimatedCost: number;
2930
- hasUnpricedResponses: boolean;
2931
- modelStats?: {
2932
- tokenUsage: {
2933
- inputTokens: number;
2934
- outputTokens: number;
2935
- reasoningTokens: number;
2936
- cacheReadTokens: number;
2937
- cacheWriteTokens: number;
2938
- totalTokens: number;
2939
- };
2940
- estimatedCost: number;
2941
- model: string;
2942
- provider: string;
2943
- messageCount: number;
2944
- }[] | undefined;
2945
- };
2946
- activeUsageScopeId: string | null;
2947
- activeUsageScope: {
2948
- tokenUsage: {
2949
- inputTokens: number;
2950
- outputTokens: number;
2951
- reasoningTokens: number;
2952
- cacheReadTokens: number;
2953
- cacheWriteTokens: number;
2954
- totalTokens: number;
2955
- };
2956
- estimatedCost: number;
2957
- hasUnpricedResponses: boolean;
2958
- scopeId: string;
2959
- modelStats?: {
2960
- tokenUsage: {
2961
- inputTokens: number;
2962
- outputTokens: number;
2963
- reasoningTokens: number;
2964
- cacheReadTokens: number;
2965
- cacheWriteTokens: number;
2966
- totalTokens: number;
2967
- };
2968
- estimatedCost: number;
2969
- model: string;
2970
- provider: string;
2971
- messageCount: number;
2972
- }[] | undefined;
2973
- } | null;
2974
- title?: string | null | undefined;
2975
- tokenUsage?: {
2976
- inputTokens: number;
2977
- outputTokens: number;
2978
- reasoningTokens: number;
2979
- cacheReadTokens: number;
2980
- cacheWriteTokens: number;
2981
- totalTokens: number;
2982
- } | undefined;
2983
- estimatedCost?: number | undefined;
2984
- modelStats?: {
2985
- tokenUsage: {
2986
- inputTokens: number;
2987
- outputTokens: number;
2988
- reasoningTokens: number;
2989
- cacheReadTokens: number;
2990
- cacheWriteTokens: number;
2991
- totalTokens: number;
2992
- };
2993
- estimatedCost: number;
2994
- model: string;
2995
- provider: string;
2996
- messageCount: number;
2997
- firstUsedAt: number;
2998
- lastUsedAt: number;
2999
- }[] | undefined;
3000
- usageTracking?: {
3001
- hasUntrackedChatGPTLoginUsage?: boolean | undefined;
3002
- } | undefined;
3003
- workspaceId?: string | null | undefined;
3004
- parentSessionId?: string | null | undefined;
3005
- };
3006
- };
3007
- outputFormat: "json";
3008
- status: 200;
3009
- } | {
3010
- input: {
3011
- param: {
3012
- sessionId: string;
3013
- };
3014
- };
3015
- output: {
3016
- error: string;
3017
- };
3018
- outputFormat: "json";
3019
- status: 404;
3020
- };
3021
- };
3022
- } & {
3023
- "/sessions/:sessionId/clear-context": {
3024
- $post: {
3025
- input: {
3026
- param: {
3027
- sessionId: string;
3028
- };
3029
- };
3030
- output: {
3031
- status: "context cleared";
3032
- sessionId: string;
3033
- };
3034
- outputFormat: "json";
3035
- status: 200;
3036
- };
3037
- };
3038
- } & {
3039
- "/sessions/:sessionId": {
3040
- $patch: {
3041
- input: {
3042
- param: {
3043
- sessionId: string;
3044
- };
3045
- } & {
3046
- json: {
3047
- title: string;
3048
- };
3049
- };
3050
- output: {
3051
- session: {
3052
- id: string;
3053
- messageCount: number;
3054
- createdAt: number | null;
3055
- lastActivity: number | null;
3056
- title?: string | null | undefined;
3057
- tokenUsage?: {
3058
- inputTokens: number;
3059
- outputTokens: number;
3060
- reasoningTokens: number;
3061
- cacheReadTokens: number;
3062
- cacheWriteTokens: number;
3063
- totalTokens: number;
3064
- } | undefined;
3065
- estimatedCost?: number | undefined;
3066
- modelStats?: {
3067
- tokenUsage: {
3068
- inputTokens: number;
3069
- outputTokens: number;
3070
- reasoningTokens: number;
3071
- cacheReadTokens: number;
3072
- cacheWriteTokens: number;
3073
- totalTokens: number;
3074
- };
3075
- estimatedCost: number;
3076
- model: string;
3077
- provider: string;
3078
- messageCount: number;
3079
- firstUsedAt: number;
3080
- lastUsedAt: number;
3081
- }[] | undefined;
3082
- usageTracking?: {
3083
- hasUntrackedChatGPTLoginUsage?: boolean | undefined;
3084
- } | undefined;
3085
- workspaceId?: string | null | undefined;
3086
- parentSessionId?: string | null | undefined;
3087
- };
3088
- };
3089
- outputFormat: "json";
3090
- status: 200;
3091
- };
3092
- };
3093
- } & {
3094
- "/sessions/:sessionId/generate-title": {
3095
- $post: {
3096
- input: {
3097
- param: {
3098
- sessionId: string;
3099
- };
3100
- };
3101
- output: never;
3102
- outputFormat: "json";
3103
- status: 404;
3104
- } | {
3105
- input: {
3106
- param: {
3107
- sessionId: string;
3108
- };
3109
- };
3110
- output: {
3111
- title: string | null;
3112
- sessionId: string;
3113
- };
3114
- outputFormat: "json";
3115
- status: 200;
3116
- };
3117
- };
3118
- }, "/api"> & import("hono/types").MergeSchemaPath<{
3119
- "/llm/current": {
3120
- $get: {
3121
- input: {
3122
- query: {
3123
- sessionId?: string | undefined;
3124
- };
3125
- };
3126
- output: {
3127
- config: {
3128
- model: string;
3129
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3130
- reasoning?: {
3131
- variant: string;
3132
- budgetTokens?: number | undefined | undefined;
3133
- } | undefined;
3134
- maxIterations?: number | undefined;
3135
- baseURL?: string | undefined;
3136
- maxInputTokens?: number | undefined;
3137
- maxOutputTokens?: number | undefined;
3138
- temperature?: number | undefined;
3139
- allowedMediaTypes?: string[] | undefined;
3140
- hasApiKey?: boolean | undefined;
3141
- displayName?: string | undefined;
3142
- };
3143
- routing: {
3144
- viaDexto: boolean;
3145
- };
3146
- };
3147
- outputFormat: "json";
3148
- status: 200;
3149
- };
3150
- };
3151
- } & {
3152
- "/llm/catalog": {
3153
- $get: {
3154
- input: {
3155
- query: {
3156
- scope?: "curated" | "all" | undefined;
3157
- provider?: string | string[] | undefined;
3158
- includeModels?: "0" | "1" | "true" | "false" | undefined;
3159
- hasKey?: "0" | "1" | "true" | "false" | undefined;
3160
- fileType?: "image" | "audio" | "pdf" | undefined;
3161
- defaultOnly?: "0" | "1" | "true" | "false" | undefined;
3162
- mode?: "flat" | "grouped" | undefined;
3163
- };
3164
- };
3165
- output: {
3166
- providers: {
3167
- openai?: {
3168
- name: string;
3169
- hasApiKey: boolean;
3170
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3171
- primaryEnvVar: string;
3172
- supportsBaseURL: boolean;
3173
- models: {
3174
- name: string;
3175
- maxInputTokens: number;
3176
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3177
- default?: boolean | undefined;
3178
- displayName?: string | undefined;
3179
- pricing?: {
3180
- inputPerM: number;
3181
- outputPerM: number;
3182
- cacheReadPerM?: number | undefined;
3183
- cacheWritePerM?: number | undefined;
3184
- currency?: "USD" | undefined;
3185
- unit?: "per_million_tokens" | undefined;
3186
- } | undefined;
3187
- }[];
3188
- } | undefined;
3189
- "openai-compatible"?: {
3190
- name: string;
3191
- hasApiKey: boolean;
3192
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3193
- primaryEnvVar: string;
3194
- supportsBaseURL: boolean;
3195
- models: {
3196
- name: string;
3197
- maxInputTokens: number;
3198
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3199
- default?: boolean | undefined;
3200
- displayName?: string | undefined;
3201
- pricing?: {
3202
- inputPerM: number;
3203
- outputPerM: number;
3204
- cacheReadPerM?: number | undefined;
3205
- cacheWritePerM?: number | undefined;
3206
- currency?: "USD" | undefined;
3207
- unit?: "per_million_tokens" | undefined;
3208
- } | undefined;
3209
- }[];
3210
- } | undefined;
3211
- anthropic?: {
3212
- name: string;
3213
- hasApiKey: boolean;
3214
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3215
- primaryEnvVar: string;
3216
- supportsBaseURL: boolean;
3217
- models: {
3218
- name: string;
3219
- maxInputTokens: number;
3220
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3221
- default?: boolean | undefined;
3222
- displayName?: string | undefined;
3223
- pricing?: {
3224
- inputPerM: number;
3225
- outputPerM: number;
3226
- cacheReadPerM?: number | undefined;
3227
- cacheWritePerM?: number | undefined;
3228
- currency?: "USD" | undefined;
3229
- unit?: "per_million_tokens" | undefined;
3230
- } | undefined;
3231
- }[];
3232
- } | undefined;
3233
- google?: {
3234
- name: string;
3235
- hasApiKey: boolean;
3236
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3237
- primaryEnvVar: string;
3238
- supportsBaseURL: boolean;
3239
- models: {
3240
- name: string;
3241
- maxInputTokens: number;
3242
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3243
- default?: boolean | undefined;
3244
- displayName?: string | undefined;
3245
- pricing?: {
3246
- inputPerM: number;
3247
- outputPerM: number;
3248
- cacheReadPerM?: number | undefined;
3249
- cacheWritePerM?: number | undefined;
3250
- currency?: "USD" | undefined;
3251
- unit?: "per_million_tokens" | undefined;
3252
- } | undefined;
3253
- }[];
3254
- } | undefined;
3255
- groq?: {
3256
- name: string;
3257
- hasApiKey: boolean;
3258
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3259
- primaryEnvVar: string;
3260
- supportsBaseURL: boolean;
3261
- models: {
3262
- name: string;
3263
- maxInputTokens: number;
3264
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3265
- default?: boolean | undefined;
3266
- displayName?: string | undefined;
3267
- pricing?: {
3268
- inputPerM: number;
3269
- outputPerM: number;
3270
- cacheReadPerM?: number | undefined;
3271
- cacheWritePerM?: number | undefined;
3272
- currency?: "USD" | undefined;
3273
- unit?: "per_million_tokens" | undefined;
3274
- } | undefined;
3275
- }[];
3276
- } | undefined;
3277
- xai?: {
3278
- name: string;
3279
- hasApiKey: boolean;
3280
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3281
- primaryEnvVar: string;
3282
- supportsBaseURL: boolean;
3283
- models: {
3284
- name: string;
3285
- maxInputTokens: number;
3286
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3287
- default?: boolean | undefined;
3288
- displayName?: string | undefined;
3289
- pricing?: {
3290
- inputPerM: number;
3291
- outputPerM: number;
3292
- cacheReadPerM?: number | undefined;
3293
- cacheWritePerM?: number | undefined;
3294
- currency?: "USD" | undefined;
3295
- unit?: "per_million_tokens" | undefined;
3296
- } | undefined;
3297
- }[];
3298
- } | undefined;
3299
- cohere?: {
3300
- name: string;
3301
- hasApiKey: boolean;
3302
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3303
- primaryEnvVar: string;
3304
- supportsBaseURL: boolean;
3305
- models: {
3306
- name: string;
3307
- maxInputTokens: number;
3308
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3309
- default?: boolean | undefined;
3310
- displayName?: string | undefined;
3311
- pricing?: {
3312
- inputPerM: number;
3313
- outputPerM: number;
3314
- cacheReadPerM?: number | undefined;
3315
- cacheWritePerM?: number | undefined;
3316
- currency?: "USD" | undefined;
3317
- unit?: "per_million_tokens" | undefined;
3318
- } | undefined;
3319
- }[];
3320
- } | undefined;
3321
- minimax?: {
3322
- name: string;
3323
- hasApiKey: boolean;
3324
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3325
- primaryEnvVar: string;
3326
- supportsBaseURL: boolean;
3327
- models: {
3328
- name: string;
3329
- maxInputTokens: number;
3330
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3331
- default?: boolean | undefined;
3332
- displayName?: string | undefined;
3333
- pricing?: {
3334
- inputPerM: number;
3335
- outputPerM: number;
3336
- cacheReadPerM?: number | undefined;
3337
- cacheWritePerM?: number | undefined;
3338
- currency?: "USD" | undefined;
3339
- unit?: "per_million_tokens" | undefined;
3340
- } | undefined;
3341
- }[];
3342
- } | undefined;
3343
- glm?: {
3344
- name: string;
3345
- hasApiKey: boolean;
3346
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3347
- primaryEnvVar: string;
3348
- supportsBaseURL: boolean;
3349
- models: {
3350
- name: string;
3351
- maxInputTokens: number;
3352
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3353
- default?: boolean | undefined;
3354
- displayName?: string | undefined;
3355
- pricing?: {
3356
- inputPerM: number;
3357
- outputPerM: number;
3358
- cacheReadPerM?: number | undefined;
3359
- cacheWritePerM?: number | undefined;
3360
- currency?: "USD" | undefined;
3361
- unit?: "per_million_tokens" | undefined;
3362
- } | undefined;
3363
- }[];
3364
- } | undefined;
3365
- openrouter?: {
3366
- name: string;
3367
- hasApiKey: boolean;
3368
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3369
- primaryEnvVar: string;
3370
- supportsBaseURL: boolean;
3371
- models: {
3372
- name: string;
3373
- maxInputTokens: number;
3374
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3375
- default?: boolean | undefined;
3376
- displayName?: string | undefined;
3377
- pricing?: {
3378
- inputPerM: number;
3379
- outputPerM: number;
3380
- cacheReadPerM?: number | undefined;
3381
- cacheWritePerM?: number | undefined;
3382
- currency?: "USD" | undefined;
3383
- unit?: "per_million_tokens" | undefined;
3384
- } | undefined;
3385
- }[];
3386
- } | undefined;
3387
- litellm?: {
3388
- name: string;
3389
- hasApiKey: boolean;
3390
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3391
- primaryEnvVar: string;
3392
- supportsBaseURL: boolean;
3393
- models: {
3394
- name: string;
3395
- maxInputTokens: number;
3396
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3397
- default?: boolean | undefined;
3398
- displayName?: string | undefined;
3399
- pricing?: {
3400
- inputPerM: number;
3401
- outputPerM: number;
3402
- cacheReadPerM?: number | undefined;
3403
- cacheWritePerM?: number | undefined;
3404
- currency?: "USD" | undefined;
3405
- unit?: "per_million_tokens" | undefined;
3406
- } | undefined;
3407
- }[];
3408
- } | undefined;
3409
- glama?: {
3410
- name: string;
3411
- hasApiKey: boolean;
3412
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3413
- primaryEnvVar: string;
3414
- supportsBaseURL: boolean;
3415
- models: {
3416
- name: string;
3417
- maxInputTokens: number;
3418
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3419
- default?: boolean | undefined;
3420
- displayName?: string | undefined;
3421
- pricing?: {
3422
- inputPerM: number;
3423
- outputPerM: number;
3424
- cacheReadPerM?: number | undefined;
3425
- cacheWritePerM?: number | undefined;
3426
- currency?: "USD" | undefined;
3427
- unit?: "per_million_tokens" | undefined;
3428
- } | undefined;
3429
- }[];
3430
- } | undefined;
3431
- vertex?: {
3432
- name: string;
3433
- hasApiKey: boolean;
3434
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3435
- primaryEnvVar: string;
3436
- supportsBaseURL: boolean;
3437
- models: {
3438
- name: string;
3439
- maxInputTokens: number;
3440
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3441
- default?: boolean | undefined;
3442
- displayName?: string | undefined;
3443
- pricing?: {
3444
- inputPerM: number;
3445
- outputPerM: number;
3446
- cacheReadPerM?: number | undefined;
3447
- cacheWritePerM?: number | undefined;
3448
- currency?: "USD" | undefined;
3449
- unit?: "per_million_tokens" | undefined;
3450
- } | undefined;
3451
- }[];
3452
- } | undefined;
3453
- bedrock?: {
3454
- name: string;
3455
- hasApiKey: boolean;
3456
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3457
- primaryEnvVar: string;
3458
- supportsBaseURL: boolean;
3459
- models: {
3460
- name: string;
3461
- maxInputTokens: number;
3462
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3463
- default?: boolean | undefined;
3464
- displayName?: string | undefined;
3465
- pricing?: {
3466
- inputPerM: number;
3467
- outputPerM: number;
3468
- cacheReadPerM?: number | undefined;
3469
- cacheWritePerM?: number | undefined;
3470
- currency?: "USD" | undefined;
3471
- unit?: "per_million_tokens" | undefined;
3472
- } | undefined;
3473
- }[];
3474
- } | undefined;
3475
- local?: {
3476
- name: string;
3477
- hasApiKey: boolean;
3478
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3479
- primaryEnvVar: string;
3480
- supportsBaseURL: boolean;
3481
- models: {
3482
- name: string;
3483
- maxInputTokens: number;
3484
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3485
- default?: boolean | undefined;
3486
- displayName?: string | undefined;
3487
- pricing?: {
3488
- inputPerM: number;
3489
- outputPerM: number;
3490
- cacheReadPerM?: number | undefined;
3491
- cacheWritePerM?: number | undefined;
3492
- currency?: "USD" | undefined;
3493
- unit?: "per_million_tokens" | undefined;
3494
- } | undefined;
3495
- }[];
3496
- } | undefined;
3497
- ollama?: {
3498
- name: string;
3499
- hasApiKey: boolean;
3500
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3501
- primaryEnvVar: string;
3502
- supportsBaseURL: boolean;
3503
- models: {
3504
- name: string;
3505
- maxInputTokens: number;
3506
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3507
- default?: boolean | undefined;
3508
- displayName?: string | undefined;
3509
- pricing?: {
3510
- inputPerM: number;
3511
- outputPerM: number;
3512
- cacheReadPerM?: number | undefined;
3513
- cacheWritePerM?: number | undefined;
3514
- currency?: "USD" | undefined;
3515
- unit?: "per_million_tokens" | undefined;
3516
- } | undefined;
3517
- }[];
3518
- } | undefined;
3519
- "dexto-nova"?: {
3520
- name: string;
3521
- hasApiKey: boolean;
3522
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3523
- primaryEnvVar: string;
3524
- supportsBaseURL: boolean;
3525
- models: {
3526
- name: string;
3527
- maxInputTokens: number;
3528
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3529
- default?: boolean | undefined;
3530
- displayName?: string | undefined;
3531
- pricing?: {
3532
- inputPerM: number;
3533
- outputPerM: number;
3534
- cacheReadPerM?: number | undefined;
3535
- cacheWritePerM?: number | undefined;
3536
- currency?: "USD" | undefined;
3537
- unit?: "per_million_tokens" | undefined;
3538
- } | undefined;
3539
- }[];
3540
- } | undefined;
3541
- };
3542
- } | {
3543
- models: {
3544
- name: string;
3545
- provider: string;
3546
- maxInputTokens: number;
3547
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3548
- default?: boolean | undefined;
3549
- displayName?: string | undefined;
3550
- pricing?: {
3551
- inputPerM: number;
3552
- outputPerM: number;
3553
- cacheReadPerM?: number | undefined;
3554
- cacheWritePerM?: number | undefined;
3555
- currency?: "USD" | undefined;
3556
- unit?: "per_million_tokens" | undefined;
3557
- } | undefined;
3558
- }[];
3559
- };
3560
- outputFormat: "json";
3561
- status: 200;
3562
- };
3563
- };
3564
- } & {
3565
- "/llm/switch": {
3566
- $post: {
3567
- input: {
3568
- json: {
3569
- apiKey?: string | undefined;
3570
- model?: string | undefined;
3571
- provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
3572
- maxInputTokens?: number | undefined;
3573
- reasoning?: {
3574
- variant: string;
3575
- budgetTokens?: number | undefined;
3576
- } | null | undefined;
3577
- temperature?: number | undefined;
3578
- maxIterations?: number | undefined;
3579
- baseURL?: string | undefined;
3580
- maxOutputTokens?: number | undefined;
3581
- allowedMediaTypes?: string[] | undefined;
3582
- } & {
3583
- sessionId?: string | undefined;
3584
- };
3585
- };
3586
- output: {
3587
- config: {
3588
- model: string;
3589
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3590
- reasoning?: {
3591
- variant: string;
3592
- budgetTokens?: number | undefined | undefined;
3593
- } | undefined;
3594
- maxIterations?: number | undefined;
3595
- baseURL?: string | undefined;
3596
- maxInputTokens?: number | undefined;
3597
- maxOutputTokens?: number | undefined;
3598
- temperature?: number | undefined;
3599
- allowedMediaTypes?: string[] | undefined;
3600
- hasApiKey?: boolean | undefined;
3601
- };
3602
- sessionId?: string | undefined;
3603
- };
3604
- outputFormat: "json";
3605
- status: 200;
3606
- };
3607
- };
3608
- } & {
3609
- "/llm/custom-models": {
3610
- $get: {
3611
- input: {};
3612
- output: {
3613
- models: {
3614
- name: string;
3615
- provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3616
- apiKey?: string | undefined | undefined;
3617
- baseURL?: string | undefined | undefined;
3618
- reasoning?: {
3619
- variant: string;
3620
- budgetTokens?: number | undefined | undefined;
3621
- } | undefined;
3622
- filePath?: string | undefined | undefined;
3623
- displayName?: string | undefined | undefined;
3624
- maxInputTokens?: number | undefined | undefined;
3625
- maxOutputTokens?: number | undefined | undefined;
3626
- }[];
3627
- };
3628
- outputFormat: "json";
3629
- status: 200;
3630
- };
3631
- };
3632
- } & {
3633
- "/llm/custom-models": {
3634
- $post: {
3635
- input: {
3636
- json: {
3637
- name: string;
3638
- provider?: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
3639
- apiKey?: string | undefined;
3640
- baseURL?: string | undefined;
3641
- reasoning?: {
3642
- variant: string;
3643
- budgetTokens?: number | undefined;
3644
- } | undefined;
3645
- filePath?: string | undefined;
3646
- displayName?: string | undefined;
3647
- maxInputTokens?: number | undefined;
3648
- maxOutputTokens?: number | undefined;
3649
- };
3650
- };
3651
- output: {
3652
- model: {
3653
- name: string;
3654
- provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3655
- apiKey?: string | undefined | undefined;
3656
- baseURL?: string | undefined | undefined;
3657
- reasoning?: {
3658
- variant: string;
3659
- budgetTokens?: number | undefined | undefined;
3660
- } | undefined;
3661
- filePath?: string | undefined | undefined;
3662
- displayName?: string | undefined | undefined;
3663
- maxInputTokens?: number | undefined | undefined;
3664
- maxOutputTokens?: number | undefined | undefined;
3665
- };
3666
- ok: true;
3667
- };
3668
- outputFormat: "json";
3669
- status: 200;
3670
- };
3671
- };
3672
- } & {
3673
- "/llm/custom-models/:name": {
3674
- $delete: {
3675
- input: {
3676
- param: {
3677
- name: string;
3678
- };
3679
- };
3680
- output: {
3681
- ok: true;
3682
- deleted: string;
3683
- };
3684
- outputFormat: "json";
3685
- status: 200;
3686
- } | {
3687
- input: {
3688
- param: {
3689
- name: string;
3690
- };
3691
- };
3692
- output: {
3693
- error: string;
3694
- ok: false;
3695
- };
3696
- outputFormat: "json";
3697
- status: 404;
3698
- };
3699
- };
3700
- } & {
3701
- "/llm/model-picker-state": {
3702
- $get: {
3703
- input: {};
3704
- output: {
3705
- custom: {
3706
- model: string;
3707
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3708
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3709
- source: "custom" | "catalog" | "local-installed";
3710
- baseURL?: string | undefined;
3711
- displayName?: string | undefined;
3712
- }[];
3713
- featured: {
3714
- model: string;
3715
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3716
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3717
- source: "custom" | "catalog" | "local-installed";
3718
- baseURL?: string | undefined;
3719
- displayName?: string | undefined;
3720
- }[];
3721
- recents: {
3722
- model: string;
3723
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3724
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3725
- source: "custom" | "catalog" | "local-installed";
3726
- baseURL?: string | undefined;
3727
- displayName?: string | undefined;
3728
- }[];
3729
- favorites: {
3730
- model: string;
3731
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3732
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3733
- source: "custom" | "catalog" | "local-installed";
3734
- baseURL?: string | undefined;
3735
- displayName?: string | undefined;
3736
- }[];
3737
- };
3738
- outputFormat: "json";
3739
- status: 200;
3740
- };
3741
- };
3742
- } & {
3743
- "/llm/model-picker-state/recents": {
3744
- $post: {
3745
- input: {
3746
- json: {
3747
- model: string;
3748
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3749
- baseURL?: string | undefined;
3750
- };
3751
- };
3752
- output: {
3753
- ok: true;
3754
- };
3755
- outputFormat: "json";
3756
- status: 200;
3757
- };
3758
- };
3759
- } & {
3760
- "/llm/model-picker-state/favorites/toggle": {
3761
- $post: {
3762
- input: {
3763
- json: {
3764
- model: string;
3765
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3766
- baseURL?: string | undefined;
3767
- };
3768
- };
3769
- output: {
3770
- ok: true;
3771
- isFavorite: boolean;
3772
- };
3773
- outputFormat: "json";
3774
- status: 200;
3775
- };
3776
- };
3777
- } & {
3778
- "/llm/model-picker-state/favorites": {
3779
- $put: {
3780
- input: {
3781
- json: {
3782
- favorites: {
3783
- model: string;
3784
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3785
- baseURL?: string | undefined;
3786
- }[];
3787
- };
3788
- };
3789
- output: {
3790
- ok: true;
3791
- count: number;
3792
- };
3793
- outputFormat: "json";
3794
- status: 200;
3795
- };
3796
- };
3797
- } & {
3798
- "/llm/capabilities": {
3799
- $get: {
3800
- input: {
3801
- query: {
3802
- model: string;
3803
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3804
- };
3805
- };
3806
- output: {
3807
- reasoning: {
3808
- capable: boolean;
3809
- paradigm: "effort" | "adaptive-effort" | "thinking-level" | "budget" | "none";
3810
- variants: {
3811
- id: string;
3812
- label: string;
3813
- }[];
3814
- supportedVariants: string[];
3815
- supportsBudgetTokens: boolean;
3816
- defaultVariant?: string | undefined;
3817
- };
3818
- model: string;
3819
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
3820
- supportedFileTypes: ("image" | "audio" | "pdf")[];
3821
- };
3822
- outputFormat: "json";
3823
- status: 200;
3824
- };
3825
- };
3826
- }, "/api"> & import("hono/types").MergeSchemaPath<{
3827
- "/message": {
3828
- $post: {
3829
- input: {
3830
- json: {
3831
- content: string | ({
3832
- type: "text";
3833
- text: string;
3834
- } | {
3835
- type: "image";
3836
- image: string;
3837
- mimeType?: string | undefined;
3838
- } | {
3839
- type: "file";
3840
- mimeType: string;
3841
- data: string;
3842
- filename?: string | undefined;
3843
- })[];
3844
- sessionId: string;
3845
- };
3846
- };
3847
- output: {
3848
- sessionId: string;
3849
- accepted: true;
3850
- };
3851
- outputFormat: "json";
3852
- status: 202;
3853
- } | {
3854
- input: {
3855
- json: {
3856
- content: string | ({
3857
- type: "text";
3858
- text: string;
3859
- } | {
3860
- type: "image";
3861
- image: string;
3862
- mimeType?: string | undefined;
3863
- } | {
3864
- type: "file";
3865
- mimeType: string;
3866
- data: string;
3867
- filename?: string | undefined;
3868
- })[];
3869
- sessionId: string;
3870
- };
3871
- };
3872
- output: never;
3873
- outputFormat: "json";
3874
- status: 400;
3875
- };
3876
- };
3877
- } & {
3878
- "/message-sync": {
3879
- $post: {
3880
- input: {
3881
- json: {
3882
- content: string | ({
3883
- type: "text";
3884
- text: string;
3885
- } | {
3886
- type: "image";
3887
- image: string;
3888
- mimeType?: string | undefined;
3889
- } | {
3890
- type: "file";
3891
- mimeType: string;
3892
- data: string;
3893
- filename?: string | undefined;
3894
- })[];
3895
- sessionId: string;
3896
- };
3897
- };
3898
- output: never;
3899
- outputFormat: "json";
3900
- status: 400;
3901
- } | {
3902
- input: {
3903
- json: {
3904
- content: string | ({
3905
- type: "text";
3906
- text: string;
3907
- } | {
3908
- type: "image";
3909
- image: string;
3910
- mimeType?: string | undefined;
3911
- } | {
3912
- type: "file";
3913
- mimeType: string;
3914
- data: string;
3915
- filename?: string | undefined;
3916
- })[];
3917
- sessionId: string;
3918
- };
3919
- };
3920
- output: {
3921
- sessionId: string;
3922
- response: string;
3923
- usageScopeId?: string | undefined;
3924
- reasoning?: string | undefined;
3925
- tokenUsage?: {
3926
- inputTokens?: number | undefined;
3927
- outputTokens?: number | undefined;
3928
- reasoningTokens?: number | undefined;
3929
- cacheReadTokens?: number | undefined;
3930
- cacheWriteTokens?: number | undefined;
3931
- totalTokens?: number | undefined;
3932
- } | undefined;
3933
- estimatedCost?: number | undefined;
3934
- pricingStatus?: "estimated" | "unpriced" | undefined;
3935
- model?: string | undefined;
3936
- provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
3937
- messageId?: string | undefined;
3938
- };
3939
- outputFormat: "json";
3940
- status: 200;
3941
- };
3942
- };
3943
- } & {
3944
- "/reset": {
3945
- $post: {
3946
- input: {
3947
- json: {
3948
- sessionId: string;
3949
- };
3950
- };
3951
- output: {
3952
- status: string;
3953
- sessionId: string;
3954
- };
3955
- outputFormat: "json";
3956
- status: 200;
3957
- };
3958
- };
3959
- } & {
3960
- "/message-stream": {
3961
- $post: {
3962
- input: {
3963
- json: {
3964
- content: string | ({
3965
- type: "text";
3966
- text: string;
3967
- } | {
3968
- type: "image";
3969
- image: string;
3970
- mimeType?: string | undefined;
3971
- } | {
3972
- type: "file";
3973
- mimeType: string;
3974
- data: string;
3975
- filename?: string | undefined;
3976
- })[];
3977
- sessionId: string;
3978
- };
3979
- };
3980
- output: Response;
3981
- outputFormat: "json";
3982
- status: import("hono/utils/http-status").StatusCode;
3983
- } | {
3984
- input: {
3985
- json: {
3986
- content: string | ({
3987
- type: "text";
3988
- text: string;
3989
- } | {
3990
- type: "image";
3991
- image: string;
3992
- mimeType?: string | undefined;
3993
- } | {
3994
- type: "file";
3995
- mimeType: string;
3996
- data: string;
3997
- filename?: string | undefined;
3998
- })[];
3999
- sessionId: string;
4000
- };
4001
- };
4002
- output: never;
4003
- outputFormat: "json";
4004
- status: 400;
4005
- } | {
4006
- input: {
4007
- json: {
4008
- content: string | ({
4009
- type: "text";
4010
- text: string;
4011
- } | {
4012
- type: "image";
4013
- image: string;
4014
- mimeType?: string | undefined;
4015
- } | {
4016
- type: "file";
4017
- mimeType: string;
4018
- data: string;
4019
- filename?: string | undefined;
4020
- })[];
4021
- sessionId: string;
4022
- };
4023
- };
4024
- output: {
4025
- sessionId: string;
4026
- busy: true;
4027
- queueLength: number;
4028
- hint: string;
4029
- };
4030
- outputFormat: "json";
4031
- status: 202;
4032
- };
4033
- };
4034
- }, "/api"> & import("hono/types").MergeSchemaPath<{
4035
- "/greeting": {
4036
- $get: {
4037
- input: {
4038
- query: {
4039
- sessionId?: string | undefined;
4040
- };
4041
- };
4042
- output: {
4043
- greeting?: string | undefined;
4044
- };
4045
- outputFormat: "json";
4046
- status: 200;
4047
- };
4048
- };
4049
- }, "/api"> & import("hono/types").MergeSchemaPath<{
4050
- "/v1/message:send": {
4051
- $post: {
4052
- input: {
4053
- json: {
4054
- message: {
4055
- role: "user" | "agent";
4056
- messageId: string;
4057
- kind: "message";
4058
- parts: ({
4059
- text: string;
4060
- kind: "text";
4061
- metadata?: Record<string, any> | undefined;
4062
- } | {
4063
- file: {
4064
- bytes: string;
4065
- name?: string | undefined;
4066
- mimeType?: string | undefined;
4067
- } | {
4068
- uri: string;
4069
- name?: string | undefined;
4070
- mimeType?: string | undefined;
4071
- };
4072
- kind: "file";
4073
- metadata?: Record<string, any> | undefined;
4074
- } | {
4075
- data: Record<string, any>;
4076
- kind: "data";
4077
- metadata?: Record<string, any> | undefined;
4078
- })[];
4079
- metadata?: Record<string, any> | undefined;
4080
- taskId?: string | undefined;
4081
- contextId?: string | undefined;
4082
- extensions?: string[] | undefined;
4083
- referenceTaskIds?: string[] | undefined;
4084
- };
4085
- metadata?: Record<string, any> | undefined;
4086
- configuration?: {
4087
- acceptedOutputModes?: string[] | undefined;
4088
- historyLength?: number | undefined;
4089
- pushNotificationConfig?: {
4090
- url: string;
4091
- headers?: Record<string, string> | undefined;
4092
- } | undefined;
4093
- blocking?: boolean | undefined;
4094
- } | undefined;
4095
- };
4096
- };
4097
- output: {
4098
- status: {
4099
- state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
4100
- message?: {
4101
- role: "user" | "agent";
4102
- messageId: string;
4103
- kind: "message";
4104
- parts: ({
4105
- text: string;
4106
- kind: "text";
4107
- metadata?: {
4108
- [x: string]: any;
4109
- } | undefined;
4110
- } | {
4111
- file: {
4112
- bytes: string;
4113
- name?: string | undefined;
4114
- mimeType?: string | undefined;
4115
- } | {
4116
- uri: string;
4117
- name?: string | undefined;
4118
- mimeType?: string | undefined;
4119
- };
4120
- kind: "file";
4121
- metadata?: {
4122
- [x: string]: any;
4123
- } | undefined;
4124
- } | {
4125
- data: {
4126
- [x: string]: any;
4127
- };
4128
- kind: "data";
4129
- metadata?: {
4130
- [x: string]: any;
4131
- } | undefined;
4132
- })[];
4133
- metadata?: {
4134
- [x: string]: any;
4135
- } | undefined;
4136
- taskId?: string | undefined;
4137
- contextId?: string | undefined;
4138
- extensions?: string[] | undefined;
4139
- referenceTaskIds?: string[] | undefined;
4140
- } | undefined;
4141
- timestamp?: string | undefined;
4142
- };
4143
- id: string;
4144
- kind: "task";
4145
- contextId: string;
4146
- metadata?: {
4147
- [x: string]: any;
4148
- } | undefined;
4149
- history?: {
4150
- role: "user" | "agent";
4151
- messageId: string;
4152
- kind: "message";
4153
- parts: ({
4154
- text: string;
4155
- kind: "text";
4156
- metadata?: {
4157
- [x: string]: any;
4158
- } | undefined;
4159
- } | {
4160
- file: {
4161
- bytes: string;
4162
- name?: string | undefined;
4163
- mimeType?: string | undefined;
4164
- } | {
4165
- uri: string;
4166
- name?: string | undefined;
4167
- mimeType?: string | undefined;
4168
- };
4169
- kind: "file";
4170
- metadata?: {
4171
- [x: string]: any;
4172
- } | undefined;
4173
- } | {
4174
- data: {
4175
- [x: string]: any;
4176
- };
4177
- kind: "data";
4178
- metadata?: {
4179
- [x: string]: any;
4180
- } | undefined;
4181
- })[];
4182
- metadata?: {
4183
- [x: string]: any;
4184
- } | undefined;
4185
- taskId?: string | undefined;
4186
- contextId?: string | undefined;
4187
- extensions?: string[] | undefined;
4188
- referenceTaskIds?: string[] | undefined;
4189
- }[] | undefined;
4190
- artifacts?: any[] | undefined;
4191
- };
4192
- outputFormat: "json";
4193
- status: 200;
4194
- };
4195
- };
4196
- } & {
4197
- "/v1/tasks": {
4198
- $get: {
4199
- input: {
4200
- query: {
4201
- status?: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected" | undefined;
4202
- contextId?: string | undefined;
4203
- pageSize?: string | undefined;
4204
- historyLength?: string | undefined;
4205
- pageToken?: string | undefined;
4206
- lastUpdatedAfter?: string | undefined;
4207
- includeArtifacts?: string | undefined;
4208
- };
4209
- };
4210
- output: {
4211
- tasks: {
4212
- status: {
4213
- state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
4214
- message?: {
4215
- role: "user" | "agent";
4216
- messageId: string;
4217
- kind: "message";
4218
- parts: ({
4219
- text: string;
4220
- kind: "text";
4221
- metadata?: {
4222
- [x: string]: any;
4223
- } | undefined;
4224
- } | {
4225
- file: {
4226
- bytes: string;
4227
- name?: string | undefined;
4228
- mimeType?: string | undefined;
4229
- } | {
4230
- uri: string;
4231
- name?: string | undefined;
4232
- mimeType?: string | undefined;
4233
- };
4234
- kind: "file";
4235
- metadata?: {
4236
- [x: string]: any;
4237
- } | undefined;
4238
- } | {
4239
- data: {
4240
- [x: string]: any;
4241
- };
4242
- kind: "data";
4243
- metadata?: {
4244
- [x: string]: any;
4245
- } | undefined;
4246
- })[];
4247
- metadata?: {
4248
- [x: string]: any;
4249
- } | undefined;
4250
- taskId?: string | undefined;
4251
- contextId?: string | undefined;
4252
- extensions?: string[] | undefined;
4253
- referenceTaskIds?: string[] | undefined;
4254
- } | undefined;
4255
- timestamp?: string | undefined;
4256
- };
4257
- id: string;
4258
- kind: "task";
4259
- contextId: string;
4260
- metadata?: {
4261
- [x: string]: any;
4262
- } | undefined;
4263
- history?: {
4264
- role: "user" | "agent";
4265
- messageId: string;
4266
- kind: "message";
4267
- parts: ({
4268
- text: string;
4269
- kind: "text";
4270
- metadata?: {
4271
- [x: string]: any;
4272
- } | undefined;
4273
- } | {
4274
- file: {
4275
- bytes: string;
4276
- name?: string | undefined;
4277
- mimeType?: string | undefined;
4278
- } | {
4279
- uri: string;
4280
- name?: string | undefined;
4281
- mimeType?: string | undefined;
4282
- };
4283
- kind: "file";
4284
- metadata?: {
4285
- [x: string]: any;
4286
- } | undefined;
4287
- } | {
4288
- data: {
4289
- [x: string]: any;
4290
- };
4291
- kind: "data";
4292
- metadata?: {
4293
- [x: string]: any;
4294
- } | undefined;
4295
- })[];
4296
- metadata?: {
4297
- [x: string]: any;
4298
- } | undefined;
4299
- taskId?: string | undefined;
4300
- contextId?: string | undefined;
4301
- extensions?: string[] | undefined;
4302
- referenceTaskIds?: string[] | undefined;
4303
- }[] | undefined;
4304
- artifacts?: any[] | undefined;
4305
- }[];
4306
- totalSize: number;
4307
- pageSize: number;
4308
- nextPageToken: string;
4309
- };
4310
- outputFormat: "json";
4311
- status: 200;
4312
- };
4313
- };
4314
- } & {
4315
- "/v1/tasks/:id": {
4316
- $get: {
4317
- input: {
4318
- param: {
4319
- id: string;
4320
- };
4321
- };
4322
- output: {
4323
- status: {
4324
- state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
4325
- message?: {
4326
- role: "user" | "agent";
4327
- messageId: string;
4328
- kind: "message";
4329
- parts: ({
4330
- text: string;
4331
- kind: "text";
4332
- metadata?: {
4333
- [x: string]: any;
4334
- } | undefined;
4335
- } | {
4336
- file: {
4337
- bytes: string;
4338
- name?: string | undefined;
4339
- mimeType?: string | undefined;
4340
- } | {
4341
- uri: string;
4342
- name?: string | undefined;
4343
- mimeType?: string | undefined;
4344
- };
4345
- kind: "file";
4346
- metadata?: {
4347
- [x: string]: any;
4348
- } | undefined;
4349
- } | {
4350
- data: {
4351
- [x: string]: any;
4352
- };
4353
- kind: "data";
4354
- metadata?: {
4355
- [x: string]: any;
4356
- } | undefined;
4357
- })[];
4358
- metadata?: {
4359
- [x: string]: any;
4360
- } | undefined;
4361
- taskId?: string | undefined;
4362
- contextId?: string | undefined;
4363
- extensions?: string[] | undefined;
4364
- referenceTaskIds?: string[] | undefined;
4365
- } | undefined;
4366
- timestamp?: string | undefined;
4367
- };
4368
- id: string;
4369
- kind: "task";
4370
- contextId: string;
4371
- metadata?: {
4372
- [x: string]: any;
4373
- } | undefined;
4374
- history?: {
4375
- role: "user" | "agent";
4376
- messageId: string;
4377
- kind: "message";
4378
- parts: ({
4379
- text: string;
4380
- kind: "text";
4381
- metadata?: {
4382
- [x: string]: any;
4383
- } | undefined;
4384
- } | {
4385
- file: {
4386
- bytes: string;
4387
- name?: string | undefined;
4388
- mimeType?: string | undefined;
4389
- } | {
4390
- uri: string;
4391
- name?: string | undefined;
4392
- mimeType?: string | undefined;
4393
- };
4394
- kind: "file";
4395
- metadata?: {
4396
- [x: string]: any;
4397
- } | undefined;
4398
- } | {
4399
- data: {
4400
- [x: string]: any;
4401
- };
4402
- kind: "data";
4403
- metadata?: {
4404
- [x: string]: any;
4405
- } | undefined;
4406
- })[];
4407
- metadata?: {
4408
- [x: string]: any;
4409
- } | undefined;
4410
- taskId?: string | undefined;
4411
- contextId?: string | undefined;
4412
- extensions?: string[] | undefined;
4413
- referenceTaskIds?: string[] | undefined;
4414
- }[] | undefined;
4415
- artifacts?: any[] | undefined;
4416
- };
4417
- outputFormat: "json";
4418
- status: 200;
4419
- } | {
4420
- input: {
4421
- param: {
4422
- id: string;
4423
- };
4424
- };
4425
- output: {
4426
- error: string;
4427
- };
4428
- outputFormat: "json";
4429
- status: 404;
4430
- };
4431
- };
4432
- } & {
4433
- "/v1/tasks/:id:cancel": {
4434
- $post: {
4435
- input: {
4436
- param: {
4437
- id: string;
4438
- };
4439
- };
4440
- output: {
4441
- status: {
4442
- state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
4443
- message?: {
4444
- role: "user" | "agent";
4445
- messageId: string;
4446
- kind: "message";
4447
- parts: ({
4448
- text: string;
4449
- kind: "text";
4450
- metadata?: {
4451
- [x: string]: any;
4452
- } | undefined;
4453
- } | {
4454
- file: {
4455
- bytes: string;
4456
- name?: string | undefined;
4457
- mimeType?: string | undefined;
4458
- } | {
4459
- uri: string;
4460
- name?: string | undefined;
4461
- mimeType?: string | undefined;
4462
- };
4463
- kind: "file";
4464
- metadata?: {
4465
- [x: string]: any;
4466
- } | undefined;
4467
- } | {
4468
- data: {
4469
- [x: string]: any;
4470
- };
4471
- kind: "data";
4472
- metadata?: {
4473
- [x: string]: any;
4474
- } | undefined;
4475
- })[];
4476
- metadata?: {
4477
- [x: string]: any;
4478
- } | undefined;
4479
- taskId?: string | undefined;
4480
- contextId?: string | undefined;
4481
- extensions?: string[] | undefined;
4482
- referenceTaskIds?: string[] | undefined;
4483
- } | undefined;
4484
- timestamp?: string | undefined;
4485
- };
4486
- id: string;
4487
- kind: "task";
4488
- contextId: string;
4489
- metadata?: {
4490
- [x: string]: any;
4491
- } | undefined;
4492
- history?: {
4493
- role: "user" | "agent";
4494
- messageId: string;
4495
- kind: "message";
4496
- parts: ({
4497
- text: string;
4498
- kind: "text";
4499
- metadata?: {
4500
- [x: string]: any;
4501
- } | undefined;
4502
- } | {
4503
- file: {
4504
- bytes: string;
4505
- name?: string | undefined;
4506
- mimeType?: string | undefined;
4507
- } | {
4508
- uri: string;
4509
- name?: string | undefined;
4510
- mimeType?: string | undefined;
4511
- };
4512
- kind: "file";
4513
- metadata?: {
4514
- [x: string]: any;
4515
- } | undefined;
4516
- } | {
4517
- data: {
4518
- [x: string]: any;
4519
- };
4520
- kind: "data";
4521
- metadata?: {
4522
- [x: string]: any;
4523
- } | undefined;
4524
- })[];
4525
- metadata?: {
4526
- [x: string]: any;
4527
- } | undefined;
4528
- taskId?: string | undefined;
4529
- contextId?: string | undefined;
4530
- extensions?: string[] | undefined;
4531
- referenceTaskIds?: string[] | undefined;
4532
- }[] | undefined;
4533
- artifacts?: any[] | undefined;
4534
- };
4535
- outputFormat: "json";
4536
- status: 200;
4537
- } | {
4538
- input: {
4539
- param: {
4540
- id: string;
4541
- };
4542
- };
4543
- output: {
4544
- error: string;
4545
- };
4546
- outputFormat: "json";
4547
- status: 404;
4548
- };
4549
- };
4550
- }, "/"> & import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema, "/"> & import("hono/types").MergeSchemaPath<{
4551
- "/": {
4552
- $get: {
4553
- input: {};
4554
- output: string;
4555
- outputFormat: "text";
4556
- status: 200;
4557
- };
4558
- };
4559
- }, "/health">, "/">;
4560
- export type AppType = ReturnType<typeof createDextoApp>;
61
+ declare const DEFAULT_API_PREFIX: "/api";
62
+ type HealthSchema = MergeSchemaPath<ExtractSchema<ReturnType<typeof createHealthRouter>>, '/health'>;
63
+ type DiscoverySchema = MergeSchemaPath<ExtractSchema<ReturnType<typeof createA2aRouter>>, '/'>;
64
+ type JsonRpcSchema = MergeSchemaPath<ExtractSchema<ReturnType<typeof createA2AJsonRpcRouter>>, '/'>;
65
+ type ConversationRouterSchema = GreetingRouterSchema | MessagesRouterSchema | LlmRouterSchema | SessionsRouterSchema | SearchRouterSchema;
66
+ type IntegrationRouterSchema = McpRouterSchema | WebhooksRouterSchema | PromptsRouterSchema | ResourcesRouterSchema | MemoryRouterSchema | WorkspacesRouterSchema | SchedulesRouterSchema;
67
+ type ManagementRouterSchema = ApprovalsRouterSchema | AgentsRouterSchema | QueueRouterSchema;
68
+ type SystemRouterSchema = OpenRouterRouterSchema | KeyRouterSchema | ToolsRouterSchema | DiscoveryRouterSchema | ModelsRouterSchema | SystemPromptRouterSchema | DextoAuthRouterSchema;
69
+ type DefaultApiRouterSchema = ConversationRouterSchema | IntegrationRouterSchema | ManagementRouterSchema | SystemRouterSchema;
70
+ type DefaultApiSchema = MergeSchemaPath<DefaultApiRouterSchema, typeof DEFAULT_API_PREFIX>;
71
+ type PublicApiSchema = HealthSchema | DiscoverySchema | JsonRpcSchema;
72
+ type AppSchema = PublicApiSchema | DefaultApiSchema;
73
+ export declare function createDextoApp(options: CreateDextoAppOptions): DextoApp;
74
+ export type AppType = Hono<BlankEnv, AppSchema, '/'>;
4561
75
  export type { WebUIRuntimeConfig } from './routes/static.js';
4562
76
  //# sourceMappingURL=index.d.ts.map