codex-multi-auth 1.2.0 → 1.2.1
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/README.md +49 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +910 -1704
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/index.d.ts +2 -0
- package/dist/lib/auth/index.d.ts.map +1 -0
- package/dist/lib/auth/index.js +2 -0
- package/dist/lib/auth/index.js.map +1 -0
- package/dist/lib/codex-cli/index.d.ts +5 -0
- package/dist/lib/codex-cli/index.d.ts.map +1 -0
- package/dist/lib/codex-cli/index.js +5 -0
- package/dist/lib/codex-cli/index.js.map +1 -0
- package/dist/lib/codex-manager/auth-commands.d.ts +72 -0
- package/dist/lib/codex-manager/auth-commands.d.ts.map +1 -0
- package/dist/lib/codex-manager/auth-commands.js +643 -0
- package/dist/lib/codex-manager/auth-commands.js.map +1 -0
- package/dist/lib/codex-manager/backend-category-entry.d.ts +103 -0
- package/dist/lib/codex-manager/backend-category-entry.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-category-entry.js +23 -0
- package/dist/lib/codex-manager/backend-category-entry.js.map +1 -0
- package/dist/lib/codex-manager/backend-category-helpers.d.ts +10 -0
- package/dist/lib/codex-manager/backend-category-helpers.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-category-helpers.js +29 -0
- package/dist/lib/codex-manager/backend-category-helpers.js.map +1 -0
- package/dist/lib/codex-manager/backend-category-prompt.d.ts +55 -0
- package/dist/lib/codex-manager/backend-category-prompt.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-category-prompt.js +178 -0
- package/dist/lib/codex-manager/backend-category-prompt.js.map +1 -0
- package/dist/lib/codex-manager/backend-settings-controller.d.ts +11 -0
- package/dist/lib/codex-manager/backend-settings-controller.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-settings-controller.js +14 -0
- package/dist/lib/codex-manager/backend-settings-controller.js.map +1 -0
- package/dist/lib/codex-manager/backend-settings-entry.d.ts +20 -0
- package/dist/lib/codex-manager/backend-settings-entry.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-settings-entry.js +12 -0
- package/dist/lib/codex-manager/backend-settings-entry.js.map +1 -0
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts +16 -0
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-settings-helpers.js +102 -0
- package/dist/lib/codex-manager/backend-settings-helpers.js.map +1 -0
- package/dist/lib/codex-manager/backend-settings-prompt.d.ts +49 -0
- package/dist/lib/codex-manager/backend-settings-prompt.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-settings-prompt.js +121 -0
- package/dist/lib/codex-manager/backend-settings-prompt.js.map +1 -0
- package/dist/lib/codex-manager/backend-settings-schema.d.ts +55 -0
- package/dist/lib/codex-manager/backend-settings-schema.d.ts.map +1 -0
- package/dist/lib/codex-manager/backend-settings-schema.js +264 -0
- package/dist/lib/codex-manager/backend-settings-schema.js.map +1 -0
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts +33 -0
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts.map +1 -0
- package/dist/lib/codex-manager/behavior-settings-panel.js +180 -0
- package/dist/lib/codex-manager/behavior-settings-panel.js.map +1 -0
- package/dist/lib/codex-manager/best.d.ts +26 -0
- package/dist/lib/codex-manager/best.d.ts.map +1 -0
- package/dist/lib/codex-manager/best.js +249 -0
- package/dist/lib/codex-manager/best.js.map +1 -0
- package/dist/lib/codex-manager/commands/best.d.ts +81 -0
- package/dist/lib/codex-manager/commands/best.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/best.js +223 -0
- package/dist/lib/codex-manager/commands/best.js.map +1 -0
- package/dist/lib/codex-manager/commands/check.d.ts +7 -0
- package/dist/lib/codex-manager/commands/check.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/check.js +5 -0
- package/dist/lib/codex-manager/commands/check.js.map +1 -0
- package/dist/lib/codex-manager/commands/config-explain.d.ts +7 -0
- package/dist/lib/codex-manager/commands/config-explain.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/config-explain.js +31 -0
- package/dist/lib/codex-manager/commands/config-explain.js.map +1 -0
- package/dist/lib/codex-manager/commands/debug-bundle.d.ts +28 -0
- package/dist/lib/codex-manager/commands/debug-bundle.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/debug-bundle.js +62 -0
- package/dist/lib/codex-manager/commands/debug-bundle.js.map +1 -0
- package/dist/lib/codex-manager/commands/doctor.d.ts +85 -0
- package/dist/lib/codex-manager/commands/doctor.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/doctor.js +424 -0
- package/dist/lib/codex-manager/commands/doctor.js.map +1 -0
- package/dist/lib/codex-manager/commands/fix.d.ts +92 -0
- package/dist/lib/codex-manager/commands/fix.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/fix.js +347 -0
- package/dist/lib/codex-manager/commands/fix.js.map +1 -0
- package/dist/lib/codex-manager/commands/forecast.d.ts +70 -0
- package/dist/lib/codex-manager/commands/forecast.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/forecast.js +281 -0
- package/dist/lib/codex-manager/commands/forecast.js.map +1 -0
- package/dist/lib/codex-manager/commands/init-config.d.ts +15 -0
- package/dist/lib/codex-manager/commands/init-config.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/init-config.js +95 -0
- package/dist/lib/codex-manager/commands/init-config.js.map +1 -0
- package/dist/lib/codex-manager/commands/report.d.ts +24 -0
- package/dist/lib/codex-manager/commands/report.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/report.js +314 -0
- package/dist/lib/codex-manager/commands/report.js.map +1 -0
- package/dist/lib/codex-manager/commands/status.d.ts +23 -0
- package/dist/lib/codex-manager/commands/status.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/status.js +50 -0
- package/dist/lib/codex-manager/commands/status.js.map +1 -0
- package/dist/lib/codex-manager/commands/switch.d.ts +22 -0
- package/dist/lib/codex-manager/commands/switch.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/switch.js +41 -0
- package/dist/lib/codex-manager/commands/switch.js.map +1 -0
- package/dist/lib/codex-manager/commands/verify-flagged.d.ts +69 -0
- package/dist/lib/codex-manager/commands/verify-flagged.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/verify-flagged.js +251 -0
- package/dist/lib/codex-manager/commands/verify-flagged.js.map +1 -0
- package/dist/lib/codex-manager/config-explain.d.ts +2 -0
- package/dist/lib/codex-manager/config-explain.d.ts.map +1 -0
- package/dist/lib/codex-manager/config-explain.js +62 -0
- package/dist/lib/codex-manager/config-explain.js.map +1 -0
- package/dist/lib/codex-manager/config-template.d.ts +2 -0
- package/dist/lib/codex-manager/config-template.d.ts.map +1 -0
- package/dist/lib/codex-manager/config-template.js +112 -0
- package/dist/lib/codex-manager/config-template.js.map +1 -0
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts +40 -0
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts.map +1 -0
- package/dist/lib/codex-manager/dashboard-display-panel.js +187 -0
- package/dist/lib/codex-manager/dashboard-display-panel.js.map +1 -0
- package/dist/lib/codex-manager/dashboard-formatters.d.ts +6 -0
- package/dist/lib/codex-manager/dashboard-formatters.d.ts.map +1 -0
- package/dist/lib/codex-manager/dashboard-formatters.js +19 -0
- package/dist/lib/codex-manager/dashboard-formatters.js.map +1 -0
- package/dist/lib/codex-manager/dashboard-settings-controller.d.ts +12 -0
- package/dist/lib/codex-manager/dashboard-settings-controller.d.ts.map +1 -0
- package/dist/lib/codex-manager/dashboard-settings-controller.js +17 -0
- package/dist/lib/codex-manager/dashboard-settings-controller.js.map +1 -0
- package/dist/lib/codex-manager/dashboard-settings-data.d.ts +10 -0
- package/dist/lib/codex-manager/dashboard-settings-data.d.ts.map +1 -0
- package/dist/lib/codex-manager/dashboard-settings-data.js +95 -0
- package/dist/lib/codex-manager/dashboard-settings-data.js.map +1 -0
- package/dist/lib/codex-manager/dashboard-settings-entry.d.ts +22 -0
- package/dist/lib/codex-manager/dashboard-settings-entry.d.ts.map +1 -0
- package/dist/lib/codex-manager/dashboard-settings-entry.js +13 -0
- package/dist/lib/codex-manager/dashboard-settings-entry.js.map +1 -0
- package/dist/lib/codex-manager/debug-bundle.d.ts +2 -0
- package/dist/lib/codex-manager/debug-bundle.d.ts.map +1 -0
- package/dist/lib/codex-manager/debug-bundle.js +128 -0
- package/dist/lib/codex-manager/debug-bundle.js.map +1 -0
- package/dist/lib/codex-manager/doctor.d.ts +20 -0
- package/dist/lib/codex-manager/doctor.d.ts.map +1 -0
- package/dist/lib/codex-manager/doctor.js +546 -0
- package/dist/lib/codex-manager/doctor.js.map +1 -0
- package/dist/lib/codex-manager/experimental-settings-entry.d.ts +7 -0
- package/dist/lib/codex-manager/experimental-settings-entry.d.ts.map +1 -0
- package/dist/lib/codex-manager/experimental-settings-entry.js +30 -0
- package/dist/lib/codex-manager/experimental-settings-entry.js.map +1 -0
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts +66 -0
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts.map +1 -0
- package/dist/lib/codex-manager/experimental-settings-prompt.js +221 -0
- package/dist/lib/codex-manager/experimental-settings-prompt.js.map +1 -0
- package/dist/lib/codex-manager/experimental-settings-schema.d.ts +23 -0
- package/dist/lib/codex-manager/experimental-settings-schema.d.ts.map +1 -0
- package/dist/lib/codex-manager/experimental-settings-schema.js +34 -0
- package/dist/lib/codex-manager/experimental-settings-schema.js.map +1 -0
- package/dist/lib/codex-manager/experimental-sync-target-entry.d.ts +30 -0
- package/dist/lib/codex-manager/experimental-sync-target-entry.d.ts.map +1 -0
- package/dist/lib/codex-manager/experimental-sync-target-entry.js +16 -0
- package/dist/lib/codex-manager/experimental-sync-target-entry.js.map +1 -0
- package/dist/lib/codex-manager/experimental-sync-target.d.ts +23 -0
- package/dist/lib/codex-manager/experimental-sync-target.d.ts.map +1 -0
- package/dist/lib/codex-manager/experimental-sync-target.js +39 -0
- package/dist/lib/codex-manager/experimental-sync-target.js.map +1 -0
- package/dist/lib/codex-manager/fix.d.ts +26 -0
- package/dist/lib/codex-manager/fix.d.ts.map +1 -0
- package/dist/lib/codex-manager/fix.js +366 -0
- package/dist/lib/codex-manager/fix.js.map +1 -0
- package/dist/lib/codex-manager/forecast-report-commands.d.ts +54 -0
- package/dist/lib/codex-manager/forecast-report-commands.d.ts.map +1 -0
- package/dist/lib/codex-manager/forecast-report-commands.js +443 -0
- package/dist/lib/codex-manager/forecast-report-commands.js.map +1 -0
- package/dist/lib/codex-manager/forecast.d.ts +26 -0
- package/dist/lib/codex-manager/forecast.d.ts.map +1 -0
- package/dist/lib/codex-manager/forecast.js +218 -0
- package/dist/lib/codex-manager/forecast.js.map +1 -0
- package/dist/lib/codex-manager/help.d.ts +36 -0
- package/dist/lib/codex-manager/help.d.ts.map +1 -0
- package/dist/lib/codex-manager/help.js +125 -0
- package/dist/lib/codex-manager/help.js.map +1 -0
- package/dist/lib/codex-manager/info.d.ts +11 -0
- package/dist/lib/codex-manager/info.d.ts.map +1 -0
- package/dist/lib/codex-manager/info.js +91 -0
- package/dist/lib/codex-manager/info.js.map +1 -0
- package/dist/lib/codex-manager/login.d.ts +40 -0
- package/dist/lib/codex-manager/login.d.ts.map +1 -0
- package/dist/lib/codex-manager/login.js +1041 -0
- package/dist/lib/codex-manager/login.js.map +1 -0
- package/dist/lib/codex-manager/repair-commands.d.ts +70 -0
- package/dist/lib/codex-manager/repair-commands.d.ts.map +1 -0
- package/dist/lib/codex-manager/repair-commands.js +1671 -0
- package/dist/lib/codex-manager/repair-commands.js.map +1 -0
- package/dist/lib/codex-manager/report.d.ts +39 -0
- package/dist/lib/codex-manager/report.d.ts.map +1 -0
- package/dist/lib/codex-manager/report.js +243 -0
- package/dist/lib/codex-manager/report.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub-entry.d.ts +30 -0
- package/dist/lib/codex-manager/settings-hub-entry.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub-entry.js +11 -0
- package/dist/lib/codex-manager/settings-hub-entry.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub-menu.d.ts +30 -0
- package/dist/lib/codex-manager/settings-hub-menu.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub-menu.js +37 -0
- package/dist/lib/codex-manager/settings-hub-menu.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub-prompt.d.ts +25 -0
- package/dist/lib/codex-manager/settings-hub-prompt.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub-prompt.js +23 -0
- package/dist/lib/codex-manager/settings-hub-prompt.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub.d.ts +10 -29
- package/dist/lib/codex-manager/settings-hub.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-hub.js +260 -2168
- package/dist/lib/codex-manager/settings-hub.js.map +1 -1
- package/dist/lib/codex-manager/settings-panels.d.ts +56 -0
- package/dist/lib/codex-manager/settings-panels.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-panels.js +73 -0
- package/dist/lib/codex-manager/settings-panels.js.map +1 -0
- package/dist/lib/codex-manager/settings-persist-utils.d.ts +9 -0
- package/dist/lib/codex-manager/settings-persist-utils.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-persist-utils.js +33 -0
- package/dist/lib/codex-manager/settings-persist-utils.js.map +1 -0
- package/dist/lib/codex-manager/settings-preview.d.ts +12 -0
- package/dist/lib/codex-manager/settings-preview.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-preview.js +118 -0
- package/dist/lib/codex-manager/settings-preview.js.map +1 -0
- package/dist/lib/codex-manager/settings-write-queue.d.ts +14 -0
- package/dist/lib/codex-manager/settings-write-queue.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-write-queue.js +88 -0
- package/dist/lib/codex-manager/settings-write-queue.js.map +1 -0
- package/dist/lib/codex-manager/statusline-order.d.ts +3 -0
- package/dist/lib/codex-manager/statusline-order.d.ts.map +1 -0
- package/dist/lib/codex-manager/statusline-order.js +17 -0
- package/dist/lib/codex-manager/statusline-order.js.map +1 -0
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts +40 -0
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts.map +1 -0
- package/dist/lib/codex-manager/statusline-settings-panel.js +167 -0
- package/dist/lib/codex-manager/statusline-settings-panel.js.map +1 -0
- package/dist/lib/codex-manager/switch.d.ts +31 -0
- package/dist/lib/codex-manager/switch.d.ts.map +1 -0
- package/dist/lib/codex-manager/switch.js +103 -0
- package/dist/lib/codex-manager/switch.js.map +1 -0
- package/dist/lib/codex-manager/theme-settings-panel.d.ts +26 -0
- package/dist/lib/codex-manager/theme-settings-panel.d.ts.map +1 -0
- package/dist/lib/codex-manager/theme-settings-panel.js +131 -0
- package/dist/lib/codex-manager/theme-settings-panel.js.map +1 -0
- package/dist/lib/codex-manager/unified-settings-controller.d.ts +27 -0
- package/dist/lib/codex-manager/unified-settings-controller.d.ts.map +1 -0
- package/dist/lib/codex-manager/unified-settings-controller.js +50 -0
- package/dist/lib/codex-manager/unified-settings-controller.js.map +1 -0
- package/dist/lib/codex-manager/unified-settings-entry.d.ts +6 -0
- package/dist/lib/codex-manager/unified-settings-entry.d.ts.map +1 -0
- package/dist/lib/codex-manager/unified-settings-entry.js +23 -0
- package/dist/lib/codex-manager/unified-settings-entry.js.map +1 -0
- package/dist/lib/codex-manager/verify-flagged.d.ts +20 -0
- package/dist/lib/codex-manager/verify-flagged.d.ts.map +1 -0
- package/dist/lib/codex-manager/verify-flagged.js +316 -0
- package/dist/lib/codex-manager/verify-flagged.js.map +1 -0
- package/dist/lib/codex-manager.d.ts.map +1 -1
- package/dist/lib/codex-manager.js +439 -2199
- package/dist/lib/codex-manager.js.map +1 -1
- package/dist/lib/config.d.ts +38 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +371 -9
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/errors.d.ts +9 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +13 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/forecast.d.ts +17 -0
- package/dist/lib/forecast.d.ts.map +1 -1
- package/dist/lib/forecast.js +33 -6
- package/dist/lib/forecast.js.map +1 -1
- package/dist/lib/named-backup-export.js +2 -2
- package/dist/lib/named-backup-export.js.map +1 -1
- package/dist/lib/prompts/codex.d.ts +8 -3
- package/dist/lib/prompts/codex.d.ts.map +1 -1
- package/dist/lib/prompts/codex.js +16 -26
- package/dist/lib/prompts/codex.js.map +1 -1
- package/dist/lib/request/failover-config.d.ts +4 -0
- package/dist/lib/request/failover-config.d.ts.map +1 -0
- package/dist/lib/request/failover-config.js +15 -0
- package/dist/lib/request/failover-config.js.map +1 -0
- package/dist/lib/request/fetch-helpers.d.ts +10 -4
- package/dist/lib/request/fetch-helpers.d.ts.map +1 -1
- package/dist/lib/request/fetch-helpers.js +13 -8
- package/dist/lib/request/fetch-helpers.js.map +1 -1
- package/dist/lib/request/helpers/model-map.d.ts +49 -12
- package/dist/lib/request/helpers/model-map.d.ts.map +1 -1
- package/dist/lib/request/helpers/model-map.js +303 -108
- package/dist/lib/request/helpers/model-map.js.map +1 -1
- package/dist/lib/request/helpers/tool-utils.d.ts +2 -15
- package/dist/lib/request/helpers/tool-utils.d.ts.map +1 -1
- package/dist/lib/request/helpers/tool-utils.js +40 -27
- package/dist/lib/request/helpers/tool-utils.js.map +1 -1
- package/dist/lib/request/index.d.ts +5 -0
- package/dist/lib/request/index.d.ts.map +1 -0
- package/dist/lib/request/index.js +5 -0
- package/dist/lib/request/index.js.map +1 -0
- package/dist/lib/request/request-init.d.ts +3 -0
- package/dist/lib/request/request-init.d.ts.map +1 -0
- package/dist/lib/request/request-init.js +50 -0
- package/dist/lib/request/request-init.js.map +1 -0
- package/dist/lib/request/request-transformer.d.ts +19 -6
- package/dist/lib/request/request-transformer.d.ts.map +1 -1
- package/dist/lib/request/request-transformer.js +210 -193
- package/dist/lib/request/request-transformer.js.map +1 -1
- package/dist/lib/request/response-compaction.d.ts +20 -0
- package/dist/lib/request/response-compaction.d.ts.map +1 -0
- package/dist/lib/request/response-compaction.js +124 -0
- package/dist/lib/request/response-compaction.js.map +1 -0
- package/dist/lib/request/response-handler.d.ts +2 -0
- package/dist/lib/request/response-handler.d.ts.map +1 -1
- package/dist/lib/request/response-handler.js +567 -11
- package/dist/lib/request/response-handler.js.map +1 -1
- package/dist/lib/request/response-metadata.d.ts +3 -0
- package/dist/lib/request/response-metadata.d.ts.map +1 -0
- package/dist/lib/request/response-metadata.js +61 -0
- package/dist/lib/request/response-metadata.js.map +1 -0
- package/dist/lib/request/trace-mode.d.ts +9 -0
- package/dist/lib/request/trace-mode.d.ts.map +1 -0
- package/dist/lib/request/trace-mode.js +14 -0
- package/dist/lib/request/trace-mode.js.map +1 -0
- package/dist/lib/request/wait-utils.d.ts +14 -0
- package/dist/lib/request/wait-utils.d.ts.map +1 -0
- package/dist/lib/request/wait-utils.js +44 -0
- package/dist/lib/request/wait-utils.js.map +1 -0
- package/dist/lib/runtime/account-check-helpers.d.ts +8 -0
- package/dist/lib/runtime/account-check-helpers.d.ts.map +1 -0
- package/dist/lib/runtime/account-check-helpers.js +30 -0
- package/dist/lib/runtime/account-check-helpers.js.map +1 -0
- package/dist/lib/runtime/account-check-types.d.ts +18 -0
- package/dist/lib/runtime/account-check-types.d.ts.map +1 -0
- package/dist/lib/runtime/account-check-types.js +12 -0
- package/dist/lib/runtime/account-check-types.js.map +1 -0
- package/dist/lib/runtime/account-check.d.ts +48 -0
- package/dist/lib/runtime/account-check.d.ts.map +1 -0
- package/dist/lib/runtime/account-check.js +202 -0
- package/dist/lib/runtime/account-check.js.map +1 -0
- package/dist/lib/runtime/account-health-check.d.ts +8 -0
- package/dist/lib/runtime/account-health-check.d.ts.map +1 -0
- package/dist/lib/runtime/account-health-check.js +30 -0
- package/dist/lib/runtime/account-health-check.js.map +1 -0
- package/dist/lib/runtime/account-manager-cache-entry.d.ts +25 -0
- package/dist/lib/runtime/account-manager-cache-entry.d.ts.map +1 -0
- package/dist/lib/runtime/account-manager-cache-entry.js +17 -0
- package/dist/lib/runtime/account-manager-cache-entry.js.map +1 -0
- package/dist/lib/runtime/account-manager-cache.d.ts +25 -0
- package/dist/lib/runtime/account-manager-cache.d.ts.map +1 -0
- package/dist/lib/runtime/account-manager-cache.js +44 -0
- package/dist/lib/runtime/account-manager-cache.js.map +1 -0
- package/dist/lib/runtime/account-pool.d.ts +23 -0
- package/dist/lib/runtime/account-pool.d.ts.map +1 -0
- package/dist/lib/runtime/account-pool.js +138 -0
- package/dist/lib/runtime/account-pool.js.map +1 -0
- package/dist/lib/runtime/account-scope.d.ts +10 -0
- package/dist/lib/runtime/account-scope.d.ts.map +1 -0
- package/dist/lib/runtime/account-scope.js +13 -0
- package/dist/lib/runtime/account-scope.js.map +1 -0
- package/dist/lib/runtime/account-select-event.d.ts +19 -0
- package/dist/lib/runtime/account-select-event.d.ts.map +1 -0
- package/dist/lib/runtime/account-select-event.js +53 -0
- package/dist/lib/runtime/account-select-event.js.map +1 -0
- package/dist/lib/runtime/account-selection.d.ts +28 -0
- package/dist/lib/runtime/account-selection.d.ts.map +1 -0
- package/dist/lib/runtime/account-selection.js +46 -0
- package/dist/lib/runtime/account-selection.js.map +1 -0
- package/dist/lib/runtime/account-state.d.ts +13 -0
- package/dist/lib/runtime/account-state.d.ts.map +1 -0
- package/dist/lib/runtime/account-state.js +38 -0
- package/dist/lib/runtime/account-state.js.map +1 -0
- package/dist/lib/runtime/account-status.d.ts +13 -0
- package/dist/lib/runtime/account-status.d.ts.map +1 -0
- package/dist/lib/runtime/account-status.js +37 -0
- package/dist/lib/runtime/account-status.js.map +1 -0
- package/dist/lib/runtime/account-storage-scope-entry.d.ts +26 -0
- package/dist/lib/runtime/account-storage-scope-entry.d.ts.map +1 -0
- package/dist/lib/runtime/account-storage-scope-entry.js +15 -0
- package/dist/lib/runtime/account-storage-scope-entry.js.map +1 -0
- package/dist/lib/runtime/auth-facade.d.ts +51 -0
- package/dist/lib/runtime/auth-facade.d.ts.map +1 -0
- package/dist/lib/runtime/auth-facade.js +48 -0
- package/dist/lib/runtime/auth-facade.js.map +1 -0
- package/dist/lib/runtime/browser-oauth-flow.d.ts +32 -0
- package/dist/lib/runtime/browser-oauth-flow.d.ts.map +1 -0
- package/dist/lib/runtime/browser-oauth-flow.js +31 -0
- package/dist/lib/runtime/browser-oauth-flow.js.map +1 -0
- package/dist/lib/runtime/capability-boost.d.ts +25 -0
- package/dist/lib/runtime/capability-boost.d.ts.map +1 -0
- package/dist/lib/runtime/capability-boost.js +26 -0
- package/dist/lib/runtime/capability-boost.js.map +1 -0
- package/dist/lib/runtime/event-handler.d.ts +53 -0
- package/dist/lib/runtime/event-handler.d.ts.map +1 -0
- package/dist/lib/runtime/event-handler.js +46 -0
- package/dist/lib/runtime/event-handler.js.map +1 -0
- package/dist/lib/runtime/flagged-verify-types.d.ts +9 -0
- package/dist/lib/runtime/flagged-verify-types.d.ts.map +1 -0
- package/dist/lib/runtime/flagged-verify-types.js +7 -0
- package/dist/lib/runtime/flagged-verify-types.js.map +1 -0
- package/dist/lib/runtime/hydrate-emails.d.ts +13 -0
- package/dist/lib/runtime/hydrate-emails.d.ts.map +1 -0
- package/dist/lib/runtime/hydrate-emails.js +56 -0
- package/dist/lib/runtime/hydrate-emails.js.map +1 -0
- package/dist/lib/runtime/live-sync-entry.d.ts +36 -0
- package/dist/lib/runtime/live-sync-entry.d.ts.map +1 -0
- package/dist/lib/runtime/live-sync-entry.js +14 -0
- package/dist/lib/runtime/live-sync-entry.js.map +1 -0
- package/dist/lib/runtime/live-sync.d.ts +35 -0
- package/dist/lib/runtime/live-sync.d.ts.map +1 -0
- package/dist/lib/runtime/live-sync.js +65 -0
- package/dist/lib/runtime/live-sync.js.map +1 -0
- package/dist/lib/runtime/loader-setup.d.ts +9 -0
- package/dist/lib/runtime/loader-setup.d.ts.map +1 -0
- package/dist/lib/runtime/loader-setup.js +8 -0
- package/dist/lib/runtime/loader-setup.js.map +1 -0
- package/dist/lib/runtime/login-menu-accounts.d.ts +29 -0
- package/dist/lib/runtime/login-menu-accounts.d.ts.map +1 -0
- package/dist/lib/runtime/login-menu-accounts.js +33 -0
- package/dist/lib/runtime/login-menu-accounts.js.map +1 -0
- package/dist/lib/runtime/manual-oauth-flow.d.ts +40 -0
- package/dist/lib/runtime/manual-oauth-flow.d.ts.map +1 -0
- package/dist/lib/runtime/manual-oauth-flow.js +71 -0
- package/dist/lib/runtime/manual-oauth-flow.js.map +1 -0
- package/dist/lib/runtime/metrics.d.ts +29 -0
- package/dist/lib/runtime/metrics.d.ts.map +1 -0
- package/dist/lib/runtime/metrics.js +97 -0
- package/dist/lib/runtime/metrics.js.map +1 -0
- package/dist/lib/runtime/oauth-browser-flow.d.ts +9 -0
- package/dist/lib/runtime/oauth-browser-flow.d.ts.map +1 -0
- package/dist/lib/runtime/oauth-browser-flow.js +34 -0
- package/dist/lib/runtime/oauth-browser-flow.js.map +1 -0
- package/dist/lib/runtime/preemptive-quota.d.ts +13 -0
- package/dist/lib/runtime/preemptive-quota.d.ts.map +1 -0
- package/dist/lib/runtime/preemptive-quota.js +9 -0
- package/dist/lib/runtime/preemptive-quota.js.map +1 -0
- package/dist/lib/runtime/quota-headers.d.ts +12 -0
- package/dist/lib/runtime/quota-headers.d.ts.map +1 -0
- package/dist/lib/runtime/quota-headers.js +131 -0
- package/dist/lib/runtime/quota-headers.js.map +1 -0
- package/dist/lib/runtime/quota-probe.d.ts +18 -0
- package/dist/lib/runtime/quota-probe.d.ts.map +1 -0
- package/dist/lib/runtime/quota-probe.js +82 -0
- package/dist/lib/runtime/quota-probe.js.map +1 -0
- package/dist/lib/runtime/quota-settings.d.ts +14 -0
- package/dist/lib/runtime/quota-settings.d.ts.map +1 -0
- package/dist/lib/runtime/quota-settings.js +12 -0
- package/dist/lib/runtime/quota-settings.js.map +1 -0
- package/dist/lib/runtime/refresh-guardian-entry.d.ts +32 -0
- package/dist/lib/runtime/refresh-guardian-entry.d.ts.map +1 -0
- package/dist/lib/runtime/refresh-guardian-entry.js +12 -0
- package/dist/lib/runtime/refresh-guardian-entry.js.map +1 -0
- package/dist/lib/runtime/refresh-guardian.d.ts +24 -0
- package/dist/lib/runtime/refresh-guardian.d.ts.map +1 -0
- package/dist/lib/runtime/refresh-guardian.js +32 -0
- package/dist/lib/runtime/refresh-guardian.js.map +1 -0
- package/dist/lib/runtime/request-init.d.ts +5 -0
- package/dist/lib/runtime/request-init.d.ts.map +1 -0
- package/dist/lib/runtime/request-init.js +50 -0
- package/dist/lib/runtime/request-init.js.map +1 -0
- package/dist/lib/runtime/runtime-services.d.ts +58 -0
- package/dist/lib/runtime/runtime-services.d.ts.map +1 -0
- package/dist/lib/runtime/runtime-services.js +87 -0
- package/dist/lib/runtime/runtime-services.js.map +1 -0
- package/dist/lib/runtime/session-affinity-entry.d.ts +30 -0
- package/dist/lib/runtime/session-affinity-entry.d.ts.map +1 -0
- package/dist/lib/runtime/session-affinity-entry.js +11 -0
- package/dist/lib/runtime/session-affinity-entry.js.map +1 -0
- package/dist/lib/runtime/session-affinity.d.ts +13 -0
- package/dist/lib/runtime/session-affinity.d.ts.map +1 -0
- package/dist/lib/runtime/session-affinity.js +17 -0
- package/dist/lib/runtime/session-affinity.js.map +1 -0
- package/dist/lib/runtime/session-recovery.d.ts +8 -0
- package/dist/lib/runtime/session-recovery.d.ts.map +1 -0
- package/dist/lib/runtime/session-recovery.js +7 -0
- package/dist/lib/runtime/session-recovery.js.map +1 -0
- package/dist/lib/runtime/status-marker.d.ts +3 -0
- package/dist/lib/runtime/status-marker.d.ts.map +1 -0
- package/dist/lib/runtime/status-marker.js +15 -0
- package/dist/lib/runtime/status-marker.js.map +1 -0
- package/dist/lib/runtime/storage-scope.d.ts +13 -0
- package/dist/lib/runtime/storage-scope.d.ts.map +1 -0
- package/dist/lib/runtime/storage-scope.js +14 -0
- package/dist/lib/runtime/storage-scope.js.map +1 -0
- package/dist/lib/runtime/toast.d.ts +16 -0
- package/dist/lib/runtime/toast.d.ts.map +1 -0
- package/dist/lib/runtime/toast.js +16 -0
- package/dist/lib/runtime/toast.js.map +1 -0
- package/dist/lib/runtime/ui-runtime-entry.d.ts +7 -0
- package/dist/lib/runtime/ui-runtime-entry.d.ts.map +1 -0
- package/dist/lib/runtime/ui-runtime-entry.js +4 -0
- package/dist/lib/runtime/ui-runtime-entry.js.map +1 -0
- package/dist/lib/runtime/ui-runtime.d.ts +9 -0
- package/dist/lib/runtime/ui-runtime.d.ts.map +1 -0
- package/dist/lib/runtime/ui-runtime.js +23 -0
- package/dist/lib/runtime/ui-runtime.js.map +1 -0
- package/dist/lib/runtime/verify-flagged.d.ts +44 -0
- package/dist/lib/runtime/verify-flagged.d.ts.map +1 -0
- package/dist/lib/runtime/verify-flagged.js +84 -0
- package/dist/lib/runtime/verify-flagged.js.map +1 -0
- package/dist/lib/schemas.d.ts +2 -0
- package/dist/lib/schemas.d.ts.map +1 -1
- package/dist/lib/schemas.js +2 -0
- package/dist/lib/schemas.js.map +1 -1
- package/dist/lib/session-affinity.d.ts +10 -0
- package/dist/lib/session-affinity.d.ts.map +1 -1
- package/dist/lib/session-affinity.js +53 -6
- package/dist/lib/session-affinity.js.map +1 -1
- package/dist/lib/storage/account-clear-entry.d.ts +16 -0
- package/dist/lib/storage/account-clear-entry.d.ts.map +1 -0
- package/dist/lib/storage/account-clear-entry.js +12 -0
- package/dist/lib/storage/account-clear-entry.js.map +1 -0
- package/dist/lib/storage/account-clear.d.ts +8 -0
- package/dist/lib/storage/account-clear.d.ts.map +1 -0
- package/dist/lib/storage/account-clear.js +29 -0
- package/dist/lib/storage/account-clear.js.map +1 -0
- package/dist/lib/storage/account-match-utils.d.ts +9 -0
- package/dist/lib/storage/account-match-utils.d.ts.map +1 -0
- package/dist/lib/storage/account-match-utils.js +45 -0
- package/dist/lib/storage/account-match-utils.js.map +1 -0
- package/dist/lib/storage/account-persistence.d.ts +3 -0
- package/dist/lib/storage/account-persistence.d.ts.map +1 -0
- package/dist/lib/storage/account-persistence.js +12 -0
- package/dist/lib/storage/account-persistence.js.map +1 -0
- package/dist/lib/storage/account-port.d.ts +50 -0
- package/dist/lib/storage/account-port.d.ts.map +1 -0
- package/dist/lib/storage/account-port.js +43 -0
- package/dist/lib/storage/account-port.js.map +1 -0
- package/dist/lib/storage/account-save-entry.d.ts +7 -0
- package/dist/lib/storage/account-save-entry.d.ts.map +1 -0
- package/dist/lib/storage/account-save-entry.js +6 -0
- package/dist/lib/storage/account-save-entry.js.map +1 -0
- package/dist/lib/storage/account-save.d.ts +30 -0
- package/dist/lib/storage/account-save.d.ts.map +1 -0
- package/dist/lib/storage/account-save.js +49 -0
- package/dist/lib/storage/account-save.js.map +1 -0
- package/dist/lib/storage/account-snapshot.d.ts +25 -0
- package/dist/lib/storage/account-snapshot.d.ts.map +1 -0
- package/dist/lib/storage/account-snapshot.js +78 -0
- package/dist/lib/storage/account-snapshot.js.map +1 -0
- package/dist/lib/storage/backup-metadata-builder.d.ts +32 -0
- package/dist/lib/storage/backup-metadata-builder.d.ts.map +1 -0
- package/dist/lib/storage/backup-metadata-builder.js +77 -0
- package/dist/lib/storage/backup-metadata-builder.js.map +1 -0
- package/dist/lib/storage/backup-metadata.d.ts +29 -0
- package/dist/lib/storage/backup-metadata.d.ts.map +1 -0
- package/dist/lib/storage/backup-metadata.js +16 -0
- package/dist/lib/storage/backup-metadata.js.map +1 -0
- package/dist/lib/storage/backup-paths.d.ts +10 -0
- package/dist/lib/storage/backup-paths.d.ts.map +1 -0
- package/dist/lib/storage/backup-paths.js +27 -0
- package/dist/lib/storage/backup-paths.js.map +1 -0
- package/dist/lib/storage/backup-restore.d.ts +11 -0
- package/dist/lib/storage/backup-restore.d.ts.map +1 -0
- package/dist/lib/storage/backup-restore.js +52 -0
- package/dist/lib/storage/backup-restore.js.map +1 -0
- package/dist/lib/storage/cache-artifacts.d.ts +2 -0
- package/dist/lib/storage/cache-artifacts.d.ts.map +1 -0
- package/dist/lib/storage/cache-artifacts.js +4 -0
- package/dist/lib/storage/cache-artifacts.js.map +1 -0
- package/dist/lib/storage/error-hints.d.ts +10 -0
- package/dist/lib/storage/error-hints.d.ts.map +1 -0
- package/dist/lib/storage/error-hints.js +36 -0
- package/dist/lib/storage/error-hints.js.map +1 -0
- package/dist/lib/storage/file-paths.d.ts +6 -0
- package/dist/lib/storage/file-paths.d.ts.map +1 -0
- package/dist/lib/storage/file-paths.js +17 -0
- package/dist/lib/storage/file-paths.js.map +1 -0
- package/dist/lib/storage/fixture-guards.d.ts +4 -0
- package/dist/lib/storage/fixture-guards.d.ts.map +1 -0
- package/dist/lib/storage/fixture-guards.js +27 -0
- package/dist/lib/storage/fixture-guards.js.map +1 -0
- package/dist/lib/storage/flagged-entry.d.ts +15 -0
- package/dist/lib/storage/flagged-entry.d.ts.map +1 -0
- package/dist/lib/storage/flagged-entry.js +12 -0
- package/dist/lib/storage/flagged-entry.js.map +1 -0
- package/dist/lib/storage/flagged-load-entry.d.ts +20 -0
- package/dist/lib/storage/flagged-load-entry.d.ts.map +1 -0
- package/dist/lib/storage/flagged-load-entry.js +13 -0
- package/dist/lib/storage/flagged-load-entry.js.map +1 -0
- package/dist/lib/storage/flagged-save-entry.d.ts +7 -0
- package/dist/lib/storage/flagged-save-entry.d.ts.map +1 -0
- package/dist/lib/storage/flagged-save-entry.js +6 -0
- package/dist/lib/storage/flagged-save-entry.js.map +1 -0
- package/dist/lib/storage/flagged-storage-file.d.ts +7 -0
- package/dist/lib/storage/flagged-storage-file.d.ts.map +1 -0
- package/dist/lib/storage/flagged-storage-file.js +25 -0
- package/dist/lib/storage/flagged-storage-file.js.map +1 -0
- package/dist/lib/storage/flagged-storage-io.d.ts +28 -0
- package/dist/lib/storage/flagged-storage-io.d.ts.map +1 -0
- package/dist/lib/storage/flagged-storage-io.js +135 -0
- package/dist/lib/storage/flagged-storage-io.js.map +1 -0
- package/dist/lib/storage/flagged-storage.d.ts +6 -0
- package/dist/lib/storage/flagged-storage.d.ts.map +1 -0
- package/dist/lib/storage/flagged-storage.js +90 -0
- package/dist/lib/storage/flagged-storage.js.map +1 -0
- package/dist/lib/storage/gitignore.d.ts +7 -0
- package/dist/lib/storage/gitignore.d.ts.map +1 -0
- package/dist/lib/storage/gitignore.js +34 -0
- package/dist/lib/storage/gitignore.js.map +1 -0
- package/dist/lib/storage/hash.d.ts +2 -0
- package/dist/lib/storage/hash.d.ts.map +1 -0
- package/dist/lib/storage/hash.js +5 -0
- package/dist/lib/storage/hash.js.map +1 -0
- package/dist/lib/storage/identity.d.ts +15 -0
- package/dist/lib/storage/identity.d.ts.map +1 -0
- package/dist/lib/storage/identity.js +48 -0
- package/dist/lib/storage/identity.js.map +1 -0
- package/dist/lib/storage/import-export.d.ts +24 -0
- package/dist/lib/storage/import-export.d.ts.map +1 -0
- package/dist/lib/storage/import-export.js +108 -0
- package/dist/lib/storage/import-export.js.map +1 -0
- package/dist/lib/storage/metadata-section.d.ts +16 -0
- package/dist/lib/storage/metadata-section.d.ts.map +1 -0
- package/dist/lib/storage/metadata-section.js +16 -0
- package/dist/lib/storage/metadata-section.js.map +1 -0
- package/dist/lib/storage/named-backup-entry.d.ts +15 -0
- package/dist/lib/storage/named-backup-entry.d.ts.map +1 -0
- package/dist/lib/storage/named-backup-entry.js +7 -0
- package/dist/lib/storage/named-backup-entry.js.map +1 -0
- package/dist/lib/storage/named-backups-entry.d.ts +19 -0
- package/dist/lib/storage/named-backups-entry.d.ts.map +1 -0
- package/dist/lib/storage/named-backups-entry.js +7 -0
- package/dist/lib/storage/named-backups-entry.js.map +1 -0
- package/dist/lib/storage/named-backups.d.ts +15 -0
- package/dist/lib/storage/named-backups.d.ts.map +1 -0
- package/dist/lib/storage/named-backups.js +68 -0
- package/dist/lib/storage/named-backups.js.map +1 -0
- package/dist/lib/storage/path-state.d.ts +9 -0
- package/dist/lib/storage/path-state.d.ts.map +1 -0
- package/dist/lib/storage/path-state.js +20 -0
- package/dist/lib/storage/path-state.js.map +1 -0
- package/dist/lib/storage/project-migration.d.ts +10 -0
- package/dist/lib/storage/project-migration.d.ts.map +1 -0
- package/dist/lib/storage/project-migration.js +38 -0
- package/dist/lib/storage/project-migration.js.map +1 -0
- package/dist/lib/storage/record-utils.d.ts +3 -0
- package/dist/lib/storage/record-utils.d.ts.map +1 -0
- package/dist/lib/storage/record-utils.js +9 -0
- package/dist/lib/storage/record-utils.js.map +1 -0
- package/dist/lib/storage/restore-assessment.d.ts +7 -0
- package/dist/lib/storage/restore-assessment.d.ts.map +1 -0
- package/dist/lib/storage/restore-assessment.js +42 -0
- package/dist/lib/storage/restore-assessment.js.map +1 -0
- package/dist/lib/storage/restore-backup-entry.d.ts +24 -0
- package/dist/lib/storage/restore-backup-entry.d.ts.map +1 -0
- package/dist/lib/storage/restore-backup-entry.js +10 -0
- package/dist/lib/storage/restore-backup-entry.js.map +1 -0
- package/dist/lib/storage/restore-metadata.d.ts +10 -0
- package/dist/lib/storage/restore-metadata.d.ts.map +1 -0
- package/dist/lib/storage/restore-metadata.js +18 -0
- package/dist/lib/storage/restore-metadata.js.map +1 -0
- package/dist/lib/storage/restore.d.ts +14 -0
- package/dist/lib/storage/restore.d.ts.map +1 -0
- package/dist/lib/storage/restore.js +53 -0
- package/dist/lib/storage/restore.js.map +1 -0
- package/dist/lib/storage/snapshot-inspectors.d.ts +22 -0
- package/dist/lib/storage/snapshot-inspectors.d.ts.map +1 -0
- package/dist/lib/storage/snapshot-inspectors.js +95 -0
- package/dist/lib/storage/snapshot-inspectors.js.map +1 -0
- package/dist/lib/storage/storage-parser.d.ts +15 -0
- package/dist/lib/storage/storage-parser.d.ts.map +1 -0
- package/dist/lib/storage/storage-parser.js +16 -0
- package/dist/lib/storage/storage-parser.js.map +1 -0
- package/dist/lib/storage/transactions.d.ts +23 -0
- package/dist/lib/storage/transactions.d.ts.map +1 -0
- package/dist/lib/storage/transactions.js +64 -0
- package/dist/lib/storage/transactions.js.map +1 -0
- package/dist/lib/storage.d.ts +8 -47
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +482 -1044
- package/dist/lib/storage.js.map +1 -1
- package/dist/lib/types.d.ts +80 -1
- package/dist/lib/types.d.ts.map +1 -1
- package/package.json +41 -4
- package/scripts/check-pack-budget-lib.js +114 -0
- package/scripts/check-pack-budget.mjs +10 -0
- package/scripts/codex-multi-auth.js +34 -10
- package/scripts/install-codex-auth-utils.js +54 -14
- package/scripts/install-codex-auth.js +62 -33
- package/scripts/update-vendor-provenance.mjs +96 -0
- package/scripts/verify-vendor-provenance.mjs +53 -0
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// @ts-check
|
|
4
|
+
|
|
3
5
|
import { createRequire } from "node:module";
|
|
4
|
-
import { runCodexMultiAuthCli } from "../dist/lib/codex-manager.js";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const versionFlags = new Set(["--version", "-v"]);
|
|
8
|
+
|
|
9
|
+
function resolveCliVersion() {
|
|
7
10
|
const require = createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
try {
|
|
12
|
+
const pkg = require("../package.json");
|
|
13
|
+
const version = typeof pkg?.version === "string" ? pkg.version.trim() : "";
|
|
14
|
+
if (version.length > 0) {
|
|
15
|
+
return version;
|
|
16
|
+
}
|
|
17
|
+
} catch {
|
|
18
|
+
// Best effort only.
|
|
12
19
|
}
|
|
13
|
-
|
|
14
|
-
// Best effort only.
|
|
20
|
+
return "";
|
|
15
21
|
}
|
|
16
22
|
|
|
17
|
-
const
|
|
18
|
-
|
|
23
|
+
const args = process.argv.slice(2);
|
|
24
|
+
const version = resolveCliVersion();
|
|
25
|
+
|
|
26
|
+
if (version.length > 0) {
|
|
27
|
+
process.env.CODEX_MULTI_AUTH_CLI_VERSION = version;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (args.length === 1 && versionFlags.has(args[0])) {
|
|
31
|
+
if (version.length > 0) {
|
|
32
|
+
process.stdout.write(`${version}\n`);
|
|
33
|
+
process.exitCode = 0;
|
|
34
|
+
} else {
|
|
35
|
+
process.stderr.write("codex-multi-auth version is unavailable.\n");
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
const { runCodexMultiAuthCli } = await import("../dist/lib/codex-manager.js");
|
|
40
|
+
const exitCode = await runCodexMultiAuthCli(args);
|
|
41
|
+
process.exitCode = Number.isInteger(exitCode) ? exitCode : 1;
|
|
42
|
+
}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
3
|
import { rename as fsRename } from "node:fs/promises";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
4
6
|
|
|
5
7
|
const PLUGIN_NAME = "codex-multi-auth";
|
|
6
|
-
export const FILE_RETRY_CODES = new Set([
|
|
8
|
+
export const FILE_RETRY_CODES = new Set([
|
|
9
|
+
"EBUSY",
|
|
10
|
+
"EPERM",
|
|
11
|
+
"EAGAIN",
|
|
12
|
+
"ENOTEMPTY",
|
|
13
|
+
"EACCES",
|
|
14
|
+
]);
|
|
7
15
|
export const FILE_RETRY_MAX_ATTEMPTS = 6;
|
|
8
16
|
export const FILE_RETRY_BASE_DELAY_MS = 25;
|
|
9
17
|
export const FILE_RETRY_JITTER_MS = 20;
|
|
10
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @param {NodeJS.Platform} [platform]
|
|
21
|
+
* @param {NodeJS.ProcessEnv} [env]
|
|
22
|
+
* @param {string} [home]
|
|
23
|
+
*/
|
|
11
24
|
export function resolveInstallPaths(
|
|
12
25
|
platform = process.platform,
|
|
13
26
|
env = process.env,
|
|
@@ -35,6 +48,7 @@ export function resolveInstallPaths(
|
|
|
35
48
|
};
|
|
36
49
|
}
|
|
37
50
|
|
|
51
|
+
/** @param {unknown} list */
|
|
38
52
|
export function normalizePluginList(list) {
|
|
39
53
|
const entries = Array.isArray(list) ? list.filter(Boolean) : [];
|
|
40
54
|
const filtered = entries.filter((entry) => {
|
|
@@ -44,7 +58,8 @@ export function normalizePluginList(list) {
|
|
|
44
58
|
const deduped = [];
|
|
45
59
|
const seen = new Set();
|
|
46
60
|
for (const entry of filtered) {
|
|
47
|
-
const key =
|
|
61
|
+
const key =
|
|
62
|
+
typeof entry === "string" ? `s:${entry}` : `j:${JSON.stringify(entry)}`;
|
|
48
63
|
if (seen.has(key)) continue;
|
|
49
64
|
seen.add(key);
|
|
50
65
|
deduped.push(entry);
|
|
@@ -52,6 +67,7 @@ export function normalizePluginList(list) {
|
|
|
52
67
|
return [...deduped, PLUGIN_NAME];
|
|
53
68
|
}
|
|
54
69
|
|
|
70
|
+
/** @param {number} ms */
|
|
55
71
|
function sleep(ms) {
|
|
56
72
|
// Keep this helper local so installer scripts remain standalone and do not depend on lib/.
|
|
57
73
|
return new Promise((resolve) => {
|
|
@@ -59,28 +75,49 @@ function sleep(ms) {
|
|
|
59
75
|
});
|
|
60
76
|
}
|
|
61
77
|
|
|
78
|
+
/** @param {unknown} error */
|
|
62
79
|
function shouldRetryFileOperation(error) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
80
|
+
const fileError = /** @type {NodeJS.ErrnoException | undefined} */ (error);
|
|
81
|
+
return (
|
|
82
|
+
fileError instanceof Error &&
|
|
83
|
+
typeof fileError.code === "string" &&
|
|
84
|
+
FILE_RETRY_CODES.has(fileError.code)
|
|
85
|
+
);
|
|
66
86
|
}
|
|
67
87
|
|
|
88
|
+
/** @template T @param {() => Promise<T>} operation */
|
|
68
89
|
export async function withFileOperationRetry(operation) {
|
|
69
90
|
for (let attempt = 1; ; attempt += 1) {
|
|
70
91
|
try {
|
|
71
92
|
return await operation();
|
|
72
93
|
} catch (error) {
|
|
73
|
-
if (
|
|
94
|
+
if (
|
|
95
|
+
!shouldRetryFileOperation(error) ||
|
|
96
|
+
attempt >= FILE_RETRY_MAX_ATTEMPTS
|
|
97
|
+
) {
|
|
74
98
|
throw error;
|
|
75
99
|
}
|
|
76
100
|
|
|
77
101
|
const jitter = Math.floor(Math.random() * FILE_RETRY_JITTER_MS);
|
|
78
|
-
const delayMs =
|
|
102
|
+
const delayMs = FILE_RETRY_BASE_DELAY_MS * 2 ** (attempt - 1) + jitter;
|
|
79
103
|
await sleep(delayMs);
|
|
80
104
|
}
|
|
81
105
|
}
|
|
82
106
|
}
|
|
83
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @param {string} sourcePath
|
|
110
|
+
* @param {string} targetPath
|
|
111
|
+
* @param {{
|
|
112
|
+
* rename?: (sourcePath: string, targetPath: string) => Promise<void>,
|
|
113
|
+
* log?: (message: string) => void,
|
|
114
|
+
* maxRetries?: number,
|
|
115
|
+
* baseDelayMs?: number,
|
|
116
|
+
* jitterMs?: number,
|
|
117
|
+
* random?: () => number,
|
|
118
|
+
* sleep?: (ms: number) => Promise<void>,
|
|
119
|
+
* }} [options]
|
|
120
|
+
*/
|
|
84
121
|
export async function renameWithRetry(sourcePath, targetPath, options = {}) {
|
|
85
122
|
const {
|
|
86
123
|
rename = fsRename,
|
|
@@ -101,14 +138,17 @@ export async function renameWithRetry(sourcePath, targetPath, options = {}) {
|
|
|
101
138
|
await rename(sourcePath, targetPath);
|
|
102
139
|
return;
|
|
103
140
|
} catch (error) {
|
|
104
|
-
const code =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
141
|
+
const code =
|
|
142
|
+
error && typeof error === "object" && "code" in error
|
|
143
|
+
? error.code
|
|
144
|
+
: undefined;
|
|
145
|
+
const isRetryable =
|
|
146
|
+
typeof code === "string" && FILE_RETRY_CODES.has(code);
|
|
108
147
|
if (!isRetryable || attempt === maxRetries - 1) {
|
|
109
148
|
throw error;
|
|
110
149
|
}
|
|
111
|
-
const delayMs =
|
|
150
|
+
const delayMs =
|
|
151
|
+
baseDelayMs * 2 ** attempt + Math.floor(random() * jitterMs);
|
|
112
152
|
log(
|
|
113
153
|
`Retrying atomic rename (${attempt + 1}/${maxRetries}) code=${code ?? "unknown"} source=${sourcePath} target=${targetPath} delayMs=${delayMs}`,
|
|
114
154
|
);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// @ts-check
|
|
4
|
+
|
|
3
5
|
import { existsSync } from "node:fs";
|
|
4
|
-
import {
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { copyFile, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
6
7
|
import { dirname, join, resolve } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
7
9
|
import {
|
|
8
10
|
normalizePluginList,
|
|
9
11
|
renameWithRetry,
|
|
@@ -16,17 +18,18 @@ const PLUGIN_NAME = "codex-multi-auth";
|
|
|
16
18
|
const args = new Set(process.argv.slice(2));
|
|
17
19
|
|
|
18
20
|
if (args.has("--help") || args.has("-h")) {
|
|
19
|
-
console.log(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
console.log(
|
|
22
|
+
`Usage: ${PLUGIN_NAME} [--modern|--legacy] [--dry-run] [--no-cache-clear]\n\n` +
|
|
23
|
+
"Default behavior:\n" +
|
|
24
|
+
" - Installs/updates global config at ~/.config/Codex/Codex.json\n" +
|
|
25
|
+
" - Uses modern config (variants) by default\n" +
|
|
26
|
+
" - Ensures plugin is unpinned (latest)\n" +
|
|
27
|
+
" - Clears Codex plugin cache\n\n" +
|
|
28
|
+
"Options:\n" +
|
|
29
|
+
" --modern Force modern config (default)\n" +
|
|
30
|
+
" --legacy Use legacy config (older Codex versions)\n" +
|
|
31
|
+
" --dry-run Show actions without writing\n" +
|
|
32
|
+
" --no-cache-clear Skip clearing Codex cache\n",
|
|
30
33
|
);
|
|
31
34
|
process.exit(0);
|
|
32
35
|
}
|
|
@@ -41,25 +44,35 @@ const repoRoot = resolve(scriptDir, "..");
|
|
|
41
44
|
const templatePath = join(
|
|
42
45
|
repoRoot,
|
|
43
46
|
"config",
|
|
44
|
-
useLegacy ? "codex-legacy.json" : "codex-modern.json"
|
|
47
|
+
useLegacy ? "codex-legacy.json" : "codex-modern.json",
|
|
45
48
|
);
|
|
46
49
|
|
|
47
50
|
const installPaths = resolveInstallPaths();
|
|
48
|
-
const {
|
|
49
|
-
|
|
51
|
+
const {
|
|
52
|
+
configDir,
|
|
53
|
+
configPath,
|
|
54
|
+
cacheNodeModules,
|
|
55
|
+
cacheBunLock,
|
|
56
|
+
cachePackageJson,
|
|
57
|
+
} = installPaths;
|
|
58
|
+
|
|
59
|
+
/** @param {string} message */
|
|
50
60
|
function log(message) {
|
|
51
61
|
console.log(message);
|
|
52
62
|
}
|
|
53
63
|
|
|
64
|
+
/** @param {unknown} obj */
|
|
54
65
|
function formatJson(obj) {
|
|
55
66
|
return `${JSON.stringify(obj, null, 2)}\n`;
|
|
56
67
|
}
|
|
57
68
|
|
|
69
|
+
/** @param {string} filePath */
|
|
58
70
|
async function readJson(filePath) {
|
|
59
71
|
const content = await readFile(filePath, "utf-8");
|
|
60
|
-
return JSON.parse(content);
|
|
72
|
+
return /** @type {any} */ (JSON.parse(content));
|
|
61
73
|
}
|
|
62
74
|
|
|
75
|
+
/** @param {string} filePath @param {unknown} value */
|
|
63
76
|
async function writeJsonAtomic(filePath, value) {
|
|
64
77
|
const tempPath = `${filePath}.tmp-${process.pid}-${Date.now()}-${Math.random()
|
|
65
78
|
.toString(36)
|
|
@@ -79,6 +92,7 @@ async function writeJsonAtomic(filePath, value) {
|
|
|
79
92
|
}
|
|
80
93
|
}
|
|
81
94
|
|
|
95
|
+
/** @param {string} sourcePath */
|
|
82
96
|
async function backupConfig(sourcePath) {
|
|
83
97
|
const timestamp = new Date()
|
|
84
98
|
.toISOString()
|
|
@@ -98,6 +112,7 @@ async function removePluginFromCachePackage() {
|
|
|
98
112
|
return;
|
|
99
113
|
}
|
|
100
114
|
|
|
115
|
+
/** @type {any} */
|
|
101
116
|
let cacheData;
|
|
102
117
|
try {
|
|
103
118
|
cacheData = await readJson(cachePackageJson);
|
|
@@ -145,7 +160,9 @@ async function clearCache() {
|
|
|
145
160
|
log(`[dry-run] Would remove ${cacheBunLock}`);
|
|
146
161
|
} else {
|
|
147
162
|
try {
|
|
148
|
-
await withFileOperationRetry(() =>
|
|
163
|
+
await withFileOperationRetry(() =>
|
|
164
|
+
rm(cacheNodeModules, { recursive: true, force: true }),
|
|
165
|
+
);
|
|
149
166
|
await withFileOperationRetry(() => rm(cacheBunLock, { force: true }));
|
|
150
167
|
} catch (error) {
|
|
151
168
|
log(
|
|
@@ -168,27 +185,36 @@ async function main() {
|
|
|
168
185
|
let nextConfig = template;
|
|
169
186
|
if (existsSync(configPath)) {
|
|
170
187
|
const backupPath = await backupConfig(configPath);
|
|
171
|
-
log(
|
|
188
|
+
log(
|
|
189
|
+
`${dryRun ? "[dry-run] Would create backup" : "Backup created"}: ${backupPath}`,
|
|
190
|
+
);
|
|
172
191
|
|
|
173
192
|
try {
|
|
174
193
|
const existing = await readJson(configPath);
|
|
175
194
|
const merged = { ...existing };
|
|
176
195
|
merged.plugin = normalizePluginList(existing.plugin);
|
|
177
|
-
const provider =
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
196
|
+
const provider =
|
|
197
|
+
existing.provider && typeof existing.provider === "object"
|
|
198
|
+
? { ...existing.provider }
|
|
199
|
+
: {};
|
|
200
|
+
const existingOpenAi =
|
|
201
|
+
provider.openai && typeof provider.openai === "object"
|
|
202
|
+
? provider.openai
|
|
203
|
+
: {};
|
|
204
|
+
const templateOpenAi =
|
|
205
|
+
template.provider &&
|
|
206
|
+
typeof template.provider === "object" &&
|
|
207
|
+
template.provider.openai &&
|
|
208
|
+
typeof template.provider.openai === "object"
|
|
209
|
+
? template.provider.openai
|
|
210
|
+
: {};
|
|
187
211
|
provider.openai = { ...templateOpenAi, ...existingOpenAi };
|
|
188
212
|
merged.provider = provider;
|
|
189
213
|
nextConfig = merged;
|
|
190
214
|
} catch (error) {
|
|
191
|
-
log(
|
|
215
|
+
log(
|
|
216
|
+
`Warning: Could not parse existing config (${error}). Replacing with template.`,
|
|
217
|
+
);
|
|
192
218
|
nextConfig = template;
|
|
193
219
|
}
|
|
194
220
|
} else {
|
|
@@ -196,7 +222,9 @@ async function main() {
|
|
|
196
222
|
}
|
|
197
223
|
|
|
198
224
|
if (dryRun) {
|
|
199
|
-
log(
|
|
225
|
+
log(
|
|
226
|
+
`[dry-run] Would write ${configPath} using ${useLegacy ? "legacy" : "modern"} config`,
|
|
227
|
+
);
|
|
200
228
|
} else {
|
|
201
229
|
await mkdir(configDir, { recursive: true });
|
|
202
230
|
await writeJsonAtomic(configPath, nextConfig);
|
|
@@ -222,8 +250,9 @@ const isDirectRun = (() => {
|
|
|
222
250
|
|
|
223
251
|
if (isDirectRun) {
|
|
224
252
|
main().catch((error) => {
|
|
225
|
-
console.error(
|
|
253
|
+
console.error(
|
|
254
|
+
`Installer failed: ${error instanceof Error ? error.message : error}`,
|
|
255
|
+
);
|
|
226
256
|
process.exit(1);
|
|
227
257
|
});
|
|
228
258
|
}
|
|
229
|
-
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
4
|
+
|
|
5
|
+
const components = [
|
|
6
|
+
{
|
|
7
|
+
name: "@codex-ai/plugin",
|
|
8
|
+
root: "vendor/codex-ai-plugin",
|
|
9
|
+
source: "vendored dist shim",
|
|
10
|
+
files: [
|
|
11
|
+
"vendor/codex-ai-plugin/package.json",
|
|
12
|
+
"vendor/codex-ai-plugin/dist/index.js",
|
|
13
|
+
"vendor/codex-ai-plugin/dist/index.d.ts",
|
|
14
|
+
"vendor/codex-ai-plugin/dist/tool.js",
|
|
15
|
+
"vendor/codex-ai-plugin/dist/tool.d.ts",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "@codex-ai/sdk",
|
|
20
|
+
root: "vendor/codex-ai-sdk",
|
|
21
|
+
source: "vendored dist shim",
|
|
22
|
+
files: [
|
|
23
|
+
"vendor/codex-ai-sdk/package.json",
|
|
24
|
+
"vendor/codex-ai-sdk/dist/index.js",
|
|
25
|
+
"vendor/codex-ai-sdk/dist/index.d.ts",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
async function loadExistingManifest() {
|
|
31
|
+
try {
|
|
32
|
+
const content = await readFile("vendor/provenance.json", "utf8");
|
|
33
|
+
const parsed = JSON.parse(content);
|
|
34
|
+
return Array.isArray(parsed?.components) ? parsed : { components: [] };
|
|
35
|
+
} catch {
|
|
36
|
+
return { components: [] };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function hashFile(path) {
|
|
41
|
+
const content = await readFile(path);
|
|
42
|
+
return createHash("sha256").update(content).digest("hex");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const existingManifest = await loadExistingManifest();
|
|
46
|
+
const existingFiles = Object.fromEntries(
|
|
47
|
+
existingManifest.components.flatMap((component) =>
|
|
48
|
+
Array.isArray(component.files)
|
|
49
|
+
? component.files
|
|
50
|
+
.filter(
|
|
51
|
+
(file) =>
|
|
52
|
+
file &&
|
|
53
|
+
typeof file === "object" &&
|
|
54
|
+
typeof file.path === "string",
|
|
55
|
+
)
|
|
56
|
+
.map((file) => [file.path, file])
|
|
57
|
+
: [],
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const manifest = {
|
|
62
|
+
generatedAt: new Date().toISOString().slice(0, 10),
|
|
63
|
+
components: [],
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
for (const component of components) {
|
|
67
|
+
const packageJson = JSON.parse(
|
|
68
|
+
await readFile(`${component.root}/package.json`, "utf8"),
|
|
69
|
+
);
|
|
70
|
+
manifest.components.push({
|
|
71
|
+
name: component.name,
|
|
72
|
+
version: packageJson.version,
|
|
73
|
+
source: component.source,
|
|
74
|
+
root: component.root,
|
|
75
|
+
files: await Promise.all(
|
|
76
|
+
component.files.map(async (path) => {
|
|
77
|
+
const prior = existingFiles[path] ?? {};
|
|
78
|
+
const { path: _priorPath, sha256: _priorHash, ...extra } = prior;
|
|
79
|
+
return {
|
|
80
|
+
path,
|
|
81
|
+
sha256: await hashFile(path),
|
|
82
|
+
...extra,
|
|
83
|
+
};
|
|
84
|
+
}),
|
|
85
|
+
),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
await writeFile(
|
|
90
|
+
"vendor/provenance.json",
|
|
91
|
+
`${JSON.stringify(manifest, null, 2)}\n`,
|
|
92
|
+
"utf8",
|
|
93
|
+
);
|
|
94
|
+
console.log(
|
|
95
|
+
`Updated vendor/provenance.json for ${manifest.components.length} component(s)`,
|
|
96
|
+
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { readFile } from "node:fs/promises";
|
|
4
|
+
|
|
5
|
+
const manifest = JSON.parse(
|
|
6
|
+
await readFile(new URL("../vendor/provenance.json", import.meta.url), "utf8"),
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
if (!manifest || !Array.isArray(manifest.components)) {
|
|
10
|
+
throw new Error("vendor/provenance.json is missing a valid components array");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
for (const component of manifest.components) {
|
|
14
|
+
if (
|
|
15
|
+
!component ||
|
|
16
|
+
!Array.isArray(component.files) ||
|
|
17
|
+
component.files.length === 0
|
|
18
|
+
) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
`Component provenance entry is invalid: ${JSON.stringify(component)}`,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
for (const file of component.files) {
|
|
24
|
+
if (!file?.path || !file?.sha256) {
|
|
25
|
+
throw new Error(`Invalid file provenance entry in ${component.name}`);
|
|
26
|
+
}
|
|
27
|
+
let content;
|
|
28
|
+
try {
|
|
29
|
+
content = await readFile(new URL(`../${file.path}`, import.meta.url));
|
|
30
|
+
} catch (error) {
|
|
31
|
+
const code =
|
|
32
|
+
error && typeof error === "object"
|
|
33
|
+
? /** @type {{ code?: string }} */ (error).code
|
|
34
|
+
: undefined;
|
|
35
|
+
if (code === "ENOENT") {
|
|
36
|
+
throw new Error(
|
|
37
|
+
`Vendor file not found in ${component.name}: ${file.path} (${code})`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
const actual = createHash("sha256").update(content).digest("hex");
|
|
43
|
+
if (actual !== file.sha256) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
`Vendor provenance mismatch for ${file.path}: expected ${file.sha256}, got ${actual}`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
console.log(
|
|
52
|
+
`Vendor provenance ok: ${manifest.components.length} component(s), ${manifest.components.reduce((/** @type {number} */ sum, /** @type {{ files?: unknown[] }} */ component) => sum + (Array.isArray(component.files) ? component.files.length : 0), 0)} file(s) verified`,
|
|
53
|
+
);
|