@alfe.ai/agent-api-client 0.18.0 → 0.19.0

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.cjs CHANGED
@@ -296,6 +296,18 @@ var ChatApi = class extends ApiBase {
296
296
  * Notion, Atlassian, MYOB, Salesforce, Microsoft 365) for the Agent API client.
297
297
  */
298
298
  var ConnectCredentialsApi = class extends ApiBase {
299
+ /**
300
+ * Discover all active Connections visible to this agent for one provider.
301
+ * Preserve the provider-specific credential projection without guessing a
302
+ * token shape. These rows contain secrets: tool discovery must explicitly
303
+ * select public identity fields, never return/spread the complete response.
304
+ * Use getConnectionCredentials(connectionId) for fresh per-call authority.
305
+ */
306
+ async getConnectProviderAccounts(provider) {
307
+ const result = await this.transport.request(`/agent/connect/${encodeURIComponent(provider)}/accounts`);
308
+ if (result.provider !== provider || !Array.isArray(result.accounts)) throw new Error("Invalid Connect provider accounts response");
309
+ return result;
310
+ }
299
311
  /**
300
312
  * Returns every connected Google account for the agent. Multi-account by
301
313
  * design — the openclaw-google plugin requires the LLM to pass `email`