()
| 618 | } |
| 619 | |
| 620 | export async function listCredentials(): Promise<SavedCredential[]> { |
| 621 | const res = await fetch('/api/workspaces/credentials'); |
| 622 | if (!res.ok) throw new Error(`list credentials failed: ${res.status}`); |
| 623 | const body = (await res.json()) as { credentials: SavedCredential[] }; |
| 624 | return body.credentials; |
| 625 | } |
| 626 | |
| 627 | /** List only the credentials the given agent can be driven by (wire-compatible). */ |
| 628 | export async function listAgentCredentials(agent: string): Promise<SavedCredential[]> { |
no test coverage detected