singularity-forge/packages/ai/package.json
Mikael Hugo a342868068 feat(packages): extract @singularity-forge/openai-codex-provider
Mirrors the @singularity-forge/google-gemini-cli-provider package layout
for the codex CLI integration boundary. The new package owns:

- CodexAppServerClient (the JSON-RPC subprocess client; previously
  packages/ai/src/providers/codex-app-server-client.ts, no pi-ai
  internal coupling)
- snapshotCodexCliAccount / discoverCodexCliModels (reads
  ~/.codex/models_cache.json with visibility=list ∧ supported_in_api
  filter; previously inline in src/resources/extensions/sf/openai-codex-catalog.js)

openai-codex-responses.ts (the stream-shaping provider) intentionally
stays in @singularity-forge/ai because it depends on pi-ai stream-event
internals and is not reusable outside the provider — same scope as
google-gemini-cli.ts vs google-gemini-cli-provider.

The SF extension's openai-codex-catalog.js is now a thin SF-side cache
writer that delegates to discoverCodexCliModels, mirroring how
gemini-catalog.js delegates to discoverGeminiCliModels. readCodexAvailableModels
became async to match the dynamic-import path; tests updated.

Closes sf-mp4u5fcz-wh6ac9 (with documented AC2 narrowing — see
resolution).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 06:48:19 +02:00

51 lines
1.2 KiB
JSON

{
"name": "@singularity-forge/ai",
"version": "2.75.3",
"description": "Unified LLM API (vendored from pi-mono)",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./oauth": {
"types": "./dist/oauth.d.ts",
"import": "./dist/oauth.js"
},
"./bedrock-provider": {
"types": "./bedrock-provider.d.ts",
"import": "./bedrock-provider.js"
}
},
"scripts": {
"build": "tsgo -p tsconfig.json"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.95.1",
"@anthropic-ai/vertex-sdk": "^0.16.0",
"@aws-sdk/client-bedrock-runtime": "^3.1045.0",
"@google/gemini-cli-core": "^0.41.2",
"@google/genai": "^2.0.1",
"@mistralai/mistralai": "^2.2.1",
"@singularity-forge/google-gemini-cli-provider": "^2.75.3",
"@singularity-forge/openai-codex-provider": "^2.75.3",
"@sinclair/typebox": "^0.34.49",
"ajv": "^8.20.0",
"ajv-formats": "^3.0.1",
"chalk": "^5.6.2",
"jsonrepair": "^3.14.0",
"openai": "^6.37.0",
"proxy-agent": "^8.0.1",
"undici": "^8.2.0",
"yaml": "^2.8.3",
"zod-to-json-schema": "^3.24.6"
},
"devDependencies": {
"@smithy/node-http-handler": "^4.5.0"
},
"engines": {
"node": ">=26.1.0"
}
}