@dexto/server 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/approval/manual-approval-handler.cjs +23 -15
  2. package/dist/approval/manual-approval-handler.d.ts.map +1 -1
  3. package/dist/approval/manual-approval-handler.js +23 -15
  4. package/dist/events/webhook-subscriber.cjs +1 -1
  5. package/dist/events/webhook-subscriber.d.ts.map +1 -1
  6. package/dist/events/webhook-subscriber.js +1 -1
  7. package/dist/hono/__tests__/test-fixtures.cjs +2 -2
  8. package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
  9. package/dist/hono/__tests__/test-fixtures.js +2 -2
  10. package/dist/hono/index.cjs +6 -1
  11. package/dist/hono/index.d.ts +433 -88
  12. package/dist/hono/index.d.ts.map +1 -1
  13. package/dist/hono/index.js +6 -1
  14. package/dist/hono/middleware/error.d.ts.map +1 -1
  15. package/dist/hono/routes/agents.cjs +8 -10
  16. package/dist/hono/routes/agents.d.ts +15 -8
  17. package/dist/hono/routes/agents.d.ts.map +1 -1
  18. package/dist/hono/routes/agents.js +10 -10
  19. package/dist/hono/routes/approvals.cjs +52 -1
  20. package/dist/hono/routes/approvals.d.ts +25 -0
  21. package/dist/hono/routes/approvals.d.ts.map +1 -1
  22. package/dist/hono/routes/approvals.js +52 -1
  23. package/dist/hono/routes/llm.cjs +110 -31
  24. package/dist/hono/routes/llm.d.ts +72 -20
  25. package/dist/hono/routes/llm.d.ts.map +1 -1
  26. package/dist/hono/routes/llm.js +108 -25
  27. package/dist/hono/routes/mcp.cjs +8 -4
  28. package/dist/hono/routes/mcp.d.ts +4 -1
  29. package/dist/hono/routes/mcp.d.ts.map +1 -1
  30. package/dist/hono/routes/mcp.js +9 -5
  31. package/dist/hono/routes/memory.d.ts +1 -1
  32. package/dist/hono/routes/messages.cjs +54 -62
  33. package/dist/hono/routes/messages.d.ts +87 -43
  34. package/dist/hono/routes/messages.d.ts.map +1 -1
  35. package/dist/hono/routes/messages.js +55 -63
  36. package/dist/hono/routes/prompts.d.ts +6 -6
  37. package/dist/hono/routes/queue.cjs +202 -0
  38. package/dist/hono/routes/queue.d.ts +171 -0
  39. package/dist/hono/routes/queue.d.ts.map +1 -0
  40. package/dist/hono/routes/queue.js +178 -0
  41. package/dist/hono/routes/resources.d.ts +1 -1
  42. package/dist/hono/routes/search.d.ts +33 -7
  43. package/dist/hono/routes/search.d.ts.map +1 -1
  44. package/dist/hono/routes/sessions.cjs +65 -11
  45. package/dist/hono/routes/sessions.d.ts +22 -1
  46. package/dist/hono/routes/sessions.d.ts.map +1 -1
  47. package/dist/hono/routes/sessions.js +65 -11
  48. package/dist/hono/schemas/responses.cjs +24 -5
  49. package/dist/hono/schemas/responses.d.ts +799 -81
  50. package/dist/hono/schemas/responses.d.ts.map +1 -1
  51. package/dist/hono/schemas/responses.js +24 -10
  52. package/package.json +3 -3
@@ -19,6 +19,173 @@ export type CreateDextoAppOptions = {
19
19
  webUIConfig?: WebUIRuntimeConfig;
20
20
  };
21
21
  export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIHono<import("hono").Env, import("hono/types").MergeSchemaPath<{
22
+ "/queue/:sessionId": {
23
+ $get: {
24
+ input: {
25
+ param: {
26
+ sessionId: string;
27
+ };
28
+ };
29
+ output: {};
30
+ outputFormat: string;
31
+ status: 404;
32
+ } | {
33
+ input: {
34
+ param: {
35
+ sessionId: string;
36
+ };
37
+ };
38
+ output: {
39
+ messages: {
40
+ content: ({
41
+ type: "text";
42
+ text: string;
43
+ } | {
44
+ type: "image";
45
+ image: string;
46
+ mimeType?: string | undefined;
47
+ } | {
48
+ type: "file";
49
+ mimeType: string;
50
+ data: string;
51
+ filename?: string | undefined;
52
+ } | {
53
+ type: "ui-resource";
54
+ mimeType: string;
55
+ uri: string;
56
+ content?: string | undefined;
57
+ blob?: string | undefined;
58
+ metadata?: {
59
+ title?: string | undefined;
60
+ preferredSize?: {
61
+ width: number;
62
+ height: number;
63
+ } | undefined;
64
+ } | undefined;
65
+ })[];
66
+ id: string;
67
+ queuedAt: number;
68
+ metadata?: {
69
+ [x: string]: import("hono/utils/types").JSONValue;
70
+ } | undefined;
71
+ }[];
72
+ count: number;
73
+ };
74
+ outputFormat: "json";
75
+ status: 200;
76
+ };
77
+ };
78
+ } & {
79
+ "/queue/:sessionId": {
80
+ $post: {
81
+ input: {
82
+ param: {
83
+ sessionId: string;
84
+ };
85
+ } & {
86
+ json: {
87
+ content: string | ({
88
+ type: "text";
89
+ text: string;
90
+ } | {
91
+ type: "image";
92
+ image: string;
93
+ mimeType?: string | undefined;
94
+ } | {
95
+ type: "file";
96
+ mimeType: string;
97
+ data: string;
98
+ filename?: string | undefined;
99
+ })[];
100
+ };
101
+ };
102
+ output: {};
103
+ outputFormat: string;
104
+ status: 404;
105
+ } | {
106
+ input: {
107
+ param: {
108
+ sessionId: string;
109
+ };
110
+ } & {
111
+ json: {
112
+ content: string | ({
113
+ type: "text";
114
+ text: string;
115
+ } | {
116
+ type: "image";
117
+ image: string;
118
+ mimeType?: string | undefined;
119
+ } | {
120
+ type: "file";
121
+ mimeType: string;
122
+ data: string;
123
+ filename?: string | undefined;
124
+ })[];
125
+ };
126
+ };
127
+ output: {
128
+ id: string;
129
+ queued: true;
130
+ position: number;
131
+ };
132
+ outputFormat: "json";
133
+ status: 201;
134
+ };
135
+ };
136
+ } & {
137
+ "/queue/:sessionId/:messageId": {
138
+ $delete: {
139
+ input: {
140
+ param: {
141
+ sessionId: string;
142
+ messageId: string;
143
+ };
144
+ };
145
+ output: {};
146
+ outputFormat: string;
147
+ status: 404;
148
+ } | {
149
+ input: {
150
+ param: {
151
+ sessionId: string;
152
+ messageId: string;
153
+ };
154
+ };
155
+ output: {
156
+ id: string;
157
+ removed: true;
158
+ };
159
+ outputFormat: "json";
160
+ status: 200;
161
+ };
162
+ };
163
+ } & {
164
+ "/queue/:sessionId": {
165
+ $delete: {
166
+ input: {
167
+ param: {
168
+ sessionId: string;
169
+ };
170
+ };
171
+ output: {};
172
+ outputFormat: string;
173
+ status: 404;
174
+ } | {
175
+ input: {
176
+ param: {
177
+ sessionId: string;
178
+ };
179
+ };
180
+ output: {
181
+ count: number;
182
+ cleared: true;
183
+ };
184
+ outputFormat: "json";
185
+ status: 200;
186
+ };
187
+ };
188
+ }, "/api"> & import("hono/types").MergeSchemaPath<{
22
189
  "/agents": {
23
190
  $get: {
24
191
  input: {};
@@ -68,13 +235,13 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
68
235
  id: string;
69
236
  path?: string | undefined;
70
237
  } | {
71
- id: string;
72
238
  metadata: {
73
239
  tags: string[];
74
240
  description: string;
75
241
  author: string;
76
242
  main?: string | undefined;
77
243
  };
244
+ id: string;
78
245
  sourcePath: string;
79
246
  name?: string | undefined;
80
247
  injectPreferences?: boolean | undefined;
@@ -151,10 +318,9 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
151
318
  description: string;
152
319
  config: {
153
320
  llm: {
154
- apiKey: string;
155
321
  model: string;
156
322
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
157
- router?: "vercel" | "in-built" | undefined;
323
+ apiKey: string;
158
324
  maxIterations?: number | undefined;
159
325
  baseURL?: string | undefined;
160
326
  maxInputTokens?: number | undefined;
@@ -190,6 +356,11 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
190
356
  enabled?: boolean | undefined;
191
357
  })[] | undefined;
192
358
  };
359
+ tools?: Record<string, {
360
+ maxOutputChars?: number | undefined;
361
+ maxLines?: number | undefined;
362
+ maxLineLength?: number | undefined;
363
+ }> | undefined;
193
364
  storage?: {
194
365
  database: {
195
366
  type: "in-memory";
@@ -300,9 +471,13 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
300
471
  agentId?: string | undefined;
301
472
  agentCard?: {
302
473
  description: string;
303
- url: string;
304
474
  name: string;
475
+ url: string;
305
476
  version: string;
477
+ provider?: {
478
+ url: string;
479
+ organization: string;
480
+ } | undefined;
306
481
  metadata?: import("zod").objectInputType<{
307
482
  dexto: import("zod").ZodOptional<import("zod").ZodObject<{
308
483
  authentication: import("zod").ZodOptional<import("zod").ZodObject<{
@@ -383,10 +558,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
383
558
  pushNotifications?: boolean | undefined;
384
559
  stateTransitionHistory?: boolean | undefined;
385
560
  } | undefined;
386
- provider?: {
387
- url: string;
388
- organization: string;
389
- } | undefined;
390
561
  protocolVersion?: string | undefined;
391
562
  preferredTransport?: "JSONRPC" | "GRPC" | "HTTP+JSON" | undefined;
392
563
  defaultInputModes?: string[] | undefined;
@@ -473,6 +644,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
473
644
  type: "stdio";
474
645
  command: string;
475
646
  timeout?: number | undefined;
647
+ enabled?: boolean | undefined;
476
648
  args?: string[] | undefined;
477
649
  env?: Record<string, string> | undefined;
478
650
  connectionMode?: "strict" | "lenient" | undefined;
@@ -480,12 +652,14 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
480
652
  type: "sse";
481
653
  url: string;
482
654
  timeout?: number | undefined;
655
+ enabled?: boolean | undefined;
483
656
  connectionMode?: "strict" | "lenient" | undefined;
484
657
  headers?: Record<string, string> | undefined;
485
658
  } | {
486
659
  type: "http";
487
660
  url: string;
488
661
  timeout?: number | undefined;
662
+ enabled?: boolean | undefined;
489
663
  connectionMode?: "strict" | "lenient" | undefined;
490
664
  headers?: Record<string, string> | undefined;
491
665
  }> | undefined;
@@ -652,6 +826,31 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
652
826
  };
653
827
  };
654
828
  }, "/api"> & import("hono/types").MergeSchemaPath<{
829
+ "/approvals": {
830
+ $get: {
831
+ input: {
832
+ query: {
833
+ sessionId: string;
834
+ };
835
+ };
836
+ output: {
837
+ ok: true;
838
+ approvals: {
839
+ type: string;
840
+ metadata: {
841
+ [x: string]: import("hono/utils/types").JSONValue;
842
+ };
843
+ timestamp: string;
844
+ approvalId: string;
845
+ sessionId?: string | undefined;
846
+ timeout?: number | undefined;
847
+ }[];
848
+ };
849
+ outputFormat: "json";
850
+ status: 200;
851
+ };
852
+ };
853
+ } & {
655
854
  "/approvals/:approvalId": {
656
855
  $post: {
657
856
  input: {
@@ -834,11 +1033,11 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
834
1033
  };
835
1034
  } & {
836
1035
  json: {
1036
+ content?: string | undefined;
837
1037
  metadata?: import("zod").objectInputType<{
838
1038
  source: import("zod").ZodOptional<import("zod").ZodEnum<["user", "system"]>>;
839
1039
  pinned: import("zod").ZodOptional<import("zod").ZodBoolean>;
840
1040
  }, import("zod").ZodTypeAny, "passthrough"> | undefined;
841
- content?: string | undefined;
842
1041
  tags?: string[] | undefined;
843
1042
  };
844
1043
  };
@@ -888,10 +1087,10 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
888
1087
  source: "mcp" | "internal";
889
1088
  description?: string | undefined;
890
1089
  mimeType?: string | undefined;
891
- name?: string | undefined;
892
1090
  metadata?: {
893
1091
  [x: string]: import("hono/utils/types").JSONValue;
894
1092
  } | undefined;
1093
+ name?: string | undefined;
895
1094
  serverName?: string | undefined;
896
1095
  size?: number | undefined;
897
1096
  lastModified?: string | undefined;
@@ -959,14 +1158,14 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
959
1158
  source: "config" | "custom" | "mcp";
960
1159
  description?: string | undefined;
961
1160
  title?: string | undefined;
1161
+ metadata?: {
1162
+ [x: string]: import("hono/utils/types").JSONValue;
1163
+ } | undefined;
962
1164
  arguments?: {
963
1165
  name: string;
964
1166
  description?: string | undefined;
965
1167
  required?: boolean | undefined;
966
1168
  }[] | undefined;
967
- metadata?: {
968
- [x: string]: import("hono/utils/types").JSONValue;
969
- } | undefined;
970
1169
  }[];
971
1170
  };
972
1171
  outputFormat: "json";
@@ -1000,14 +1199,14 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1000
1199
  source: "config" | "custom" | "mcp";
1001
1200
  description?: string | undefined;
1002
1201
  title?: string | undefined;
1202
+ metadata?: {
1203
+ [x: string]: import("hono/utils/types").JSONValue;
1204
+ } | undefined;
1003
1205
  arguments?: {
1004
1206
  name: string;
1005
1207
  description?: string | undefined;
1006
1208
  required?: boolean | undefined;
1007
1209
  }[] | undefined;
1008
- metadata?: {
1009
- [x: string]: import("hono/utils/types").JSONValue;
1010
- } | undefined;
1011
1210
  };
1012
1211
  };
1013
1212
  outputFormat: "json";
@@ -1226,6 +1425,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1226
1425
  type: "stdio";
1227
1426
  command: string;
1228
1427
  timeout?: number | undefined;
1428
+ enabled?: boolean | undefined;
1229
1429
  args?: string[] | undefined;
1230
1430
  env?: Record<string, string> | undefined;
1231
1431
  connectionMode?: "strict" | "lenient" | undefined;
@@ -1233,12 +1433,14 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1233
1433
  type: "sse";
1234
1434
  url: string;
1235
1435
  timeout?: number | undefined;
1436
+ enabled?: boolean | undefined;
1236
1437
  connectionMode?: "strict" | "lenient" | undefined;
1237
1438
  headers?: Record<string, string> | undefined;
1238
1439
  } | {
1239
1440
  type: "http";
1240
1441
  url: string;
1241
1442
  timeout?: number | undefined;
1443
+ enabled?: boolean | undefined;
1242
1444
  connectionMode?: "strict" | "lenient" | undefined;
1243
1445
  headers?: Record<string, string> | undefined;
1244
1446
  };
@@ -1417,10 +1619,10 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1417
1619
  source: "mcp" | "internal";
1418
1620
  description?: string | undefined;
1419
1621
  mimeType?: string | undefined;
1420
- name?: string | undefined;
1421
1622
  metadata?: {
1422
1623
  [x: string]: import("hono/utils/types").JSONValue;
1423
1624
  } | undefined;
1625
+ name?: string | undefined;
1424
1626
  serverName?: string | undefined;
1425
1627
  size?: number | undefined;
1426
1628
  lastModified?: string | undefined;
@@ -1487,6 +1689,19 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1487
1689
  mimeType: string;
1488
1690
  data: string;
1489
1691
  filename?: string | undefined;
1692
+ } | {
1693
+ type: "ui-resource";
1694
+ mimeType: string;
1695
+ uri: string;
1696
+ content?: string | undefined;
1697
+ blob?: string | undefined;
1698
+ metadata?: {
1699
+ title?: string | undefined;
1700
+ preferredSize?: {
1701
+ width: number;
1702
+ height: number;
1703
+ } | undefined;
1704
+ } | undefined;
1490
1705
  })[] | null;
1491
1706
  role: "system" | "user" | "assistant" | "tool";
1492
1707
  id?: string | undefined;
@@ -1501,7 +1716,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1501
1716
  } | undefined;
1502
1717
  model?: string | undefined;
1503
1718
  provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1504
- router?: "vercel" | "in-built" | undefined;
1505
1719
  toolCalls?: {
1506
1720
  function: {
1507
1721
  name: string;
@@ -1511,6 +1725,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1511
1725
  id: string;
1512
1726
  }[] | undefined;
1513
1727
  toolCallId?: string | undefined;
1728
+ success?: boolean | undefined;
1514
1729
  };
1515
1730
  sessionId: string;
1516
1731
  matchedText: string;
@@ -1536,6 +1751,11 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1536
1751
  query: string;
1537
1752
  results: {
1538
1753
  sessionId: string;
1754
+ metadata: {
1755
+ createdAt: number;
1756
+ lastActivity: number;
1757
+ messageCount: number;
1758
+ };
1539
1759
  matchCount: number;
1540
1760
  firstMatch: {
1541
1761
  message: {
@@ -1551,6 +1771,19 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1551
1771
  mimeType: string;
1552
1772
  data: string;
1553
1773
  filename?: string | undefined;
1774
+ } | {
1775
+ type: "ui-resource";
1776
+ mimeType: string;
1777
+ uri: string;
1778
+ content?: string | undefined;
1779
+ blob?: string | undefined;
1780
+ metadata?: {
1781
+ title?: string | undefined;
1782
+ preferredSize?: {
1783
+ width: number;
1784
+ height: number;
1785
+ } | undefined;
1786
+ } | undefined;
1554
1787
  })[] | null;
1555
1788
  role: "system" | "user" | "assistant" | "tool";
1556
1789
  id?: string | undefined;
@@ -1565,7 +1798,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1565
1798
  } | undefined;
1566
1799
  model?: string | undefined;
1567
1800
  provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1568
- router?: "vercel" | "in-built" | undefined;
1569
1801
  toolCalls?: {
1570
1802
  function: {
1571
1803
  name: string;
@@ -1575,17 +1807,13 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1575
1807
  id: string;
1576
1808
  }[] | undefined;
1577
1809
  toolCallId?: string | undefined;
1810
+ success?: boolean | undefined;
1578
1811
  };
1579
1812
  sessionId: string;
1580
1813
  matchedText: string;
1581
1814
  context: string;
1582
1815
  messageIndex: number;
1583
1816
  };
1584
- metadata: {
1585
- createdAt: number;
1586
- lastActivity: number;
1587
- messageCount: number;
1588
- };
1589
1817
  }[];
1590
1818
  total: number;
1591
1819
  hasMore: boolean;
@@ -1676,6 +1904,19 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1676
1904
  mimeType: string;
1677
1905
  data: string;
1678
1906
  filename?: string | undefined;
1907
+ } | {
1908
+ type: "ui-resource";
1909
+ mimeType: string;
1910
+ uri: string;
1911
+ content?: string | undefined;
1912
+ blob?: string | undefined;
1913
+ metadata?: {
1914
+ title?: string | undefined;
1915
+ preferredSize?: {
1916
+ width: number;
1917
+ height: number;
1918
+ } | undefined;
1919
+ } | undefined;
1679
1920
  })[] | null;
1680
1921
  role: "system" | "user" | "assistant" | "tool";
1681
1922
  id?: string | undefined;
@@ -1690,7 +1931,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1690
1931
  } | undefined;
1691
1932
  model?: string | undefined;
1692
1933
  provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1693
- router?: "vercel" | "in-built" | undefined;
1694
1934
  toolCalls?: {
1695
1935
  function: {
1696
1936
  name: string;
@@ -1700,7 +1940,9 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1700
1940
  id: string;
1701
1941
  }[] | undefined;
1702
1942
  toolCallId?: string | undefined;
1943
+ success?: boolean | undefined;
1703
1944
  }[];
1945
+ isBusy: boolean;
1704
1946
  };
1705
1947
  outputFormat: "json";
1706
1948
  status: 200;
@@ -1729,10 +1971,16 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1729
1971
  param: {
1730
1972
  sessionId: string;
1731
1973
  };
1974
+ } & {
1975
+ json: {
1976
+ clearQueue?: boolean | undefined;
1977
+ };
1732
1978
  };
1733
1979
  output: {
1734
1980
  sessionId: string;
1735
1981
  cancelled: boolean;
1982
+ queueCleared: boolean;
1983
+ clearedCount: number;
1736
1984
  };
1737
1985
  outputFormat: "json";
1738
1986
  status: 200;
@@ -1752,6 +2000,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1752
2000
  createdAt: number | null;
1753
2001
  lastActivity: number | null;
1754
2002
  messageCount: number;
2003
+ isBusy: boolean;
1755
2004
  title?: string | null | undefined;
1756
2005
  };
1757
2006
  };
@@ -1832,7 +2081,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1832
2081
  config: {
1833
2082
  model: string;
1834
2083
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
1835
- router?: "vercel" | "in-built" | undefined;
1836
2084
  maxIterations?: number | undefined;
1837
2085
  baseURL?: string | undefined;
1838
2086
  maxInputTokens?: number | undefined;
@@ -1853,7 +2101,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1853
2101
  input: {
1854
2102
  query: {
1855
2103
  provider?: string | string[] | undefined;
1856
- router?: "vercel" | "in-built" | undefined;
1857
2104
  hasKey?: "0" | "1" | "true" | "false" | undefined;
1858
2105
  fileType?: "image" | "audio" | "pdf" | undefined;
1859
2106
  defaultOnly?: "0" | "1" | "true" | "false" | undefined;
@@ -1866,7 +2113,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1866
2113
  name: string;
1867
2114
  hasApiKey: boolean;
1868
2115
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1869
- supportedRouters: ("vercel" | "in-built")[];
1870
2116
  primaryEnvVar: string;
1871
2117
  supportsBaseURL: boolean;
1872
2118
  models: {
@@ -1874,7 +2120,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1874
2120
  maxInputTokens: number;
1875
2121
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1876
2122
  default?: boolean | undefined;
1877
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1878
2123
  displayName?: string | undefined;
1879
2124
  pricing?: {
1880
2125
  inputPerM: number;
@@ -1890,7 +2135,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1890
2135
  name: string;
1891
2136
  hasApiKey: boolean;
1892
2137
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1893
- supportedRouters: ("vercel" | "in-built")[];
1894
2138
  primaryEnvVar: string;
1895
2139
  supportsBaseURL: boolean;
1896
2140
  models: {
@@ -1898,7 +2142,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1898
2142
  maxInputTokens: number;
1899
2143
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1900
2144
  default?: boolean | undefined;
1901
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1902
2145
  displayName?: string | undefined;
1903
2146
  pricing?: {
1904
2147
  inputPerM: number;
@@ -1914,7 +2157,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1914
2157
  name: string;
1915
2158
  hasApiKey: boolean;
1916
2159
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1917
- supportedRouters: ("vercel" | "in-built")[];
1918
2160
  primaryEnvVar: string;
1919
2161
  supportsBaseURL: boolean;
1920
2162
  models: {
@@ -1922,7 +2164,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1922
2164
  maxInputTokens: number;
1923
2165
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1924
2166
  default?: boolean | undefined;
1925
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1926
2167
  displayName?: string | undefined;
1927
2168
  pricing?: {
1928
2169
  inputPerM: number;
@@ -1938,7 +2179,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1938
2179
  name: string;
1939
2180
  hasApiKey: boolean;
1940
2181
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1941
- supportedRouters: ("vercel" | "in-built")[];
1942
2182
  primaryEnvVar: string;
1943
2183
  supportsBaseURL: boolean;
1944
2184
  models: {
@@ -1946,7 +2186,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1946
2186
  maxInputTokens: number;
1947
2187
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1948
2188
  default?: boolean | undefined;
1949
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1950
2189
  displayName?: string | undefined;
1951
2190
  pricing?: {
1952
2191
  inputPerM: number;
@@ -1962,7 +2201,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1962
2201
  name: string;
1963
2202
  hasApiKey: boolean;
1964
2203
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1965
- supportedRouters: ("vercel" | "in-built")[];
1966
2204
  primaryEnvVar: string;
1967
2205
  supportsBaseURL: boolean;
1968
2206
  models: {
@@ -1970,7 +2208,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1970
2208
  maxInputTokens: number;
1971
2209
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1972
2210
  default?: boolean | undefined;
1973
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1974
2211
  displayName?: string | undefined;
1975
2212
  pricing?: {
1976
2213
  inputPerM: number;
@@ -1986,7 +2223,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1986
2223
  name: string;
1987
2224
  hasApiKey: boolean;
1988
2225
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1989
- supportedRouters: ("vercel" | "in-built")[];
1990
2226
  primaryEnvVar: string;
1991
2227
  supportsBaseURL: boolean;
1992
2228
  models: {
@@ -1994,7 +2230,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1994
2230
  maxInputTokens: number;
1995
2231
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1996
2232
  default?: boolean | undefined;
1997
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1998
2233
  displayName?: string | undefined;
1999
2234
  pricing?: {
2000
2235
  inputPerM: number;
@@ -2010,7 +2245,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2010
2245
  name: string;
2011
2246
  hasApiKey: boolean;
2012
2247
  supportedFileTypes: ("image" | "audio" | "pdf")[];
2013
- supportedRouters: ("vercel" | "in-built")[];
2014
2248
  primaryEnvVar: string;
2015
2249
  supportsBaseURL: boolean;
2016
2250
  models: {
@@ -2018,7 +2252,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2018
2252
  maxInputTokens: number;
2019
2253
  supportedFileTypes: ("image" | "audio" | "pdf")[];
2020
2254
  default?: boolean | undefined;
2021
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
2022
2255
  displayName?: string | undefined;
2023
2256
  pricing?: {
2024
2257
  inputPerM: number;
@@ -2038,7 +2271,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2038
2271
  maxInputTokens: number;
2039
2272
  supportedFileTypes: ("image" | "audio" | "pdf")[];
2040
2273
  default?: boolean | undefined;
2041
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
2042
2274
  displayName?: string | undefined;
2043
2275
  pricing?: {
2044
2276
  inputPerM: number;
@@ -2077,10 +2309,9 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2077
2309
  $post: {
2078
2310
  input: {
2079
2311
  json: {
2080
- apiKey?: string | undefined;
2081
2312
  model?: string | undefined;
2082
2313
  provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2083
- router?: "vercel" | "in-built" | undefined;
2314
+ apiKey?: string | undefined;
2084
2315
  maxIterations?: number | undefined;
2085
2316
  baseURL?: string | undefined;
2086
2317
  maxInputTokens?: number | undefined;
@@ -2095,7 +2326,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2095
2326
  config: {
2096
2327
  model: string;
2097
2328
  provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
2098
- router: "vercel" | "in-built";
2099
2329
  maxIterations: number;
2100
2330
  baseURL?: string | undefined;
2101
2331
  maxInputTokens?: number | undefined;
@@ -2110,22 +2340,96 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2110
2340
  status: 200;
2111
2341
  };
2112
2342
  };
2343
+ } & {
2344
+ "/llm/custom-models": {
2345
+ $get: {
2346
+ input: {};
2347
+ output: {
2348
+ models: {
2349
+ name: string;
2350
+ baseURL: string;
2351
+ displayName?: string | undefined | undefined;
2352
+ maxInputTokens?: number | undefined | undefined;
2353
+ maxOutputTokens?: number | undefined | undefined;
2354
+ }[];
2355
+ };
2356
+ outputFormat: "json";
2357
+ status: 200;
2358
+ };
2359
+ };
2360
+ } & {
2361
+ "/llm/custom-models": {
2362
+ $post: {
2363
+ input: {
2364
+ json: {
2365
+ name: string;
2366
+ baseURL: string;
2367
+ displayName?: string | undefined;
2368
+ maxInputTokens?: number | undefined;
2369
+ maxOutputTokens?: number | undefined;
2370
+ };
2371
+ };
2372
+ output: {
2373
+ model: {
2374
+ name: string;
2375
+ baseURL: string;
2376
+ displayName?: string | undefined | undefined;
2377
+ maxInputTokens?: number | undefined | undefined;
2378
+ maxOutputTokens?: number | undefined | undefined;
2379
+ };
2380
+ ok: true;
2381
+ };
2382
+ outputFormat: "json";
2383
+ status: 200;
2384
+ };
2385
+ };
2386
+ } & {
2387
+ "/llm/custom-models/:name": {
2388
+ $delete: {
2389
+ input: {
2390
+ param: {
2391
+ name: string;
2392
+ };
2393
+ };
2394
+ output: {
2395
+ ok: true;
2396
+ deleted: string;
2397
+ };
2398
+ outputFormat: "json";
2399
+ status: 200;
2400
+ } | {
2401
+ input: {
2402
+ param: {
2403
+ name: string;
2404
+ };
2405
+ };
2406
+ output: {
2407
+ ok: false;
2408
+ error: string;
2409
+ };
2410
+ outputFormat: "json";
2411
+ status: 404;
2412
+ };
2413
+ };
2113
2414
  }, "/api"> & import("hono/types").MergeSchemaPath<{
2114
2415
  "/message": {
2115
2416
  $post: {
2116
2417
  input: {
2117
2418
  json: {
2118
- sessionId: string;
2119
- message?: string | undefined;
2120
- imageData?: {
2419
+ content: string | ({
2420
+ type: "text";
2421
+ text: string;
2422
+ } | {
2423
+ type: "image";
2121
2424
  image: string;
2122
- mimeType: string;
2123
- } | undefined;
2124
- fileData?: {
2425
+ mimeType?: string | undefined;
2426
+ } | {
2427
+ type: "file";
2125
2428
  mimeType: string;
2126
2429
  data: string;
2127
2430
  filename?: string | undefined;
2128
- } | undefined;
2431
+ })[];
2432
+ sessionId: string;
2129
2433
  };
2130
2434
  };
2131
2435
  output: {
@@ -2137,17 +2441,20 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2137
2441
  } | {
2138
2442
  input: {
2139
2443
  json: {
2140
- sessionId: string;
2141
- message?: string | undefined;
2142
- imageData?: {
2444
+ content: string | ({
2445
+ type: "text";
2446
+ text: string;
2447
+ } | {
2448
+ type: "image";
2143
2449
  image: string;
2144
- mimeType: string;
2145
- } | undefined;
2146
- fileData?: {
2450
+ mimeType?: string | undefined;
2451
+ } | {
2452
+ type: "file";
2147
2453
  mimeType: string;
2148
2454
  data: string;
2149
2455
  filename?: string | undefined;
2150
- } | undefined;
2456
+ })[];
2457
+ sessionId: string;
2151
2458
  };
2152
2459
  };
2153
2460
  output: {};
@@ -2160,17 +2467,20 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2160
2467
  $post: {
2161
2468
  input: {
2162
2469
  json: {
2163
- sessionId: string;
2164
- message?: string | undefined;
2165
- imageData?: {
2470
+ content: string | ({
2471
+ type: "text";
2472
+ text: string;
2473
+ } | {
2474
+ type: "image";
2166
2475
  image: string;
2167
- mimeType: string;
2168
- } | undefined;
2169
- fileData?: {
2476
+ mimeType?: string | undefined;
2477
+ } | {
2478
+ type: "file";
2170
2479
  mimeType: string;
2171
2480
  data: string;
2172
2481
  filename?: string | undefined;
2173
- } | undefined;
2482
+ })[];
2483
+ sessionId: string;
2174
2484
  };
2175
2485
  };
2176
2486
  output: {};
@@ -2179,17 +2489,20 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2179
2489
  } | {
2180
2490
  input: {
2181
2491
  json: {
2182
- sessionId: string;
2183
- message?: string | undefined;
2184
- imageData?: {
2492
+ content: string | ({
2493
+ type: "text";
2494
+ text: string;
2495
+ } | {
2496
+ type: "image";
2185
2497
  image: string;
2186
- mimeType: string;
2187
- } | undefined;
2188
- fileData?: {
2498
+ mimeType?: string | undefined;
2499
+ } | {
2500
+ type: "file";
2189
2501
  mimeType: string;
2190
2502
  data: string;
2191
2503
  filename?: string | undefined;
2192
- } | undefined;
2504
+ })[];
2505
+ sessionId: string;
2193
2506
  };
2194
2507
  };
2195
2508
  output: {
@@ -2204,7 +2517,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2204
2517
  } | undefined;
2205
2518
  model?: string | undefined;
2206
2519
  provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2207
- router?: "vercel" | "in-built" | undefined;
2208
2520
  };
2209
2521
  outputFormat: "json";
2210
2522
  status: 200;
@@ -2231,17 +2543,20 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2231
2543
  $post: {
2232
2544
  input: {
2233
2545
  json: {
2234
- sessionId: string;
2235
- message?: string | undefined;
2236
- imageData?: {
2546
+ content: string | ({
2547
+ type: "text";
2548
+ text: string;
2549
+ } | {
2550
+ type: "image";
2237
2551
  image: string;
2238
- mimeType: string;
2239
- } | undefined;
2240
- fileData?: {
2552
+ mimeType?: string | undefined;
2553
+ } | {
2554
+ type: "file";
2241
2555
  mimeType: string;
2242
2556
  data: string;
2243
2557
  filename?: string | undefined;
2244
- } | undefined;
2558
+ })[];
2559
+ sessionId: string;
2245
2560
  };
2246
2561
  };
2247
2562
  output: Response;
@@ -2250,22 +2565,52 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2250
2565
  } | {
2251
2566
  input: {
2252
2567
  json: {
2253
- sessionId: string;
2254
- message?: string | undefined;
2255
- imageData?: {
2568
+ content: string | ({
2569
+ type: "text";
2570
+ text: string;
2571
+ } | {
2572
+ type: "image";
2256
2573
  image: string;
2257
- mimeType: string;
2258
- } | undefined;
2259
- fileData?: {
2574
+ mimeType?: string | undefined;
2575
+ } | {
2576
+ type: "file";
2260
2577
  mimeType: string;
2261
2578
  data: string;
2262
2579
  filename?: string | undefined;
2263
- } | undefined;
2580
+ })[];
2581
+ sessionId: string;
2264
2582
  };
2265
2583
  };
2266
2584
  output: {};
2267
2585
  outputFormat: string;
2268
2586
  status: 400;
2587
+ } | {
2588
+ input: {
2589
+ json: {
2590
+ content: string | ({
2591
+ type: "text";
2592
+ text: string;
2593
+ } | {
2594
+ type: "image";
2595
+ image: string;
2596
+ mimeType?: string | undefined;
2597
+ } | {
2598
+ type: "file";
2599
+ mimeType: string;
2600
+ data: string;
2601
+ filename?: string | undefined;
2602
+ })[];
2603
+ sessionId: string;
2604
+ };
2605
+ };
2606
+ output: {
2607
+ sessionId: string;
2608
+ busy: true;
2609
+ queueLength: number;
2610
+ hint: string;
2611
+ };
2612
+ outputFormat: "json";
2613
+ status: 202;
2269
2614
  };
2270
2615
  };
2271
2616
  }, "/api"> & import("hono/types").MergeSchemaPath<{