{"_id":"@astronova-ai/codex-provider","_rev":"3-9e1eb9785aef30ce58b52747189136c9","name":"@astronova-ai/codex-provider","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@astronova-ai/codex-provider","version":"0.1.0","keywords":["codex","openai","salesforce","llm","provider","responses-api","web-search"],"license":"MIT","_id":"@astronova-ai/codex-provider@0.1.0","maintainers":[{"name":"dfleminks","email":"damien@fleminks.com"}],"bin":{"astronova-codex":"dist/cli.js"},"dist":{"shasum":"da73bf3450eda89dcdba692199a6a6c74358211b","tarball":"https://registry.npmjs.org/@astronova-ai/codex-provider/-/codex-provider-0.1.0.tgz","fileCount":12,"integrity":"sha512-My1j/llit7/5wazYDLOR0/9/fBAOXv7OqfByUF6qj0T46WeNphw0EEa79O3PnUYt4nLCpLcbweV9A/rKWa13Jw==","signatures":[{"sig":"MEUCIBjcTkGZrZjaC2TpSDLRiEHIA30CIKJ0MoP5qbMIDJqQAiEA0gvVKUiZXFqchg2DRBMXWDZnqyMjzzyNacp+nemKa2Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59021},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22 <23"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"aad46f58b12f80ebba70012c1e2253e9f19a1103","scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","prepack":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dfleminks","email":"damien@fleminks.com"},"_npmVersion":"10.9.8","description":"Unofficial Codex provider for using Salesforce LLM Gateway GPT models with reasoning and web search.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"@salesforce/core":"^8.31.0","@astronova-ai/sf-cli-auth":"^0.1.0","@astronova-ai/sf-llm-core":"^0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/codex-provider_0.1.0_1784200925675_0.27739107679052255","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@astronova-ai/codex-provider","version":"0.1.1","keywords":["codex","openai","salesforce","llm","provider","responses-api","web-search"],"license":"MIT","_id":"@astronova-ai/codex-provider@0.1.1","maintainers":[{"name":"dfleminks","email":"damien@fleminks.com"}],"bin":{"astronova-codex":"dist/cli.js"},"dist":{"shasum":"79ed63ebd95c37d564a74bce21cc660e0f593682","tarball":"https://registry.npmjs.org/@astronova-ai/codex-provider/-/codex-provider-0.1.1.tgz","fileCount":12,"integrity":"sha512-c09mfMB5Jv5ZuuRop4DZEskd7lv/kE6Eis5XrwZBwSJ7AoOBXe4azavpqP3icv6e5YFAZ5QsKCu1RbNV+Z3yyA==","signatures":[{"sig":"MEUCIQCofbJMIGJoL1VeBlXtvBTfgWy/js1uUN9nXOIAdFLNFgIgRozTlyobZ9DYsJzh4g1u5bJYlolek9+dGibnjDrc0ws=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69653},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22 <23"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3e51de5b0f07bda1005651813ef72241074e04c6","scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","prepack":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dfleminks","email":"damien@fleminks.com"},"_npmVersion":"11.13.0","description":"Unofficial Codex provider for using Salesforce LLM Gateway GPT models with reasoning and web search.","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","dependencies":{"@salesforce/core":"^8.31.0","@astronova-ai/sf-cli-auth":"^0.1.0","@astronova-ai/sf-llm-core":"^0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/codex-provider_0.1.1_1784209309011_0.5330840007836726","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@astronova-ai/codex-provider","version":"0.1.2","description":"Unofficial Codex provider for using Salesforce LLM Gateway GPT models with reasoning and web search.","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"}},"bin":{"astronova-codex":"dist/cli.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-cli-auth":"^0.1.0","@astronova-ai/sf-llm-core":"^0.1.0","@salesforce/core":"^8.31.0"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.7.2","tsup":"^8.3.5","vitest":"^2.1.8"},"keywords":["codex","openai","salesforce","llm","provider","responses-api","web-search"],"gitHead":"aca89ac3319d0b9724926b1df61ed256071096cb","_id":"@astronova-ai/codex-provider@0.1.2","_nodeVersion":"24.17.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-5EWV5wJCo+GeIeuNlC/jQiAZZpTHqspnlqI2BD4CvupZgVpsU68nrAU4yipZZ8133GCjzzGNUWbCO+gsJXiueQ==","shasum":"63a15a18aa3b03fb5b848b84fe3b09f7168b79d8","tarball":"https://registry.npmjs.org/@astronova-ai/codex-provider/-/codex-provider-0.1.2.tgz","fileCount":12,"unpackedSize":69898,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCjpdWIkCgD+2Rz71ZxnQkmRhfwRcoyP1oYDouDGB8yWgIhAOCHe7jPQ78nzewNLvarYopyTvggn9bqzRXAyihYA+HZ"}]},"_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/codex-provider_0.1.2_1784210069393_0.19867470218539562"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-16T11:22:05.396Z","modified":"2026-07-16T13:54:29.676Z","0.1.0":"2026-07-16T11:22:05.823Z","0.1.1":"2026-07-16T13:41:49.162Z","0.1.2":"2026-07-16T13:54:29.550Z"},"license":"MIT","keywords":["codex","openai","salesforce","llm","provider","responses-api","web-search"],"description":"Unofficial Codex provider for using Salesforce LLM Gateway GPT models with reasoning and web search.","maintainers":[{"name":"dfleminks","email":"damien@fleminks.com"}],"readme":"# @astronova-ai/codex-provider\n\n> [!IMPORTANT]\n> This is an independent, unofficial package. It is not endorsed by, affiliated with, or supported\n> by Salesforce or OpenAI. Use requires an entitled Salesforce org, remains subject to your\n> agreements with Salesforce and OpenAI, and may consume metered org capacity or credits.\n\nUse Salesforce LLM Gateway GPT models from the **Codex CLI** through the OpenAI Responses wire API.\nThe package generates a Codex profile and model catalog, resolves an authenticated Salesforce CLI\norg, mints and refreshes the short-lived gateway JWT, and runs an authenticated loopback proxy.\n\n## Install\n\nRequirements: Node 22, the `codex` and `sf` CLIs, and an authenticated Salesforce org.\n\n```bash\nnvm use 22\nsf org login web\nnpm install --global @astronova-ai/codex-provider\n\nastronova-codex setup --org my-org-alias\nastronova-codex run\n```\n\n`run` starts the proxy, launches `codex --profile astronova`, and stops the proxy when Codex exits.\nPass normal Codex arguments after `--`:\n\n```bash\nastronova-codex run -- --search\nastronova-codex run -- exec \"Review this repository\"\n```\n\nFor an independently managed proxy process:\n\n```bash\nastronova-codex serve\ncodex --profile astronova\n```\n\n## Codex apps and plugins\n\nThe generated Astronova profile sets `[apps._default] enabled = false`. Codex apps use dynamic\ntool-search response items that the Salesforce Responses endpoint currently cannot deserialize;\nleaving them enabled can end an otherwise successful HTTP 200 stream with `response.failed`.\nDisabling apps at the app-policy layer preserves enterprise-managed feature requirements that may\nrequire `[features] apps = true`.\n\nThis setting applies only while the Astronova profile is active. It does not change other Codex\nprofiles and does not disable local shell/file tools, reasoning controls, hosted web search, plugin\nskills, hooks, or scripts. Connector apps bundled by a plugin are unavailable in the Astronova\nprofile. Standalone MCP servers are separate, but compatibility depends on the response items they\nuse and is not yet guaranteed.\n\nAfter upgrading from an earlier release, run setup again to regenerate the profile:\n\n```bash\nastronova-codex setup --org my-org-alias\n```\n\n## Reasoning and web search\n\nThe generated profile intentionally does **not** set `model_reasoning_effort` or `web_search`.\nChoose reasoning from the Codex model/reasoning control and use Codex's normal cached, live, or\ndisabled web-search setting.\n\nThe generated model catalog exposes `minimal`, `low`, `medium`, and `high` for each Salesforce GPT\nmodel. The proxy forwards the UI-selected effort unchanged, with one documented gateway\ncompatibility rule:\n\n- `minimal` (or unset) plus a provider-hosted tool such as `web_search` is changed to `low` and a\n  warning is logged.\n- `low`, `medium`, and `high` are never changed.\n- `minimal` without provider-hosted tools is never changed.\n\nWeb search is a provider-hosted Responses API tool. The request is sent through the Salesforce LLM\nGateway; this package does not implement a separate search engine.\n\n## Models\n\nThe Codex selector includes the gateway's Responses-compatible GPT models:\n\n| Model | Gateway id | Context |\n|---|---|---:|\n| Salesforce GPT-5 | `llmgateway__OpenAIGPT5` | 272k |\n| Salesforce GPT-5.4 | `llmgateway__OpenAIGPT54` | 1.05M |\n| Salesforce GPT-5.5 | `llmgateway__OpenAIGPT55` | 1.05M |\n\nGPT-5.4 is the default. GPT-5.5 may require beta-model entitlement in the Salesforce org. Claude\nmodels are not listed because the gateway's Responses API is GPT-only today.\n\nDuring setup, the package reads the model metadata bundled with the installed Codex CLI and writes\na Salesforce-specific catalog under `CODEX_HOME`. This preserves the current Codex instructions\nand tool metadata without embedding them in the npm package.\n\n## Commands\n\n```text\nastronova-codex setup [--org <alias>] [--profile <name>] [--model <gateway-id>]\nastronova-codex run [--profile <name>] [--org <alias>] [-- <codex args...>]\nastronova-codex serve [--profile <name>] [--org <alias>]\nastronova-codex doctor [--profile <name>]\n```\n\n`setup` writes three private (`0600`) files:\n\n- `$CODEX_HOME/astronova.config.toml` — the Codex provider profile.\n- `$CODEX_HOME/astronova.models.json` — model/reasoning metadata for the Codex UI.\n- `$CODEX_HOME/astronova/astronova.json` — org alias, proxy settings, and a random proxy token.\n\nNo Salesforce access token or gateway JWT is stored by this package. The proxy token can be rotated\nwith `setup --reset-token`.\n\n## Security\n\nThe proxy injects a live Salesforce gateway JWT, so a caller could consume the org's metered LLM\ncapacity. It therefore:\n\n- binds only to loopback (`127.0.0.1`) and refuses non-loopback configuration;\n- requires a random bearer token and checks it in constant time;\n- restricts forwarding to `/v1/responses` paths;\n- keeps the Salesforce JWT inside the proxy and recomputes headers on every retry.\n\nDo not expose the proxy through a tunnel, container port, or network listener.\n\n## Stream diagnostics\n\nThe proxy forwards Responses SSE bytes unchanged while tracking the terminal event. Each completed\nrequest logs its status, terminal event, byte count, duration, and an upstream request ID when\nSalesforce supplies one. `response.failed` and `response.incomplete` are warnings that include the\ngateway reason when available. A stream that closes without `response.completed`,\n`response.failed`, `response.incomplete`, or `error` is logged as an error before Codex reports the\ndisconnection. These diagnostics never log response content, credentials, or request bodies.\n\n## Library API\n\nThe package also exports the setup, catalog, compatibility, and proxy primitives for custom hosts:\n\n```ts\nimport { startSalesforceCodexProxy } from \"@astronova-ai/codex-provider\";\n\nconst proxy = await startSalesforceCodexProxy({\n  orgIdentifier: \"my-org-alias\",\n  apiKey: process.env.MY_PRIVATE_PROXY_TOKEN!,\n});\nconsole.log(proxy.baseUrl);\n```\n\n## License\n\nMIT. See `NOTICE` for the unofficial-project, trademark, entitlement, and metered-usage terms.\n","readmeFilename":"README.md"}