codex-multi-auth 2.17.0 → 2.17.3
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 +9 -9
- package/LICENSE +21 -21
- package/README.md +142 -484
- package/assets/codex-multi-auth-icon.svg +39 -39
- package/assets/readme-hero.svg +31 -31
- package/config/README.md +31 -31
- package/config/codex-legacy.json +1221 -1221
- package/config/codex-modern.json +423 -423
- package/config/minimal-codex.json +15 -15
- package/dist/index.d.ts +0 -1
- package/dist/lib/account-policy.d.ts +18 -2
- package/dist/lib/account-policy.js +97 -40
- package/dist/lib/accounts/rate-limits.d.ts +0 -1
- package/dist/lib/accounts.d.ts +1 -8
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/lib/accounts.js +7 -19
- package/dist/lib/api-route-store.d.ts +0 -1
- package/dist/lib/audit.d.ts +0 -1
- package/dist/lib/audit.js +43 -12
- package/dist/lib/auth/account-access.d.ts +0 -1
- package/dist/lib/auth/account-access.js +5 -1
- package/dist/lib/auth/auth.d.ts +4 -3
- package/dist/lib/auth/auth.js +220 -28
- package/dist/lib/auth/browser.d.ts +0 -1
- package/dist/lib/auth/callback-guidance.d.ts +0 -1
- package/dist/lib/auth/device-auth.d.ts +0 -1
- package/dist/lib/auth/index.d.ts +0 -1
- package/dist/lib/auth/org-override.d.ts +0 -1
- package/dist/lib/auth/server.d.ts +1 -2
- package/dist/lib/auth/server.js +100 -53
- package/dist/lib/auth/token-utils.d.ts +0 -1
- package/dist/lib/auth-rate-limit.d.ts +0 -1
- package/dist/lib/budget-guard.d.ts +16 -2
- package/dist/lib/budget-guard.js +123 -43
- package/dist/lib/capability-policy.d.ts +0 -1
- package/dist/lib/circuit-breaker.d.ts +20 -1
- package/dist/lib/circuit-breaker.js +24 -5
- package/dist/lib/cli.d.ts +0 -1
- package/dist/lib/codex-cli/index.d.ts +0 -1
- package/dist/lib/codex-cli/observability.d.ts +0 -1
- package/dist/lib/codex-cli/state.d.ts +0 -1
- package/dist/lib/codex-cli/sync.d.ts +0 -1
- package/dist/lib/codex-cli/writer.d.ts +0 -1
- package/dist/lib/codex-manager/account-credentials.d.ts +0 -1
- package/dist/lib/codex-manager/account-manager-commands.d.ts +0 -1
- package/dist/lib/codex-manager/account-pool-write.d.ts +0 -1
- package/dist/lib/codex-manager/active-account-sync.d.ts +6 -0
- package/dist/lib/codex-manager/active-account-sync.js +336 -0
- package/dist/lib/codex-manager/api-login-menu.d.ts +0 -1
- package/dist/lib/codex-manager/backend-category-entry.d.ts +0 -1
- package/dist/lib/codex-manager/backend-category-helpers.d.ts +0 -1
- package/dist/lib/codex-manager/backend-category-prompt.d.ts +0 -1
- package/dist/lib/codex-manager/backend-settings-controller.d.ts +0 -1
- package/dist/lib/codex-manager/backend-settings-entry.d.ts +0 -1
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts +0 -1
- package/dist/lib/codex-manager/backend-settings-prompt.d.ts +0 -1
- package/dist/lib/codex-manager/backend-settings-schema.d.ts +0 -1
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts +0 -1
- package/dist/lib/codex-manager/commands/account.d.ts +8 -3
- package/dist/lib/codex-manager/commands/account.js +46 -34
- package/dist/lib/codex-manager/commands/best.d.ts +0 -1
- package/dist/lib/codex-manager/commands/bridge.d.ts +0 -1
- package/dist/lib/codex-manager/commands/budget.d.ts +8 -3
- package/dist/lib/codex-manager/commands/budget.js +6 -4
- package/dist/lib/codex-manager/commands/check.d.ts +0 -1
- package/dist/lib/codex-manager/commands/config-explain.d.ts +0 -1
- package/dist/lib/codex-manager/commands/debug-bundle.d.ts +0 -1
- package/dist/lib/codex-manager/commands/forecast.d.ts +1 -2
- package/dist/lib/codex-manager/commands/forecast.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/forecast.js +2 -2
- package/dist/lib/codex-manager/commands/history.d.ts +0 -1
- package/dist/lib/codex-manager/commands/init-config.d.ts +0 -1
- package/dist/lib/codex-manager/commands/integrations.d.ts +0 -1
- package/dist/lib/codex-manager/commands/limits.d.ts +0 -1
- package/dist/lib/codex-manager/commands/models.d.ts +0 -1
- package/dist/lib/codex-manager/commands/monitor.d.ts +0 -1
- package/dist/lib/codex-manager/commands/report.d.ts +0 -1
- package/dist/lib/codex-manager/commands/resets.d.ts +0 -1
- package/dist/lib/codex-manager/commands/resets.js +9 -1
- package/dist/lib/codex-manager/commands/rotation.d.ts +0 -1
- package/dist/lib/codex-manager/commands/status.d.ts +0 -1
- package/dist/lib/codex-manager/commands/switch.d.ts +0 -1
- package/dist/lib/codex-manager/commands/uninstall.d.ts +0 -1
- package/dist/lib/codex-manager/commands/unpin.d.ts +0 -1
- package/dist/lib/codex-manager/commands/usage.d.ts +0 -1
- package/dist/lib/codex-manager/commands/verify.d.ts +0 -1
- package/dist/lib/codex-manager/commands/why-selected.d.ts +0 -1
- package/dist/lib/codex-manager/commands/workspace.d.ts +0 -1
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts +0 -1
- package/dist/lib/codex-manager/dashboard-formatters.d.ts +0 -1
- package/dist/lib/codex-manager/dashboard-settings-controller.d.ts +0 -1
- package/dist/lib/codex-manager/dashboard-settings-data.d.ts +0 -1
- package/dist/lib/codex-manager/dashboard-settings-entry.d.ts +0 -1
- package/dist/lib/codex-manager/experimental-settings-entry.d.ts +0 -1
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts +0 -1
- package/dist/lib/codex-manager/experimental-settings-schema.d.ts +0 -1
- package/dist/lib/codex-manager/experimental-sync-target-entry.d.ts +0 -1
- package/dist/lib/codex-manager/experimental-sync-target.d.ts +0 -1
- package/dist/lib/codex-manager/forecast-report-shared.d.ts +0 -1
- package/dist/lib/codex-manager/formatters/account-formatters.d.ts +0 -1
- package/dist/lib/codex-manager/formatters/index.d.ts +0 -1
- package/dist/lib/codex-manager/formatters/model-formatters.d.ts +0 -1
- package/dist/lib/codex-manager/formatters/quota-formatters.d.ts +0 -1
- package/dist/lib/codex-manager/formatters/text-style.d.ts +0 -1
- package/dist/lib/codex-manager/health-check.d.ts +0 -1
- package/dist/lib/codex-manager/health-check.js +1 -1
- package/dist/lib/codex-manager/help.d.ts +0 -1
- package/dist/lib/codex-manager/login-action-panel.d.ts +0 -1
- package/dist/lib/codex-manager/login-flow.d.ts +0 -1
- package/dist/lib/codex-manager/login-menu-actions.d.ts +0 -1
- package/dist/lib/codex-manager/login-menu-data.d.ts +0 -1
- package/dist/lib/codex-manager/login-menu-data.d.ts.map +1 -1
- package/dist/lib/codex-manager/login-menu-data.js +7 -3
- package/dist/lib/codex-manager/login-oauth.d.ts +0 -1
- package/dist/lib/codex-manager/login-workspace-choice.d.ts +0 -1
- package/dist/lib/codex-manager/manual-callback.d.ts +0 -1
- package/dist/lib/codex-manager/persist-selected-account.d.ts +0 -1
- package/dist/lib/codex-manager/quota-cache-helpers.d.ts +7 -2
- package/dist/lib/codex-manager/quota-cache-helpers.d.ts.map +1 -1
- package/dist/lib/codex-manager/quota-cache-helpers.js +34 -19
- package/dist/lib/codex-manager/rate-limit-markers.d.ts +0 -1
- package/dist/lib/codex-manager/repair-commands.d.ts +0 -1
- package/dist/lib/codex-manager/repair-commands.js +1 -1
- package/dist/lib/codex-manager/settings-hub/backend.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub/experimental.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub/index.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub/shared.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub-entry.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub-menu.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub-prompt.d.ts +0 -1
- package/dist/lib/codex-manager/settings-hub.d.ts +0 -1
- package/dist/lib/codex-manager/settings-panels.d.ts +0 -1
- package/dist/lib/codex-manager/settings-persist-utils.d.ts +0 -1
- package/dist/lib/codex-manager/settings-preview.d.ts +0 -1
- package/dist/lib/codex-manager/settings-write-queue.d.ts +0 -1
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts +0 -1
- package/dist/lib/codex-manager/theme-settings-panel.d.ts +0 -1
- package/dist/lib/codex-manager/unified-settings-controller.d.ts +0 -1
- package/dist/lib/codex-manager/unified-settings-entry.d.ts +0 -1
- package/dist/lib/codex-manager.d.ts +1 -2
- package/dist/lib/codex-manager.js +5 -95
- package/dist/lib/concurrency.d.ts +0 -1
- package/dist/lib/config-schema.d.ts +0 -1
- package/dist/lib/config.d.ts +0 -1
- package/dist/lib/config.js +46 -241
- package/dist/lib/constants.d.ts +0 -1
- package/dist/lib/context-budget/model-context-windows.d.ts +0 -1
- package/dist/lib/context-budget-guard.d.ts +0 -1
- package/dist/lib/context-budget-response.d.ts +0 -1
- package/dist/lib/context-budget-response.js +8 -8
- package/dist/lib/context-overflow.d.ts +0 -1
- package/dist/lib/context-overflow.js +10 -10
- package/dist/lib/dashboard-settings.d.ts +0 -1
- package/dist/lib/entitlement-cache.d.ts +0 -1
- package/dist/lib/env-parsing.d.ts +13 -1
- package/dist/lib/env-parsing.js +21 -0
- package/dist/lib/errors.d.ts +0 -1
- package/dist/lib/forecast.d.ts +0 -1
- package/dist/lib/fs-retry.d.ts +0 -1
- package/dist/lib/health.d.ts +0 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/integration-generators.d.ts +0 -1
- package/dist/lib/live-account-sync.d.ts +0 -1
- package/dist/lib/local-bridge.d.ts +0 -1
- package/dist/lib/local-bridge.js +4 -1
- package/dist/lib/local-client-tokens.d.ts +0 -1
- package/dist/lib/local-client-tokens.js +125 -30
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +11 -1
- package/dist/lib/model-capability-matrix.d.ts +0 -1
- package/dist/lib/model-route-policy.d.ts +1 -2
- package/dist/lib/named-backup-export.d.ts +0 -1
- package/dist/lib/oauth-success.html +125 -125
- package/dist/lib/oc-chatgpt-import-adapter.d.ts +0 -1
- package/dist/lib/oc-chatgpt-orchestrator.d.ts +0 -1
- package/dist/lib/oc-chatgpt-target-detection.d.ts +0 -1
- package/dist/lib/parallel-probe.d.ts +0 -1
- package/dist/lib/policy/runtime-policy-cache.d.ts +80 -0
- package/dist/lib/policy/runtime-policy-cache.js +310 -0
- package/dist/lib/policy/runtime-policy.d.ts +1 -2
- package/dist/lib/policy/runtime-policy.js +46 -19
- package/dist/lib/preemptive-quota-scheduler.d.ts +0 -1
- package/dist/lib/proactive-refresh.d.ts +0 -1
- package/dist/lib/prompts/codex-host-bridge.d.ts +0 -1
- package/dist/lib/prompts/codex-host-bridge.js +138 -138
- package/dist/lib/prompts/codex.d.ts +0 -1
- package/dist/lib/prompts/codex.js +79 -79
- package/dist/lib/prompts/fetch-utils.d.ts +0 -1
- package/dist/lib/prompts/host-codex-prompt.d.ts +0 -1
- package/dist/lib/quota-cache.d.ts +7 -4
- package/dist/lib/quota-cache.d.ts.map +1 -1
- package/dist/lib/quota-cache.js +117 -61
- package/dist/lib/quota-probe.d.ts +0 -1
- package/dist/lib/quota-probe.js +5 -2
- package/dist/lib/quota-readiness.d.ts +7 -3
- package/dist/lib/quota-readiness.d.ts.map +1 -1
- package/dist/lib/quota-readiness.js +25 -4
- package/dist/lib/recovery/constants.d.ts +0 -1
- package/dist/lib/recovery/storage.d.ts +0 -1
- package/dist/lib/recovery/types.d.ts +0 -1
- package/dist/lib/recovery.d.ts +0 -1
- package/dist/lib/redaction.d.ts +0 -1
- package/dist/lib/refresh-guardian.d.ts +0 -1
- package/dist/lib/refresh-lease.d.ts +0 -1
- package/dist/lib/refresh-queue.d.ts +0 -1
- package/dist/lib/request/client-cancellation.d.ts +0 -1
- package/dist/lib/request/error-classification.d.ts +0 -1
- package/dist/lib/request/failover-config.d.ts +0 -1
- package/dist/lib/request/failure-policy.d.ts +0 -1
- package/dist/lib/request/fetch-helpers.d.ts +0 -1
- package/dist/lib/request/headers.d.ts +0 -1
- package/dist/lib/request/helpers/input-utils.d.ts +0 -1
- package/dist/lib/request/helpers/input-utils.js +88 -34
- package/dist/lib/request/helpers/model-map.d.ts +0 -1
- package/dist/lib/request/helpers/tool-utils.d.ts +0 -1
- package/dist/lib/request/helpers/tool-utils.js +421 -4
- package/dist/lib/request/index.d.ts +0 -1
- package/dist/lib/request/rate-limit-backoff.d.ts +0 -1
- package/dist/lib/request/rate-limit-decision.d.ts +0 -1
- package/dist/lib/request/request-attempt-budget.d.ts +0 -1
- package/dist/lib/request/request-init.d.ts +0 -1
- package/dist/lib/request/request-resilience.d.ts +0 -1
- package/dist/lib/request/request-transformer.d.ts +0 -1
- package/dist/lib/request/request-transformer.js +50 -25
- package/dist/lib/request/response-compaction.d.ts +0 -1
- package/dist/lib/request/response-handler.d.ts +0 -1
- package/dist/lib/request/response-metadata.d.ts +0 -1
- package/dist/lib/request/response-outcome.d.ts +0 -1
- package/dist/lib/request/stream-failover-runtime.d.ts +0 -1
- package/dist/lib/request/stream-failover.d.ts +0 -1
- package/dist/lib/request/stream-failover.js +28 -4
- package/dist/lib/request/token-refresh.d.ts +0 -1
- package/dist/lib/request/url-rewriting.d.ts +0 -1
- package/dist/lib/request/wait-utils.d.ts +0 -1
- package/dist/lib/rotation.d.ts +0 -1
- package/dist/lib/routing-mutex.d.ts +0 -1
- package/dist/lib/routing-profiles.d.ts +16 -2
- package/dist/lib/routing-profiles.js +119 -44
- package/dist/lib/runtime/account-check-helpers.d.ts +0 -1
- package/dist/lib/runtime/account-check-types.d.ts +0 -1
- package/dist/lib/runtime/account-check.d.ts +0 -1
- package/dist/lib/runtime/account-manager-cache-entry.d.ts +0 -1
- package/dist/lib/runtime/account-manager-cache.d.ts +0 -1
- package/dist/lib/runtime/account-model-catalog.d.ts +1 -2
- package/dist/lib/runtime/account-pool.d.ts +0 -1
- package/dist/lib/runtime/account-reset-credits.d.ts +0 -1
- package/dist/lib/runtime/account-reset-credits.js +8 -2
- package/dist/lib/runtime/account-scope.d.ts +0 -1
- package/dist/lib/runtime/account-select-event.d.ts +0 -1
- package/dist/lib/runtime/account-selection.d.ts +0 -1
- package/dist/lib/runtime/account-state.d.ts +0 -1
- package/dist/lib/runtime/account-status.d.ts +0 -1
- package/dist/lib/runtime/account-storage-scope-entry.d.ts +0 -1
- package/dist/lib/runtime/api-model-capabilities.d.ts +0 -1
- package/dist/lib/runtime/api-model-runtime.d.ts +0 -1
- package/dist/lib/runtime/app-bind.d.ts +0 -1
- package/dist/lib/runtime/app-bind.d.ts.map +1 -1
- package/dist/lib/runtime/app-bind.js +10 -2
- package/dist/lib/runtime/app-helper-selection.d.ts +0 -1
- package/dist/lib/runtime/auth-facade.d.ts +0 -1
- package/dist/lib/runtime/automatic-account-checks.d.ts +5 -2
- package/dist/lib/runtime/automatic-account-checks.d.ts.map +1 -1
- package/dist/lib/runtime/automatic-account-checks.js +29 -2
- package/dist/lib/runtime/automatic-subscription-checks.d.ts +1 -2
- package/dist/lib/runtime/automatic-subscription-checks.d.ts.map +1 -1
- package/dist/lib/runtime/automatic-subscription-checks.js +13 -16
- package/dist/lib/runtime/browser-oauth-flow.d.ts +0 -1
- package/dist/lib/runtime/capability-boost.d.ts +0 -1
- package/dist/lib/runtime/catalog-capabilities.d.ts +0 -1
- package/dist/lib/runtime/config-toml.d.ts +0 -1
- package/dist/lib/runtime/context-budget-settings.d.ts +0 -1
- package/dist/lib/runtime/event-handler.d.ts +0 -1
- package/dist/lib/runtime/first-run.d.ts +0 -1
- package/dist/lib/runtime/flagged-verify-types.d.ts +0 -1
- package/dist/lib/runtime/hydrate-emails.d.ts +0 -1
- package/dist/lib/runtime/inference-activity.d.ts +0 -1
- package/dist/lib/runtime/live-sync-entry.d.ts +0 -1
- package/dist/lib/runtime/live-sync.d.ts +0 -1
- package/dist/lib/runtime/loader-setup.d.ts +0 -1
- package/dist/lib/runtime/login-menu-accounts.d.ts +0 -1
- package/dist/lib/runtime/manual-oauth-flow.d.ts +0 -1
- package/dist/lib/runtime/model-discovery-status.d.ts +2 -3
- package/dist/lib/runtime/native-account-storage.d.ts +0 -1
- package/dist/lib/runtime/native-account-sync.d.ts +0 -1
- package/dist/lib/runtime/native-binding-lock.d.ts +0 -1
- package/dist/lib/runtime/native-client-auth.d.ts +0 -1
- package/dist/lib/runtime/native-provider-config.d.ts +0 -1
- package/dist/lib/runtime/native-rate-limits.d.ts +2 -1
- package/dist/lib/runtime/native-rate-limits.js +23 -6
- package/dist/lib/runtime/preemptive-quota.d.ts +0 -1
- package/dist/lib/runtime/quota-headers.d.ts +0 -1
- package/dist/lib/runtime/quota-probe.d.ts +0 -1
- package/dist/lib/runtime/quota-settings.d.ts +0 -1
- package/dist/lib/runtime/refresh-guardian-entry.d.ts +0 -1
- package/dist/lib/runtime/refresh-guardian.d.ts +0 -1
- package/dist/lib/runtime/request-init.d.ts +0 -1
- package/dist/lib/runtime/reset-credit-routing.d.ts +0 -1
- package/dist/lib/runtime/reset-credits.d.ts +0 -1
- package/dist/lib/runtime/response-output-history.d.ts +0 -1
- package/dist/lib/runtime/responses-websocket.d.ts +0 -1
- package/dist/lib/runtime/resume-picker.d.ts +0 -1
- package/dist/lib/runtime/rotation-account-selection.d.ts +0 -1
- package/dist/lib/runtime/rotation-proxy-state.d.ts +0 -1
- package/dist/lib/runtime/rotation-server-types.d.ts +0 -1
- package/dist/lib/runtime/rotation-storage-meta.d.ts +0 -1
- package/dist/lib/runtime/rotation-token-refresh.d.ts +0 -1
- package/dist/lib/runtime/runtime-capability-failures.d.ts +0 -1
- package/dist/lib/runtime/runtime-current-account.d.ts +0 -1
- package/dist/lib/runtime/runtime-observability.d.ts +0 -1
- package/dist/lib/runtime/runtime-services.d.ts +0 -1
- package/dist/lib/runtime/session-affinity-entry.d.ts +0 -1
- package/dist/lib/runtime/session-recovery.d.ts +0 -1
- package/dist/lib/runtime/status-marker.d.ts +0 -1
- package/dist/lib/runtime/storage-scope.d.ts +0 -1
- package/dist/lib/runtime/subscription-first-use.d.ts +0 -1
- package/dist/lib/runtime/subscription-quota-event.d.ts +0 -1
- package/dist/lib/runtime/subscription-quota-order.d.ts +0 -1
- package/dist/lib/runtime/toast.d.ts +0 -1
- package/dist/lib/runtime/ui-runtime-entry.d.ts +0 -1
- package/dist/lib/runtime/ui-runtime.d.ts +0 -1
- package/dist/lib/runtime/verify-flagged.d.ts +0 -1
- package/dist/lib/runtime/workspace-model-scopes.d.ts +0 -1
- package/dist/lib/runtime-constants.d.ts +0 -1
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-rotation-proxy.d.ts +1 -1
- package/dist/lib/runtime-rotation-proxy.js +136 -3
- package/dist/lib/schemas.d.ts +35 -13
- package/dist/lib/schemas.js +19 -2
- package/dist/lib/session-affinity.d.ts +0 -1
- package/dist/lib/shutdown.d.ts +0 -1
- package/dist/lib/storage/account-clear-entry.d.ts +0 -1
- package/dist/lib/storage/account-clear.d.ts +0 -1
- package/dist/lib/storage/account-match-utils.d.ts +0 -1
- package/dist/lib/storage/account-persistence.d.ts +0 -1
- package/dist/lib/storage/account-port.d.ts +0 -1
- package/dist/lib/storage/account-save-entry.d.ts +0 -1
- package/dist/lib/storage/account-save.d.ts +9 -2
- package/dist/lib/storage/account-save.js +4 -1
- package/dist/lib/storage/account-snapshot.d.ts +0 -1
- package/dist/lib/storage/backup-metadata-builder.d.ts +0 -1
- package/dist/lib/storage/backup-metadata.d.ts +0 -1
- package/dist/lib/storage/backup-paths.d.ts +0 -1
- package/dist/lib/storage/backup-restore.d.ts +0 -1
- package/dist/lib/storage/cache-artifacts.d.ts +0 -1
- package/dist/lib/storage/credential-sidecars.d.ts +0 -1
- package/dist/lib/storage/error-hints.d.ts +0 -1
- package/dist/lib/storage/file-lock.d.ts +0 -1
- package/dist/lib/storage/file-lock.js +33 -1
- package/dist/lib/storage/file-paths.d.ts +0 -1
- package/dist/lib/storage/fixture-guards.d.ts +0 -1
- package/dist/lib/storage/flagged-entry.d.ts +0 -1
- package/dist/lib/storage/flagged-load-entry.d.ts +0 -1
- package/dist/lib/storage/flagged-save-entry.d.ts +0 -1
- package/dist/lib/storage/flagged-storage-file.d.ts +0 -1
- package/dist/lib/storage/flagged-storage-io.d.ts +0 -1
- package/dist/lib/storage/flagged-storage.d.ts +0 -1
- package/dist/lib/storage/gitignore.d.ts +0 -1
- package/dist/lib/storage/hash.d.ts +0 -1
- package/dist/lib/storage/health.d.ts +0 -1
- package/dist/lib/storage/identity.d.ts +0 -1
- package/dist/lib/storage/import-export.d.ts +0 -1
- package/dist/lib/storage/json-store-lock.d.ts +105 -0
- package/dist/lib/storage/json-store-lock.js +259 -0
- package/dist/lib/storage/metadata-section.d.ts +0 -1
- package/dist/lib/storage/migrations.d.ts +0 -1
- package/dist/lib/storage/migrations.js +31 -18
- package/dist/lib/storage/named-backup-entry.d.ts +0 -1
- package/dist/lib/storage/named-backups-entry.d.ts +0 -1
- package/dist/lib/storage/named-backups.d.ts +0 -1
- package/dist/lib/storage/path-state.d.ts +0 -1
- package/dist/lib/storage/paths.d.ts +0 -1
- package/dist/lib/storage/pending-auth.d.ts +10 -3
- package/dist/lib/storage/pending-auth.d.ts.map +1 -1
- package/dist/lib/storage/pending-auth.js +33 -9
- package/dist/lib/storage/project-migration.d.ts +0 -1
- package/dist/lib/storage/public-types.d.ts +0 -1
- package/dist/lib/storage/record-identity.d.ts +15 -0
- package/dist/lib/storage/record-identity.d.ts.map +1 -0
- package/dist/lib/storage/record-identity.js +16 -0
- package/dist/lib/storage/record-utils.d.ts +0 -1
- package/dist/lib/storage/restore-assessment.d.ts +0 -1
- package/dist/lib/storage/restore-backup-entry.d.ts +0 -1
- package/dist/lib/storage/restore-metadata.d.ts +0 -1
- package/dist/lib/storage/save-retry.d.ts +0 -1
- package/dist/lib/storage/snapshot-inspectors.d.ts +0 -1
- package/dist/lib/storage/snapshot-merge.d.ts +0 -1
- package/dist/lib/storage/storage-parser.d.ts +2 -1
- package/dist/lib/storage/storage-parser.js +10 -2
- package/dist/lib/storage/transactions.d.ts +0 -1
- package/dist/lib/storage.d.ts +15 -2
- package/dist/lib/storage.js +612 -25
- package/dist/lib/synthetic-response.d.ts +0 -1
- package/dist/lib/table-formatter.d.ts +0 -1
- package/dist/lib/temp-path.d.ts +0 -1
- package/dist/lib/tools/hashline-tools.d.ts +0 -1
- package/dist/lib/types.d.ts +0 -1
- package/dist/lib/ui/ansi.d.ts +0 -1
- package/dist/lib/ui/auth-menu-builder.d.ts +0 -1
- package/dist/lib/ui/auth-menu.d.ts +0 -1
- package/dist/lib/ui/check-progress.d.ts +0 -1
- package/dist/lib/ui/confirm.d.ts +0 -1
- package/dist/lib/ui/display-width.d.ts +0 -1
- package/dist/lib/ui/format.d.ts +0 -1
- package/dist/lib/ui/index.d.ts +0 -1
- package/dist/lib/ui/runtime.d.ts +0 -1
- package/dist/lib/ui/select.d.ts +0 -1
- package/dist/lib/ui/theme.d.ts +0 -1
- package/dist/lib/ui/ui-copy.d.ts +0 -1
- package/dist/lib/unified-settings.d.ts +13 -11
- package/dist/lib/unified-settings.js +22 -14
- package/dist/lib/update-notice.d.ts +0 -1
- package/dist/lib/usage/index.d.ts +0 -1
- package/dist/lib/usage/ledger.d.ts +0 -1
- package/dist/lib/usage/pricing.d.ts +0 -1
- package/dist/lib/usage/redaction.d.ts +0 -1
- package/dist/lib/usage/stream-usage-deferral.d.ts +0 -1
- package/dist/lib/usage/types.d.ts +0 -1
- package/dist/lib/usage/usage-extraction.d.ts +0 -1
- package/dist/lib/utils.d.ts +21 -1
- package/dist/lib/utils.js +31 -0
- package/dist/lib/wsl.d.ts +0 -1
- package/node_modules/@codex-ai/plugin/dist/index.d.ts +2 -2
- package/node_modules/@codex-ai/plugin/dist/index.js +2 -2
- package/node_modules/@codex-ai/plugin/dist/tool.d.ts +42 -42
- package/node_modules/@codex-ai/plugin/dist/tool.js +29 -29
- package/node_modules/@codex-ai/plugin/package.json +9 -9
- package/node_modules/@codex-ai/sdk/dist/index.d.ts +4 -4
- package/node_modules/@codex-ai/sdk/dist/index.js +2 -2
- package/node_modules/@codex-ai/sdk/package.json +8 -8
- package/package.json +206 -200
- package/scripts/codex-app-launcher.js +653 -653
- package/scripts/codex-app-router.js +373 -373
- package/scripts/codex-bin-resolver.js +332 -313
- package/scripts/codex-multi-auth.js +65 -59
- package/scripts/codex-routing.js +62 -62
- package/scripts/codex.js +6923 -6642
- package/scripts/install-codex-auth-utils.js +213 -213
- package/scripts/mcodex.js +367 -367
- package/scripts/postinstall.js +114 -114
- package/scripts/preuninstall.js +265 -265
- package/skills/codex-auth-setup/SKILL.md +73 -0
- package/vendor/codex-ai-plugin/dist/index.d.ts +2 -2
- package/vendor/codex-ai-plugin/dist/index.js +2 -2
- package/vendor/codex-ai-plugin/dist/tool.d.ts +42 -42
- package/vendor/codex-ai-plugin/dist/tool.js +29 -29
- package/vendor/codex-ai-plugin/package.json +9 -9
- package/vendor/codex-ai-sdk/dist/index.d.ts +4 -4
- package/vendor/codex-ai-sdk/dist/index.js +2 -2
- package/vendor/codex-ai-sdk/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forecast.d.ts","sourceRoot":"","sources":["../../../../lib/codex-manager/commands/forecast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAG5E,OAAO,EAEN,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,kBAAkB,EAA6B,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAGN,KAAK,WAAW,EAEhB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAmBhE,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,O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F,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;CACtB;AAkFD,wBAAsB,kBAAkB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE,mBAAmB,GAAG;IAC3B,uBAAuB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,MAAM,CAAC;CAClE,GACC,OAAO,CAAC,MAAM,CAAC,CA8XjB"}
|
|
@@ -234,7 +234,7 @@ export async function runForecastCommand(args, deps) {
|
|
|
234
234
|
if (options.json) {
|
|
235
235
|
if (workingQuotaCache && quotaCacheChanged) {
|
|
236
236
|
try {
|
|
237
|
-
await deps.saveQuotaCache(workingQuotaCache);
|
|
237
|
+
await deps.saveQuotaCache(workingQuotaCache, quotaCache ?? undefined);
|
|
238
238
|
}
|
|
239
239
|
catch (error) {
|
|
240
240
|
// Quota cache is a derived artifact; a transient Windows EBUSY/
|
|
@@ -334,7 +334,7 @@ export async function runForecastCommand(args, deps) {
|
|
|
334
334
|
}
|
|
335
335
|
if (workingQuotaCache && quotaCacheChanged) {
|
|
336
336
|
try {
|
|
337
|
-
await deps.saveQuotaCache(workingQuotaCache);
|
|
337
|
+
await deps.saveQuotaCache(workingQuotaCache, quotaCache ?? undefined);
|
|
338
338
|
}
|
|
339
339
|
catch (error) {
|
|
340
340
|
// Quota cache is a derived artifact; tolerate transient Windows
|
|
@@ -37,6 +37,9 @@ export async function runResetsCommand(args) {
|
|
|
37
37
|
return 0;
|
|
38
38
|
}
|
|
39
39
|
const targets = (storage?.accounts ?? []).map(resetTargetForStoredAccount).filter(t => t !== null);
|
|
40
|
+
const keyCounts = new Map();
|
|
41
|
+
for (const target of targets)
|
|
42
|
+
keyCounts.set(target.key, (keyCounts.get(target.key) ?? 0) + 1);
|
|
40
43
|
const refreshed = value === '--refresh' ? await withCheckProgress('Refreshing reset-credit availability', () => service.refresh(targets)) : null;
|
|
41
44
|
const state = await service.status();
|
|
42
45
|
console.log(`Automatic redemption: ${state.policy}`);
|
|
@@ -44,7 +47,12 @@ export async function runResetsCommand(args) {
|
|
|
44
47
|
const index = (storage?.accounts ?? []).findIndex(a => resetTargetForStoredAccount(a)?.key === state.lastRedemption?.key);
|
|
45
48
|
console.log(`Last confirmed reset: ${index >= 0 ? `account ${index + 1}` : "removed account"}; ${state.lastRedemption.outcome}; ${state.lastRedemption.automatic ? "automatic" : "explicit"}`);
|
|
46
49
|
}
|
|
47
|
-
(storage?.accounts ?? []).forEach((a, i) => { const target = resetTargetForStoredAccount(a); const snapshot = target ? (refreshed ?? state.snapshots)[target.key] : undefined; console.log(`${resetAccountLabel(a, i)}: ${snapshot?.availableCount ?? 'unknown'} reset credits${snapshot ? ` (checked ${Math.max(0, Math.floor((Date.now() - snapshot.updatedAt) / 1000))}s ago)` : ''}${target?.key === state.pending?.key ? ' [redemption pending; retry this account]' : ''}`); });
|
|
50
|
+
(storage?.accounts ?? []).forEach((a, i) => { const target = resetTargetForStoredAccount(a); const ambiguous = target && (keyCounts.get(target.key) ?? 0) > 1; const snapshot = target && !ambiguous ? (refreshed ?? state.snapshots)[target.key] : undefined; console.log(`${resetAccountLabel(a, i)}: ${snapshot?.availableCount ?? 'unknown'} reset credits${snapshot ? ` (checked ${Math.max(0, Math.floor((Date.now() - snapshot.updatedAt) / 1000))}s ago)` : ''}${ambiguous ? ' [ambiguous account identity; repair duplicate records]' : ''}${target?.key === state.pending?.key ? ' [redemption pending; retry this account]' : ''}`); });
|
|
51
|
+
const failed = refreshed ? targets.filter(target => (keyCounts.get(target.key) ?? 0) > 1 || !refreshed[target.key]).length : 0;
|
|
52
|
+
if (failed) {
|
|
53
|
+
console.error(`${failed} of ${targets.length} reset-credit reads failed. Check account authentication and the native Codex backend (CODEX_MULTI_AUTH_USAGE_CODEX_BIN selects an executable). No credits were redeemed.`);
|
|
54
|
+
return 1;
|
|
55
|
+
}
|
|
48
56
|
return 0;
|
|
49
57
|
}
|
|
50
58
|
catch {
|
|
@@ -56,4 +56,3 @@ export declare function runVerifyCommand(args: string[], deps: VerifyCommandDeps
|
|
|
56
56
|
export declare function parseVerifyArgs(args: string[]): ParsedArgsResult<VerifyCliOptions>;
|
|
57
57
|
export declare function printVerifyUsage(): void;
|
|
58
58
|
export {};
|
|
59
|
-
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -33,4 +33,3 @@ export declare function runWhySelectedCommand(args: string[], deps: WhySelectedC
|
|
|
33
33
|
export declare function parseWhySelectedArgs(args: string[]): ParsedArgsResult<WhySelectedCliOptions>;
|
|
34
34
|
export declare function printWhySelectedUsage(): void;
|
|
35
35
|
export {};
|
|
36
|
-
//# sourceMappingURL=why-selected.d.ts.map
|
|
@@ -23,4 +23,3 @@ export interface DashboardDisplayPanelDeps {
|
|
|
23
23
|
UI_COPY: typeof UI_COPY;
|
|
24
24
|
}
|
|
25
25
|
export declare function promptDashboardDisplayPanel(initial: DashboardDisplaySettings, deps: DashboardDisplayPanelDeps): Promise<DashboardDisplaySettings | null>;
|
|
26
|
-
//# sourceMappingURL=dashboard-display-panel.d.ts.map
|
|
@@ -3,4 +3,3 @@ export declare function formatDashboardSettingState(value: boolean): string;
|
|
|
3
3
|
export declare function formatMenuSortMode(mode: DashboardAccountSortMode): string;
|
|
4
4
|
export declare function formatMenuLayoutMode(mode: "compact-details" | "expanded-rows"): string;
|
|
5
5
|
export declare function formatMenuQuotaTtl(ttlMs: number): string;
|
|
6
|
-
//# sourceMappingURL=dashboard-formatters.d.ts.map
|
|
@@ -7,4 +7,3 @@ export declare function dashboardSettingsDataEqual(left: DashboardDisplaySetting
|
|
|
7
7
|
resolveMenuLayoutMode: (settings: DashboardDisplaySettings) => "compact-details" | "expanded-rows";
|
|
8
8
|
normalizeStatuslineFields: (fields: DashboardDisplaySettings["menuStatuslineFields"]) => DashboardDisplaySettings["menuStatuslineFields"];
|
|
9
9
|
}): boolean;
|
|
10
|
-
//# sourceMappingURL=dashboard-settings-data.d.ts.map
|
|
@@ -4,4 +4,3 @@ export declare function promptExperimentalSettingsEntry<TTargetState>(params: {
|
|
|
4
4
|
initialConfig: PluginConfig;
|
|
5
5
|
promptExperimentalSettingsMenu: (args: ExperimentalSettingsPromptDeps<TTargetState>) => Promise<PluginConfig | null>;
|
|
6
6
|
} & ExperimentalSettingsPromptDeps<TTargetState>): Promise<PluginConfig | null>;
|
|
7
|
-
//# sourceMappingURL=experimental-settings-entry.d.ts.map
|
|
@@ -65,4 +65,3 @@ export type ExperimentalSettingsPromptDeps<TTargetState> = {
|
|
|
65
65
|
};
|
|
66
66
|
export declare function promptExperimentalSettingsMenu<TTargetState>(params: ExperimentalSettingsPromptDeps<TTargetState>): Promise<PluginConfig | null>;
|
|
67
67
|
export {};
|
|
68
|
-
//# sourceMappingURL=experimental-settings-prompt.d.ts.map
|
|
@@ -22,4 +22,3 @@ export type ExperimentalSettingsAction = {
|
|
|
22
22
|
export declare function getExperimentalSelectOptions(ui: ReturnType<typeof getUiRuntimeOptions>, help: string, onInput?: SelectOptions<ExperimentalSettingsAction>["onInput"]): SelectOptions<ExperimentalSettingsAction>;
|
|
23
23
|
export declare function mapExperimentalMenuHotkey(raw: string): ExperimentalSettingsAction | undefined;
|
|
24
24
|
export declare function mapExperimentalStatusHotkey(raw: string): ExperimentalSettingsAction | undefined;
|
|
25
|
-
//# sourceMappingURL=experimental-settings-schema.d.ts.map
|
|
@@ -27,4 +27,3 @@ export declare function loadExperimentalSyncTargetEntry(params: {
|
|
|
27
27
|
normalizeAccountStorage: (value: unknown) => AccountStorageV3 | null;
|
|
28
28
|
sleep: (ms: number) => Promise<void>;
|
|
29
29
|
}): ReturnType<typeof params.loadExperimentalSyncTargetState>;
|
|
30
|
-
//# sourceMappingURL=experimental-sync-target-entry.d.ts.map
|
|
@@ -8,4 +8,3 @@ export declare function formatRateLimitEntry(account: {
|
|
|
8
8
|
rateLimitResetTimes?: Record<string, number | undefined>;
|
|
9
9
|
}, now: number, family?: ModelFamily): string | null;
|
|
10
10
|
export declare function formatBackupSavedAt(mtimeMs: number): string;
|
|
11
|
-
//# sourceMappingURL=account-formatters.d.ts.map
|
|
@@ -23,4 +23,3 @@ export interface CompactQuotaFormatOptions {
|
|
|
23
23
|
}
|
|
24
24
|
export declare function formatCompactQuotaSnapshot(snapshot: CodexQuotaSnapshot, now?: number, options?: CompactQuotaFormatOptions): string;
|
|
25
25
|
export declare function formatAccountQuotaSummary(entry: QuotaCacheEntry, now?: number, options?: CompactQuotaFormatOptions): string;
|
|
26
|
-
//# sourceMappingURL=quota-formatters.d.ts.map
|
|
@@ -283,7 +283,7 @@ export async function runHealthCheck(options = {}) {
|
|
|
283
283
|
}
|
|
284
284
|
if (workingQuotaCache && quotaCacheChanged) {
|
|
285
285
|
try {
|
|
286
|
-
await saveQuotaCache(workingQuotaCache);
|
|
286
|
+
await saveQuotaCache(workingQuotaCache, quotaCache ?? undefined);
|
|
287
287
|
}
|
|
288
288
|
catch (error) {
|
|
289
289
|
// Quota cache is a derived artifact; a transient Windows EBUSY/EPERM
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { DashboardDisplaySettings } from "../dashboard-settings.js";
|
|
2
2
|
/** @internal */
|
|
3
3
|
export declare function runActionPanel(title: string, stage: string, action: () => Promise<void> | void, settings?: DashboardDisplaySettings): Promise<void>;
|
|
4
|
-
//# sourceMappingURL=login-action-panel.d.ts.map
|
|
@@ -17,4 +17,3 @@ export interface LoginFlowDeps {
|
|
|
17
17
|
export declare function resolveLoginAccountTarget(storage: AccountStorageV3, identifier: string): AccountMetadataV3 | null;
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare function runAuthLogin(args: string[], deps: LoginFlowDeps): Promise<number>;
|
|
20
|
-
//# sourceMappingURL=login-flow.d.ts.map
|
|
@@ -17,4 +17,3 @@ export declare function promptBackupRestoreMode(latestBackup: NamedBackupSummary
|
|
|
17
17
|
export declare function promptManualBackupSelection(backups: NamedBackupSummary[]): Promise<NamedBackupSummary | null>;
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare function handleManageAction(storage: AccountStorageV3, menuResult: Awaited<ReturnType<typeof promptLoginMode>>): Promise<void>;
|
|
20
|
-
//# sourceMappingURL=login-menu-actions.d.ts.map
|
|
@@ -16,4 +16,3 @@ export declare function refreshQuotaCacheForMenu(storage: AccountStorageV3, cach
|
|
|
16
16
|
export declare function toExistingAccountInfo(storage: AccountStorageV3, quotaCache: QuotaCacheData | null, displaySettings: DashboardDisplaySettings, runtimeCurrent?: RuntimeCurrentAccountSelection | null): ExistingAccountInfo[];
|
|
17
17
|
export declare function loadRuntimeCurrentSelectionForStorage(storage: AccountStorageV3, now?: number): Promise<RuntimeCurrentAccountSelection | null>;
|
|
18
18
|
export declare function syncCodexCliActiveSelectionIfDrifted(storage: AccountStorageV3): Promise<boolean>;
|
|
19
|
-
//# sourceMappingURL=login-menu-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-menu-data.d.ts","sourceRoot":"","sources":["../../../lib/codex-manager/login-menu-data.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrD,OAAO,EAEN,KAAK,wBAAwB,EAE7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEN,KAAK,cAAc,EAGnB,MAAM,mBAAmB,CAAC;AAe3B,OAAO,EAKN,KAAK,8BAA8B,EACnC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAezE;;;;;;GAMG;AAEH,eAAO,MAAM,iCAAiC,QAAa,CAAC;AA+E5D,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,MAAM,EAChB,GAAG,SAAa,GACd,MAAM,CAkBR;AAED,wBAAsB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BAAgB,EACzB,GAAG,SAAa,GACd,OAAO,CAAC,8BAA8B,GAAG,IAAI,CAAC,CAgBhD;AAgCD,wBAAsB,oCAAoC,CACzD,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC,OAAO,CAAC,CAyBlB"}
|
|
@@ -111,7 +111,8 @@ export async function refreshQuotaCacheForMenu(storage, cache, maxAgeMs, onProgr
|
|
|
111
111
|
// loaded; another writer (a deep check, a second session) may have saved
|
|
112
112
|
// entries meanwhile, and writing the stale clone back whole-file would
|
|
113
113
|
// silently discard them (last write wins). Re-apply this run's results
|
|
114
|
-
// onto the
|
|
114
|
+
// onto a fresh snapshot for the returned menu view. saveQuotaCache then
|
|
115
|
+
// reloads under its file lock and applies only changes since saveBaseline.
|
|
115
116
|
//
|
|
116
117
|
// loadQuotaCache() is documented to never throw — on any read failure it
|
|
117
118
|
// returns empty maps. We also guard the empty-maps case explicitly: if the
|
|
@@ -119,11 +120,14 @@ export async function refreshQuotaCacheForMenu(storage, cache, maxAgeMs, onProgr
|
|
|
119
120
|
// nextCache so non-probed entries are not wiped. The try/catch handles any
|
|
120
121
|
// mocked or future implementation that does throw.
|
|
121
122
|
let cacheToSave = nextCache;
|
|
123
|
+
let saveBaseline = cache;
|
|
122
124
|
try {
|
|
123
125
|
const persisted = await loadQuotaCache();
|
|
124
126
|
const persistedHasData = Object.keys(persisted.byAccountId).length > 0 ||
|
|
125
|
-
Object.keys(persisted.byEmail).length > 0
|
|
127
|
+
Object.keys(persisted.byEmail).length > 0 ||
|
|
128
|
+
Object.keys(persisted.byWorkspace ?? {}).length > 0;
|
|
126
129
|
if (persistedHasData) {
|
|
130
|
+
saveBaseline = cloneQuotaCacheData(persisted);
|
|
127
131
|
for (const { account, snapshot } of appliedSnapshots) {
|
|
128
132
|
updateQuotaCacheForAccount(persisted, account, snapshot, storage.accounts, emailFallbackState);
|
|
129
133
|
}
|
|
@@ -136,7 +140,7 @@ export async function refreshQuotaCacheForMenu(storage, cache, maxAgeMs, onProgr
|
|
|
136
140
|
// so non-probed entries survive.
|
|
137
141
|
}
|
|
138
142
|
try {
|
|
139
|
-
await saveQuotaCache(cacheToSave);
|
|
143
|
+
await saveQuotaCache(cacheToSave, saveBaseline);
|
|
140
144
|
}
|
|
141
145
|
catch (error) {
|
|
142
146
|
// Quota cache is a derived artifact; a transient Windows EBUSY/EPERM
|
|
@@ -91,4 +91,3 @@ export interface PersistAccountPoolOptions {
|
|
|
91
91
|
export declare function persistAccountPool(results: TokenSuccessWithAccount[], replaceAll: boolean, options?: PersistAccountPoolOptions): Promise<PersistAccountPoolResult | null>;
|
|
92
92
|
/** @internal */
|
|
93
93
|
export declare function syncSelectionToCodex(tokens: TokenSuccessWithAccount): Promise<void>;
|
|
94
|
-
//# sourceMappingURL=login-oauth.d.ts.map
|
|
@@ -8,4 +8,3 @@ interface WorkspaceChoiceDeps {
|
|
|
8
8
|
/** Undefined delegates to the unambiguous default; null means cancel without saving. */
|
|
9
9
|
export declare function chooseLoginWorkspace(candidates: AccountIdCandidate[], deps?: WorkspaceChoiceDeps): Promise<string | undefined | null>;
|
|
10
10
|
export {};
|
|
11
|
-
//# sourceMappingURL=login-workspace-choice.d.ts.map
|
|
@@ -30,4 +30,3 @@ export type ManualCallbackClassification = {
|
|
|
30
30
|
* which is treated as a cancellation.
|
|
31
31
|
*/
|
|
32
32
|
export declare function classifyManualCallbackInput(answer: string | null, expectedState: string): ManualCallbackClassification;
|
|
33
|
-
//# sourceMappingURL=manual-callback.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type QuotaCacheAccountRef } from "../quota-readiness.js";
|
|
1
2
|
import { type QuotaCacheData, type QuotaCacheEntry } from "../quota-cache.js";
|
|
2
3
|
import type { CodexQuotaSnapshot } from "../quota-probe.js";
|
|
3
4
|
import type { AccountMetadataV3 } from "../storage.js";
|
|
@@ -11,8 +12,12 @@ import type { AccountMetadataV3 } from "../storage.js";
|
|
|
11
12
|
*/
|
|
12
13
|
/** Default model used for live quota probes across manager commands. */
|
|
13
14
|
export declare const DEFAULT_LIVE_PROBE_MODEL = "gpt-5.6-sol";
|
|
14
|
-
|
|
15
|
+
/** Combine selected-workspace observations with persisted account-level rate-limit blockers. */
|
|
16
|
+
export declare function getPersistedQuotaViewForAccount(cache: QuotaCacheData | null, account: QuotaCacheAccountRef & Pick<AccountMetadataV3, "rateLimitResetTimes">, accounts: readonly Pick<AccountMetadataV3, "accountId" | "email">[], now: number, emailFallbackState?: ReadonlyMap<string, import("../quota-readiness.js").QuotaEmailFallbackState>): QuotaCacheEntry | null;
|
|
17
|
+
/** Update legacy stored-binding quota with a unique ID or safe email fallback. */
|
|
15
18
|
export declare function updateQuotaCacheForAccount(cache: QuotaCacheData, account: Pick<AccountMetadataV3, "accountId" | "email">, snapshot: CodexQuotaSnapshot, accounts: readonly Pick<AccountMetadataV3, "accountId" | "email">[], emailFallbackState?: ReadonlyMap<string, import("../quota-readiness.js").QuotaEmailFallbackState>): boolean;
|
|
19
|
+
/** Persist the observed workspace without attributing sibling quota to a stored binding. */
|
|
20
|
+
export declare function updateQuotaCacheForWorkspace(cache: QuotaCacheData, account: AccountMetadataV3, workspaceId: string, snapshot: CodexQuotaSnapshot, accounts: readonly AccountMetadataV3[]): void;
|
|
21
|
+
/** Clone every cache namespace; immutable entries may safely remain shared. */
|
|
16
22
|
export declare function cloneQuotaCacheData(cache: QuotaCacheData): QuotaCacheData;
|
|
17
23
|
export declare function pruneUnsafeQuotaEmailCacheEntry(cache: QuotaCacheData, email: string | undefined, accounts: readonly Pick<AccountMetadataV3, "accountId" | "email">[], emailFallbackState?: ReadonlyMap<string, import("../quota-readiness.js").QuotaEmailFallbackState>): boolean;
|
|
18
|
-
//# sourceMappingURL=quota-cache-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-cache-helpers.d.ts","sourceRoot":"","sources":["../../../lib/codex-manager/quota-cache-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,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gB,mBAAmB,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAQzE;AAED,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,EAAE,SAAS,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,CAAC,EAAE,EACnE,kBAAkB,+EAAyC,GACzD,OAAO,CAeT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildQuotaEmailFallbackState, hasSafeQuotaEmailFallback, hasUniqueQuotaAccountId, normalizeQuotaAccountId, normalizeQuotaEmail, } from "../quota-readiness.js";
|
|
1
|
+
import { buildQuotaEmailFallbackState, findQuotaCacheEntryForAccount, quotaWorkspaceKey, hasSafeQuotaEmailFallback, hasUniqueQuotaAccountId, normalizeQuotaAccountId, normalizeQuotaEmail, } from "../quota-readiness.js";
|
|
2
2
|
import { DEFAULT_MODEL, DEFAULT_PROBE_MODEL, } from "../request/helpers/model-map.js";
|
|
3
3
|
import { getRateLimitResetTimeForFamily } from "../runtime/account-status.js";
|
|
4
4
|
/**
|
|
@@ -11,24 +11,10 @@ import { getRateLimitResetTimeForFamily } from "../runtime/account-status.js";
|
|
|
11
11
|
*/
|
|
12
12
|
/** Default model used for live quota probes across manager commands. */
|
|
13
13
|
export const DEFAULT_LIVE_PROBE_MODEL = DEFAULT_PROBE_MODEL;
|
|
14
|
-
|
|
15
|
-
const accountId = normalizeQuotaAccountId(account.accountId);
|
|
16
|
-
if (accountId &&
|
|
17
|
-
hasUniqueQuotaAccountId(accounts, account) &&
|
|
18
|
-
cache.byAccountId[accountId]) {
|
|
19
|
-
return cache.byAccountId[accountId] ?? null;
|
|
20
|
-
}
|
|
21
|
-
const email = normalizeQuotaEmail(account.email);
|
|
22
|
-
if (email &&
|
|
23
|
-
hasSafeQuotaEmailFallback(emailFallbackState, account) &&
|
|
24
|
-
cache.byEmail[email]) {
|
|
25
|
-
return cache.byEmail[email] ?? null;
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
14
|
+
/** Combine selected-workspace observations with persisted account-level rate-limit blockers. */
|
|
29
15
|
export function getPersistedQuotaViewForAccount(cache, account, accounts, now, emailFallbackState = buildQuotaEmailFallbackState(accounts)) {
|
|
30
16
|
const cachedEntry = cache
|
|
31
|
-
?
|
|
17
|
+
? findQuotaCacheEntryForAccount(cache, account, accounts, emailFallbackState)
|
|
32
18
|
: null;
|
|
33
19
|
const persistedResetAt = getRateLimitResetTimeForFamily(account, now, "codex");
|
|
34
20
|
if (typeof persistedResetAt !== "number") {
|
|
@@ -52,8 +38,9 @@ export function getPersistedQuotaViewForAccount(cache, account, accounts, now, e
|
|
|
52
38
|
secondary: cachedEntry?.secondary ?? {},
|
|
53
39
|
};
|
|
54
40
|
}
|
|
55
|
-
|
|
56
|
-
|
|
41
|
+
/** Retain only quota fields from a probe, never its credentials or response body. */
|
|
42
|
+
function quotaEntryFromSnapshot(snapshot) {
|
|
43
|
+
return {
|
|
57
44
|
updatedAt: Date.now(),
|
|
58
45
|
status: snapshot.status,
|
|
59
46
|
model: snapshot.model,
|
|
@@ -69,6 +56,10 @@ export function updateQuotaCacheForAccount(cache, account, snapshot, accounts, e
|
|
|
69
56
|
resetAtMs: snapshot.secondary.resetAtMs,
|
|
70
57
|
},
|
|
71
58
|
};
|
|
59
|
+
}
|
|
60
|
+
/** Update legacy stored-binding quota with a unique ID or safe email fallback. */
|
|
61
|
+
export function updateQuotaCacheForAccount(cache, account, snapshot, accounts, emailFallbackState = buildQuotaEmailFallbackState(accounts)) {
|
|
62
|
+
const nextEntry = quotaEntryFromSnapshot(snapshot);
|
|
72
63
|
let changed = false;
|
|
73
64
|
const accountId = normalizeQuotaAccountId(account.accountId);
|
|
74
65
|
const hasUniqueAccountId = accountId !== null && hasUniqueQuotaAccountId(accounts, account);
|
|
@@ -89,12 +80,36 @@ export function updateQuotaCacheForAccount(cache, account, snapshot, accounts, e
|
|
|
89
80
|
}
|
|
90
81
|
return changed;
|
|
91
82
|
}
|
|
83
|
+
/** Persist the observed workspace without attributing sibling quota to a stored binding. */
|
|
84
|
+
export function updateQuotaCacheForWorkspace(cache, account, workspaceId, snapshot, accounts) {
|
|
85
|
+
const key = quotaWorkspaceKey(account, workspaceId);
|
|
86
|
+
if (!key)
|
|
87
|
+
return;
|
|
88
|
+
cache.byWorkspace ??= {};
|
|
89
|
+
cache.byWorkspace[key] = quotaEntryFromSnapshot(snapshot);
|
|
90
|
+
if (workspaceId === normalizeQuotaAccountId(account.accountId)) {
|
|
91
|
+
updateQuotaCacheForAccount(cache, account, snapshot, accounts);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
// Retire the ambiguous fallback only after retaining its binding observation.
|
|
95
|
+
const boundId = normalizeQuotaAccountId(account.accountId);
|
|
96
|
+
const binding = boundId ? findQuotaCacheEntryForAccount(cache, account, accounts, undefined, boundId) : null;
|
|
97
|
+
const boundKey = boundId && quotaWorkspaceKey(account, boundId);
|
|
98
|
+
if (binding && boundKey)
|
|
99
|
+
cache.byWorkspace[boundKey] = binding;
|
|
100
|
+
const email = normalizeQuotaEmail(account.email);
|
|
101
|
+
if (email)
|
|
102
|
+
delete cache.byEmail[email];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/** Clone every cache namespace; immutable entries may safely remain shared. */
|
|
92
106
|
export function cloneQuotaCacheData(cache) {
|
|
93
107
|
// Shallow spreading is safe because quota cache entries are always replaced,
|
|
94
108
|
// never mutated in-place.
|
|
95
109
|
return {
|
|
96
110
|
byAccountId: { ...cache.byAccountId },
|
|
97
111
|
byEmail: { ...cache.byEmail },
|
|
112
|
+
...(cache.byWorkspace ? { byWorkspace: { ...cache.byWorkspace } } : {}),
|
|
98
113
|
};
|
|
99
114
|
}
|
|
100
115
|
export function pruneUnsafeQuotaEmailCacheEntry(cache, email, accounts, emailFallbackState = buildQuotaEmailFallbackState(accounts)) {
|
|
@@ -65,4 +65,3 @@ export declare function runVerifyFlagged(args: string[], deps: RepairCommandDeps
|
|
|
65
65
|
export declare function runFix(args: string[], deps: RepairCommandDeps): Promise<number>;
|
|
66
66
|
export declare function runDoctor(args: string[], deps: RepairCommandDeps): Promise<number>;
|
|
67
67
|
export {};
|
|
68
|
-
//# sourceMappingURL=repair-commands.d.ts.map
|
|
@@ -1195,7 +1195,7 @@ export async function runFix(args, deps) {
|
|
|
1195
1195
|
let quotaCacheSaveError = null;
|
|
1196
1196
|
if (!options.dryRun && workingQuotaCache && quotaCacheChanged) {
|
|
1197
1197
|
try {
|
|
1198
|
-
await saveQuotaCache(workingQuotaCache);
|
|
1198
|
+
await saveQuotaCache(workingQuotaCache, quotaCache ?? undefined);
|
|
1199
1199
|
}
|
|
1200
1200
|
catch (error) {
|
|
1201
1201
|
// Account storage was already persisted above. Surface the quota-cache
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { PluginConfig } from "../../types.js";
|
|
2
2
|
export declare function promptBackendSettings(initial: PluginConfig): Promise<PluginConfig | null>;
|
|
3
3
|
export declare function configureBackendSettings(currentConfig?: PluginConfig): Promise<PluginConfig>;
|
|
4
|
-
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -8,4 +8,3 @@ export declare function promptStatuslineSettings(initial: DashboardDisplaySettin
|
|
|
8
8
|
export declare function configureStatuslineSettings(currentSettings?: DashboardDisplaySettings): Promise<DashboardDisplaySettings>;
|
|
9
9
|
export declare function promptBehaviorSettings(initial: DashboardDisplaySettings): Promise<DashboardDisplaySettings | null>;
|
|
10
10
|
export declare function promptThemeSettings(initial: DashboardDisplaySettings): Promise<DashboardDisplaySettings | null>;
|
|
11
|
-
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -15,4 +15,3 @@ export declare function loadExperimentalSyncTarget(): Promise<{
|
|
|
15
15
|
destination: import("../../storage.js").AccountStorageV3 | null;
|
|
16
16
|
}>;
|
|
17
17
|
export declare function promptExperimentalSettings(initialConfig: PluginConfig): Promise<PluginConfig | null>;
|
|
18
|
-
//# sourceMappingURL=experimental.d.ts.map
|
|
@@ -37,4 +37,3 @@ export declare function resolveMenuLayoutMode(settings: DashboardDisplaySettings
|
|
|
37
37
|
export declare function withQueuedRetryForTests<T>(pathKey: string, task: () => Promise<T>): Promise<T>;
|
|
38
38
|
export declare function persistDashboardSettingsSelectionForTests(selected: DashboardDisplaySettings, keys: ReadonlyArray<keyof DashboardDisplaySettings>, scope: string): Promise<DashboardDisplaySettings>;
|
|
39
39
|
export declare function persistBackendConfigSelectionForTests(selected: PluginConfig, scope: string): Promise<PluginConfig>;
|
|
40
|
-
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -27,4 +27,3 @@ export declare function buildSettingsHubItems(copy: {
|
|
|
27
27
|
back: string;
|
|
28
28
|
}): MenuItem<SettingsHubMenuAction>[];
|
|
29
29
|
export declare function findSettingsHubInitialCursor(items: MenuItem<SettingsHubMenuAction>[], initialFocus: SettingsHubMenuAction["type"]): number | undefined;
|
|
30
|
-
//# sourceMappingURL=settings-hub-menu.d.ts.map
|
|
@@ -53,4 +53,3 @@ export declare function promptThemeSettingsPanelEntry(params: {
|
|
|
53
53
|
THEME_PANEL_KEYS: ThemeSettingsPanelDeps["THEME_PANEL_KEYS"];
|
|
54
54
|
UI_COPY: ThemeSettingsPanelDeps["UI_COPY"];
|
|
55
55
|
}): Promise<DashboardDisplaySettings | null>;
|
|
56
|
-
//# sourceMappingURL=settings-panels.d.ts.map
|