@cortexkit/opencode-antigravity-auth 2.2.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -92
- package/dist/cli.js +18476 -812
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +4100 -0
- package/dist/index.js +40602 -15857
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +6978 -0
- package/dist/server.js +51220 -0
- package/dist/server.js.map +7 -0
- package/dist/server.meta.json +7313 -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 +229 -65
- 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 +1752 -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 +46 -19
- 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,779 +0,0 @@
|
|
|
1
|
-
import { memo as _$memo } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
2
|
-
import { insert as _$insert } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
3
|
-
import { setProp as _$setProp } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
4
|
-
import { createTextNode as _$createTextNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
5
|
-
import { insertNode as _$insertNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
6
|
-
import { createElement as _$createElement } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
7
|
-
import { createComponent as _$createComponent } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
8
|
-
/** @jsxImportSource @opentui/solid */
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Imperative command-dialog dispatcher for the /antigravity-* slash commands.
|
|
12
|
-
*
|
|
13
|
-
* Mirrors the fleet sibling layout (see `anthropic-auth-live` /
|
|
14
|
-
* `openai-auth-live` `packages/opencode/src/tui/command-dialogs.tsx`):
|
|
15
|
-
* each command's dialog opens with its data/status content rendered into the
|
|
16
|
-
* dialog BODY as a column of plain `<text>` nodes — non-selectable,
|
|
17
|
-
* non-searchable — and a separate `<DialogSelect>` below carries ONLY the
|
|
18
|
-
* real actions with proper `{title, description}` shapes the host renders
|
|
19
|
-
* on separate lines. The earlier implementation crammed the data rows into
|
|
20
|
-
* `DialogSelect`'s `placeholder` (which participates in type-ahead search)
|
|
21
|
-
* and concatenated label+description into a single highlighted option line;
|
|
22
|
-
* this rewrite separates data from actions the way the host expects.
|
|
23
|
-
*
|
|
24
|
-
* Contract:
|
|
25
|
-
* - Every main/subdialog calls `api.ui.dialog.setSize('xlarge')` before
|
|
26
|
-
* `api.ui.dialog.replace()` so the host reserves enough width for the
|
|
27
|
-
* longest line in any branch.
|
|
28
|
-
* - `apply(command, args, options?)` is the RPC apply path the dispatch
|
|
29
|
-
* site (the module-scoped poll in `tui.tsx`) supplies. The dispatcher
|
|
30
|
-
* forwards `options.timeoutMs` so a long-running apply (account add /
|
|
31
|
-
* refresh, future quota refresh) gets the right RPC timeout.
|
|
32
|
-
* - All `DialogSelect` options must remain VISIBLE — the host's
|
|
33
|
-
* `disabled: true` is a hard hide, so this file must never set it.
|
|
34
|
-
* Invalid actions stay visible with an explanatory description and are
|
|
35
|
-
* rejected in `onSelect`. The `no hide-property option scan` test in
|
|
36
|
-
* the verification gates pins this contract.
|
|
37
|
-
* - `onSelect` awaits the apply, toasts the result, then either clears
|
|
38
|
-
* the dialog or replaces it for multi-step flows. The dialog stack
|
|
39
|
-
* never sees a `clear()` between apply and re-render so the user
|
|
40
|
-
* always sees feedback (per the dispatcher contract).
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Apply handler the dispatcher calls when the user selects a dialog
|
|
45
|
-
* option. Mirrors `ApplyRequest` from `rpc/protocol` plus the
|
|
46
|
-
* `RpcRequestOptions.timeoutMs` knob the RPC client already accepts —
|
|
47
|
-
* the call site in `tui.tsx` forwards these directly into
|
|
48
|
-
* `rpcClient.apply(request, options)`.
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Mount the dialog for `payload.command` on the live TUI.
|
|
53
|
-
*
|
|
54
|
-
* The dispatcher branches on `payload.command` — each branch is
|
|
55
|
-
* self-contained: render the data body, render the host DialogSelect
|
|
56
|
-
* below it with the real actions, wire `onSelect` to await `apply(...)`,
|
|
57
|
-
* then toast the result and clear (or replace for multi-step flows).
|
|
58
|
-
* Unknown commands throw so a future command registered in
|
|
59
|
-
* `MODAL_COMMANDS` without a dispatcher branch fails loudly at the first
|
|
60
|
-
* dialog open.
|
|
61
|
-
*/
|
|
62
|
-
export function openCommandDialog(api, payload, apply) {
|
|
63
|
-
if (payload.command === 'antigravity-dump') {
|
|
64
|
-
renderDumpDialog(api, payload, apply);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (payload.command === 'antigravity-logging') {
|
|
68
|
-
renderLoggingDialog(api, payload, apply);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (payload.command === 'antigravity-quota') {
|
|
72
|
-
throw new Error('antigravity-quota is rendered by the TUI quota panel');
|
|
73
|
-
}
|
|
74
|
-
if (payload.command === 'antigravity-account') {
|
|
75
|
-
renderAccountDialog(api, payload, apply);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (payload.command === 'antigravity-routing') {
|
|
79
|
-
renderRoutingDialog(api, payload, apply);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
if (payload.command === 'antigravity-killswitch') {
|
|
83
|
-
renderKillswitchDialog(api, payload, apply);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const exhaustiveCheck = payload.command;
|
|
87
|
-
throw new Error(`Unknown command ${exhaustiveCheck}`);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// ---------------------------------------------------------------------------
|
|
91
|
-
// Fully wired branches — non-data-first dialogs.
|
|
92
|
-
// ---------------------------------------------------------------------------
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* /antigravity-dump: three actions (on / off / status). Each selection
|
|
96
|
-
* applies through the RPC, toasts the result text, and clears the
|
|
97
|
-
* dialog. Status is a read-only check that still goes through apply so
|
|
98
|
-
* the dump helper runs once and reports the current state.
|
|
99
|
-
*/
|
|
100
|
-
function renderDumpDialog(api, _payload, apply) {
|
|
101
|
-
const DialogSelect = api.ui.DialogSelect;
|
|
102
|
-
api.ui.dialog.setSize('xlarge');
|
|
103
|
-
api.ui.dialog.replace(() => _$createComponent(DialogSelect, {
|
|
104
|
-
title: "Antigravity wire dump",
|
|
105
|
-
options: [{
|
|
106
|
-
title: 'Turn dump on',
|
|
107
|
-
value: 'on',
|
|
108
|
-
description: 'Write request and response bodies to the dump dir.'
|
|
109
|
-
}, {
|
|
110
|
-
title: 'Turn dump off',
|
|
111
|
-
value: 'off',
|
|
112
|
-
description: 'Stop writing new dump files.'
|
|
113
|
-
}, {
|
|
114
|
-
title: 'Show dump status',
|
|
115
|
-
value: 'status',
|
|
116
|
-
description: 'Display whether dumps are enabled and where they go.'
|
|
117
|
-
}],
|
|
118
|
-
onSelect: option => {
|
|
119
|
-
void apply('antigravity-dump', String(option.value)).then(result => {
|
|
120
|
-
api.ui.toast({
|
|
121
|
-
message: result.text
|
|
122
|
-
});
|
|
123
|
-
api.ui.dialog.clear();
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* /antigravity-logging: every log level as an option. The dispatcher
|
|
131
|
-
* forwards the level as the apply arg; the apply path persists it
|
|
132
|
-
* through `OperatorSettingsController` and toasts the resolution text.
|
|
133
|
-
*/
|
|
134
|
-
function renderLoggingDialog(api, payload, apply) {
|
|
135
|
-
const DialogSelect = api.ui.DialogSelect;
|
|
136
|
-
const current = payload.knobs.log_level ?? 'info';
|
|
137
|
-
api.ui.dialog.setSize('xlarge');
|
|
138
|
-
api.ui.dialog.replace(() => _$createComponent(DialogSelect, {
|
|
139
|
-
title: "Antigravity logging",
|
|
140
|
-
current: current,
|
|
141
|
-
options: [{
|
|
142
|
-
title: 'Error',
|
|
143
|
-
value: 'error',
|
|
144
|
-
description: 'Errors only.'
|
|
145
|
-
}, {
|
|
146
|
-
title: 'Warn',
|
|
147
|
-
value: 'warn',
|
|
148
|
-
description: 'Warnings and errors.'
|
|
149
|
-
}, {
|
|
150
|
-
title: 'Info',
|
|
151
|
-
value: 'info',
|
|
152
|
-
description: 'Default. Includes informational events.'
|
|
153
|
-
}, {
|
|
154
|
-
title: 'Debug',
|
|
155
|
-
value: 'debug',
|
|
156
|
-
description: 'Includes debug-level events.'
|
|
157
|
-
}, {
|
|
158
|
-
title: 'Trace',
|
|
159
|
-
value: 'trace',
|
|
160
|
-
description: 'Most verbose — every diagnostic event.'
|
|
161
|
-
}],
|
|
162
|
-
onSelect: option => {
|
|
163
|
-
void apply('antigravity-logging', String(option.value)).then(result => {
|
|
164
|
-
api.ui.toast({
|
|
165
|
-
message: result.text
|
|
166
|
-
});
|
|
167
|
-
api.ui.dialog.clear();
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// ---------------------------------------------------------------------------
|
|
174
|
-
// Shared helpers — render data rows as plain text in the dialog body.
|
|
175
|
-
// ---------------------------------------------------------------------------
|
|
176
|
-
|
|
177
|
-
function formatQuotaRowLine(row) {
|
|
178
|
-
const status = row.enabled ? '' : ' (disabled)';
|
|
179
|
-
const current = row.current ? ' *' : '';
|
|
180
|
-
if (row.quota.length === 0) {
|
|
181
|
-
return `${row.label}${status}${current}: no cached quota`;
|
|
182
|
-
}
|
|
183
|
-
const parts = row.quota.map(q => {
|
|
184
|
-
const pct = q.remainingPercent == null ? '–%' : `${q.remainingPercent}%`;
|
|
185
|
-
return `${q.label} ${pct}`;
|
|
186
|
-
});
|
|
187
|
-
return `${row.label}${status}${current}: ${parts.join(', ')}`;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* /antigravity-account data-first dialog.
|
|
192
|
-
*
|
|
193
|
-
* The body lists each account row as a plain `<text>` node (cache-only
|
|
194
|
-
* — no network I/O on open). The DialogSelect carries ONLY real
|
|
195
|
-
* actions: Add account… and one drill-in entry per row. Drill-in
|
|
196
|
-
* navigates to a row-level subdialog that exposes toggle / set-current
|
|
197
|
-
* / remove with a DialogConfirm gate for the destructive path.
|
|
198
|
-
*
|
|
199
|
-
* Each action calls `apply('antigravity-account', '<verb> <index>')`,
|
|
200
|
-
* which the apply path translates into a locked-storage mutation.
|
|
201
|
-
* The service returns fresh `CommandAccountRow[]`; the dialog mutates
|
|
202
|
-
* its closed-over payload and re-renders via `renderMain()` so the
|
|
203
|
-
* user never sees a clear-then-redraw gap.
|
|
204
|
-
*/
|
|
205
|
-
function renderAccountDialog(api, initialPayload, apply) {
|
|
206
|
-
// Closed-over payload: every render reads from the latest snapshot.
|
|
207
|
-
const payload = {
|
|
208
|
-
...initialPayload
|
|
209
|
-
};
|
|
210
|
-
const rowsFromKnobs = () => {
|
|
211
|
-
const raw = payload.knobs.accounts;
|
|
212
|
-
return Array.isArray(raw) ? raw : [];
|
|
213
|
-
};
|
|
214
|
-
const runApply = async (args, options) => {
|
|
215
|
-
const result = await apply('antigravity-account', args, options);
|
|
216
|
-
api.ui.toast({
|
|
217
|
-
message: result.text
|
|
218
|
-
});
|
|
219
|
-
const next = result.knobs.accounts;
|
|
220
|
-
if (Array.isArray(next)) {
|
|
221
|
-
payload.knobs = {
|
|
222
|
-
...payload.knobs,
|
|
223
|
-
accounts: next
|
|
224
|
-
};
|
|
225
|
-
renderMain();
|
|
226
|
-
return next;
|
|
227
|
-
}
|
|
228
|
-
renderMain();
|
|
229
|
-
return null;
|
|
230
|
-
};
|
|
231
|
-
const updateAccounts = knobs => {
|
|
232
|
-
const accounts = knobs.accounts;
|
|
233
|
-
if (!Array.isArray(accounts)) return;
|
|
234
|
-
payload.knobs = {
|
|
235
|
-
...payload.knobs,
|
|
236
|
-
accounts: accounts
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
const openOAuthLabelPrompt = (code, oauthUrl) => {
|
|
240
|
-
const DialogPrompt = api.ui.DialogPrompt;
|
|
241
|
-
api.ui.dialog.setSize('xlarge');
|
|
242
|
-
api.ui.dialog.replace(() => _$createComponent(DialogPrompt, {
|
|
243
|
-
title: "OAuth sign-in \u2014 label",
|
|
244
|
-
description: () => (() => {
|
|
245
|
-
var _el$ = _$createElement("text");
|
|
246
|
-
_$insertNode(_el$, _$createTextNode(`A short name for this account (optional).`));
|
|
247
|
-
return _el$;
|
|
248
|
-
})(),
|
|
249
|
-
placeholder: "e.g. work",
|
|
250
|
-
value: "",
|
|
251
|
-
onConfirm: value => {
|
|
252
|
-
const label = value.trim();
|
|
253
|
-
const args = label ? `add-oauth-finish ${code} --label ${label}` : `add-oauth-finish ${code}`;
|
|
254
|
-
void apply('antigravity-account', args, {
|
|
255
|
-
timeoutMs: 120_000
|
|
256
|
-
}).then(result => {
|
|
257
|
-
api.ui.toast({
|
|
258
|
-
message: result.text
|
|
259
|
-
});
|
|
260
|
-
updateAccounts(result.knobs);
|
|
261
|
-
renderMain();
|
|
262
|
-
}).catch(() => {
|
|
263
|
-
api.ui.toast({
|
|
264
|
-
message: 'OAuth account add failed'
|
|
265
|
-
});
|
|
266
|
-
renderMain();
|
|
267
|
-
});
|
|
268
|
-
},
|
|
269
|
-
onCancel: () => openOAuthCodePrompt(oauthUrl)
|
|
270
|
-
}));
|
|
271
|
-
};
|
|
272
|
-
const openOAuthCodePrompt = oauthUrl => {
|
|
273
|
-
const DialogPrompt = api.ui.DialogPrompt;
|
|
274
|
-
api.ui.dialog.setSize('xlarge');
|
|
275
|
-
api.ui.dialog.replace(() => _$createComponent(DialogPrompt, {
|
|
276
|
-
title: "OAuth sign-in \u2014 enter code",
|
|
277
|
-
description: () => (() => {
|
|
278
|
-
var _el$3 = _$createElement("text");
|
|
279
|
-
_$insertNode(_el$3, _$createTextNode(`After signing in, paste the full callback URL or authorization code.`));
|
|
280
|
-
return _el$3;
|
|
281
|
-
})(),
|
|
282
|
-
placeholder: "Paste callback URL or code here",
|
|
283
|
-
value: "",
|
|
284
|
-
onConfirm: value => {
|
|
285
|
-
const code = value.trim();
|
|
286
|
-
if (!code) {
|
|
287
|
-
// Empty submit must keep the user inside the flow, not
|
|
288
|
-
// silently drop them back to the account list. Surface the
|
|
289
|
-
// validation message and reopen the same prompt so the
|
|
290
|
-
// user can paste again.
|
|
291
|
-
api.ui.toast({
|
|
292
|
-
message: 'Please paste the callback URL or authorization code.'
|
|
293
|
-
});
|
|
294
|
-
openOAuthCodePrompt(oauthUrl);
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
openOAuthLabelPrompt(code, oauthUrl);
|
|
298
|
-
},
|
|
299
|
-
onCancel: () => openOAuthUrlScreen(oauthUrl)
|
|
300
|
-
}));
|
|
301
|
-
};
|
|
302
|
-
const openOAuthUrlScreen = oauthUrl => {
|
|
303
|
-
const DialogSelect = api.ui.DialogSelect;
|
|
304
|
-
api.ui.dialog.setSize('xlarge');
|
|
305
|
-
api.ui.dialog.replace(() => _$createComponent(DialogSelect, {
|
|
306
|
-
title: "OAuth sign-in",
|
|
307
|
-
options: [{
|
|
308
|
-
title: 'Copy URL to clipboard',
|
|
309
|
-
value: 'copy',
|
|
310
|
-
description: oauthUrl
|
|
311
|
-
}, {
|
|
312
|
-
title: 'Enter sign-in code',
|
|
313
|
-
value: 'code',
|
|
314
|
-
description: 'Open the URL in your browser, sign in, then paste the callback URL or code.'
|
|
315
|
-
}, {
|
|
316
|
-
title: 'Cancel',
|
|
317
|
-
value: 'cancel'
|
|
318
|
-
}],
|
|
319
|
-
onSelect: option => {
|
|
320
|
-
if (option.value === 'cancel') {
|
|
321
|
-
renderMain();
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
if (option.value === 'copy') {
|
|
325
|
-
const copied = api.renderer.copyToClipboardOSC52(oauthUrl);
|
|
326
|
-
api.ui.toast({
|
|
327
|
-
message: copied ? 'URL copied to clipboard' : 'Copy unavailable — select the URL text above to copy'
|
|
328
|
-
});
|
|
329
|
-
openOAuthUrlScreen(oauthUrl);
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
openOAuthCodePrompt(oauthUrl);
|
|
333
|
-
}
|
|
334
|
-
}));
|
|
335
|
-
};
|
|
336
|
-
const openAddOAuthStart = () => {
|
|
337
|
-
void apply('antigravity-account', 'add-oauth-start', {
|
|
338
|
-
timeoutMs: 120_000
|
|
339
|
-
}).then(result => {
|
|
340
|
-
updateAccounts(result.knobs);
|
|
341
|
-
const oauthUrl = result.knobs.oauthUrl;
|
|
342
|
-
if (typeof oauthUrl === 'string' && oauthUrl.length > 0) {
|
|
343
|
-
openOAuthUrlScreen(oauthUrl);
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
api.ui.toast({
|
|
347
|
-
message: result.text
|
|
348
|
-
});
|
|
349
|
-
renderMain();
|
|
350
|
-
}).catch(() => {
|
|
351
|
-
api.ui.toast({
|
|
352
|
-
message: 'OAuth account add failed'
|
|
353
|
-
});
|
|
354
|
-
renderMain();
|
|
355
|
-
});
|
|
356
|
-
};
|
|
357
|
-
const renderManageRow = row => {
|
|
358
|
-
const DialogSelect = api.ui.DialogSelect;
|
|
359
|
-
api.ui.dialog.setSize('xlarge');
|
|
360
|
-
api.ui.dialog.replace(() => (() => {
|
|
361
|
-
var _el$5 = _$createElement("box"),
|
|
362
|
-
_el$6 = _$createElement("text"),
|
|
363
|
-
_el$7 = _$createElement("text"),
|
|
364
|
-
_el$8 = _$createElement("box");
|
|
365
|
-
_$insertNode(_el$5, _el$6);
|
|
366
|
-
_$insertNode(_el$5, _el$7);
|
|
367
|
-
_$insertNode(_el$5, _el$8);
|
|
368
|
-
_$setProp(_el$5, "flexDirection", 'column');
|
|
369
|
-
_$setProp(_el$5, "padding", 1);
|
|
370
|
-
_$setProp(_el$5, "width", '100%');
|
|
371
|
-
_$insert(_el$6, () => row.label);
|
|
372
|
-
_$insert(_el$7, (() => {
|
|
373
|
-
var _c$ = _$memo(() => row.quota.length === 0);
|
|
374
|
-
return () => _c$() ? 'no cached quota' : row.quota.map(q => q.remainingPercent == null ? `${q.label} –%` : `${q.label} ${q.remainingPercent}%`).join(', ');
|
|
375
|
-
})());
|
|
376
|
-
_$setProp(_el$8, "marginTop", 1);
|
|
377
|
-
_$insert(_el$8, _$createComponent(DialogSelect, {
|
|
378
|
-
get title() {
|
|
379
|
-
return `Manage ${row.label}`;
|
|
380
|
-
},
|
|
381
|
-
get options() {
|
|
382
|
-
return [{
|
|
383
|
-
title: row.enabled ? 'Disable account' : 'Enable account',
|
|
384
|
-
value: `toggle ${row.index}`,
|
|
385
|
-
description: row.enabled ? 'Skip this account in rotation when its quota is low.' : 'Include this account in rotation again.'
|
|
386
|
-
}, {
|
|
387
|
-
title: 'Set as current',
|
|
388
|
-
value: `current ${row.index}`,
|
|
389
|
-
description: 'Pin this account as the active Claude + Gemini choice.'
|
|
390
|
-
}, {
|
|
391
|
-
title: 'Remove account…',
|
|
392
|
-
value: `__remove_prompt__ ${row.index}`,
|
|
393
|
-
description: 'Permanently delete this account from the local pool.'
|
|
394
|
-
}, {
|
|
395
|
-
title: 'Back',
|
|
396
|
-
value: '__back__',
|
|
397
|
-
description: 'Return to the account list.'
|
|
398
|
-
}];
|
|
399
|
-
},
|
|
400
|
-
onSelect: option => {
|
|
401
|
-
const raw = String(option.value);
|
|
402
|
-
if (raw === '__back__') {
|
|
403
|
-
renderMain();
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
if (raw.startsWith('__remove_prompt__ ')) {
|
|
407
|
-
const targetIndex = Number.parseInt(raw.split(' ')[1] ?? '', 10);
|
|
408
|
-
promptRemove(targetIndex);
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
if (raw.startsWith('toggle ') || raw.startsWith('current ')) {
|
|
412
|
-
void runApply(raw, {
|
|
413
|
-
timeoutMs: 2_000
|
|
414
|
-
}).catch(() => {
|
|
415
|
-
api.ui.toast({
|
|
416
|
-
message: `${row.label}: action failed`
|
|
417
|
-
});
|
|
418
|
-
});
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
api.ui.toast({
|
|
422
|
-
message: `${row.label}: unknown action`
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
}));
|
|
426
|
-
return _el$5;
|
|
427
|
-
})());
|
|
428
|
-
};
|
|
429
|
-
const promptRemove = index => {
|
|
430
|
-
const DialogConfirm = api.ui.DialogConfirm;
|
|
431
|
-
const row = rowsFromKnobs()[index];
|
|
432
|
-
api.ui.dialog.setSize('xlarge');
|
|
433
|
-
api.ui.dialog.replace(() => _$createComponent(DialogConfirm, {
|
|
434
|
-
title: "Remove account",
|
|
435
|
-
get message() {
|
|
436
|
-
return `Permanently remove ${row?.label ?? `account ${index + 1}`} from the local pool? This cannot be undone.`;
|
|
437
|
-
},
|
|
438
|
-
onConfirm: async () => {
|
|
439
|
-
try {
|
|
440
|
-
const next = await runApply(`remove ${index}`, {
|
|
441
|
-
timeoutMs: 2_000
|
|
442
|
-
});
|
|
443
|
-
if (next === null) {
|
|
444
|
-
renderMain();
|
|
445
|
-
}
|
|
446
|
-
} catch {
|
|
447
|
-
api.ui.toast({
|
|
448
|
-
message: 'Account remove failed'
|
|
449
|
-
});
|
|
450
|
-
renderMain();
|
|
451
|
-
}
|
|
452
|
-
},
|
|
453
|
-
onCancel: () => {
|
|
454
|
-
renderMain();
|
|
455
|
-
}
|
|
456
|
-
}));
|
|
457
|
-
};
|
|
458
|
-
const renderMain = () => {
|
|
459
|
-
const DialogSelect = api.ui.DialogSelect;
|
|
460
|
-
api.ui.dialog.setSize('xlarge');
|
|
461
|
-
const rows = rowsFromKnobs();
|
|
462
|
-
const bodyLines = rows.length ? rows.map(formatQuotaRowLine) : ['No accounts configured. Add one via the menu below.'];
|
|
463
|
-
api.ui.dialog.replace(() => (() => {
|
|
464
|
-
var _el$9 = _$createElement("box"),
|
|
465
|
-
_el$0 = _$createElement("box");
|
|
466
|
-
_$insertNode(_el$9, _el$0);
|
|
467
|
-
_$setProp(_el$9, "flexDirection", 'column');
|
|
468
|
-
_$setProp(_el$9, "padding", 1);
|
|
469
|
-
_$setProp(_el$9, "width", '100%');
|
|
470
|
-
_$insert(_el$9, () => bodyLines.map(line => (() => {
|
|
471
|
-
var _el$1 = _$createElement("text");
|
|
472
|
-
_$insert(_el$1, line);
|
|
473
|
-
return _el$1;
|
|
474
|
-
})()), _el$0);
|
|
475
|
-
_$setProp(_el$0, "marginTop", 1);
|
|
476
|
-
_$insert(_el$0, _$createComponent(DialogSelect, {
|
|
477
|
-
title: "Antigravity accounts",
|
|
478
|
-
get options() {
|
|
479
|
-
return [{
|
|
480
|
-
title: 'Add account…',
|
|
481
|
-
value: 'add',
|
|
482
|
-
description: 'Open the OAuth flow to add a new account (120s timeout).'
|
|
483
|
-
}, ...rows.map(row => ({
|
|
484
|
-
title: row.label,
|
|
485
|
-
value: `__manage__ ${row.index}`,
|
|
486
|
-
description: row.enabled ? row.current ? 'Current account — toggle, remove, or back.' : 'Enabled — toggle, set as current, or remove.' : 'Disabled — toggle to re-enable, or remove.'
|
|
487
|
-
})), {
|
|
488
|
-
title: 'Back',
|
|
489
|
-
value: 'back'
|
|
490
|
-
}];
|
|
491
|
-
},
|
|
492
|
-
onSelect: option => {
|
|
493
|
-
const raw = String(option.value);
|
|
494
|
-
if (raw === 'back') {
|
|
495
|
-
api.ui.dialog.clear();
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
if (raw === 'add') {
|
|
499
|
-
openAddOAuthStart();
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
if (raw.startsWith('__manage__ ')) {
|
|
503
|
-
const targetIndex = Number.parseInt(raw.split(' ')[1] ?? '', 10);
|
|
504
|
-
const target = rows[targetIndex];
|
|
505
|
-
if (target) renderManageRow(target);
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
api.ui.toast({
|
|
509
|
-
message: 'Unknown action'
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
}));
|
|
513
|
-
return _el$9;
|
|
514
|
-
})());
|
|
515
|
-
};
|
|
516
|
-
renderMain();
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* /antigravity-routing data-first dialog.
|
|
521
|
-
*
|
|
522
|
-
* The body lists the current persisted values (`cli_first`,
|
|
523
|
-
* `quota_style_fallback`) as plain `<text>` nodes so the data is
|
|
524
|
-
* visible without filtering the action list. The DialogSelect carries
|
|
525
|
-
* ONLY real toggle actions — each row flips exactly one flag, awaits
|
|
526
|
-
* apply, toasts the result, and re-renders in place from the
|
|
527
|
-
* freshly-returned state.
|
|
528
|
-
*
|
|
529
|
-
* Re-render contract mirrors the quota/account dialogs: the
|
|
530
|
-
* closed-over `payload.knobs` is mutated with the apply response and
|
|
531
|
-
* `renderMain()` is re-invoked. The dialog stack never sees a
|
|
532
|
-
* `clear()` between apply and re-render.
|
|
533
|
-
*
|
|
534
|
-
* Error path: when apply returns a `knobs.error === true` payload
|
|
535
|
-
* (lock contention, unreadable config), the dispatcher does NOT swap
|
|
536
|
-
* the closed-over payload — the dialog stays mounted on the previous
|
|
537
|
-
* state so the user can retry or back out. The error message was
|
|
538
|
-
* already toasted by `runApply`.
|
|
539
|
-
*/
|
|
540
|
-
function renderRoutingDialog(api, initialPayload, apply) {
|
|
541
|
-
// Closed-over payload: every render reads from the latest snapshot.
|
|
542
|
-
const payload = {
|
|
543
|
-
...initialPayload
|
|
544
|
-
};
|
|
545
|
-
const readRouting = () => ({
|
|
546
|
-
cliFirst: payload.knobs.cli_first === true,
|
|
547
|
-
quotaFallback: payload.knobs.quota_style_fallback === true
|
|
548
|
-
});
|
|
549
|
-
const runApply = async args => {
|
|
550
|
-
const result = await apply('antigravity-routing', args, {
|
|
551
|
-
timeoutMs: 2_000
|
|
552
|
-
});
|
|
553
|
-
api.ui.toast({
|
|
554
|
-
message: result.text
|
|
555
|
-
});
|
|
556
|
-
if (result.knobs.error === true) {
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
payload.knobs = {
|
|
560
|
-
...payload.knobs,
|
|
561
|
-
cli_first: result.knobs.cli_first,
|
|
562
|
-
quota_style_fallback: result.knobs.quota_style_fallback
|
|
563
|
-
};
|
|
564
|
-
renderMain();
|
|
565
|
-
};
|
|
566
|
-
const renderMain = () => {
|
|
567
|
-
const DialogSelect = api.ui.DialogSelect;
|
|
568
|
-
api.ui.dialog.setSize('xlarge');
|
|
569
|
-
const {
|
|
570
|
-
cliFirst,
|
|
571
|
-
quotaFallback
|
|
572
|
-
} = readRouting();
|
|
573
|
-
const bodyLines = [`cli_first: ${cliFirst ? 'on' : 'off'}`, `quota_style_fallback: ${quotaFallback ? 'on' : 'off'}`];
|
|
574
|
-
api.ui.dialog.replace(() => (() => {
|
|
575
|
-
var _el$10 = _$createElement("box"),
|
|
576
|
-
_el$11 = _$createElement("box");
|
|
577
|
-
_$insertNode(_el$10, _el$11);
|
|
578
|
-
_$setProp(_el$10, "flexDirection", 'column');
|
|
579
|
-
_$setProp(_el$10, "padding", 1);
|
|
580
|
-
_$setProp(_el$10, "width", '100%');
|
|
581
|
-
_$insert(_el$10, () => bodyLines.map(line => (() => {
|
|
582
|
-
var _el$12 = _$createElement("text");
|
|
583
|
-
_$insert(_el$12, line);
|
|
584
|
-
return _el$12;
|
|
585
|
-
})()), _el$11);
|
|
586
|
-
_$setProp(_el$11, "marginTop", 1);
|
|
587
|
-
_$insert(_el$11, _$createComponent(DialogSelect, {
|
|
588
|
-
title: "Antigravity routing",
|
|
589
|
-
options: [{
|
|
590
|
-
title: `${cliFirst ? '●' : '○'} cli_first: ${cliFirst}`,
|
|
591
|
-
value: `cli_first=${!cliFirst}`,
|
|
592
|
-
description: cliFirst ? 'CLI is preferred before Antigravity. Click to turn off.' : 'Antigravity runs before CLI. Click to turn on.'
|
|
593
|
-
}, {
|
|
594
|
-
title: `${quotaFallback ? '●' : '○'} quota_style_fallback: ${quotaFallback}`,
|
|
595
|
-
value: `quota_style_fallback=${!quotaFallback}`,
|
|
596
|
-
description: quotaFallback ? 'Falls back to the alternate quota style on exhaustion. Click to turn off.' : 'No quota-style fallback today. Click to turn on.'
|
|
597
|
-
}, {
|
|
598
|
-
title: 'Back',
|
|
599
|
-
value: 'back'
|
|
600
|
-
}],
|
|
601
|
-
onSelect: option => {
|
|
602
|
-
const raw = String(option.value);
|
|
603
|
-
if (raw === 'back') {
|
|
604
|
-
api.ui.dialog.clear();
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
if (!raw.startsWith('cli_first=') && !raw.startsWith('quota_style_fallback=')) {
|
|
608
|
-
api.ui.toast({
|
|
609
|
-
message: 'Unknown routing action'
|
|
610
|
-
});
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
void runApply(raw).catch(() => {
|
|
614
|
-
api.ui.toast({
|
|
615
|
-
message: 'Routing update failed'
|
|
616
|
-
});
|
|
617
|
-
renderMain();
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
}));
|
|
621
|
-
return _el$10;
|
|
622
|
-
})());
|
|
623
|
-
};
|
|
624
|
-
renderMain();
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* /antigravity-killswitch data-first dialog.
|
|
629
|
-
*
|
|
630
|
-
* The body lists the current persisted killswitch state (`enabled`,
|
|
631
|
-
* `minimum_remaining_percent`, and the per-account override map) as
|
|
632
|
-
* plain `<text>` nodes. The DialogSelect carries ONLY real actions:
|
|
633
|
-
* the global enabled toggle, the threshold-edit prompt, and a Back
|
|
634
|
-
* affordance. The threshold edit opens a DialogPrompt for a fresh
|
|
635
|
-
* integer in `0..100`; out-of-range input stays at the prompt without
|
|
636
|
-
* applying.
|
|
637
|
-
*
|
|
638
|
-
* Re-render contract matches the routing dialog: the closed-over
|
|
639
|
-
* `payload.knobs` is swapped to the apply response on success and
|
|
640
|
-
* `renderMain()` re-runs. Errors leave the payload untouched.
|
|
641
|
-
*/
|
|
642
|
-
function renderKillswitchDialog(api, initialPayload, apply) {
|
|
643
|
-
const payload = {
|
|
644
|
-
...initialPayload
|
|
645
|
-
};
|
|
646
|
-
const readKillswitch = () => {
|
|
647
|
-
const enabled = payload.knobs.enabled === true;
|
|
648
|
-
const rawMin = payload.knobs.minimum_remaining_percent;
|
|
649
|
-
const minimum = typeof rawMin === 'number' && Number.isFinite(rawMin) ? Math.max(0, Math.min(100, Math.round(rawMin))) : 0;
|
|
650
|
-
const rawAccounts = payload.knobs.accounts;
|
|
651
|
-
const accounts = rawAccounts && typeof rawAccounts === 'object' && !Array.isArray(rawAccounts) ? rawAccounts : {};
|
|
652
|
-
return {
|
|
653
|
-
enabled,
|
|
654
|
-
minimum,
|
|
655
|
-
accounts
|
|
656
|
-
};
|
|
657
|
-
};
|
|
658
|
-
const runApply = async args => {
|
|
659
|
-
const result = await apply('antigravity-killswitch', args, {
|
|
660
|
-
timeoutMs: 2_000
|
|
661
|
-
});
|
|
662
|
-
api.ui.toast({
|
|
663
|
-
message: result.text
|
|
664
|
-
});
|
|
665
|
-
if (result.knobs.error === true) {
|
|
666
|
-
return;
|
|
667
|
-
}
|
|
668
|
-
payload.knobs = {
|
|
669
|
-
...payload.knobs,
|
|
670
|
-
enabled: result.knobs.enabled,
|
|
671
|
-
minimum_remaining_percent: result.knobs.minimum_remaining_percent,
|
|
672
|
-
accounts: result.knobs.accounts ?? {}
|
|
673
|
-
};
|
|
674
|
-
renderMain();
|
|
675
|
-
};
|
|
676
|
-
const openThresholdPrompt = currentMinimum => {
|
|
677
|
-
const DialogPrompt = api.ui.DialogPrompt;
|
|
678
|
-
api.ui.dialog.setSize('xlarge');
|
|
679
|
-
api.ui.dialog.replace(() => _$createComponent(DialogPrompt, {
|
|
680
|
-
title: "Antigravity killswitch \u2014 set threshold",
|
|
681
|
-
description: () => (() => {
|
|
682
|
-
var _el$13 = _$createElement("text");
|
|
683
|
-
_$insertNode(_el$13, _$createTextNode(`Enter a new minimum_remaining_percent (0-100). Empty input cancels.`));
|
|
684
|
-
return _el$13;
|
|
685
|
-
})(),
|
|
686
|
-
placeholder: `${currentMinimum}`,
|
|
687
|
-
value: `${currentMinimum}`,
|
|
688
|
-
onConfirm: value => {
|
|
689
|
-
const trimmed = value.trim();
|
|
690
|
-
if (!trimmed) {
|
|
691
|
-
renderMain();
|
|
692
|
-
return;
|
|
693
|
-
}
|
|
694
|
-
const parsed = Number.parseInt(trimmed, 10);
|
|
695
|
-
if (!Number.isInteger(parsed) || parsed < 0 || parsed > 100 || String(parsed) !== trimmed) {
|
|
696
|
-
api.ui.toast({
|
|
697
|
-
message: 'Threshold must be an integer between 0 and 100'
|
|
698
|
-
});
|
|
699
|
-
openThresholdPrompt(currentMinimum);
|
|
700
|
-
return;
|
|
701
|
-
}
|
|
702
|
-
void runApply(`minimum_remaining_percent=${parsed}`).catch(() => {
|
|
703
|
-
api.ui.toast({
|
|
704
|
-
message: 'Killswitch update failed'
|
|
705
|
-
});
|
|
706
|
-
renderMain();
|
|
707
|
-
});
|
|
708
|
-
},
|
|
709
|
-
onCancel: () => {
|
|
710
|
-
renderMain();
|
|
711
|
-
}
|
|
712
|
-
}));
|
|
713
|
-
};
|
|
714
|
-
const renderMain = () => {
|
|
715
|
-
const DialogSelect = api.ui.DialogSelect;
|
|
716
|
-
api.ui.dialog.setSize('xlarge');
|
|
717
|
-
const {
|
|
718
|
-
enabled,
|
|
719
|
-
minimum,
|
|
720
|
-
accounts
|
|
721
|
-
} = readKillswitch();
|
|
722
|
-
const accountKeys = Object.keys(accounts);
|
|
723
|
-
const bodyLines = [`Killswitch: ${enabled ? 'enabled' : 'disabled'}`, `Minimum remaining percent: ${minimum}%`, ...(accountKeys.length > 0 ? ['Per-account overrides:', ...accountKeys.map(key => ` ${key}: ${accounts[key] ?? 0}%`)] : [])];
|
|
724
|
-
api.ui.dialog.replace(() => (() => {
|
|
725
|
-
var _el$15 = _$createElement("box"),
|
|
726
|
-
_el$16 = _$createElement("box");
|
|
727
|
-
_$insertNode(_el$15, _el$16);
|
|
728
|
-
_$setProp(_el$15, "flexDirection", 'column');
|
|
729
|
-
_$setProp(_el$15, "padding", 1);
|
|
730
|
-
_$setProp(_el$15, "width", '100%');
|
|
731
|
-
_$insert(_el$15, () => bodyLines.map(line => (() => {
|
|
732
|
-
var _el$17 = _$createElement("text");
|
|
733
|
-
_$insert(_el$17, line);
|
|
734
|
-
return _el$17;
|
|
735
|
-
})()), _el$16);
|
|
736
|
-
_$setProp(_el$16, "marginTop", 1);
|
|
737
|
-
_$insert(_el$16, _$createComponent(DialogSelect, {
|
|
738
|
-
title: "Antigravity killswitch",
|
|
739
|
-
options: [{
|
|
740
|
-
title: `${enabled ? '●' : '○'} Killswitch: ${enabled ? 'enabled' : 'disabled'}`,
|
|
741
|
-
value: `enabled=${!enabled}`,
|
|
742
|
-
description: enabled ? 'Drop candidates below the floor before dispatch. Click to turn off.' : 'Resume candidate selection regardless of quota. Click to turn on.'
|
|
743
|
-
}, {
|
|
744
|
-
title: `Set minimum remaining percent (${minimum}%)`,
|
|
745
|
-
value: '__edit_threshold__',
|
|
746
|
-
description: 'Prompt for a new global floor (0-100). Per-account overrides are listed above.'
|
|
747
|
-
}, {
|
|
748
|
-
title: 'Back',
|
|
749
|
-
value: 'back'
|
|
750
|
-
}],
|
|
751
|
-
onSelect: option => {
|
|
752
|
-
const raw = String(option.value);
|
|
753
|
-
if (raw === 'back') {
|
|
754
|
-
api.ui.dialog.clear();
|
|
755
|
-
return;
|
|
756
|
-
}
|
|
757
|
-
if (raw === '__edit_threshold__') {
|
|
758
|
-
openThresholdPrompt(minimum);
|
|
759
|
-
return;
|
|
760
|
-
}
|
|
761
|
-
if (raw === 'enabled=true' || raw === 'enabled=false') {
|
|
762
|
-
void runApply(raw).catch(() => {
|
|
763
|
-
api.ui.toast({
|
|
764
|
-
message: 'Killswitch update failed'
|
|
765
|
-
});
|
|
766
|
-
renderMain();
|
|
767
|
-
});
|
|
768
|
-
return;
|
|
769
|
-
}
|
|
770
|
-
api.ui.toast({
|
|
771
|
-
message: 'Unknown killswitch action'
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
}));
|
|
775
|
-
return _el$15;
|
|
776
|
-
})());
|
|
777
|
-
};
|
|
778
|
-
renderMain();
|
|
779
|
-
}
|