fix: route agent messageProvider from resolved provider (#389, thanks @imfing)
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Signal: reconnect SSE monitor with abortable backoff; log stream errors. Thanks @nexty5870 for PR #430.
|
- Signal: reconnect SSE monitor with abortable backoff; log stream errors. Thanks @nexty5870 for PR #430.
|
||||||
|
- Gateway: pass resolved provider as messageProvider for agent runs so provider-specific tools are available. Thanks @imfing for PR #389.
|
||||||
- Discord/Telegram: add per-request retry policy with configurable delays and docs.
|
- Discord/Telegram: add per-request retry policy with configurable delays and docs.
|
||||||
- Telegram: run long polling via grammY runner with per-chat sequentialization and concurrency tied to `agent.maxConcurrent`. Thanks @mukhtharcm for PR #366.
|
- Telegram: run long polling via grammY runner with per-chat sequentialization and concurrency tied to `agent.maxConcurrent`. Thanks @mukhtharcm for PR #366.
|
||||||
- macOS: prevent gateway launchd startup race where the app could kill a just-started gateway; avoid unnecessary `bootout` and ensure the job is enabled at login. Fixes #306. Thanks @gupsammy for PR #387.
|
- macOS: prevent gateway launchd startup race where the app could kill a just-started gateway; avoid unnecessary `bootout` and ensure the job is enabled at login. Fixes #306. Thanks @gupsammy for PR #387.
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export const agentHandlers: GatewayRequestHandlers = {
|
|||||||
provider: resolvedProvider,
|
provider: resolvedProvider,
|
||||||
timeout: request.timeout?.toString(),
|
timeout: request.timeout?.toString(),
|
||||||
bestEffortDeliver,
|
bestEffortDeliver,
|
||||||
messageProvider: "voicewake",
|
messageProvider: resolvedProvider,
|
||||||
runId,
|
runId,
|
||||||
lane: request.lane,
|
lane: request.lane,
|
||||||
extraSystemPrompt: request.extraSystemPrompt,
|
extraSystemPrompt: request.extraSystemPrompt,
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ describe("gateway server agent", () => {
|
|||||||
const spy = vi.mocked(agentCommand);
|
const spy = vi.mocked(agentCommand);
|
||||||
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
||||||
expect(call.provider).toBe("whatsapp");
|
expect(call.provider).toBe("whatsapp");
|
||||||
|
expect(call.messageProvider).toBe("whatsapp");
|
||||||
expect(call.to).toBe("+436769770569");
|
expect(call.to).toBe("+436769770569");
|
||||||
expect(call.sessionId).toBe("sess-main-stale");
|
expect(call.sessionId).toBe("sess-main-stale");
|
||||||
|
|
||||||
@@ -138,6 +139,7 @@ describe("gateway server agent", () => {
|
|||||||
const spy = vi.mocked(agentCommand);
|
const spy = vi.mocked(agentCommand);
|
||||||
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
||||||
expect(call.provider).toBe("whatsapp");
|
expect(call.provider).toBe("whatsapp");
|
||||||
|
expect(call.messageProvider).toBe("whatsapp");
|
||||||
expect(call.to).toBe("+1555");
|
expect(call.to).toBe("+1555");
|
||||||
expect(call.deliver).toBe(true);
|
expect(call.deliver).toBe(true);
|
||||||
expect(call.bestEffortDeliver).toBe(true);
|
expect(call.bestEffortDeliver).toBe(true);
|
||||||
@@ -182,6 +184,7 @@ describe("gateway server agent", () => {
|
|||||||
const spy = vi.mocked(agentCommand);
|
const spy = vi.mocked(agentCommand);
|
||||||
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
||||||
expect(call.provider).toBe("telegram");
|
expect(call.provider).toBe("telegram");
|
||||||
|
expect(call.messageProvider).toBe("telegram");
|
||||||
expect(call.to).toBe("123");
|
expect(call.to).toBe("123");
|
||||||
expect(call.deliver).toBe(true);
|
expect(call.deliver).toBe(true);
|
||||||
expect(call.bestEffortDeliver).toBe(true);
|
expect(call.bestEffortDeliver).toBe(true);
|
||||||
@@ -226,6 +229,7 @@ describe("gateway server agent", () => {
|
|||||||
const spy = vi.mocked(agentCommand);
|
const spy = vi.mocked(agentCommand);
|
||||||
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
const call = spy.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
||||||
expect(call.provider).toBe("discord");
|
expect(call.provider).toBe("discord");
|
||||||
|
expect(call.messageProvider).toBe("discord");
|
||||||
expect(call.to).toBe("channel:discord-123");
|
expect(call.to).toBe("channel:discord-123");
|
||||||
expect(call.deliver).toBe(true);
|
expect(call.deliver).toBe(true);
|
||||||
expect(call.bestEffortDeliver).toBe(true);
|
expect(call.bestEffortDeliver).toBe(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user