@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.
- package/LICENSE +44 -0
- package/dist/a2a/adapters/index.cjs +42 -0
- package/dist/a2a/adapters/index.d.ts +10 -0
- package/dist/a2a/adapters/index.d.ts.map +1 -0
- package/dist/a2a/adapters/index.js +12 -0
- package/dist/a2a/adapters/message.cjs +193 -0
- package/dist/a2a/adapters/message.d.ts +50 -0
- package/dist/a2a/adapters/message.d.ts.map +1 -0
- package/dist/a2a/adapters/message.js +167 -0
- package/dist/a2a/adapters/state.cjs +57 -0
- package/dist/a2a/adapters/state.d.ts +36 -0
- package/dist/a2a/adapters/state.d.ts.map +1 -0
- package/dist/a2a/adapters/state.js +32 -0
- package/dist/a2a/adapters/task-view.cjs +85 -0
- package/dist/a2a/adapters/task-view.d.ts +58 -0
- package/dist/a2a/adapters/task-view.d.ts.map +1 -0
- package/dist/a2a/adapters/task-view.js +60 -0
- package/dist/a2a/index.cjs +51 -0
- package/dist/a2a/index.d.ts +15 -0
- package/dist/a2a/index.d.ts.map +1 -0
- package/dist/a2a/index.js +30 -0
- package/dist/a2a/jsonrpc/index.cjs +38 -0
- package/dist/a2a/jsonrpc/index.d.ts +11 -0
- package/dist/a2a/jsonrpc/index.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/index.js +10 -0
- package/dist/a2a/jsonrpc/methods.cjs +183 -0
- package/dist/a2a/jsonrpc/methods.d.ts +110 -0
- package/dist/a2a/jsonrpc/methods.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/methods.js +159 -0
- package/dist/a2a/jsonrpc/server.cjs +199 -0
- package/dist/a2a/jsonrpc/server.d.ts +100 -0
- package/dist/a2a/jsonrpc/server.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/server.js +175 -0
- package/dist/a2a/jsonrpc/types.cjs +47 -0
- package/dist/a2a/jsonrpc/types.d.ts +91 -0
- package/dist/a2a/jsonrpc/types.d.ts.map +1 -0
- package/dist/a2a/jsonrpc/types.js +21 -0
- package/dist/a2a/types.cjs +16 -0
- package/dist/a2a/types.d.ts +250 -0
- package/dist/a2a/types.d.ts.map +1 -0
- package/dist/a2a/types.js +0 -0
- package/dist/approval/approval-coordinator.cjs +87 -0
- package/dist/approval/approval-coordinator.d.ts +52 -0
- package/dist/approval/approval-coordinator.d.ts.map +1 -0
- package/dist/approval/approval-coordinator.js +63 -0
- package/dist/approval/manual-approval-handler.cjs +100 -0
- package/dist/approval/manual-approval-handler.d.ts +32 -0
- package/dist/approval/manual-approval-handler.d.ts.map +1 -0
- package/dist/approval/manual-approval-handler.js +76 -0
- package/dist/events/a2a-sse-subscriber.cjs +271 -0
- package/dist/events/a2a-sse-subscriber.d.ts +94 -0
- package/dist/events/a2a-sse-subscriber.d.ts.map +1 -0
- package/dist/events/a2a-sse-subscriber.js +247 -0
- package/dist/events/types.cjs +16 -0
- package/dist/events/types.d.ts +15 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +0 -0
- package/dist/events/webhook-subscriber.cjs +301 -0
- package/dist/events/webhook-subscriber.d.ts +64 -0
- package/dist/events/webhook-subscriber.d.ts.map +1 -0
- package/dist/events/webhook-subscriber.js +269 -0
- package/dist/events/webhook-types.cjs +16 -0
- package/dist/events/webhook-types.d.ts +91 -0
- package/dist/events/webhook-types.d.ts.map +1 -0
- package/dist/events/webhook-types.js +0 -0
- package/dist/hono/__tests__/test-fixtures.cjs +236 -0
- package/dist/hono/__tests__/test-fixtures.d.ts +65 -0
- package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -0
- package/dist/hono/__tests__/test-fixtures.js +197 -0
- package/dist/hono/index.cjs +166 -0
- package/dist/hono/index.d.ts +2783 -0
- package/dist/hono/index.d.ts.map +1 -0
- package/dist/hono/index.js +141 -0
- package/dist/hono/middleware/auth.cjs +75 -0
- package/dist/hono/middleware/auth.d.ts +3 -0
- package/dist/hono/middleware/auth.d.ts.map +1 -0
- package/dist/hono/middleware/auth.js +51 -0
- package/dist/hono/middleware/cors.cjs +57 -0
- package/dist/hono/middleware/cors.d.ts +9 -0
- package/dist/hono/middleware/cors.d.ts.map +1 -0
- package/dist/hono/middleware/cors.js +33 -0
- package/dist/hono/middleware/error.cjs +131 -0
- package/dist/hono/middleware/error.d.ts +5 -0
- package/dist/hono/middleware/error.d.ts.map +1 -0
- package/dist/hono/middleware/error.js +105 -0
- package/dist/hono/middleware/redaction.cjs +45 -0
- package/dist/hono/middleware/redaction.d.ts +4 -0
- package/dist/hono/middleware/redaction.d.ts.map +1 -0
- package/dist/hono/middleware/redaction.js +20 -0
- package/dist/hono/node/index.cjs +139 -0
- package/dist/hono/node/index.d.ts +19 -0
- package/dist/hono/node/index.d.ts.map +1 -0
- package/dist/hono/node/index.js +115 -0
- package/dist/hono/routes/a2a-jsonrpc.cjs +119 -0
- package/dist/hono/routes/a2a-jsonrpc.d.ts +46 -0
- package/dist/hono/routes/a2a-jsonrpc.d.ts.map +1 -0
- package/dist/hono/routes/a2a-jsonrpc.js +95 -0
- package/dist/hono/routes/a2a-tasks.cjs +315 -0
- package/dist/hono/routes/a2a-tasks.d.ts +530 -0
- package/dist/hono/routes/a2a-tasks.d.ts.map +1 -0
- package/dist/hono/routes/a2a-tasks.js +291 -0
- package/dist/hono/routes/a2a.cjs +36 -0
- package/dist/hono/routes/a2a.d.ts +4 -0
- package/dist/hono/routes/a2a.d.ts.map +1 -0
- package/dist/hono/routes/a2a.js +12 -0
- package/dist/hono/routes/agents.cjs +735 -0
- package/dist/hono/routes/agents.d.ts +650 -0
- package/dist/hono/routes/agents.d.ts.map +1 -0
- package/dist/hono/routes/agents.js +711 -0
- package/dist/hono/routes/approvals.cjs +125 -0
- package/dist/hono/routes/approvals.d.ts +89 -0
- package/dist/hono/routes/approvals.d.ts.map +1 -0
- package/dist/hono/routes/approvals.js +101 -0
- package/dist/hono/routes/greeting.cjs +60 -0
- package/dist/hono/routes/greeting.d.ts +19 -0
- package/dist/hono/routes/greeting.d.ts.map +1 -0
- package/dist/hono/routes/greeting.js +36 -0
- package/dist/hono/routes/health.cjs +45 -0
- package/dist/hono/routes/health.d.ts +17 -0
- package/dist/hono/routes/health.d.ts.map +1 -0
- package/dist/hono/routes/health.js +21 -0
- package/dist/hono/routes/llm.cjs +298 -0
- package/dist/hono/routes/llm.d.ts +294 -0
- package/dist/hono/routes/llm.d.ts.map +1 -0
- package/dist/hono/routes/llm.js +287 -0
- package/dist/hono/routes/mcp.cjs +356 -0
- package/dist/hono/routes/mcp.d.ts +246 -0
- package/dist/hono/routes/mcp.d.ts.map +1 -0
- package/dist/hono/routes/mcp.js +332 -0
- package/dist/hono/routes/memory.cjs +192 -0
- package/dist/hono/routes/memory.d.ts +146 -0
- package/dist/hono/routes/memory.d.ts.map +1 -0
- package/dist/hono/routes/memory.js +168 -0
- package/dist/hono/routes/messages.cjs +320 -0
- package/dist/hono/routes/messages.d.ts +163 -0
- package/dist/hono/routes/messages.d.ts.map +1 -0
- package/dist/hono/routes/messages.js +296 -0
- package/dist/hono/routes/prompts.cjs +228 -0
- package/dist/hono/routes/prompts.d.ts +150 -0
- package/dist/hono/routes/prompts.d.ts.map +1 -0
- package/dist/hono/routes/prompts.js +204 -0
- package/dist/hono/routes/resources.cjs +110 -0
- package/dist/hono/routes/resources.d.ts +76 -0
- package/dist/hono/routes/resources.d.ts.map +1 -0
- package/dist/hono/routes/resources.js +86 -0
- package/dist/hono/routes/search.cjs +109 -0
- package/dist/hono/routes/search.d.ts +137 -0
- package/dist/hono/routes/search.d.ts.map +1 -0
- package/dist/hono/routes/search.js +85 -0
- package/dist/hono/routes/sessions.cjs +366 -0
- package/dist/hono/routes/sessions.d.ts +229 -0
- package/dist/hono/routes/sessions.d.ts.map +1 -0
- package/dist/hono/routes/sessions.js +342 -0
- package/dist/hono/routes/webhooks.cjs +228 -0
- package/dist/hono/routes/webhooks.d.ts +127 -0
- package/dist/hono/routes/webhooks.d.ts.map +1 -0
- package/dist/hono/routes/webhooks.js +204 -0
- package/dist/hono/schemas/responses.cjs +276 -0
- package/dist/hono/schemas/responses.d.ts +1418 -0
- package/dist/hono/schemas/responses.d.ts.map +1 -0
- package/dist/hono/schemas/responses.js +227 -0
- package/dist/hono/types.cjs +16 -0
- package/dist/hono/types.d.ts +6 -0
- package/dist/hono/types.d.ts.map +1 -0
- package/dist/hono/types.js +0 -0
- package/dist/index.cjs +38 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/mcp/mcp-handler.cjs +145 -0
- package/dist/mcp/mcp-handler.d.ts +14 -0
- package/dist/mcp/mcp-handler.d.ts.map +1 -0
- package/dist/mcp/mcp-handler.js +118 -0
- package/package.json +59 -0
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A2A REST Task API (Compliant with A2A Protocol v0.3.0)
|
|
3
|
+
*
|
|
4
|
+
* RESTful HTTP+JSON endpoints for A2A Protocol task management.
|
|
5
|
+
* Follows the /v1/ URL pattern per A2A specification.
|
|
6
|
+
*
|
|
7
|
+
* Endpoint mappings per spec:
|
|
8
|
+
* - POST /v1/message:send → message/send
|
|
9
|
+
* - GET /v1/tasks/{id} → tasks/get
|
|
10
|
+
* - GET /v1/tasks → tasks/list
|
|
11
|
+
* - POST /v1/tasks/{id}:cancel → tasks/cancel
|
|
12
|
+
*/
|
|
13
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
14
|
+
import type { DextoAgent } from '@dexto/core';
|
|
15
|
+
import type { A2ASseEventSubscriber } from '../../events/a2a-sse-subscriber.js';
|
|
16
|
+
/**
|
|
17
|
+
* Create A2A REST Task router
|
|
18
|
+
*
|
|
19
|
+
* Exposes RESTful endpoints for A2A task management per v0.3.0 spec.
|
|
20
|
+
*
|
|
21
|
+
* Endpoints:
|
|
22
|
+
* - POST /v1/message:send - Send message to agent
|
|
23
|
+
* - POST /v1/message:stream - Send message with SSE streaming
|
|
24
|
+
* - GET /v1/tasks/{id} - Get task
|
|
25
|
+
* - GET /v1/tasks - List tasks
|
|
26
|
+
* - POST /v1/tasks/{id}:cancel - Cancel task
|
|
27
|
+
*
|
|
28
|
+
* @param getAgent Function to get current DextoAgent instance
|
|
29
|
+
* @param sseSubscriber SSE event subscriber for streaming
|
|
30
|
+
* @returns OpenAPIHono router with REST task endpoints
|
|
31
|
+
*/
|
|
32
|
+
export declare function createA2ATasksRouter(getAgent: () => DextoAgent, sseSubscriber: A2ASseEventSubscriber): OpenAPIHono<import("hono").Env, {
|
|
33
|
+
"/v1/message:send": {
|
|
34
|
+
$post: {
|
|
35
|
+
input: {
|
|
36
|
+
json: {
|
|
37
|
+
message: {
|
|
38
|
+
role: "user" | "agent";
|
|
39
|
+
kind: "message";
|
|
40
|
+
parts: ({
|
|
41
|
+
text: string;
|
|
42
|
+
kind: "text";
|
|
43
|
+
metadata?: Record<string, any> | undefined;
|
|
44
|
+
} | {
|
|
45
|
+
file: {
|
|
46
|
+
bytes: string;
|
|
47
|
+
mimeType?: string | undefined;
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
} | {
|
|
50
|
+
uri: string;
|
|
51
|
+
mimeType?: string | undefined;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
kind: "file";
|
|
55
|
+
metadata?: Record<string, any> | undefined;
|
|
56
|
+
} | {
|
|
57
|
+
data: Record<string, any>;
|
|
58
|
+
kind: "data";
|
|
59
|
+
metadata?: Record<string, any> | undefined;
|
|
60
|
+
})[];
|
|
61
|
+
messageId: string;
|
|
62
|
+
metadata?: Record<string, any> | undefined;
|
|
63
|
+
contextId?: string | undefined;
|
|
64
|
+
taskId?: string | undefined;
|
|
65
|
+
extensions?: string[] | undefined;
|
|
66
|
+
referenceTaskIds?: string[] | undefined;
|
|
67
|
+
};
|
|
68
|
+
metadata?: Record<string, any> | undefined;
|
|
69
|
+
configuration?: {
|
|
70
|
+
blocking?: boolean | undefined;
|
|
71
|
+
acceptedOutputModes?: string[] | undefined;
|
|
72
|
+
historyLength?: number | undefined;
|
|
73
|
+
pushNotificationConfig?: {
|
|
74
|
+
url: string;
|
|
75
|
+
headers?: Record<string, string> | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
output: {
|
|
81
|
+
status: {
|
|
82
|
+
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | "auth-required";
|
|
83
|
+
message?: {
|
|
84
|
+
role: "user" | "agent";
|
|
85
|
+
kind: "message";
|
|
86
|
+
parts: ({
|
|
87
|
+
text: string;
|
|
88
|
+
kind: "text";
|
|
89
|
+
metadata?: {
|
|
90
|
+
[x: string]: any;
|
|
91
|
+
} | undefined;
|
|
92
|
+
} | {
|
|
93
|
+
file: {
|
|
94
|
+
bytes: string;
|
|
95
|
+
mimeType?: string | undefined;
|
|
96
|
+
name?: string | undefined;
|
|
97
|
+
} | {
|
|
98
|
+
uri: string;
|
|
99
|
+
mimeType?: string | undefined;
|
|
100
|
+
name?: string | undefined;
|
|
101
|
+
};
|
|
102
|
+
kind: "file";
|
|
103
|
+
metadata?: {
|
|
104
|
+
[x: string]: any;
|
|
105
|
+
} | undefined;
|
|
106
|
+
} | {
|
|
107
|
+
data: {
|
|
108
|
+
[x: string]: any;
|
|
109
|
+
};
|
|
110
|
+
kind: "data";
|
|
111
|
+
metadata?: {
|
|
112
|
+
[x: string]: any;
|
|
113
|
+
} | undefined;
|
|
114
|
+
})[];
|
|
115
|
+
messageId: string;
|
|
116
|
+
metadata?: {
|
|
117
|
+
[x: string]: any;
|
|
118
|
+
} | undefined;
|
|
119
|
+
contextId?: string | undefined;
|
|
120
|
+
taskId?: string | undefined;
|
|
121
|
+
extensions?: string[] | undefined;
|
|
122
|
+
referenceTaskIds?: string[] | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
timestamp?: string | undefined;
|
|
125
|
+
};
|
|
126
|
+
id: string;
|
|
127
|
+
kind: "task";
|
|
128
|
+
contextId: string;
|
|
129
|
+
metadata?: {
|
|
130
|
+
[x: string]: any;
|
|
131
|
+
} | undefined;
|
|
132
|
+
history?: {
|
|
133
|
+
role: "user" | "agent";
|
|
134
|
+
kind: "message";
|
|
135
|
+
parts: ({
|
|
136
|
+
text: string;
|
|
137
|
+
kind: "text";
|
|
138
|
+
metadata?: {
|
|
139
|
+
[x: string]: any;
|
|
140
|
+
} | undefined;
|
|
141
|
+
} | {
|
|
142
|
+
file: {
|
|
143
|
+
bytes: string;
|
|
144
|
+
mimeType?: string | undefined;
|
|
145
|
+
name?: string | undefined;
|
|
146
|
+
} | {
|
|
147
|
+
uri: string;
|
|
148
|
+
mimeType?: string | undefined;
|
|
149
|
+
name?: string | undefined;
|
|
150
|
+
};
|
|
151
|
+
kind: "file";
|
|
152
|
+
metadata?: {
|
|
153
|
+
[x: string]: any;
|
|
154
|
+
} | undefined;
|
|
155
|
+
} | {
|
|
156
|
+
data: {
|
|
157
|
+
[x: string]: any;
|
|
158
|
+
};
|
|
159
|
+
kind: "data";
|
|
160
|
+
metadata?: {
|
|
161
|
+
[x: string]: any;
|
|
162
|
+
} | undefined;
|
|
163
|
+
})[];
|
|
164
|
+
messageId: string;
|
|
165
|
+
metadata?: {
|
|
166
|
+
[x: string]: any;
|
|
167
|
+
} | undefined;
|
|
168
|
+
contextId?: string | undefined;
|
|
169
|
+
taskId?: string | undefined;
|
|
170
|
+
extensions?: string[] | undefined;
|
|
171
|
+
referenceTaskIds?: string[] | undefined;
|
|
172
|
+
}[] | undefined;
|
|
173
|
+
artifacts?: any[] | undefined;
|
|
174
|
+
};
|
|
175
|
+
outputFormat: "json";
|
|
176
|
+
status: 200;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
} & {
|
|
180
|
+
"/v1/tasks": {
|
|
181
|
+
$get: {
|
|
182
|
+
input: {
|
|
183
|
+
query: {
|
|
184
|
+
status?: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | "auth-required" | undefined;
|
|
185
|
+
contextId?: string | undefined;
|
|
186
|
+
pageSize?: string | undefined;
|
|
187
|
+
historyLength?: string | undefined;
|
|
188
|
+
pageToken?: string | undefined;
|
|
189
|
+
lastUpdatedAfter?: string | undefined;
|
|
190
|
+
includeArtifacts?: string | undefined;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
output: {
|
|
194
|
+
tasks: {
|
|
195
|
+
status: {
|
|
196
|
+
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | "auth-required";
|
|
197
|
+
message?: {
|
|
198
|
+
role: "user" | "agent";
|
|
199
|
+
kind: "message";
|
|
200
|
+
parts: ({
|
|
201
|
+
text: string;
|
|
202
|
+
kind: "text";
|
|
203
|
+
metadata?: {
|
|
204
|
+
[x: string]: any;
|
|
205
|
+
} | undefined;
|
|
206
|
+
} | {
|
|
207
|
+
file: {
|
|
208
|
+
bytes: string;
|
|
209
|
+
mimeType?: string | undefined;
|
|
210
|
+
name?: string | undefined;
|
|
211
|
+
} | {
|
|
212
|
+
uri: string;
|
|
213
|
+
mimeType?: string | undefined;
|
|
214
|
+
name?: string | undefined;
|
|
215
|
+
};
|
|
216
|
+
kind: "file";
|
|
217
|
+
metadata?: {
|
|
218
|
+
[x: string]: any;
|
|
219
|
+
} | undefined;
|
|
220
|
+
} | {
|
|
221
|
+
data: {
|
|
222
|
+
[x: string]: any;
|
|
223
|
+
};
|
|
224
|
+
kind: "data";
|
|
225
|
+
metadata?: {
|
|
226
|
+
[x: string]: any;
|
|
227
|
+
} | undefined;
|
|
228
|
+
})[];
|
|
229
|
+
messageId: string;
|
|
230
|
+
metadata?: {
|
|
231
|
+
[x: string]: any;
|
|
232
|
+
} | undefined;
|
|
233
|
+
contextId?: string | undefined;
|
|
234
|
+
taskId?: string | undefined;
|
|
235
|
+
extensions?: string[] | undefined;
|
|
236
|
+
referenceTaskIds?: string[] | undefined;
|
|
237
|
+
} | undefined;
|
|
238
|
+
timestamp?: string | undefined;
|
|
239
|
+
};
|
|
240
|
+
id: string;
|
|
241
|
+
kind: "task";
|
|
242
|
+
contextId: string;
|
|
243
|
+
metadata?: {
|
|
244
|
+
[x: string]: any;
|
|
245
|
+
} | undefined;
|
|
246
|
+
history?: {
|
|
247
|
+
role: "user" | "agent";
|
|
248
|
+
kind: "message";
|
|
249
|
+
parts: ({
|
|
250
|
+
text: string;
|
|
251
|
+
kind: "text";
|
|
252
|
+
metadata?: {
|
|
253
|
+
[x: string]: any;
|
|
254
|
+
} | undefined;
|
|
255
|
+
} | {
|
|
256
|
+
file: {
|
|
257
|
+
bytes: string;
|
|
258
|
+
mimeType?: string | undefined;
|
|
259
|
+
name?: string | undefined;
|
|
260
|
+
} | {
|
|
261
|
+
uri: string;
|
|
262
|
+
mimeType?: string | undefined;
|
|
263
|
+
name?: string | undefined;
|
|
264
|
+
};
|
|
265
|
+
kind: "file";
|
|
266
|
+
metadata?: {
|
|
267
|
+
[x: string]: any;
|
|
268
|
+
} | undefined;
|
|
269
|
+
} | {
|
|
270
|
+
data: {
|
|
271
|
+
[x: string]: any;
|
|
272
|
+
};
|
|
273
|
+
kind: "data";
|
|
274
|
+
metadata?: {
|
|
275
|
+
[x: string]: any;
|
|
276
|
+
} | undefined;
|
|
277
|
+
})[];
|
|
278
|
+
messageId: string;
|
|
279
|
+
metadata?: {
|
|
280
|
+
[x: string]: any;
|
|
281
|
+
} | undefined;
|
|
282
|
+
contextId?: string | undefined;
|
|
283
|
+
taskId?: string | undefined;
|
|
284
|
+
extensions?: string[] | undefined;
|
|
285
|
+
referenceTaskIds?: string[] | undefined;
|
|
286
|
+
}[] | undefined;
|
|
287
|
+
artifacts?: any[] | undefined;
|
|
288
|
+
}[];
|
|
289
|
+
totalSize: number;
|
|
290
|
+
pageSize: number;
|
|
291
|
+
nextPageToken: string;
|
|
292
|
+
};
|
|
293
|
+
outputFormat: "json";
|
|
294
|
+
status: 200;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
} & {
|
|
298
|
+
"/v1/tasks/:id": {
|
|
299
|
+
$get: {
|
|
300
|
+
input: {
|
|
301
|
+
param: {
|
|
302
|
+
id: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
output: {};
|
|
306
|
+
outputFormat: string;
|
|
307
|
+
status: 404;
|
|
308
|
+
} | {
|
|
309
|
+
input: {
|
|
310
|
+
param: {
|
|
311
|
+
id: string;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
output: {
|
|
315
|
+
status: {
|
|
316
|
+
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | "auth-required";
|
|
317
|
+
message?: {
|
|
318
|
+
role: "user" | "agent";
|
|
319
|
+
kind: "message";
|
|
320
|
+
parts: ({
|
|
321
|
+
text: string;
|
|
322
|
+
kind: "text";
|
|
323
|
+
metadata?: {
|
|
324
|
+
[x: string]: any;
|
|
325
|
+
} | undefined;
|
|
326
|
+
} | {
|
|
327
|
+
file: {
|
|
328
|
+
bytes: string;
|
|
329
|
+
mimeType?: string | undefined;
|
|
330
|
+
name?: string | undefined;
|
|
331
|
+
} | {
|
|
332
|
+
uri: string;
|
|
333
|
+
mimeType?: string | undefined;
|
|
334
|
+
name?: string | undefined;
|
|
335
|
+
};
|
|
336
|
+
kind: "file";
|
|
337
|
+
metadata?: {
|
|
338
|
+
[x: string]: any;
|
|
339
|
+
} | undefined;
|
|
340
|
+
} | {
|
|
341
|
+
data: {
|
|
342
|
+
[x: string]: any;
|
|
343
|
+
};
|
|
344
|
+
kind: "data";
|
|
345
|
+
metadata?: {
|
|
346
|
+
[x: string]: any;
|
|
347
|
+
} | undefined;
|
|
348
|
+
})[];
|
|
349
|
+
messageId: string;
|
|
350
|
+
metadata?: {
|
|
351
|
+
[x: string]: any;
|
|
352
|
+
} | undefined;
|
|
353
|
+
contextId?: string | undefined;
|
|
354
|
+
taskId?: string | undefined;
|
|
355
|
+
extensions?: string[] | undefined;
|
|
356
|
+
referenceTaskIds?: string[] | undefined;
|
|
357
|
+
} | undefined;
|
|
358
|
+
timestamp?: string | undefined;
|
|
359
|
+
};
|
|
360
|
+
id: string;
|
|
361
|
+
kind: "task";
|
|
362
|
+
contextId: string;
|
|
363
|
+
metadata?: {
|
|
364
|
+
[x: string]: any;
|
|
365
|
+
} | undefined;
|
|
366
|
+
history?: {
|
|
367
|
+
role: "user" | "agent";
|
|
368
|
+
kind: "message";
|
|
369
|
+
parts: ({
|
|
370
|
+
text: string;
|
|
371
|
+
kind: "text";
|
|
372
|
+
metadata?: {
|
|
373
|
+
[x: string]: any;
|
|
374
|
+
} | undefined;
|
|
375
|
+
} | {
|
|
376
|
+
file: {
|
|
377
|
+
bytes: string;
|
|
378
|
+
mimeType?: string | undefined;
|
|
379
|
+
name?: string | undefined;
|
|
380
|
+
} | {
|
|
381
|
+
uri: string;
|
|
382
|
+
mimeType?: string | undefined;
|
|
383
|
+
name?: string | undefined;
|
|
384
|
+
};
|
|
385
|
+
kind: "file";
|
|
386
|
+
metadata?: {
|
|
387
|
+
[x: string]: any;
|
|
388
|
+
} | undefined;
|
|
389
|
+
} | {
|
|
390
|
+
data: {
|
|
391
|
+
[x: string]: any;
|
|
392
|
+
};
|
|
393
|
+
kind: "data";
|
|
394
|
+
metadata?: {
|
|
395
|
+
[x: string]: any;
|
|
396
|
+
} | undefined;
|
|
397
|
+
})[];
|
|
398
|
+
messageId: string;
|
|
399
|
+
metadata?: {
|
|
400
|
+
[x: string]: any;
|
|
401
|
+
} | undefined;
|
|
402
|
+
contextId?: string | undefined;
|
|
403
|
+
taskId?: string | undefined;
|
|
404
|
+
extensions?: string[] | undefined;
|
|
405
|
+
referenceTaskIds?: string[] | undefined;
|
|
406
|
+
}[] | undefined;
|
|
407
|
+
artifacts?: any[] | undefined;
|
|
408
|
+
};
|
|
409
|
+
outputFormat: "json";
|
|
410
|
+
status: 200;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
} & {
|
|
414
|
+
"/v1/tasks/:id:cancel": {
|
|
415
|
+
$post: {
|
|
416
|
+
input: {
|
|
417
|
+
param: {
|
|
418
|
+
id: string;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
output: {};
|
|
422
|
+
outputFormat: string;
|
|
423
|
+
status: 404;
|
|
424
|
+
} | {
|
|
425
|
+
input: {
|
|
426
|
+
param: {
|
|
427
|
+
id: string;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
output: {
|
|
431
|
+
status: {
|
|
432
|
+
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | "auth-required";
|
|
433
|
+
message?: {
|
|
434
|
+
role: "user" | "agent";
|
|
435
|
+
kind: "message";
|
|
436
|
+
parts: ({
|
|
437
|
+
text: string;
|
|
438
|
+
kind: "text";
|
|
439
|
+
metadata?: {
|
|
440
|
+
[x: string]: any;
|
|
441
|
+
} | undefined;
|
|
442
|
+
} | {
|
|
443
|
+
file: {
|
|
444
|
+
bytes: string;
|
|
445
|
+
mimeType?: string | undefined;
|
|
446
|
+
name?: string | undefined;
|
|
447
|
+
} | {
|
|
448
|
+
uri: string;
|
|
449
|
+
mimeType?: string | undefined;
|
|
450
|
+
name?: string | undefined;
|
|
451
|
+
};
|
|
452
|
+
kind: "file";
|
|
453
|
+
metadata?: {
|
|
454
|
+
[x: string]: any;
|
|
455
|
+
} | undefined;
|
|
456
|
+
} | {
|
|
457
|
+
data: {
|
|
458
|
+
[x: string]: any;
|
|
459
|
+
};
|
|
460
|
+
kind: "data";
|
|
461
|
+
metadata?: {
|
|
462
|
+
[x: string]: any;
|
|
463
|
+
} | undefined;
|
|
464
|
+
})[];
|
|
465
|
+
messageId: string;
|
|
466
|
+
metadata?: {
|
|
467
|
+
[x: string]: any;
|
|
468
|
+
} | undefined;
|
|
469
|
+
contextId?: string | undefined;
|
|
470
|
+
taskId?: string | undefined;
|
|
471
|
+
extensions?: string[] | undefined;
|
|
472
|
+
referenceTaskIds?: string[] | undefined;
|
|
473
|
+
} | undefined;
|
|
474
|
+
timestamp?: string | undefined;
|
|
475
|
+
};
|
|
476
|
+
id: string;
|
|
477
|
+
kind: "task";
|
|
478
|
+
contextId: string;
|
|
479
|
+
metadata?: {
|
|
480
|
+
[x: string]: any;
|
|
481
|
+
} | undefined;
|
|
482
|
+
history?: {
|
|
483
|
+
role: "user" | "agent";
|
|
484
|
+
kind: "message";
|
|
485
|
+
parts: ({
|
|
486
|
+
text: string;
|
|
487
|
+
kind: "text";
|
|
488
|
+
metadata?: {
|
|
489
|
+
[x: string]: any;
|
|
490
|
+
} | undefined;
|
|
491
|
+
} | {
|
|
492
|
+
file: {
|
|
493
|
+
bytes: string;
|
|
494
|
+
mimeType?: string | undefined;
|
|
495
|
+
name?: string | undefined;
|
|
496
|
+
} | {
|
|
497
|
+
uri: string;
|
|
498
|
+
mimeType?: string | undefined;
|
|
499
|
+
name?: string | undefined;
|
|
500
|
+
};
|
|
501
|
+
kind: "file";
|
|
502
|
+
metadata?: {
|
|
503
|
+
[x: string]: any;
|
|
504
|
+
} | undefined;
|
|
505
|
+
} | {
|
|
506
|
+
data: {
|
|
507
|
+
[x: string]: any;
|
|
508
|
+
};
|
|
509
|
+
kind: "data";
|
|
510
|
+
metadata?: {
|
|
511
|
+
[x: string]: any;
|
|
512
|
+
} | undefined;
|
|
513
|
+
})[];
|
|
514
|
+
messageId: string;
|
|
515
|
+
metadata?: {
|
|
516
|
+
[x: string]: any;
|
|
517
|
+
} | undefined;
|
|
518
|
+
contextId?: string | undefined;
|
|
519
|
+
taskId?: string | undefined;
|
|
520
|
+
extensions?: string[] | undefined;
|
|
521
|
+
referenceTaskIds?: string[] | undefined;
|
|
522
|
+
}[] | undefined;
|
|
523
|
+
artifacts?: any[] | undefined;
|
|
524
|
+
};
|
|
525
|
+
outputFormat: "json";
|
|
526
|
+
status: 200;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
}, "/">;
|
|
530
|
+
//# sourceMappingURL=a2a-tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a-tasks.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/a2a-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AA4KhF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,MAAM,UAAU,EAC1B,aAAa,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwNvC"}
|