/** * Enumerate authenticated Salesforce orgs. * * Strategy: shell out to `sf org list --json`. Same approach `resolveAuth` * uses — keeps us out of the `@salesforce/core` dependency. If `sf` isn't * on PATH we return an empty list; the AI can still call other tools with * an explicit `org` arg if the user has a plaintext `~/.sfdx/*.json`. * * AI-boundary note: this tool returns org metadata (alias, username, * orgId, instanceUrl, isSandbox). No record data, no access tokens. */ export type OrgSummary = { alias: string | null; username: string; orgId: string; instanceUrl: string; isSandbox: boolean; isDefault: boolean; connectedStatus: string; }; export type ListOrgsResult = { orgs: OrgSummary[]; count: number; }; /** * MCP structuredContent must be a JSON object, not a bare array. Wrapping in * `{orgs, count}` keeps the shape valid across every host (Claude Code, * Claude Desktop, Cursor). Caught by end-to-end smoke testing — the SDK's * result-schema validator rejected the bare-array return with * `Invalid input: expected record, received array`. */ export type ListOrgsOptions = { /** Injected for tests — replaces spawning the real `sf org list --json`. */ runSfOrgList?: () => Promise | null>; }; export declare function listOrgs(opts?: ListOrgsOptions): Promise;