@cortexkit/opencode-antigravity-auth 2.2.1 → 3.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 +95 -89
- package/dist/cli.js +18469 -810
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +4079 -0
- package/dist/index.js +40914 -16441
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +6949 -0
- package/dist/server.js +50948 -0
- package/dist/server.js.map +7 -0
- package/dist/server.meta.json +7284 -0
- package/dist/src/cli.d.ts +46 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +207 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/NOTICE.txt +21 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/dist/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/dist/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/dist/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/dist/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/dist/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/dist/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/dist/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/dist/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/dist/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/dist/src/common-auth-embedded/claustrum/index.js +22 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/dist/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/dist/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/src/common-auth-embedded/commands/builtins.js +534 -0
- package/dist/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/commands/index.js +5 -0
- package/dist/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/src/common-auth-embedded/commands/menu.js +300 -0
- package/dist/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/src/common-auth-embedded/commands/model.js +16 -0
- package/dist/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/src/common-auth-embedded/commands/pi.js +206 -0
- package/dist/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/src/common-auth-embedded/commands/seam.js +301 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/dist/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/dist/src/common-auth-embedded/fs/index.js +6 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/dist/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/dist/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/src/common-auth-embedded/logger/engine.js +246 -0
- package/dist/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/src/common-auth-embedded/logger/index.js +3 -0
- package/dist/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/src/common-auth-embedded/logger/redact.js +83 -0
- package/dist/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/dist/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/opencode2/index.js +4 -0
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/dist/src/common-auth-embedded/opencode2/install.js +886 -0
- package/dist/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/dist/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/dist/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/dist/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/dist/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/dist/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/dist/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/dist/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/src/common-auth-embedded/quota/codec.js +12 -0
- package/dist/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/src/common-auth-embedded/quota/format.js +138 -0
- package/dist/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/quota/index.js +5 -0
- package/dist/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/src/common-auth-embedded/quota/map.js +105 -0
- package/dist/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/src/common-auth-embedded/quota/merge.js +162 -0
- package/dist/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/src/common-auth-embedded/quota/projection.js +134 -0
- package/dist/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/dist/src/common-auth-embedded/routing/admission.js +142 -0
- package/dist/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/routing/index.js +4 -0
- package/dist/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/dist/src/common-auth-embedded/routing/ordered.js +58 -0
- package/dist/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/dist/src/common-auth-embedded/routing/pins.js +34 -0
- package/dist/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/dist/src/common-auth-embedded/routing/sticky.js +339 -0
- package/dist/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/dist/src/common-auth-embedded/rpc/client.js +2 -0
- package/dist/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/rpc/index.js +5 -0
- package/dist/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/dist/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/dist/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/dist/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/dist/src/common-auth-embedded/source-output.json +1326 -0
- package/dist/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/src/common-auth-embedded/store/attribution.js +60 -0
- package/dist/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/src/common-auth-embedded/store/errors.js +38 -0
- package/dist/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/src/common-auth-embedded/store/hooks.js +34 -0
- package/dist/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/src/common-auth-embedded/store/identity.js +79 -0
- package/dist/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/src/common-auth-embedded/store/index.js +7 -0
- package/dist/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/src/common-auth-embedded/store/mutate.js +500 -0
- package/dist/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/src/common-auth-embedded/store/pool.js +120 -0
- package/dist/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/src/common-auth-embedded/store/provider-state.js +226 -0
- package/dist/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/src/common-auth-embedded/store/publication.js +304 -0
- package/dist/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/pull.js +143 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/dist/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/src/common-auth-embedded/store/refresh.js +225 -0
- package/dist/src/common-auth-embedded/store/reserved.js +13 -0
- package/dist/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/src/common-auth-embedded/store/rows.js +1258 -0
- package/dist/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/runtime.js +68 -0
- package/dist/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/src/common-auth-embedded/store/schema.js +754 -0
- package/dist/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/settings.js +120 -0
- package/dist/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/src/common-auth-embedded/store/torn.js +294 -0
- package/dist/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/tui/index.js +21 -0
- package/dist/src/common-auth-embedded/util/any-signal.js +42 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +4 -0
- package/dist/src/constants.js.map +1 -1
- package/dist/src/ga/proxy-guard.d.ts +120 -0
- package/dist/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/src/ga/proxy-guard.js +269 -0
- package/dist/src/ga/proxy-guard.js.map +1 -0
- package/dist/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/src/ga/rpc/protocol.js +1278 -0
- package/dist/src/ga/rpc/protocol.js.map +1 -0
- package/dist/src/ga/server/auth.d.ts +9 -0
- package/dist/src/ga/server/auth.d.ts.map +1 -0
- package/dist/src/ga/server/auth.js +37 -0
- package/dist/src/ga/server/auth.js.map +1 -0
- package/dist/src/ga/server/index.d.ts +576 -0
- package/dist/src/ga/server/index.d.ts.map +1 -0
- package/dist/src/ga/server/index.js +1012 -0
- package/dist/src/ga/server/index.js.map +1 -0
- package/dist/src/ga/tui/host-ga.d.ts +350 -0
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -0
- package/dist/src/ga/tui/host-ga.js +1242 -0
- package/dist/src/ga/tui/host-ga.js.map +1 -0
- package/dist/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/src/logging/provider-key-policy.js +11 -0
- package/dist/src/logging/provider-key-policy.js.map +1 -0
- package/dist/src/plugin/account-access.d.ts +130 -15
- package/dist/src/plugin/account-access.d.ts.map +1 -1
- package/dist/src/plugin/account-access.js +331 -129
- package/dist/src/plugin/account-access.js.map +1 -1
- package/dist/src/plugin/account-blocks.d.ts +102 -0
- package/dist/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/src/plugin/account-blocks.js +196 -0
- package/dist/src/plugin/account-blocks.js.map +1 -0
- package/dist/src/plugin/accounts.d.ts +85 -1
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +127 -3
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/auth-loader.d.ts +69 -5
- package/dist/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/src/plugin/auth-loader.js +355 -52
- package/dist/src/plugin/auth-loader.js.map +1 -1
- package/dist/src/plugin/background-quota-refresh.d.ts +54 -8
- package/dist/src/plugin/background-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-quota-refresh.js +81 -24
- package/dist/src/plugin/background-quota-refresh.js.map +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 +55 -10
- package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/src/plugin/cache/signature-cache.js +100 -41
- package/dist/src/plugin/cache/signature-cache.js.map +1 -1
- package/dist/src/plugin/cache.d.ts +80 -16
- package/dist/src/plugin/cache.d.ts.map +1 -1
- package/dist/src/plugin/cache.js +339 -200
- package/dist/src/plugin/cache.js.map +1 -1
- package/dist/src/plugin/catalog.d.ts +4 -18
- package/dist/src/plugin/catalog.d.ts.map +1 -1
- package/dist/src/plugin/catalog.js +11 -41
- package/dist/src/plugin/catalog.js.map +1 -1
- package/dist/src/plugin/command-apply.d.ts +58 -0
- package/dist/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/src/plugin/command-apply.js +168 -0
- package/dist/src/plugin/command-apply.js.map +1 -0
- package/dist/src/plugin/command-data.d.ts +1 -0
- package/dist/src/plugin/command-data.d.ts.map +1 -1
- package/dist/src/plugin/command-data.js +2 -0
- package/dist/src/plugin/command-data.js.map +1 -1
- package/dist/src/plugin/commands.d.ts +142 -132
- package/dist/src/plugin/commands.d.ts.map +1 -1
- package/dist/src/plugin/commands.js +214 -686
- package/dist/src/plugin/commands.js.map +1 -1
- package/dist/src/plugin/config/index.d.ts +1 -1
- package/dist/src/plugin/config/index.d.ts.map +1 -1
- package/dist/src/plugin/config/index.js +1 -1
- package/dist/src/plugin/config/index.js.map +1 -1
- package/dist/src/plugin/config/loader.d.ts +37 -1
- package/dist/src/plugin/config/loader.d.ts.map +1 -1
- package/dist/src/plugin/config/loader.js +64 -9
- package/dist/src/plugin/config/loader.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +2 -2
- package/dist/src/plugin/config/schema.d.ts +2 -2
- package/dist/src/plugin/config/writer.d.ts +7 -0
- package/dist/src/plugin/config/writer.d.ts.map +1 -1
- package/dist/src/plugin/config/writer.js +10 -1
- package/dist/src/plugin/config/writer.js.map +1 -1
- package/dist/src/plugin/debug.d.ts +72 -29
- package/dist/src/plugin/debug.d.ts.map +1 -1
- package/dist/src/plugin/debug.js +353 -239
- package/dist/src/plugin/debug.js.map +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts.map +1 -1
- package/dist/src/plugin/fetch/retry-state.js.map +1 -1
- package/dist/src/plugin/fetch-interceptor.d.ts +66 -11
- package/dist/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/src/plugin/fetch-interceptor.js +228 -1352
- package/dist/src/plugin/fetch-interceptor.js.map +1 -1
- package/dist/src/plugin/fetch-routing.d.ts +7 -2
- package/dist/src/plugin/fetch-routing.d.ts.map +1 -1
- package/dist/src/plugin/fetch-routing.js +7 -4
- package/dist/src/plugin/fetch-routing.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/src/plugin/ga-location-services.js +1838 -0
- package/dist/src/plugin/ga-location-services.js.map +1 -0
- package/dist/src/plugin/gemini-dump.d.ts +37 -12
- package/dist/src/plugin/gemini-dump.d.ts.map +1 -1
- package/dist/src/plugin/gemini-dump.js +42 -21
- package/dist/src/plugin/gemini-dump.js.map +1 -1
- package/dist/src/plugin/google-search-tool.d.ts +2 -1
- package/dist/src/plugin/google-search-tool.d.ts.map +1 -1
- package/dist/src/plugin/google-search-tool.js +4 -1
- package/dist/src/plugin/google-search-tool.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +505 -141
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/killswitch.d.ts +1 -2
- package/dist/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.d.ts +24 -1
- package/dist/src/plugin/lifecycle.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.js +95 -8
- package/dist/src/plugin/lifecycle.js.map +1 -1
- package/dist/src/plugin/logger.d.ts +61 -10
- package/dist/src/plugin/logger.d.ts.map +1 -1
- package/dist/src/plugin/logger.js +134 -63
- package/dist/src/plugin/logger.js.map +1 -1
- package/dist/src/plugin/neutral-types.d.ts +42 -0
- package/dist/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/src/plugin/neutral-types.js +12 -0
- package/dist/src/plugin/neutral-types.js.map +1 -0
- package/dist/src/plugin/oauth-methods.d.ts +2 -1
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/src/plugin/oauth-methods.js +173 -88
- package/dist/src/plugin/oauth-methods.js.map +1 -1
- package/dist/src/plugin/operator-settings.d.ts +34 -0
- package/dist/src/plugin/operator-settings.d.ts.map +1 -1
- package/dist/src/plugin/operator-settings.js +105 -2
- package/dist/src/plugin/operator-settings.js.map +1 -1
- package/dist/src/plugin/persist-account-pool.d.ts +63 -2
- package/dist/src/plugin/persist-account-pool.d.ts.map +1 -1
- package/dist/src/plugin/persist-account-pool.js +125 -2
- package/dist/src/plugin/persist-account-pool.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +335 -35
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +825 -95
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/refresh-queue.d.ts +35 -5
- package/dist/src/plugin/refresh-queue.d.ts.map +1 -1
- package/dist/src/plugin/refresh-queue.js +50 -16
- package/dist/src/plugin/refresh-queue.js.map +1 -1
- package/dist/src/plugin/request-helpers.d.ts +30 -5
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +82 -17
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/request.d.ts +63 -15
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +190 -60
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/session-context.d.ts.map +1 -1
- package/dist/src/plugin/session-context.js +5 -2
- package/dist/src/plugin/session-context.js.map +1 -1
- package/dist/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/src/plugin/shared/local-grant.js +19 -0
- package/dist/src/plugin/shared/local-grant.js.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.js +118 -0
- package/dist/src/plugin/shared/request-cancellation.js.map +1 -0
- package/dist/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-services.js +1743 -0
- package/dist/src/plugin/shared/request-services.js.map +1 -0
- package/dist/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/src/plugin/shared/runtime.js +345 -0
- package/dist/src/plugin/shared/runtime.js.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.js +41 -0
- package/dist/src/plugin/shared/source-sidebar.js.map +1 -0
- package/dist/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-menu.js +49 -0
- package/dist/src/plugin/shared/vault-menu.js.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.js +485 -0
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -0
- package/dist/src/plugin/storage.d.ts +127 -1
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +188 -3
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/token.d.ts +23 -1
- package/dist/src/plugin/token.d.ts.map +1 -1
- package/dist/src/plugin/token.js +117 -58
- package/dist/src/plugin/token.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts +1 -10
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +6 -42
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin/vault-activation.d.ts +11 -0
- package/dist/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/src/plugin/vault-activation.js +53 -0
- package/dist/src/plugin/vault-activation.js.map +1 -0
- package/dist/src/plugin/vault-custody.d.ts +131 -0
- package/dist/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/src/plugin/vault-custody.js +381 -0
- package/dist/src/plugin/vault-custody.js.map +1 -0
- package/dist/src/quota-presentation.d.ts +18 -0
- package/dist/src/quota-presentation.d.ts.map +1 -0
- package/dist/src/quota-presentation.js +58 -0
- package/dist/src/quota-presentation.js.map +1 -0
- package/dist/src/rpc/notifications.d.ts +2 -2
- package/dist/src/rpc/notifications.d.ts.map +1 -1
- package/dist/src/rpc/notifications.js +1 -1
- package/dist/src/rpc/notifications.js.map +1 -1
- package/dist/src/rpc/port-file.d.ts +2 -12
- package/dist/src/rpc/port-file.d.ts.map +1 -1
- package/dist/src/rpc/port-file.js +5 -107
- package/dist/src/rpc/port-file.js.map +1 -1
- package/dist/src/rpc/protocol.d.ts +47 -16
- package/dist/src/rpc/protocol.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.d.ts +27 -3
- package/dist/src/rpc/rpc-client.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.js +55 -45
- package/dist/src/rpc/rpc-client.js.map +1 -1
- package/dist/src/rpc/rpc-server.d.ts +13 -2
- package/dist/src/rpc/rpc-server.d.ts.map +1 -1
- package/dist/src/rpc/rpc-server.js +38 -212
- package/dist/src/rpc/rpc-server.js.map +1 -1
- package/dist/src/server.d.ts +30 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +29 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/sidebar-projection.d.ts +102 -0
- package/dist/src/sidebar-projection.d.ts.map +1 -0
- package/dist/src/sidebar-projection.js +146 -0
- package/dist/src/sidebar-projection.js.map +1 -0
- package/dist/src/sidebar-state.d.ts +13 -5
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +49 -16
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui/command-dialogs.d.ts +58 -52
- package/dist/src/tui/command-dialogs.d.ts.map +1 -1
- package/dist/src/tui/command-dialogs.js +379 -571
- package/dist/src/tui/command-dialogs.js.map +1 -1
- package/dist/src/tui/file-logger.d.ts +2 -3
- package/dist/src/tui/file-logger.d.ts.map +1 -1
- package/dist/src/tui/file-logger.js +21 -7
- package/dist/src/tui/file-logger.js.map +1 -1
- package/dist/src/tui/host-api.d.ts +196 -0
- package/dist/src/tui/host-api.d.ts.map +1 -0
- package/dist/src/tui/host-api.js +357 -0
- package/dist/src/tui/host-api.js.map +1 -0
- package/dist/src/tui/host-v1.d.ts +60 -0
- package/dist/src/tui/host-v1.d.ts.map +1 -0
- package/dist/src/tui/host-v1.js +147 -0
- package/dist/src/tui/host-v1.js.map +1 -0
- package/dist/src/tui/vault-setup.d.ts +98 -0
- package/dist/src/tui/vault-setup.d.ts.map +1 -0
- package/dist/src/tui/vault-setup.js +198 -0
- package/dist/src/tui/vault-setup.js.map +1 -0
- package/dist/src/tui.d.ts +4 -11
- package/dist/src/tui.d.ts.map +1 -1
- package/dist/src/tui.js +33 -75
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +380 -0
- package/dist/tui-ga-build-map.json +187 -0
- package/dist/types/src/antigravity/oauth.d.ts +2 -0
- package/dist/types/src/antigravity/oauth.d.ts.map +1 -0
- package/dist/types/src/cli.d.ts +66 -0
- package/dist/types/src/cli.d.ts.map +1 -0
- package/dist/types/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/types/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/types/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/types/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/types/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/types/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/types/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/types/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/types/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/types/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/types/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/types/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/types/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/types/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/types/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/types/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/types/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/types/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/types/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/types/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/types/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/types/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/types/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/types/src/constants.d.ts +3 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/ga/proxy-guard.d.ts +120 -0
- package/dist/types/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/types/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/ga/server/auth.d.ts +9 -0
- package/dist/types/src/ga/server/auth.d.ts.map +1 -0
- package/dist/types/src/ga/server/index.d.ts +576 -0
- package/dist/types/src/ga/server/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts +16 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts +9 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts +34 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts +25 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts.map +1 -0
- package/dist/types/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/types/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/types/src/plugin/account-access.d.ts +214 -0
- package/dist/types/src/plugin/account-access.d.ts.map +1 -0
- package/dist/types/src/plugin/account-blocks.d.ts +102 -0
- package/dist/types/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts +34 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts.map +1 -0
- package/dist/types/src/plugin/accounts.d.ts +94 -0
- package/dist/types/src/plugin/accounts.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts +2 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-transport.d.ts +2 -0
- package/dist/types/src/plugin/agy-transport.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-doctor.d.ts +30 -0
- package/dist/types/src/plugin/auth-doctor.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-drift.d.ts +13 -0
- package/dist/types/src/plugin/auth-drift.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-loader.d.ts +114 -0
- package/dist/types/src/plugin/auth-loader.d.ts.map +1 -0
- package/dist/types/src/plugin/auth.d.ts +2 -0
- package/dist/types/src/plugin/auth.d.ts.map +1 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts +192 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts.map +1 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts +156 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts.map +1 -0
- package/dist/types/src/plugin/cache.d.ts +109 -0
- package/dist/types/src/plugin/cache.d.ts.map +1 -0
- package/dist/types/src/plugin/catalog.d.ts +9 -0
- package/dist/types/src/plugin/catalog.d.ts.map +1 -0
- package/dist/types/src/plugin/cli.d.ts +44 -0
- package/dist/types/src/plugin/cli.d.ts.map +1 -0
- package/dist/types/src/plugin/command-apply.d.ts +58 -0
- package/dist/types/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/types/src/plugin/command-data.d.ts +330 -0
- package/dist/types/src/plugin/command-data.d.ts.map +1 -0
- package/dist/types/src/plugin/commands.d.ts +164 -0
- package/dist/types/src/plugin/commands.d.ts.map +1 -0
- package/dist/types/src/plugin/config/index.d.ts +16 -0
- package/dist/types/src/plugin/config/index.d.ts.map +1 -0
- package/dist/types/src/plugin/config/loader.d.ts +72 -0
- package/dist/types/src/plugin/config/loader.d.ts.map +1 -0
- package/dist/types/src/plugin/config/models.d.ts +3 -0
- package/dist/types/src/plugin/config/models.d.ts.map +1 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts +29 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/schema.d.ts +162 -0
- package/dist/types/src/plugin/config/schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/updater.d.ts +55 -0
- package/dist/types/src/plugin/config/updater.d.ts.map +1 -0
- package/dist/types/src/plugin/config/writer.d.ts +41 -0
- package/dist/types/src/plugin/config/writer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts +3 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts +12 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts +34 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts.map +1 -0
- package/dist/types/src/plugin/debug.d.ts +144 -0
- package/dist/types/src/plugin/debug.d.ts.map +1 -0
- package/dist/types/src/plugin/dependencies.d.ts +129 -0
- package/dist/types/src/plugin/dependencies.d.ts.map +1 -0
- package/dist/types/src/plugin/errors.d.ts +55 -0
- package/dist/types/src/plugin/errors.d.ts.map +1 -0
- package/dist/types/src/plugin/event-handler.d.ts +53 -0
- package/dist/types/src/plugin/event-handler.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts +61 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts +30 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts +114 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-routing.d.ts +31 -0
- package/dist/types/src/plugin/fetch-routing.d.ts.map +1 -0
- package/dist/types/src/plugin/fingerprint.d.ts +2 -0
- package/dist/types/src/plugin/fingerprint.d.ts.map +1 -0
- package/dist/types/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/types/src/plugin/gemini-dump.d.ts +72 -0
- package/dist/types/src/plugin/gemini-dump.d.ts.map +1 -0
- package/dist/types/src/plugin/google-search-tool.d.ts +10 -0
- package/dist/types/src/plugin/google-search-tool.d.ts.map +1 -0
- package/dist/types/src/plugin/image-saver.d.ts +6 -0
- package/dist/types/src/plugin/image-saver.d.ts.map +1 -0
- package/dist/types/src/plugin/index.d.ts +30 -0
- package/dist/types/src/plugin/index.d.ts.map +1 -0
- package/dist/types/src/plugin/killswitch.d.ts +93 -0
- package/dist/types/src/plugin/killswitch.d.ts.map +1 -0
- package/dist/types/src/plugin/lifecycle.d.ts +63 -0
- package/dist/types/src/plugin/lifecycle.d.ts.map +1 -0
- package/dist/types/src/plugin/logger.d.ts +83 -0
- package/dist/types/src/plugin/logger.d.ts.map +1 -0
- package/dist/types/src/plugin/logging-utils.d.ts +57 -0
- package/dist/types/src/plugin/logging-utils.d.ts.map +1 -0
- package/dist/types/src/plugin/model-registry.d.ts +2 -0
- package/dist/types/src/plugin/model-registry.d.ts.map +1 -0
- package/dist/types/src/plugin/neutral-types.d.ts +42 -0
- package/dist/types/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-login.d.ts +22 -0
- package/dist/types/src/plugin/oauth-login.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-methods.d.ts +43 -0
- package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -0
- package/dist/types/src/plugin/operator-settings.d.ts +74 -0
- package/dist/types/src/plugin/operator-settings.d.ts.map +1 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts +98 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts.map +1 -0
- package/dist/types/src/plugin/project.d.ts +2 -0
- package/dist/types/src/plugin/project.d.ts.map +1 -0
- package/dist/types/src/plugin/prompt-context.d.ts +18 -0
- package/dist/types/src/plugin/prompt-context.d.ts.map +1 -0
- package/dist/types/src/plugin/quota.d.ts +441 -0
- package/dist/types/src/plugin/quota.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/constants.d.ts +22 -0
- package/dist/types/src/plugin/recovery/constants.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/storage.d.ts +24 -0
- package/dist/types/src/plugin/recovery/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/types.d.ts +116 -0
- package/dist/types/src/plugin/recovery/types.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery.d.ts +61 -0
- package/dist/types/src/plugin/recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/refresh-queue.d.ts +133 -0
- package/dist/types/src/plugin/refresh-queue.d.ts.map +1 -0
- package/dist/types/src/plugin/request-helpers.d.ts +304 -0
- package/dist/types/src/plugin/request-helpers.d.ts.map +1 -0
- package/dist/types/src/plugin/request.d.ts +161 -0
- package/dist/types/src/plugin/request.d.ts.map +1 -0
- package/dist/types/src/plugin/rotation.d.ts +2 -0
- package/dist/types/src/plugin/rotation.d.ts.map +1 -0
- package/dist/types/src/plugin/search.d.ts +25 -0
- package/dist/types/src/plugin/search.d.ts.map +1 -0
- package/dist/types/src/plugin/server.d.ts +23 -0
- package/dist/types/src/plugin/server.d.ts.map +1 -0
- package/dist/types/src/plugin/session-context.d.ts +22 -0
- package/dist/types/src/plugin/session-context.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/types/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/types/src/plugin/storage.d.ts +221 -0
- package/dist/types/src/plugin/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts +5 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts.map +1 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts +90 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/token.d.ts +41 -0
- package/dist/types/src/plugin/token.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts +2 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/index.d.ts +2 -0
- package/dist/types/src/plugin/transform/index.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts +2 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/types.d.ts +2 -0
- package/dist/types/src/plugin/transform/types.d.ts.map +1 -0
- package/dist/types/src/plugin/types.d.ts +36 -0
- package/dist/types/src/plugin/types.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/ansi.d.ts +32 -0
- package/dist/types/src/plugin/ui/ansi.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts +59 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/confirm.d.ts +2 -0
- package/dist/types/src/plugin/ui/confirm.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts +73 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/select.d.ts +23 -0
- package/dist/types/src/plugin/ui/select.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-activation.d.ts +11 -0
- package/dist/types/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-custody.d.ts +131 -0
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/types/src/plugin/version.d.ts +2 -0
- package/dist/types/src/plugin/version.d.ts.map +1 -0
- package/dist/types/src/quota-presentation.d.ts +18 -0
- package/dist/types/src/quota-presentation.d.ts.map +1 -0
- package/dist/types/src/rpc/notifications.d.ts +6 -0
- package/dist/types/src/rpc/notifications.d.ts.map +1 -0
- package/dist/types/src/rpc/protocol.d.ts +53 -0
- package/dist/types/src/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-dir.d.ts +4 -0
- package/dist/types/src/rpc/rpc-dir.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-server.d.ts +24 -0
- package/dist/types/src/rpc/rpc-server.d.ts.map +1 -0
- package/dist/types/src/server.d.ts +30 -0
- package/dist/types/src/server.d.ts.map +1 -0
- package/dist/types/src/sidebar-state.d.ts +365 -0
- package/dist/types/src/sidebar-state.d.ts.map +1 -0
- package/dist/types/src/tui/host-api.d.ts +196 -0
- package/dist/types/src/tui/host-api.d.ts.map +1 -0
- package/package.json +45 -18
- package/server.js +6 -0
- package/src/common-auth-embedded/NOTICE.txt +21 -0
- package/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/src/common-auth-embedded/claustrum/index.js +22 -0
- package/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/src/common-auth-embedded/commands/builtins.js +534 -0
- package/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/src/common-auth-embedded/commands/index.js +5 -0
- package/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/src/common-auth-embedded/commands/menu.js +300 -0
- package/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/src/common-auth-embedded/commands/model.js +16 -0
- package/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/src/common-auth-embedded/commands/pi.js +206 -0
- package/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/src/common-auth-embedded/commands/seam.js +301 -0
- package/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/src/common-auth-embedded/fs/index.js +6 -0
- package/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/src/common-auth-embedded/logger/engine.js +246 -0
- package/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/src/common-auth-embedded/logger/index.js +3 -0
- package/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/src/common-auth-embedded/logger/redact.js +83 -0
- package/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/src/common-auth-embedded/opencode2/index.js +4 -0
- package/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/src/common-auth-embedded/opencode2/install.js +886 -0
- package/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/src/common-auth-embedded/quota/codec.js +12 -0
- package/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/src/common-auth-embedded/quota/format.js +138 -0
- package/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/src/common-auth-embedded/quota/index.js +5 -0
- package/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/src/common-auth-embedded/quota/map.js +105 -0
- package/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/src/common-auth-embedded/quota/merge.js +162 -0
- package/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/src/common-auth-embedded/quota/projection.js +134 -0
- package/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/src/common-auth-embedded/routing/admission.js +142 -0
- package/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/src/common-auth-embedded/routing/index.js +4 -0
- package/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/src/common-auth-embedded/routing/ordered.js +58 -0
- package/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/src/common-auth-embedded/routing/pins.js +34 -0
- package/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/src/common-auth-embedded/routing/sticky.js +339 -0
- package/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/src/common-auth-embedded/rpc/client.js +2 -0
- package/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/src/common-auth-embedded/rpc/index.js +5 -0
- package/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/src/common-auth-embedded/source-output.json +1326 -0
- package/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/src/common-auth-embedded/store/attribution.js +60 -0
- package/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/src/common-auth-embedded/store/errors.js +38 -0
- package/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/src/common-auth-embedded/store/hooks.js +34 -0
- package/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/src/common-auth-embedded/store/identity.js +79 -0
- package/src/common-auth-embedded/store/index.d.ts +21 -0
- package/src/common-auth-embedded/store/index.js +7 -0
- package/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/src/common-auth-embedded/store/mutate.js +500 -0
- package/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/src/common-auth-embedded/store/pool.js +120 -0
- package/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/src/common-auth-embedded/store/provider-state.js +226 -0
- package/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/src/common-auth-embedded/store/publication.js +304 -0
- package/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/src/common-auth-embedded/store/pull.js +143 -0
- package/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/src/common-auth-embedded/store/refresh.js +225 -0
- package/src/common-auth-embedded/store/reserved.js +13 -0
- package/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/src/common-auth-embedded/store/rows.js +1258 -0
- package/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/src/common-auth-embedded/store/runtime.js +68 -0
- package/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/src/common-auth-embedded/store/schema.js +754 -0
- package/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/src/common-auth-embedded/store/settings.js +120 -0
- package/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/src/common-auth-embedded/store/torn.js +294 -0
- package/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/src/common-auth-embedded/tui/index.js +21 -0
- package/src/common-auth-embedded/util/any-signal.js +42 -0
- package/src/plugin/command-data.ts +3 -0
- package/src/rpc/port-file.ts +6 -140
- package/src/rpc/protocol.ts +59 -24
- package/src/rpc/rpc-client.ts +101 -71
- package/src/sidebar-state.ts +82 -24
- package/src/tui/command-dialogs.tsx +412 -776
- package/src/tui/entry.d.mts +17 -0
- package/src/tui/entry.mjs +34 -66
- package/src/tui/file-logger.ts +22 -7
- package/src/tui-compiled/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-compiled/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-compiled/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-compiled/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-compiled/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-compiled/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-compiled/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-compiled/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-compiled/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-compiled/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-compiled/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-compiled/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-compiled/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-compiled/logging/provider-key-policy.js +3 -0
- package/src/tui-compiled/quota-presentation.js +42 -0
- package/src/tui-compiled/rpc/rpc-client.js +35 -0
- package/src/tui-compiled/rpc/rpc-dir.js +13 -0
- package/src/tui-compiled/selector.js +21 -0
- package/src/tui-compiled/sidebar-state.js +401 -0
- package/src/tui-compiled/tui/command-dialogs.js +424 -0
- package/src/tui-compiled/tui/file-logger.js +73 -0
- package/src/tui-compiled/tui/host-api.js +269 -0
- package/src/tui-compiled/tui/host-v1.js +228 -0
- package/src/tui-compiled/tui-preferences.js +230 -0
- package/src/tui-compiled/{tui.tsx → tui.js} +140 -231
- package/src/tui-ga-compiled/host-ga.js +1304 -0
- package/src/tui-ga-compiled/selector.js +21 -0
- package/src/tui-ga-compiled/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-compiled/shared/0e19a88ff3535906-command-dialogs.js +424 -0
- package/src/tui-ga-compiled/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-compiled/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-compiled/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-compiled/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-compiled/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-ga-raw/host-ga.tsx +1740 -0
- package/src/tui-ga-raw/selector.js +21 -0
- package/src/tui-ga-raw/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-raw/shared/0e19a88ff3535906-command-dialogs.tsx +468 -0
- package/src/tui-ga-raw/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-raw/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-raw/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-raw/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-raw/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-raw/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-raw/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-raw/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-raw/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-raw/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-raw/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-raw/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-raw/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-raw/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-raw/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-raw/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-raw/logging/provider-key-policy.js +3 -0
- package/src/tui-raw/quota-presentation.js +42 -0
- package/src/tui-raw/rpc/rpc-client.js +35 -0
- package/src/tui-raw/rpc/rpc-dir.js +13 -0
- package/src/tui-raw/selector.js +21 -0
- package/src/tui-raw/sidebar-state.js +401 -0
- package/src/tui-raw/tui/command-dialogs.tsx +468 -0
- package/src/tui-raw/tui/file-logger.js +73 -0
- package/src/tui-raw/tui/host-api.js +269 -0
- package/src/tui-raw/tui/host-v1.tsx +249 -0
- package/src/tui-raw/tui-preferences.js +230 -0
- package/src/tui-raw/tui.tsx +1088 -0
- package/src/tui.tsx +58 -141
- package/tui.js +6 -0
- package/src/tui-compiled/plugin/command-data.ts +0 -931
- package/src/tui-compiled/rpc/port-file.ts +0 -143
- package/src/tui-compiled/rpc/protocol.ts +0 -31
- package/src/tui-compiled/rpc/rpc-client.ts +0 -102
- package/src/tui-compiled/rpc/rpc-dir.ts +0 -24
- package/src/tui-compiled/sidebar-state.ts +0 -991
- package/src/tui-compiled/tui/command-dialogs.tsx +0 -779
- package/src/tui-compiled/tui/file-logger.ts +0 -145
- package/src/tui-compiled/tui-preferences.ts +0 -416
|
@@ -1,595 +1,403 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/solid/jsx-runtime";
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* The `/antigravity` drawer: one renderer for the server's command menu,
|
|
3
|
+
* shared by the OpenCode 1 and OpenCode GA TUIs.
|
|
4
4
|
*
|
|
5
|
-
* The
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
5
|
+
* The server builds the whole menu with the shared command menu of
|
|
6
|
+
* `@cortexkit/common-auth/commands`: Accounts, Quota, Routing, Limits
|
|
7
|
+
* (killswitch), Cache, Diagnostics (logging and wire dump) and the plugin's
|
|
8
|
+
* extras (vault setup), each with its read-only lines, its items, and its
|
|
9
|
+
* actions with their typed inputs and confirmations. This file only walks
|
|
10
|
+
* that payload through the host's dialogs and sends back which action the
|
|
11
|
+
* user chose, by the opaque section, item and action ids the server gave.
|
|
12
|
+
* It never builds an account target of its own, never looks an account up
|
|
13
|
+
* by position, and never retries a choice against a different target: an id
|
|
14
|
+
* the server no longer knows comes back as a refused apply and the user sees
|
|
15
|
+
* the server's message.
|
|
16
|
+
*
|
|
17
|
+
* Every redraw after an apply uses the menu that apply returned, which the
|
|
18
|
+
* server built fresh for that answer; settings shown here are never a
|
|
19
|
+
* replay of an earlier answer.
|
|
20
|
+
*
|
|
21
|
+
* The drawer talks to the host only through `MenuUi` (dialog primitives as
|
|
22
|
+
* promises) and `MenuApply` (the transport), so the same code runs on both
|
|
23
|
+
* hosts. Nothing here writes to the terminal or picks colors.
|
|
12
24
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
if (payload.command === 'antigravity-logging') {
|
|
19
|
-
renderLoggingDialog(api, payload, apply);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (payload.command === 'antigravity-quota') {
|
|
23
|
-
throw new Error('antigravity-quota is rendered by the TUI quota panel');
|
|
24
|
-
}
|
|
25
|
-
if (payload.command === 'antigravity-account') {
|
|
26
|
-
renderAccountDialog(api, payload, apply);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (payload.command === 'antigravity-routing') {
|
|
30
|
-
renderRoutingDialog(api, payload, apply);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (payload.command === 'antigravity-killswitch') {
|
|
34
|
-
renderKillswitchDialog(api, payload, apply);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const exhaustiveCheck = payload.command;
|
|
38
|
-
throw new Error(`Unknown command ${exhaustiveCheck}`);
|
|
39
|
-
}
|
|
40
|
-
// ---------------------------------------------------------------------------
|
|
41
|
-
// Fully wired branches — non-data-first dialogs.
|
|
42
|
-
// ---------------------------------------------------------------------------
|
|
25
|
+
import { MENU_REFUSED_TEXT, } from './host-api';
|
|
26
|
+
const BACK = 'back';
|
|
27
|
+
/** Text longer than this, or with a line break, is shown in full, not toasted. */
|
|
28
|
+
const TOAST_MAX_LENGTH = 120;
|
|
43
29
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* dialog. Status is a read-only check that still goes through apply so
|
|
47
|
-
* the dump helper runs once and reports the current state.
|
|
30
|
+
* Raised by a transport when an answer fails validation, so the drawer can
|
|
31
|
+
* tell a refused answer from an unreachable server.
|
|
48
32
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
description: 'Write request and response bodies to the dump dir.',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
title: 'Turn dump off',
|
|
60
|
-
value: 'off',
|
|
61
|
-
description: 'Stop writing new dump files.',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
title: 'Show dump status',
|
|
65
|
-
value: 'status',
|
|
66
|
-
description: 'Display whether dumps are enabled and where they go.',
|
|
67
|
-
},
|
|
68
|
-
], onSelect: (option) => {
|
|
69
|
-
void apply('antigravity-dump', String(option.value)).then((result) => {
|
|
70
|
-
api.ui.toast({ message: result.text });
|
|
71
|
-
api.ui.dialog.clear();
|
|
72
|
-
});
|
|
73
|
-
} })));
|
|
33
|
+
export class MenuRefusedError extends Error {
|
|
34
|
+
issues;
|
|
35
|
+
constructor(issues) {
|
|
36
|
+
super(MENU_REFUSED_TEXT);
|
|
37
|
+
this.issues = issues;
|
|
38
|
+
this.name = 'MenuRefusedError';
|
|
39
|
+
}
|
|
74
40
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
* forwards the level as the apply arg; the apply path persists it
|
|
78
|
-
* through `OperatorSettingsController` and toasts the resolution text.
|
|
79
|
-
*/
|
|
80
|
-
function renderLoggingDialog(api, payload, apply) {
|
|
81
|
-
const DialogSelect = (api.ui.DialogSelect);
|
|
82
|
-
const current = payload.knobs.log_level ?? 'info';
|
|
83
|
-
api.ui.dialog.setSize('xlarge');
|
|
84
|
-
api.ui.dialog.replace(() => (_jsx(DialogSelect, { title: 'Antigravity logging', current: current, options: [
|
|
85
|
-
{ title: 'Error', value: 'error', description: 'Errors only.' },
|
|
86
|
-
{ title: 'Warn', value: 'warn', description: 'Warnings and errors.' },
|
|
87
|
-
{
|
|
88
|
-
title: 'Info',
|
|
89
|
-
value: 'info',
|
|
90
|
-
description: 'Default. Includes informational events.',
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
title: 'Debug',
|
|
94
|
-
value: 'debug',
|
|
95
|
-
description: 'Includes debug-level events.',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
title: 'Trace',
|
|
99
|
-
value: 'trace',
|
|
100
|
-
description: 'Most verbose — every diagnostic event.',
|
|
101
|
-
},
|
|
102
|
-
], onSelect: (option) => {
|
|
103
|
-
void apply('antigravity-logging', String(option.value)).then((result) => {
|
|
104
|
-
api.ui.toast({ message: result.text });
|
|
105
|
-
api.ui.dialog.clear();
|
|
106
|
-
});
|
|
107
|
-
} })));
|
|
41
|
+
function factLines(facts) {
|
|
42
|
+
return Object.entries(facts ?? {}).map(([name, value]) => `${name}: ${typeof value === 'string' ? value : JSON.stringify(value)}`);
|
|
108
43
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
44
|
+
/** One option per section, in the order the menu gives them. */
|
|
45
|
+
export function sectionListOptions(menu) {
|
|
46
|
+
return menu.sections.map((section) => ({
|
|
47
|
+
title: section.title,
|
|
48
|
+
value: `section:${section.id}`,
|
|
49
|
+
...(section.lines[0] ? { description: section.lines[0] } : {}),
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
/** Status text is a group header; every option navigates or runs an action. */
|
|
53
|
+
export function sectionOptions(section) {
|
|
54
|
+
const header = [
|
|
55
|
+
...section.lines,
|
|
56
|
+
...factLines(section.facts),
|
|
57
|
+
...section.items
|
|
58
|
+
.filter((item) => item.actions.length === 0)
|
|
59
|
+
.map((item) => [
|
|
60
|
+
item.group,
|
|
61
|
+
[item.label, item.status].filter(Boolean).join(' · '),
|
|
62
|
+
item.detail,
|
|
63
|
+
...factLines(item.facts),
|
|
64
|
+
]
|
|
65
|
+
.filter(Boolean)
|
|
66
|
+
.join('\n')),
|
|
67
|
+
];
|
|
68
|
+
const options = [
|
|
69
|
+
...section.items
|
|
70
|
+
.filter((item) => item.actions.length > 0)
|
|
71
|
+
.map((item) => ({
|
|
72
|
+
title: item.label,
|
|
73
|
+
value: `item:${item.id}`,
|
|
74
|
+
...(item.detail ? { description: item.detail } : {}),
|
|
75
|
+
...(item.group ? { category: item.group } : {}),
|
|
76
|
+
...(item.status ? { footer: item.status } : {}),
|
|
77
|
+
})),
|
|
78
|
+
...section.actions.map((action) => ({
|
|
79
|
+
title: action.label,
|
|
80
|
+
value: `action:${action.id}`,
|
|
81
|
+
...(action.description ? { description: action.description } : {}),
|
|
82
|
+
...(action.group ? { category: action.group } : {}),
|
|
83
|
+
})),
|
|
84
|
+
{ title: 'Back', value: BACK },
|
|
85
|
+
];
|
|
86
|
+
const first = options[0];
|
|
87
|
+
if (!first || header.length === 0)
|
|
88
|
+
return options;
|
|
89
|
+
const category = [...header, first.category].filter(Boolean).join('\n');
|
|
90
|
+
let firstGroup = true;
|
|
91
|
+
return options.map((option) => {
|
|
92
|
+
if (option.category !== first.category)
|
|
93
|
+
firstGroup = false;
|
|
94
|
+
return firstGroup ? { ...option, category } : option;
|
|
121
95
|
});
|
|
122
|
-
|
|
96
|
+
}
|
|
97
|
+
/** Item context stays in descriptions, never in rows that cannot be acted on. */
|
|
98
|
+
export function itemOptions(item) {
|
|
99
|
+
const detail = [item.detail, ...factLines(item.facts)]
|
|
100
|
+
.filter(Boolean)
|
|
101
|
+
.join(' · ');
|
|
102
|
+
return [
|
|
103
|
+
...item.actions.map((action) => ({
|
|
104
|
+
title: action.label,
|
|
105
|
+
value: `action:${action.id}`,
|
|
106
|
+
...(detail || action.description
|
|
107
|
+
? {
|
|
108
|
+
description: [detail, action.description]
|
|
109
|
+
.filter(Boolean)
|
|
110
|
+
.join(' · '),
|
|
111
|
+
}
|
|
112
|
+
: {}),
|
|
113
|
+
...(action.group ? { category: action.group } : {}),
|
|
114
|
+
})),
|
|
115
|
+
{ title: 'Back', value: BACK },
|
|
116
|
+
];
|
|
123
117
|
}
|
|
124
118
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* actions: Add account… and one drill-in entry per row. Drill-in
|
|
130
|
-
* navigates to a row-level subdialog that exposes toggle / set-current
|
|
131
|
-
* / remove with a DialogConfirm gate for the destructive path.
|
|
132
|
-
*
|
|
133
|
-
* Each action calls `apply('antigravity-account', '<verb> <index>')`,
|
|
134
|
-
* which the apply path translates into a locked-storage mutation.
|
|
135
|
-
* The service returns fresh `CommandAccountRow[]`; the dialog mutates
|
|
136
|
-
* its closed-over payload and re-renders via `renderMain()` so the
|
|
137
|
-
* user never sees a clear-then-redraw gap.
|
|
119
|
+
* The value a typed `number` or `text` input sends. Empty is `null` (the
|
|
120
|
+
* action reads that as "leave unset"); a number input sends a number when
|
|
121
|
+
* the text parses as one and the text otherwise, so the server can say what
|
|
122
|
+
* is wrong with it.
|
|
138
123
|
*/
|
|
139
|
-
function
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const rowsFromKnobs = () => {
|
|
143
|
-
const raw = payload.knobs.accounts;
|
|
144
|
-
return Array.isArray(raw) ? raw : [];
|
|
145
|
-
};
|
|
146
|
-
const runApply = async (args, options) => {
|
|
147
|
-
const result = await apply('antigravity-account', args, options);
|
|
148
|
-
api.ui.toast({ message: result.text });
|
|
149
|
-
const next = result.knobs.accounts;
|
|
150
|
-
if (Array.isArray(next)) {
|
|
151
|
-
payload.knobs = {
|
|
152
|
-
...payload.knobs,
|
|
153
|
-
accounts: next,
|
|
154
|
-
};
|
|
155
|
-
renderMain();
|
|
156
|
-
return next;
|
|
157
|
-
}
|
|
158
|
-
renderMain();
|
|
124
|
+
export function promptValue(knob, raw) {
|
|
125
|
+
const text = raw.trim();
|
|
126
|
+
if (text === '')
|
|
159
127
|
return null;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
? `add-oauth-finish ${code} --label ${label}`
|
|
177
|
-
: `add-oauth-finish ${code}`;
|
|
178
|
-
void apply('antigravity-account', args, { timeoutMs: 120_000 })
|
|
179
|
-
.then((result) => {
|
|
180
|
-
api.ui.toast({ message: result.text });
|
|
181
|
-
updateAccounts(result.knobs);
|
|
182
|
-
renderMain();
|
|
183
|
-
})
|
|
184
|
-
.catch(() => {
|
|
185
|
-
api.ui.toast({ message: 'OAuth account add failed' });
|
|
186
|
-
renderMain();
|
|
187
|
-
});
|
|
188
|
-
}, onCancel: () => openOAuthCodePrompt(oauthUrl) })));
|
|
189
|
-
};
|
|
190
|
-
const openOAuthCodePrompt = (oauthUrl) => {
|
|
191
|
-
const DialogPrompt = api.ui.DialogPrompt;
|
|
192
|
-
api.ui.dialog.setSize('xlarge');
|
|
193
|
-
api.ui.dialog.replace(() => (_jsx(DialogPrompt, { title: 'OAuth sign-in \u2014 enter code', description: () => (_jsx("text", { children: "After signing in, paste the full callback URL or authorization code." })), placeholder: 'Paste callback URL or code here', value: '', onConfirm: (value) => {
|
|
194
|
-
const code = value.trim();
|
|
195
|
-
if (!code) {
|
|
196
|
-
// Empty submit must keep the user inside the flow, not
|
|
197
|
-
// silently drop them back to the account list. Surface the
|
|
198
|
-
// validation message and reopen the same prompt so the
|
|
199
|
-
// user can paste again.
|
|
200
|
-
api.ui.toast({
|
|
201
|
-
message: 'Please paste the callback URL or authorization code.',
|
|
202
|
-
});
|
|
203
|
-
openOAuthCodePrompt(oauthUrl);
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
openOAuthLabelPrompt(code, oauthUrl);
|
|
207
|
-
}, onCancel: () => openOAuthUrlScreen(oauthUrl) })));
|
|
208
|
-
};
|
|
209
|
-
const openOAuthUrlScreen = (oauthUrl) => {
|
|
210
|
-
const DialogSelect = (api.ui.DialogSelect);
|
|
211
|
-
api.ui.dialog.setSize('xlarge');
|
|
212
|
-
api.ui.dialog.replace(() => (_jsx(DialogSelect, { title: 'OAuth sign-in', options: [
|
|
213
|
-
{
|
|
214
|
-
title: 'Copy URL to clipboard',
|
|
215
|
-
value: 'copy',
|
|
216
|
-
description: oauthUrl,
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
title: 'Enter sign-in code',
|
|
220
|
-
value: 'code',
|
|
221
|
-
description: 'Open the URL in your browser, sign in, then paste the callback URL or code.',
|
|
222
|
-
},
|
|
223
|
-
{ title: 'Cancel', value: 'cancel' },
|
|
224
|
-
], onSelect: (option) => {
|
|
225
|
-
if (option.value === 'cancel') {
|
|
226
|
-
renderMain();
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
if (option.value === 'copy') {
|
|
230
|
-
const copied = api.renderer.copyToClipboardOSC52(oauthUrl);
|
|
231
|
-
api.ui.toast({
|
|
232
|
-
message: copied
|
|
233
|
-
? 'URL copied to clipboard'
|
|
234
|
-
: 'Copy unavailable — select the URL text above to copy',
|
|
235
|
-
});
|
|
236
|
-
openOAuthUrlScreen(oauthUrl);
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
openOAuthCodePrompt(oauthUrl);
|
|
240
|
-
} })));
|
|
241
|
-
};
|
|
242
|
-
const openAddOAuthStart = () => {
|
|
243
|
-
void apply('antigravity-account', 'add-oauth-start', {
|
|
244
|
-
timeoutMs: 120_000,
|
|
245
|
-
})
|
|
246
|
-
.then((result) => {
|
|
247
|
-
updateAccounts(result.knobs);
|
|
248
|
-
const oauthUrl = result.knobs.oauthUrl;
|
|
249
|
-
if (typeof oauthUrl === 'string' && oauthUrl.length > 0) {
|
|
250
|
-
openOAuthUrlScreen(oauthUrl);
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
api.ui.toast({ message: result.text });
|
|
254
|
-
renderMain();
|
|
255
|
-
})
|
|
256
|
-
.catch(() => {
|
|
257
|
-
api.ui.toast({ message: 'OAuth account add failed' });
|
|
258
|
-
renderMain();
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
const renderManageRow = (row) => {
|
|
262
|
-
const DialogSelect = (api.ui.DialogSelect);
|
|
263
|
-
api.ui.dialog.setSize('xlarge');
|
|
264
|
-
api.ui.dialog.replace(() => (_jsxs("box", { flexDirection: 'column', padding: 1, width: '100%', children: [_jsx("text", { children: row.label }), _jsx("text", { children: row.quota.length === 0
|
|
265
|
-
? 'no cached quota'
|
|
266
|
-
: row.quota
|
|
267
|
-
.map((q) => q.remainingPercent == null
|
|
268
|
-
? `${q.label} –%`
|
|
269
|
-
: `${q.label} ${q.remainingPercent}%`)
|
|
270
|
-
.join(', ') }), _jsx("box", { marginTop: 1, children: _jsx(DialogSelect, { title: `Manage ${row.label}`, options: [
|
|
271
|
-
{
|
|
272
|
-
title: row.enabled ? 'Disable account' : 'Enable account',
|
|
273
|
-
value: `toggle ${row.index}`,
|
|
274
|
-
description: row.enabled
|
|
275
|
-
? 'Skip this account in rotation when its quota is low.'
|
|
276
|
-
: 'Include this account in rotation again.',
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
title: 'Set as current',
|
|
280
|
-
value: `current ${row.index}`,
|
|
281
|
-
description: 'Pin this account as the active Claude + Gemini choice.',
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
title: 'Remove account…',
|
|
285
|
-
value: `__remove_prompt__ ${row.index}`,
|
|
286
|
-
description: 'Permanently delete this account from the local pool.',
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
title: 'Back',
|
|
290
|
-
value: '__back__',
|
|
291
|
-
description: 'Return to the account list.',
|
|
292
|
-
},
|
|
293
|
-
], onSelect: (option) => {
|
|
294
|
-
const raw = String(option.value);
|
|
295
|
-
if (raw === '__back__') {
|
|
296
|
-
renderMain();
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
if (raw.startsWith('__remove_prompt__ ')) {
|
|
300
|
-
const targetIndex = Number.parseInt(raw.split(' ')[1] ?? '', 10);
|
|
301
|
-
promptRemove(targetIndex);
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
if (raw.startsWith('toggle ') || raw.startsWith('current ')) {
|
|
305
|
-
void runApply(raw, { timeoutMs: 2_000 }).catch(() => {
|
|
306
|
-
api.ui.toast({
|
|
307
|
-
message: `${row.label}: action failed`,
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
api.ui.toast({
|
|
313
|
-
message: `${row.label}: unknown action`,
|
|
314
|
-
});
|
|
315
|
-
} }) })] })));
|
|
316
|
-
};
|
|
317
|
-
const promptRemove = (index) => {
|
|
318
|
-
const DialogConfirm = api.ui.DialogConfirm;
|
|
319
|
-
const row = rowsFromKnobs()[index];
|
|
320
|
-
api.ui.dialog.setSize('xlarge');
|
|
321
|
-
api.ui.dialog.replace(() => (_jsx(DialogConfirm, { title: 'Remove account', message: `Permanently remove ${row?.label ?? `account ${index + 1}`} from the local pool? This cannot be undone.`, onConfirm: async () => {
|
|
322
|
-
try {
|
|
323
|
-
const next = await runApply(`remove ${index}`, {
|
|
324
|
-
timeoutMs: 2_000,
|
|
325
|
-
});
|
|
326
|
-
if (next === null) {
|
|
327
|
-
renderMain();
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
catch {
|
|
331
|
-
api.ui.toast({ message: 'Account remove failed' });
|
|
332
|
-
renderMain();
|
|
333
|
-
}
|
|
334
|
-
}, onCancel: () => {
|
|
335
|
-
renderMain();
|
|
336
|
-
} })));
|
|
337
|
-
};
|
|
338
|
-
const renderMain = () => {
|
|
339
|
-
const DialogSelect = (api.ui.DialogSelect);
|
|
340
|
-
api.ui.dialog.setSize('xlarge');
|
|
341
|
-
const rows = rowsFromKnobs();
|
|
342
|
-
const bodyLines = rows.length
|
|
343
|
-
? rows.map(formatQuotaRowLine)
|
|
344
|
-
: ['No accounts configured. Add one via the menu below.'];
|
|
345
|
-
api.ui.dialog.replace(() => (_jsxs("box", { flexDirection: 'column', padding: 1, width: '100%', children: [bodyLines.map((line) => (_jsx("text", { children: line }))), _jsx("box", { marginTop: 1, children: _jsx(DialogSelect, { title: 'Antigravity accounts', options: [
|
|
346
|
-
{
|
|
347
|
-
title: 'Add account…',
|
|
348
|
-
value: 'add',
|
|
349
|
-
description: 'Open the OAuth flow to add a new account (120s timeout).',
|
|
350
|
-
},
|
|
351
|
-
...rows.map((row) => ({
|
|
352
|
-
title: row.label,
|
|
353
|
-
value: `__manage__ ${row.index}`,
|
|
354
|
-
description: row.enabled
|
|
355
|
-
? row.current
|
|
356
|
-
? 'Current account — toggle, remove, or back.'
|
|
357
|
-
: 'Enabled — toggle, set as current, or remove.'
|
|
358
|
-
: 'Disabled — toggle to re-enable, or remove.',
|
|
359
|
-
})),
|
|
360
|
-
{ title: 'Back', value: 'back' },
|
|
361
|
-
], onSelect: (option) => {
|
|
362
|
-
const raw = String(option.value);
|
|
363
|
-
if (raw === 'back') {
|
|
364
|
-
api.ui.dialog.clear();
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
if (raw === 'add') {
|
|
368
|
-
openAddOAuthStart();
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
if (raw.startsWith('__manage__ ')) {
|
|
372
|
-
const targetIndex = Number.parseInt(raw.split(' ')[1] ?? '', 10);
|
|
373
|
-
const target = rows[targetIndex];
|
|
374
|
-
if (target)
|
|
375
|
-
renderManageRow(target);
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
api.ui.toast({ message: 'Unknown action' });
|
|
379
|
-
} }) })] })));
|
|
380
|
-
};
|
|
381
|
-
renderMain();
|
|
128
|
+
if (knob.kind === 'number') {
|
|
129
|
+
const number = Number(text);
|
|
130
|
+
return Number.isFinite(number) ? number : text;
|
|
131
|
+
}
|
|
132
|
+
return raw;
|
|
133
|
+
}
|
|
134
|
+
function knobDefault(knob) {
|
|
135
|
+
if (knob.kind === 'toggle')
|
|
136
|
+
return knob.value ? 'on' : 'off';
|
|
137
|
+
if (knob.kind === 'text' && knob.masked)
|
|
138
|
+
return '';
|
|
139
|
+
return knob.value === undefined ? '' : String(knob.value);
|
|
140
|
+
}
|
|
141
|
+
/** The first web link in a message, such as a sign-in URL. */
|
|
142
|
+
export function firstLink(text) {
|
|
143
|
+
return /https?:\/\/\S+/.exec(text)?.[0];
|
|
382
144
|
}
|
|
383
145
|
/**
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
* The body lists the current persisted values (`cli_first`,
|
|
387
|
-
* `quota_style_fallback`) as plain `<text>` nodes so the data is
|
|
388
|
-
* visible without filtering the action list. The DialogSelect carries
|
|
389
|
-
* ONLY real toggle actions — each row flips exactly one flag, awaits
|
|
390
|
-
* apply, toasts the result, and re-renders in place from the
|
|
391
|
-
* freshly-returned state.
|
|
392
|
-
*
|
|
393
|
-
* Re-render contract mirrors the quota/account dialogs: the
|
|
394
|
-
* closed-over `payload.knobs` is mutated with the apply response and
|
|
395
|
-
* `renderMain()` is re-invoked. The dialog stack never sees a
|
|
396
|
-
* `clear()` between apply and re-render.
|
|
397
|
-
*
|
|
398
|
-
* Error path: when apply returns a `knobs.error === true` payload
|
|
399
|
-
* (lock contention, unreadable config), the dispatcher does NOT swap
|
|
400
|
-
* the closed-over payload — the dialog stays mounted on the previous
|
|
401
|
-
* state so the user can retry or back out. The error message was
|
|
402
|
-
* already toasted by `runApply`.
|
|
146
|
+
* Opens the drawer on a payload the server pushed for `/antigravity`. The
|
|
147
|
+
* returned promise settles when the user closes the drawer.
|
|
403
148
|
*/
|
|
404
|
-
function
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
149
|
+
export function openAntigravityMenu(options, payload) {
|
|
150
|
+
return new Drawer(options, payload.menu).start();
|
|
151
|
+
}
|
|
152
|
+
const CANCEL = '\u0000cancel';
|
|
153
|
+
class Drawer {
|
|
154
|
+
options;
|
|
155
|
+
menu;
|
|
156
|
+
constructor(options, menu) {
|
|
157
|
+
this.options = options;
|
|
158
|
+
this.menu = menu;
|
|
159
|
+
}
|
|
160
|
+
async start() {
|
|
161
|
+
const start = this.options.startSection;
|
|
162
|
+
if (start && this.menu.sections.some((section) => section.id === start)) {
|
|
163
|
+
await this.section(start);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const only = this.menu.sections.length === 1 ? this.menu.sections[0] : undefined;
|
|
167
|
+
if (only) {
|
|
168
|
+
await this.section(only.id);
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
await this.list();
|
|
172
|
+
}
|
|
173
|
+
async list() {
|
|
174
|
+
const { ui } = this.options;
|
|
175
|
+
const chosen = await ui.select({
|
|
176
|
+
title: this.menu.title,
|
|
177
|
+
options: sectionListOptions(this.menu),
|
|
414
178
|
});
|
|
415
|
-
|
|
416
|
-
|
|
179
|
+
if (chosen === undefined)
|
|
180
|
+
return;
|
|
181
|
+
await this.section(chosen.slice('section:'.length));
|
|
182
|
+
}
|
|
183
|
+
async closeOrList() {
|
|
184
|
+
if (this.menu.sections.length === 1) {
|
|
185
|
+
this.options.ui.clear();
|
|
417
186
|
return;
|
|
418
187
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* /antigravity-killswitch data-first dialog.
|
|
471
|
-
*
|
|
472
|
-
* The body lists the current persisted killswitch state (`enabled`,
|
|
473
|
-
* `minimum_remaining_percent`, and the per-account override map) as
|
|
474
|
-
* plain `<text>` nodes. The DialogSelect carries ONLY real actions:
|
|
475
|
-
* the global enabled toggle, the threshold-edit prompt, and a Back
|
|
476
|
-
* affordance. The threshold edit opens a DialogPrompt for a fresh
|
|
477
|
-
* integer in `0..100`; out-of-range input stays at the prompt without
|
|
478
|
-
* applying.
|
|
479
|
-
*
|
|
480
|
-
* Re-render contract matches the routing dialog: the closed-over
|
|
481
|
-
* `payload.knobs` is swapped to the apply response on success and
|
|
482
|
-
* `renderMain()` re-runs. Errors leave the payload untouched.
|
|
483
|
-
*/
|
|
484
|
-
function renderKillswitchDialog(api, initialPayload, apply) {
|
|
485
|
-
const payload = { ...initialPayload };
|
|
486
|
-
const readKillswitch = () => {
|
|
487
|
-
const enabled = payload.knobs.enabled === true;
|
|
488
|
-
const rawMin = payload.knobs.minimum_remaining_percent;
|
|
489
|
-
const minimum = typeof rawMin === 'number' && Number.isFinite(rawMin)
|
|
490
|
-
? Math.max(0, Math.min(100, Math.round(rawMin)))
|
|
491
|
-
: 0;
|
|
492
|
-
const rawAccounts = payload.knobs.accounts;
|
|
493
|
-
const accounts = rawAccounts &&
|
|
494
|
-
typeof rawAccounts === 'object' &&
|
|
495
|
-
!Array.isArray(rawAccounts)
|
|
496
|
-
? rawAccounts
|
|
497
|
-
: {};
|
|
498
|
-
return { enabled, minimum, accounts };
|
|
499
|
-
};
|
|
500
|
-
const runApply = async (args) => {
|
|
501
|
-
const result = await apply('antigravity-killswitch', args, {
|
|
502
|
-
timeoutMs: 2_000,
|
|
188
|
+
await this.list();
|
|
189
|
+
}
|
|
190
|
+
async section(sectionId) {
|
|
191
|
+
const { ui } = this.options;
|
|
192
|
+
const section = this.menu.sections.find((entry) => entry.id === sectionId);
|
|
193
|
+
if (!section) {
|
|
194
|
+
ui.toast('That section is no longer offered.', 'warning');
|
|
195
|
+
await this.list();
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const chosen = await ui.select({
|
|
199
|
+
title: section.title,
|
|
200
|
+
options: sectionOptions(section),
|
|
201
|
+
});
|
|
202
|
+
// Dismissing the dialog (Escape) closes the drawer; Back goes up a level.
|
|
203
|
+
if (chosen === undefined)
|
|
204
|
+
return;
|
|
205
|
+
if (chosen === BACK) {
|
|
206
|
+
await this.closeOrList();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (chosen.startsWith('item:')) {
|
|
210
|
+
await this.item(section.id, chosen.slice('item:'.length));
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (chosen.startsWith('action:')) {
|
|
214
|
+
const action = section.actions.find((entry) => entry.id === chosen.slice('action:'.length));
|
|
215
|
+
if (action) {
|
|
216
|
+
await this.run(section, undefined, action);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// A read-only line: redraw the same section.
|
|
221
|
+
await this.section(section.id);
|
|
222
|
+
}
|
|
223
|
+
async item(sectionId, itemId) {
|
|
224
|
+
const { ui } = this.options;
|
|
225
|
+
const section = this.menu.sections.find((entry) => entry.id === sectionId);
|
|
226
|
+
const item = section?.items.find((entry) => entry.id === itemId);
|
|
227
|
+
if (!section || !item) {
|
|
228
|
+
ui.toast('That entry is no longer offered.', 'warning');
|
|
229
|
+
if (section)
|
|
230
|
+
await this.section(section.id);
|
|
231
|
+
else
|
|
232
|
+
await this.list();
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const chosen = await ui.select({
|
|
236
|
+
title: `${section.title}: ${item.label}`,
|
|
237
|
+
options: itemOptions(item),
|
|
503
238
|
});
|
|
504
|
-
|
|
505
|
-
if (result.knobs.error === true) {
|
|
239
|
+
if (chosen === undefined)
|
|
506
240
|
return;
|
|
241
|
+
if (chosen === BACK) {
|
|
242
|
+
await this.section(section.id);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (chosen.startsWith('action:')) {
|
|
246
|
+
const action = item.actions.find((entry) => entry.id === chosen.slice('action:'.length));
|
|
247
|
+
if (action) {
|
|
248
|
+
await this.run(section, item, action);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
await this.item(section.id, item.id);
|
|
253
|
+
}
|
|
254
|
+
/** Asks for one input; resolves undefined when the user backs out. */
|
|
255
|
+
async knob(title, knob) {
|
|
256
|
+
const { ui } = this.options;
|
|
257
|
+
if (knob.kind === 'choice' || knob.kind === 'toggle') {
|
|
258
|
+
const choices = knob.kind === 'choice'
|
|
259
|
+
? knob.choices.map((choice) => ({
|
|
260
|
+
title: choice.label,
|
|
261
|
+
value: choice.value,
|
|
262
|
+
}))
|
|
263
|
+
: [
|
|
264
|
+
{ title: 'On', value: 'on' },
|
|
265
|
+
{ title: 'Off', value: 'off' },
|
|
266
|
+
];
|
|
267
|
+
const chosen = await ui.select({
|
|
268
|
+
title: `${title}: ${knob.label}`,
|
|
269
|
+
current: knobDefault(knob),
|
|
270
|
+
options: [...choices, { title: 'Cancel', value: CANCEL }],
|
|
271
|
+
});
|
|
272
|
+
if (chosen === undefined || chosen === CANCEL)
|
|
273
|
+
return undefined;
|
|
274
|
+
return knob.kind === 'toggle' ? chosen === 'on' : chosen;
|
|
275
|
+
}
|
|
276
|
+
const placeholder = knob.kind === 'text' ? knob.placeholder : undefined;
|
|
277
|
+
const raw = await ui.prompt({
|
|
278
|
+
title: `${title}: ${knob.label}`,
|
|
279
|
+
...(placeholder ? { placeholder } : {}),
|
|
280
|
+
value: knobDefault(knob),
|
|
281
|
+
});
|
|
282
|
+
if (raw === undefined)
|
|
283
|
+
return undefined;
|
|
284
|
+
return promptValue(knob, raw);
|
|
285
|
+
}
|
|
286
|
+
back(section, item) {
|
|
287
|
+
return item ? this.item(section.id, item.id) : this.section(section.id);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Collects an action's inputs, confirms it when it carries a confirmation,
|
|
291
|
+
* applies it and redraws from the refreshed menu.
|
|
292
|
+
*/
|
|
293
|
+
async run(section, item, action) {
|
|
294
|
+
const { ui } = this.options;
|
|
295
|
+
const values = {};
|
|
296
|
+
for (const knob of action.knobs) {
|
|
297
|
+
const value = await this.knob(action.label, knob);
|
|
298
|
+
if (value === undefined) {
|
|
299
|
+
await this.back(section, item);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
values[knob.id] = value;
|
|
507
303
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
304
|
+
let confirmed = false;
|
|
305
|
+
if (action.confirm) {
|
|
306
|
+
confirmed = await ui.confirm({
|
|
307
|
+
title: action.label,
|
|
308
|
+
message: action.confirm.message,
|
|
309
|
+
});
|
|
310
|
+
if (!confirmed) {
|
|
311
|
+
await this.back(section, item);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
const request = {
|
|
316
|
+
command: this.menu.command,
|
|
317
|
+
sectionId: section.id,
|
|
318
|
+
...(item ? { itemId: item.id } : {}),
|
|
319
|
+
actionId: action.id,
|
|
320
|
+
values,
|
|
321
|
+
...(confirmed ? { confirmed: true } : {}),
|
|
513
322
|
};
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
renderMain();
|
|
323
|
+
let result = await this.send(request);
|
|
324
|
+
if (!result) {
|
|
325
|
+
await this.back(section, item);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (result.needsConfirmation && !confirmed) {
|
|
329
|
+
const yes = await ui.confirm({
|
|
330
|
+
title: action.label,
|
|
331
|
+
message: result.text,
|
|
332
|
+
});
|
|
333
|
+
if (!yes) {
|
|
334
|
+
this.menu = result.menu;
|
|
335
|
+
await this.section(section.id);
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
const again = await this.send({ ...request, confirmed: true });
|
|
339
|
+
if (!again) {
|
|
340
|
+
this.menu = result.menu;
|
|
341
|
+
await this.back(section, item);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
result = again;
|
|
345
|
+
}
|
|
346
|
+
this.menu = result.menu;
|
|
347
|
+
await this.finish(section.id, result);
|
|
348
|
+
}
|
|
349
|
+
async send(request) {
|
|
350
|
+
const { ui, apply, onError } = this.options;
|
|
351
|
+
try {
|
|
352
|
+
return await apply(request);
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
if (error instanceof MenuRefusedError) {
|
|
356
|
+
onError?.('menu-apply-refused', { issues: error.issues });
|
|
357
|
+
ui.toast(MENU_REFUSED_TEXT, 'error');
|
|
358
|
+
return undefined;
|
|
359
|
+
}
|
|
360
|
+
onError?.('menu-apply-failed', {
|
|
361
|
+
error: error instanceof Error ? error.name : typeof error,
|
|
362
|
+
});
|
|
363
|
+
ui.toast('The action could not reach Antigravity auth.', 'error');
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Shows the apply's message and returns to the section. A long message (a
|
|
369
|
+
* sign-in URL, a multi-line result) is shown in full; a link in it can be
|
|
370
|
+
* copied when the host has a clipboard. A short one is a toast.
|
|
371
|
+
*/
|
|
372
|
+
async finish(sectionId, result) {
|
|
373
|
+
const { ui, copy } = this.options;
|
|
374
|
+
const kind = result.ok ? 'info' : 'warning';
|
|
375
|
+
const long = result.text.includes('\n') || result.text.length > TOAST_MAX_LENGTH;
|
|
376
|
+
const link = firstLink(result.text);
|
|
377
|
+
if (link && copy) {
|
|
378
|
+
const chosen = await ui.select({
|
|
379
|
+
title: result.ok ? 'Done' : 'Not done',
|
|
380
|
+
options: [
|
|
381
|
+
{ title: 'Copy link', value: 'copy', description: link },
|
|
382
|
+
{ title: 'Continue', value: 'continue', description: result.text },
|
|
383
|
+
],
|
|
384
|
+
});
|
|
385
|
+
if (chosen === 'copy') {
|
|
386
|
+
ui.toast(copy(link)
|
|
387
|
+
? 'Link copied to the clipboard.'
|
|
388
|
+
: 'Copy is unavailable here; select the link to copy it.', 'info');
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
else if (long) {
|
|
392
|
+
await ui.alert({
|
|
393
|
+
title: result.ok ? 'Done' : 'Not done',
|
|
394
|
+
message: result.text,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
ui.toast(result.text, kind);
|
|
399
|
+
}
|
|
400
|
+
await this.section(sectionId);
|
|
401
|
+
}
|
|
594
402
|
}
|
|
595
403
|
//# sourceMappingURL=command-dialogs.js.map
|