@aramisfa/openclaw-a2a-outbound 0.1.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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -0
  3. package/dist/ajv-validator.d.ts +6 -0
  4. package/dist/ajv-validator.d.ts.map +1 -0
  5. package/dist/ajv-validator.js +28 -0
  6. package/dist/ajv-validator.js.map +1 -0
  7. package/dist/config.d.ts +24 -0
  8. package/dist/config.d.ts.map +1 -0
  9. package/dist/config.js +204 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/constants.d.ts +5 -0
  12. package/dist/constants.d.ts.map +1 -0
  13. package/dist/constants.js +4 -0
  14. package/dist/constants.js.map +1 -0
  15. package/dist/errors.d.ts +19 -0
  16. package/dist/errors.d.ts.map +1 -0
  17. package/dist/errors.js +111 -0
  18. package/dist/errors.js.map +1 -0
  19. package/dist/index.d.ts +10 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +44 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/logging.d.ts +19 -0
  24. package/dist/logging.d.ts.map +1 -0
  25. package/dist/logging.js +19 -0
  26. package/dist/logging.js.map +1 -0
  27. package/dist/plugin-config.d.ts +5 -0
  28. package/dist/plugin-config.d.ts.map +1 -0
  29. package/dist/plugin-config.js +89 -0
  30. package/dist/plugin-config.js.map +1 -0
  31. package/dist/result-shape.d.ts +36 -0
  32. package/dist/result-shape.d.ts.map +1 -0
  33. package/dist/result-shape.js +83 -0
  34. package/dist/result-shape.js.map +1 -0
  35. package/dist/schemas.d.ts +665 -0
  36. package/dist/schemas.d.ts.map +1 -0
  37. package/dist/schemas.js +247 -0
  38. package/dist/schemas.js.map +1 -0
  39. package/dist/sdk-client-pool.d.ts +34 -0
  40. package/dist/sdk-client-pool.d.ts.map +1 -0
  41. package/dist/sdk-client-pool.js +120 -0
  42. package/dist/sdk-client-pool.js.map +1 -0
  43. package/dist/service.d.ts +21 -0
  44. package/dist/service.d.ts.map +1 -0
  45. package/dist/service.js +143 -0
  46. package/dist/service.js.map +1 -0
  47. package/openclaw.plugin.json +61 -0
  48. package/package.json +68 -0
@@ -0,0 +1,665 @@
1
+ import type { Message, MessageSendParams } from "@a2a-js/sdk";
2
+ import { type A2ATransport } from "./constants.js";
3
+ export declare const DELEGATE_INPUT_SCHEMA: {
4
+ type: string;
5
+ additionalProperties: boolean;
6
+ properties: {
7
+ target: {
8
+ type: string;
9
+ additionalProperties: boolean;
10
+ properties: {
11
+ baseUrl: {
12
+ type: string;
13
+ minLength: number;
14
+ format: string;
15
+ pattern: string;
16
+ description: string;
17
+ };
18
+ cardPath: {
19
+ type: string;
20
+ minLength: number;
21
+ description: string;
22
+ };
23
+ preferredTransports: {
24
+ type: string;
25
+ items: {
26
+ type: string;
27
+ enum: readonly ["JSONRPC", "HTTP+JSON", "GRPC"];
28
+ };
29
+ description: string;
30
+ };
31
+ };
32
+ required: string[];
33
+ };
34
+ request: {
35
+ type: string;
36
+ additionalProperties: boolean;
37
+ properties: {
38
+ message: {
39
+ description: string;
40
+ type: string;
41
+ additionalProperties: boolean;
42
+ properties: {
43
+ kind: {
44
+ type: string;
45
+ enum: string[];
46
+ };
47
+ messageId: {
48
+ type: string;
49
+ minLength: number;
50
+ };
51
+ role: {
52
+ type: string;
53
+ enum: readonly ["user", "agent"];
54
+ };
55
+ parts: {
56
+ type: string;
57
+ items: {
58
+ oneOf: ({
59
+ type: string;
60
+ additionalProperties: boolean;
61
+ properties: {
62
+ kind: {
63
+ type: string;
64
+ enum: string[];
65
+ };
66
+ text: {
67
+ type: string;
68
+ };
69
+ metadata: {
70
+ type: string;
71
+ additionalProperties: boolean;
72
+ };
73
+ };
74
+ required: string[];
75
+ } | {
76
+ type: string;
77
+ additionalProperties: boolean;
78
+ properties: {
79
+ kind: {
80
+ type: string;
81
+ enum: string[];
82
+ };
83
+ file: {
84
+ type: string;
85
+ additionalProperties: boolean;
86
+ properties: {
87
+ uri: {
88
+ type: string;
89
+ minLength: number;
90
+ };
91
+ bytes: {
92
+ type: string;
93
+ minLength: number;
94
+ };
95
+ name: {
96
+ type: string;
97
+ };
98
+ mimeType: {
99
+ type: string;
100
+ };
101
+ };
102
+ anyOf: {
103
+ required: string[];
104
+ }[];
105
+ };
106
+ metadata: {
107
+ type: string;
108
+ additionalProperties: boolean;
109
+ };
110
+ };
111
+ required: string[];
112
+ } | {
113
+ type: string;
114
+ additionalProperties: boolean;
115
+ properties: {
116
+ kind: {
117
+ type: string;
118
+ enum: string[];
119
+ };
120
+ data: {
121
+ type: string;
122
+ additionalProperties: boolean;
123
+ };
124
+ metadata: {
125
+ type: string;
126
+ additionalProperties: boolean;
127
+ };
128
+ };
129
+ required: string[];
130
+ })[];
131
+ };
132
+ };
133
+ contextId: {
134
+ type: string;
135
+ minLength: number;
136
+ };
137
+ taskId: {
138
+ type: string;
139
+ minLength: number;
140
+ };
141
+ extensions: {
142
+ type: string;
143
+ items: {
144
+ type: string;
145
+ };
146
+ };
147
+ referenceTaskIds: {
148
+ type: string;
149
+ items: {
150
+ type: string;
151
+ };
152
+ };
153
+ metadata: {
154
+ type: string;
155
+ additionalProperties: boolean;
156
+ };
157
+ };
158
+ required: string[];
159
+ };
160
+ timeoutMs: {
161
+ type: string;
162
+ minimum: number;
163
+ description: string;
164
+ };
165
+ serviceParameters: {
166
+ type: string;
167
+ additionalProperties: {
168
+ type: string;
169
+ };
170
+ description: string;
171
+ };
172
+ metadata: {
173
+ type: string;
174
+ additionalProperties: boolean;
175
+ description: string;
176
+ };
177
+ };
178
+ required: string[];
179
+ };
180
+ };
181
+ required: string[];
182
+ };
183
+ export declare const STATUS_INPUT_SCHEMA: {
184
+ type: string;
185
+ additionalProperties: boolean;
186
+ properties: {
187
+ target: {
188
+ type: string;
189
+ additionalProperties: boolean;
190
+ properties: {
191
+ baseUrl: {
192
+ type: string;
193
+ minLength: number;
194
+ format: string;
195
+ pattern: string;
196
+ description: string;
197
+ };
198
+ cardPath: {
199
+ type: string;
200
+ minLength: number;
201
+ description: string;
202
+ };
203
+ preferredTransports: {
204
+ type: string;
205
+ items: {
206
+ type: string;
207
+ enum: readonly ["JSONRPC", "HTTP+JSON", "GRPC"];
208
+ };
209
+ description: string;
210
+ };
211
+ };
212
+ required: string[];
213
+ };
214
+ request: {
215
+ type: string;
216
+ additionalProperties: boolean;
217
+ properties: {
218
+ taskId: {
219
+ type: string;
220
+ minLength: number;
221
+ description: string;
222
+ };
223
+ historyLength: {
224
+ type: string;
225
+ minimum: number;
226
+ description: string;
227
+ };
228
+ timeoutMs: {
229
+ type: string;
230
+ minimum: number;
231
+ description: string;
232
+ };
233
+ serviceParameters: {
234
+ type: string;
235
+ additionalProperties: {
236
+ type: string;
237
+ };
238
+ description: string;
239
+ };
240
+ };
241
+ required: string[];
242
+ };
243
+ };
244
+ required: string[];
245
+ };
246
+ export declare const CANCEL_INPUT_SCHEMA: {
247
+ type: string;
248
+ additionalProperties: boolean;
249
+ properties: {
250
+ target: {
251
+ type: string;
252
+ additionalProperties: boolean;
253
+ properties: {
254
+ baseUrl: {
255
+ type: string;
256
+ minLength: number;
257
+ format: string;
258
+ pattern: string;
259
+ description: string;
260
+ };
261
+ cardPath: {
262
+ type: string;
263
+ minLength: number;
264
+ description: string;
265
+ };
266
+ preferredTransports: {
267
+ type: string;
268
+ items: {
269
+ type: string;
270
+ enum: readonly ["JSONRPC", "HTTP+JSON", "GRPC"];
271
+ };
272
+ description: string;
273
+ };
274
+ };
275
+ required: string[];
276
+ };
277
+ request: {
278
+ type: string;
279
+ additionalProperties: boolean;
280
+ properties: {
281
+ taskId: {
282
+ type: string;
283
+ minLength: number;
284
+ description: string;
285
+ };
286
+ timeoutMs: {
287
+ type: string;
288
+ minimum: number;
289
+ description: string;
290
+ };
291
+ serviceParameters: {
292
+ type: string;
293
+ additionalProperties: {
294
+ type: string;
295
+ };
296
+ description: string;
297
+ };
298
+ };
299
+ required: string[];
300
+ };
301
+ };
302
+ required: string[];
303
+ };
304
+ export type ToolDefinition = {
305
+ name: string;
306
+ label: string;
307
+ description: string;
308
+ parameters: Record<string, unknown>;
309
+ };
310
+ export declare const TOOL_DEFINITIONS: {
311
+ readonly a2a_delegate: {
312
+ readonly name: "a2a_delegate";
313
+ readonly label: "A2A Delegate";
314
+ readonly description: "Delegate a request to an external A2A agent.";
315
+ readonly parameters: {
316
+ type: string;
317
+ additionalProperties: boolean;
318
+ properties: {
319
+ target: {
320
+ type: string;
321
+ additionalProperties: boolean;
322
+ properties: {
323
+ baseUrl: {
324
+ type: string;
325
+ minLength: number;
326
+ format: string;
327
+ pattern: string;
328
+ description: string;
329
+ };
330
+ cardPath: {
331
+ type: string;
332
+ minLength: number;
333
+ description: string;
334
+ };
335
+ preferredTransports: {
336
+ type: string;
337
+ items: {
338
+ type: string;
339
+ enum: readonly ["JSONRPC", "HTTP+JSON", "GRPC"];
340
+ };
341
+ description: string;
342
+ };
343
+ };
344
+ required: string[];
345
+ };
346
+ request: {
347
+ type: string;
348
+ additionalProperties: boolean;
349
+ properties: {
350
+ message: {
351
+ description: string;
352
+ type: string;
353
+ additionalProperties: boolean;
354
+ properties: {
355
+ kind: {
356
+ type: string;
357
+ enum: string[];
358
+ };
359
+ messageId: {
360
+ type: string;
361
+ minLength: number;
362
+ };
363
+ role: {
364
+ type: string;
365
+ enum: readonly ["user", "agent"];
366
+ };
367
+ parts: {
368
+ type: string;
369
+ items: {
370
+ oneOf: ({
371
+ type: string;
372
+ additionalProperties: boolean;
373
+ properties: {
374
+ kind: {
375
+ type: string;
376
+ enum: string[];
377
+ };
378
+ text: {
379
+ type: string;
380
+ };
381
+ metadata: {
382
+ type: string;
383
+ additionalProperties: boolean;
384
+ };
385
+ };
386
+ required: string[];
387
+ } | {
388
+ type: string;
389
+ additionalProperties: boolean;
390
+ properties: {
391
+ kind: {
392
+ type: string;
393
+ enum: string[];
394
+ };
395
+ file: {
396
+ type: string;
397
+ additionalProperties: boolean;
398
+ properties: {
399
+ uri: {
400
+ type: string;
401
+ minLength: number;
402
+ };
403
+ bytes: {
404
+ type: string;
405
+ minLength: number;
406
+ };
407
+ name: {
408
+ type: string;
409
+ };
410
+ mimeType: {
411
+ type: string;
412
+ };
413
+ };
414
+ anyOf: {
415
+ required: string[];
416
+ }[];
417
+ };
418
+ metadata: {
419
+ type: string;
420
+ additionalProperties: boolean;
421
+ };
422
+ };
423
+ required: string[];
424
+ } | {
425
+ type: string;
426
+ additionalProperties: boolean;
427
+ properties: {
428
+ kind: {
429
+ type: string;
430
+ enum: string[];
431
+ };
432
+ data: {
433
+ type: string;
434
+ additionalProperties: boolean;
435
+ };
436
+ metadata: {
437
+ type: string;
438
+ additionalProperties: boolean;
439
+ };
440
+ };
441
+ required: string[];
442
+ })[];
443
+ };
444
+ };
445
+ contextId: {
446
+ type: string;
447
+ minLength: number;
448
+ };
449
+ taskId: {
450
+ type: string;
451
+ minLength: number;
452
+ };
453
+ extensions: {
454
+ type: string;
455
+ items: {
456
+ type: string;
457
+ };
458
+ };
459
+ referenceTaskIds: {
460
+ type: string;
461
+ items: {
462
+ type: string;
463
+ };
464
+ };
465
+ metadata: {
466
+ type: string;
467
+ additionalProperties: boolean;
468
+ };
469
+ };
470
+ required: string[];
471
+ };
472
+ timeoutMs: {
473
+ type: string;
474
+ minimum: number;
475
+ description: string;
476
+ };
477
+ serviceParameters: {
478
+ type: string;
479
+ additionalProperties: {
480
+ type: string;
481
+ };
482
+ description: string;
483
+ };
484
+ metadata: {
485
+ type: string;
486
+ additionalProperties: boolean;
487
+ description: string;
488
+ };
489
+ };
490
+ required: string[];
491
+ };
492
+ };
493
+ required: string[];
494
+ };
495
+ };
496
+ readonly a2a_task_status: {
497
+ readonly name: "a2a_task_status";
498
+ readonly label: "A2A Task Status";
499
+ readonly description: "Fetch status for an external A2A task.";
500
+ readonly parameters: {
501
+ type: string;
502
+ additionalProperties: boolean;
503
+ properties: {
504
+ target: {
505
+ type: string;
506
+ additionalProperties: boolean;
507
+ properties: {
508
+ baseUrl: {
509
+ type: string;
510
+ minLength: number;
511
+ format: string;
512
+ pattern: string;
513
+ description: string;
514
+ };
515
+ cardPath: {
516
+ type: string;
517
+ minLength: number;
518
+ description: string;
519
+ };
520
+ preferredTransports: {
521
+ type: string;
522
+ items: {
523
+ type: string;
524
+ enum: readonly ["JSONRPC", "HTTP+JSON", "GRPC"];
525
+ };
526
+ description: string;
527
+ };
528
+ };
529
+ required: string[];
530
+ };
531
+ request: {
532
+ type: string;
533
+ additionalProperties: boolean;
534
+ properties: {
535
+ taskId: {
536
+ type: string;
537
+ minLength: number;
538
+ description: string;
539
+ };
540
+ historyLength: {
541
+ type: string;
542
+ minimum: number;
543
+ description: string;
544
+ };
545
+ timeoutMs: {
546
+ type: string;
547
+ minimum: number;
548
+ description: string;
549
+ };
550
+ serviceParameters: {
551
+ type: string;
552
+ additionalProperties: {
553
+ type: string;
554
+ };
555
+ description: string;
556
+ };
557
+ };
558
+ required: string[];
559
+ };
560
+ };
561
+ required: string[];
562
+ };
563
+ };
564
+ readonly a2a_task_cancel: {
565
+ readonly name: "a2a_task_cancel";
566
+ readonly label: "A2A Task Cancel";
567
+ readonly description: "Request cancellation for an external A2A task.";
568
+ readonly parameters: {
569
+ type: string;
570
+ additionalProperties: boolean;
571
+ properties: {
572
+ target: {
573
+ type: string;
574
+ additionalProperties: boolean;
575
+ properties: {
576
+ baseUrl: {
577
+ type: string;
578
+ minLength: number;
579
+ format: string;
580
+ pattern: string;
581
+ description: string;
582
+ };
583
+ cardPath: {
584
+ type: string;
585
+ minLength: number;
586
+ description: string;
587
+ };
588
+ preferredTransports: {
589
+ type: string;
590
+ items: {
591
+ type: string;
592
+ enum: readonly ["JSONRPC", "HTTP+JSON", "GRPC"];
593
+ };
594
+ description: string;
595
+ };
596
+ };
597
+ required: string[];
598
+ };
599
+ request: {
600
+ type: string;
601
+ additionalProperties: boolean;
602
+ properties: {
603
+ taskId: {
604
+ type: string;
605
+ minLength: number;
606
+ description: string;
607
+ };
608
+ timeoutMs: {
609
+ type: string;
610
+ minimum: number;
611
+ description: string;
612
+ };
613
+ serviceParameters: {
614
+ type: string;
615
+ additionalProperties: {
616
+ type: string;
617
+ };
618
+ description: string;
619
+ };
620
+ };
621
+ required: string[];
622
+ };
623
+ };
624
+ required: string[];
625
+ };
626
+ };
627
+ };
628
+ export interface A2ATargetInput {
629
+ baseUrl: string;
630
+ cardPath?: string;
631
+ preferredTransports?: A2ATransport[];
632
+ }
633
+ export interface DelegateRequestInput {
634
+ message: Message;
635
+ timeoutMs?: number;
636
+ serviceParameters?: Record<string, string>;
637
+ metadata?: MessageSendParams["metadata"];
638
+ }
639
+ export interface StatusRequestInput {
640
+ taskId: string;
641
+ historyLength?: number;
642
+ timeoutMs?: number;
643
+ serviceParameters?: Record<string, string>;
644
+ }
645
+ export interface CancelRequestInput {
646
+ taskId: string;
647
+ timeoutMs?: number;
648
+ serviceParameters?: Record<string, string>;
649
+ }
650
+ export interface DelegateToolInput {
651
+ target: A2ATargetInput;
652
+ request: DelegateRequestInput;
653
+ }
654
+ export interface StatusToolInput {
655
+ target: A2ATargetInput;
656
+ request: StatusRequestInput;
657
+ }
658
+ export interface CancelToolInput {
659
+ target: A2ATargetInput;
660
+ request: CancelRequestInput;
661
+ }
662
+ export declare function validateDelegateInput(input: unknown): DelegateToolInput;
663
+ export declare function validateStatusInput(input: unknown): StatusToolInput;
664
+ export declare function validateCancelInput(input: unknown): CancelToolInput;
665
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAoHnE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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