@dexto/server 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/LICENSE +44 -0
  2. package/dist/a2a/adapters/index.cjs +42 -0
  3. package/dist/a2a/adapters/index.d.ts +10 -0
  4. package/dist/a2a/adapters/index.d.ts.map +1 -0
  5. package/dist/a2a/adapters/index.js +12 -0
  6. package/dist/a2a/adapters/message.cjs +193 -0
  7. package/dist/a2a/adapters/message.d.ts +50 -0
  8. package/dist/a2a/adapters/message.d.ts.map +1 -0
  9. package/dist/a2a/adapters/message.js +167 -0
  10. package/dist/a2a/adapters/state.cjs +57 -0
  11. package/dist/a2a/adapters/state.d.ts +36 -0
  12. package/dist/a2a/adapters/state.d.ts.map +1 -0
  13. package/dist/a2a/adapters/state.js +32 -0
  14. package/dist/a2a/adapters/task-view.cjs +85 -0
  15. package/dist/a2a/adapters/task-view.d.ts +58 -0
  16. package/dist/a2a/adapters/task-view.d.ts.map +1 -0
  17. package/dist/a2a/adapters/task-view.js +60 -0
  18. package/dist/a2a/index.cjs +51 -0
  19. package/dist/a2a/index.d.ts +15 -0
  20. package/dist/a2a/index.d.ts.map +1 -0
  21. package/dist/a2a/index.js +30 -0
  22. package/dist/a2a/jsonrpc/index.cjs +38 -0
  23. package/dist/a2a/jsonrpc/index.d.ts +11 -0
  24. package/dist/a2a/jsonrpc/index.d.ts.map +1 -0
  25. package/dist/a2a/jsonrpc/index.js +10 -0
  26. package/dist/a2a/jsonrpc/methods.cjs +183 -0
  27. package/dist/a2a/jsonrpc/methods.d.ts +110 -0
  28. package/dist/a2a/jsonrpc/methods.d.ts.map +1 -0
  29. package/dist/a2a/jsonrpc/methods.js +159 -0
  30. package/dist/a2a/jsonrpc/server.cjs +199 -0
  31. package/dist/a2a/jsonrpc/server.d.ts +100 -0
  32. package/dist/a2a/jsonrpc/server.d.ts.map +1 -0
  33. package/dist/a2a/jsonrpc/server.js +175 -0
  34. package/dist/a2a/jsonrpc/types.cjs +47 -0
  35. package/dist/a2a/jsonrpc/types.d.ts +91 -0
  36. package/dist/a2a/jsonrpc/types.d.ts.map +1 -0
  37. package/dist/a2a/jsonrpc/types.js +21 -0
  38. package/dist/a2a/types.cjs +16 -0
  39. package/dist/a2a/types.d.ts +250 -0
  40. package/dist/a2a/types.d.ts.map +1 -0
  41. package/dist/a2a/types.js +0 -0
  42. package/dist/approval/approval-coordinator.cjs +87 -0
  43. package/dist/approval/approval-coordinator.d.ts +52 -0
  44. package/dist/approval/approval-coordinator.d.ts.map +1 -0
  45. package/dist/approval/approval-coordinator.js +63 -0
  46. package/dist/approval/manual-approval-handler.cjs +100 -0
  47. package/dist/approval/manual-approval-handler.d.ts +32 -0
  48. package/dist/approval/manual-approval-handler.d.ts.map +1 -0
  49. package/dist/approval/manual-approval-handler.js +76 -0
  50. package/dist/events/a2a-sse-subscriber.cjs +271 -0
  51. package/dist/events/a2a-sse-subscriber.d.ts +94 -0
  52. package/dist/events/a2a-sse-subscriber.d.ts.map +1 -0
  53. package/dist/events/a2a-sse-subscriber.js +247 -0
  54. package/dist/events/types.cjs +16 -0
  55. package/dist/events/types.d.ts +15 -0
  56. package/dist/events/types.d.ts.map +1 -0
  57. package/dist/events/types.js +0 -0
  58. package/dist/events/webhook-subscriber.cjs +301 -0
  59. package/dist/events/webhook-subscriber.d.ts +64 -0
  60. package/dist/events/webhook-subscriber.d.ts.map +1 -0
  61. package/dist/events/webhook-subscriber.js +269 -0
  62. package/dist/events/webhook-types.cjs +16 -0
  63. package/dist/events/webhook-types.d.ts +91 -0
  64. package/dist/events/webhook-types.d.ts.map +1 -0
  65. package/dist/events/webhook-types.js +0 -0
  66. package/dist/hono/__tests__/test-fixtures.cjs +236 -0
  67. package/dist/hono/__tests__/test-fixtures.d.ts +65 -0
  68. package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -0
  69. package/dist/hono/__tests__/test-fixtures.js +197 -0
  70. package/dist/hono/index.cjs +166 -0
  71. package/dist/hono/index.d.ts +2783 -0
  72. package/dist/hono/index.d.ts.map +1 -0
  73. package/dist/hono/index.js +141 -0
  74. package/dist/hono/middleware/auth.cjs +75 -0
  75. package/dist/hono/middleware/auth.d.ts +3 -0
  76. package/dist/hono/middleware/auth.d.ts.map +1 -0
  77. package/dist/hono/middleware/auth.js +51 -0
  78. package/dist/hono/middleware/cors.cjs +57 -0
  79. package/dist/hono/middleware/cors.d.ts +9 -0
  80. package/dist/hono/middleware/cors.d.ts.map +1 -0
  81. package/dist/hono/middleware/cors.js +33 -0
  82. package/dist/hono/middleware/error.cjs +131 -0
  83. package/dist/hono/middleware/error.d.ts +5 -0
  84. package/dist/hono/middleware/error.d.ts.map +1 -0
  85. package/dist/hono/middleware/error.js +105 -0
  86. package/dist/hono/middleware/redaction.cjs +45 -0
  87. package/dist/hono/middleware/redaction.d.ts +4 -0
  88. package/dist/hono/middleware/redaction.d.ts.map +1 -0
  89. package/dist/hono/middleware/redaction.js +20 -0
  90. package/dist/hono/node/index.cjs +139 -0
  91. package/dist/hono/node/index.d.ts +19 -0
  92. package/dist/hono/node/index.d.ts.map +1 -0
  93. package/dist/hono/node/index.js +115 -0
  94. package/dist/hono/routes/a2a-jsonrpc.cjs +119 -0
  95. package/dist/hono/routes/a2a-jsonrpc.d.ts +46 -0
  96. package/dist/hono/routes/a2a-jsonrpc.d.ts.map +1 -0
  97. package/dist/hono/routes/a2a-jsonrpc.js +95 -0
  98. package/dist/hono/routes/a2a-tasks.cjs +315 -0
  99. package/dist/hono/routes/a2a-tasks.d.ts +530 -0
  100. package/dist/hono/routes/a2a-tasks.d.ts.map +1 -0
  101. package/dist/hono/routes/a2a-tasks.js +291 -0
  102. package/dist/hono/routes/a2a.cjs +36 -0
  103. package/dist/hono/routes/a2a.d.ts +4 -0
  104. package/dist/hono/routes/a2a.d.ts.map +1 -0
  105. package/dist/hono/routes/a2a.js +12 -0
  106. package/dist/hono/routes/agents.cjs +735 -0
  107. package/dist/hono/routes/agents.d.ts +650 -0
  108. package/dist/hono/routes/agents.d.ts.map +1 -0
  109. package/dist/hono/routes/agents.js +711 -0
  110. package/dist/hono/routes/approvals.cjs +125 -0
  111. package/dist/hono/routes/approvals.d.ts +89 -0
  112. package/dist/hono/routes/approvals.d.ts.map +1 -0
  113. package/dist/hono/routes/approvals.js +101 -0
  114. package/dist/hono/routes/greeting.cjs +60 -0
  115. package/dist/hono/routes/greeting.d.ts +19 -0
  116. package/dist/hono/routes/greeting.d.ts.map +1 -0
  117. package/dist/hono/routes/greeting.js +36 -0
  118. package/dist/hono/routes/health.cjs +45 -0
  119. package/dist/hono/routes/health.d.ts +17 -0
  120. package/dist/hono/routes/health.d.ts.map +1 -0
  121. package/dist/hono/routes/health.js +21 -0
  122. package/dist/hono/routes/llm.cjs +298 -0
  123. package/dist/hono/routes/llm.d.ts +294 -0
  124. package/dist/hono/routes/llm.d.ts.map +1 -0
  125. package/dist/hono/routes/llm.js +287 -0
  126. package/dist/hono/routes/mcp.cjs +356 -0
  127. package/dist/hono/routes/mcp.d.ts +246 -0
  128. package/dist/hono/routes/mcp.d.ts.map +1 -0
  129. package/dist/hono/routes/mcp.js +332 -0
  130. package/dist/hono/routes/memory.cjs +192 -0
  131. package/dist/hono/routes/memory.d.ts +146 -0
  132. package/dist/hono/routes/memory.d.ts.map +1 -0
  133. package/dist/hono/routes/memory.js +168 -0
  134. package/dist/hono/routes/messages.cjs +320 -0
  135. package/dist/hono/routes/messages.d.ts +163 -0
  136. package/dist/hono/routes/messages.d.ts.map +1 -0
  137. package/dist/hono/routes/messages.js +296 -0
  138. package/dist/hono/routes/prompts.cjs +228 -0
  139. package/dist/hono/routes/prompts.d.ts +150 -0
  140. package/dist/hono/routes/prompts.d.ts.map +1 -0
  141. package/dist/hono/routes/prompts.js +204 -0
  142. package/dist/hono/routes/resources.cjs +110 -0
  143. package/dist/hono/routes/resources.d.ts +76 -0
  144. package/dist/hono/routes/resources.d.ts.map +1 -0
  145. package/dist/hono/routes/resources.js +86 -0
  146. package/dist/hono/routes/search.cjs +109 -0
  147. package/dist/hono/routes/search.d.ts +137 -0
  148. package/dist/hono/routes/search.d.ts.map +1 -0
  149. package/dist/hono/routes/search.js +85 -0
  150. package/dist/hono/routes/sessions.cjs +366 -0
  151. package/dist/hono/routes/sessions.d.ts +229 -0
  152. package/dist/hono/routes/sessions.d.ts.map +1 -0
  153. package/dist/hono/routes/sessions.js +342 -0
  154. package/dist/hono/routes/webhooks.cjs +228 -0
  155. package/dist/hono/routes/webhooks.d.ts +127 -0
  156. package/dist/hono/routes/webhooks.d.ts.map +1 -0
  157. package/dist/hono/routes/webhooks.js +204 -0
  158. package/dist/hono/schemas/responses.cjs +276 -0
  159. package/dist/hono/schemas/responses.d.ts +1418 -0
  160. package/dist/hono/schemas/responses.d.ts.map +1 -0
  161. package/dist/hono/schemas/responses.js +227 -0
  162. package/dist/hono/types.cjs +16 -0
  163. package/dist/hono/types.d.ts +6 -0
  164. package/dist/hono/types.d.ts.map +1 -0
  165. package/dist/hono/types.js +0 -0
  166. package/dist/index.cjs +38 -0
  167. package/dist/index.d.ts +11 -0
  168. package/dist/index.d.ts.map +1 -0
  169. package/dist/index.js +9 -0
  170. package/dist/mcp/mcp-handler.cjs +145 -0
  171. package/dist/mcp/mcp-handler.d.ts +14 -0
  172. package/dist/mcp/mcp-handler.d.ts.map +1 -0
  173. package/dist/mcp/mcp-handler.js +118 -0
  174. package/package.json +59 -0
@@ -0,0 +1,650 @@
1
+ import { OpenAPIHono, z } from '@hono/zod-openapi';
2
+ import type { DextoAgent } from '@dexto/core';
3
+ export type AgentsRouterContext = {
4
+ switchAgentById: (agentId: string) => Promise<{
5
+ id: string;
6
+ name: string;
7
+ }>;
8
+ switchAgentByPath: (filePath: string) => Promise<{
9
+ id: string;
10
+ name: string;
11
+ }>;
12
+ resolveAgentInfo: (agentId: string) => Promise<{
13
+ id: string;
14
+ name: string;
15
+ }>;
16
+ ensureAgentAvailable: () => void;
17
+ getActiveAgentId: () => string | undefined;
18
+ };
19
+ export declare function createAgentsRouter(getAgent: () => DextoAgent, context: AgentsRouterContext): OpenAPIHono<import("hono").Env, {
20
+ "/agents": {
21
+ $get: {
22
+ input: {};
23
+ output: {
24
+ installed: {
25
+ description: string;
26
+ type: "custom" | "builtin";
27
+ id: string;
28
+ name: string;
29
+ tags?: string[] | undefined;
30
+ author?: string | undefined;
31
+ }[];
32
+ available: {
33
+ description: string;
34
+ type: "custom" | "builtin";
35
+ id: string;
36
+ name: string;
37
+ tags?: string[] | undefined;
38
+ author?: string | undefined;
39
+ }[];
40
+ current: {
41
+ id: string | null;
42
+ name: string | null;
43
+ };
44
+ };
45
+ outputFormat: "json";
46
+ status: 200;
47
+ };
48
+ };
49
+ } & {
50
+ "/agents/current": {
51
+ $get: {
52
+ input: {};
53
+ output: {
54
+ id: string | null;
55
+ name: string | null;
56
+ };
57
+ outputFormat: "json";
58
+ status: 200;
59
+ };
60
+ };
61
+ } & {
62
+ "/agents/install": {
63
+ $post: {
64
+ input: {
65
+ json: {
66
+ id: string;
67
+ path?: string | undefined;
68
+ } | {
69
+ id: string;
70
+ metadata: {
71
+ tags: string[];
72
+ description: string;
73
+ author: string;
74
+ main?: string | undefined;
75
+ };
76
+ sourcePath: string;
77
+ name?: string | undefined;
78
+ injectPreferences?: boolean | undefined;
79
+ };
80
+ };
81
+ output: {
82
+ type: "custom" | "builtin";
83
+ id: string;
84
+ name: string;
85
+ installed: true;
86
+ };
87
+ outputFormat: "json";
88
+ status: 201;
89
+ };
90
+ };
91
+ } & {
92
+ "/agents/switch": {
93
+ $post: {
94
+ input: {
95
+ json: {
96
+ id: string;
97
+ path?: string | undefined;
98
+ };
99
+ };
100
+ output: {
101
+ id: string;
102
+ name: string;
103
+ switched: true;
104
+ };
105
+ outputFormat: "json";
106
+ status: 200;
107
+ };
108
+ };
109
+ } & {
110
+ "/agents/validate-name": {
111
+ $post: {
112
+ input: {
113
+ json: {
114
+ id: string;
115
+ path?: string | undefined;
116
+ };
117
+ };
118
+ output: {
119
+ valid: boolean;
120
+ message?: string | undefined;
121
+ conflict?: string | undefined;
122
+ };
123
+ outputFormat: "json";
124
+ status: 200;
125
+ };
126
+ };
127
+ } & {
128
+ "/agents/uninstall": {
129
+ $post: {
130
+ input: {
131
+ json: {
132
+ id: string;
133
+ force?: boolean | undefined;
134
+ };
135
+ };
136
+ output: {
137
+ id: string;
138
+ uninstalled: true;
139
+ };
140
+ outputFormat: "json";
141
+ status: 200;
142
+ };
143
+ };
144
+ } & {
145
+ "/agents/custom/create": {
146
+ $post: {
147
+ input: {
148
+ json: {
149
+ description: string;
150
+ config: {
151
+ llm: {
152
+ apiKey: string;
153
+ model: string;
154
+ provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
155
+ router?: "vercel" | "in-built" | undefined;
156
+ maxIterations?: number | undefined;
157
+ baseURL?: string | undefined;
158
+ maxInputTokens?: number | undefined;
159
+ maxOutputTokens?: number | undefined;
160
+ temperature?: number | undefined;
161
+ allowedMediaTypes?: string[] | undefined;
162
+ };
163
+ systemPrompt: string | {
164
+ contributors?: ({
165
+ type: "static";
166
+ content: string;
167
+ id: string;
168
+ priority: number;
169
+ enabled?: boolean | undefined;
170
+ } | {
171
+ type: "dynamic";
172
+ id: string;
173
+ priority: number;
174
+ source: "resources" | "dateTime" | "memorySummary";
175
+ enabled?: boolean | undefined;
176
+ } | {
177
+ type: "file";
178
+ id: string;
179
+ priority: number;
180
+ files: string[];
181
+ options?: {
182
+ includeFilenames?: boolean | undefined;
183
+ separator?: string | undefined;
184
+ errorHandling?: "error" | "skip" | undefined;
185
+ maxFileSize?: number | undefined;
186
+ includeMetadata?: boolean | undefined;
187
+ } | undefined;
188
+ enabled?: boolean | undefined;
189
+ } | {
190
+ type: "memory";
191
+ id: string;
192
+ priority: number;
193
+ options?: {
194
+ includeTimestamps?: boolean | undefined;
195
+ includeTags?: boolean | undefined;
196
+ limit?: number | undefined;
197
+ pinnedOnly?: boolean | undefined;
198
+ } | undefined;
199
+ enabled?: boolean | undefined;
200
+ })[] | undefined;
201
+ };
202
+ storage?: {
203
+ database: {
204
+ type: "in-memory";
205
+ options?: Record<string, any> | undefined;
206
+ maxConnections?: number | undefined;
207
+ idleTimeoutMillis?: number | undefined;
208
+ connectionTimeoutMillis?: number | undefined;
209
+ } | {
210
+ path: string;
211
+ type: "sqlite";
212
+ options?: Record<string, any> | undefined;
213
+ maxConnections?: number | undefined;
214
+ idleTimeoutMillis?: number | undefined;
215
+ connectionTimeoutMillis?: number | undefined;
216
+ } | {
217
+ type: "postgres";
218
+ password?: string | undefined;
219
+ options?: Record<string, any> | undefined;
220
+ url?: string | undefined;
221
+ maxConnections?: number | undefined;
222
+ idleTimeoutMillis?: number | undefined;
223
+ connectionTimeoutMillis?: number | undefined;
224
+ host?: string | undefined;
225
+ port?: number | undefined;
226
+ database?: string | undefined;
227
+ connectionString?: string | undefined;
228
+ };
229
+ cache: {
230
+ type: "in-memory";
231
+ options?: Record<string, any> | undefined;
232
+ maxConnections?: number | undefined;
233
+ idleTimeoutMillis?: number | undefined;
234
+ connectionTimeoutMillis?: number | undefined;
235
+ } | {
236
+ type: "redis";
237
+ password?: string | undefined;
238
+ options?: Record<string, any> | undefined;
239
+ url?: string | undefined;
240
+ maxConnections?: number | undefined;
241
+ idleTimeoutMillis?: number | undefined;
242
+ connectionTimeoutMillis?: number | undefined;
243
+ host?: string | undefined;
244
+ port?: number | undefined;
245
+ database?: number | undefined;
246
+ };
247
+ blob: {
248
+ type: "in-memory";
249
+ maxBlobSize?: number | undefined;
250
+ maxTotalSize?: number | undefined;
251
+ } | {
252
+ type: "local";
253
+ storePath: string;
254
+ maxBlobSize?: number | undefined;
255
+ maxTotalSize?: number | undefined;
256
+ cleanupAfterDays?: number | undefined;
257
+ };
258
+ } | undefined;
259
+ telemetry?: {
260
+ enabled?: boolean | undefined;
261
+ serviceName?: string | undefined;
262
+ tracerName?: string | undefined;
263
+ export?: {
264
+ type: "otlp";
265
+ headers?: Record<string, string> | undefined;
266
+ protocol?: "http" | "grpc" | undefined;
267
+ endpoint?: string | undefined;
268
+ } | {
269
+ type: "console";
270
+ } | undefined;
271
+ } | undefined;
272
+ logger?: {
273
+ level?: "debug" | "info" | "warn" | "error" | "silly" | undefined;
274
+ transports?: ({
275
+ type: "console";
276
+ colorize?: boolean | undefined;
277
+ } | {
278
+ path: string;
279
+ type: "file";
280
+ maxFiles?: number | undefined;
281
+ maxSize?: number | undefined;
282
+ } | {
283
+ token: string;
284
+ type: "upstash";
285
+ url: string;
286
+ listName?: string | undefined;
287
+ maxListLength?: number | undefined;
288
+ batchSize?: number | undefined;
289
+ })[] | undefined;
290
+ } | undefined;
291
+ elicitation?: {
292
+ timeout?: number | undefined;
293
+ enabled?: boolean | undefined;
294
+ } | undefined;
295
+ agentId?: string | undefined;
296
+ starterPrompts?: {
297
+ prompt: string;
298
+ id: string;
299
+ description?: string | undefined;
300
+ title?: string | undefined;
301
+ priority?: number | undefined;
302
+ category?: string | undefined;
303
+ }[] | undefined;
304
+ agentCard?: {
305
+ description: string;
306
+ url: string;
307
+ name: string;
308
+ version: string;
309
+ metadata?: z.objectInputType<{
310
+ dexto: z.ZodOptional<z.ZodObject<{
311
+ authentication: z.ZodOptional<z.ZodObject<{
312
+ schemes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
313
+ credentials: z.ZodOptional<z.ZodString>;
314
+ }, "strict", z.ZodTypeAny, {
315
+ schemes: string[];
316
+ credentials?: string | undefined;
317
+ }, {
318
+ schemes?: string[] | undefined;
319
+ credentials?: string | undefined;
320
+ }>>;
321
+ delegation: z.ZodOptional<z.ZodObject<{
322
+ protocol: z.ZodEnum<["dexto-v1", "http-simple", "a2a-jsonrpc", "mcp-http"]>;
323
+ endpoint: z.ZodString;
324
+ supportsSession: z.ZodBoolean;
325
+ supportsStreaming: z.ZodOptional<z.ZodBoolean>;
326
+ }, "strict", z.ZodTypeAny, {
327
+ protocol: "dexto-v1" | "http-simple" | "a2a-jsonrpc" | "mcp-http";
328
+ endpoint: string;
329
+ supportsSession: boolean;
330
+ supportsStreaming?: boolean | undefined;
331
+ }, {
332
+ protocol: "dexto-v1" | "http-simple" | "a2a-jsonrpc" | "mcp-http";
333
+ endpoint: string;
334
+ supportsSession: boolean;
335
+ supportsStreaming?: boolean | undefined;
336
+ }>>;
337
+ owner: z.ZodOptional<z.ZodObject<{
338
+ userId: z.ZodString;
339
+ username: z.ZodString;
340
+ email: z.ZodOptional<z.ZodString>;
341
+ }, "strict", z.ZodTypeAny, {
342
+ userId: string;
343
+ username: string;
344
+ email?: string | undefined;
345
+ }, {
346
+ userId: string;
347
+ username: string;
348
+ email?: string | undefined;
349
+ }>>;
350
+ }, "strict", z.ZodTypeAny, {
351
+ authentication?: {
352
+ schemes: string[];
353
+ credentials?: string | undefined;
354
+ } | undefined;
355
+ delegation?: {
356
+ protocol: "dexto-v1" | "http-simple" | "a2a-jsonrpc" | "mcp-http";
357
+ endpoint: string;
358
+ supportsSession: boolean;
359
+ supportsStreaming?: boolean | undefined;
360
+ } | undefined;
361
+ owner?: {
362
+ userId: string;
363
+ username: string;
364
+ email?: string | undefined;
365
+ } | undefined;
366
+ }, {
367
+ authentication?: {
368
+ schemes?: string[] | undefined;
369
+ credentials?: string | undefined;
370
+ } | undefined;
371
+ delegation?: {
372
+ protocol: "dexto-v1" | "http-simple" | "a2a-jsonrpc" | "mcp-http";
373
+ endpoint: string;
374
+ supportsSession: boolean;
375
+ supportsStreaming?: boolean | undefined;
376
+ } | undefined;
377
+ owner?: {
378
+ userId: string;
379
+ username: string;
380
+ email?: string | undefined;
381
+ } | undefined;
382
+ }>>;
383
+ }, z.ZodTypeAny, "passthrough"> | undefined;
384
+ capabilities?: {
385
+ streaming?: boolean | undefined;
386
+ pushNotifications?: boolean | undefined;
387
+ stateTransitionHistory?: boolean | undefined;
388
+ } | undefined;
389
+ provider?: {
390
+ url: string;
391
+ organization: string;
392
+ } | undefined;
393
+ protocolVersion?: string | undefined;
394
+ preferredTransport?: "JSONRPC" | "GRPC" | "HTTP+JSON" | undefined;
395
+ defaultInputModes?: string[] | undefined;
396
+ defaultOutputModes?: string[] | undefined;
397
+ skills?: {
398
+ description: string;
399
+ name: string;
400
+ id: string;
401
+ tags: string[];
402
+ examples?: string[] | undefined;
403
+ inputModes?: string[] | undefined;
404
+ outputModes?: string[] | undefined;
405
+ }[] | undefined;
406
+ iconUrl?: string | undefined;
407
+ documentationUrl?: string | undefined;
408
+ additionalInterfaces?: {
409
+ url: string;
410
+ transport: "JSONRPC" | "GRPC" | "HTTP+JSON";
411
+ }[] | undefined;
412
+ securitySchemes?: Record<string, {
413
+ type: "apiKey";
414
+ name: string;
415
+ in: "query" | "header" | "cookie";
416
+ description?: string | undefined;
417
+ } | {
418
+ type: "http";
419
+ scheme: string;
420
+ description?: string | undefined;
421
+ bearerFormat?: string | undefined;
422
+ } | {
423
+ type: "oauth2";
424
+ flows: {
425
+ password?: {
426
+ scopes: Record<string, string>;
427
+ authorizationUrl?: string | undefined;
428
+ tokenUrl?: string | undefined;
429
+ refreshUrl?: string | undefined;
430
+ } | undefined;
431
+ implicit?: {
432
+ scopes: Record<string, string>;
433
+ authorizationUrl?: string | undefined;
434
+ tokenUrl?: string | undefined;
435
+ refreshUrl?: string | undefined;
436
+ } | undefined;
437
+ clientCredentials?: {
438
+ scopes: Record<string, string>;
439
+ authorizationUrl?: string | undefined;
440
+ tokenUrl?: string | undefined;
441
+ refreshUrl?: string | undefined;
442
+ } | undefined;
443
+ authorizationCode?: {
444
+ scopes: Record<string, string>;
445
+ authorizationUrl?: string | undefined;
446
+ tokenUrl?: string | undefined;
447
+ refreshUrl?: string | undefined;
448
+ } | undefined;
449
+ };
450
+ description?: string | undefined;
451
+ } | {
452
+ type: "openIdConnect";
453
+ openIdConnectUrl: string;
454
+ description?: string | undefined;
455
+ } | {
456
+ type: "mutualTLS";
457
+ description?: string | undefined;
458
+ }> | undefined;
459
+ security?: Record<string, string[]>[] | undefined;
460
+ supportsAuthenticatedExtendedCard?: boolean | undefined;
461
+ signatures?: {
462
+ protected: string;
463
+ signature: string;
464
+ }[] | undefined;
465
+ } | undefined;
466
+ greeting?: string | undefined;
467
+ mcpServers?: Record<string, {
468
+ type: "stdio";
469
+ command: string;
470
+ timeout?: number | undefined;
471
+ args?: string[] | undefined;
472
+ env?: Record<string, string> | undefined;
473
+ connectionMode?: "strict" | "lenient" | undefined;
474
+ } | {
475
+ type: "sse";
476
+ url: string;
477
+ timeout?: number | undefined;
478
+ connectionMode?: "strict" | "lenient" | undefined;
479
+ headers?: Record<string, string> | undefined;
480
+ } | {
481
+ type: "http";
482
+ url: string;
483
+ timeout?: number | undefined;
484
+ connectionMode?: "strict" | "lenient" | undefined;
485
+ headers?: Record<string, string> | undefined;
486
+ }> | undefined;
487
+ internalTools?: ("search_history" | "ask_user" | "read_file" | "glob_files" | "grep_content" | "write_file" | "edit_file" | "bash_exec" | "bash_output" | "kill_process" | "delegate_to_url")[] | undefined;
488
+ sessions?: {
489
+ maxSessions?: number | undefined;
490
+ sessionTTL?: number | undefined;
491
+ } | undefined;
492
+ toolConfirmation?: {
493
+ timeout?: number | undefined;
494
+ mode?: "manual" | "auto-approve" | "auto-deny" | undefined;
495
+ allowedToolsStorage?: "storage" | "memory" | undefined;
496
+ toolPolicies?: {
497
+ alwaysAllow?: string[] | undefined;
498
+ alwaysDeny?: string[] | undefined;
499
+ } | undefined;
500
+ } | undefined;
501
+ internalResources?: ({
502
+ type: "filesystem";
503
+ paths: string[];
504
+ maxFiles?: number | undefined;
505
+ maxDepth?: number | undefined;
506
+ includeHidden?: boolean | undefined;
507
+ includeExtensions?: string[] | undefined;
508
+ } | {
509
+ type: "blob";
510
+ })[] | {
511
+ enabled?: boolean | undefined;
512
+ resources?: ({
513
+ type: "filesystem";
514
+ paths: string[];
515
+ maxFiles?: number | undefined;
516
+ maxDepth?: number | undefined;
517
+ includeHidden?: boolean | undefined;
518
+ includeExtensions?: string[] | undefined;
519
+ } | {
520
+ type: "blob";
521
+ })[] | undefined;
522
+ } | undefined;
523
+ plugins?: {
524
+ custom?: {
525
+ name: string;
526
+ priority: number;
527
+ module: string;
528
+ blocking: boolean;
529
+ config?: Record<string, any> | undefined;
530
+ enabled?: boolean | undefined;
531
+ }[] | undefined;
532
+ contentPolicy?: z.objectInputType<{
533
+ priority: z.ZodNumber;
534
+ blocking: z.ZodOptional<z.ZodBoolean>;
535
+ enabled: z.ZodDefault<z.ZodBoolean>;
536
+ }, z.ZodTypeAny, "passthrough"> | undefined;
537
+ responseSanitizer?: z.objectInputType<{
538
+ priority: z.ZodNumber;
539
+ blocking: z.ZodOptional<z.ZodBoolean>;
540
+ enabled: z.ZodDefault<z.ZodBoolean>;
541
+ }, z.ZodTypeAny, "passthrough"> | undefined;
542
+ } | undefined;
543
+ };
544
+ id: string;
545
+ name: string;
546
+ tags?: string[] | undefined;
547
+ author?: string | undefined;
548
+ };
549
+ };
550
+ output: {
551
+ id: string;
552
+ name: string;
553
+ created: true;
554
+ };
555
+ outputFormat: "json";
556
+ status: 201;
557
+ };
558
+ };
559
+ } & {
560
+ "/agent/path": {
561
+ $get: {
562
+ input: {};
563
+ output: {
564
+ path: string;
565
+ name: string;
566
+ relativePath: string;
567
+ isDefault: boolean;
568
+ };
569
+ outputFormat: "json";
570
+ status: 200;
571
+ };
572
+ };
573
+ } & {
574
+ "/agent/config": {
575
+ $get: {
576
+ input: {};
577
+ output: {
578
+ path: string;
579
+ lastModified: string;
580
+ yaml: string;
581
+ relativePath: string;
582
+ warnings: string[];
583
+ };
584
+ outputFormat: "json";
585
+ status: 200;
586
+ };
587
+ };
588
+ } & {
589
+ "/agent/validate": {
590
+ $post: {
591
+ input: {
592
+ json: {
593
+ yaml: string;
594
+ };
595
+ };
596
+ output: {
597
+ valid: boolean;
598
+ warnings: {
599
+ path: string;
600
+ code: string;
601
+ message: string;
602
+ }[];
603
+ errors: {
604
+ [x: string]: import("hono/utils/types").JSONValue;
605
+ code: string;
606
+ message: string;
607
+ path?: string | undefined;
608
+ line?: number | undefined;
609
+ column?: number | undefined;
610
+ }[];
611
+ };
612
+ outputFormat: "json";
613
+ status: 200;
614
+ };
615
+ };
616
+ } & {
617
+ "/agent/config": {
618
+ $post: {
619
+ input: {
620
+ json: {
621
+ yaml: string;
622
+ };
623
+ };
624
+ output: {
625
+ path: string;
626
+ message: string;
627
+ ok: true;
628
+ restarted: boolean;
629
+ reloaded: boolean;
630
+ changesApplied: string[];
631
+ };
632
+ outputFormat: "json";
633
+ status: 200;
634
+ };
635
+ };
636
+ } & {
637
+ "/agent/config/export": {
638
+ $get: {
639
+ input: {
640
+ query: {
641
+ sessionId?: string | undefined;
642
+ };
643
+ };
644
+ output: Response;
645
+ outputFormat: "json";
646
+ status: import("hono/utils/http-status").StatusCode;
647
+ };
648
+ };
649
+ }, "/">;
650
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAsN9C,MAAM,MAAM,mBAAmB,GAAG;IAC9B,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7E,oBAAoB,EAAE,MAAM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