@dexto/server 1.6.19 → 1.6.21

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