@aramisfa/openclaw-a2a-outbound 0.1.2 → 0.2.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/README.md +261 -16
  2. package/dist/config.d.ts +17 -0
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +214 -8
  5. package/dist/config.js.map +1 -1
  6. package/dist/constants.d.ts +1 -1
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +1 -1
  9. package/dist/constants.js.map +1 -1
  10. package/dist/errors.d.ts +4 -0
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +37 -1
  13. package/dist/errors.js.map +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +44 -20
  17. package/dist/index.js.map +1 -1
  18. package/dist/request-normalization.d.ts +23 -0
  19. package/dist/request-normalization.d.ts.map +1 -0
  20. package/dist/request-normalization.js +109 -0
  21. package/dist/request-normalization.js.map +1 -0
  22. package/dist/result-shape.d.ts +68 -25
  23. package/dist/result-shape.d.ts.map +1 -1
  24. package/dist/result-shape.js +192 -59
  25. package/dist/result-shape.js.map +1 -1
  26. package/dist/schemas.d.ts +81 -779
  27. package/dist/schemas.d.ts.map +1 -1
  28. package/dist/schemas.js +308 -275
  29. package/dist/schemas.js.map +1 -1
  30. package/dist/sdk-client-pool.d.ts +8 -4
  31. package/dist/sdk-client-pool.d.ts.map +1 -1
  32. package/dist/sdk-client-pool.js +21 -1
  33. package/dist/sdk-client-pool.js.map +1 -1
  34. package/dist/service.d.ts +33 -4
  35. package/dist/service.d.ts.map +1 -1
  36. package/dist/service.js +381 -60
  37. package/dist/service.js.map +1 -1
  38. package/dist/target-catalog.d.ts +66 -0
  39. package/dist/target-catalog.d.ts.map +1 -0
  40. package/dist/target-catalog.js +309 -0
  41. package/dist/target-catalog.js.map +1 -0
  42. package/dist/task-handle-registry.d.ts +29 -0
  43. package/dist/task-handle-registry.d.ts.map +1 -0
  44. package/dist/task-handle-registry.js +141 -0
  45. package/dist/task-handle-registry.js.map +1 -0
  46. package/openclaw.plugin.json +68 -1
  47. package/package.json +2 -1
  48. package/skills/remote-agent/SKILL.md +93 -0
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: remote-agent
3
+ description: Delegate work to external A2A agents using the remote_agent tool.
4
+ metadata: {"openclaw": {"requires": {"config": ["plugins.entries.openclaw-a2a-outbound.enabled"]}}}
5
+ ---
6
+
7
+ # Remote Agent Delegation
8
+
9
+ Use the `remote_agent` tool to delegate work to external A2A-compatible agents and manage delegated tasks.
10
+
11
+ ## When to delegate
12
+
13
+ Delegate when:
14
+
15
+ - The task requires capabilities you do not have (e.g. code execution, web search, domain-specific APIs)
16
+ - The user explicitly asks to send work to an external agent
17
+ - A configured target agent is better suited for the request
18
+
19
+ Do not delegate when you can handle the request directly.
20
+
21
+ ## Tool
22
+
23
+ The `remote_agent` tool exposes five actions: `list_targets`, `send`, `watch`, `status`, `cancel`.
24
+
25
+ ## Choosing a target
26
+
27
+ Call `list_targets` first to discover available agents. Prefer `target_alias` over `target_url` — aliases are stable names configured by the user. If a default target is configured, you can omit `target_alias` from `send`.
28
+
29
+ ## Actions
30
+
31
+ ### list_targets
32
+
33
+ Discover configured targets.
34
+
35
+ ```json
36
+ { "action": "list_targets" }
37
+ ```
38
+
39
+ ### send
40
+
41
+ Send a request to a remote agent.
42
+
43
+ ```json
44
+ {
45
+ "action": "send",
46
+ "target_alias": "my-agent",
47
+ "input": "Summarize the latest quarterly report.",
48
+ "follow_updates": true
49
+ }
50
+ ```
51
+
52
+ - `input` (required): the user text to send.
53
+ - `target_alias`: configured target name. Omit when a default target exists.
54
+ - `follow_updates`: when `true`, streams updates and returns the full event log.
55
+ - `attachments`: optional array of file or data attachments.
56
+
57
+ ### status
58
+
59
+ Poll the current state of a delegated task.
60
+
61
+ ```json
62
+ { "action": "status", "task_handle": "rah_abc123" }
63
+ ```
64
+
65
+ ### watch
66
+
67
+ Subscribe to live updates from a running task.
68
+
69
+ ```json
70
+ { "action": "watch", "task_handle": "rah_abc123" }
71
+ ```
72
+
73
+ ### cancel
74
+
75
+ Cancel a running task.
76
+
77
+ ```json
78
+ { "action": "cancel", "task_handle": "rah_abc123" }
79
+ ```
80
+
81
+ ## Task handles
82
+
83
+ After a successful `send`, the result includes a `task_handle` (prefixed `rah_`). Always prefer `task_handle` over `target_alias + task_id` for follow-up actions — the handle encodes the target and task identity in one opaque token. Handles are process-local and expire after restart or TTL. If a handle expires, fall back to `target_alias` + `task_id`.
84
+
85
+ ## watch vs status
86
+
87
+ Use `watch` when the remote agent supports streaming and you want live incremental updates. Use `status` to poll a snapshot of the current task state. If you are unsure whether the target supports streaming, start with `status`.
88
+
89
+ ## Errors
90
+
91
+ - `UNKNOWN_TASK_HANDLE` — the handle is expired or invalid. Retry with `target_alias` + `task_id`, or re-send.
92
+ - `TARGET_RESOLUTION_ERROR` — the alias or URL did not resolve. Call `list_targets` to check available targets.
93
+ - `VALIDATION_ERROR` — invalid parameters. Check required fields for the action.