@perkos/perkos-a2a 0.12.17 → 0.12.18

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/dist/index.js CHANGED
@@ -27281,9 +27281,16 @@ var A2AServer = class {
27281
27281
  const payload = msg.payload;
27282
27282
  const params = payload.params || payload;
27283
27283
  const rpcId = payload.id || msg.id;
27284
+ const acceptQueued = params?.message?.metadata?.acceptQueued === true;
27284
27285
  this.handleSendMessage(params, rpcId).then(async (response) => {
27285
27286
  const task = response.result;
27286
27287
  if (task?.id && !isTerminalTaskState(task.status?.state)) {
27288
+ if (acceptQueued) {
27289
+ this.relayClient?.sendTaskResponse(
27290
+ msg,
27291
+ response
27292
+ );
27293
+ }
27287
27294
  const terminal = await this.waitForLocalTaskTerminal(task.id).catch((err) => {
27288
27295
  const errMsg2 = err instanceof Error ? err.message : String(err);
27289
27296
  this.logger.info(`[perkos-a2a] Waiting for relay task ${task.id} terminal state failed: ${errMsg2}`);