codex-multi-auth 2.3.0-beta.1 → 2.3.0-beta.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 +2 -1
- package/README.md +4 -4
- package/config/schema/config.schema.json +268 -21
- package/dist/index.js +0 -1
- package/dist/lib/account-policy.d.ts.map +1 -1
- package/dist/lib/account-policy.js +2 -2
- package/dist/lib/accounts/rate-limits.js +0 -1
- package/dist/lib/accounts.d.ts +3 -8
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/lib/accounts.js +2 -3
- package/dist/lib/audit.d.ts +0 -9
- package/dist/lib/audit.d.ts.map +1 -1
- package/dist/lib/audit.js +0 -1
- package/dist/lib/auth/auth.js +0 -1
- package/dist/lib/auth/browser.js +0 -1
- package/dist/lib/auth/device-auth.d.ts +1 -6
- package/dist/lib/auth/device-auth.d.ts.map +1 -1
- package/dist/lib/auth/device-auth.js +5 -6
- package/dist/lib/auth/index.js +0 -1
- package/dist/lib/auth/org-override.js +0 -1
- package/dist/lib/auth/server.js +0 -1
- package/dist/lib/auth/token-utils.js +0 -1
- package/dist/lib/auth-rate-limit.js +0 -1
- package/dist/lib/budget-guard.d.ts.map +1 -1
- package/dist/lib/budget-guard.js +2 -2
- package/dist/lib/capability-policy.js +0 -1
- package/dist/lib/circuit-breaker.js +0 -1
- package/dist/lib/cli.js +1 -2
- package/dist/lib/codex-cli/index.js +0 -1
- package/dist/lib/codex-cli/observability.js +0 -1
- package/dist/lib/codex-cli/state.js +0 -1
- package/dist/lib/codex-cli/sync.d.ts +2 -2
- package/dist/lib/codex-cli/sync.d.ts.map +1 -1
- package/dist/lib/codex-cli/sync.js +1 -2
- package/dist/lib/codex-cli/writer.d.ts.map +1 -1
- package/dist/lib/codex-cli/writer.js +2 -2
- package/dist/lib/codex-manager/account-credentials.d.ts +13 -0
- package/dist/lib/codex-manager/account-credentials.d.ts.map +1 -0
- package/dist/lib/codex-manager/account-credentials.js +55 -0
- package/dist/lib/codex-manager/account-manager-commands.js +0 -1
- package/dist/lib/codex-manager/account-pool-write.d.ts +1 -1
- package/dist/lib/codex-manager/account-pool-write.d.ts.map +1 -1
- package/dist/lib/codex-manager/account-pool-write.js +0 -1
- package/dist/lib/codex-manager/backend-category-entry.js +0 -1
- package/dist/lib/codex-manager/backend-category-helpers.js +0 -1
- package/dist/lib/codex-manager/backend-category-prompt.js +0 -1
- package/dist/lib/codex-manager/backend-settings-controller.js +0 -1
- package/dist/lib/codex-manager/backend-settings-entry.js +0 -1
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts +0 -1
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts.map +1 -1
- package/dist/lib/codex-manager/backend-settings-helpers.js +1 -2
- package/dist/lib/codex-manager/backend-settings-prompt.js +0 -1
- package/dist/lib/codex-manager/backend-settings-schema.js +0 -1
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts +1 -20
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts.map +1 -1
- package/dist/lib/codex-manager/behavior-settings-panel.js +0 -1
- package/dist/lib/codex-manager/commands/account.js +0 -1
- package/dist/lib/codex-manager/commands/best.d.ts +8 -0
- package/dist/lib/codex-manager/commands/best.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/best.js +64 -1
- package/dist/lib/codex-manager/commands/bridge.js +0 -1
- package/dist/lib/codex-manager/commands/budget.js +0 -1
- package/dist/lib/codex-manager/commands/check.js +0 -1
- package/dist/lib/codex-manager/commands/config-explain.js +0 -1
- package/dist/lib/codex-manager/commands/debug-bundle.js +0 -1
- package/dist/lib/codex-manager/commands/forecast.js +0 -1
- package/dist/lib/codex-manager/commands/init-config.js +0 -1
- package/dist/lib/codex-manager/commands/integrations.js +0 -1
- package/dist/lib/codex-manager/commands/models.js +0 -1
- package/dist/lib/codex-manager/commands/monitor.js +0 -1
- package/dist/lib/codex-manager/commands/report.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/report.js +2 -2
- package/dist/lib/codex-manager/commands/rotation.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/rotation.js +1 -4
- package/dist/lib/codex-manager/commands/status.js +0 -1
- package/dist/lib/codex-manager/commands/switch.js +0 -1
- package/dist/lib/codex-manager/commands/uninstall.d.ts +2 -2
- package/dist/lib/codex-manager/commands/uninstall.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/uninstall.js +3 -34
- package/dist/lib/codex-manager/commands/unpin.js +0 -1
- package/dist/lib/codex-manager/commands/usage.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/usage.js +2 -2
- package/dist/lib/codex-manager/commands/verify.d.ts +2 -2
- package/dist/lib/codex-manager/commands/verify.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/verify.js +0 -1
- package/dist/lib/codex-manager/commands/why-selected.d.ts +1 -22
- package/dist/lib/codex-manager/commands/why-selected.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/why-selected.js +0 -1
- package/dist/lib/codex-manager/commands/workspace.js +0 -1
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts +1 -15
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts.map +1 -1
- package/dist/lib/codex-manager/dashboard-display-panel.js +0 -1
- package/dist/lib/codex-manager/dashboard-formatters.js +0 -1
- package/dist/lib/codex-manager/dashboard-settings-controller.js +0 -1
- package/dist/lib/codex-manager/dashboard-settings-data.js +0 -1
- package/dist/lib/codex-manager/dashboard-settings-entry.js +0 -1
- package/dist/lib/codex-manager/experimental-settings-entry.js +0 -1
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts +2 -1
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts.map +1 -1
- package/dist/lib/codex-manager/experimental-settings-prompt.js +0 -1
- package/dist/lib/codex-manager/experimental-settings-schema.js +1 -2
- package/dist/lib/codex-manager/experimental-sync-target-entry.js +0 -1
- package/dist/lib/codex-manager/experimental-sync-target.js +0 -1
- package/dist/lib/codex-manager/forecast-report-commands.js +0 -1
- package/dist/lib/codex-manager/forecast-report-shared.d.ts +2 -2
- package/dist/lib/codex-manager/forecast-report-shared.d.ts.map +1 -1
- package/dist/lib/codex-manager/forecast-report-shared.js +5 -21
- package/dist/lib/codex-manager/formatters/account-formatters.d.ts +11 -0
- package/dist/lib/codex-manager/formatters/account-formatters.d.ts.map +1 -0
- package/dist/lib/codex-manager/formatters/account-formatters.js +79 -0
- package/dist/lib/codex-manager/formatters/index.d.ts +5 -0
- package/dist/lib/codex-manager/formatters/index.d.ts.map +1 -0
- package/dist/lib/codex-manager/formatters/index.js +4 -0
- package/dist/lib/codex-manager/formatters/model-formatters.d.ts +12 -0
- package/dist/lib/codex-manager/formatters/model-formatters.d.ts.map +1 -0
- package/dist/lib/codex-manager/formatters/model-formatters.js +23 -0
- package/dist/lib/codex-manager/formatters/quota-formatters.d.ts +9 -0
- package/dist/lib/codex-manager/formatters/quota-formatters.d.ts.map +1 -0
- package/dist/lib/codex-manager/formatters/quota-formatters.js +104 -0
- package/dist/lib/codex-manager/formatters/text-style.d.ts +14 -0
- package/dist/lib/codex-manager/formatters/text-style.d.ts.map +1 -0
- package/dist/lib/codex-manager/formatters/text-style.js +111 -0
- package/dist/lib/codex-manager/health-check.d.ts +14 -0
- package/dist/lib/codex-manager/health-check.d.ts.map +1 -0
- package/dist/lib/codex-manager/health-check.js +278 -0
- package/dist/lib/codex-manager/help.d.ts +2 -1
- package/dist/lib/codex-manager/help.d.ts.map +1 -1
- package/dist/lib/codex-manager/help.js +0 -1
- package/dist/lib/codex-manager/login-action-panel.d.ts +4 -0
- package/dist/lib/codex-manager/login-action-panel.d.ts.map +1 -0
- package/dist/lib/codex-manager/login-action-panel.js +238 -0
- package/dist/lib/codex-manager/login-flow.d.ts +17 -0
- package/dist/lib/codex-manager/login-flow.d.ts.map +1 -0
- package/dist/lib/codex-manager/login-flow.js +387 -0
- package/dist/lib/codex-manager/login-menu-actions.d.ts +20 -0
- package/dist/lib/codex-manager/login-menu-actions.d.ts.map +1 -0
- package/dist/lib/codex-manager/login-menu-actions.js +303 -0
- package/dist/lib/codex-manager/login-menu-data.d.ts +19 -0
- package/dist/lib/codex-manager/login-menu-data.d.ts.map +1 -0
- package/dist/lib/codex-manager/login-menu-data.js +378 -0
- package/dist/lib/codex-manager/login-oauth.d.ts +55 -0
- package/dist/lib/codex-manager/login-oauth.d.ts.map +1 -0
- package/dist/lib/codex-manager/login-oauth.js +345 -0
- package/dist/lib/codex-manager/manual-callback.js +0 -1
- package/dist/lib/codex-manager/persist-selected-account.d.ts +24 -0
- package/dist/lib/codex-manager/persist-selected-account.d.ts.map +1 -0
- package/dist/lib/codex-manager/persist-selected-account.js +107 -0
- package/dist/lib/codex-manager/quota-cache-helpers.d.ts +18 -0
- package/dist/lib/codex-manager/quota-cache-helpers.d.ts.map +1 -0
- package/dist/lib/codex-manager/quota-cache-helpers.js +112 -0
- package/dist/lib/codex-manager/rate-limit-markers.js +0 -1
- package/dist/lib/codex-manager/repair-commands.d.ts +0 -15
- package/dist/lib/codex-manager/repair-commands.d.ts.map +1 -1
- package/dist/lib/codex-manager/repair-commands.js +5 -6
- package/dist/lib/codex-manager/settings-hub/backend.d.ts +0 -5
- package/dist/lib/codex-manager/settings-hub/backend.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-hub/backend.js +2 -3
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts +1 -14
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-hub/dashboard.js +9 -10
- package/dist/lib/codex-manager/settings-hub/experimental.js +1 -2
- package/dist/lib/codex-manager/settings-hub/index.js +1 -2
- package/dist/lib/codex-manager/settings-hub/shared.js +0 -1
- package/dist/lib/codex-manager/settings-hub-entry.js +0 -1
- package/dist/lib/codex-manager/settings-hub-menu.js +0 -1
- package/dist/lib/codex-manager/settings-hub-prompt.js +0 -1
- package/dist/lib/codex-manager/settings-hub.js +0 -1
- package/dist/lib/codex-manager/settings-panels.js +0 -1
- package/dist/lib/codex-manager/settings-persist-utils.js +0 -1
- package/dist/lib/codex-manager/settings-preview.js +0 -1
- package/dist/lib/codex-manager/settings-write-queue.d.ts +0 -10
- package/dist/lib/codex-manager/settings-write-queue.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-write-queue.js +10 -11
- package/dist/lib/codex-manager/statusline-order.js +0 -1
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts +3 -18
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts.map +1 -1
- package/dist/lib/codex-manager/statusline-settings-panel.js +0 -1
- package/dist/lib/codex-manager/theme-settings-panel.d.ts +1 -14
- package/dist/lib/codex-manager/theme-settings-panel.d.ts.map +1 -1
- package/dist/lib/codex-manager/theme-settings-panel.js +0 -1
- package/dist/lib/codex-manager/unified-settings-controller.js +0 -1
- package/dist/lib/codex-manager/unified-settings-entry.js +0 -1
- package/dist/lib/codex-manager.d.ts +2 -4
- package/dist/lib/codex-manager.d.ts.map +1 -1
- package/dist/lib/codex-manager.js +219 -2570
- package/dist/lib/config-schema.d.ts +32 -0
- package/dist/lib/config-schema.d.ts.map +1 -0
- package/dist/lib/config-schema.js +96 -0
- package/dist/lib/config.d.ts +0 -13
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +82 -123
- package/dist/lib/constants.js +0 -1
- package/dist/lib/context-overflow.js +0 -1
- package/dist/lib/dashboard-settings.d.ts +3 -3
- package/dist/lib/dashboard-settings.d.ts.map +1 -1
- package/dist/lib/dashboard-settings.js +0 -2
- package/dist/lib/entitlement-cache.js +0 -1
- package/dist/lib/env-parsing.js +0 -1
- package/dist/lib/errors.d.ts +0 -1
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +0 -1
- package/dist/lib/forecast.d.ts +4 -3
- package/dist/lib/forecast.d.ts.map +1 -1
- package/dist/lib/forecast.js +0 -1
- package/dist/lib/fs-retry.d.ts +46 -3
- package/dist/lib/fs-retry.d.ts.map +1 -1
- package/dist/lib/fs-retry.js +77 -9
- package/dist/lib/health.js +0 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/integration-generators.js +0 -1
- package/dist/lib/live-account-sync.js +0 -1
- package/dist/lib/local-bridge.js +0 -1
- package/dist/lib/local-client-tokens.d.ts.map +1 -1
- package/dist/lib/local-client-tokens.js +2 -2
- package/dist/lib/logger.js +0 -1
- package/dist/lib/model-capability-matrix.js +0 -1
- package/dist/lib/named-backup-export.js +0 -1
- package/dist/lib/oc-chatgpt-import-adapter.d.ts +1 -1
- package/dist/lib/oc-chatgpt-import-adapter.d.ts.map +1 -1
- package/dist/lib/oc-chatgpt-import-adapter.js +0 -1
- package/dist/lib/oc-chatgpt-orchestrator.d.ts.map +1 -1
- package/dist/lib/oc-chatgpt-orchestrator.js +2 -2
- package/dist/lib/oc-chatgpt-target-detection.d.ts +1 -1
- package/dist/lib/oc-chatgpt-target-detection.d.ts.map +1 -1
- package/dist/lib/oc-chatgpt-target-detection.js +0 -1
- package/dist/lib/parallel-probe.js +0 -1
- package/dist/lib/policy/runtime-policy.js +0 -1
- package/dist/lib/preemptive-quota-scheduler.js +0 -1
- package/dist/lib/proactive-refresh.js +0 -1
- package/dist/lib/prompts/codex-host-bridge.d.ts +0 -8
- package/dist/lib/prompts/codex-host-bridge.d.ts.map +1 -1
- package/dist/lib/prompts/codex-host-bridge.js +0 -21
- package/dist/lib/prompts/codex.d.ts +3 -11
- package/dist/lib/prompts/codex.d.ts.map +1 -1
- package/dist/lib/prompts/codex.js +6 -13
- package/dist/lib/prompts/fetch-utils.d.ts +0 -2
- package/dist/lib/prompts/fetch-utils.d.ts.map +1 -1
- package/dist/lib/prompts/fetch-utils.js +2 -3
- package/dist/lib/prompts/host-codex-prompt.d.ts.map +1 -1
- package/dist/lib/prompts/host-codex-prompt.js +2 -2
- package/dist/lib/quota-cache.d.ts.map +1 -1
- package/dist/lib/quota-cache.js +17 -44
- package/dist/lib/quota-probe.js +0 -1
- package/dist/lib/quota-readiness.js +0 -1
- package/dist/lib/recovery/constants.js +0 -1
- package/dist/lib/recovery/index.js +0 -1
- package/dist/lib/recovery/storage.d.ts.map +1 -1
- package/dist/lib/recovery/storage.js +35 -54
- package/dist/lib/recovery/storage.js.map +1 -1
- package/dist/lib/recovery/types.d.ts +4 -12
- package/dist/lib/recovery/types.d.ts.map +1 -1
- package/dist/lib/recovery/types.js +0 -1
- package/dist/lib/recovery.d.ts +2 -2
- package/dist/lib/recovery.d.ts.map +1 -1
- package/dist/lib/recovery.js +0 -1
- package/dist/lib/refresh-guardian.js +0 -1
- package/dist/lib/refresh-lease.d.ts.map +1 -1
- package/dist/lib/refresh-lease.js +1 -4
- package/dist/lib/refresh-queue.js +0 -1
- package/dist/lib/request/error-classification.d.ts +75 -0
- package/dist/lib/request/error-classification.d.ts.map +1 -0
- package/dist/lib/request/error-classification.js +295 -0
- package/dist/lib/request/failover-config.js +0 -1
- package/dist/lib/request/failure-policy.js +0 -1
- package/dist/lib/request/fetch-helpers.d.ts +10 -114
- package/dist/lib/request/fetch-helpers.d.ts.map +1 -1
- package/dist/lib/request/fetch-helpers.js +7 -589
- package/dist/lib/request/headers.d.ts +33 -0
- package/dist/lib/request/headers.d.ts.map +1 -0
- package/dist/lib/request/headers.js +64 -0
- package/dist/lib/request/helpers/input-utils.js +0 -1
- package/dist/lib/request/helpers/model-map.d.ts +10 -0
- package/dist/lib/request/helpers/model-map.d.ts.map +1 -1
- package/dist/lib/request/helpers/model-map.js +11 -1
- package/dist/lib/request/helpers/tool-utils.js +0 -1
- package/dist/lib/request/index.js +0 -1
- package/dist/lib/request/rate-limit-backoff.js +0 -1
- package/dist/lib/request/rate-limit-decision.d.ts +28 -0
- package/dist/lib/request/rate-limit-decision.d.ts.map +1 -0
- package/dist/lib/request/rate-limit-decision.js +191 -0
- package/dist/lib/request/request-attempt-budget.js +0 -1
- package/dist/lib/request/request-init.js +0 -1
- package/dist/lib/request/request-resilience.js +0 -1
- package/dist/lib/request/request-transformer.js +0 -1
- package/dist/lib/request/response-compaction.d.ts +2 -1
- package/dist/lib/request/response-compaction.d.ts.map +1 -1
- package/dist/lib/request/response-compaction.js +0 -1
- package/dist/lib/request/response-handler.js +0 -1
- package/dist/lib/request/response-metadata.js +0 -1
- package/dist/lib/request/stream-failover-runtime.d.ts +8 -0
- package/dist/lib/request/stream-failover-runtime.d.ts.map +1 -0
- package/dist/lib/request/stream-failover-runtime.js +171 -0
- package/dist/lib/request/stream-failover.js +0 -1
- package/dist/lib/request/token-refresh.d.ts +30 -0
- package/dist/lib/request/token-refresh.d.ts.map +1 -0
- package/dist/lib/request/token-refresh.js +116 -0
- package/dist/lib/request/url-rewriting.d.ts +24 -0
- package/dist/lib/request/url-rewriting.d.ts.map +1 -0
- package/dist/lib/request/url-rewriting.js +153 -0
- package/dist/lib/request/wait-utils.js +0 -1
- package/dist/lib/rotation.d.ts +2 -4
- package/dist/lib/rotation.d.ts.map +1 -1
- package/dist/lib/rotation.js +1 -3
- package/dist/lib/routing-mutex.js +0 -1
- package/dist/lib/routing-profiles.d.ts.map +1 -1
- package/dist/lib/routing-profiles.js +2 -2
- package/dist/lib/runtime/account-check-helpers.js +0 -1
- package/dist/lib/runtime/account-check-types.js +0 -1
- package/dist/lib/runtime/account-check.js +0 -1
- package/dist/lib/runtime/account-health-check.js +0 -1
- package/dist/lib/runtime/account-manager-cache-entry.js +0 -1
- package/dist/lib/runtime/account-manager-cache.js +0 -1
- package/dist/lib/runtime/account-pool.js +0 -1
- package/dist/lib/runtime/account-scope.js +0 -1
- package/dist/lib/runtime/account-select-event.js +0 -1
- package/dist/lib/runtime/account-selection.js +0 -1
- package/dist/lib/runtime/account-state.js +0 -1
- package/dist/lib/runtime/account-status.js +0 -1
- package/dist/lib/runtime/account-storage-scope-entry.js +0 -1
- package/dist/lib/runtime/app-bind.js +0 -1
- package/dist/lib/runtime/auth-facade.js +0 -1
- package/dist/lib/runtime/browser-oauth-flow.js +0 -1
- package/dist/lib/runtime/capability-boost.js +0 -1
- package/dist/lib/runtime/config-toml.d.ts +0 -6
- package/dist/lib/runtime/config-toml.d.ts.map +1 -1
- package/dist/lib/runtime/config-toml.js +6 -7
- package/dist/lib/runtime/event-handler.d.ts +0 -31
- package/dist/lib/runtime/event-handler.d.ts.map +1 -1
- package/dist/lib/runtime/event-handler.js +0 -23
- package/dist/lib/runtime/first-run.d.ts +78 -0
- package/dist/lib/runtime/first-run.d.ts.map +1 -0
- package/dist/lib/runtime/first-run.js +327 -0
- package/dist/lib/runtime/flagged-verify-types.js +0 -1
- package/dist/lib/runtime/hydrate-emails.js +0 -1
- package/dist/lib/runtime/live-sync-entry.js +0 -1
- package/dist/lib/runtime/live-sync.js +0 -1
- package/dist/lib/runtime/loader-setup.js +0 -1
- package/dist/lib/runtime/login-menu-accounts.js +0 -1
- package/dist/lib/runtime/manual-oauth-flow.js +0 -1
- package/dist/lib/runtime/oauth-browser-flow.js +0 -1
- package/dist/lib/runtime/preemptive-quota.js +0 -1
- package/dist/lib/runtime/quota-headers.d.ts +1 -6
- package/dist/lib/runtime/quota-headers.d.ts.map +1 -1
- package/dist/lib/runtime/quota-headers.js +5 -6
- package/dist/lib/runtime/quota-probe.js +0 -1
- package/dist/lib/runtime/quota-settings.js +0 -1
- package/dist/lib/runtime/refresh-guardian-entry.js +0 -1
- package/dist/lib/runtime/refresh-guardian.js +0 -1
- package/dist/lib/runtime/request-init.js +0 -1
- package/dist/lib/runtime/rotation-account-selection.d.ts +38 -0
- package/dist/lib/runtime/rotation-account-selection.d.ts.map +1 -0
- package/dist/lib/runtime/rotation-account-selection.js +172 -0
- package/dist/lib/runtime/rotation-proxy-state.d.ts +54 -0
- package/dist/lib/runtime/rotation-proxy-state.d.ts.map +1 -0
- package/dist/lib/runtime/rotation-proxy-state.js +56 -0
- package/dist/lib/runtime/rotation-server-types.d.ts +57 -0
- package/dist/lib/runtime/rotation-server-types.d.ts.map +1 -0
- package/dist/lib/runtime/rotation-server-types.js +1 -0
- package/dist/lib/runtime/rotation-storage-meta.d.ts +40 -0
- package/dist/lib/runtime/rotation-storage-meta.d.ts.map +1 -0
- package/dist/lib/runtime/rotation-storage-meta.js +143 -0
- package/dist/lib/runtime/rotation-token-refresh.d.ts +25 -0
- package/dist/lib/runtime/rotation-token-refresh.d.ts.map +1 -0
- package/dist/lib/runtime/rotation-token-refresh.js +99 -0
- package/dist/lib/runtime/runtime-current-account.d.ts +3 -3
- package/dist/lib/runtime/runtime-current-account.d.ts.map +1 -1
- package/dist/lib/runtime/runtime-current-account.js +2 -5
- package/dist/lib/runtime/runtime-observability.d.ts +2 -2
- package/dist/lib/runtime/runtime-observability.d.ts.map +1 -1
- package/dist/lib/runtime/runtime-observability.js +0 -5
- package/dist/lib/runtime/runtime-services.js +0 -1
- package/dist/lib/runtime/session-affinity-entry.js +0 -1
- package/dist/lib/runtime/session-affinity.js +0 -1
- package/dist/lib/runtime/session-recovery.js +0 -1
- package/dist/lib/runtime/status-marker.js +0 -1
- package/dist/lib/runtime/storage-scope.js +0 -1
- package/dist/lib/runtime/toast.js +0 -1
- package/dist/lib/runtime/ui-runtime-entry.js +0 -1
- package/dist/lib/runtime/ui-runtime.js +0 -1
- package/dist/lib/runtime/verify-flagged.js +0 -1
- package/dist/lib/runtime-constants.js +0 -1
- package/dist/lib/runtime-paths.js +0 -1
- package/dist/lib/runtime-rotation-proxy.d.ts +7 -124
- package/dist/lib/runtime-rotation-proxy.d.ts.map +1 -1
- package/dist/lib/runtime-rotation-proxy.js +618 -1356
- package/dist/lib/schemas.d.ts +5 -93
- package/dist/lib/schemas.d.ts.map +1 -1
- package/dist/lib/schemas.js +9 -10
- package/dist/lib/session-affinity.js +0 -1
- package/dist/lib/shutdown.js +0 -1
- package/dist/lib/storage/account-clear-entry.js +0 -1
- package/dist/lib/storage/account-clear.js +0 -1
- package/dist/lib/storage/account-match-utils.js +0 -1
- package/dist/lib/storage/account-persistence.d.ts +1 -1
- package/dist/lib/storage/account-persistence.d.ts.map +1 -1
- package/dist/lib/storage/account-persistence.js +0 -1
- package/dist/lib/storage/account-port.d.ts +1 -1
- package/dist/lib/storage/account-port.d.ts.map +1 -1
- package/dist/lib/storage/account-port.js +0 -1
- package/dist/lib/storage/account-save-entry.d.ts +1 -1
- package/dist/lib/storage/account-save-entry.d.ts.map +1 -1
- package/dist/lib/storage/account-save-entry.js +0 -1
- package/dist/lib/storage/account-save.d.ts +1 -1
- package/dist/lib/storage/account-save.d.ts.map +1 -1
- package/dist/lib/storage/account-save.js +0 -1
- package/dist/lib/storage/account-snapshot.js +0 -1
- package/dist/lib/storage/backup-metadata-builder.d.ts +1 -1
- package/dist/lib/storage/backup-metadata-builder.d.ts.map +1 -1
- package/dist/lib/storage/backup-metadata-builder.js +0 -1
- package/dist/lib/storage/backup-metadata.d.ts +13 -0
- package/dist/lib/storage/backup-metadata.d.ts.map +1 -1
- package/dist/lib/storage/backup-metadata.js +0 -1
- package/dist/lib/storage/backup-paths.js +0 -1
- package/dist/lib/storage/backup-restore.d.ts +1 -1
- package/dist/lib/storage/backup-restore.d.ts.map +1 -1
- package/dist/lib/storage/backup-restore.js +0 -1
- package/dist/lib/storage/cache-artifacts.js +0 -1
- package/dist/lib/storage/error-hints.js +0 -1
- package/dist/lib/storage/file-paths.d.ts +2 -2
- package/dist/lib/storage/file-paths.d.ts.map +1 -1
- package/dist/lib/storage/file-paths.js +2 -3
- package/dist/lib/storage/fixture-guards.d.ts +1 -1
- package/dist/lib/storage/fixture-guards.d.ts.map +1 -1
- package/dist/lib/storage/fixture-guards.js +0 -1
- package/dist/lib/storage/flagged-entry.js +0 -1
- package/dist/lib/storage/flagged-load-entry.d.ts +1 -1
- package/dist/lib/storage/flagged-load-entry.d.ts.map +1 -1
- package/dist/lib/storage/flagged-load-entry.js +0 -1
- package/dist/lib/storage/flagged-save-entry.d.ts +1 -1
- package/dist/lib/storage/flagged-save-entry.d.ts.map +1 -1
- package/dist/lib/storage/flagged-save-entry.js +0 -1
- package/dist/lib/storage/flagged-storage-file.d.ts +1 -1
- package/dist/lib/storage/flagged-storage-file.d.ts.map +1 -1
- package/dist/lib/storage/flagged-storage-file.js +0 -1
- package/dist/lib/storage/flagged-storage-io.d.ts +1 -1
- package/dist/lib/storage/flagged-storage-io.d.ts.map +1 -1
- package/dist/lib/storage/flagged-storage-io.js +2 -3
- package/dist/lib/storage/flagged-storage.d.ts +1 -1
- package/dist/lib/storage/flagged-storage.d.ts.map +1 -1
- package/dist/lib/storage/flagged-storage.js +15 -2
- package/dist/lib/storage/flagged-storage.js.map +1 -1
- package/dist/lib/storage/gitignore.js +0 -1
- package/dist/lib/storage/hash.js +0 -1
- package/dist/lib/storage/health.js +0 -1
- package/dist/lib/storage/identity.js +0 -1
- package/dist/lib/storage/import-export.d.ts +1 -1
- package/dist/lib/storage/import-export.d.ts.map +1 -1
- package/dist/lib/storage/import-export.js +2 -3
- package/dist/lib/storage/metadata-section.js +0 -1
- package/dist/lib/storage/migrations.d.ts +7 -49
- package/dist/lib/storage/migrations.d.ts.map +1 -1
- package/dist/lib/storage/migrations.js +5 -2
- package/dist/lib/storage/named-backup-entry.js +0 -1
- package/dist/lib/storage/named-backups-entry.d.ts +1 -1
- package/dist/lib/storage/named-backups-entry.d.ts.map +1 -1
- package/dist/lib/storage/named-backups-entry.js +0 -1
- package/dist/lib/storage/named-backups.js +0 -1
- package/dist/lib/storage/path-state.js +0 -1
- package/dist/lib/storage/paths.js +0 -1
- package/dist/lib/storage/project-migration.d.ts +1 -1
- package/dist/lib/storage/project-migration.d.ts.map +1 -1
- package/dist/lib/storage/project-migration.js +0 -1
- package/dist/lib/storage/public-types.d.ts +70 -0
- package/dist/lib/storage/public-types.d.ts.map +1 -0
- package/dist/lib/storage/public-types.js +6 -0
- package/dist/lib/storage/record-utils.js +0 -1
- package/dist/lib/storage/restore-assessment.d.ts +1 -1
- package/dist/lib/storage/restore-assessment.d.ts.map +1 -1
- package/dist/lib/storage/restore-assessment.js +0 -1
- package/dist/lib/storage/restore-backup-entry.d.ts +1 -1
- package/dist/lib/storage/restore-backup-entry.d.ts.map +1 -1
- package/dist/lib/storage/restore-backup-entry.js +0 -1
- package/dist/lib/storage/restore-metadata.d.ts +1 -1
- package/dist/lib/storage/restore-metadata.d.ts.map +1 -1
- package/dist/lib/storage/restore-metadata.js +0 -1
- package/dist/lib/storage/restore.d.ts +1 -1
- package/dist/lib/storage/restore.d.ts.map +1 -1
- package/dist/lib/storage/restore.js +0 -1
- package/dist/lib/storage/save-retry.d.ts +10 -0
- package/dist/lib/storage/save-retry.d.ts.map +1 -0
- package/dist/lib/storage/save-retry.js +26 -0
- package/dist/lib/storage/snapshot-inspectors.d.ts +1 -1
- package/dist/lib/storage/snapshot-inspectors.d.ts.map +1 -1
- package/dist/lib/storage/snapshot-inspectors.js +0 -1
- package/dist/lib/storage/storage-parser.d.ts +1 -1
- package/dist/lib/storage/storage-parser.d.ts.map +1 -1
- package/dist/lib/storage/storage-parser.js +0 -1
- package/dist/lib/storage/transactions.d.ts +1 -1
- package/dist/lib/storage/transactions.d.ts.map +1 -1
- package/dist/lib/storage/transactions.js +0 -1
- package/dist/lib/storage.d.ts +3 -24
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +47 -55
- package/dist/lib/table-formatter.js +0 -1
- package/dist/lib/temp-path.d.ts +26 -0
- package/dist/lib/temp-path.d.ts.map +1 -0
- package/dist/lib/temp-path.js +30 -0
- package/dist/lib/tools/hashline-tools.js +0 -1
- package/dist/lib/types.js +0 -1
- package/dist/lib/ui/ansi.js +0 -1
- package/dist/lib/ui/auth-menu-builder.d.ts +89 -0
- package/dist/lib/ui/auth-menu-builder.d.ts.map +1 -0
- package/dist/lib/ui/auth-menu-builder.js +350 -0
- package/dist/lib/ui/auth-menu.d.ts +2 -76
- package/dist/lib/ui/auth-menu.d.ts.map +1 -1
- package/dist/lib/ui/auth-menu.js +3 -349
- package/dist/lib/ui/confirm.js +0 -1
- package/dist/lib/ui/display-width.js +0 -1
- package/dist/lib/ui/format.js +0 -1
- package/dist/lib/ui/index.d.ts +10 -0
- package/dist/lib/ui/index.d.ts.map +1 -0
- package/dist/lib/ui/index.js +9 -0
- package/dist/lib/ui/runtime.js +0 -1
- package/dist/lib/ui/select.js +0 -1
- package/dist/lib/ui/theme.d.ts +3 -2
- package/dist/lib/ui/theme.d.ts.map +1 -1
- package/dist/lib/ui/theme.js +0 -1
- package/dist/lib/ui/ui-copy.d.ts +159 -0
- package/dist/lib/ui/ui-copy.d.ts.map +1 -0
- package/dist/lib/ui/ui-copy.js +163 -0
- package/dist/lib/unified-settings.d.ts.map +1 -1
- package/dist/lib/unified-settings.js +2 -2
- package/dist/lib/update-notice.d.ts.map +1 -1
- package/dist/lib/update-notice.js +2 -2
- package/dist/lib/usage/index.js +0 -1
- package/dist/lib/usage/ledger.js +0 -1
- package/dist/lib/usage/pricing.js +0 -1
- package/dist/lib/usage/redaction.js +0 -1
- package/dist/lib/usage/types.js +0 -1
- package/dist/lib/utils.js +0 -1
- package/package.json +8 -9
- package/scripts/postinstall.js +34 -265
- package/scripts/preuninstall.js +2 -2
package/dist/lib/ui/auth-menu.js
CHANGED
|
@@ -4,332 +4,9 @@ import { ANSI, isTTY } from "./ansi.js";
|
|
|
4
4
|
import { confirm } from "./confirm.js";
|
|
5
5
|
import { getUiRuntimeOptions } from "./runtime.js";
|
|
6
6
|
import { select } from "./select.js";
|
|
7
|
-
import { paintUiText, formatUiBadge
|
|
8
|
-
import { UI_COPY, formatCheckFlaggedLabel } from "./copy.js";
|
|
9
|
-
|
|
10
|
-
const raw = (process.env.CODEX_MULTI_AUTH_CLI_VERSION ?? "").trim();
|
|
11
|
-
if (raw.length === 0)
|
|
12
|
-
return null;
|
|
13
|
-
return raw.startsWith("v") ? raw : `v${raw}`;
|
|
14
|
-
}
|
|
15
|
-
function mainMenuTitleWithVersion() {
|
|
16
|
-
const versionLabel = resolveCliVersionLabel();
|
|
17
|
-
if (!versionLabel)
|
|
18
|
-
return UI_COPY.mainMenu.title;
|
|
19
|
-
return `${UI_COPY.mainMenu.title} (${versionLabel})`;
|
|
20
|
-
}
|
|
21
|
-
function sanitizeTerminalText(value) {
|
|
22
|
-
if (!value)
|
|
23
|
-
return undefined;
|
|
24
|
-
return value
|
|
25
|
-
.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "")
|
|
26
|
-
.replace(/[\u0000-\u001f\u007f]/g, "")
|
|
27
|
-
.trim();
|
|
28
|
-
}
|
|
29
|
-
function formatRelativeTime(timestamp) {
|
|
30
|
-
if (!timestamp)
|
|
31
|
-
return "never";
|
|
32
|
-
const days = Math.floor((Date.now() - timestamp) / 86_400_000);
|
|
33
|
-
if (days <= 0)
|
|
34
|
-
return "today";
|
|
35
|
-
if (days === 1)
|
|
36
|
-
return "yesterday";
|
|
37
|
-
if (days < 7)
|
|
38
|
-
return `${days}d ago`;
|
|
39
|
-
if (days < 30)
|
|
40
|
-
return `${Math.floor(days / 7)}w ago`;
|
|
41
|
-
return new Date(timestamp).toLocaleDateString();
|
|
42
|
-
}
|
|
43
|
-
function formatDate(timestamp) {
|
|
44
|
-
if (!timestamp)
|
|
45
|
-
return "unknown";
|
|
46
|
-
return new Date(timestamp).toLocaleDateString();
|
|
47
|
-
}
|
|
48
|
-
function statusBadge(status) {
|
|
49
|
-
const ui = getUiRuntimeOptions();
|
|
50
|
-
const withTone = (label, tone) => {
|
|
51
|
-
if (ui.v2Enabled)
|
|
52
|
-
return formatUiBadge(ui, label, tone);
|
|
53
|
-
if (tone === "accent")
|
|
54
|
-
return `${ANSI.bgGreen}${ANSI.black}[${label}]${ANSI.reset}`;
|
|
55
|
-
if (tone === "success")
|
|
56
|
-
return `${ANSI.bgGreen}${ANSI.black}[${label}]${ANSI.reset}`;
|
|
57
|
-
if (tone === "warning")
|
|
58
|
-
return `${ANSI.bgYellow}${ANSI.black}[${label}]${ANSI.reset}`;
|
|
59
|
-
if (tone === "danger")
|
|
60
|
-
return `${ANSI.bgRed}${ANSI.white}[${label}]${ANSI.reset}`;
|
|
61
|
-
return `${ANSI.inverse}[${label}]${ANSI.reset}`;
|
|
62
|
-
};
|
|
63
|
-
if (ui.v2Enabled) {
|
|
64
|
-
switch (status) {
|
|
65
|
-
case "active":
|
|
66
|
-
return withTone("active", "success");
|
|
67
|
-
case "ok":
|
|
68
|
-
return withTone("ok", "success");
|
|
69
|
-
case "quota-exhausted":
|
|
70
|
-
return withTone("quota-exhausted", "warning");
|
|
71
|
-
case "rate-limited":
|
|
72
|
-
return withTone("rate-limited", "warning");
|
|
73
|
-
case "cooldown":
|
|
74
|
-
return withTone("cooldown", "warning");
|
|
75
|
-
case "flagged":
|
|
76
|
-
return withTone("flagged", "danger");
|
|
77
|
-
case "disabled":
|
|
78
|
-
return withTone("disabled", "danger");
|
|
79
|
-
case "error":
|
|
80
|
-
return withTone("error", "danger");
|
|
81
|
-
default:
|
|
82
|
-
return withTone("unknown", "muted");
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
switch (status) {
|
|
86
|
-
case "active":
|
|
87
|
-
return withTone("active", "success");
|
|
88
|
-
case "ok":
|
|
89
|
-
return withTone("ok", "success");
|
|
90
|
-
case "quota-exhausted":
|
|
91
|
-
return withTone("quota-exhausted", "warning");
|
|
92
|
-
case "rate-limited":
|
|
93
|
-
return withTone("rate-limited", "warning");
|
|
94
|
-
case "cooldown":
|
|
95
|
-
return withTone("cooldown", "warning");
|
|
96
|
-
case "flagged":
|
|
97
|
-
return withTone("flagged", "danger");
|
|
98
|
-
case "disabled":
|
|
99
|
-
return withTone("disabled", "danger");
|
|
100
|
-
case "error":
|
|
101
|
-
return withTone("error", "danger");
|
|
102
|
-
default:
|
|
103
|
-
return withTone("unknown", "muted");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function accountTitle(account) {
|
|
107
|
-
const accountNumber = account.quickSwitchNumber ?? (account.index + 1);
|
|
108
|
-
const base = sanitizeTerminalText(account.email) ||
|
|
109
|
-
sanitizeTerminalText(account.accountLabel) ||
|
|
110
|
-
sanitizeTerminalText(account.accountId) ||
|
|
111
|
-
`Account ${accountNumber}`;
|
|
112
|
-
return `${accountNumber}. ${base}`;
|
|
113
|
-
}
|
|
114
|
-
function accountSearchText(account) {
|
|
115
|
-
return [
|
|
116
|
-
sanitizeTerminalText(account.email),
|
|
117
|
-
sanitizeTerminalText(account.accountLabel),
|
|
118
|
-
sanitizeTerminalText(account.accountId),
|
|
119
|
-
String(account.quickSwitchNumber ?? (account.index + 1)),
|
|
120
|
-
]
|
|
121
|
-
.filter((value) => typeof value === "string" && value.trim().length > 0)
|
|
122
|
-
.join(" ")
|
|
123
|
-
.toLowerCase();
|
|
124
|
-
}
|
|
125
|
-
function accountRowColor(account) {
|
|
126
|
-
if (account.isCurrentAccount && account.highlightCurrentRow !== false)
|
|
127
|
-
return "green";
|
|
128
|
-
switch (account.status) {
|
|
129
|
-
case "active":
|
|
130
|
-
case "ok":
|
|
131
|
-
return "green";
|
|
132
|
-
case "quota-exhausted":
|
|
133
|
-
case "rate-limited":
|
|
134
|
-
case "cooldown":
|
|
135
|
-
return "yellow";
|
|
136
|
-
case "disabled":
|
|
137
|
-
case "error":
|
|
138
|
-
case "flagged":
|
|
139
|
-
return "red";
|
|
140
|
-
default:
|
|
141
|
-
return "yellow";
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function statusTone(status) {
|
|
145
|
-
switch (status) {
|
|
146
|
-
case "active":
|
|
147
|
-
case "ok":
|
|
148
|
-
return "success";
|
|
149
|
-
case "quota-exhausted":
|
|
150
|
-
case "rate-limited":
|
|
151
|
-
case "cooldown":
|
|
152
|
-
return "warning";
|
|
153
|
-
case "disabled":
|
|
154
|
-
case "error":
|
|
155
|
-
case "flagged":
|
|
156
|
-
return "danger";
|
|
157
|
-
default:
|
|
158
|
-
return "muted";
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function statusText(status) {
|
|
162
|
-
return status ?? "unknown";
|
|
163
|
-
}
|
|
164
|
-
function currentMarkerLabel(marker) {
|
|
165
|
-
if (marker === "in-use")
|
|
166
|
-
return "in use";
|
|
167
|
-
return marker;
|
|
168
|
-
}
|
|
169
|
-
function normalizeQuotaPercent(value) {
|
|
170
|
-
if (typeof value !== "number" || !Number.isFinite(value))
|
|
171
|
-
return null;
|
|
172
|
-
return Math.max(0, Math.min(100, Math.round(value)));
|
|
173
|
-
}
|
|
174
|
-
function parseLeftPercentFromSummary(summary, windowLabel) {
|
|
175
|
-
const segments = summary.split("|");
|
|
176
|
-
for (const segment of segments) {
|
|
177
|
-
const trimmed = segment.trim().toLowerCase();
|
|
178
|
-
if (!trimmed.startsWith(`${windowLabel} `))
|
|
179
|
-
continue;
|
|
180
|
-
const percentToken = trimmed.slice(windowLabel.length).trim().split(/\s+/)[0] ?? "";
|
|
181
|
-
const parsed = Number.parseInt(percentToken.replace("%", ""), 10);
|
|
182
|
-
if (!Number.isFinite(parsed))
|
|
183
|
-
continue;
|
|
184
|
-
return Math.max(0, Math.min(100, parsed));
|
|
185
|
-
}
|
|
186
|
-
return null;
|
|
187
|
-
}
|
|
188
|
-
function formatDurationCompact(milliseconds) {
|
|
189
|
-
const totalSeconds = Math.max(0, Math.ceil(milliseconds / 1_000));
|
|
190
|
-
if (totalSeconds < 60)
|
|
191
|
-
return `${totalSeconds}s`;
|
|
192
|
-
const totalMinutes = Math.floor(totalSeconds / 60);
|
|
193
|
-
if (totalMinutes < 60) {
|
|
194
|
-
const seconds = totalSeconds % 60;
|
|
195
|
-
return seconds > 0 ? `${totalMinutes}m ${seconds}s` : `${totalMinutes}m`;
|
|
196
|
-
}
|
|
197
|
-
const totalHours = Math.floor(totalMinutes / 60);
|
|
198
|
-
if (totalHours < 24) {
|
|
199
|
-
const minutes = totalMinutes % 60;
|
|
200
|
-
return minutes > 0 ? `${totalHours}h ${minutes}m` : `${totalHours}h`;
|
|
201
|
-
}
|
|
202
|
-
const days = Math.floor(totalHours / 24);
|
|
203
|
-
const hours = totalHours % 24;
|
|
204
|
-
return hours > 0 ? `${days}d ${hours}h` : `${days}d`;
|
|
205
|
-
}
|
|
206
|
-
function formatLimitCooldown(resetAtMs) {
|
|
207
|
-
if (typeof resetAtMs !== "number" || !Number.isFinite(resetAtMs))
|
|
208
|
-
return null;
|
|
209
|
-
const remaining = resetAtMs - Date.now();
|
|
210
|
-
if (remaining <= 0)
|
|
211
|
-
return "reset ready";
|
|
212
|
-
return `reset ${formatDurationCompact(remaining)}`;
|
|
213
|
-
}
|
|
214
|
-
function formatQuotaBar(leftPercent, ui) {
|
|
215
|
-
const width = 10;
|
|
216
|
-
const ratio = leftPercent === null ? 0 : leftPercent / 100;
|
|
217
|
-
const filled = Math.max(0, Math.min(width, Math.round(ratio * width)));
|
|
218
|
-
// ui-03: honor glyph mode. The Unicode block glyphs (█/▒) render as mojibake on
|
|
219
|
-
// ascii terminals, so fall back to ASCII fill/empty chars unless glyphMode is
|
|
220
|
-
// explicitly "unicode". ("auto" stays ascii here to avoid environment guesses.)
|
|
221
|
-
const useUnicodeBar = ui.theme.glyphMode === "unicode";
|
|
222
|
-
const fillChar = useUnicodeBar ? "█" : "#";
|
|
223
|
-
const emptyChar = useUnicodeBar ? "▒" : "-";
|
|
224
|
-
const filledText = fillChar.repeat(filled);
|
|
225
|
-
const emptyText = emptyChar.repeat(width - filled);
|
|
226
|
-
if (ui.v2Enabled) {
|
|
227
|
-
const tone = leftPercent === null ? "muted" : quotaToneFromLeftPercent(leftPercent);
|
|
228
|
-
const filledSegment = filledText.length > 0 ? paintUiText(ui, filledText, tone) : "";
|
|
229
|
-
const emptySegment = emptyText.length > 0 ? paintUiText(ui, emptyText, "muted") : "";
|
|
230
|
-
return `${filledSegment}${emptySegment}`;
|
|
231
|
-
}
|
|
232
|
-
if (leftPercent === null)
|
|
233
|
-
return `${ANSI.dim}${emptyText}${ANSI.reset}`;
|
|
234
|
-
const color = leftPercent <= 15 ? ANSI.red : leftPercent <= 35 ? ANSI.yellow : ANSI.green;
|
|
235
|
-
const filledSegment = filledText.length > 0 ? `${color}${filledText}${ANSI.reset}` : "";
|
|
236
|
-
const emptySegment = emptyText.length > 0 ? `${ANSI.dim}${emptyText}${ANSI.reset}` : "";
|
|
237
|
-
return `${filledSegment}${emptySegment}`;
|
|
238
|
-
}
|
|
239
|
-
function formatQuotaPercent(leftPercent, ui) {
|
|
240
|
-
if (leftPercent === null)
|
|
241
|
-
return null;
|
|
242
|
-
const percentText = `${leftPercent}%`;
|
|
243
|
-
if (!ui.v2Enabled) {
|
|
244
|
-
const color = leftPercent <= 15 ? ANSI.red : leftPercent <= 35 ? ANSI.yellow : ANSI.green;
|
|
245
|
-
return `${color}${percentText}${ANSI.reset}`;
|
|
246
|
-
}
|
|
247
|
-
const tone = quotaToneFromLeftPercent(leftPercent);
|
|
248
|
-
return paintUiText(ui, percentText, tone);
|
|
249
|
-
}
|
|
250
|
-
function formatQuotaWindow(label, leftPercent, resetAtMs, showCooldown, ui) {
|
|
251
|
-
const labelText = ui.v2Enabled ? paintUiText(ui, label, "muted") : label;
|
|
252
|
-
const bar = formatQuotaBar(leftPercent, ui);
|
|
253
|
-
const percent = formatQuotaPercent(leftPercent, ui);
|
|
254
|
-
if (!showCooldown) {
|
|
255
|
-
return percent ? `${labelText} ${bar} ${percent}` : `${labelText} ${bar}`;
|
|
256
|
-
}
|
|
257
|
-
const cooldown = formatLimitCooldown(resetAtMs);
|
|
258
|
-
if (!cooldown) {
|
|
259
|
-
return percent ? `${labelText} ${bar} ${percent}` : `${labelText} ${bar}`;
|
|
260
|
-
}
|
|
261
|
-
const cooldownText = ui.v2Enabled ? paintUiText(ui, cooldown, "muted") : cooldown;
|
|
262
|
-
if (!percent) {
|
|
263
|
-
return `${labelText} ${bar} ${cooldownText}`;
|
|
264
|
-
}
|
|
265
|
-
return `${labelText} ${bar} ${percent} ${cooldownText}`;
|
|
266
|
-
}
|
|
267
|
-
function formatQuotaSummary(account, ui) {
|
|
268
|
-
const summary = account.quotaSummary ?? "";
|
|
269
|
-
const showCooldown = account.showQuotaCooldown !== false;
|
|
270
|
-
const left5h = normalizeQuotaPercent(account.quota5hLeftPercent) ?? parseLeftPercentFromSummary(summary, "5h");
|
|
271
|
-
const left7d = normalizeQuotaPercent(account.quota7dLeftPercent) ?? parseLeftPercentFromSummary(summary, "7d");
|
|
272
|
-
const segments = [];
|
|
273
|
-
if (left5h !== null || typeof account.quota5hResetAtMs === "number") {
|
|
274
|
-
segments.push(formatQuotaWindow("5h", left5h, account.quota5hResetAtMs, showCooldown, ui));
|
|
275
|
-
}
|
|
276
|
-
if (left7d !== null || typeof account.quota7dResetAtMs === "number") {
|
|
277
|
-
segments.push(formatQuotaWindow("7d", left7d, account.quota7dResetAtMs, showCooldown, ui));
|
|
278
|
-
}
|
|
279
|
-
if (account.quotaRateLimited || summary.toLowerCase().includes("rate-limited")) {
|
|
280
|
-
segments.push(ui.v2Enabled ? paintUiText(ui, "rate-limited", "danger") : `${ANSI.red}rate-limited${ANSI.reset}`);
|
|
281
|
-
}
|
|
282
|
-
if (account.quotaExhausted || summary.toLowerCase().includes("quota-exhausted")) {
|
|
283
|
-
segments.push(ui.v2Enabled ? paintUiText(ui, "quota-exhausted", "danger") : `${ANSI.red}quota-exhausted${ANSI.reset}`);
|
|
284
|
-
}
|
|
285
|
-
if (segments.length === 0) {
|
|
286
|
-
if (!summary)
|
|
287
|
-
return "";
|
|
288
|
-
return ui.v2Enabled ? paintUiText(ui, summary, "muted") : summary;
|
|
289
|
-
}
|
|
290
|
-
const separator = ui.v2Enabled ? ` ${paintUiText(ui, "|", "muted")} ` : " | ";
|
|
291
|
-
return segments.join(separator);
|
|
292
|
-
}
|
|
293
|
-
function formatAccountHint(account, ui) {
|
|
294
|
-
const withKey = (key, value, tone) => {
|
|
295
|
-
if (!ui.v2Enabled)
|
|
296
|
-
return `${key} ${value}`;
|
|
297
|
-
if (value.includes("\x1b[")) {
|
|
298
|
-
return `${paintUiText(ui, key, "muted")} ${value}`;
|
|
299
|
-
}
|
|
300
|
-
return `${paintUiText(ui, key, "muted")} ${paintUiText(ui, value, tone)}`;
|
|
301
|
-
};
|
|
302
|
-
const partsByKey = new Map();
|
|
303
|
-
if (account.showStatusBadge === false) {
|
|
304
|
-
partsByKey.set("status", withKey("Status:", statusText(account.status), statusTone(account.status)));
|
|
305
|
-
}
|
|
306
|
-
if (account.showLastUsed !== false) {
|
|
307
|
-
partsByKey.set("last-used", withKey("Last used:", formatRelativeTime(account.lastUsed), "heading"));
|
|
308
|
-
}
|
|
309
|
-
const quotaSummaryText = formatQuotaSummary(account, ui);
|
|
310
|
-
if (quotaSummaryText) {
|
|
311
|
-
partsByKey.set("limits", withKey("Limits:", quotaSummaryText, "accent"));
|
|
312
|
-
}
|
|
313
|
-
const fields = account.statuslineFields && account.statuslineFields.length > 0
|
|
314
|
-
? account.statuslineFields
|
|
315
|
-
: ["last-used", "limits", "status"];
|
|
316
|
-
const orderedParts = [];
|
|
317
|
-
for (const field of fields) {
|
|
318
|
-
const part = partsByKey.get(field);
|
|
319
|
-
if (part)
|
|
320
|
-
orderedParts.push(part);
|
|
321
|
-
}
|
|
322
|
-
if (orderedParts.length === 0) {
|
|
323
|
-
return "";
|
|
324
|
-
}
|
|
325
|
-
const separator = ui.v2Enabled ? ` ${paintUiText(ui, "|", "muted")} ` : " | ";
|
|
326
|
-
if (orderedParts.length === 1) {
|
|
327
|
-
return orderedParts[0] ?? "";
|
|
328
|
-
}
|
|
329
|
-
const firstLine = orderedParts.slice(0, 2).join(separator);
|
|
330
|
-
const secondLine = orderedParts.slice(2).join(separator);
|
|
331
|
-
return secondLine ? `${firstLine}${separator}${secondLine}` : firstLine;
|
|
332
|
-
}
|
|
7
|
+
import { paintUiText, formatUiBadge } from "./format.js";
|
|
8
|
+
import { UI_COPY, formatCheckFlaggedLabel } from "./ui-copy.js";
|
|
9
|
+
import { accountRowColor, accountSearchText, accountTitle, authMenuFocusKey, currentMarkerLabel, formatAccountHint, formatDate, formatRelativeTime, mainMenuTitleWithVersion, statusBadge, } from "./auth-menu-builder.js";
|
|
333
10
|
async function promptSearchQuery(current) {
|
|
334
11
|
if (!input.isTTY || !output.isTTY) {
|
|
335
12
|
return current;
|
|
@@ -344,28 +21,6 @@ async function promptSearchQuery(current) {
|
|
|
344
21
|
rl.close();
|
|
345
22
|
}
|
|
346
23
|
}
|
|
347
|
-
function authMenuFocusKey(action) {
|
|
348
|
-
switch (action.type) {
|
|
349
|
-
case "select-account":
|
|
350
|
-
case "set-current-account":
|
|
351
|
-
case "refresh-account":
|
|
352
|
-
case "toggle-account":
|
|
353
|
-
case "delete-account":
|
|
354
|
-
return `account:${action.account.sourceIndex ?? action.account.index}`;
|
|
355
|
-
case "add":
|
|
356
|
-
case "forecast":
|
|
357
|
-
case "fix":
|
|
358
|
-
case "settings":
|
|
359
|
-
case "fresh":
|
|
360
|
-
case "check":
|
|
361
|
-
case "deep-check":
|
|
362
|
-
case "verify-flagged":
|
|
363
|
-
case "search":
|
|
364
|
-
case "delete-all":
|
|
365
|
-
case "cancel":
|
|
366
|
-
return `action:${action.type}`;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
24
|
export async function showAuthMenu(accounts, options = {}) {
|
|
370
25
|
const flaggedCount = options.flaggedCount ?? 0;
|
|
371
26
|
const verifyLabel = formatCheckFlaggedLabel(flaggedCount);
|
|
@@ -625,4 +280,3 @@ export async function showAccountDetails(account) {
|
|
|
625
280
|
}
|
|
626
281
|
}
|
|
627
282
|
export { isTTY };
|
|
628
|
-
//# sourceMappingURL=auth-menu.js.map
|
package/dist/lib/ui/confirm.js
CHANGED
package/dist/lib/ui/format.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ANSI, isTTY, parseKey, type KeyAction } from "./ansi.js";
|
|
2
|
+
export { showAccountDetails, showAuthMenu, type AccountAction, type AccountInfo, type AccountStatus, type AuthMenuAction, type AuthMenuOptions, } from "./auth-menu.js";
|
|
3
|
+
export { confirm } from "./confirm.js";
|
|
4
|
+
export { displayWidth, truncateToWidth } from "./display-width.js";
|
|
5
|
+
export { formatUiBadge, formatUiHeader, formatUiItem, formatUiKeyValue, formatUiSection, paintUiText, quotaToneFromLeftPercent, type UiTextTone, } from "./format.js";
|
|
6
|
+
export { getUiRuntimeOptions, resetUiRuntimeOptions, setUiRuntimeOptions, type UiRuntimeOptions, } from "./runtime.js";
|
|
7
|
+
export { select, type MenuItem, type SelectOptions } from "./select.js";
|
|
8
|
+
export { createUiTheme, shouldDisableColor, type UiAccent, type UiColorProfile, type UiGlyphMode, type UiPalette, type UiTheme, } from "./theme.js";
|
|
9
|
+
export { UI_COPY, formatCheckFlaggedLabel } from "./ui-copy.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,wBAAwB,EACxB,KAAK,UAAU,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,gBAAgB,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EACN,aAAa,EACb,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,OAAO,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ANSI, isTTY, parseKey } from "./ansi.js";
|
|
2
|
+
export { showAccountDetails, showAuthMenu, } from "./auth-menu.js";
|
|
3
|
+
export { confirm } from "./confirm.js";
|
|
4
|
+
export { displayWidth, truncateToWidth } from "./display-width.js";
|
|
5
|
+
export { formatUiBadge, formatUiHeader, formatUiItem, formatUiKeyValue, formatUiSection, paintUiText, quotaToneFromLeftPercent, } from "./format.js";
|
|
6
|
+
export { getUiRuntimeOptions, resetUiRuntimeOptions, setUiRuntimeOptions, } from "./runtime.js";
|
|
7
|
+
export { select } from "./select.js";
|
|
8
|
+
export { createUiTheme, shouldDisableColor, } from "./theme.js";
|
|
9
|
+
export { UI_COPY, formatCheckFlaggedLabel } from "./ui-copy.js";
|
package/dist/lib/ui/runtime.js
CHANGED
package/dist/lib/ui/select.js
CHANGED
package/dist/lib/ui/theme.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ export type UiColorProfile = "ansi16" | "ansi256" | "truecolor";
|
|
|
5
5
|
export type UiGlyphMode = "ascii" | "unicode" | "auto";
|
|
6
6
|
export type UiPalette = "green" | "blue";
|
|
7
7
|
export type UiAccent = "green" | "cyan" | "blue" | "yellow";
|
|
8
|
-
|
|
8
|
+
interface UiGlyphSet {
|
|
9
9
|
selected: string;
|
|
10
10
|
unselected: string;
|
|
11
11
|
bullet: string;
|
|
12
12
|
check: string;
|
|
13
13
|
cross: string;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface UiThemeColors {
|
|
16
16
|
reset: string;
|
|
17
17
|
dim: string;
|
|
18
18
|
muted: string;
|
|
@@ -66,4 +66,5 @@ export declare function createUiTheme(options?: {
|
|
|
66
66
|
accent?: UiAccent;
|
|
67
67
|
disableColor?: boolean;
|
|
68
68
|
}): UiTheme;
|
|
69
|
+
export {};
|
|
69
70
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../lib/ui/theme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5D,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../lib/ui/theme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5D,UAAU,UAAU;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;CACtB;AAiKD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CACjC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,KAAK,GAAE,OAAwC,GAC7C,OAAO,CAMT;AAWD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE;IACvC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,OAAO,CAgBV"}
|
package/dist/lib/ui/theme.js
CHANGED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export declare const UI_COPY: {
|
|
2
|
+
readonly mainMenu: {
|
|
3
|
+
readonly title: "Accounts Dashboard";
|
|
4
|
+
readonly searchSubtitlePrefix: "Search:";
|
|
5
|
+
readonly quickStart: "Quick Actions";
|
|
6
|
+
readonly addAccount: "Add New Account";
|
|
7
|
+
readonly checkAccounts: "Run Health Check";
|
|
8
|
+
readonly bestAccount: "Pick Best Account";
|
|
9
|
+
readonly fixIssues: "Auto-Repair Issues";
|
|
10
|
+
readonly settings: "Settings";
|
|
11
|
+
readonly moreChecks: "Advanced Checks";
|
|
12
|
+
readonly refreshChecks: "Refresh All Accounts";
|
|
13
|
+
readonly checkFlagged: "Check Problem Accounts";
|
|
14
|
+
readonly accounts: "Saved Accounts";
|
|
15
|
+
readonly loadingLimits: "Fetching account limits...";
|
|
16
|
+
readonly noSearchMatches: "No accounts match your search";
|
|
17
|
+
readonly dangerZone: "Danger Zone";
|
|
18
|
+
readonly removeAllAccounts: "Delete All Accounts";
|
|
19
|
+
readonly helpCompact: "↑↓ Move | Enter Select | / Search | 1-9 Switch | Q Back";
|
|
20
|
+
readonly helpDetailed: "Arrow keys move, Enter selects, / searches, 1-9 switches account, Q goes back";
|
|
21
|
+
};
|
|
22
|
+
readonly accountDetails: {
|
|
23
|
+
readonly back: "Back";
|
|
24
|
+
readonly enable: "Enable Account";
|
|
25
|
+
readonly disable: "Disable Account";
|
|
26
|
+
readonly setCurrent: "Set As Current";
|
|
27
|
+
readonly refresh: "Re-Login";
|
|
28
|
+
readonly remove: "Delete Account";
|
|
29
|
+
readonly help: "↑↓ Move | Enter Select | S Use | R Sign In | D Delete | Q Back";
|
|
30
|
+
};
|
|
31
|
+
readonly oauth: {
|
|
32
|
+
readonly chooseModeTitle: "Get Started";
|
|
33
|
+
readonly chooseModeSubtitle: "Choose how you want to continue.";
|
|
34
|
+
readonly signInHeading: "Sign in";
|
|
35
|
+
readonly restoreHeading: "Recover saved accounts";
|
|
36
|
+
readonly openBrowser: "Open Browser (Easy)";
|
|
37
|
+
readonly manualMode: "Manual / Incognito";
|
|
38
|
+
readonly restoreSavedBackup: "Restore Saved Backup";
|
|
39
|
+
readonly loadLastBackup: "Load Last Saved Backup (Recommended)";
|
|
40
|
+
readonly chooseBackupManually: "Choose Backup Manually";
|
|
41
|
+
readonly back: "Back";
|
|
42
|
+
readonly chooseModeHelp: "↑↓ Move | Enter Select | 1 Easy | 2 Manual | Q Back";
|
|
43
|
+
readonly chooseModeHelpWithBackup: "↑↓ Move | Enter Select | 1 Easy | 2 Manual | 3 Backup | Q Back";
|
|
44
|
+
readonly restoreBackupTitle: "Restore Saved Backup";
|
|
45
|
+
readonly restoreBackupSubtitle: "Choose how you want to recover saved accounts.";
|
|
46
|
+
readonly restoreBackupLatestHint: "Fastest way to recover your saved accounts.";
|
|
47
|
+
readonly restoreBackupHelp: "↑↓ Move | Enter Select | 1 Latest | 2 Manual | Q Back";
|
|
48
|
+
readonly manualBackupTitle: "Choose Backup";
|
|
49
|
+
readonly manualBackupSubtitle: "Pick a saved backup to restore.";
|
|
50
|
+
readonly manualBackupHelp: "↑↓ Move | Enter Select | Q Back";
|
|
51
|
+
readonly loadLastBackupHint: (fileName: string, accountCount: number, savedAt: string) => string;
|
|
52
|
+
readonly manualBackupHint: (accountCount: number, savedAt: string) => string;
|
|
53
|
+
readonly restoreBackupConfirm: (fileName: string, accountCount: number) => string;
|
|
54
|
+
readonly restoreBackupLoaded: (fileName: string, accountCount: number) => string;
|
|
55
|
+
readonly restoreBackupSyncWarning: "Backup loaded locally, but Codex auth sync did not complete. Multi-auth routing will still use the restored account pool.";
|
|
56
|
+
readonly goTo: "Go to:";
|
|
57
|
+
readonly copyOk: "Login link copied.";
|
|
58
|
+
readonly copyFail: "Could not copy login link.";
|
|
59
|
+
readonly pastePrompt: "Paste callback URL or code here (Q to cancel):";
|
|
60
|
+
readonly browserOpened: "Browser opened.";
|
|
61
|
+
readonly browserOpenFail: "Could not open browser. Use this link:";
|
|
62
|
+
readonly waitingCallback: `Waiting for login callback on ${string}:${number}...`;
|
|
63
|
+
readonly callbackBypassed: "Manual mode active. Paste the callback URL manually.";
|
|
64
|
+
readonly callbackUnavailable: "Callback listener unavailable. Paste the callback URL manually.";
|
|
65
|
+
readonly callbackMissed: "No callback received. Paste manually.";
|
|
66
|
+
readonly cancelled: "Sign-in cancelled.";
|
|
67
|
+
readonly cancelledBackToMenu: "Sign-in cancelled. Going back to menu.";
|
|
68
|
+
readonly callbackInvalid: "That callback URL is missing the code or state parameter. Paste the full URL you were redirected to (it should contain both code= and state=).";
|
|
69
|
+
readonly callbackStateMismatch: "OAuth state mismatch. That callback URL was generated for a different login attempt. Restart login and paste the callback URL from this attempt.";
|
|
70
|
+
};
|
|
71
|
+
readonly returnFlow: {
|
|
72
|
+
readonly continuePrompt: "Press Enter to go back.";
|
|
73
|
+
readonly actionFailedPrompt: "Action failed. Press Enter to go back.";
|
|
74
|
+
readonly autoReturn: (seconds: number) => string;
|
|
75
|
+
readonly paused: "Paused. Press any key to continue.";
|
|
76
|
+
readonly working: "Running...";
|
|
77
|
+
readonly done: "Done.";
|
|
78
|
+
readonly failed: "Failed.";
|
|
79
|
+
};
|
|
80
|
+
readonly settings: {
|
|
81
|
+
readonly title: "Settings";
|
|
82
|
+
readonly subtitle: "Customize menu, behavior, backend, and experiments";
|
|
83
|
+
readonly help: "↑↓ Move | Enter Select | Q Back";
|
|
84
|
+
readonly sectionTitle: "Basic";
|
|
85
|
+
readonly advancedTitle: "Advanced";
|
|
86
|
+
readonly exitTitle: "Back";
|
|
87
|
+
readonly accountList: "Account List View";
|
|
88
|
+
readonly summaryFields: "Summary Line";
|
|
89
|
+
readonly behavior: "Menu Behavior";
|
|
90
|
+
readonly theme: "Color Theme";
|
|
91
|
+
readonly experimental: "Experimental";
|
|
92
|
+
readonly experimentalTitle: "Experimental";
|
|
93
|
+
readonly experimentalSubtitle: "Preview sync and backup actions before they become stable";
|
|
94
|
+
readonly experimentalHelpMenu: "Enter Select | 1 Sync | 2 Backup | 3 Guard | [ - Down | ] + Up | S Save | Q Back";
|
|
95
|
+
readonly experimentalHelpPreview: "Enter Select | A Apply | Q Back";
|
|
96
|
+
readonly experimentalHelpStatus: "Enter Select | Q Back";
|
|
97
|
+
readonly experimentalSync: "Sync Accounts to oc-chatgpt-multi-auth";
|
|
98
|
+
readonly experimentalApplySync: "Apply Sync";
|
|
99
|
+
readonly experimentalBackup: "Save Pool Backup";
|
|
100
|
+
readonly experimentalBackupPrompt: "Backup file name (.json): ";
|
|
101
|
+
readonly experimentalRefreshGuard: "Enable Refresh Guard";
|
|
102
|
+
readonly experimentalRefreshInterval: "Refresh Guard Interval";
|
|
103
|
+
readonly experimentalDecreaseInterval: "Decrease Refresh Interval";
|
|
104
|
+
readonly experimentalIncreaseInterval: "Increase Refresh Interval";
|
|
105
|
+
readonly backend: "Backend Controls";
|
|
106
|
+
readonly back: "Back";
|
|
107
|
+
readonly previewHeading: "Live Preview";
|
|
108
|
+
readonly displayHeading: "Options";
|
|
109
|
+
readonly resetDefault: "Reset to Default";
|
|
110
|
+
readonly saveAndBack: "Save and Back";
|
|
111
|
+
readonly backNoSave: "Back Without Saving";
|
|
112
|
+
readonly accountListTitle: "Account List View";
|
|
113
|
+
readonly accountListSubtitle: "Choose row details and optional smart sorting";
|
|
114
|
+
readonly accountListHelp: "Enter Toggle | Number Toggle | M Sort | L Layout | S Save | Q Back (No Save)";
|
|
115
|
+
readonly summaryTitle: "Account Details Row";
|
|
116
|
+
readonly summarySubtitle: "Choose and order detail fields";
|
|
117
|
+
readonly summaryHelp: "Enter Toggle | 1-3 Toggle | [ ] Reorder | S Save | Q Back (No Save)";
|
|
118
|
+
readonly behaviorTitle: "Return Behavior";
|
|
119
|
+
readonly behaviorSubtitle: "Control how result screens return";
|
|
120
|
+
readonly behaviorHelp: "Enter Select | 1-3 Delay | P Pause | L AutoFetch | F Status | T TTL | S Save | Q Back (No Save)";
|
|
121
|
+
readonly themeTitle: "Color Theme";
|
|
122
|
+
readonly themeSubtitle: "Pick base color and accent";
|
|
123
|
+
readonly themeHelp: "Enter Select | 1-2 Base | S Save | Q Back (No Save)";
|
|
124
|
+
readonly backendTitle: "Backend Controls";
|
|
125
|
+
readonly backendSubtitle: "Tune sync, retry, and limit behavior";
|
|
126
|
+
readonly backendHelp: "Enter Open | 1-4 Category | S Save | R Reset | Q Back (No Save)";
|
|
127
|
+
readonly backendCategoriesHeading: "Categories";
|
|
128
|
+
readonly backendCategoryTitle: "Backend Category";
|
|
129
|
+
readonly backendCategoryHelp: "Enter Toggle/Adjust | +/- or [ ] Number | 1-9 Toggle | R Reset | Q Back";
|
|
130
|
+
readonly backendToggleHeading: "Switches";
|
|
131
|
+
readonly backendNumberHeading: "Numbers";
|
|
132
|
+
readonly backendDecrease: "Decrease Focused Value";
|
|
133
|
+
readonly backendIncrease: "Increase Focused Value";
|
|
134
|
+
readonly backendResetCategory: "Reset Category";
|
|
135
|
+
readonly backendBackToCategories: "Back to Categories";
|
|
136
|
+
readonly baseTheme: "Base Color";
|
|
137
|
+
readonly accentColor: "Accent Color";
|
|
138
|
+
readonly actionTiming: "Auto Return Delay";
|
|
139
|
+
readonly moveUp: "Move Focused Field Up";
|
|
140
|
+
readonly moveDown: "Move Focused Field Down";
|
|
141
|
+
};
|
|
142
|
+
readonly fallback: {
|
|
143
|
+
readonly addAnotherTip: "Tip: Use private mode or sign out before adding another account.";
|
|
144
|
+
readonly addAnotherQuestion: (count: number) => string;
|
|
145
|
+
readonly selectModePrompt: "(a) add, (c) check, (b) best, fi(x), (s) settings, (d) deep, (g) problem, (f) fresh, (q) back [a/c/b/x/s/d/g/f/q]: ";
|
|
146
|
+
readonly invalidModePrompt: "Use one of: a, c, b, x, s, d, g, f, q.";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Builds the "Check Problem Accounts" label, appending the flagged count when greater than zero.
|
|
151
|
+
*
|
|
152
|
+
* This function is pure and has no side effects, is safe for concurrent use, performs no filesystem
|
|
153
|
+
* access (including Windows-specific behavior), and does not perform any token redaction.
|
|
154
|
+
*
|
|
155
|
+
* @param flaggedCount - The number of flagged accounts to show; if greater than zero the count is appended in parentheses.
|
|
156
|
+
* @returns The resulting label string: the base label when `flaggedCount` is 0 or less, otherwise the base label followed by ` (count)`.
|
|
157
|
+
*/
|
|
158
|
+
export declare function formatCheckFlaggedLabel(flaggedCount: number): string;
|
|
159
|
+
//# sourceMappingURL=ui-copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-copy.d.ts","sourceRoot":"","sources":["../../../lib/ui/ui-copy.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAqDP,MAAM,gBACF,MAAM,WACX,MAAM;kDAGiB,MAAM,WAAW,MAAM;kDAEvB,MAAM,gBAAgB,MAAM;iDAE7B,MAAM,gBAAgB,MAAM;;;;;;;;;;;;;;;;;;;;uCAyBtC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CA+EA,MAAM;;;;CAM1B,CAAC;AAEX;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAIpE"}
|