@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.
- package/README.md +261 -16
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +214 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/errors.d.ts +4 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +37 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -20
- package/dist/index.js.map +1 -1
- package/dist/request-normalization.d.ts +23 -0
- package/dist/request-normalization.d.ts.map +1 -0
- package/dist/request-normalization.js +109 -0
- package/dist/request-normalization.js.map +1 -0
- package/dist/result-shape.d.ts +68 -25
- package/dist/result-shape.d.ts.map +1 -1
- package/dist/result-shape.js +192 -59
- package/dist/result-shape.js.map +1 -1
- package/dist/schemas.d.ts +81 -779
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +308 -275
- package/dist/schemas.js.map +1 -1
- package/dist/sdk-client-pool.d.ts +8 -4
- package/dist/sdk-client-pool.d.ts.map +1 -1
- package/dist/sdk-client-pool.js +21 -1
- package/dist/sdk-client-pool.js.map +1 -1
- package/dist/service.d.ts +33 -4
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +381 -60
- package/dist/service.js.map +1 -1
- package/dist/target-catalog.d.ts +66 -0
- package/dist/target-catalog.d.ts.map +1 -0
- package/dist/target-catalog.js +309 -0
- package/dist/target-catalog.js.map +1 -0
- package/dist/task-handle-registry.d.ts +29 -0
- package/dist/task-handle-registry.d.ts.map +1 -0
- package/dist/task-handle-registry.js +141 -0
- package/dist/task-handle-registry.js.map +1 -0
- package/openclaw.plugin.json +68 -1
- package/package.json +2 -1
- package/skills/remote-agent/SKILL.md +93 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { A2AOutboundError, ERROR_CODES, toToolError, } from "./errors.js";
|
|
2
|
+
function isNonEmptyString(value) {
|
|
3
|
+
return typeof value === "string" && value.trim() !== "";
|
|
4
|
+
}
|
|
5
|
+
function cloneSkillSummary(summary) {
|
|
6
|
+
return {
|
|
7
|
+
id: summary.id,
|
|
8
|
+
name: summary.name,
|
|
9
|
+
description: summary.description,
|
|
10
|
+
tags: [...summary.tags],
|
|
11
|
+
examples: [...summary.examples],
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function cloneCardCacheEntry(entry) {
|
|
15
|
+
return {
|
|
16
|
+
...(entry.displayName !== undefined
|
|
17
|
+
? { displayName: entry.displayName }
|
|
18
|
+
: {}),
|
|
19
|
+
...(entry.description !== undefined
|
|
20
|
+
? { description: entry.description }
|
|
21
|
+
: {}),
|
|
22
|
+
skillSummaries: entry.skillSummaries.map(cloneSkillSummary),
|
|
23
|
+
...(typeof entry.streamingSupported === "boolean"
|
|
24
|
+
? { streamingSupported: entry.streamingSupported }
|
|
25
|
+
: {}),
|
|
26
|
+
...(entry.preferredTransport !== undefined
|
|
27
|
+
? { preferredTransport: entry.preferredTransport }
|
|
28
|
+
: {}),
|
|
29
|
+
...(entry.lastRefreshedAt !== undefined
|
|
30
|
+
? { lastRefreshedAt: entry.lastRefreshedAt }
|
|
31
|
+
: {}),
|
|
32
|
+
...(entry.lastRefreshError !== undefined
|
|
33
|
+
? { lastRefreshError: entry.lastRefreshError }
|
|
34
|
+
: {}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function emptyCardCacheEntry() {
|
|
38
|
+
return {
|
|
39
|
+
skillSummaries: [],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function summarizeSkill(skill) {
|
|
43
|
+
return {
|
|
44
|
+
id: skill.id,
|
|
45
|
+
name: skill.name,
|
|
46
|
+
description: skill.description,
|
|
47
|
+
tags: [...skill.tags],
|
|
48
|
+
examples: [...(skill.examples ?? [])],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function fallbackErrorCode(error) {
|
|
52
|
+
return error instanceof A2AOutboundError
|
|
53
|
+
? error.code
|
|
54
|
+
: ERROR_CODES.A2A_SDK_ERROR;
|
|
55
|
+
}
|
|
56
|
+
function targetResolutionError(reason, message, details) {
|
|
57
|
+
return new A2AOutboundError(ERROR_CODES.TARGET_RESOLUTION_ERROR, message, {
|
|
58
|
+
reason,
|
|
59
|
+
...details,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export class TargetCatalog {
|
|
63
|
+
config;
|
|
64
|
+
clientPool;
|
|
65
|
+
configuredEntries;
|
|
66
|
+
targetsByAlias;
|
|
67
|
+
targetsByNormalizedBaseUrl;
|
|
68
|
+
defaultTargetAlias;
|
|
69
|
+
cardCache = new Map();
|
|
70
|
+
cardRefreshes = new Map();
|
|
71
|
+
constructor(options) {
|
|
72
|
+
this.config = options.config;
|
|
73
|
+
this.clientPool = options.clientPool;
|
|
74
|
+
const targetsByAlias = new Map();
|
|
75
|
+
const targetsByNormalizedBaseUrl = new Map();
|
|
76
|
+
let defaultTargetAlias;
|
|
77
|
+
const configuredEntries = this.config.targets.map((targetConfig) => {
|
|
78
|
+
const target = this.clientPool.normalizeTarget(targetConfig);
|
|
79
|
+
const entry = {
|
|
80
|
+
alias: targetConfig.alias,
|
|
81
|
+
...(targetConfig.description !== undefined
|
|
82
|
+
? { configuredDescription: targetConfig.description }
|
|
83
|
+
: {}),
|
|
84
|
+
default: targetConfig.default,
|
|
85
|
+
tags: Object.freeze([...targetConfig.tags]),
|
|
86
|
+
examples: Object.freeze([...targetConfig.examples]),
|
|
87
|
+
target: {
|
|
88
|
+
...target,
|
|
89
|
+
alias: targetConfig.alias,
|
|
90
|
+
...(targetConfig.description !== undefined
|
|
91
|
+
? { description: targetConfig.description }
|
|
92
|
+
: {}),
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
targetsByAlias.set(entry.alias, entry);
|
|
96
|
+
const existing = targetsByNormalizedBaseUrl.get(entry.target.baseUrl) ?? [];
|
|
97
|
+
targetsByNormalizedBaseUrl.set(entry.target.baseUrl, [...existing, entry]);
|
|
98
|
+
if (entry.default) {
|
|
99
|
+
defaultTargetAlias = entry.alias;
|
|
100
|
+
}
|
|
101
|
+
return entry;
|
|
102
|
+
});
|
|
103
|
+
this.configuredEntries = Object.freeze(configuredEntries);
|
|
104
|
+
this.targetsByAlias = targetsByAlias;
|
|
105
|
+
this.targetsByNormalizedBaseUrl = new Map([...targetsByNormalizedBaseUrl.entries()].map(([baseUrl, entries]) => [
|
|
106
|
+
baseUrl,
|
|
107
|
+
Object.freeze([...entries]),
|
|
108
|
+
]));
|
|
109
|
+
this.defaultTargetAlias = defaultTargetAlias;
|
|
110
|
+
}
|
|
111
|
+
listEntries() {
|
|
112
|
+
return this.configuredEntries.map((entry) => this.toCatalogEntry(entry));
|
|
113
|
+
}
|
|
114
|
+
getEntry(alias) {
|
|
115
|
+
const normalizedAlias = alias.trim();
|
|
116
|
+
const entry = this.targetsByAlias.get(normalizedAlias);
|
|
117
|
+
return entry ? this.toCatalogEntry(entry) : undefined;
|
|
118
|
+
}
|
|
119
|
+
resolveAlias(alias) {
|
|
120
|
+
return this.resolveConfiguredEntry(this.requireAlias(alias));
|
|
121
|
+
}
|
|
122
|
+
resolveDefaultTarget() {
|
|
123
|
+
return this.defaultTargetAlias
|
|
124
|
+
? this.resolveConfiguredEntry(this.requireAlias(this.defaultTargetAlias))
|
|
125
|
+
: undefined;
|
|
126
|
+
}
|
|
127
|
+
resolveConfiguredRawTarget(target) {
|
|
128
|
+
const normalizedTarget = this.clientPool.normalizeTarget(target);
|
|
129
|
+
const entry = this.findConfiguredEntry(normalizedTarget);
|
|
130
|
+
if (!entry) {
|
|
131
|
+
throw targetResolutionError("unknown_raw_url", `no configured target matches raw URL "${target.baseUrl}"`, {
|
|
132
|
+
inputBaseUrl: target.baseUrl,
|
|
133
|
+
normalizedBaseUrl: normalizedTarget.baseUrl,
|
|
134
|
+
suggested_action: "list_targets",
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return this.resolveMatchedRawTarget(normalizedTarget, entry);
|
|
138
|
+
}
|
|
139
|
+
resolveRawTarget(target) {
|
|
140
|
+
const normalizedTarget = this.clientPool.normalizeTarget(target);
|
|
141
|
+
const entry = this.findConfiguredEntry(normalizedTarget);
|
|
142
|
+
if (entry) {
|
|
143
|
+
return this.resolveMatchedRawTarget(normalizedTarget, entry);
|
|
144
|
+
}
|
|
145
|
+
if (this.config.targets.length > 0 &&
|
|
146
|
+
this.config.policy.allowTargetUrlOverride !== true) {
|
|
147
|
+
throw targetResolutionError("raw_url_disallowed_by_policy", `raw target URL "${target.baseUrl}" is not allowed by policy`, {
|
|
148
|
+
inputBaseUrl: target.baseUrl,
|
|
149
|
+
normalizedBaseUrl: normalizedTarget.baseUrl,
|
|
150
|
+
allowTargetUrlOverride: this.config.policy.allowTargetUrlOverride,
|
|
151
|
+
configuredAliases: this.config.targets.map((entry) => entry.alias),
|
|
152
|
+
suggested_action: "list_targets",
|
|
153
|
+
hint: "Use target_alias or enable policy.allowTargetUrlOverride.",
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return this.applyCachedMetadata(normalizedTarget);
|
|
157
|
+
}
|
|
158
|
+
async hydrateAllConfigured(options = {}) {
|
|
159
|
+
await Promise.allSettled(this.configuredEntries.map((entry) => this.loadCardMetadata(entry.target, options)));
|
|
160
|
+
return this.listEntries();
|
|
161
|
+
}
|
|
162
|
+
async hydrateConfiguredTarget(alias, options = {}) {
|
|
163
|
+
const entry = this.requireAlias(alias);
|
|
164
|
+
await this.loadCardMetadata(entry.target, options);
|
|
165
|
+
return this.toCatalogEntry(entry);
|
|
166
|
+
}
|
|
167
|
+
async hydrateResolvedTarget(target, options = {}) {
|
|
168
|
+
await this.loadCardMetadata(target, options);
|
|
169
|
+
return this.applyCachedMetadata(target);
|
|
170
|
+
}
|
|
171
|
+
requireAlias(alias) {
|
|
172
|
+
const normalizedAlias = alias.trim();
|
|
173
|
+
const entry = this.targetsByAlias.get(normalizedAlias);
|
|
174
|
+
if (!entry) {
|
|
175
|
+
throw targetResolutionError("unknown_alias", `unknown target alias "${normalizedAlias}"`, {
|
|
176
|
+
alias: normalizedAlias,
|
|
177
|
+
availableAliases: this.configuredEntries.map((item) => item.alias),
|
|
178
|
+
suggested_action: "list_targets",
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
return entry;
|
|
182
|
+
}
|
|
183
|
+
findConfiguredEntry(normalizedTarget) {
|
|
184
|
+
const matches = this.targetsByNormalizedBaseUrl.get(normalizedTarget.baseUrl) ?? [];
|
|
185
|
+
if (matches.length <= 1) {
|
|
186
|
+
return matches[0];
|
|
187
|
+
}
|
|
188
|
+
throw targetResolutionError("ambiguous_normalized_url_matches", `raw target URL "${normalizedTarget.baseUrl}" matches multiple configured targets`, {
|
|
189
|
+
normalizedBaseUrl: normalizedTarget.baseUrl,
|
|
190
|
+
aliases: matches.map((entry) => entry.alias),
|
|
191
|
+
suggested_action: "list_targets",
|
|
192
|
+
hint: "Disambiguate by using target_alias instead of target_url.",
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
resolveConfiguredEntry(entry) {
|
|
196
|
+
return this.applyCachedMetadata(entry.target);
|
|
197
|
+
}
|
|
198
|
+
resolveMatchedRawTarget(normalizedTarget, entry) {
|
|
199
|
+
return this.applyCachedMetadata({
|
|
200
|
+
...normalizedTarget,
|
|
201
|
+
alias: entry.alias,
|
|
202
|
+
...(entry.configuredDescription !== undefined
|
|
203
|
+
? { description: entry.configuredDescription }
|
|
204
|
+
: {}),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
toCatalogEntry(entry) {
|
|
208
|
+
return {
|
|
209
|
+
target: this.applyCachedMetadata(entry.target),
|
|
210
|
+
...(entry.configuredDescription !== undefined
|
|
211
|
+
? { configuredDescription: entry.configuredDescription }
|
|
212
|
+
: {}),
|
|
213
|
+
default: entry.default,
|
|
214
|
+
tags: [...entry.tags],
|
|
215
|
+
examples: [...entry.examples],
|
|
216
|
+
card: this.cardCacheSnapshot(entry.target.baseUrl),
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
cardCacheSnapshot(normalizedBaseUrl) {
|
|
220
|
+
const existing = this.cardCache.get(normalizedBaseUrl);
|
|
221
|
+
return cloneCardCacheEntry(existing ?? emptyCardCacheEntry());
|
|
222
|
+
}
|
|
223
|
+
applyCachedMetadata(target) {
|
|
224
|
+
const cached = this.cardCache.get(target.baseUrl);
|
|
225
|
+
const displayName = target.displayName ?? cached?.displayName;
|
|
226
|
+
const description = target.description ?? cached?.description;
|
|
227
|
+
const streamingSupported = target.streamingSupported ?? cached?.streamingSupported;
|
|
228
|
+
return {
|
|
229
|
+
baseUrl: target.baseUrl,
|
|
230
|
+
cardPath: target.cardPath,
|
|
231
|
+
preferredTransports: [...target.preferredTransports],
|
|
232
|
+
...(target.alias !== undefined ? { alias: target.alias } : {}),
|
|
233
|
+
...(displayName !== undefined ? { displayName } : {}),
|
|
234
|
+
...(description !== undefined ? { description } : {}),
|
|
235
|
+
...(streamingSupported !== undefined ? { streamingSupported } : {}),
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
async loadCardMetadata(target, options) {
|
|
239
|
+
const existing = this.cardCache.get(target.baseUrl);
|
|
240
|
+
if (options.force !== true &&
|
|
241
|
+
(existing?.lastRefreshedAt !== undefined ||
|
|
242
|
+
existing?.lastRefreshError !== undefined)) {
|
|
243
|
+
return cloneCardCacheEntry(existing);
|
|
244
|
+
}
|
|
245
|
+
const inFlight = this.cardRefreshes.get(target.baseUrl);
|
|
246
|
+
if (inFlight) {
|
|
247
|
+
return cloneCardCacheEntry(await inFlight);
|
|
248
|
+
}
|
|
249
|
+
const refreshPromise = this.refreshCardMetadata(target);
|
|
250
|
+
this.cardRefreshes.set(target.baseUrl, refreshPromise);
|
|
251
|
+
try {
|
|
252
|
+
return cloneCardCacheEntry(await refreshPromise);
|
|
253
|
+
}
|
|
254
|
+
finally {
|
|
255
|
+
if (this.cardRefreshes.get(target.baseUrl) === refreshPromise) {
|
|
256
|
+
this.cardRefreshes.delete(target.baseUrl);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
async refreshCardMetadata(target) {
|
|
261
|
+
const refreshedAt = new Date().toISOString();
|
|
262
|
+
const previous = this.cardCache.get(target.baseUrl);
|
|
263
|
+
try {
|
|
264
|
+
const clientEntry = await this.clientPool.get(target);
|
|
265
|
+
const card = await clientEntry.client.getAgentCard();
|
|
266
|
+
const next = {
|
|
267
|
+
...(isNonEmptyString(card.name) ? { displayName: card.name } : {}),
|
|
268
|
+
...(isNonEmptyString(card.description)
|
|
269
|
+
? { description: card.description }
|
|
270
|
+
: {}),
|
|
271
|
+
skillSummaries: card.skills.map(summarizeSkill),
|
|
272
|
+
...(typeof card.capabilities?.streaming === "boolean"
|
|
273
|
+
? { streamingSupported: card.capabilities.streaming }
|
|
274
|
+
: {}),
|
|
275
|
+
...(isNonEmptyString(card.preferredTransport)
|
|
276
|
+
? { preferredTransport: card.preferredTransport }
|
|
277
|
+
: {}),
|
|
278
|
+
lastRefreshedAt: refreshedAt,
|
|
279
|
+
};
|
|
280
|
+
this.cardCache.set(target.baseUrl, next);
|
|
281
|
+
return next;
|
|
282
|
+
}
|
|
283
|
+
catch (error) {
|
|
284
|
+
const next = {
|
|
285
|
+
...(previous?.displayName !== undefined
|
|
286
|
+
? { displayName: previous.displayName }
|
|
287
|
+
: {}),
|
|
288
|
+
...(previous?.description !== undefined
|
|
289
|
+
? { description: previous.description }
|
|
290
|
+
: {}),
|
|
291
|
+
skillSummaries: previous?.skillSummaries.map(cloneSkillSummary) ?? [],
|
|
292
|
+
...(typeof previous?.streamingSupported === "boolean"
|
|
293
|
+
? { streamingSupported: previous.streamingSupported }
|
|
294
|
+
: {}),
|
|
295
|
+
...(previous?.preferredTransport !== undefined
|
|
296
|
+
? { preferredTransport: previous.preferredTransport }
|
|
297
|
+
: {}),
|
|
298
|
+
lastRefreshedAt: refreshedAt,
|
|
299
|
+
lastRefreshError: toToolError(error, fallbackErrorCode(error)),
|
|
300
|
+
};
|
|
301
|
+
this.cardCache.set(target.baseUrl, next);
|
|
302
|
+
return next;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
export function createTargetCatalog(options) {
|
|
307
|
+
return new TargetCatalog(options);
|
|
308
|
+
}
|
|
309
|
+
//# sourceMappingURL=target-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-catalog.js","sourceRoot":"","sources":["../src/target-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,gBAAgB,EAChB,WAAW,EACX,WAAW,GAEZ,MAAM,aAAa,CAAC;AAuDrB,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED,SAAS,iBAAiB,CACxB,OAAkC;IAElC,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QACvB,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,KAA2B;IACtD,OAAO;QACL,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS;YACjC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;YACpC,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS;YACjC,CAAC,CA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,CAAC,EAAE,CAAC;gBACP,cAAc,EACZ,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE;gBACvD,GAAG,CAAC,OAAO,QAAQ,EAAE,kBAAkB,KAAK,SAAS;oBACnD,CAAC,CAAC,EAAE,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,EAAE;oBACrD,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,QAAQ,EAAE,kBAAkB,KAAK,SAAS;oBAC5C,CAAC,CAAC,EAAE,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,EAAE;oBACrD,CAAC,CAAC,EAAE,CAAC;gBACP,eAAe,EAAE,WAAW;gBAC5B,gBAAgB,EAAE,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;aAC/D,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAED,MAAM,UAAU,mBAAmB,CAAC,OAA6B;IAC/D,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ResolvedTarget } from "./sdk-client-pool.js";
|
|
2
|
+
export interface TaskHandleRecord {
|
|
3
|
+
taskHandle: string;
|
|
4
|
+
target: ResolvedTarget;
|
|
5
|
+
taskId: string;
|
|
6
|
+
createdAt: number;
|
|
7
|
+
lastAccessedAt: number;
|
|
8
|
+
expiresAt: number;
|
|
9
|
+
}
|
|
10
|
+
export interface TaskHandleRegistryOptions {
|
|
11
|
+
ttlMs: number;
|
|
12
|
+
maxEntries: number;
|
|
13
|
+
now?: () => number;
|
|
14
|
+
}
|
|
15
|
+
export declare class TaskHandleRegistry {
|
|
16
|
+
private readonly ttlMs;
|
|
17
|
+
private readonly maxEntries;
|
|
18
|
+
private readonly now;
|
|
19
|
+
private readonly entries;
|
|
20
|
+
constructor(options: TaskHandleRegistryOptions);
|
|
21
|
+
create(input: Pick<TaskHandleRecord, "target" | "taskId">): TaskHandleRecord;
|
|
22
|
+
resolve(taskHandle: string): TaskHandleRecord;
|
|
23
|
+
refresh(taskHandle: string, input?: Partial<Pick<TaskHandleRecord, "target" | "taskId">>): TaskHandleRecord;
|
|
24
|
+
private requireLiveEntry;
|
|
25
|
+
private pruneExpired;
|
|
26
|
+
private evictLeastRecentlyUsed;
|
|
27
|
+
}
|
|
28
|
+
export declare function createTaskHandleRegistry(options: TaskHandleRegistryOptions): TaskHandleRegistry;
|
|
29
|
+
//# sourceMappingURL=task-handle-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-handle-registry.d.ts","sourceRoot":"","sources":["../src/task-handle-registry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAqED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAE/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IAEpC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IAEnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;gBAEnD,OAAO,EAAE,yBAAyB;IAM9C,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,QAAQ,CAAC,GAAG,gBAAgB;IAmB5E,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB;IAa7C,OAAO,CACL,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAM,GAC/D,gBAAgB;IAkBnB,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,sBAAsB;CAmB/B;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,yBAAyB,GACjC,kBAAkB,CAEpB"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { A2AOutboundError, ERROR_CODES, } from "./errors.js";
|
|
3
|
+
function cloneTarget(target) {
|
|
4
|
+
return {
|
|
5
|
+
baseUrl: target.baseUrl,
|
|
6
|
+
cardPath: target.cardPath,
|
|
7
|
+
preferredTransports: [...target.preferredTransports],
|
|
8
|
+
...(target.alias !== undefined ? { alias: target.alias } : {}),
|
|
9
|
+
...(target.displayName !== undefined
|
|
10
|
+
? { displayName: target.displayName }
|
|
11
|
+
: {}),
|
|
12
|
+
...(target.description !== undefined
|
|
13
|
+
? { description: target.description }
|
|
14
|
+
: {}),
|
|
15
|
+
...(target.streamingSupported !== undefined
|
|
16
|
+
? { streamingSupported: target.streamingSupported }
|
|
17
|
+
: {}),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function cloneRecord(record) {
|
|
21
|
+
return {
|
|
22
|
+
taskHandle: record.taskHandle,
|
|
23
|
+
target: cloneTarget(record.target),
|
|
24
|
+
taskId: record.taskId,
|
|
25
|
+
createdAt: record.createdAt,
|
|
26
|
+
lastAccessedAt: record.lastAccessedAt,
|
|
27
|
+
expiresAt: record.expiresAt,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function recoveryDetails(taskHandle, details = {}) {
|
|
31
|
+
return {
|
|
32
|
+
taskHandle,
|
|
33
|
+
retryHint: "Retry with explicit target plus taskId, or resend the original request after a restart to obtain a new handle.",
|
|
34
|
+
restartInvalidatesHandles: true,
|
|
35
|
+
...details,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function unknownTaskHandleError(taskHandle) {
|
|
39
|
+
return new A2AOutboundError(ERROR_CODES.UNKNOWN_TASK_HANDLE, `unknown task handle "${taskHandle}"`, recoveryDetails(taskHandle, {
|
|
40
|
+
suggested_action: "send",
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
function expiredTaskHandleError(taskHandle, expiresAt) {
|
|
44
|
+
return new A2AOutboundError(ERROR_CODES.EXPIRED_TASK_HANDLE, `task handle "${taskHandle}" has expired`, recoveryDetails(taskHandle, {
|
|
45
|
+
expiresAt,
|
|
46
|
+
suggested_actions: ["status", "send"],
|
|
47
|
+
hint: "Retry with target_alias + task_id, or send a new request.",
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
export class TaskHandleRegistry {
|
|
51
|
+
ttlMs;
|
|
52
|
+
maxEntries;
|
|
53
|
+
now;
|
|
54
|
+
entries = new Map();
|
|
55
|
+
constructor(options) {
|
|
56
|
+
this.ttlMs = options.ttlMs;
|
|
57
|
+
this.maxEntries = options.maxEntries;
|
|
58
|
+
this.now = options.now ?? Date.now;
|
|
59
|
+
}
|
|
60
|
+
create(input) {
|
|
61
|
+
const now = this.now();
|
|
62
|
+
this.pruneExpired(now);
|
|
63
|
+
const record = {
|
|
64
|
+
taskHandle: `rah_${randomUUID()}`,
|
|
65
|
+
target: cloneTarget(input.target),
|
|
66
|
+
taskId: input.taskId,
|
|
67
|
+
createdAt: now,
|
|
68
|
+
lastAccessedAt: now,
|
|
69
|
+
expiresAt: now + this.ttlMs,
|
|
70
|
+
};
|
|
71
|
+
this.entries.set(record.taskHandle, record);
|
|
72
|
+
this.evictLeastRecentlyUsed();
|
|
73
|
+
return cloneRecord(record);
|
|
74
|
+
}
|
|
75
|
+
resolve(taskHandle) {
|
|
76
|
+
const now = this.now();
|
|
77
|
+
const entry = this.requireLiveEntry(taskHandle, now);
|
|
78
|
+
const next = {
|
|
79
|
+
...entry,
|
|
80
|
+
target: cloneTarget(entry.target),
|
|
81
|
+
lastAccessedAt: now,
|
|
82
|
+
};
|
|
83
|
+
this.entries.set(taskHandle, next);
|
|
84
|
+
return cloneRecord(next);
|
|
85
|
+
}
|
|
86
|
+
refresh(taskHandle, input = {}) {
|
|
87
|
+
const now = this.now();
|
|
88
|
+
const entry = this.requireLiveEntry(taskHandle, now);
|
|
89
|
+
const next = {
|
|
90
|
+
taskHandle: entry.taskHandle,
|
|
91
|
+
target: cloneTarget(input.target ?? entry.target),
|
|
92
|
+
taskId: input.taskId ?? entry.taskId,
|
|
93
|
+
createdAt: entry.createdAt,
|
|
94
|
+
lastAccessedAt: now,
|
|
95
|
+
expiresAt: now + this.ttlMs,
|
|
96
|
+
};
|
|
97
|
+
this.entries.set(taskHandle, next);
|
|
98
|
+
this.evictLeastRecentlyUsed();
|
|
99
|
+
return cloneRecord(next);
|
|
100
|
+
}
|
|
101
|
+
requireLiveEntry(taskHandle, now) {
|
|
102
|
+
const existing = this.entries.get(taskHandle);
|
|
103
|
+
const wasExpired = existing !== undefined && existing.expiresAt <= now;
|
|
104
|
+
this.pruneExpired(now);
|
|
105
|
+
if (wasExpired && existing) {
|
|
106
|
+
throw expiredTaskHandleError(taskHandle, existing.expiresAt);
|
|
107
|
+
}
|
|
108
|
+
const live = this.entries.get(taskHandle);
|
|
109
|
+
if (!live) {
|
|
110
|
+
throw unknownTaskHandleError(taskHandle);
|
|
111
|
+
}
|
|
112
|
+
return live;
|
|
113
|
+
}
|
|
114
|
+
pruneExpired(now) {
|
|
115
|
+
for (const [taskHandle, entry] of this.entries) {
|
|
116
|
+
if (entry.expiresAt <= now) {
|
|
117
|
+
this.entries.delete(taskHandle);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
evictLeastRecentlyUsed() {
|
|
122
|
+
while (this.entries.size > this.maxEntries) {
|
|
123
|
+
let evictTaskHandle;
|
|
124
|
+
let oldestAccess = Number.POSITIVE_INFINITY;
|
|
125
|
+
for (const [taskHandle, entry] of this.entries) {
|
|
126
|
+
if (entry.lastAccessedAt < oldestAccess) {
|
|
127
|
+
oldestAccess = entry.lastAccessedAt;
|
|
128
|
+
evictTaskHandle = taskHandle;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (!evictTaskHandle) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.entries.delete(evictTaskHandle);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
export function createTaskHandleRegistry(options) {
|
|
139
|
+
return new TaskHandleRegistry(options);
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=task-handle-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-handle-registry.js","sourceRoot":"","sources":["../src/task-handle-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,WAAW,GACZ,MAAM,aAAa,CAAC;AAkBrB,SAAS,WAAW,CAAC,MAAsB;IACzC,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,mBAAmB,EAAE,CAAC,GAAG,MAAM,CAAC,mBAAmB,CAAC;QACpD,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,WAAW,KAAK,SAAS;YAClC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE;YACrC,CAAC,CAAC,E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
3
|
"name": "External A2A Delegation",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"entry": "./dist/index.js",
|
|
6
6
|
"description": "Delegate requests to external A2A agents and manage delegated tasks.",
|
|
7
|
+
"skills": ["./skills"],
|
|
7
8
|
"configSchema": {
|
|
8
9
|
"type": "object",
|
|
9
10
|
"additionalProperties": false,
|
|
@@ -37,6 +38,68 @@
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
},
|
|
41
|
+
"targets": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"default": [],
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["alias", "baseUrl"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"alias": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"baseUrl": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"description": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"tags": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "type": "string" },
|
|
61
|
+
"default": []
|
|
62
|
+
},
|
|
63
|
+
"cardPath": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"default": "/.well-known/agent-card.json"
|
|
66
|
+
},
|
|
67
|
+
"preferredTransports": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": ["JSONRPC", "HTTP+JSON", "GRPC"]
|
|
72
|
+
},
|
|
73
|
+
"default": ["JSONRPC", "HTTP+JSON"]
|
|
74
|
+
},
|
|
75
|
+
"examples": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": { "type": "string" },
|
|
78
|
+
"default": []
|
|
79
|
+
},
|
|
80
|
+
"default": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"default": false
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"taskHandles": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"properties": {
|
|
91
|
+
"ttlMs": {
|
|
92
|
+
"type": "integer",
|
|
93
|
+
"minimum": 1,
|
|
94
|
+
"default": 86400000
|
|
95
|
+
},
|
|
96
|
+
"maxEntries": {
|
|
97
|
+
"type": "integer",
|
|
98
|
+
"minimum": 1,
|
|
99
|
+
"default": 1000
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
40
103
|
"policy": {
|
|
41
104
|
"type": "object",
|
|
42
105
|
"additionalProperties": false,
|
|
@@ -53,6 +116,10 @@
|
|
|
53
116
|
"enforceSupportedTransports": {
|
|
54
117
|
"type": "boolean",
|
|
55
118
|
"default": true
|
|
119
|
+
},
|
|
120
|
+
"allowTargetUrlOverride": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"default": false
|
|
56
123
|
}
|
|
57
124
|
}
|
|
58
125
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aramisfa/openclaw-a2a-outbound",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Outbound A2A delegation plugin for OpenClaw agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|
|
34
|
+
"skills",
|
|
34
35
|
"openclaw.plugin.json",
|
|
35
36
|
"README.md",
|
|
36
37
|
"LICENSE"
|