@aramisfa/openclaw-a2a-outbound 2.0.0 → 3.0.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-a2a-outbound",
3
3
  "name": "External A2A Delegation",
4
- "version": "2.0.0",
4
+ "version": "3.0.0",
5
5
  "entry": "./dist/index.js",
6
6
  "description": "Delegate requests to external A2A agents and manage delegated tasks.",
7
7
  "skills": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aramisfa/openclaw-a2a-outbound",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Outbound A2A delegation plugin for OpenClaw agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -63,9 +63,10 @@ Send a request to a remote agent. Use it for:
63
63
 
64
64
  - `parts` (required): non-empty array of `text`, `file`, or `data` parts.
65
65
  - `target_alias`: configured target name. Omit when a default target exists.
66
- - `task_handle`: preferred continuation key for `send`, `watch`, `status`, and `cancel`.
67
- - `task_id`: optional continuation id for `send`; for follow-up actions it identifies the remote task when no `task_handle` is available. `task_id` continues an existing task.
68
- - `context_id`: optional conversation continuation id for `send`. Use it with `task_id`, or by itself to start a new task in the same conversation.
66
+ - `continuation`: canonical persisted follow-up contract from `summary.continuation`. Round-trip this subtree verbatim for `send`, `watch`, `status`, and `cancel`.
67
+ - `task_handle`: manual compatibility input for follow-up actions when you are not replaying a persisted `continuation`.
68
+ - `task_id`: manual compatibility continuation id for `send`; for follow-up actions it identifies the remote task only when no `task_handle` is available inside a persisted `continuation`. `task_id` continues an existing task.
69
+ - `context_id`: manual compatibility conversation continuation id for `send`. Use it with `task_id`, or by itself to start a new task in the same conversation, only when you are not replaying a persisted `continuation`.
69
70
  - `reference_task_ids`: optional related task ids for `send`. `reference_task_ids` references prior tasks without continuing them.
70
71
  - `task_requirement`: optional durability contract. `task_requirement="required"` forces explicit task creation or fails fast.
71
72
  - `follow_updates`: when `true`, streams updates and returns the full event log. `follow_updates=true` means “stream the initial send”; it does not guarantee task creation unless `task_requirement="required"`.
@@ -74,17 +75,19 @@ Send a request to a remote agent. Use it for:
74
75
  Preferred continuation forms:
75
76
 
76
77
  ```json
77
- { "action": "send", "task_handle": "rah_abc123", "parts": [{ "kind": "text", "text": "Approved. Continue." }] }
78
+ { "action": "send", "continuation": { "target": { "target_url": "https://my-agent.example/", "card_path": "/.well-known/agent-card.json", "preferred_transports": ["JSONRPC", "HTTP+JSON"], "target_alias": "my-agent" }, "task": { "task_handle": "rah_abc123", "task_id": "task-123" } }, "parts": [{ "kind": "text", "text": "Approved. Continue." }] }
78
79
  ```
79
80
 
80
81
  ```json
81
- { "action": "send", "target_alias": "my-agent", "task_id": "task-123", "parts": [{ "kind": "text", "text": "Continue the task." }] }
82
+ { "action": "send", "continuation": { "target": { "target_url": "https://my-agent.example/", "card_path": "/.well-known/agent-card.json", "preferred_transports": ["JSONRPC", "HTTP+JSON"], "target_alias": "my-agent" }, "task": { "task_id": "task-123" } }, "parts": [{ "kind": "text", "text": "Continue the task." }] }
82
83
  ```
83
84
 
84
85
  ```json
85
- { "action": "send", "target_alias": "my-agent", "context_id": "ctx-123", "parts": [{ "kind": "text", "text": "Start a new task in the same conversation." }] }
86
+ { "action": "send", "continuation": { "target": { "target_url": "https://my-agent.example/", "card_path": "/.well-known/agent-card.json", "preferred_transports": ["JSONRPC", "HTTP+JSON"], "target_alias": "my-agent" }, "conversation": { "context_id": "ctx-123", "can_send": true } }, "parts": [{ "kind": "text", "text": "Start a new task in the same conversation." }] }
86
87
  ```
87
88
 
89
+ Manual compatibility only:
90
+
88
91
  ```json
89
92
  { "action": "send", "target_alias": "my-agent", "context_id": "ctx-123", "reference_task_ids": ["task-1", "task-2"], "parts": [{ "kind": "text", "text": "Start related work without continuing those tasks." }] }
90
93
  ```
@@ -94,11 +97,15 @@ Preferred continuation forms:
94
97
  Interpret follow-up capability from `result.summary.continuation`, not from prompt text, message text, or other inferred context.
95
98
 
96
99
  - `response_kind` is descriptive only. Keep follow-up logic anchored to `summary.continuation`.
100
+ - `summary.continuation.target`: canonical persisted routing contract. Persist `summary.continuation` verbatim and pass it back directly for machine follow-up.
97
101
  - `summary.continuation.task`: trackable task continuity. Use it for follow-up `send`, `watch`, `status`, and `cancel`.
98
102
  - `summary.continuation.conversation`: conversation continuity only. Use it only with `send` to start a new task in the same conversation.
103
+ - `summary.target_*` is descriptive only and no longer part of the machine follow-up recipe.
104
+ - Top-level compatibility aliases stay descriptive only. Do not infer task continuity from flat `task_id`, flat `context_id`, or other top-level summary fields.
99
105
  - Branch on `summary.continuation.task` vs `summary.continuation.conversation` before choosing the next action.
100
106
  - Never infer or synthesize `summary.continuation.task` from `summary.continuation.conversation`, session ids, run ids, prior prompts, or summary text.
101
107
  - Do not call `watch`, `status`, or `cancel` from a result that has only `summary.continuation.conversation`.
108
+ - Do not poll from conversation continuity.
102
109
  - If lifecycle tracking is required, fail fast when the peer returns only `summary.continuation.conversation`.
103
110
 
104
111
  ```ts
@@ -125,7 +132,7 @@ That is invalid because `status`, `watch`, and `cancel` require task continuity,
125
132
  Poll the current state of a delegated task.
126
133
 
127
134
  ```json
128
- { "action": "status", "task_handle": "rah_abc123" }
135
+ { "action": "status", "continuation": { "target": { "target_url": "https://my-agent.example/", "card_path": "/.well-known/agent-card.json", "preferred_transports": ["JSONRPC", "HTTP+JSON"], "target_alias": "my-agent" }, "task": { "task_handle": "rah_abc123", "task_id": "task-123" } } }
129
136
  ```
130
137
 
131
138
  ### watch
@@ -133,7 +140,7 @@ Poll the current state of a delegated task.
133
140
  Subscribe to live updates from a running task.
134
141
 
135
142
  ```json
136
- { "action": "watch", "task_handle": "rah_abc123" }
143
+ { "action": "watch", "continuation": { "target": { "target_url": "https://my-agent.example/", "card_path": "/.well-known/agent-card.json", "preferred_transports": ["JSONRPC", "HTTP+JSON"], "target_alias": "my-agent" }, "task": { "task_handle": "rah_abc123", "task_id": "task-123" } } }
137
144
  ```
138
145
 
139
146
  ### cancel
@@ -141,12 +148,12 @@ Subscribe to live updates from a running task.
141
148
  Cancel a running task.
142
149
 
143
150
  ```json
144
- { "action": "cancel", "task_handle": "rah_abc123" }
151
+ { "action": "cancel", "continuation": { "target": { "target_url": "https://my-agent.example/", "card_path": "/.well-known/agent-card.json", "preferred_transports": ["JSONRPC", "HTTP+JSON"], "target_alias": "my-agent" }, "task": { "task_handle": "rah_abc123", "task_id": "task-123" } } }
145
152
  ```
146
153
 
147
154
  ## Task handles
148
155
 
149
- After a successful `send`, the result usually includes `summary.continuation.task.task_handle` (prefixed `rah_`) when the remote peer exposes task continuity. `task_handle` is returned only when the peer actually created a task. Always prefer `summary.continuation.task.task_handle` over `target_alias + summary.continuation.task.task_id` for follow-up `send`/`watch`/`status`/`cancel` actions. Handles are process-local and expire after restart or TTL. If a handle expires, fall back to `target_alias` + `summary.continuation.task.task_id`. Treat `send.task_id` as a continuation id for the remote peer, not as a replacement for `summary.continuation.task.task_handle`. If the result includes only `summary.continuation.conversation`, there is no task lifecycle to poll, watch, or cancel.
156
+ After a successful `send`, the result usually includes `summary.continuation.task.task_handle` (prefixed `rah_`) when the remote peer exposes task continuity. `task_handle` is returned only when the peer actually created a task. Persist `summary.continuation` verbatim and pass it back directly for follow-up `send`/`watch`/`status`/`cancel` actions. Handles are process-local and expire after restart or TTL, but nested `continuation` still round-trips safely because it also carries durable `summary.continuation.target` plus `summary.continuation.task.task_id`. Treat flat `send.task_id`, `send.context_id`, and `target_alias` as manual compatibility inputs, not as a replacement for nested continuation round-tripping. If the result includes only `summary.continuation.conversation`, there is no task lifecycle to poll, watch, or cancel.
150
157
 
151
158
  ## watch vs status
152
159
 
@@ -154,6 +161,6 @@ Use `watch` when the remote agent supports streaming and you want live increment
154
161
 
155
162
  ## Errors
156
163
 
157
- - `UNKNOWN_TASK_HANDLE` — the handle is expired or invalid. Retry with `target_alias` + `task_id`, or re-send.
164
+ - `UNKNOWN_TASK_HANDLE` — the handle is expired or invalid. Retry with the same nested `continuation`, or re-send. Manual callers may fall back to flat `task_id` plus target routing only when they do not have a persisted `continuation`.
158
165
  - `TARGET_RESOLUTION_ERROR` — the alias or URL did not resolve. Call `list_targets` to check available targets.
159
166
  - `VALIDATION_ERROR` — invalid parameters. Check required fields for the action.