mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 18:07:00 +01:00
fix(voice): expose callback secret presence for setup recovery
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
24751a27c1
commit
be5801b079
2 files changed
+14
-1
No files matched your search
@@ -63,6 +63,15 @@ const support = await getEmbeddedPostgresTestSupport();
|
||||
return { companyId, endpointId, agentId, connectionId, issueId, conversationId, callerId, sessionId, store, request, reserved, accept, toolInput, publication };
|
||||
}
|
||||
|
||||
it("reports signing-secret presence for interrupted setup without returning credential refs", async () => {
|
||||
const f = await fixture();
|
||||
const chat = chatChannelService(db, {heartbeat: {wakeup: vi.fn()}});
|
||||
expect((await chat.get(f.endpointId)).setup.webhookSecretConfigured).toBe(false);
|
||||
await db.update(toolConnections).set({credentialSecretRefs: [{configPath: "credentials.signingSecret", secretId: randomUUID()}]}).where(eq(toolConnections.id, f.connectionId));
|
||||
const endpoint = await chat.get(f.endpointId);
|
||||
expect(endpoint.setup.webhookSecretConfigured).toBe(true);
|
||||
expect(endpoint).not.toHaveProperty("credentialSecretRefs");
|
||||
});
|
||||
it("deduplicates concurrent session requests before creating a second task", async () => {
|
||||
const f = await fixture();
|
||||
const results = await Promise.all([f.store.reserve(f.request), f.store.reserve(f.request)]);
|
||||
|
||||
@@ -5886,7 +5886,11 @@ export function chatChannelService(db: Db, options: ChatChannelServiceOptions) {
|
||||
(ref) => ref.configPath === "credentials.webhookSecret",
|
||||
),
|
||||
}
|
||||
: {}),
|
||||
: endpoint.provider === "speko" ? {
|
||||
webhookSecretConfigured: row.credentialSecretRefs.some(
|
||||
(ref) => ref.configPath === "credentials.signingSecret",
|
||||
),
|
||||
} : {}),
|
||||
},
|
||||
healthMessage: endpoint.healthMessage,
|
||||
lastError: endpoint.lastError,
|
||||
|
||||
Reference in new issue
Block a user