@cortexkit/opencode-antigravity-auth 2.2.0 → 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 +40923 -16450
- 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 -1347
- 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,47 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The single `/antigravity` slash command of OpenCode 1.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* builder the TUI renders when a notification arrives.
|
|
13
|
-
*
|
|
14
|
-
* If any one drifts, a future slash command will be discoverable in
|
|
15
|
-
* the host palette but invisible to the dialog flow (or vice versa).
|
|
16
|
-
* The bidirectional three-wiring test pins this invariant.
|
|
17
|
-
*
|
|
18
|
-
* `/gemini-dump` remains a backward-compatibility alias: the host
|
|
19
|
-
* already registers the command under that name in `OpenCode` and
|
|
20
|
-
* long-running sessions may still call it. The modal name
|
|
21
|
-
* `antigravity-dump` is the canonical name; both stay registered.
|
|
4
|
+
* The command opens the shared Antigravity menu built by the core
|
|
5
|
+
* `createAntigravityCommandMenu` over the location's account store: the
|
|
6
|
+
* server pushes the menu payload to the TUI over the private RPC queue, and
|
|
7
|
+
* the TUI sends each chosen action back to the RPC server, which hands it to
|
|
8
|
+
* the same menu's `apply`. The menu (common-auth's public `./commands`
|
|
9
|
+
* entry) owns confirmation, redaction, per-invocation isolation and action
|
|
10
|
+
* dispatch; this module supplies the OpenCode-specific sections (settings,
|
|
11
|
+
* diagnostics, sign-in) and the host hook.
|
|
22
12
|
*/
|
|
13
|
+
import { ANTIGRAVITY_MENU_COMMAND, antigravitySettingsSections, createAntigravityCommandMenu, loadCommonAuthCommands, } from '@cortexkit/antigravity-auth-core';
|
|
23
14
|
import { isTuiConnected as defaultIsTuiConnected } from '../rpc/notifications';
|
|
24
|
-
import {
|
|
25
|
-
import { executeGeminiDumpCommand, GEMINI_DUMP_COMMAND_NAME, parseGeminiDumpCommandAction, setGeminiDumpEnabled, } from './gemini-dump';
|
|
26
|
-
import { createLogger } from './logger';
|
|
27
|
-
import { createOperatorSettingsController, } from './operator-settings';
|
|
15
|
+
import { diagnosticsMenuSection, operatorMenuSettings } from './command-apply';
|
|
28
16
|
import { resolvePromptContext } from './prompt-context';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export const ANTIGRAVITY_QUOTA_COMMAND_NAME = 'antigravity-quota';
|
|
32
|
-
export const ANTIGRAVITY_ACCOUNT_COMMAND_NAME = 'antigravity-account';
|
|
33
|
-
export const ANTIGRAVITY_ROUTING_COMMAND_NAME = 'antigravity-routing';
|
|
34
|
-
export const ANTIGRAVITY_KILLSWITCH_COMMAND_NAME = 'antigravity-killswitch';
|
|
35
|
-
export const ANTIGRAVITY_DUMP_COMMAND_NAME = 'antigravity-dump';
|
|
36
|
-
export const ANTIGRAVITY_LOGGING_COMMAND_NAME = 'antigravity-logging';
|
|
37
|
-
export const MODAL_COMMANDS = [
|
|
38
|
-
ANTIGRAVITY_QUOTA_COMMAND_NAME,
|
|
39
|
-
ANTIGRAVITY_ACCOUNT_COMMAND_NAME,
|
|
40
|
-
ANTIGRAVITY_ROUTING_COMMAND_NAME,
|
|
41
|
-
ANTIGRAVITY_KILLSWITCH_COMMAND_NAME,
|
|
42
|
-
ANTIGRAVITY_DUMP_COMMAND_NAME,
|
|
43
|
-
ANTIGRAVITY_LOGGING_COMMAND_NAME,
|
|
44
|
-
];
|
|
17
|
+
/** The one slash command this plugin registers. */
|
|
18
|
+
export { ANTIGRAVITY_MENU_COMMAND };
|
|
45
19
|
const HANDLED_COMMAND_SENTINEL = 'ANTIGRAVITY_COMMAND_HANDLED';
|
|
46
20
|
async function sendIgnoredMessage(client, sessionID, text) {
|
|
47
21
|
const session = client.session;
|
|
@@ -70,677 +44,231 @@ function throwHandledCommandSentinel() {
|
|
|
70
44
|
throw new Error(HANDLED_COMMAND_SENTINEL);
|
|
71
45
|
}
|
|
72
46
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* can mount without further RPC chatter. The knobs object is the
|
|
77
|
-
* payload-specific metadata (current toggle state, available actions,
|
|
78
|
-
* default values) — knobs are intentionally stringly-typed to keep the
|
|
79
|
-
* dialog code free of per-command schema definitions.
|
|
47
|
+
* The menu invocation for one session: the menu's notifications become
|
|
48
|
+
* toast notifications for that session. common-auth copies these fields
|
|
49
|
+
* when a call starts, so later work reports to the session that began it.
|
|
80
50
|
*/
|
|
81
|
-
export
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
// Explicit user-triggered refreshes (inside the dialog) keep force:true.
|
|
92
|
-
if (context.commandData) {
|
|
93
|
-
void context.commandData.refreshQuotaRespectingBackoff().catch(() => { });
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
command,
|
|
97
|
-
text: 'Antigravity quota',
|
|
98
|
-
knobs: {
|
|
99
|
-
mode: action === 'refresh' ? 'refresh' : 'status',
|
|
100
|
-
accounts,
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
case 'antigravity-account': {
|
|
105
|
-
const action = argumentsText.trim().toLowerCase();
|
|
106
|
-
const accounts = context.commandData
|
|
107
|
-
? await context.commandData.listAccounts()
|
|
108
|
-
: [];
|
|
109
|
-
return {
|
|
110
|
-
command,
|
|
111
|
-
text: 'Antigravity accounts',
|
|
112
|
-
knobs: {
|
|
113
|
-
action: action === 'add' ||
|
|
114
|
-
action === 'refresh' ||
|
|
115
|
-
action === 'remove' ||
|
|
116
|
-
action === 'list'
|
|
117
|
-
? action
|
|
118
|
-
: 'list',
|
|
119
|
-
accounts,
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
case 'antigravity-routing': {
|
|
124
|
-
const settings = context.settings.get();
|
|
125
|
-
const parsed = parseToggleArguments(argumentsText);
|
|
126
|
-
// State-first: the opening payload reports the CURRENT persisted
|
|
127
|
-
// values (no `!` inversion). Argument overrides still flow through
|
|
128
|
-
// so the slash-command-direct path can pre-stage a value, but the
|
|
129
|
-
// fallback when no argument is provided is the actual current
|
|
130
|
-
// state, not its negation. The apply handler returns the complete
|
|
131
|
-
// post-mutation state in `knobs` so the dialog re-renders from
|
|
132
|
-
// the same shape it was opened with.
|
|
133
|
-
return {
|
|
134
|
-
command,
|
|
135
|
-
text: 'Antigravity routing',
|
|
136
|
-
knobs: {
|
|
137
|
-
cli_first: parsed.cli_first ?? settings.routing.cli_first,
|
|
138
|
-
quota_style_fallback: parsed.quota_style_fallback ??
|
|
139
|
-
settings.routing.quota_style_fallback,
|
|
140
|
-
timeoutMs: 2_000,
|
|
141
|
-
},
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
case 'antigravity-killswitch': {
|
|
145
|
-
const settings = context.settings.get();
|
|
146
|
-
const parsed = parseKillswitchArguments(argumentsText);
|
|
147
|
-
// State-first: opening reports the current killswitch shape
|
|
148
|
-
// (`enabled`, `minimum_remaining_percent`, plus the full
|
|
149
|
-
// per-account override map if any keys exist). Argument overrides
|
|
150
|
-
// are honored so the slash-command-direct path stays explicit.
|
|
151
|
-
return {
|
|
152
|
-
command,
|
|
153
|
-
text: 'Antigravity killswitch',
|
|
154
|
-
knobs: {
|
|
155
|
-
enabled: parsed.enabled ?? settings.killswitch.enabled,
|
|
156
|
-
minimum_remaining_percent: parsed.minimum_remaining_percent ??
|
|
157
|
-
settings.killswitch.minimum_remaining_percent,
|
|
158
|
-
accounts: settings.killswitch.accounts ?? {},
|
|
159
|
-
timeoutMs: 2_000,
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
case 'antigravity-dump': {
|
|
164
|
-
const action = parseGeminiDumpCommandAction(argumentsText);
|
|
165
|
-
return {
|
|
166
|
-
command,
|
|
167
|
-
text: 'Antigravity wire dump',
|
|
168
|
-
knobs: {
|
|
169
|
-
mode: action.type === 'usage' ? 'status' : action.type,
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
case 'antigravity-logging': {
|
|
174
|
-
const level = parseLoggingLevel(argumentsText);
|
|
175
|
-
return {
|
|
176
|
-
command,
|
|
177
|
-
text: 'Antigravity logging',
|
|
178
|
-
knobs: { log_level: level },
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
default: {
|
|
182
|
-
const exhaustiveCheck = command;
|
|
183
|
-
throw new Error(`Unknown command ${exhaustiveCheck}`);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
51
|
+
export function menuInvocation(push, sessionId) {
|
|
52
|
+
return {
|
|
53
|
+
...(sessionId !== undefined ? { sessionId } : {}),
|
|
54
|
+
notify(message, kind) {
|
|
55
|
+
push({
|
|
56
|
+
command: ANTIGRAVITY_MENU_COMMAND,
|
|
57
|
+
notify: { message, kind: kind ?? 'info' },
|
|
58
|
+
}, sessionId);
|
|
59
|
+
},
|
|
60
|
+
};
|
|
186
61
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
result.quota_style_fallback =
|
|
204
|
-
value === 'true' || value === '1' || value === 'on';
|
|
62
|
+
/**
|
|
63
|
+
* The host's `command.execute.before` for `/antigravity`: open the menu,
|
|
64
|
+
* queue its payload for the TUI, and stop the host from sending the command
|
|
65
|
+
* text as a prompt. Without a TUI listening, the outcome is written into the
|
|
66
|
+
* session as an ignored message instead. Every other command is left alone.
|
|
67
|
+
*/
|
|
68
|
+
export function createAntigravityCommandExecuteBefore(options) {
|
|
69
|
+
const connection = options.connection ?? {
|
|
70
|
+
isTuiConnected: defaultIsTuiConnected,
|
|
71
|
+
};
|
|
72
|
+
return async (input) => {
|
|
73
|
+
if (input.command !== ANTIGRAVITY_MENU_COMMAND)
|
|
74
|
+
return;
|
|
75
|
+
const opening = await options.open(input.sessionID);
|
|
76
|
+
if (opening.kind === 'menu') {
|
|
77
|
+
options.push(opening.payload, input.sessionID);
|
|
205
78
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
for (const part of input.split(/\s+/).filter(Boolean)) {
|
|
212
|
-
const eq = part.indexOf('=');
|
|
213
|
-
if (eq < 0)
|
|
214
|
-
continue;
|
|
215
|
-
const key = part.slice(0, eq).trim().toLowerCase();
|
|
216
|
-
const value = part
|
|
217
|
-
.slice(eq + 1)
|
|
218
|
-
.trim()
|
|
219
|
-
.toLowerCase();
|
|
220
|
-
if (key === 'enabled') {
|
|
221
|
-
result.enabled = value === 'true' || value === '1' || value === 'on';
|
|
79
|
+
else {
|
|
80
|
+
options.push({
|
|
81
|
+
command: ANTIGRAVITY_MENU_COMMAND,
|
|
82
|
+
notify: { message: opening.message, kind: 'warning' },
|
|
83
|
+
}, input.sessionID);
|
|
222
84
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
result.minimum_remaining_percent = n;
|
|
228
|
-
}
|
|
85
|
+
if (!connection.isTuiConnected(input.sessionID)) {
|
|
86
|
+
await sendIgnoredMessage(options.client, input.sessionID, opening.kind === 'menu'
|
|
87
|
+
? 'The Antigravity menu opens in the OpenCode terminal interface.'
|
|
88
|
+
: opening.message);
|
|
229
89
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
function parseLoggingLevel(input) {
|
|
234
|
-
const trimmed = input.trim().toLowerCase();
|
|
235
|
-
if (trimmed === 'error' ||
|
|
236
|
-
trimmed === 'warn' ||
|
|
237
|
-
trimmed === 'info' ||
|
|
238
|
-
trimmed === 'debug' ||
|
|
239
|
-
trimmed === 'trace') {
|
|
240
|
-
return trimmed;
|
|
241
|
-
}
|
|
242
|
-
return 'info';
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Parse the slash-command apply argument for `/antigravity-account`.
|
|
246
|
-
*
|
|
247
|
-
* Recognized forms:
|
|
248
|
-
* `<empty>` → `{ kind: 'refresh' }` (keeps the original
|
|
249
|
-
* "manage → refresh" placeholder semantics)
|
|
250
|
-
* `add` → `{ kind: 'add' }`
|
|
251
|
-
* `refresh` → `{ kind: 'refresh' }`
|
|
252
|
-
* `current <n>` → `{ kind: 'current', index: n }`
|
|
253
|
-
* `toggle <n>` → `{ kind: 'toggle', index: n }`
|
|
254
|
-
* `remove <n>` → `{ kind: 'remove', index: n }`
|
|
255
|
-
*
|
|
256
|
-
* `n` is the transient `acct-<index>` position the dialog renders.
|
|
257
|
-
* Negative or non-integer values are rejected; out-of-range indices
|
|
258
|
-
* are accepted here and rejected by the data service so the dialog
|
|
259
|
-
* can surface the error text.
|
|
260
|
-
*/
|
|
261
|
-
function parseAccountAction(input) {
|
|
262
|
-
const trimmed = input.trim();
|
|
263
|
-
if (!trimmed)
|
|
264
|
-
return { kind: 'refresh' };
|
|
265
|
-
const parts = trimmed.split(/\s+/).filter(Boolean);
|
|
266
|
-
const head = parts[0]?.toLowerCase();
|
|
267
|
-
if (head === 'add')
|
|
268
|
-
return { kind: 'add' };
|
|
269
|
-
if (head === 'add-oauth-start' && parts.length === 1) {
|
|
270
|
-
return { kind: 'add-oauth-start' };
|
|
271
|
-
}
|
|
272
|
-
if (head === 'add-oauth-finish') {
|
|
273
|
-
const code = parts[1];
|
|
274
|
-
if (!code)
|
|
275
|
-
return undefined;
|
|
276
|
-
const labelAt = parts.indexOf('--label');
|
|
277
|
-
const label = labelAt === -1
|
|
278
|
-
? undefined
|
|
279
|
-
: parts
|
|
280
|
-
.slice(labelAt + 1)
|
|
281
|
-
.join(' ')
|
|
282
|
-
.trim();
|
|
283
|
-
return { kind: 'add-oauth-finish', code, label: label || undefined };
|
|
284
|
-
}
|
|
285
|
-
if (head === 'refresh')
|
|
286
|
-
return { kind: 'refresh' };
|
|
287
|
-
if (head === 'current' || head === 'toggle' || head === 'remove') {
|
|
288
|
-
const raw = parts[1];
|
|
289
|
-
if (raw === undefined)
|
|
290
|
-
return undefined;
|
|
291
|
-
const index = Number.parseInt(raw, 10);
|
|
292
|
-
if (!Number.isInteger(index) || index < 0)
|
|
293
|
-
return undefined;
|
|
294
|
-
return { kind: head, index };
|
|
295
|
-
}
|
|
296
|
-
return undefined;
|
|
90
|
+
throwHandledCommandSentinel();
|
|
91
|
+
};
|
|
297
92
|
}
|
|
298
93
|
/**
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
* OAuth flow which can take up to two minutes on a fresh login — that
|
|
304
|
-
* path opts into a 120s RPC timeout. Status / toggle paths keep the
|
|
305
|
-
* default 2s timeout.
|
|
306
|
-
*
|
|
307
|
-
* The TUI's imperative dispatcher (`tui/command-dialogs.openCommandDialog`)
|
|
308
|
-
* forwards the apply `options.timeoutMs` knob into the RPC apply call
|
|
309
|
-
* so a long-running path (account add / refresh) can opt in without the
|
|
310
|
-
* dialog layer having to special-case it.
|
|
94
|
+
* The Sign in section: the OpenCode 1 OAuth add flow. Starting returns the
|
|
95
|
+
* authorization URL for this session; finishing takes the redirect URL (or
|
|
96
|
+
* its code) the browser ends on, and the account service admits the login
|
|
97
|
+
* into the account store.
|
|
311
98
|
*/
|
|
312
|
-
export
|
|
313
|
-
const result = await applyCommandInner(request, context);
|
|
314
|
-
// Push a sidebar refresh after every mutation so the TUI's next poll
|
|
315
|
-
// sees a fresh `checkedAt`. The refresher is optional; tests and
|
|
316
|
-
// read-only contexts leave it undefined and skip the write entirely.
|
|
317
|
-
if (context.onApplied) {
|
|
318
|
-
const accounts = result.knobs.accounts;
|
|
319
|
-
await Promise.resolve(context.onApplied(Array.isArray(accounts) ? accounts : undefined)).catch(() => {
|
|
320
|
-
// Sidebar refresh must never break the command's apply response.
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
return result;
|
|
324
|
-
}
|
|
325
|
-
async function runAccountMutation(context, call) {
|
|
326
|
-
if (!context.commandData) {
|
|
327
|
-
return {
|
|
328
|
-
kind: 'error',
|
|
329
|
-
text: 'Command data service is not wired; account mutations are disabled.',
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
try {
|
|
333
|
-
const rows = await call();
|
|
334
|
-
if (rows == null)
|
|
335
|
-
return { kind: 'not-found' };
|
|
336
|
-
return { kind: 'rows', rows };
|
|
337
|
-
}
|
|
338
|
-
catch (error) {
|
|
339
|
-
if (error instanceof AccountStorageUnreadableError) {
|
|
340
|
-
log.warn('account mutation: locked storage is unreadable', {
|
|
341
|
-
error: error.message,
|
|
342
|
-
});
|
|
343
|
-
return {
|
|
344
|
-
kind: 'error',
|
|
345
|
-
text: `Account storage is unreadable: ${error.details.reason}. The mutation was not applied.`,
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
349
|
-
log.warn('account mutation failed', { error: message });
|
|
350
|
-
return {
|
|
351
|
-
kind: 'error',
|
|
352
|
-
text: `Account mutation failed: ${message}`,
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
function notFoundResult(verb, index) {
|
|
357
|
-
return {
|
|
358
|
-
text: `Cannot ${verb}: account ${index} not found`,
|
|
359
|
-
knobs: { action: verb, timeoutMs: 2_000 },
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
function errorResult(verb, text) {
|
|
99
|
+
export function signInMenuSection(oauth) {
|
|
363
100
|
return {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
async function applyCommandInner(request, context) {
|
|
369
|
-
switch (request.command) {
|
|
370
|
-
case 'antigravity-quota': {
|
|
371
|
-
// `refresh` is the only quota apply path; opening is cache-only
|
|
372
|
-
// via `listAccounts`. The data service forces the refresh and
|
|
373
|
-
// returns the freshly persisted rows so the dialog can re-render
|
|
374
|
-
// in place without a second RPC round-trip.
|
|
375
|
-
const accounts = context.commandData
|
|
376
|
-
? await context.commandData.refreshQuota()
|
|
377
|
-
: [];
|
|
101
|
+
id: 'sign-in',
|
|
102
|
+
title: 'Sign in',
|
|
103
|
+
build() {
|
|
378
104
|
return {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
const result = await context.accountOAuth.start(context.sessionID);
|
|
400
|
-
return {
|
|
401
|
-
text: `Open this URL in your browser:\n${result.url}`,
|
|
402
|
-
knobs: {
|
|
403
|
-
oauthUrl: result.url,
|
|
404
|
-
accounts: result.accounts,
|
|
405
|
-
timeoutMs: 120_000,
|
|
406
|
-
},
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
if (parsed.kind === 'add-oauth-finish') {
|
|
410
|
-
if (!context.accountOAuth) {
|
|
411
|
-
return {
|
|
412
|
-
text: 'OAuth account add is unavailable.',
|
|
413
|
-
knobs: { timeoutMs: 120_000, error: true },
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
const result = parsed.label
|
|
417
|
-
? await context.accountOAuth.finish(context.sessionID, parsed.code, parsed.label)
|
|
418
|
-
: await context.accountOAuth.finish(context.sessionID, parsed.code);
|
|
419
|
-
return {
|
|
420
|
-
text: result.text,
|
|
421
|
-
knobs: { accounts: result.accounts, timeoutMs: 120_000 },
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
// The data service drives the locked-storage mutator for the
|
|
425
|
-
// three CRUD mutations. The locked-storage write is awaited FIRST so a
|
|
426
|
-
// failed disk write never leaves the runtime ahead of disk. When
|
|
427
|
-
// that await throws — AccountStorageUnreadableError, lock
|
|
428
|
-
// contention, I/O — we catch here and surface the message as the
|
|
429
|
-
// apply's `text`. The dialog toasts that text and stays mounted
|
|
430
|
-
// (the `clear()` is gated on `apply returning rows`).
|
|
431
|
-
if (parsed.kind === 'current') {
|
|
432
|
-
const result = await runAccountMutation(context, () => context.commandData?.setCurrentAccount(parsed.index));
|
|
433
|
-
if (result.kind === 'not-found') {
|
|
434
|
-
return notFoundResult('set current', parsed.index);
|
|
435
|
-
}
|
|
436
|
-
if (result.kind === 'error') {
|
|
437
|
-
return errorResult('current', result.text);
|
|
438
|
-
}
|
|
439
|
-
return {
|
|
440
|
-
text: 'Current account updated',
|
|
441
|
-
knobs: {
|
|
442
|
-
accounts: result.rows,
|
|
443
|
-
action: 'current',
|
|
444
|
-
timeoutMs: 2_000,
|
|
445
|
-
},
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
if (parsed.kind === 'toggle') {
|
|
449
|
-
const result = await runAccountMutation(context, () => context.commandData?.toggleAccountEnabled(parsed.index));
|
|
450
|
-
if (result.kind === 'not-found') {
|
|
451
|
-
return notFoundResult('toggle', parsed.index);
|
|
452
|
-
}
|
|
453
|
-
if (result.kind === 'error') {
|
|
454
|
-
return errorResult('toggle', result.text);
|
|
455
|
-
}
|
|
456
|
-
return {
|
|
457
|
-
text: 'Account enabled state updated',
|
|
458
|
-
knobs: {
|
|
459
|
-
accounts: result.rows,
|
|
460
|
-
action: 'toggle',
|
|
461
|
-
timeoutMs: 2_000,
|
|
105
|
+
lines: [
|
|
106
|
+
'Start a sign-in, open the link, then paste the address the browser ends on.',
|
|
107
|
+
],
|
|
108
|
+
actions: [
|
|
109
|
+
{
|
|
110
|
+
id: 'start',
|
|
111
|
+
label: 'Start sign-in',
|
|
112
|
+
run: async ({ invocation }) => {
|
|
113
|
+
const sessionId = invocation.sessionId;
|
|
114
|
+
if (sessionId === undefined)
|
|
115
|
+
return {
|
|
116
|
+
ok: false,
|
|
117
|
+
text: 'Sign-in needs a session; run /antigravity from one.',
|
|
118
|
+
code: 'refused',
|
|
119
|
+
};
|
|
120
|
+
const started = await oauth.start(sessionId);
|
|
121
|
+
return `Open this link to sign in, then choose Finish sign-in:\n${started.url}`;
|
|
122
|
+
},
|
|
462
123
|
},
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
124
|
+
{
|
|
125
|
+
id: 'finish',
|
|
126
|
+
label: 'Finish sign-in',
|
|
127
|
+
knobs: [
|
|
128
|
+
{
|
|
129
|
+
kind: 'text',
|
|
130
|
+
id: 'callback',
|
|
131
|
+
label: 'Address or code from the browser',
|
|
132
|
+
masked: true,
|
|
133
|
+
required: true,
|
|
134
|
+
},
|
|
135
|
+
{ kind: 'text', id: 'label', label: 'Label (optional)' },
|
|
136
|
+
],
|
|
137
|
+
run: async ({ values, invocation }) => {
|
|
138
|
+
const sessionId = invocation.sessionId;
|
|
139
|
+
const callback = values.callback;
|
|
140
|
+
if (sessionId === undefined || typeof callback !== 'string')
|
|
141
|
+
return {
|
|
142
|
+
ok: false,
|
|
143
|
+
text: 'Paste the address the browser ended on.',
|
|
144
|
+
code: 'invalid-input',
|
|
145
|
+
};
|
|
146
|
+
const label = typeof values.label === 'string' && values.label.trim() !== ''
|
|
147
|
+
? values.label.trim()
|
|
148
|
+
: undefined;
|
|
149
|
+
const finished = label === undefined
|
|
150
|
+
? await oauth.finish(sessionId, callback)
|
|
151
|
+
: await oauth.finish(sessionId, callback, label);
|
|
152
|
+
return finished.text;
|
|
153
|
+
},
|
|
479
154
|
},
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
// `add` (and `refresh`) — backwards-compatible no-op response
|
|
483
|
-
// that keeps the 120s RPC timeout for the future OAuth path.
|
|
484
|
-
return {
|
|
485
|
-
text: `Account ${parsed.kind} requested`,
|
|
486
|
-
knobs: { action: parsed.kind, timeoutMs: 120_000 },
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
case 'antigravity-routing': {
|
|
490
|
-
const parsed = parseToggleArguments(request.arguments);
|
|
491
|
-
try {
|
|
492
|
-
await context.settings.update((draft) => {
|
|
493
|
-
if (parsed.cli_first !== undefined) {
|
|
494
|
-
draft.routing.cli_first = parsed.cli_first;
|
|
495
|
-
}
|
|
496
|
-
if (parsed.quota_style_fallback !== undefined) {
|
|
497
|
-
draft.routing.quota_style_fallback = parsed.quota_style_fallback;
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
catch (error) {
|
|
502
|
-
// Lock contention / unreadable config — surface the writer's
|
|
503
|
-
// message so the dialog can toast the real cause and stay
|
|
504
|
-
// mounted (T8/T10 pattern). The runtime view is left untouched
|
|
505
|
-
// because the writer either landed or threw.
|
|
506
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
507
|
-
log.warn('routing update failed', { error: message });
|
|
508
|
-
return {
|
|
509
|
-
text: `Routing update failed: ${message}`,
|
|
510
|
-
knobs: { timeoutMs: 2_000, error: true },
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
// Complete persisted state — the dialog re-renders from the same
|
|
514
|
-
// shape `buildDialogPayload` produced on open.
|
|
515
|
-
const after = context.settings.get();
|
|
516
|
-
return {
|
|
517
|
-
text: 'Routing updated',
|
|
518
|
-
knobs: {
|
|
519
|
-
cli_first: after.routing.cli_first,
|
|
520
|
-
quota_style_fallback: after.routing.quota_style_fallback,
|
|
521
|
-
timeoutMs: 2_000,
|
|
522
|
-
},
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
case 'antigravity-killswitch': {
|
|
526
|
-
const parsed = parseKillswitchArguments(request.arguments);
|
|
527
|
-
try {
|
|
528
|
-
await context.settings.update((draft) => {
|
|
529
|
-
if (parsed.enabled !== undefined) {
|
|
530
|
-
draft.killswitch.enabled = parsed.enabled;
|
|
531
|
-
}
|
|
532
|
-
if (parsed.minimum_remaining_percent !== undefined) {
|
|
533
|
-
draft.killswitch.minimum_remaining_percent =
|
|
534
|
-
parsed.minimum_remaining_percent;
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
catch (error) {
|
|
539
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
540
|
-
log.warn('killswitch update failed', { error: message });
|
|
541
|
-
return {
|
|
542
|
-
text: `Killswitch update failed: ${message}`,
|
|
543
|
-
knobs: { timeoutMs: 2_000, error: true },
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
// Complete persisted state — the dialog re-renders the full
|
|
547
|
-
// killswitch shape (enabled, threshold, per-account overrides).
|
|
548
|
-
const after = context.settings.get();
|
|
549
|
-
return {
|
|
550
|
-
text: 'Killswitch updated',
|
|
551
|
-
knobs: {
|
|
552
|
-
enabled: after.killswitch.enabled,
|
|
553
|
-
minimum_remaining_percent: after.killswitch.minimum_remaining_percent,
|
|
554
|
-
accounts: after.killswitch.accounts ?? {},
|
|
555
|
-
timeoutMs: 2_000,
|
|
556
|
-
},
|
|
155
|
+
],
|
|
557
156
|
};
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
const action = parseGeminiDumpCommandAction(request.arguments);
|
|
561
|
-
if (action.type === 'enable')
|
|
562
|
-
setGeminiDumpEnabled(true);
|
|
563
|
-
else if (action.type === 'disable')
|
|
564
|
-
setGeminiDumpEnabled(false);
|
|
565
|
-
return {
|
|
566
|
-
text: executeGeminiDumpCommand({
|
|
567
|
-
argumentsText: request.arguments,
|
|
568
|
-
}),
|
|
569
|
-
knobs: { timeoutMs: 2_000 },
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
case 'antigravity-logging': {
|
|
573
|
-
const level = parseLoggingLevel(request.arguments);
|
|
574
|
-
await context.settings.update((draft) => {
|
|
575
|
-
draft.log_level = level;
|
|
576
|
-
});
|
|
577
|
-
return {
|
|
578
|
-
text: `Logging level set to ${level}`,
|
|
579
|
-
knobs: { log_level: level, timeoutMs: 2_000 },
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
default: {
|
|
583
|
-
const exhaustiveCheck = request.command;
|
|
584
|
-
throw new Error(`Unknown command ${exhaustiveCheck}`);
|
|
585
|
-
}
|
|
586
|
-
}
|
|
157
|
+
},
|
|
158
|
+
};
|
|
587
159
|
}
|
|
588
160
|
/**
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
* sidebar's `checkedAt`. The refresher is best-effort: a lock-contention
|
|
593
|
-
* error or missing manager is swallowed by the caller.
|
|
161
|
+
* The OpenCode 1 `/antigravity` menu over the account store, built with
|
|
162
|
+
* the shared core factory in repository mode. The host registers it as
|
|
163
|
+
* its one slash command and carries its payloads over its own RPC.
|
|
594
164
|
*/
|
|
595
|
-
export function
|
|
596
|
-
return
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
? dialogAccounts.map((entry) => {
|
|
616
|
-
// Prefer the row's own cooldown — it was projected from the
|
|
617
|
-
// live view at the last projection and is stable regardless
|
|
618
|
-
// of concurrent reloads. Fall back to the live-by-index map
|
|
619
|
-
// only for legacy rows that lack the field entirely (?? can't
|
|
620
|
-
// distinguish absent from present-but-undefined).
|
|
621
|
-
const liveCooldown = 'coolingDownUntil' in entry
|
|
622
|
-
? entry.coolingDownUntil
|
|
623
|
-
: liveByIndex.get(entry.index);
|
|
624
|
-
return {
|
|
625
|
-
index: entry.index,
|
|
626
|
-
label: entry.label,
|
|
627
|
-
enabled: entry.enabled,
|
|
628
|
-
current: entry.current,
|
|
629
|
-
coolingDownUntil: liveCooldown,
|
|
630
|
-
healthScore: entry.healthScore,
|
|
631
|
-
tier: entry.tier,
|
|
632
|
-
// Rebuild cachedQuota carrying the windows array so the sidebar
|
|
633
|
-
// doesn't collapse from per-window rows to a single aggregate bar
|
|
634
|
-
// after every apply. Mirrors the QuotaGroupSummary shape expected
|
|
635
|
-
// by projectQuotaPoolForSidebar inside buildSidebarMachineStateFromAccounts.
|
|
636
|
-
cachedQuota: Object.fromEntries(entry.quota.flatMap((group) => {
|
|
637
|
-
if (group.remainingPercent == null)
|
|
638
|
-
return [];
|
|
639
|
-
return [
|
|
640
|
-
[
|
|
641
|
-
group.key,
|
|
642
|
-
{
|
|
643
|
-
remainingFraction: group.remainingPercent / 100,
|
|
644
|
-
...(group.resetAt === undefined
|
|
645
|
-
? {}
|
|
646
|
-
: { resetTime: new Date(group.resetAt).toISOString() }),
|
|
647
|
-
...(group.windows && group.windows.length > 0
|
|
648
|
-
? {
|
|
649
|
-
windows: group.windows.map((w) => ({
|
|
650
|
-
window: w.window,
|
|
651
|
-
remainingFraction: w.remainingPercent / 100,
|
|
652
|
-
resetTime: typeof w.resetAt === 'number' &&
|
|
653
|
-
Number.isFinite(w.resetAt)
|
|
654
|
-
? new Date(w.resetAt).toISOString()
|
|
655
|
-
: '',
|
|
656
|
-
})),
|
|
657
|
-
}
|
|
658
|
-
: {}),
|
|
659
|
-
},
|
|
660
|
-
],
|
|
661
|
-
];
|
|
662
|
-
})),
|
|
663
|
-
};
|
|
664
|
-
})
|
|
665
|
-
: getAccounts();
|
|
666
|
-
if (!accounts || accounts.length === 0)
|
|
667
|
-
return;
|
|
668
|
-
try {
|
|
669
|
-
// Pass the already-projected accounts directly so every field the
|
|
670
|
-
// intermediate map built (healthScore, cachedQuota with windows, ...)
|
|
671
|
-
// reaches the redactor unchanged. A second .map here would silently
|
|
672
|
-
// drop any field not explicitly forwarded -- that is the class of
|
|
673
|
-
// defect this cast prevents.
|
|
674
|
-
await setSidebarMachineState(buildSidebarMachineStateFromAccounts(accounts));
|
|
675
|
-
}
|
|
676
|
-
catch {
|
|
677
|
-
// Sidebar refresh is best-effort; the next command or quota refresh
|
|
678
|
-
// will publish the current account snapshot.
|
|
679
|
-
}
|
|
680
|
-
};
|
|
165
|
+
export async function createOpenCodeAntigravityMenu(options) {
|
|
166
|
+
return createAntigravityCommandMenu({
|
|
167
|
+
source: 'repository',
|
|
168
|
+
commands: options.commands ?? (await loadCommonAuthCommands()),
|
|
169
|
+
accounts: options.accounts,
|
|
170
|
+
settings: operatorMenuSettings(options.settings),
|
|
171
|
+
diagnostics: diagnosticsMenuSection(options),
|
|
172
|
+
...(options.refreshQuota ? { refreshQuota: options.refreshQuota } : {}),
|
|
173
|
+
...(options.accountLimits ? { accountLimits: options.accountLimits } : {}),
|
|
174
|
+
...(options.login ? { login: options.login } : {}),
|
|
175
|
+
extras: [
|
|
176
|
+
...(options.signIn ? [signInMenuSection(options.signIn)] : []),
|
|
177
|
+
...(options.vault ? [options.vault] : []),
|
|
178
|
+
],
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function storeRefusal(opening) {
|
|
182
|
+
return new Error(opening.status === 'refused' && typeof opening.message === 'string'
|
|
183
|
+
? opening.message
|
|
184
|
+
: 'The Antigravity account store cannot be opened');
|
|
681
185
|
}
|
|
682
186
|
/**
|
|
683
|
-
*
|
|
684
|
-
*
|
|
685
|
-
* When a slash command is invoked, we push a notification onto the
|
|
686
|
-
* RPC queue and abort the normal prompt with the same handled
|
|
687
|
-
* sentinel the legacy `/gemini-dump` flow already uses.
|
|
187
|
+
* Where OpenCode 1 reads accounts and admits new logins, from the auth
|
|
188
|
+
* loader's single account-store opening.
|
|
688
189
|
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
190
|
+
* - `accountSource`: the account store, the pool file of a location not
|
|
191
|
+
* yet migrated, or nothing on a fresh installation; any other store
|
|
192
|
+
* state refuses.
|
|
193
|
+
* - `loginTarget`: a fresh installation first gets its explicit empty
|
|
194
|
+
* account store (`initializeFreshStore`), so the first login is admitted
|
|
195
|
+
* by the store and never written to a new pool file; a location still on
|
|
196
|
+
* its pool file keeps it until it is migrated; any other store state
|
|
197
|
+
* (pending migration or recovery, an unreadable store) refuses the login.
|
|
198
|
+
* Nothing is initialized over an existing pool file or store.
|
|
694
199
|
*/
|
|
695
|
-
export function
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
200
|
+
export function createAccountTargets(loader) {
|
|
201
|
+
const isReady = (opening) => opening.status === 'ready' && opening.repository !== undefined;
|
|
202
|
+
return {
|
|
203
|
+
async accountSource() {
|
|
204
|
+
const opening = await loader.accountStore();
|
|
205
|
+
if (isReady(opening))
|
|
206
|
+
return { kind: 'store', repository: opening.repository };
|
|
207
|
+
if (opening.status === 'initialization-required')
|
|
208
|
+
return { kind: 'none' };
|
|
209
|
+
if (loader.usesPoolFile(opening))
|
|
210
|
+
return { kind: 'pool-file' };
|
|
211
|
+
throw storeRefusal(opening);
|
|
212
|
+
},
|
|
213
|
+
async loginTarget() {
|
|
214
|
+
const opening = await loader.initializeFreshStore();
|
|
215
|
+
if (isReady(opening))
|
|
216
|
+
return opening.repository;
|
|
217
|
+
if (opening.status !== 'initialization-required' &&
|
|
218
|
+
loader.usesPoolFile(opening))
|
|
219
|
+
return 'pool-file';
|
|
220
|
+
throw storeRefusal(opening);
|
|
221
|
+
},
|
|
703
222
|
};
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* The OpenCode 1 request path that follows the vault mode file: each
|
|
226
|
+
* request re-reads the mode, so the Vault section's switches take effect on
|
|
227
|
+
* the next request. In custody the vault path serves, built for the vault
|
|
228
|
+
* source custody hands out (a new source after a switch rebuilds it); in
|
|
229
|
+
* local mode the local path serves and any vault path is released. An
|
|
230
|
+
* unreadable mode file refuses the request rather than picking a path.
|
|
231
|
+
*/
|
|
232
|
+
export function createCustodyAwareRequestPath(options) {
|
|
233
|
+
let vault = null;
|
|
234
|
+
const releaseVault = () => {
|
|
235
|
+
const current = vault;
|
|
236
|
+
vault = null;
|
|
237
|
+
current?.path.dispose();
|
|
238
|
+
};
|
|
239
|
+
return {
|
|
240
|
+
async fetch(input, init) {
|
|
241
|
+
const mode = await options.readMode();
|
|
242
|
+
if (!mode.ok)
|
|
243
|
+
throw new Error(`The Antigravity vault mode is unclear (${mode.reason}); choose a mode in the Vault section of the Antigravity menu.`);
|
|
244
|
+
if (mode.record.mode === 'local') {
|
|
245
|
+
releaseVault();
|
|
246
|
+
return options.local.fetch(input, init);
|
|
710
247
|
}
|
|
711
|
-
|
|
712
|
-
|
|
248
|
+
const source = await options.custodySource();
|
|
249
|
+
if (vault?.source !== source) {
|
|
250
|
+
releaseVault();
|
|
251
|
+
vault = { source, path: options.vault(source) };
|
|
713
252
|
}
|
|
714
|
-
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
command !== ANTIGRAVITY_DUMP_COMMAND_NAME &&
|
|
721
|
-
command !== ANTIGRAVITY_LOGGING_COMMAND_NAME) {
|
|
722
|
-
return;
|
|
723
|
-
}
|
|
724
|
-
const payload = await buildDialogPayload(command, input.arguments, {
|
|
725
|
-
...context,
|
|
726
|
-
sessionID: input.sessionID,
|
|
727
|
-
});
|
|
728
|
-
pushNotification(payload, input.sessionID);
|
|
729
|
-
if (!connectionState.isTuiConnected(input.sessionID)) {
|
|
730
|
-
await sendIgnoredMessage(client, input.sessionID, payload.text);
|
|
731
|
-
}
|
|
732
|
-
throwHandledCommandSentinel();
|
|
253
|
+
return vault.path.fetch(input, init);
|
|
254
|
+
},
|
|
255
|
+
dispose() {
|
|
256
|
+
releaseVault();
|
|
257
|
+
options.local.dispose();
|
|
258
|
+
},
|
|
733
259
|
};
|
|
734
260
|
}
|
|
735
|
-
/**
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
261
|
+
/** The same command dispatcher over vault sections, without a local repository or sign-in flow. */
|
|
262
|
+
export async function createOpenCodeVaultAntigravityMenu(options) {
|
|
263
|
+
return createAntigravityCommandMenu({
|
|
264
|
+
source: 'sections',
|
|
265
|
+
commands: options.commands ?? (await loadCommonAuthCommands()),
|
|
266
|
+
sections: {
|
|
267
|
+
...options.sections,
|
|
268
|
+
...antigravitySettingsSections(operatorMenuSettings(options.settings)),
|
|
269
|
+
},
|
|
270
|
+
diagnostics: diagnosticsMenuSection(options),
|
|
271
|
+
extras: options.vault ? [options.vault] : [],
|
|
272
|
+
});
|
|
745
273
|
}
|
|
746
274
|
//# sourceMappingURL=commands.js.map
|