@christiandoxa/prodex 0.275.0 → 0.277.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.
Files changed (2) hide show
  1. package/README.md +17 -4
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -97,6 +97,10 @@ curl http://127.0.0.1:4000/v1/responses \
97
97
 
98
98
  The gateway serves `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/images/*`, `/v1/audio/*`, `/v1/batches`, `/v1/rerank`, `/v1/a2a`, `/v1/messages`, and `/v1/models` where the selected upstream supports them. It adds `x-prodex-call-id` to responses, writes local request detail plus `gateway_spend` events for both `request` and `response` phases to runtime logs, can export those events to JSONL or HTTP using generic, OTel, Datadog, or Langfuse-shaped payloads, supports catalog-backed policy routing strategies (`fallback`, `round-robin`, `least-busy`, `lowest-cost`, `lowest-latency`, `rpm`, `tpm`, `first`) for model aliases/fallback chains, can enforce static virtual keys with persisted request/spend usage plus model/budget/RPM/TPM limits, supports file, SQLite, Postgres, or Redis-backed gateway admin/usage/ledger/SCIM state, and can apply keyword/model, local PII redaction, Presidio, and external webhook guardrails before calls and on outputs. Admin-token, trusted-proxy SSO, or OIDC/JWT bearer requests can list usage, create generated-token keys, rotate/disable/update/delete admin-managed keys, provision SSO users through SCIM-compatible `/v1/prodex/gateway/scim/v2/Users`, inspect usage at `/v1/prodex/gateway/keys` and `/v1/prodex/gateway/usage`, read recent billing ledger records with response-status/output-token reconciliation at `/v1/prodex/gateway/ledger`, read aggregated billing totals at `/v1/prodex/gateway/ledger/summary`, export billing CSV from `/v1/prodex/gateway/ledger.csv` and `/v1/prodex/gateway/ledger/summary.csv`, scrape Prometheus text metrics at `/v1/prodex/gateway/metrics`, inspect provider adapter contracts at `/v1/prodex/gateway/providers` or offline with `prodex gateway providers --json`, inspect active observability and guardrail configuration at `/v1/prodex/gateway/observability` and `/v1/prodex/gateway/guardrails`, fetch the machine-readable gateway contract at `/v1/prodex/gateway/openapi.json`, and open the built-in gateway admin dashboard at `/v1/prodex/gateway/admin`; policy/env-backed keys remain read-only, SCIM users can carry tenant/team/project/user/budget scopes for SSO/OIDC fallback, admin-managed key and SCIM user mutations are recorded in `prodex audit`, and additional admin-plane tokens can be `admin` or read-only `viewer` with optional virtual-key prefix plus tenant/team/project/user/budget scopes. Configure defaults under `[gateway]` in `policy.toml`; validate provider catalog edits with `npm run catalog:providers`. The generated provider matrix lives in [docs/provider-capabilities.md](./docs/provider-capabilities.md).
99
99
 
100
+ The gateway can enforce optional model-aware request constraints under `[gateway.request_constraints]`; compatibility defaults leave enforcement disabled and oversized output requests unchanged. Admin/viewer principals can use the dashboard Route Workbench or `POST /v1/prodex/gateway/routes/explain` to inspect the same bounded planner trace without sending upstream traffic or mutating quota, billing, affinity, circuit, admission, or persisted runtime state. Explain payloads and prompt content are not logged or stored.
101
+
102
+ Enterprise OTLP export endpoints from `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` or `OTEL_EXPORTER_OTLP_ENDPOINT` must be absolute `http://` or `https://` URLs without whitespace, userinfo, query strings, or fragments; put collector credentials in `OTEL_EXPORTER_OTLP_HEADERS`. `prodex-control-plane plan-http-control-plane` request files must use the top-level `principal` field and non-credential HTTP headers, because `Authorization` headers are rejected.
103
+
100
104
  `[gateway.adaptive_routing]` is a shadow-mode foundation for owner-attributed quality feedback and route recommendations. Live gateway routing remains deterministic unless a future explicit adaptive policy is enabled, and continuation affinity still wins over any recommendation.
101
105
 
102
106
  JavaScript clients can use `@christiandoxa/prodex-gateway-sdk` for `/v1/responses` plus gateway key, usage, billing ledger, metrics, and OpenAPI admin calls.
@@ -237,6 +241,8 @@ Interactive `prodex login` now asks for the login method before starting a brows
237
241
  printf '%s\n' "$OPENAI_API_KEY" | prodex login --with-api-key --base-url http://localhost:11434/v1
238
242
  ```
239
243
 
244
+ Migration note: endpoint and base-URL inputs are credential-free. Runtime and quota `--base-url` values, Super `--url`, `CODEX_CHATGPT_BASE_URL`, stored OpenAI-compatible profile URLs, Presidio Analyzer/Anonymizer URLs, and gateway webhook/HTTP telemetry endpoints must be absolute `http` or `https` URLs with a host and no userinfo, password, query, or fragment. Move credentials to the existing API-key, auth-token, bearer-token environment, or secret-file inputs. Legacy embedded-credential URLs now fail closed before a request, log, broker registry, or child launch plan is created instead of being normalized or partially stripped.
245
+
240
246
  </details>
241
247
 
242
248
  <details>
@@ -331,7 +337,7 @@ prodex caveman rtk ponytail --full-access
331
337
 
332
338
  Answer `y` at the Presidio prompt, or pass `--presidio`, to add runtime PII redaction. Use `--no-presidio` for non-interactive launches. Full access maps to Codex's sandbox bypass and trusts only the launch directory for that session.
333
339
 
334
- `prodex s expose` starts a token-protected browser terminal and uses a Cloudflare quick tunnel when `cloudflared` is available. Add `--no-tunnel` for loopback-only access.
340
+ `prodex s expose` starts a loopback-only browser terminal with a one-time session URL. Add `--tunnel` to explicitly publish the remote shell through a Cloudflare quick tunnel; the local listener remains bound to loopback.
335
341
 
336
342
  Smart Context preserves continuation metadata and critical signals while applying deterministic, validated context rewriting. See [docs/smart-context.md](docs/smart-context.md) for its safety model and rollout controls.
337
343
 
@@ -582,11 +588,12 @@ Use `--provider anthropic` when you want the Codex/Super front end with Anthropi
582
588
  ```bash
583
589
  prodex login --with-claude
584
590
  prodex s --provider anthropic --model claude-sonnet-4-6
585
- prodex s --provider anthropic --model claude-sonnet-4-6 --api-key "$ANTHROPIC_API_KEY"
586
591
  ```
587
592
 
588
593
  If `--api-key` is omitted, Prodex uses the Anthropic profile created by `prodex login --with-claude` or `prodex profile import claude`. API-key mode still reads `ANTHROPIC_API_KEY`; `ANTHROPIC_API_KEYS` may contain multiple comma-, semicolon-, or newline-separated keys for round-robin request rotation and pre-commit retry on auth/quota/rate/temporary failures. This path injects a temporary `prodex-anthropic` Codex provider, exposes a local `/v1/responses` adapter to Codex, forwards to Anthropic's OpenAI-compatible chat API, and keeps quota preflight disabled. `prodex quota --all --provider anthropic` shows OAuth readiness for Anthropic profiles; set `ANTHROPIC_ADMIN_KEY` when you want Anthropic Admin rate-limit groups included.
589
594
 
595
+ Provider-backed Super launches consume supported provider API-key environment variables in the local Prodex proxy and remove them from the spawned Codex environment. Child MCP servers or tools that previously relied on inheriting those variables must configure their own credential source explicitly.
596
+
590
597
  Use `--provider copilot` when you want the Codex/Super front end with GitHub Copilot upstream:
591
598
 
592
599
  ```bash
@@ -609,7 +616,7 @@ prodex super --cli kiro --profile kiro-main
609
616
  Use `--provider deepseek` when you want the Codex/Super front end with DeepSeek as the upstream model:
610
617
 
611
618
  ```bash
612
- prodex s deepseek --model deepseek-v4-pro --api-key "$DEEPSEEK_API_KEY"
619
+ prodex s deepseek --model deepseek-v4-pro
613
620
  ```
614
621
 
615
622
  If `--api-key` is omitted, Prodex reads `DEEPSEEK_API_KEY`; `DEEPSEEK_API_KEYS` may contain multiple comma-, semicolon-, or newline-separated keys for round-robin request rotation and pre-commit retry on auth/quota/rate/temporary failures. This path injects a temporary `prodex-deepseek` Codex provider, exposes a local `/v1/responses` adapter to Codex, forwards to DeepSeek's OpenAI-format chat API, and keeps quota preflight disabled. Prodex also injects a one-model Codex catalog for the selected DeepSeek model, so `/model` stays on that model and offers the DeepSeek-compatible `high`/`xhigh` effort choices. `prodex quota --all --provider deepseek` reads the same `DEEPSEEK_API_KEY(S)` environment and fetches DeepSeek `/user/balance`. Available Super optimizer tools remain local Prodex overlay additions around Codex. Remote compact is not implemented for this adapter yet, so the default DeepSeek context window is large and `--auto-compact-token-limit` defaults high.
@@ -654,7 +661,6 @@ prodex s gemini
654
661
  prodex s gemini --cli gemini
655
662
  prodex s gemini --cli agy
656
663
  GEMINI_API_KEY=... prodex s gemini --model gemini-2.5-pro
657
- prodex s gemini --model gemini-2.5-pro --api-key "$GEMINI_API_KEY"
658
664
  ```
659
665
 
660
666
  Without `--api-key`, Prodex uses the Google OAuth profile created by `prodex login --with-google` or the interactive Google sign-in choice, then routes through Google's Code Assist Gemini endpoint. Google login verifies Code Assist readiness before creating or updating the profile, and may open a second browser page if Google requires account verification. With `--api-key`, or `GEMINI_API_KEY(S)` / `GOOGLE_API_KEY(S)`, Prodex converts Codex Responses requests to Chat Completions and sends them through Google's documented `/v1beta/openai/chat/completions` endpoint with Bearer authentication. Streaming, function calls, continuations, and Gemini `reasoning_effort` values are converted back into Codex Responses semantics. Plural key env vars may be comma-, semicolon-, or newline-separated and can rotate before commit on auth/quota/rate/temporary failures. OAuth sessions keep fresh Gemini requests sticky to the previous successful profile by default for smoother Codex-style continuity; set `PRODEX_GEMINI_STICKY_FRESH_OAUTH=0` to restore pure fresh-request round robin. The default model is `auto`, matching Gemini CLI-style model routing through Gemini 3 and stable fallbacks; launch-time Gemini `modelConfigs` / `modelIdResolutions` / `modelChains` are projected into the Codex catalog and runtime fallback snapshot when configured. The injected catalog exposes Gemini reasoning efforts with the 2.5 default thinking budget of 8192 where budget mode is used. `prodex quota` reads the same Google OAuth profile and fetches Gemini Code Assist `retrieveUserQuota` bucket data. Available Super optimizer tools remain local Prodex overlay additions around Codex on this path.
@@ -745,6 +751,13 @@ prodex profile remove second
745
751
  prodex profile remove --all
746
752
  ```
747
753
 
754
+ Password-protected exports now use the version-2 Argon2id envelope. Imports stay
755
+ compatible with existing version-1 PBKDF2 bundles.
756
+
757
+ Imports require a current-user-owned private bundle below trusted directories.
758
+ For an existing Unix bundle, correct its ownership and run `chmod 600 backup.json`,
759
+ or re-export it. On Windows, the bundle must have a private current-user owner/DACL.
760
+
748
761
  </details>
749
762
 
750
763
  ## Local model support
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christiandoxa/prodex",
3
- "version": "0.275.0",
3
+ "version": "0.277.0",
4
4
  "description": "Multi-provider Codex wrapper with OpenAI quota-aware routing and Claude Code support",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -16,12 +16,12 @@
16
16
  "@openai/codex": "latest"
17
17
  },
18
18
  "optionalDependencies": {
19
- "@christiandoxa/prodex-linux-x64": "0.275.0",
20
- "@christiandoxa/prodex-linux-arm64": "0.275.0",
21
- "@christiandoxa/prodex-darwin-x64": "0.275.0",
22
- "@christiandoxa/prodex-darwin-arm64": "0.275.0",
23
- "@christiandoxa/prodex-win32-x64": "0.275.0",
24
- "@christiandoxa/prodex-win32-arm64": "0.275.0",
19
+ "@christiandoxa/prodex-linux-x64": "0.277.0",
20
+ "@christiandoxa/prodex-linux-arm64": "0.277.0",
21
+ "@christiandoxa/prodex-darwin-x64": "0.277.0",
22
+ "@christiandoxa/prodex-darwin-arm64": "0.277.0",
23
+ "@christiandoxa/prodex-win32-x64": "0.277.0",
24
+ "@christiandoxa/prodex-win32-arm64": "0.277.0",
25
25
  "@openai/codex-linux-x64": "npm:@openai/codex@linux-x64",
26
26
  "@openai/codex-linux-arm64": "npm:@openai/codex@linux-arm64",
27
27
  "@openai/codex-darwin-x64": "npm:@openai/codex@darwin-x64",