{"_id":"@astronova-ai/sf-cli-auth","name":"@astronova-ai/sf-cli-auth","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@astronova-ai/sf-cli-auth","version":"0.1.0","description":"Node helper that reads {accessToken, instanceUrl} from an already-authenticated Salesforce CLI org for use with @astronova-ai/sf-llm-core.","type":"module","license":"MIT","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"sideEffects":false,"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"vitest run","prepack":"npm run build","clean":"rm -rf dist"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=22 <23"},"dependencies":{"@astronova-ai/sf-llm-core":"^0.1.0"},"peerDependencies":{"@salesforce/core":">=7 <9"},"peerDependenciesMeta":{"@salesforce/core":{"optional":false}},"devDependencies":{"@salesforce/core":"^8.31.0","typescript":"^5.7.2","tsup":"^8.3.5","vitest":"^2.1.8"},"keywords":["salesforce","sfdx","cli","auth","llm"],"_id":"@astronova-ai/sf-cli-auth@0.1.0","gitHead":"aad46f58b12f80ebba70012c1e2253e9f19a1103","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-lYpuwrOxvezhQ7W6/EEYjjp82OQhCUJC7H3HtAuh0tUcW+k9r6slWemPHSySaPWSxxFEy4iDwsS7KrTsQSdSug==","shasum":"d9930ed95bc6c7743e69f1a263bc048664f7dd0e","tarball":"https://registry.npmjs.org/@astronova-ai/sf-cli-auth/-/sf-cli-auth-0.1.0.tgz","fileCount":7,"unpackedSize":12173,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID96Yf79z7ub4pymAFq8IU2w+Kr2F5XJOmOwSoJDXNk3AiEA9DVYH1s8aRV+4k46Dk/fRa3TvPSpS5RcBl7o0E20Wjg="}]},"_npmUser":{"name":"dfleminks","email":"damien@fleminks.com"},"directories":{},"maintainers":[{"name":"dfleminks","email":"damien@fleminks.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sf-cli-auth_0.1.0_1784200810818_0.05909225482365699"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-16T11:20:10.704Z","0.1.0":"2026-07-16T11:20:10.958Z","modified":"2026-07-16T11:20:11.144Z"},"maintainers":[{"name":"dfleminks","email":"damien@fleminks.com"}],"description":"Node helper that reads {accessToken, instanceUrl} from an already-authenticated Salesforce CLI org for use with @astronova-ai/sf-llm-core.","keywords":["salesforce","sfdx","cli","auth","llm"],"license":"MIT","readme":"# @astronova-ai/sf-cli-auth\n\n> [!IMPORTANT]\n> This is an independent, unofficial package. It is not endorsed by, affiliated with, or supported\n> by Salesforce. Salesforce is a trademark of Salesforce, Inc. Use requires an entitled Salesforce\n> org and remains subject to your agreements with Salesforce.\n\nNode-only convenience for [`@astronova-ai/sf-llm-core`](../sf-llm-core): read\n`{ accessToken, instanceUrl }` from an org you've **already authenticated** with the Salesforce\nCLI (`sf org login web`), so you can skip OAuth entirely in development.\n\n```ts\nimport { getCredentialsForOrg } from \"@astronova-ai/sf-cli-auth\";\nimport { createGatewayFromCredentials, ModelName } from \"@astronova-ai/sf-llm-core\";\n\nconst creds = await getCredentialsForOrg(\"my-org-alias\"); // alias, username, or omit for default org\nconst client = await createGatewayFromCredentials(creds, {\n  featureId: \"AgentforceVibes\",\n  model: ModelName.CLAUDE_OPUS_4_7,\n});\n```\n\n## API\n\n- `getCredentialsForOrg(aliasOrUsername?)` → `Promise<SfCredentials>`\n- `getCredentialsForOrg({ orgIdentifier?, skipRefresh? })` → `Promise<SfCredentials>` — omit\n  `orgIdentifier` to use the CLI's configured default org (`target-org`); `skipRefresh: true`\n  returns the stored token without a refresh round-trip (may be expired).\n- `listAuthenticatedOrgs()` → `Promise<string[]>` — usernames known to the CLI (build a picker).\n\n## Requirements\n\n- **Node 22.** `@salesforce/core` / jsforce hangs on Node 24+. A `.nvmrc` pins this.\n- **`@salesforce/core` is a peer dependency** — install it in your app: `npm i @salesforce/core`.\n  It's loaded lazily, so importing this package's types never requires it.\n\nUnder the hood: `AuthInfo.create({ username })` + `Connection.refreshAuth()` decrypts the\nkeychain-stored token and renews it if expired. The decrypted token is what\n`@astronova-ai/sf-llm-core` exchanges for a gateway JWT.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-ebae494ca35448cb2a8fb0ced5ec1768"}