codex-multi-auth 2.17.3 → 2.19.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.
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +10 -4
- package/config/README.md +1 -1
- package/config/codex-legacy.json +12 -212
- package/config/codex-modern.json +4 -80
- package/config/minimal-codex.json +1 -1
- package/dist/lib/account-policy.d.ts +3 -1
- package/dist/lib/account-policy.js +21 -5
- package/dist/lib/codex-manager/commands/history.js +3 -1
- package/dist/lib/codex-manager/commands/status.js +8 -3
- package/dist/lib/codex-manager/formatters/subscription-status.d.ts +16 -0
- package/dist/lib/codex-manager/formatters/subscription-status.js +69 -0
- package/dist/lib/codex-manager/health-check.js +17 -12
- package/dist/lib/codex-manager/quota-cache-helpers.js +8 -4
- package/dist/lib/context-budget/model-context-windows.d.ts +1 -1
- package/dist/lib/context-budget/model-context-windows.js +10 -13
- package/dist/lib/model-route-policy.d.ts +1 -1
- package/dist/lib/oc-chatgpt-target-detection.d.ts +3 -2
- package/dist/lib/oc-chatgpt-target-detection.js +40 -13
- package/dist/lib/quota-cache.d.ts +6 -0
- package/dist/lib/quota-cache.js +33 -16
- package/dist/lib/quota-probe.d.ts +3 -0
- package/dist/lib/quota-probe.js +5 -4
- package/dist/lib/quota-readiness.d.ts +1 -1
- package/dist/lib/quota-readiness.js +6 -2
- package/dist/lib/request/error-classification.js +41 -52
- package/dist/lib/request/fetch-helpers.js +1 -1
- package/dist/lib/request/helpers/model-map.d.ts +2 -2
- package/dist/lib/request/helpers/model-map.js +120 -78
- package/dist/lib/request/request-transformer.d.ts +1 -1
- package/dist/lib/request/request-transformer.js +1 -1
- package/dist/lib/runtime/account-model-catalog.d.ts +1 -1
- package/dist/lib/runtime/model-discovery-status.d.ts +2 -2
- package/dist/lib/runtime/subscription-first-use.js +1 -1
- package/dist/lib/ui/ui-copy.d.ts +1 -1
- package/dist/lib/ui/ui-copy.js +1 -1
- package/dist/lib/usage/pricing.d.ts +1 -1
- package/dist/lib/usage/pricing.js +41 -16
- package/package.json +2 -2
- package/scripts/codex.js +167 -85
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/account-policy.d.ts.map +0 -1
- package/dist/lib/accounts/rate-limits.d.ts.map +0 -1
- package/dist/lib/accounts.d.ts.map +0 -1
- package/dist/lib/api-route-store.d.ts.map +0 -1
- package/dist/lib/audit.d.ts.map +0 -1
- package/dist/lib/auth/account-access.d.ts.map +0 -1
- package/dist/lib/auth/auth.d.ts.map +0 -1
- package/dist/lib/auth/browser.d.ts.map +0 -1
- package/dist/lib/auth/callback-guidance.d.ts.map +0 -1
- package/dist/lib/auth/device-auth.d.ts.map +0 -1
- package/dist/lib/auth/index.d.ts.map +0 -1
- package/dist/lib/auth/org-override.d.ts.map +0 -1
- package/dist/lib/auth/server.d.ts.map +0 -1
- package/dist/lib/auth/token-utils.d.ts.map +0 -1
- package/dist/lib/auth-rate-limit.d.ts.map +0 -1
- package/dist/lib/budget-guard.d.ts.map +0 -1
- package/dist/lib/capability-policy.d.ts.map +0 -1
- package/dist/lib/circuit-breaker.d.ts.map +0 -1
- package/dist/lib/cli.d.ts.map +0 -1
- package/dist/lib/codex-cli/index.d.ts.map +0 -1
- package/dist/lib/codex-cli/observability.d.ts.map +0 -1
- package/dist/lib/codex-cli/state.d.ts.map +0 -1
- package/dist/lib/codex-cli/sync.d.ts.map +0 -1
- package/dist/lib/codex-cli/writer.d.ts.map +0 -1
- package/dist/lib/codex-manager/account-credentials.d.ts.map +0 -1
- package/dist/lib/codex-manager/account-manager-commands.d.ts.map +0 -1
- package/dist/lib/codex-manager/account-pool-write.d.ts.map +0 -1
- package/dist/lib/codex-manager/api-login-menu.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-category-entry.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-category-helpers.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-category-prompt.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-settings-controller.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-settings-entry.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-settings-prompt.d.ts.map +0 -1
- package/dist/lib/codex-manager/backend-settings-schema.d.ts.map +0 -1
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/account.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/best.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/bridge.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/budget.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/check.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/config-explain.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/debug-bundle.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/forecast.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/history.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/init-config.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/integrations.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/limits.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/models.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/monitor.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/report.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/resets.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/rotation.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/status.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/switch.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/uninstall.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/unpin.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/usage.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/verify.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/why-selected.d.ts.map +0 -1
- package/dist/lib/codex-manager/commands/workspace.d.ts.map +0 -1
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts.map +0 -1
- package/dist/lib/codex-manager/dashboard-formatters.d.ts.map +0 -1
- package/dist/lib/codex-manager/dashboard-settings-controller.d.ts.map +0 -1
- package/dist/lib/codex-manager/dashboard-settings-data.d.ts.map +0 -1
- package/dist/lib/codex-manager/dashboard-settings-entry.d.ts.map +0 -1
- package/dist/lib/codex-manager/experimental-settings-entry.d.ts.map +0 -1
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts.map +0 -1
- package/dist/lib/codex-manager/experimental-settings-schema.d.ts.map +0 -1
- package/dist/lib/codex-manager/experimental-sync-target-entry.d.ts.map +0 -1
- package/dist/lib/codex-manager/experimental-sync-target.d.ts.map +0 -1
- package/dist/lib/codex-manager/forecast-report-shared.d.ts.map +0 -1
- package/dist/lib/codex-manager/formatters/account-formatters.d.ts.map +0 -1
- package/dist/lib/codex-manager/formatters/index.d.ts.map +0 -1
- package/dist/lib/codex-manager/formatters/model-formatters.d.ts.map +0 -1
- package/dist/lib/codex-manager/formatters/quota-formatters.d.ts.map +0 -1
- package/dist/lib/codex-manager/formatters/text-style.d.ts.map +0 -1
- package/dist/lib/codex-manager/health-check.d.ts.map +0 -1
- package/dist/lib/codex-manager/help.d.ts.map +0 -1
- package/dist/lib/codex-manager/login-action-panel.d.ts.map +0 -1
- package/dist/lib/codex-manager/login-flow.d.ts.map +0 -1
- package/dist/lib/codex-manager/login-menu-actions.d.ts.map +0 -1
- package/dist/lib/codex-manager/login-menu-data.d.ts.map +0 -1
- package/dist/lib/codex-manager/login-oauth.d.ts.map +0 -1
- package/dist/lib/codex-manager/login-workspace-choice.d.ts.map +0 -1
- package/dist/lib/codex-manager/manual-callback.d.ts.map +0 -1
- package/dist/lib/codex-manager/persist-selected-account.d.ts.map +0 -1
- package/dist/lib/codex-manager/quota-cache-helpers.d.ts.map +0 -1
- package/dist/lib/codex-manager/rate-limit-markers.d.ts.map +0 -1
- package/dist/lib/codex-manager/repair-commands.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub/backend.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub/experimental.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub/index.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub/shared.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub-entry.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub-menu.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub-prompt.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-hub.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-panels.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-persist-utils.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-preview.d.ts.map +0 -1
- package/dist/lib/codex-manager/settings-write-queue.d.ts.map +0 -1
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts.map +0 -1
- package/dist/lib/codex-manager/theme-settings-panel.d.ts.map +0 -1
- package/dist/lib/codex-manager/unified-settings-controller.d.ts.map +0 -1
- package/dist/lib/codex-manager/unified-settings-entry.d.ts.map +0 -1
- package/dist/lib/codex-manager.d.ts.map +0 -1
- package/dist/lib/concurrency.d.ts.map +0 -1
- package/dist/lib/config-schema.d.ts.map +0 -1
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/context-budget/model-context-windows.d.ts.map +0 -1
- package/dist/lib/context-budget-guard.d.ts.map +0 -1
- package/dist/lib/context-budget-response.d.ts.map +0 -1
- package/dist/lib/context-overflow.d.ts.map +0 -1
- package/dist/lib/dashboard-settings.d.ts.map +0 -1
- package/dist/lib/entitlement-cache.d.ts.map +0 -1
- package/dist/lib/env-parsing.d.ts.map +0 -1
- package/dist/lib/errors.d.ts.map +0 -1
- package/dist/lib/forecast.d.ts.map +0 -1
- package/dist/lib/fs-retry.d.ts.map +0 -1
- package/dist/lib/health.d.ts.map +0 -1
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/integration-generators.d.ts.map +0 -1
- package/dist/lib/live-account-sync.d.ts.map +0 -1
- package/dist/lib/local-bridge.d.ts.map +0 -1
- package/dist/lib/local-client-tokens.d.ts.map +0 -1
- package/dist/lib/logger.d.ts.map +0 -1
- package/dist/lib/model-capability-matrix.d.ts.map +0 -1
- package/dist/lib/model-route-policy.d.ts.map +0 -1
- package/dist/lib/named-backup-export.d.ts.map +0 -1
- package/dist/lib/oc-chatgpt-import-adapter.d.ts.map +0 -1
- package/dist/lib/oc-chatgpt-orchestrator.d.ts.map +0 -1
- package/dist/lib/oc-chatgpt-target-detection.d.ts.map +0 -1
- package/dist/lib/parallel-probe.d.ts.map +0 -1
- package/dist/lib/policy/runtime-policy.d.ts.map +0 -1
- package/dist/lib/preemptive-quota-scheduler.d.ts.map +0 -1
- package/dist/lib/proactive-refresh.d.ts.map +0 -1
- package/dist/lib/prompts/codex-host-bridge.d.ts.map +0 -1
- package/dist/lib/prompts/codex.d.ts.map +0 -1
- package/dist/lib/prompts/fetch-utils.d.ts.map +0 -1
- package/dist/lib/prompts/host-codex-prompt.d.ts.map +0 -1
- package/dist/lib/quota-cache.d.ts.map +0 -1
- package/dist/lib/quota-probe.d.ts.map +0 -1
- package/dist/lib/quota-readiness.d.ts.map +0 -1
- package/dist/lib/recovery/constants.d.ts.map +0 -1
- package/dist/lib/recovery/storage.d.ts.map +0 -1
- package/dist/lib/recovery/types.d.ts.map +0 -1
- package/dist/lib/recovery.d.ts.map +0 -1
- package/dist/lib/redaction.d.ts.map +0 -1
- package/dist/lib/refresh-guardian.d.ts.map +0 -1
- package/dist/lib/refresh-lease.d.ts.map +0 -1
- package/dist/lib/refresh-queue.d.ts.map +0 -1
- package/dist/lib/request/client-cancellation.d.ts.map +0 -1
- package/dist/lib/request/error-classification.d.ts.map +0 -1
- package/dist/lib/request/failover-config.d.ts.map +0 -1
- package/dist/lib/request/failure-policy.d.ts.map +0 -1
- package/dist/lib/request/fetch-helpers.d.ts.map +0 -1
- package/dist/lib/request/headers.d.ts.map +0 -1
- package/dist/lib/request/helpers/input-utils.d.ts.map +0 -1
- package/dist/lib/request/helpers/model-map.d.ts.map +0 -1
- package/dist/lib/request/helpers/tool-utils.d.ts.map +0 -1
- package/dist/lib/request/index.d.ts.map +0 -1
- package/dist/lib/request/rate-limit-backoff.d.ts.map +0 -1
- package/dist/lib/request/rate-limit-decision.d.ts.map +0 -1
- package/dist/lib/request/request-attempt-budget.d.ts.map +0 -1
- package/dist/lib/request/request-init.d.ts.map +0 -1
- package/dist/lib/request/request-resilience.d.ts.map +0 -1
- package/dist/lib/request/request-transformer.d.ts.map +0 -1
- package/dist/lib/request/response-compaction.d.ts.map +0 -1
- package/dist/lib/request/response-handler.d.ts.map +0 -1
- package/dist/lib/request/response-metadata.d.ts.map +0 -1
- package/dist/lib/request/response-outcome.d.ts.map +0 -1
- package/dist/lib/request/stream-failover-runtime.d.ts.map +0 -1
- package/dist/lib/request/stream-failover.d.ts.map +0 -1
- package/dist/lib/request/token-refresh.d.ts.map +0 -1
- package/dist/lib/request/url-rewriting.d.ts.map +0 -1
- package/dist/lib/request/wait-utils.d.ts.map +0 -1
- package/dist/lib/rotation.d.ts.map +0 -1
- package/dist/lib/routing-mutex.d.ts.map +0 -1
- package/dist/lib/routing-profiles.d.ts.map +0 -1
- package/dist/lib/runtime/account-check-helpers.d.ts.map +0 -1
- package/dist/lib/runtime/account-check-types.d.ts.map +0 -1
- package/dist/lib/runtime/account-check.d.ts.map +0 -1
- package/dist/lib/runtime/account-manager-cache-entry.d.ts.map +0 -1
- package/dist/lib/runtime/account-manager-cache.d.ts.map +0 -1
- package/dist/lib/runtime/account-model-catalog.d.ts.map +0 -1
- package/dist/lib/runtime/account-pool.d.ts.map +0 -1
- package/dist/lib/runtime/account-reset-credits.d.ts.map +0 -1
- package/dist/lib/runtime/account-scope.d.ts.map +0 -1
- package/dist/lib/runtime/account-select-event.d.ts.map +0 -1
- package/dist/lib/runtime/account-selection.d.ts.map +0 -1
- package/dist/lib/runtime/account-state.d.ts.map +0 -1
- package/dist/lib/runtime/account-status.d.ts.map +0 -1
- package/dist/lib/runtime/account-storage-scope-entry.d.ts.map +0 -1
- package/dist/lib/runtime/api-model-capabilities.d.ts.map +0 -1
- package/dist/lib/runtime/api-model-runtime.d.ts.map +0 -1
- package/dist/lib/runtime/app-bind.d.ts.map +0 -1
- package/dist/lib/runtime/app-helper-selection.d.ts.map +0 -1
- package/dist/lib/runtime/auth-facade.d.ts.map +0 -1
- package/dist/lib/runtime/automatic-account-checks.d.ts.map +0 -1
- package/dist/lib/runtime/automatic-subscription-checks.d.ts.map +0 -1
- package/dist/lib/runtime/browser-oauth-flow.d.ts.map +0 -1
- package/dist/lib/runtime/capability-boost.d.ts.map +0 -1
- package/dist/lib/runtime/catalog-capabilities.d.ts.map +0 -1
- package/dist/lib/runtime/config-toml.d.ts.map +0 -1
- package/dist/lib/runtime/context-budget-settings.d.ts.map +0 -1
- package/dist/lib/runtime/event-handler.d.ts.map +0 -1
- package/dist/lib/runtime/first-run.d.ts.map +0 -1
- package/dist/lib/runtime/flagged-verify-types.d.ts.map +0 -1
- package/dist/lib/runtime/hydrate-emails.d.ts.map +0 -1
- package/dist/lib/runtime/inference-activity.d.ts.map +0 -1
- package/dist/lib/runtime/live-sync-entry.d.ts.map +0 -1
- package/dist/lib/runtime/live-sync.d.ts.map +0 -1
- package/dist/lib/runtime/loader-setup.d.ts.map +0 -1
- package/dist/lib/runtime/login-menu-accounts.d.ts.map +0 -1
- package/dist/lib/runtime/manual-oauth-flow.d.ts.map +0 -1
- package/dist/lib/runtime/model-discovery-status.d.ts.map +0 -1
- package/dist/lib/runtime/native-account-storage.d.ts.map +0 -1
- package/dist/lib/runtime/native-account-sync.d.ts.map +0 -1
- package/dist/lib/runtime/native-binding-lock.d.ts.map +0 -1
- package/dist/lib/runtime/native-client-auth.d.ts.map +0 -1
- package/dist/lib/runtime/native-provider-config.d.ts.map +0 -1
- package/dist/lib/runtime/native-rate-limits.d.ts.map +0 -1
- package/dist/lib/runtime/preemptive-quota.d.ts.map +0 -1
- package/dist/lib/runtime/quota-headers.d.ts.map +0 -1
- package/dist/lib/runtime/quota-probe.d.ts.map +0 -1
- package/dist/lib/runtime/quota-settings.d.ts.map +0 -1
- package/dist/lib/runtime/refresh-guardian-entry.d.ts.map +0 -1
- package/dist/lib/runtime/refresh-guardian.d.ts.map +0 -1
- package/dist/lib/runtime/request-init.d.ts.map +0 -1
- package/dist/lib/runtime/reset-credit-routing.d.ts.map +0 -1
- package/dist/lib/runtime/reset-credits.d.ts.map +0 -1
- package/dist/lib/runtime/response-output-history.d.ts.map +0 -1
- package/dist/lib/runtime/responses-websocket.d.ts.map +0 -1
- package/dist/lib/runtime/resume-picker.d.ts.map +0 -1
- package/dist/lib/runtime/rotation-account-selection.d.ts.map +0 -1
- package/dist/lib/runtime/rotation-proxy-state.d.ts.map +0 -1
- package/dist/lib/runtime/rotation-server-types.d.ts.map +0 -1
- package/dist/lib/runtime/rotation-storage-meta.d.ts.map +0 -1
- package/dist/lib/runtime/rotation-token-refresh.d.ts.map +0 -1
- package/dist/lib/runtime/runtime-capability-failures.d.ts.map +0 -1
- package/dist/lib/runtime/runtime-current-account.d.ts.map +0 -1
- package/dist/lib/runtime/runtime-observability.d.ts.map +0 -1
- package/dist/lib/runtime/runtime-services.d.ts.map +0 -1
- package/dist/lib/runtime/session-affinity-entry.d.ts.map +0 -1
- package/dist/lib/runtime/session-recovery.d.ts.map +0 -1
- package/dist/lib/runtime/status-marker.d.ts.map +0 -1
- package/dist/lib/runtime/storage-scope.d.ts.map +0 -1
- package/dist/lib/runtime/subscription-first-use.d.ts.map +0 -1
- package/dist/lib/runtime/subscription-quota-event.d.ts.map +0 -1
- package/dist/lib/runtime/subscription-quota-order.d.ts.map +0 -1
- package/dist/lib/runtime/toast.d.ts.map +0 -1
- package/dist/lib/runtime/ui-runtime-entry.d.ts.map +0 -1
- package/dist/lib/runtime/ui-runtime.d.ts.map +0 -1
- package/dist/lib/runtime/verify-flagged.d.ts.map +0 -1
- package/dist/lib/runtime/workspace-model-scopes.d.ts.map +0 -1
- package/dist/lib/runtime-constants.d.ts.map +0 -1
- package/dist/lib/runtime-paths.d.ts.map +0 -1
- package/dist/lib/runtime-rotation-proxy.d.ts.map +0 -1
- package/dist/lib/schemas.d.ts.map +0 -1
- package/dist/lib/session-affinity.d.ts.map +0 -1
- package/dist/lib/shutdown.d.ts.map +0 -1
- package/dist/lib/storage/account-clear-entry.d.ts.map +0 -1
- package/dist/lib/storage/account-clear.d.ts.map +0 -1
- package/dist/lib/storage/account-match-utils.d.ts.map +0 -1
- package/dist/lib/storage/account-persistence.d.ts.map +0 -1
- package/dist/lib/storage/account-port.d.ts.map +0 -1
- package/dist/lib/storage/account-save-entry.d.ts.map +0 -1
- package/dist/lib/storage/account-save.d.ts.map +0 -1
- package/dist/lib/storage/account-snapshot.d.ts.map +0 -1
- package/dist/lib/storage/backup-metadata-builder.d.ts.map +0 -1
- package/dist/lib/storage/backup-metadata.d.ts.map +0 -1
- package/dist/lib/storage/backup-paths.d.ts.map +0 -1
- package/dist/lib/storage/backup-restore.d.ts.map +0 -1
- package/dist/lib/storage/cache-artifacts.d.ts.map +0 -1
- package/dist/lib/storage/credential-sidecars.d.ts.map +0 -1
- package/dist/lib/storage/error-hints.d.ts.map +0 -1
- package/dist/lib/storage/file-lock.d.ts.map +0 -1
- package/dist/lib/storage/file-paths.d.ts.map +0 -1
- package/dist/lib/storage/fixture-guards.d.ts.map +0 -1
- package/dist/lib/storage/flagged-entry.d.ts.map +0 -1
- package/dist/lib/storage/flagged-load-entry.d.ts.map +0 -1
- package/dist/lib/storage/flagged-save-entry.d.ts.map +0 -1
- package/dist/lib/storage/flagged-storage-file.d.ts.map +0 -1
- package/dist/lib/storage/flagged-storage-io.d.ts.map +0 -1
- package/dist/lib/storage/flagged-storage.d.ts.map +0 -1
- package/dist/lib/storage/gitignore.d.ts.map +0 -1
- package/dist/lib/storage/hash.d.ts.map +0 -1
- package/dist/lib/storage/health.d.ts.map +0 -1
- package/dist/lib/storage/identity.d.ts.map +0 -1
- package/dist/lib/storage/import-export.d.ts.map +0 -1
- package/dist/lib/storage/metadata-section.d.ts.map +0 -1
- package/dist/lib/storage/migrations.d.ts.map +0 -1
- package/dist/lib/storage/named-backup-entry.d.ts.map +0 -1
- package/dist/lib/storage/named-backups-entry.d.ts.map +0 -1
- package/dist/lib/storage/named-backups.d.ts.map +0 -1
- package/dist/lib/storage/path-state.d.ts.map +0 -1
- package/dist/lib/storage/paths.d.ts.map +0 -1
- package/dist/lib/storage/pending-auth.d.ts.map +0 -1
- package/dist/lib/storage/project-migration.d.ts.map +0 -1
- package/dist/lib/storage/public-types.d.ts.map +0 -1
- package/dist/lib/storage/record-identity.d.ts.map +0 -1
- package/dist/lib/storage/record-utils.d.ts.map +0 -1
- package/dist/lib/storage/restore-assessment.d.ts.map +0 -1
- package/dist/lib/storage/restore-backup-entry.d.ts.map +0 -1
- package/dist/lib/storage/restore-metadata.d.ts.map +0 -1
- package/dist/lib/storage/save-retry.d.ts.map +0 -1
- package/dist/lib/storage/snapshot-inspectors.d.ts.map +0 -1
- package/dist/lib/storage/snapshot-merge.d.ts.map +0 -1
- package/dist/lib/storage/storage-parser.d.ts.map +0 -1
- package/dist/lib/storage/transactions.d.ts.map +0 -1
- package/dist/lib/storage.d.ts.map +0 -1
- package/dist/lib/synthetic-response.d.ts.map +0 -1
- package/dist/lib/table-formatter.d.ts.map +0 -1
- package/dist/lib/temp-path.d.ts.map +0 -1
- package/dist/lib/tools/hashline-tools.d.ts.map +0 -1
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/ui/ansi.d.ts.map +0 -1
- package/dist/lib/ui/auth-menu-builder.d.ts.map +0 -1
- package/dist/lib/ui/auth-menu.d.ts.map +0 -1
- package/dist/lib/ui/check-progress.d.ts.map +0 -1
- package/dist/lib/ui/confirm.d.ts.map +0 -1
- package/dist/lib/ui/display-width.d.ts.map +0 -1
- package/dist/lib/ui/format.d.ts.map +0 -1
- package/dist/lib/ui/index.d.ts.map +0 -1
- package/dist/lib/ui/runtime.d.ts.map +0 -1
- package/dist/lib/ui/select.d.ts.map +0 -1
- package/dist/lib/ui/theme.d.ts.map +0 -1
- package/dist/lib/ui/ui-copy.d.ts.map +0 -1
- package/dist/lib/unified-settings.d.ts.map +0 -1
- package/dist/lib/update-notice.d.ts.map +0 -1
- package/dist/lib/usage/index.d.ts.map +0 -1
- package/dist/lib/usage/ledger.d.ts.map +0 -1
- package/dist/lib/usage/pricing.d.ts.map +0 -1
- package/dist/lib/usage/redaction.d.ts.map +0 -1
- package/dist/lib/usage/stream-usage-deferral.d.ts.map +0 -1
- package/dist/lib/usage/types.d.ts.map +0 -1
- package/dist/lib/usage/usage-extraction.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/wsl.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-multi-auth",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Install and operate codex-multi-auth for the official @openai/codex CLI with multi-account OAuth rotation, switching, health checks, and recovery tools.",
|
|
5
5
|
"interface": {
|
|
6
6
|
"composerIcon": "./assets/codex-multi-auth-icon.svg"
|
package/README.md
CHANGED
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
[](https://github.com/ndycode/codex-multi-auth/actions/workflows/ci.yml)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
+
<img width="1270" height="729" alt="codex-multi-auth terminal dashboard for Codex CLI multi-account OAuth account status" src="https://github.com/user-attachments/assets/0cecb77e-a6d3-432a-ba48-3577db0c7093" />
|
|
9
|
+
|
|
8
10
|
`codex-multi-auth` is a multi-account OAuth manager for the official `@openai/codex` CLI. It keeps a named pool of ChatGPT sign-ins on your machine, lets you switch the active account, and — when you run Codex through its optional wrapper — rotates accounts across live requests through a loopback-only proxy. It never installs or shadows a `codex` binary; the official OpenAI install keeps owning that command.
|
|
9
11
|
|
|
10
12
|
Use it when one Codex account is not enough: you hit rate limits or quota windows, you split work across organizations and workspaces, you want per-project account pools, or you run unattended agents that need JSON diagnostics and safe repair commands instead of one opaque auth file.
|
|
11
13
|
|
|
14
|
+
Using OpenCode rather than the Codex CLI? The sibling project [`oc-codex-multi-auth`](https://github.com/ndycode/oc-codex-multi-auth) is the plugin that manages the same kind of account pool there.
|
|
15
|
+
|
|
12
16
|
## What it does
|
|
13
17
|
|
|
14
18
|
- **Account pool** — OAuth login for multiple ChatGPT accounts, stored locally under `~/.codex/multi-auth` (files `0600`, directories `0700`), with per-project pools under `projects/<project-key>/`.
|
|
@@ -71,7 +75,7 @@ mcodex # same wrapper, shorter name
|
|
|
71
75
|
| Accounts | `login`, `list`, `status`, `switch <i>`, `unpin`, `workspace` | sign in, inspect the pool, pin or switch the active account, pick workspaces |
|
|
72
76
|
| Selection | `forecast`, `best`, `why-selected`, `check`, `limits`, `models` | preview, explain, and probe which account serves the next request |
|
|
73
77
|
| Runtime | `rotation status` `enable` `disable` `bind-app` `unbind-app` `reset-runtime` `reset-rate-limits` | inspect and control live rotation and the app bind |
|
|
74
|
-
| Repair | `fix`, `doctor`, `verify`, `verify-flagged`, `uninstall` | diagnose and repair storage, flagged accounts, and install residue |
|
|
78
|
+
| Repair | `fix`, `doctor`, `report`, `verify`, `verify-flagged`, `uninstall` | diagnose and repair storage, flagged accounts, and install residue; machine-readable health report |
|
|
75
79
|
| Governance | `usage`, `budget`, `account`, `monitor`, `history`, `resets` | usage ledger, budget limits, tags/weights/pause/drain, snapshots |
|
|
76
80
|
| Local clients | `bridge`, `integrations` | bearer tokens and client snippets for the loopback bridge |
|
|
77
81
|
| Config | `config explain` `template`, `init-config`, `debug bundle`, `features` | effective-config report, config templates, sanitized debug bundle |
|
|
@@ -81,7 +85,7 @@ Everyday examples:
|
|
|
81
85
|
```bash
|
|
82
86
|
codex-multi-auth switch 2 # pin account #2
|
|
83
87
|
codex-multi-auth report --live --json # full machine-readable health report
|
|
84
|
-
codex-multi-auth fix --live --model gpt-
|
|
88
|
+
codex-multi-auth fix --live --model gpt-6.1-sol # live repair probes with a chosen model
|
|
85
89
|
codex-multi-auth doctor --fix # diagnose and apply the safest fixes
|
|
86
90
|
codex-multi-auth usage --since 24h --by model # local usage ledger summary
|
|
87
91
|
codex-multi-auth rotation status # is live rotation enabled?
|
|
@@ -89,7 +93,7 @@ codex-multi-auth rotation status # is live rotation enabled?
|
|
|
89
93
|
|
|
90
94
|
## Runtime rotation, in one paragraph
|
|
91
95
|
|
|
92
|
-
With rotation on (the default), request-bearing wrapper commands — `exec`, `review`, `resume`, `fork`, `app`, and the bare TUI — route through a local proxy that picks the healthiest account per request, refreshes tokens as needed, and fails over across the pool on rate limits within a bounded retry budget. The proxy listens on loopback only, authenticates its own clients with a per-process token, forwards only Responses API
|
|
96
|
+
With rotation on (the default), request-bearing wrapper commands — `exec`, `review`, `resume`, `fork`, `app`, and the bare TUI — route through a local proxy that picks the healthiest account per request, refreshes tokens as needed, and fails over across the pool on rate limits within a bounded retry budget. The proxy listens on loopback only, authenticates its own clients with a per-process token, forwards only Responses API, model-discovery, image, and thread-goal calls, and never writes account emails or tokens to client headers or logs. Plain `codex` is never touched: rotation exists only inside `codex-multi-auth-codex`/`mcodex` sessions, or inside the packaged desktop app after an opt-in, reversible bind. Turn it off with `codex-multi-auth rotation disable` or `CODEX_MULTI_AUTH_RUNTIME_ROTATION_PROXY=0`.
|
|
93
97
|
|
|
94
98
|
## Where state lives
|
|
95
99
|
|
|
@@ -128,10 +132,12 @@ Common symptoms — wrong active account, OAuth callback port `1455` already bou
|
|
|
128
132
|
| [docs/faq.md](docs/faq.md) | Common questions |
|
|
129
133
|
| [docs/upgrade.md](docs/upgrade.md) | Version and legacy-package migration |
|
|
130
134
|
| [docs/privacy.md](docs/privacy.md) | Data handling and local storage behavior |
|
|
135
|
+
| [config/README.md](config/README.md) | Modern vs. legacy catalog templates |
|
|
136
|
+
| [CHANGELOG.md](CHANGELOG.md) | Release history (short version) |
|
|
131
137
|
|
|
132
138
|
## Release notes
|
|
133
139
|
|
|
134
|
-
- Current stable: [v2.
|
|
140
|
+
- Current stable: [v2.19.0](docs/releases/v2.19.0.md) — `npm i -g codex-multi-auth`
|
|
135
141
|
- Earlier stable lines: [v2.6.0](docs/releases/v2.6.0.md), [v2.5.0](docs/releases/v2.5.0.md)
|
|
136
142
|
- Full release archive: [docs/README.md#release-history](docs/README.md#release-history)
|
|
137
143
|
|
package/config/README.md
CHANGED
|
@@ -17,7 +17,7 @@ These files are optional model/provider templates for host/plugin configurations
|
|
|
17
17
|
|
|
18
18
|
## Defaults Included
|
|
19
19
|
|
|
20
|
-
- Current documented OpenAI/Codex model families: GPT-6
|
|
20
|
+
- Current documented OpenAI/Codex model families: GPT-6.1 Sol (`gpt-6.1-sol`, the default), GPT-6 Astra (`gpt-6-astra`), GPT-6 Sol (`gpt-6-sol`) and GPT-6 Luna (`gpt-6-luna`), then `gpt-5.6-sol`/`terra`/`luna`. Retired models (`gpt-5.5`/`gpt-5.5-pro`, `gpt-5.4*`, `gpt-5.3-codex` and older, plus the leaked `gpt-6-astra-aeon` slug) were removed from the picker; their ids still resolve to a replacement, see `docs/configuration.md`
|
|
21
21
|
- The GPT-6 entries carry `limit.context: 272000`, the `context_window` in the upstream Codex catalog. The GPT-5.6 entries still carry the pre-cut `372000` and were left alone here; change them only alongside a deliberate review, since the value feeds a picker rather than the context budget guard (which refuses to estimate either family)
|
|
22
22
|
- The Daybreak cyber models resolve at the code level but are deliberately absent from these templates, matching their hidden visibility in the upstream Codex picker
|
|
23
23
|
- `store: false`
|
package/config/codex-legacy.json
CHANGED
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
"store": false
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
|
-
"gpt-6-
|
|
169
|
-
"name": "GPT 6
|
|
168
|
+
"gpt-6.1-sol-low": {
|
|
169
|
+
"name": "GPT 6.1 Sol Low (OAuth)",
|
|
170
170
|
"limit": {
|
|
171
171
|
"context": 272000,
|
|
172
172
|
"output": 128000
|
|
@@ -190,8 +190,8 @@
|
|
|
190
190
|
"store": false
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
|
-
"gpt-6-
|
|
194
|
-
"name": "GPT 6
|
|
193
|
+
"gpt-6.1-sol-medium": {
|
|
194
|
+
"name": "GPT 6.1 Sol Medium (OAuth)",
|
|
195
195
|
"limit": {
|
|
196
196
|
"context": 272000,
|
|
197
197
|
"output": 128000
|
|
@@ -215,8 +215,8 @@
|
|
|
215
215
|
"store": false
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
|
-
"gpt-6-
|
|
219
|
-
"name": "GPT 6
|
|
218
|
+
"gpt-6.1-sol-high": {
|
|
219
|
+
"name": "GPT 6.1 Sol High (OAuth)",
|
|
220
220
|
"limit": {
|
|
221
221
|
"context": 272000,
|
|
222
222
|
"output": 128000
|
|
@@ -240,8 +240,8 @@
|
|
|
240
240
|
"store": false
|
|
241
241
|
}
|
|
242
242
|
},
|
|
243
|
-
"gpt-6-
|
|
244
|
-
"name": "GPT 6
|
|
243
|
+
"gpt-6.1-sol-xhigh": {
|
|
244
|
+
"name": "GPT 6.1 Sol Xhigh (OAuth)",
|
|
245
245
|
"limit": {
|
|
246
246
|
"context": 272000,
|
|
247
247
|
"output": 128000
|
|
@@ -265,8 +265,8 @@
|
|
|
265
265
|
"store": false
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
|
-
"gpt-6-
|
|
269
|
-
"name": "GPT 6
|
|
268
|
+
"gpt-6.1-sol-max": {
|
|
269
|
+
"name": "GPT 6.1 Sol Max (OAuth)",
|
|
270
270
|
"limit": {
|
|
271
271
|
"context": 272000,
|
|
272
272
|
"output": 128000
|
|
@@ -290,8 +290,8 @@
|
|
|
290
290
|
"store": false
|
|
291
291
|
}
|
|
292
292
|
},
|
|
293
|
-
"gpt-6-
|
|
294
|
-
"name": "GPT 6
|
|
293
|
+
"gpt-6.1-sol-ultra": {
|
|
294
|
+
"name": "GPT 6.1 Sol Ultra (OAuth)",
|
|
295
295
|
"limit": {
|
|
296
296
|
"context": 272000,
|
|
297
297
|
"output": 128000
|
|
@@ -1014,206 +1014,6 @@
|
|
|
1014
1014
|
],
|
|
1015
1015
|
"store": false
|
|
1016
1016
|
}
|
|
1017
|
-
},
|
|
1018
|
-
"gpt-5.5-none": {
|
|
1019
|
-
"name": "GPT 5.5 None (OAuth)",
|
|
1020
|
-
"limit": {
|
|
1021
|
-
"context": 272000,
|
|
1022
|
-
"output": 128000
|
|
1023
|
-
},
|
|
1024
|
-
"modalities": {
|
|
1025
|
-
"input": [
|
|
1026
|
-
"text",
|
|
1027
|
-
"image"
|
|
1028
|
-
],
|
|
1029
|
-
"output": [
|
|
1030
|
-
"text"
|
|
1031
|
-
]
|
|
1032
|
-
},
|
|
1033
|
-
"options": {
|
|
1034
|
-
"reasoningEffort": "none",
|
|
1035
|
-
"reasoningSummary": "auto",
|
|
1036
|
-
"textVerbosity": "medium",
|
|
1037
|
-
"include": [
|
|
1038
|
-
"reasoning.encrypted_content"
|
|
1039
|
-
],
|
|
1040
|
-
"store": false
|
|
1041
|
-
}
|
|
1042
|
-
},
|
|
1043
|
-
"gpt-5.5-low": {
|
|
1044
|
-
"name": "GPT 5.5 Low (OAuth)",
|
|
1045
|
-
"limit": {
|
|
1046
|
-
"context": 272000,
|
|
1047
|
-
"output": 128000
|
|
1048
|
-
},
|
|
1049
|
-
"modalities": {
|
|
1050
|
-
"input": [
|
|
1051
|
-
"text",
|
|
1052
|
-
"image"
|
|
1053
|
-
],
|
|
1054
|
-
"output": [
|
|
1055
|
-
"text"
|
|
1056
|
-
]
|
|
1057
|
-
},
|
|
1058
|
-
"options": {
|
|
1059
|
-
"reasoningEffort": "low",
|
|
1060
|
-
"reasoningSummary": "auto",
|
|
1061
|
-
"textVerbosity": "medium",
|
|
1062
|
-
"include": [
|
|
1063
|
-
"reasoning.encrypted_content"
|
|
1064
|
-
],
|
|
1065
|
-
"store": false
|
|
1066
|
-
}
|
|
1067
|
-
},
|
|
1068
|
-
"gpt-5.5-medium": {
|
|
1069
|
-
"name": "GPT 5.5 Medium (OAuth)",
|
|
1070
|
-
"limit": {
|
|
1071
|
-
"context": 272000,
|
|
1072
|
-
"output": 128000
|
|
1073
|
-
},
|
|
1074
|
-
"modalities": {
|
|
1075
|
-
"input": [
|
|
1076
|
-
"text",
|
|
1077
|
-
"image"
|
|
1078
|
-
],
|
|
1079
|
-
"output": [
|
|
1080
|
-
"text"
|
|
1081
|
-
]
|
|
1082
|
-
},
|
|
1083
|
-
"options": {
|
|
1084
|
-
"reasoningEffort": "medium",
|
|
1085
|
-
"reasoningSummary": "auto",
|
|
1086
|
-
"textVerbosity": "medium",
|
|
1087
|
-
"include": [
|
|
1088
|
-
"reasoning.encrypted_content"
|
|
1089
|
-
],
|
|
1090
|
-
"store": false
|
|
1091
|
-
}
|
|
1092
|
-
},
|
|
1093
|
-
"gpt-5.5-high": {
|
|
1094
|
-
"name": "GPT 5.5 High (OAuth)",
|
|
1095
|
-
"limit": {
|
|
1096
|
-
"context": 272000,
|
|
1097
|
-
"output": 128000
|
|
1098
|
-
},
|
|
1099
|
-
"modalities": {
|
|
1100
|
-
"input": [
|
|
1101
|
-
"text",
|
|
1102
|
-
"image"
|
|
1103
|
-
],
|
|
1104
|
-
"output": [
|
|
1105
|
-
"text"
|
|
1106
|
-
]
|
|
1107
|
-
},
|
|
1108
|
-
"options": {
|
|
1109
|
-
"reasoningEffort": "high",
|
|
1110
|
-
"reasoningSummary": "detailed",
|
|
1111
|
-
"textVerbosity": "medium",
|
|
1112
|
-
"include": [
|
|
1113
|
-
"reasoning.encrypted_content"
|
|
1114
|
-
],
|
|
1115
|
-
"store": false
|
|
1116
|
-
}
|
|
1117
|
-
},
|
|
1118
|
-
"gpt-5.5-xhigh": {
|
|
1119
|
-
"name": "GPT 5.5 Extra High (OAuth)",
|
|
1120
|
-
"limit": {
|
|
1121
|
-
"context": 272000,
|
|
1122
|
-
"output": 128000
|
|
1123
|
-
},
|
|
1124
|
-
"modalities": {
|
|
1125
|
-
"input": [
|
|
1126
|
-
"text",
|
|
1127
|
-
"image"
|
|
1128
|
-
],
|
|
1129
|
-
"output": [
|
|
1130
|
-
"text"
|
|
1131
|
-
]
|
|
1132
|
-
},
|
|
1133
|
-
"options": {
|
|
1134
|
-
"reasoningEffort": "xhigh",
|
|
1135
|
-
"reasoningSummary": "detailed",
|
|
1136
|
-
"textVerbosity": "medium",
|
|
1137
|
-
"include": [
|
|
1138
|
-
"reasoning.encrypted_content"
|
|
1139
|
-
],
|
|
1140
|
-
"store": false
|
|
1141
|
-
}
|
|
1142
|
-
},
|
|
1143
|
-
"gpt-5.5-pro-medium": {
|
|
1144
|
-
"name": "GPT 5.5 Pro Medium (OAuth)",
|
|
1145
|
-
"limit": {
|
|
1146
|
-
"context": 272000,
|
|
1147
|
-
"output": 128000
|
|
1148
|
-
},
|
|
1149
|
-
"modalities": {
|
|
1150
|
-
"input": [
|
|
1151
|
-
"text",
|
|
1152
|
-
"image"
|
|
1153
|
-
],
|
|
1154
|
-
"output": [
|
|
1155
|
-
"text"
|
|
1156
|
-
]
|
|
1157
|
-
},
|
|
1158
|
-
"options": {
|
|
1159
|
-
"reasoningEffort": "medium",
|
|
1160
|
-
"reasoningSummary": "detailed",
|
|
1161
|
-
"textVerbosity": "medium",
|
|
1162
|
-
"include": [
|
|
1163
|
-
"reasoning.encrypted_content"
|
|
1164
|
-
],
|
|
1165
|
-
"store": false
|
|
1166
|
-
}
|
|
1167
|
-
},
|
|
1168
|
-
"gpt-5.5-pro-high": {
|
|
1169
|
-
"name": "GPT 5.5 Pro High (OAuth)",
|
|
1170
|
-
"limit": {
|
|
1171
|
-
"context": 272000,
|
|
1172
|
-
"output": 128000
|
|
1173
|
-
},
|
|
1174
|
-
"modalities": {
|
|
1175
|
-
"input": [
|
|
1176
|
-
"text",
|
|
1177
|
-
"image"
|
|
1178
|
-
],
|
|
1179
|
-
"output": [
|
|
1180
|
-
"text"
|
|
1181
|
-
]
|
|
1182
|
-
},
|
|
1183
|
-
"options": {
|
|
1184
|
-
"reasoningEffort": "high",
|
|
1185
|
-
"reasoningSummary": "detailed",
|
|
1186
|
-
"textVerbosity": "medium",
|
|
1187
|
-
"include": [
|
|
1188
|
-
"reasoning.encrypted_content"
|
|
1189
|
-
],
|
|
1190
|
-
"store": false
|
|
1191
|
-
}
|
|
1192
|
-
},
|
|
1193
|
-
"gpt-5.5-pro-xhigh": {
|
|
1194
|
-
"name": "GPT 5.5 Pro Extra High (OAuth)",
|
|
1195
|
-
"limit": {
|
|
1196
|
-
"context": 272000,
|
|
1197
|
-
"output": 128000
|
|
1198
|
-
},
|
|
1199
|
-
"modalities": {
|
|
1200
|
-
"input": [
|
|
1201
|
-
"text",
|
|
1202
|
-
"image"
|
|
1203
|
-
],
|
|
1204
|
-
"output": [
|
|
1205
|
-
"text"
|
|
1206
|
-
]
|
|
1207
|
-
},
|
|
1208
|
-
"options": {
|
|
1209
|
-
"reasoningEffort": "xhigh",
|
|
1210
|
-
"reasoningSummary": "detailed",
|
|
1211
|
-
"textVerbosity": "medium",
|
|
1212
|
-
"include": [
|
|
1213
|
-
"reasoning.encrypted_content"
|
|
1214
|
-
],
|
|
1215
|
-
"store": false
|
|
1216
|
-
}
|
|
1217
1017
|
}
|
|
1218
1018
|
}
|
|
1219
1019
|
}
|
package/config/codex-modern.json
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"store": false
|
|
16
16
|
},
|
|
17
17
|
"models": {
|
|
18
|
-
"gpt-6-
|
|
19
|
-
"name": "GPT 6
|
|
18
|
+
"gpt-6.1-sol": {
|
|
19
|
+
"name": "GPT 6.1 Sol (OAuth)",
|
|
20
20
|
"limit": {
|
|
21
21
|
"context": 272000,
|
|
22
22
|
"output": 128000
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"gpt-6-astra
|
|
67
|
-
"name": "GPT 6 Astra
|
|
66
|
+
"gpt-6-astra": {
|
|
67
|
+
"name": "GPT 6 Astra (OAuth)",
|
|
68
68
|
"limit": {
|
|
69
69
|
"context": 272000,
|
|
70
70
|
"output": 128000
|
|
@@ -340,82 +340,6 @@
|
|
|
340
340
|
"textVerbosity": "medium"
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
},
|
|
344
|
-
"gpt-5.5": {
|
|
345
|
-
"name": "GPT 5.5 (OAuth)",
|
|
346
|
-
"limit": {
|
|
347
|
-
"context": 272000,
|
|
348
|
-
"output": 128000
|
|
349
|
-
},
|
|
350
|
-
"modalities": {
|
|
351
|
-
"input": [
|
|
352
|
-
"text",
|
|
353
|
-
"image"
|
|
354
|
-
],
|
|
355
|
-
"output": [
|
|
356
|
-
"text"
|
|
357
|
-
]
|
|
358
|
-
},
|
|
359
|
-
"variants": {
|
|
360
|
-
"none": {
|
|
361
|
-
"reasoningEffort": "none",
|
|
362
|
-
"reasoningSummary": "auto",
|
|
363
|
-
"textVerbosity": "medium"
|
|
364
|
-
},
|
|
365
|
-
"low": {
|
|
366
|
-
"reasoningEffort": "low",
|
|
367
|
-
"reasoningSummary": "auto",
|
|
368
|
-
"textVerbosity": "medium"
|
|
369
|
-
},
|
|
370
|
-
"medium": {
|
|
371
|
-
"reasoningEffort": "medium",
|
|
372
|
-
"reasoningSummary": "auto",
|
|
373
|
-
"textVerbosity": "medium"
|
|
374
|
-
},
|
|
375
|
-
"high": {
|
|
376
|
-
"reasoningEffort": "high",
|
|
377
|
-
"reasoningSummary": "detailed",
|
|
378
|
-
"textVerbosity": "medium"
|
|
379
|
-
},
|
|
380
|
-
"xhigh": {
|
|
381
|
-
"reasoningEffort": "xhigh",
|
|
382
|
-
"reasoningSummary": "detailed",
|
|
383
|
-
"textVerbosity": "medium"
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
"gpt-5.5-pro": {
|
|
388
|
-
"name": "GPT 5.5 Pro (OAuth)",
|
|
389
|
-
"limit": {
|
|
390
|
-
"context": 272000,
|
|
391
|
-
"output": 128000
|
|
392
|
-
},
|
|
393
|
-
"modalities": {
|
|
394
|
-
"input": [
|
|
395
|
-
"text",
|
|
396
|
-
"image"
|
|
397
|
-
],
|
|
398
|
-
"output": [
|
|
399
|
-
"text"
|
|
400
|
-
]
|
|
401
|
-
},
|
|
402
|
-
"variants": {
|
|
403
|
-
"medium": {
|
|
404
|
-
"reasoningEffort": "medium",
|
|
405
|
-
"reasoningSummary": "detailed",
|
|
406
|
-
"textVerbosity": "medium"
|
|
407
|
-
},
|
|
408
|
-
"high": {
|
|
409
|
-
"reasoningEffort": "high",
|
|
410
|
-
"reasoningSummary": "detailed",
|
|
411
|
-
"textVerbosity": "medium"
|
|
412
|
-
},
|
|
413
|
-
"xhigh": {
|
|
414
|
-
"reasoningEffort": "xhigh",
|
|
415
|
-
"reasoningSummary": "detailed",
|
|
416
|
-
"textVerbosity": "medium"
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
343
|
}
|
|
420
344
|
}
|
|
421
345
|
}
|
|
@@ -20,7 +20,9 @@ export declare function getAccountPolicyPath(): string;
|
|
|
20
20
|
export declare function getAccountPolicyKey(account: Pick<AccountMetadataV3, "accountId" | "email"> & {
|
|
21
21
|
refreshToken?: string | null;
|
|
22
22
|
}, _index?: number): string;
|
|
23
|
-
export declare function loadAccountPolicyStore(
|
|
23
|
+
export declare function loadAccountPolicyStore(options?: {
|
|
24
|
+
strict?: boolean;
|
|
25
|
+
}): Promise<AccountPolicyStore>;
|
|
24
26
|
export declare function saveAccountPolicyStore(store: AccountPolicyStore, baseline?: AccountPolicyStore): Promise<void>;
|
|
25
27
|
/**
|
|
26
28
|
* Run a policy-store read→mutate→write inside the write queue (in-process
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
import {
|
|
2
|
+
import { promises as fs } from "node:fs";
|
|
3
3
|
import { basename, join } from "node:path";
|
|
4
4
|
import { logWarn } from "./logger.js";
|
|
5
5
|
import { getCodexMultiAuthDir } from "./runtime-paths.js";
|
|
@@ -100,14 +100,30 @@ export function getAccountPolicyKey(account, _index) {
|
|
|
100
100
|
(refreshFallback ? `refresh:${refreshFallback}` : "unknown");
|
|
101
101
|
return `sha256:${createHash("sha256").update(identity).digest("hex")}`;
|
|
102
102
|
}
|
|
103
|
-
export async function loadAccountPolicyStore() {
|
|
103
|
+
export async function loadAccountPolicyStore(options = {}) {
|
|
104
104
|
const path = getAccountPolicyPath();
|
|
105
|
-
if (!existsSync(path))
|
|
106
|
-
return emptyStore();
|
|
107
105
|
try {
|
|
108
|
-
|
|
106
|
+
const parsed = JSON.parse(await readFileWithRetry(path));
|
|
107
|
+
if (options.strict) {
|
|
108
|
+
if (!isRecord(parsed) || parsed.version !== 1 || !isRecord(parsed.accounts)) {
|
|
109
|
+
throw new Error("Invalid account policy store");
|
|
110
|
+
}
|
|
111
|
+
for (const [key, row] of Object.entries(parsed.accounts)) {
|
|
112
|
+
if (!key.startsWith("sha256:"))
|
|
113
|
+
continue;
|
|
114
|
+
// Legacy rows may omit flags; explicit malformed values are not OFF.
|
|
115
|
+
if (!isRecord(row) || ["autoPrime", "paused", "drained"].some(flag => flag in row && typeof row[flag] !== "boolean")) {
|
|
116
|
+
throw new Error("Invalid account policy row");
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return normalizeStore(parsed);
|
|
109
121
|
}
|
|
110
122
|
catch (error) {
|
|
123
|
+
if (error.code === "ENOENT")
|
|
124
|
+
return emptyStore();
|
|
125
|
+
if (options.strict)
|
|
126
|
+
throw error;
|
|
111
127
|
logWarn(`Failed to load account policies from ${basename(path)}: ${error instanceof Error ? error.message : String(error)}`);
|
|
112
128
|
return emptyStore();
|
|
113
129
|
}
|
|
@@ -107,7 +107,9 @@ function parseRollout(rolloutPath, deps, previewLimit) {
|
|
|
107
107
|
if (typeof record.timestamp === "string") {
|
|
108
108
|
updatedAt = record.timestamp;
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
// Forked rollouts append the parent's session_meta after their own, so
|
|
111
|
+
// only the first one describes this rollout.
|
|
112
|
+
if (record.type === "session_meta" && !hasSessionMeta) {
|
|
111
113
|
const payload = record.payload;
|
|
112
114
|
const metaId = readStringField(payload, "id");
|
|
113
115
|
if (metaId)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { subscriptionStatus, formatSubscriptionStatus } from "../formatters/subscription-status.js";
|
|
1
2
|
import { resetSnapshotQuota } from "../../runtime/reset-credits.js";
|
|
2
3
|
import { resetTargetForStoredAccount } from "../../runtime/account-reset-credits.js";
|
|
3
4
|
import { subscriptionQuotaPreference, compareSubscriptionQuota, usesSubscriptionReserve, SUBSCRIPTION_RESERVE_PERCENT } from "../../runtime/subscription-quota-order.js";
|
|
@@ -87,7 +88,8 @@ export async function runStatusCommand(deps) {
|
|
|
87
88
|
const modelInventory = await deps.loadModelInventory?.();
|
|
88
89
|
const resetCredits = await deps.loadResetCreditState?.().catch(() => null);
|
|
89
90
|
const resetSnapshot = (account) => { const target = resetTargetForStoredAccount(account); return target ? resetCredits?.snapshots[target.key] : undefined; };
|
|
90
|
-
|
|
91
|
+
let policiesUnavailable = false;
|
|
92
|
+
const accountPolicies = await (deps.loadAccountPolicies ?? loadAccountPolicyStore)({ strict: true }).catch(() => { policiesUnavailable = true; return { version: 1, accounts: {} }; });
|
|
91
93
|
if (!deps.json && deps.loadModelInventory)
|
|
92
94
|
for (const line of formatModelInventory(modelInventory ?? null))
|
|
93
95
|
logInfo(line);
|
|
@@ -136,6 +138,7 @@ export async function runStatusCommand(deps) {
|
|
|
136
138
|
const now = deps.getNow?.() ?? Date.now();
|
|
137
139
|
const activeIndex = storage.accounts.length ? deps.resolveActiveIndex(storage, "codex") : -1;
|
|
138
140
|
const quotaCache = await deps.loadQuotaCache?.() ?? null;
|
|
141
|
+
const subscriptionStatuses = storage.accounts.map(account => subscriptionStatus(account, findQuotaCacheEntryForAccount(quotaCache, account, storage.accounts), policiesUnavailable ? undefined : accountPolicies.accounts[getAccountPolicyKey(account)] ?? {}, now));
|
|
139
142
|
const forecastQuotas = storage.accounts.map(account => {
|
|
140
143
|
const cached = findQuotaCacheEntryForAccount(quotaCache, account, storage.accounts);
|
|
141
144
|
const reset = resetSnapshot(account);
|
|
@@ -217,6 +220,7 @@ export async function runStatusCommand(deps) {
|
|
|
217
220
|
const markers = buildAccountMarkers(account, i, activeIndex, runtimeCurrent, now, quotaCache, storage.accounts, deps.formatRateLimitEntry);
|
|
218
221
|
return {
|
|
219
222
|
index: i,
|
|
223
|
+
subscription: subscriptionStatuses[i],
|
|
220
224
|
resetCreditsAvailable: resetSnapshot(account)?.availableCount ?? null,
|
|
221
225
|
resetCreditsCheckedAt: resetSnapshot(account)?.updatedAt ?? null,
|
|
222
226
|
label: formatAccountLabel(account, i),
|
|
@@ -335,8 +339,9 @@ export async function runStatusCommand(deps) {
|
|
|
335
339
|
: `inference not yet recorded; ${activity}`;
|
|
336
340
|
logInfo(`${paint(`${i + 1}. ${label}`, "heading")}${paint(markerLabel, markers.some(m => /disabled|cooldown|exhausted|limited|invalid/.test(m)) ? "warning" : "success")} ${paint(lastUsed, "muted")}`);
|
|
337
341
|
logInfo(` ${paint(`priority tier: ${accountPolicies.accounts[getAccountPolicyKey(account, i)]?.priority ?? 1}`, "accent")}`);
|
|
338
|
-
|
|
339
|
-
|
|
342
|
+
const subscription = subscriptionStatuses[i];
|
|
343
|
+
if (subscription)
|
|
344
|
+
logInfo(` ${formatSubscriptionStatus(subscription)}`);
|
|
340
345
|
if (appBindStatus?.nativeOpenai) {
|
|
341
346
|
const preference = quotaPreferences[i];
|
|
342
347
|
const order = automaticOrder.get(i);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AccountPolicy } from "../../account-policy.js";
|
|
2
|
+
import type { QuotaCacheEntry } from "../../quota-cache.js";
|
|
3
|
+
import type { AccountMetadataV3 } from "../../storage.js";
|
|
4
|
+
/** Display only observed evidence; never age a placeholder into a running timer. */
|
|
5
|
+
export declare function subscriptionStatus(account: AccountMetadataV3, entry: QuotaCacheEntry | null, policy: Partial<AccountPolicy> | undefined, now: number): {
|
|
6
|
+
planType: string | null;
|
|
7
|
+
planLabel: string;
|
|
8
|
+
selectedWorkspace: string;
|
|
9
|
+
autoPrime: boolean | null;
|
|
10
|
+
primingState: "failed" | "unknown" | "awaiting-first-use" | "timer-running" | "used" | "completed" | "not-applicable";
|
|
11
|
+
primingFailure: "timed out" | "stream ended early" | "upstream failed" | "response too large" | "network error" | null;
|
|
12
|
+
automaticBlock: string | null;
|
|
13
|
+
freshness: string;
|
|
14
|
+
observedAt: number | null;
|
|
15
|
+
};
|
|
16
|
+
export declare function formatSubscriptionStatus(value: ReturnType<typeof subscriptionStatus>): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { needsSubscriptionFirstUse } from "../../runtime/subscription-first-use.js";
|
|
2
|
+
const PLAN_LABELS = new Map([
|
|
3
|
+
["free", "Free"], ["plus", "Plus"], ["pro", "Pro 200"],
|
|
4
|
+
["prolite", "Pro 100"], ["promax", "Pro 500"], ["team", "Business"],
|
|
5
|
+
["business", "Business"], ["enterprise", "Enterprise"], ["edu", "Edu"],
|
|
6
|
+
]);
|
|
7
|
+
const STATE_LABELS = {
|
|
8
|
+
unknown: "Priming status unknown",
|
|
9
|
+
"awaiting-first-use": "Awaiting first use",
|
|
10
|
+
"timer-running": "Reset timer running",
|
|
11
|
+
used: "Usage recorded",
|
|
12
|
+
completed: "First-use completed; timer not yet verified",
|
|
13
|
+
failed: "Priming failed",
|
|
14
|
+
"not-applicable": "Priming not applicable",
|
|
15
|
+
};
|
|
16
|
+
/** Display only observed evidence; never age a placeholder into a running timer. */
|
|
17
|
+
export function subscriptionStatus(account, entry, policy, now) {
|
|
18
|
+
const workspace = account.workspaces?.[account.currentWorkspaceIndex ?? 0];
|
|
19
|
+
const selectedWorkspace = workspace
|
|
20
|
+
? workspace.name?.replace(/\s*\(role:.*$|\s*\[id:.*$/g, "").trim() || "Unnamed workspace"
|
|
21
|
+
: account.workspaces?.length ? "Invalid workspace selection" : "Stored binding (workspace unknown)";
|
|
22
|
+
const freshness = !entry ? "missing"
|
|
23
|
+
: entry.updatedAt > now || now - entry.updatedAt > 30 * 60000 ? "stale" : "fresh";
|
|
24
|
+
const planType = entry?.planType?.trim().toLowerCase() ?? null;
|
|
25
|
+
const planLabel = PLAN_LABELS.get(planType ?? "") ?? "Unknown plan";
|
|
26
|
+
let primingState = "unknown";
|
|
27
|
+
if (entry && freshness === "fresh" && entry.status === 200) {
|
|
28
|
+
const windows = [entry.primary, entry.secondary].filter(w => w.windowMinutes !== 0);
|
|
29
|
+
if (!planType || !PLAN_LABELS.has(planType))
|
|
30
|
+
primingState = "unknown";
|
|
31
|
+
else if (!["plus", "pro", "prolite", "promax"].includes(planType))
|
|
32
|
+
primingState = "not-applicable";
|
|
33
|
+
else if (entry.primingFailure)
|
|
34
|
+
primingState = "failed";
|
|
35
|
+
else if (entry.primingCompleted)
|
|
36
|
+
primingState = "completed";
|
|
37
|
+
else if (windows.some(w => typeof w.usedPercent === "number" && w.usedPercent > 0)) {
|
|
38
|
+
primingState = "used";
|
|
39
|
+
}
|
|
40
|
+
else if (windows.some(w => typeof w.windowMinutes === "number" && w.windowMinutes > 0 &&
|
|
41
|
+
typeof w.resetAtMs === "number" && w.resetAtMs > now &&
|
|
42
|
+
w.resetAtMs - entry.updatedAt < w.windowMinutes * 60000 - 2000)) {
|
|
43
|
+
primingState = "timer-running";
|
|
44
|
+
}
|
|
45
|
+
else if (needsSubscriptionFirstUse(entry, entry.updatedAt)) {
|
|
46
|
+
primingState = "awaiting-first-use";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const automaticBlock = account.enabled === false ? "account disabled"
|
|
50
|
+
: account.authInvalidatedAt ? "sign-in required"
|
|
51
|
+
: policy?.paused ? "paused"
|
|
52
|
+
: policy?.drained ? "drained"
|
|
53
|
+
: (account.coolingDownUntil ?? 0) > now ? "cooling down"
|
|
54
|
+
: account.workspaces?.length && (!workspace || workspace.enabled === false) ? "workspace unavailable"
|
|
55
|
+
: null;
|
|
56
|
+
return {
|
|
57
|
+
planType, planLabel, selectedWorkspace,
|
|
58
|
+
autoPrime: policy ? policy.autoPrime === true : null,
|
|
59
|
+
primingState, primingFailure: entry?.primingFailure ?? null,
|
|
60
|
+
automaticBlock, freshness, observedAt: entry?.updatedAt ?? null,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export function formatSubscriptionStatus(value) {
|
|
64
|
+
const freshness = value.freshness === "stale" ? " (stale; run check accounts)"
|
|
65
|
+
: value.freshness === "missing" ? " (not observed)" : "";
|
|
66
|
+
const autoPrime = value.autoPrime === null ? "unknown" : value.autoPrime ? "ON" : "OFF";
|
|
67
|
+
const block = value.automaticBlock ? `; blocked: ${value.automaticBlock}` : "";
|
|
68
|
+
return `${value.selectedWorkspace} · ${value.planLabel}${freshness} · Auto-prime ${autoPrime} · ${STATE_LABELS[value.primingState]}${block}`;
|
|
69
|
+
}
|