@cortexkit/opencode-antigravity-auth 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +225 -553
- package/dist/cli.js +3790 -0
- package/dist/cli.js.map +7 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18951 -13145
- package/dist/index.js.map +4 -4
- package/dist/src/antigravity/oauth.d.ts +1 -1
- package/dist/src/antigravity/oauth.js +1 -1
- package/dist/src/cli.d.ts +21 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +237 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/constants.d.ts +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/hooks/auto-update-checker/cache.d.ts.map +1 -1
- package/dist/src/hooks/auto-update-checker/cache.js +13 -13
- package/dist/src/hooks/auto-update-checker/cache.js.map +1 -1
- package/dist/src/hooks/auto-update-checker/checker.d.ts +1 -1
- package/dist/src/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/src/hooks/auto-update-checker/checker.js +75 -51
- package/dist/src/hooks/auto-update-checker/checker.js.map +1 -1
- package/dist/src/hooks/auto-update-checker/constants.d.ts.map +1 -1
- package/dist/src/hooks/auto-update-checker/constants.js +12 -12
- package/dist/src/hooks/auto-update-checker/constants.js.map +1 -1
- package/dist/src/hooks/auto-update-checker/index.d.ts +6 -6
- package/dist/src/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/src/hooks/auto-update-checker/index.js +17 -17
- package/dist/src/hooks/auto-update-checker/index.js.map +1 -1
- package/dist/src/hooks/auto-update-checker/logging.js +2 -2
- package/dist/src/hooks/auto-update-checker/logging.js.map +1 -1
- package/dist/src/hooks/auto-update-checker/types.d.ts.map +1 -1
- package/dist/src/plugin/account-access.d.ts +99 -0
- package/dist/src/plugin/account-access.d.ts.map +1 -0
- package/dist/src/plugin/account-access.js +480 -0
- package/dist/src/plugin/account-access.js.map +1 -0
- package/dist/src/plugin/accounts.d.ts +7 -236
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +31 -1166
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/agy-request-metadata.d.ts +2 -0
- package/dist/src/plugin/agy-request-metadata.d.ts.map +1 -0
- package/dist/src/plugin/agy-request-metadata.js +2 -0
- package/dist/src/plugin/agy-request-metadata.js.map +1 -0
- package/dist/src/plugin/agy-transport.d.ts +1 -1
- package/dist/src/plugin/agy-transport.js +1 -1
- package/dist/src/plugin/auth-doctor.d.ts +6 -6
- package/dist/src/plugin/auth-doctor.d.ts.map +1 -1
- package/dist/src/plugin/auth-doctor.js +79 -62
- package/dist/src/plugin/auth-doctor.js.map +1 -1
- package/dist/src/plugin/auth-drift.d.ts +4 -4
- package/dist/src/plugin/auth-drift.d.ts.map +1 -1
- package/dist/src/plugin/auth-drift.js +15 -15
- package/dist/src/plugin/auth-drift.js.map +1 -1
- package/dist/src/plugin/auth-loader.d.ts +35 -0
- package/dist/src/plugin/auth-loader.d.ts.map +1 -0
- package/dist/src/plugin/auth-loader.js +144 -0
- package/dist/src/plugin/auth-loader.js.map +1 -0
- package/dist/src/plugin/auth.d.ts +1 -1
- package/dist/src/plugin/auth.js +1 -1
- package/dist/src/plugin/cache/index.d.ts +1 -1
- package/dist/src/plugin/cache/index.d.ts.map +1 -1
- package/dist/src/plugin/cache/index.js +1 -1
- package/dist/src/plugin/cache/index.js.map +1 -1
- package/dist/src/plugin/cache/signature-cache.d.ts +1 -1
- package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/src/plugin/cache/signature-cache.js +23 -24
- package/dist/src/plugin/cache/signature-cache.js.map +1 -1
- package/dist/src/plugin/cache.d.ts +6 -5
- package/dist/src/plugin/cache.d.ts.map +1 -1
- package/dist/src/plugin/cache.js +21 -7
- package/dist/src/plugin/cache.js.map +1 -1
- package/dist/src/plugin/catalog.d.ts +23 -0
- package/dist/src/plugin/catalog.d.ts.map +1 -0
- package/dist/src/plugin/catalog.js +60 -0
- package/dist/src/plugin/catalog.js.map +1 -0
- package/dist/src/plugin/cli.d.ts +7 -7
- package/dist/src/plugin/cli.d.ts.map +1 -1
- package/dist/src/plugin/cli.js +62 -55
- package/dist/src/plugin/cli.js.map +1 -1
- package/dist/src/plugin/command-data.d.ts +276 -0
- package/dist/src/plugin/command-data.d.ts.map +1 -0
- package/dist/src/plugin/command-data.js +325 -0
- package/dist/src/plugin/command-data.js.map +1 -0
- package/dist/src/plugin/commands.d.ts +151 -0
- package/dist/src/plugin/commands.d.ts.map +1 -0
- package/dist/src/plugin/commands.js +639 -0
- package/dist/src/plugin/commands.js.map +1 -0
- package/dist/src/plugin/config/index.d.ts +2 -2
- package/dist/src/plugin/config/index.d.ts.map +1 -1
- package/dist/src/plugin/config/index.js +2 -2
- package/dist/src/plugin/config/index.js.map +1 -1
- package/dist/src/plugin/config/loader.d.ts +1 -1
- package/dist/src/plugin/config/loader.d.ts.map +1 -1
- package/dist/src/plugin/config/loader.js +18 -16
- package/dist/src/plugin/config/loader.js.map +1 -1
- package/dist/src/plugin/config/models.d.ts +2 -2
- package/dist/src/plugin/config/models.d.ts.map +1 -1
- package/dist/src/plugin/config/models.js +1 -1
- package/dist/src/plugin/config/models.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +29 -0
- package/dist/src/plugin/config/operator-settings-schema.d.ts.map +1 -0
- package/dist/src/plugin/config/operator-settings-schema.js +28 -0
- package/dist/src/plugin/config/operator-settings-schema.js.map +1 -0
- package/dist/src/plugin/config/schema.d.ts +21 -2
- package/dist/src/plugin/config/schema.d.ts.map +1 -1
- package/dist/src/plugin/config/schema.js +85 -25
- package/dist/src/plugin/config/schema.js.map +1 -1
- package/dist/src/plugin/config/updater.d.ts.map +1 -1
- package/dist/src/plugin/config/updater.js +15 -15
- package/dist/src/plugin/config/updater.js.map +1 -1
- package/dist/src/plugin/config/writer.d.ts +34 -0
- package/dist/src/plugin/config/writer.d.ts.map +1 -0
- package/dist/src/plugin/config/writer.js +81 -0
- package/dist/src/plugin/config/writer.js.map +1 -0
- package/dist/src/plugin/core/streaming/index.d.ts +1 -1
- package/dist/src/plugin/core/streaming/index.d.ts.map +1 -1
- package/dist/src/plugin/core/streaming/index.js +1 -1
- package/dist/src/plugin/core/streaming/index.js.map +1 -1
- package/dist/src/plugin/core/streaming/transformer.d.ts.map +1 -1
- package/dist/src/plugin/core/streaming/transformer.js +85 -44
- package/dist/src/plugin/core/streaming/transformer.js.map +1 -1
- package/dist/src/plugin/core/streaming/types.d.ts.map +1 -1
- package/dist/src/plugin/debug.d.ts +3 -3
- package/dist/src/plugin/debug.d.ts.map +1 -1
- package/dist/src/plugin/debug.js +85 -47
- package/dist/src/plugin/debug.js.map +1 -1
- package/dist/src/plugin/dependencies.d.ts +129 -0
- package/dist/src/plugin/dependencies.d.ts.map +1 -0
- package/dist/src/plugin/dependencies.js +107 -0
- package/dist/src/plugin/dependencies.js.map +1 -0
- package/dist/src/plugin/errors.d.ts +27 -0
- package/dist/src/plugin/errors.d.ts.map +1 -1
- package/dist/src/plugin/errors.js +29 -3
- package/dist/src/plugin/errors.js.map +1 -1
- package/dist/src/plugin/event-handler.d.ts +53 -0
- package/dist/src/plugin/event-handler.d.ts.map +1 -0
- package/dist/src/plugin/event-handler.js +101 -0
- package/dist/src/plugin/event-handler.js.map +1 -0
- package/dist/src/plugin/fetch/retry-state.d.ts +61 -0
- package/dist/src/plugin/fetch/retry-state.d.ts.map +1 -0
- package/dist/src/plugin/fetch/retry-state.js +248 -0
- package/dist/src/plugin/fetch/retry-state.js.map +1 -0
- package/dist/src/plugin/fetch/warmup.d.ts +30 -0
- package/dist/src/plugin/fetch/warmup.d.ts.map +1 -0
- package/dist/src/plugin/fetch/warmup.js +76 -0
- package/dist/src/plugin/fetch/warmup.js.map +1 -0
- package/dist/src/plugin/fetch-interceptor.d.ts +59 -0
- package/dist/src/plugin/fetch-interceptor.d.ts.map +1 -0
- package/dist/src/plugin/fetch-interceptor.js +1387 -0
- package/dist/src/plugin/fetch-interceptor.js.map +1 -0
- package/dist/src/plugin/fetch-routing.d.ts +26 -0
- package/dist/src/plugin/fetch-routing.d.ts.map +1 -0
- package/dist/src/plugin/fetch-routing.js +99 -0
- package/dist/src/plugin/fetch-routing.js.map +1 -0
- package/dist/src/plugin/fingerprint.d.ts +1 -1
- package/dist/src/plugin/fingerprint.js +1 -1
- package/dist/src/plugin/gemini-dump.d.ts +5 -5
- package/dist/src/plugin/gemini-dump.d.ts.map +1 -1
- package/dist/src/plugin/gemini-dump.js +109 -55
- package/dist/src/plugin/gemini-dump.js.map +1 -1
- package/dist/src/plugin/google-search-tool.d.ts +9 -0
- package/dist/src/plugin/google-search-tool.d.ts.map +1 -0
- package/dist/src/plugin/google-search-tool.js +56 -0
- package/dist/src/plugin/google-search-tool.js.map +1 -0
- package/dist/src/plugin/image-saver.d.ts +2 -21
- package/dist/src/plugin/image-saver.d.ts.map +1 -1
- package/dist/src/plugin/image-saver.js +22 -56
- package/dist/src/plugin/image-saver.js.map +1 -1
- package/dist/src/plugin/index.d.ts +23 -0
- package/dist/src/plugin/index.d.ts.map +1 -0
- package/dist/src/plugin/index.js +308 -0
- package/dist/src/plugin/index.js.map +1 -0
- package/dist/src/plugin/killswitch.d.ts +94 -0
- package/dist/src/plugin/killswitch.d.ts.map +1 -0
- package/dist/src/plugin/killswitch.js +194 -0
- package/dist/src/plugin/killswitch.js.map +1 -0
- package/dist/src/plugin/lifecycle.d.ts +40 -0
- package/dist/src/plugin/lifecycle.d.ts.map +1 -0
- package/dist/src/plugin/lifecycle.js +73 -0
- package/dist/src/plugin/lifecycle.js.map +1 -0
- package/dist/src/plugin/logger.d.ts +10 -1
- package/dist/src/plugin/logger.d.ts.map +1 -1
- package/dist/src/plugin/logger.js +38 -12
- package/dist/src/plugin/logger.js.map +1 -1
- package/dist/src/plugin/logging-utils.d.ts +35 -1
- package/dist/src/plugin/logging-utils.d.ts.map +1 -1
- package/dist/src/plugin/logging-utils.js +98 -15
- package/dist/src/plugin/logging-utils.js.map +1 -1
- package/dist/src/plugin/model-registry.d.ts +1 -1
- package/dist/src/plugin/model-registry.js +1 -1
- package/dist/src/plugin/oauth-login.d.ts +22 -0
- package/dist/src/plugin/oauth-login.d.ts.map +1 -0
- package/dist/src/plugin/oauth-login.js +37 -0
- package/dist/src/plugin/oauth-login.js.map +1 -0
- package/dist/src/plugin/oauth-methods.d.ts +42 -0
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -0
- package/dist/src/plugin/oauth-methods.js +1284 -0
- package/dist/src/plugin/oauth-methods.js.map +1 -0
- package/dist/src/plugin/operator-settings.d.ts +40 -0
- package/dist/src/plugin/operator-settings.d.ts.map +1 -0
- package/dist/src/plugin/operator-settings.js +148 -0
- package/dist/src/plugin/operator-settings.js.map +1 -0
- package/dist/src/plugin/persist-account-pool.d.ts +37 -0
- package/dist/src/plugin/persist-account-pool.d.ts.map +1 -0
- package/dist/src/plugin/persist-account-pool.js +142 -0
- package/dist/src/plugin/persist-account-pool.js.map +1 -0
- package/dist/src/plugin/project.d.ts +1 -1
- package/dist/src/plugin/project.js +1 -1
- package/dist/src/plugin/prompt-context.d.ts.map +1 -1
- package/dist/src/plugin/prompt-context.js +11 -11
- package/dist/src/plugin/prompt-context.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +97 -41
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +273 -285
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/recovery/constants.d.ts.map +1 -1
- package/dist/src/plugin/recovery/constants.js +24 -15
- package/dist/src/plugin/recovery/constants.js.map +1 -1
- package/dist/src/plugin/recovery/index.d.ts +3 -3
- package/dist/src/plugin/recovery/index.d.ts.map +1 -1
- package/dist/src/plugin/recovery/index.js +3 -3
- package/dist/src/plugin/recovery/index.js.map +1 -1
- package/dist/src/plugin/recovery/storage.d.ts +1 -1
- package/dist/src/plugin/recovery/storage.d.ts.map +1 -1
- package/dist/src/plugin/recovery/storage.js +31 -39
- package/dist/src/plugin/recovery/storage.js.map +1 -1
- package/dist/src/plugin/recovery/types.d.ts +12 -12
- package/dist/src/plugin/recovery/types.d.ts.map +1 -1
- package/dist/src/plugin/recovery.d.ts +3 -3
- package/dist/src/plugin/recovery.d.ts.map +1 -1
- package/dist/src/plugin/recovery.js +62 -58
- package/dist/src/plugin/recovery.js.map +1 -1
- package/dist/src/plugin/refresh-queue.d.ts +5 -2
- package/dist/src/plugin/refresh-queue.d.ts.map +1 -1
- package/dist/src/plugin/refresh-queue.js +37 -15
- package/dist/src/plugin/refresh-queue.js.map +1 -1
- package/dist/src/plugin/request-helpers.d.ts +2 -1
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +458 -354
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/request.d.ts +12 -6
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +801 -390
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/rotation.d.ts +1 -168
- package/dist/src/plugin/rotation.d.ts.map +1 -1
- package/dist/src/plugin/rotation.js +1 -327
- package/dist/src/plugin/rotation.js.map +1 -1
- package/dist/src/plugin/search.d.ts.map +1 -1
- package/dist/src/plugin/search.js +39 -35
- package/dist/src/plugin/search.js.map +1 -1
- package/dist/src/plugin/server.d.ts +1 -1
- package/dist/src/plugin/server.d.ts.map +1 -1
- package/dist/src/plugin/server.js +42 -37
- package/dist/src/plugin/server.js.map +1 -1
- package/dist/src/plugin/session-context.d.ts +22 -0
- package/dist/src/plugin/session-context.d.ts.map +1 -0
- package/dist/src/plugin/session-context.js +67 -0
- package/dist/src/plugin/session-context.js.map +1 -0
- package/dist/src/plugin/storage.d.ts +59 -114
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +140 -474
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/stores/signature-store.d.ts.map +1 -1
- package/dist/src/plugin/stores/signature-store.js.map +1 -1
- package/dist/src/plugin/thinking-recovery.d.ts.map +1 -1
- package/dist/src/plugin/thinking-recovery.js +35 -33
- package/dist/src/plugin/thinking-recovery.js.map +1 -1
- package/dist/src/plugin/token.d.ts +2 -2
- package/dist/src/plugin/token.d.ts.map +1 -1
- package/dist/src/plugin/token.js +30 -21
- package/dist/src/plugin/token.js.map +1 -1
- package/dist/src/plugin/transform/cross-model-sanitizer.d.ts +1 -1
- package/dist/src/plugin/transform/cross-model-sanitizer.js +1 -1
- package/dist/src/plugin/transform/index.d.ts +1 -1
- package/dist/src/plugin/transform/index.js +1 -1
- package/dist/src/plugin/transform/model-resolver.d.ts +1 -1
- package/dist/src/plugin/transform/model-resolver.js +1 -1
- package/dist/src/plugin/transform/types.d.ts +1 -1
- package/dist/src/plugin/transform/types.js +1 -1
- package/dist/src/plugin/types.d.ts +25 -69
- package/dist/src/plugin/types.d.ts.map +1 -1
- package/dist/src/plugin/ui/ansi.d.ts.map +1 -1
- package/dist/src/plugin/ui/ansi.js.map +1 -1
- package/dist/src/plugin/ui/auth-menu.d.ts +2 -2
- package/dist/src/plugin/ui/auth-menu.d.ts.map +1 -1
- package/dist/src/plugin/ui/auth-menu.js +84 -31
- package/dist/src/plugin/ui/auth-menu.js.map +1 -1
- package/dist/src/plugin/ui/confirm.d.ts.map +1 -1
- package/dist/src/plugin/ui/confirm.js.map +1 -1
- package/dist/src/plugin/ui/model-status.d.ts +3 -3
- package/dist/src/plugin/ui/model-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/model-status.js +3 -3
- package/dist/src/plugin/ui/model-status.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts +4 -4
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +51 -48
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin/ui/select.d.ts.map +1 -1
- package/dist/src/plugin/ui/select.js +22 -12
- package/dist/src/plugin/ui/select.js.map +1 -1
- package/dist/src/plugin/version.d.ts +1 -1
- package/dist/src/plugin/version.js +1 -1
- package/dist/src/rpc/notifications.d.ts +6 -0
- package/dist/src/rpc/notifications.d.ts.map +1 -0
- package/dist/src/rpc/notifications.js +46 -0
- package/dist/src/rpc/notifications.js.map +1 -0
- package/dist/src/rpc/port-file.d.ts +13 -0
- package/dist/src/rpc/port-file.d.ts.map +1 -0
- package/dist/src/rpc/port-file.js +109 -0
- package/dist/src/rpc/port-file.js.map +1 -0
- package/dist/src/rpc/protocol.d.ts +22 -0
- package/dist/src/rpc/protocol.d.ts.map +1 -0
- package/dist/src/rpc/protocol.js +1 -0
- package/dist/src/rpc/protocol.js.map +1 -0
- package/dist/src/rpc/rpc-client.d.ts +10 -0
- package/dist/src/rpc/rpc-client.d.ts.map +1 -0
- package/dist/src/rpc/rpc-client.js +58 -0
- package/dist/src/rpc/rpc-client.js.map +1 -0
- package/dist/src/rpc/rpc-dir.d.ts +4 -0
- package/dist/src/rpc/rpc-dir.d.ts.map +1 -0
- package/dist/src/rpc/rpc-dir.js +19 -0
- package/dist/src/rpc/rpc-dir.js.map +1 -0
- package/dist/src/rpc/rpc-server.d.ts +13 -0
- package/dist/src/rpc/rpc-server.d.ts.map +1 -0
- package/dist/src/rpc/rpc-server.js +231 -0
- package/dist/src/rpc/rpc-server.js.map +1 -0
- package/dist/src/sidebar-state.d.ts +240 -0
- package/dist/src/sidebar-state.d.ts.map +1 -0
- package/dist/src/sidebar-state.js +520 -0
- package/dist/src/sidebar-state.js.map +1 -0
- package/dist/src/tui/command-dialogs.d.ts +61 -0
- package/dist/src/tui/command-dialogs.d.ts.map +1 -0
- package/dist/src/tui/command-dialogs.js +497 -0
- package/dist/src/tui/command-dialogs.js.map +1 -0
- package/dist/src/tui/file-logger.d.ts +41 -0
- package/dist/src/tui/file-logger.d.ts.map +1 -0
- package/dist/src/tui/file-logger.js +114 -0
- package/dist/src/tui/file-logger.js.map +1 -0
- package/dist/src/tui-preferences.d.ts +40 -0
- package/dist/src/tui-preferences.d.ts.map +1 -0
- package/dist/src/tui-preferences.js +328 -0
- package/dist/src/tui-preferences.js.map +1 -0
- package/dist/src/tui.d.ts +68 -0
- package/dist/src/tui.d.ts.map +1 -0
- package/dist/src/tui.js +662 -0
- package/dist/src/tui.js.map +1 -0
- package/package.json +46 -22
- package/src/plugin/command-data.ts +651 -0
- package/src/rpc/port-file.ts +143 -0
- package/src/rpc/protocol.ts +31 -0
- package/src/rpc/rpc-client.ts +102 -0
- package/src/rpc/rpc-dir.ts +24 -0
- package/src/sidebar-state.ts +717 -0
- package/src/tui/command-dialogs.tsx +699 -0
- package/src/tui/entry.mjs +74 -0
- package/src/tui/file-logger.ts +145 -0
- package/src/tui-compiled/plugin/command-data.ts +651 -0
- package/src/tui-compiled/rpc/port-file.ts +143 -0
- package/src/tui-compiled/rpc/protocol.ts +31 -0
- package/src/tui-compiled/rpc/rpc-client.ts +102 -0
- package/src/tui-compiled/rpc/rpc-dir.ts +24 -0
- package/src/tui-compiled/sidebar-state.ts +717 -0
- package/src/tui-compiled/tui/command-dialogs.tsx +659 -0
- package/src/tui-compiled/tui/file-logger.ts +145 -0
- package/src/tui-compiled/tui-preferences.ts +416 -0
- package/src/tui-compiled/tui.tsx +1150 -0
- package/src/tui-preferences.ts +416 -0
- package/src/tui.tsx +1117 -0
- package/dist/src/plugin.d.ts +0 -32
- package/dist/src/plugin.d.ts.map +0 -1
- package/dist/src/plugin.js +0 -3151
- package/dist/src/plugin.js.map +0 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Privacy-safe data service for the data-first slash-command dialogs.
|
|
3
|
+
*
|
|
4
|
+
* `/antigravity-quota` (this task) and the future `/antigravity-account`
|
|
5
|
+
* dialogs (Tasks 10-11) read from a single shared service so they
|
|
6
|
+
* never touch raw account storage, never see the email PII field, and
|
|
7
|
+
* never run quota network I/O during the dialog's open path — the
|
|
8
|
+
* Refresh action is the only path that performs a live fetch.
|
|
9
|
+
*
|
|
10
|
+
* Why this is a separate module:
|
|
11
|
+
*
|
|
12
|
+
* - `commands.ts` owns the slash-command orchestration; mixing the row
|
|
13
|
+
* projection + quota refresh logic in there would balloon the surface
|
|
14
|
+
* for what is fundamentally a small read/refresh service.
|
|
15
|
+
* - The row type (`CommandAccountRow`) is the projection that crosses
|
|
16
|
+
* the PII firewall into the dialog payload. Defining it here (next
|
|
17
|
+
* to the code that constructs it) keeps the firewall reviewable.
|
|
18
|
+
* - Tests can pin the read-vs-refresh boundary, the email redaction, and
|
|
19
|
+
* the refresh-token-keyed persistence in one file rather than chasing
|
|
20
|
+
* them across the dispatcher + RPC + apply layers.
|
|
21
|
+
*
|
|
22
|
+
* Cache-only opening contract (Task 9 operator requirement):
|
|
23
|
+
*
|
|
24
|
+
* `listAccounts()` is a pure read of the live AccountManager view
|
|
25
|
+
* the auth-loader materialized at session start. It performs
|
|
26
|
+
* ZERO quota manager calls — opening the dialog must be instant even
|
|
27
|
+
* when the network is unreachable, and quota refresh must remain an
|
|
28
|
+
* explicit user-driven action so the cached percentages never quietly
|
|
29
|
+
* rewrite themselves behind the user's back.
|
|
30
|
+
*
|
|
31
|
+
* Refresh-token-keyed persistence (Task 9 plan trap):
|
|
32
|
+
*
|
|
33
|
+
* `refreshQuota()` runs the shared quota manager across every enabled
|
|
34
|
+
* account and folds the results back into the live AccountManager +
|
|
35
|
+
* storage. Concurrent OAuth can renumber the flat `accounts[]` array
|
|
36
|
+
* between read and write, so we re-read under the lock and key the
|
|
37
|
+
* update by `refreshToken` (the canonical identity) rather than the
|
|
38
|
+
* array index. This way a successful OAuth add that lands between
|
|
39
|
+
* the read and the write cannot cause the refresh to overwrite the
|
|
40
|
+
* wrong account.
|
|
41
|
+
*/
|
|
42
|
+
import { buildSidebarMachineStateFromAccounts, setSidebarMachineState, } from '../sidebar-state';
|
|
43
|
+
/**
|
|
44
|
+
* Quota display label for each supported quota group. Kept here so the
|
|
45
|
+
* dialog and the quota manager agree on the same vocabulary.
|
|
46
|
+
*/
|
|
47
|
+
const QUOTA_GROUP_LABELS = {
|
|
48
|
+
claude: 'Claude',
|
|
49
|
+
'gemini-pro': 'Gemini Pro',
|
|
50
|
+
'gemini-flash': 'Gemini Flash',
|
|
51
|
+
'gpt-oss': 'GPT-OSS',
|
|
52
|
+
};
|
|
53
|
+
const SUPPORTED_QUOTA_KEYS = [
|
|
54
|
+
'claude',
|
|
55
|
+
'gemini-pro',
|
|
56
|
+
'gemini-flash',
|
|
57
|
+
'gpt-oss',
|
|
58
|
+
];
|
|
59
|
+
function toCommandAccountRow(entry) {
|
|
60
|
+
const cached = entry.cachedQuota;
|
|
61
|
+
const quota = [];
|
|
62
|
+
for (const key of SUPPORTED_QUOTA_KEYS) {
|
|
63
|
+
const cachedEntry = cached?.[key];
|
|
64
|
+
if (!cachedEntry)
|
|
65
|
+
continue;
|
|
66
|
+
const fraction = cachedEntry.remainingFraction;
|
|
67
|
+
const remainingPercent = typeof fraction === 'number' && Number.isFinite(fraction)
|
|
68
|
+
? Math.round(fraction * 100)
|
|
69
|
+
: null;
|
|
70
|
+
let resetAt;
|
|
71
|
+
if (typeof cachedEntry.resetTime === 'string' &&
|
|
72
|
+
cachedEntry.resetTime.length > 0) {
|
|
73
|
+
const parsed = Date.parse(cachedEntry.resetTime);
|
|
74
|
+
if (Number.isFinite(parsed))
|
|
75
|
+
resetAt = parsed;
|
|
76
|
+
}
|
|
77
|
+
quota.push({
|
|
78
|
+
key,
|
|
79
|
+
label: QUOTA_GROUP_LABELS[key],
|
|
80
|
+
remainingPercent,
|
|
81
|
+
resetAt,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const label = `Account ${entry.index + 1}`;
|
|
85
|
+
return {
|
|
86
|
+
id: `acct-${entry.index}`,
|
|
87
|
+
index: entry.index,
|
|
88
|
+
label,
|
|
89
|
+
enabled: entry.enabled,
|
|
90
|
+
current: entry.active,
|
|
91
|
+
quota,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Build the data service.
|
|
96
|
+
*
|
|
97
|
+
* The factory form (instead of a module-level singleton) keeps the
|
|
98
|
+
* service unit-testable: each test constructs its own dependencies
|
|
99
|
+
* (storage stub, quota manager stub, fixed clock) without touching
|
|
100
|
+
* the production quota path.
|
|
101
|
+
*/
|
|
102
|
+
export function createCommandDataService(options) {
|
|
103
|
+
const { accountManagerView, quotaManager, sidebarStateFile, storage, now = () => Date.now(), } = options;
|
|
104
|
+
const projectRows = () => accountManagerView.getAccounts().map(toCommandAccountRow);
|
|
105
|
+
const writeSidebar = (rows) => {
|
|
106
|
+
const accounts = rows.map((row) => {
|
|
107
|
+
const claude = row.quota.find((q) => q.key === 'claude');
|
|
108
|
+
const geminiPro = row.quota.find((q) => q.key === 'gemini-pro');
|
|
109
|
+
const geminiFlash = row.quota.find((q) => q.key === 'gemini-flash');
|
|
110
|
+
const gptOss = row.quota.find((q) => q.key === 'gpt-oss');
|
|
111
|
+
const toFraction = (q) => {
|
|
112
|
+
if (!q || q.remainingPercent == null)
|
|
113
|
+
return undefined;
|
|
114
|
+
return { remainingFraction: q.remainingPercent / 100 };
|
|
115
|
+
};
|
|
116
|
+
return {
|
|
117
|
+
index: row.index,
|
|
118
|
+
label: row.label,
|
|
119
|
+
enabled: row.enabled,
|
|
120
|
+
current: row.current,
|
|
121
|
+
cachedQuota: {
|
|
122
|
+
claude: toFraction(claude),
|
|
123
|
+
'gemini-pro': toFraction(geminiPro),
|
|
124
|
+
'gemini-flash': toFraction(geminiFlash),
|
|
125
|
+
'gpt-oss': toFraction(gptOss),
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
// Fire-and-forget — the sidebar writer is fenced by its own queue,
|
|
130
|
+
// so a transient lock contention cannot block the dialog response.
|
|
131
|
+
void setSidebarMachineState(buildSidebarMachineStateFromAccounts(accounts, { checkedAt: now() }), { stateFile: sidebarStateFile }).catch(() => {
|
|
132
|
+
// Lock contention is the only realistic failure mode; the next
|
|
133
|
+
// periodic writer will catch up.
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
return {
|
|
137
|
+
async listAccounts() {
|
|
138
|
+
return projectRows();
|
|
139
|
+
},
|
|
140
|
+
async refreshQuota() {
|
|
141
|
+
const accountsForQuota = accountManagerView.getAccountsForQuotaCheck();
|
|
142
|
+
if (accountsForQuota.length === 0) {
|
|
143
|
+
// Empty pool: still push a clean sidebar so the TUI drops any
|
|
144
|
+
// stale snapshot left over from a previous session.
|
|
145
|
+
writeSidebar([]);
|
|
146
|
+
return [];
|
|
147
|
+
}
|
|
148
|
+
const results = await quotaManager.refreshAccounts(accountsForQuota, {
|
|
149
|
+
indexFor: (account) => accountsForQuota.indexOf(account),
|
|
150
|
+
force: true,
|
|
151
|
+
});
|
|
152
|
+
const refreshedAt = now();
|
|
153
|
+
const updates = [];
|
|
154
|
+
for (const result of results) {
|
|
155
|
+
const refreshToken = result.updatedAccount?.refreshToken ??
|
|
156
|
+
accountsForQuota[result.index]?.refreshToken;
|
|
157
|
+
if (!refreshToken)
|
|
158
|
+
continue;
|
|
159
|
+
const groups = result.status === 'ok' && result.quota?.groups
|
|
160
|
+
? result.quota.groups
|
|
161
|
+
: undefined;
|
|
162
|
+
updates.push({ refreshToken, groups });
|
|
163
|
+
}
|
|
164
|
+
// Resolve live indexes only after the network request. Numeric indexes
|
|
165
|
+
// from the quota result refer to the original input array and may now
|
|
166
|
+
// identify a different account after a concurrent add/remove.
|
|
167
|
+
const liveIndexByRefreshToken = new Map();
|
|
168
|
+
for (const entry of accountManagerView.getAccounts()) {
|
|
169
|
+
liveIndexByRefreshToken.set(entry.refreshToken, entry.index);
|
|
170
|
+
}
|
|
171
|
+
let liveQuotaChanged = false;
|
|
172
|
+
for (const update of updates) {
|
|
173
|
+
const liveIndex = liveIndexByRefreshToken.get(update.refreshToken);
|
|
174
|
+
if (liveIndex === undefined || !update.groups)
|
|
175
|
+
continue;
|
|
176
|
+
accountManagerView.updateQuotaCache(liveIndex, update.groups);
|
|
177
|
+
liveQuotaChanged = true;
|
|
178
|
+
}
|
|
179
|
+
if (liveQuotaChanged)
|
|
180
|
+
accountManagerView.requestSaveToDisk();
|
|
181
|
+
// Persist by canonical refresh token against the latest locked snapshot.
|
|
182
|
+
// A removed account is skipped rather than falling back to its old index.
|
|
183
|
+
if (storage) {
|
|
184
|
+
const updateByRefreshToken = new Map(updates.map((update) => [update.refreshToken, update]));
|
|
185
|
+
const writeResult = storage.mutate((current) => ({
|
|
186
|
+
...current,
|
|
187
|
+
accounts: current.accounts.map((entry) => {
|
|
188
|
+
const update = updateByRefreshToken.get(entry.refreshToken);
|
|
189
|
+
if (!update)
|
|
190
|
+
return entry;
|
|
191
|
+
if (update.groups) {
|
|
192
|
+
return {
|
|
193
|
+
...entry,
|
|
194
|
+
cachedQuota: update.groups,
|
|
195
|
+
cachedQuotaUpdatedAt: refreshedAt,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
// Error result keeps the previous cached percentage and only
|
|
199
|
+
// records that a refresh was attempted.
|
|
200
|
+
return {
|
|
201
|
+
...entry,
|
|
202
|
+
cachedQuotaUpdatedAt: refreshedAt,
|
|
203
|
+
};
|
|
204
|
+
}),
|
|
205
|
+
}));
|
|
206
|
+
await Promise.resolve(writeResult).catch(() => {
|
|
207
|
+
// The live AccountManager already carries successful refreshes; its
|
|
208
|
+
// next save can reconcile a transient storage-lock failure.
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
// Re-read the live view post-mutate so the rows reflect the
|
|
212
|
+
// freshly persisted percentages.
|
|
213
|
+
const rows = projectRows();
|
|
214
|
+
writeSidebar(rows);
|
|
215
|
+
return rows;
|
|
216
|
+
},
|
|
217
|
+
async setCurrentAccount(index) {
|
|
218
|
+
return mutateLiveAndStorage({ action: 'setCurrent', index });
|
|
219
|
+
},
|
|
220
|
+
async toggleAccountEnabled(index) {
|
|
221
|
+
return mutateLiveAndStorage({ action: 'toggleEnabled', index });
|
|
222
|
+
},
|
|
223
|
+
async removeAccount(index) {
|
|
224
|
+
return mutateLiveAndStorage({ action: 'remove', index });
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
async function mutateLiveAndStorage(args) {
|
|
228
|
+
const { index, action } = args;
|
|
229
|
+
const target = accountManagerView.getAccounts()[index];
|
|
230
|
+
if (!target)
|
|
231
|
+
return null;
|
|
232
|
+
const refreshToken = accountManagerView.getRefreshTokenAt(index) ?? target.refreshToken;
|
|
233
|
+
if (!refreshToken)
|
|
234
|
+
return null;
|
|
235
|
+
if (action === 'toggleEnabled' &&
|
|
236
|
+
target.enabled === false &&
|
|
237
|
+
target.accountIneligible === true) {
|
|
238
|
+
throw new Error('This account is ineligible and cannot be enabled until eligibility is rechecked.');
|
|
239
|
+
}
|
|
240
|
+
if (!storage) {
|
|
241
|
+
throw new Error('CommandDataService is missing a locked-storage adapter; account mutations are disabled.');
|
|
242
|
+
}
|
|
243
|
+
let foundInStorage = false;
|
|
244
|
+
let desiredEnabled;
|
|
245
|
+
let previousEnabled;
|
|
246
|
+
await storage.mutate((current) => {
|
|
247
|
+
const tokenIdx = current.accounts.findIndex((entry) => entry.refreshToken === refreshToken);
|
|
248
|
+
if (tokenIdx === -1)
|
|
249
|
+
return current;
|
|
250
|
+
foundInStorage = true;
|
|
251
|
+
if (action === 'setCurrent') {
|
|
252
|
+
return {
|
|
253
|
+
...current,
|
|
254
|
+
activeIndex: tokenIdx,
|
|
255
|
+
activeIndexByFamily: { claude: tokenIdx, gemini: tokenIdx },
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
if (action === 'toggleEnabled') {
|
|
259
|
+
const entry = current.accounts[tokenIdx];
|
|
260
|
+
if (!entry)
|
|
261
|
+
return current;
|
|
262
|
+
previousEnabled = entry.enabled !== false;
|
|
263
|
+
desiredEnabled = entry.enabled === false;
|
|
264
|
+
if (desiredEnabled && entry.accountIneligible === true) {
|
|
265
|
+
throw new Error('This account is ineligible and cannot be enabled until eligibility is rechecked.');
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
...current,
|
|
269
|
+
accounts: current.accounts.map((account) => account.refreshToken === refreshToken
|
|
270
|
+
? { ...account, enabled: desiredEnabled }
|
|
271
|
+
: account),
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
return {
|
|
275
|
+
...current,
|
|
276
|
+
accounts: current.accounts.filter((account) => account.refreshToken !== refreshToken),
|
|
277
|
+
activeIndex: 0,
|
|
278
|
+
activeIndexByFamily: { claude: 0, gemini: 0 },
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
if (!foundInStorage)
|
|
282
|
+
return null;
|
|
283
|
+
// Re-resolve the live index by canonical identity after the awaited disk
|
|
284
|
+
// transaction. A concurrent OAuth add/remove may have shifted every index.
|
|
285
|
+
const liveIndex = accountManagerView
|
|
286
|
+
.getAccounts()
|
|
287
|
+
.findIndex((account) => account.refreshToken === refreshToken);
|
|
288
|
+
let applied = action === 'remove' && liveIndex === -1;
|
|
289
|
+
if (liveIndex !== -1) {
|
|
290
|
+
if (action === 'setCurrent') {
|
|
291
|
+
applied = accountManagerView.setAccountCurrent(liveIndex);
|
|
292
|
+
}
|
|
293
|
+
else if (action === 'toggleEnabled') {
|
|
294
|
+
applied = accountManagerView.setAccountEnabled(liveIndex, desiredEnabled === true);
|
|
295
|
+
if (!applied) {
|
|
296
|
+
applied =
|
|
297
|
+
accountManagerView.getAccounts()[liveIndex]?.enabled ===
|
|
298
|
+
desiredEnabled;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
applied = accountManagerView.removeAccountByIndex(liveIndex);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
if (!applied && action !== 'remove') {
|
|
306
|
+
if (action === 'toggleEnabled' && previousEnabled !== undefined) {
|
|
307
|
+
await storage.mutate((current) => ({
|
|
308
|
+
...current,
|
|
309
|
+
accounts: current.accounts.map((account) => account.refreshToken === refreshToken
|
|
310
|
+
? { ...account, enabled: previousEnabled }
|
|
311
|
+
: account),
|
|
312
|
+
}));
|
|
313
|
+
}
|
|
314
|
+
throw new Error('The account changed while the operation was being applied; reopen the dialog and try again.');
|
|
315
|
+
}
|
|
316
|
+
await accountManagerView.flushSaveToDisk().catch(() => {
|
|
317
|
+
// The locked storage mutation already committed; a later periodic flush
|
|
318
|
+
// can reconcile transient AccountManager lock contention.
|
|
319
|
+
});
|
|
320
|
+
const rows = projectRows();
|
|
321
|
+
writeSidebar(rows);
|
|
322
|
+
return rows;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=command-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-data.js","sourceRoot":"","sources":["../../../src/plugin/command-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EACL,oCAAoC,EAEpC,sBAAsB,GACvB,MAAM,kBAAkB,CAAA;AAiGzB;;;GAGG;AACH,MAAM,kBAAkB,GAGpB;IACF,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,YAAY;IAC1B,cAAc,EAAE,cAAc;IAC9B,SAAS,EAAE,SAAS;CACrB,CAAA;AAED,MAAM,oBAAoB,GAAG;IAC3B,QAAQ;IACR,YAAY;IACZ,cAAc;IACd,SAAS;CAC8D,CAAA;AAezE,SAAS,mBAAmB,CAAC,KAA0B;IACrD,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAA;IAChC,MAAM,KAAK,GAA+B,EAAE,CAAA;IAC5C,KAAK,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACvC,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,CAAA;QACjC,IAAI,CAAC,WAAW;YAAE,SAAQ;QAC1B,MAAM,QAAQ,GAAG,WAAW,CAAC,iBAAiB,CA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AC,IAAI,CAAC,CAAA;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slash-command wiring for the antigravity plugin.
|
|
3
|
+
*
|
|
4
|
+
* Three places must agree on the set of modal commands — keeping
|
|
5
|
+
* them in lockstep is a hard invariant:
|
|
6
|
+
*
|
|
7
|
+
* 1. `MODAL_COMMANDS` — the canonical list of `CommandModalName`s.
|
|
8
|
+
* 2. `registerAntigravityCommands` (in `./catalog.ts`) — what we
|
|
9
|
+
* register in the host `config.command.*` map so OpenCode
|
|
10
|
+
* recognises them.
|
|
11
|
+
* 3. `buildDialogPayload` (here) — the per-command dialog payload
|
|
12
|
+
* builder the TUI renders when a notification arrives.
|
|
13
|
+
*
|
|
14
|
+
* If any one drifts, a future slash command will be discoverable in
|
|
15
|
+
* the host palette but invisible to the dialog flow (or vice versa).
|
|
16
|
+
* The bidirectional three-wiring test pins this invariant.
|
|
17
|
+
*
|
|
18
|
+
* `/gemini-dump` remains a backward-compatibility alias: the host
|
|
19
|
+
* already registers the command under that name in `OpenCode` and
|
|
20
|
+
* long-running sessions may still call it. The modal name
|
|
21
|
+
* `antigravity-dump` is the canonical name; both stay registered.
|
|
22
|
+
*/
|
|
23
|
+
import type { CommandModalName } from '../rpc/protocol';
|
|
24
|
+
import type { CommandDataService } from './command-data';
|
|
25
|
+
import { type OperatorSettingsController } from './operator-settings';
|
|
26
|
+
import type { PluginClient, PluginResult } from './types';
|
|
27
|
+
export declare const ANTIGRAVITY_QUOTA_COMMAND_NAME = "antigravity-quota";
|
|
28
|
+
export declare const ANTIGRAVITY_ACCOUNT_COMMAND_NAME = "antigravity-account";
|
|
29
|
+
export declare const ANTIGRAVITY_ROUTING_COMMAND_NAME = "antigravity-routing";
|
|
30
|
+
export declare const ANTIGRAVITY_KILLSWITCH_COMMAND_NAME = "antigravity-killswitch";
|
|
31
|
+
export declare const ANTIGRAVITY_DUMP_COMMAND_NAME = "antigravity-dump";
|
|
32
|
+
export declare const ANTIGRAVITY_LOGGING_COMMAND_NAME = "antigravity-logging";
|
|
33
|
+
export declare const MODAL_COMMANDS: readonly CommandModalName[];
|
|
34
|
+
interface CommandContext {
|
|
35
|
+
sessionID: string;
|
|
36
|
+
client: PluginClient;
|
|
37
|
+
settings: OperatorSettingsController;
|
|
38
|
+
/**
|
|
39
|
+
* Optional callback invoked AFTER `applyCommand` mutates persistent
|
|
40
|
+
* state. The plugin entry injects a callback that pushes the current
|
|
41
|
+
* account pool into the sidebar so the TUI sees a fresh snapshot.
|
|
42
|
+
* Commands that need to chain side effects (e.g. account add which
|
|
43
|
+
* triggers an OAuth flow) hook their own refresh.
|
|
44
|
+
*/
|
|
45
|
+
onApplied?: () => Promise<void> | void;
|
|
46
|
+
/**
|
|
47
|
+
* Privacy-safe data service that backs the data-first dialogs. The
|
|
48
|
+
* production wiring injects one that reads from the live AccountManager
|
|
49
|
+
* + storage and refreshes through the shared quota manager; tests
|
|
50
|
+
* (and any context that does not care about quota UI) leave this
|
|
51
|
+
* undefined and the dialog falls back to the legacy placeholder.
|
|
52
|
+
*/
|
|
53
|
+
commandData?: CommandDataService;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Build the dialog payload the TUI renders for `command`.
|
|
57
|
+
*
|
|
58
|
+
* Each branch produces a self-contained payload the OpenTUI dialog tree
|
|
59
|
+
* can mount without further RPC chatter. The knobs object is the
|
|
60
|
+
* payload-specific metadata (current toggle state, available actions,
|
|
61
|
+
* default values) — knobs are intentionally stringly-typed to keep the
|
|
62
|
+
* dialog code free of per-command schema definitions.
|
|
63
|
+
*/
|
|
64
|
+
export declare function buildDialogPayload(command: CommandModalName, argumentsText: string, context: CommandContext): Promise<{
|
|
65
|
+
command: CommandModalName;
|
|
66
|
+
text: string;
|
|
67
|
+
knobs: Record<string, unknown>;
|
|
68
|
+
}>;
|
|
69
|
+
export interface ApplyRequest {
|
|
70
|
+
command: CommandModalName;
|
|
71
|
+
arguments: string;
|
|
72
|
+
sessionId?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface ApplyResult {
|
|
75
|
+
text: string;
|
|
76
|
+
knobs: Record<string, unknown>;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Apply the result of a TUI dialog back to the plugin runtime.
|
|
80
|
+
*
|
|
81
|
+
* Most commands mutate persistent operator settings (routing toggles,
|
|
82
|
+
* killswitch thresholds, log level). Account add/refresh kicks off the
|
|
83
|
+
* OAuth flow which can take up to two minutes on a fresh login — that
|
|
84
|
+
* path opts into a 120s RPC timeout. Status / toggle paths keep the
|
|
85
|
+
* default 2s timeout.
|
|
86
|
+
*
|
|
87
|
+
* The TUI's imperative dispatcher (`tui/command-dialogs.openCommandDialog`)
|
|
88
|
+
* forwards the apply `options.timeoutMs` knob into the RPC apply call
|
|
89
|
+
* so a long-running path (account add / refresh) can opt in without the
|
|
90
|
+
* dialog layer having to special-case it.
|
|
91
|
+
*/
|
|
92
|
+
export declare function applyCommand(request: ApplyRequest, context: CommandContext): Promise<ApplyResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Build a sidebar refresher bound to the supplied account-snapshot provider.
|
|
95
|
+
* The plugin entry passes `lifecycle.getAccountManager()`'s snapshot getter so
|
|
96
|
+
* every `/antigravity-*` apply that mutates persistent state also bumps the
|
|
97
|
+
* sidebar's `checkedAt`. The refresher is best-effort: a lock-contention
|
|
98
|
+
* error or missing manager is swallowed by the caller.
|
|
99
|
+
*/
|
|
100
|
+
export declare function createSidebarRefresher(getAccounts: () => Array<{
|
|
101
|
+
index: number;
|
|
102
|
+
label?: string;
|
|
103
|
+
enabled?: boolean;
|
|
104
|
+
coolingDownUntil?: number;
|
|
105
|
+
cachedQuota?: {
|
|
106
|
+
claude?: {
|
|
107
|
+
remainingFraction?: number;
|
|
108
|
+
resetTime?: string;
|
|
109
|
+
};
|
|
110
|
+
'gemini-pro'?: {
|
|
111
|
+
remainingFraction?: number;
|
|
112
|
+
resetTime?: string;
|
|
113
|
+
};
|
|
114
|
+
'gemini-flash'?: {
|
|
115
|
+
remainingFraction?: number;
|
|
116
|
+
resetTime?: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
}> | null): () => Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Optional handle for the host connection state. Tests inject a stub
|
|
122
|
+
* to force the connected/disconnected branch; production callers let
|
|
123
|
+
* the default fall through to the singleton `isTuiConnected` from
|
|
124
|
+
* `rpc/notifications`, which reports "disconnected" until a TUI drain
|
|
125
|
+
* has landed in the last `CONNECTION_TTL_MS` window.
|
|
126
|
+
*/
|
|
127
|
+
export interface CommandConnectionState {
|
|
128
|
+
isTuiConnected(sessionId?: string): boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Hook the host's `command.execute.before` to the modal commands.
|
|
132
|
+
*
|
|
133
|
+
* When a slash command is invoked, we push a notification onto the
|
|
134
|
+
* RPC queue and abort the normal prompt with the same handled
|
|
135
|
+
* sentinel the legacy `/gemini-dump` flow already uses.
|
|
136
|
+
*
|
|
137
|
+
* The `sendIgnoredMessage` fallback only fires when no TUI is
|
|
138
|
+
* listening — the only path that actually consumes the queued
|
|
139
|
+
* message. With a live TUI, push alone is enough; double-sending
|
|
140
|
+
* would otherwise render the command text as a visible chat message
|
|
141
|
+
* alongside the dialog the TUI renders.
|
|
142
|
+
*/
|
|
143
|
+
export declare function createCommandExecuteBefore(client: PluginClient, settings: OperatorSettingsController, pushNotification: (payload: Awaited<ReturnType<typeof buildDialogPayload>>, sessionId?: string) => void, commandData?: CommandDataService, connectionState?: CommandConnectionState): PluginResult['command.execute.before'];
|
|
144
|
+
/**
|
|
145
|
+
* Backward-compat wrapper that constructs a no-settings `command.execute.before`
|
|
146
|
+
* for tests that don't care about the operator settings controller. Production
|
|
147
|
+
* code wires the real controller via `createAntigravityPlugin`.
|
|
148
|
+
*/
|
|
149
|
+
export declare function createCommandExecuteBeforeForClient(client: PluginClient, commandData?: CommandDataService): PluginResult['command.execute.before'];
|
|
150
|
+
export {};
|
|
151
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/plugin/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAKvD,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAQ3E,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAA;AAG5B,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAIzD,eAAO,MAAM,8BAA8B,sBAAsB,CAAA;AACjE,eAAO,MAAM,gCAAgC,wBAAwB,CAAA;AACrE,eAAO,MAAM,gCAAgC,wBAAwB,CAAA;AACrE,eAAO,MAAM,mCAAmC,2BAA2B,CAAA;AAC3E,eAAO,MAAM,6BAA6B,qBAAqB,CAAA;AAC/D,eAAO,MAAM,gCAAgC,wBAAwB,CAAA;AAErE,eAAO,MAAM,cAAc,EAAE,SAAS,gBAAgB,EAOrD,CAAA;AA8CD,UAAU,cAAc;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,EAAE,0BAA0B,CAAA;IACpC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACtC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAA;CACjC;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,gBAAgB,EACzB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC;IACT,OAAO,EAAE,gBAAgB,CAAA;IACzB,IAAI,EAAE,M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