agent-relay-server 0.127.1 → 0.127.2
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/docs/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Agent Relay API",
|
|
5
|
-
"version": "0.127.
|
|
5
|
+
"version": "0.127.2",
|
|
6
6
|
"description": "Real-time message bus for inter-agent communication. Agent-first: this spec is designed for machine consumption — agents can self-discover the full API surface via GET /api/spec.",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "MIT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-relay-server",
|
|
3
|
-
"version": "0.127.
|
|
3
|
+
"version": "0.127.2",
|
|
4
4
|
"description": "Lightweight HTTP message relay for inter-agent communication across machines",
|
|
5
5
|
"module": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"CONTRIBUTING.md"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"agent-relay-channels-host": "0.127.
|
|
40
|
+
"agent-relay-channels-host": "0.127.2",
|
|
41
41
|
"agent-relay-providers": "0.104.4",
|
|
42
42
|
"agent-relay-sdk": "0.2.118",
|
|
43
43
|
"ajv": "^8.20.0"
|
package/runner/src/mcp-outbox.ts
CHANGED
|
@@ -67,7 +67,12 @@ export async function deliverRunnerOutboxEvent(input: RunnerOutboxDelivery): Pro
|
|
|
67
67
|
}
|
|
68
68
|
logger.warn("outbox", `dropping event with unknown kind: ${record.kind}`);
|
|
69
69
|
} catch (error) {
|
|
70
|
-
if (isHttpStatusError(error, 409))
|
|
70
|
+
if (isHttpStatusError(error, 409)) {
|
|
71
|
+
if (record.kind === "session-message-batch") {
|
|
72
|
+
logger.error("outbox", `relay reported duplicate session batch; acking row seq=${record.seq} batchKey=${record.idempotencyKey} itemKeys=${sessionBatchItemKeys(record).join(",")} error=${errMessage(error)}`);
|
|
73
|
+
}
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
71
76
|
if (isHttpAuthError(error)) input.recoverRuntimeTokenAfterAuthFailure("outbox");
|
|
72
77
|
throw error;
|
|
73
78
|
}
|
|
@@ -89,6 +94,13 @@ function isDeterministicValidationError(error: unknown): boolean {
|
|
|
89
94
|
return status === 400 || status === 413 || status === 422;
|
|
90
95
|
}
|
|
91
96
|
|
|
97
|
+
function sessionBatchItemKeys(record: OutboxRecord): string[] {
|
|
98
|
+
const messages = Array.isArray((record.payload as { messages?: unknown }).messages)
|
|
99
|
+
? (record.payload as { messages: SendMessageInput[] }).messages
|
|
100
|
+
: [];
|
|
101
|
+
return messages.map((message, index) => message.idempotencyKey ?? `${record.idempotencyKey}:${index}`);
|
|
102
|
+
}
|
|
103
|
+
|
|
92
104
|
export async function deliverBufferedMcpCall(input: {
|
|
93
105
|
record: OutboxRecord;
|
|
94
106
|
relayUrl: string;
|
|
@@ -1598,7 +1598,7 @@ export class AgentRunner {
|
|
|
1598
1598
|
});
|
|
1599
1599
|
this.sessionOutbox.enqueue({
|
|
1600
1600
|
kind: "session-message-batch",
|
|
1601
|
-
idempotencyKey: `session-batch:${this.agentId}:${++this.sessionBatchSeq}:${messages.length}`,
|
|
1601
|
+
idempotencyKey: `session-batch:${this.agentId}:${this.options.instanceId}:${this.options.startedAt}:${++this.sessionBatchSeq}:${messages.length}`,
|
|
1602
1602
|
payload: { messages },
|
|
1603
1603
|
});
|
|
1604
1604
|
}
|