@cortexkit/opencode-antigravity-auth 2.2.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -92
- package/dist/cli.js +18476 -812
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +4100 -0
- package/dist/index.js +40602 -15857
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +6978 -0
- package/dist/server.js +51220 -0
- package/dist/server.js.map +7 -0
- package/dist/server.meta.json +7313 -0
- package/dist/src/cli.d.ts +46 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +207 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/NOTICE.txt +21 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/dist/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/dist/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/dist/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/dist/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/dist/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/dist/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/dist/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/dist/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/dist/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/dist/src/common-auth-embedded/claustrum/index.js +22 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/dist/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/dist/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/src/common-auth-embedded/commands/builtins.js +534 -0
- package/dist/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/commands/index.js +5 -0
- package/dist/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/src/common-auth-embedded/commands/menu.js +300 -0
- package/dist/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/src/common-auth-embedded/commands/model.js +16 -0
- package/dist/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/src/common-auth-embedded/commands/pi.js +206 -0
- package/dist/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/src/common-auth-embedded/commands/seam.js +301 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/dist/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/dist/src/common-auth-embedded/fs/index.js +6 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/dist/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/dist/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/src/common-auth-embedded/logger/engine.js +246 -0
- package/dist/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/src/common-auth-embedded/logger/index.js +3 -0
- package/dist/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/src/common-auth-embedded/logger/redact.js +83 -0
- package/dist/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/dist/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/opencode2/index.js +4 -0
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/dist/src/common-auth-embedded/opencode2/install.js +886 -0
- package/dist/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/dist/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/dist/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/dist/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/dist/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/dist/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/dist/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/dist/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/src/common-auth-embedded/quota/codec.js +12 -0
- package/dist/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/src/common-auth-embedded/quota/format.js +138 -0
- package/dist/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/quota/index.js +5 -0
- package/dist/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/src/common-auth-embedded/quota/map.js +105 -0
- package/dist/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/src/common-auth-embedded/quota/merge.js +162 -0
- package/dist/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/src/common-auth-embedded/quota/projection.js +134 -0
- package/dist/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/dist/src/common-auth-embedded/routing/admission.js +142 -0
- package/dist/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/routing/index.js +4 -0
- package/dist/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/dist/src/common-auth-embedded/routing/ordered.js +58 -0
- package/dist/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/dist/src/common-auth-embedded/routing/pins.js +34 -0
- package/dist/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/dist/src/common-auth-embedded/routing/sticky.js +339 -0
- package/dist/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/dist/src/common-auth-embedded/rpc/client.js +2 -0
- package/dist/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/rpc/index.js +5 -0
- package/dist/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/dist/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/dist/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/dist/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/dist/src/common-auth-embedded/source-output.json +1326 -0
- package/dist/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/src/common-auth-embedded/store/attribution.js +60 -0
- package/dist/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/src/common-auth-embedded/store/errors.js +38 -0
- package/dist/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/src/common-auth-embedded/store/hooks.js +34 -0
- package/dist/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/src/common-auth-embedded/store/identity.js +79 -0
- package/dist/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/src/common-auth-embedded/store/index.js +7 -0
- package/dist/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/src/common-auth-embedded/store/mutate.js +500 -0
- package/dist/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/src/common-auth-embedded/store/pool.js +120 -0
- package/dist/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/src/common-auth-embedded/store/provider-state.js +226 -0
- package/dist/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/src/common-auth-embedded/store/publication.js +304 -0
- package/dist/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/pull.js +143 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/dist/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/src/common-auth-embedded/store/refresh.js +225 -0
- package/dist/src/common-auth-embedded/store/reserved.js +13 -0
- package/dist/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/src/common-auth-embedded/store/rows.js +1258 -0
- package/dist/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/runtime.js +68 -0
- package/dist/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/src/common-auth-embedded/store/schema.js +754 -0
- package/dist/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/settings.js +120 -0
- package/dist/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/src/common-auth-embedded/store/torn.js +294 -0
- package/dist/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/tui/index.js +21 -0
- package/dist/src/common-auth-embedded/util/any-signal.js +42 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +4 -0
- package/dist/src/constants.js.map +1 -1
- package/dist/src/ga/proxy-guard.d.ts +120 -0
- package/dist/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/src/ga/proxy-guard.js +269 -0
- package/dist/src/ga/proxy-guard.js.map +1 -0
- package/dist/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/src/ga/rpc/protocol.js +1278 -0
- package/dist/src/ga/rpc/protocol.js.map +1 -0
- package/dist/src/ga/server/auth.d.ts +9 -0
- package/dist/src/ga/server/auth.d.ts.map +1 -0
- package/dist/src/ga/server/auth.js +37 -0
- package/dist/src/ga/server/auth.js.map +1 -0
- package/dist/src/ga/server/index.d.ts +576 -0
- package/dist/src/ga/server/index.d.ts.map +1 -0
- package/dist/src/ga/server/index.js +1012 -0
- package/dist/src/ga/server/index.js.map +1 -0
- package/dist/src/ga/tui/host-ga.d.ts +350 -0
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -0
- package/dist/src/ga/tui/host-ga.js +1242 -0
- package/dist/src/ga/tui/host-ga.js.map +1 -0
- package/dist/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/src/logging/provider-key-policy.js +11 -0
- package/dist/src/logging/provider-key-policy.js.map +1 -0
- package/dist/src/plugin/account-access.d.ts +130 -15
- package/dist/src/plugin/account-access.d.ts.map +1 -1
- package/dist/src/plugin/account-access.js +331 -129
- package/dist/src/plugin/account-access.js.map +1 -1
- package/dist/src/plugin/account-blocks.d.ts +102 -0
- package/dist/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/src/plugin/account-blocks.js +196 -0
- package/dist/src/plugin/account-blocks.js.map +1 -0
- package/dist/src/plugin/accounts.d.ts +85 -1
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +127 -3
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/auth-loader.d.ts +69 -5
- package/dist/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/src/plugin/auth-loader.js +355 -52
- package/dist/src/plugin/auth-loader.js.map +1 -1
- package/dist/src/plugin/background-quota-refresh.d.ts +54 -8
- package/dist/src/plugin/background-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-quota-refresh.js +81 -24
- package/dist/src/plugin/background-quota-refresh.js.map +1 -1
- package/dist/src/plugin/cache/index.d.ts +1 -1
- package/dist/src/plugin/cache/index.d.ts.map +1 -1
- package/dist/src/plugin/cache/index.js +1 -1
- package/dist/src/plugin/cache/index.js.map +1 -1
- package/dist/src/plugin/cache/signature-cache.d.ts +55 -10
- package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/src/plugin/cache/signature-cache.js +100 -41
- package/dist/src/plugin/cache/signature-cache.js.map +1 -1
- package/dist/src/plugin/cache.d.ts +80 -16
- package/dist/src/plugin/cache.d.ts.map +1 -1
- package/dist/src/plugin/cache.js +339 -200
- package/dist/src/plugin/cache.js.map +1 -1
- package/dist/src/plugin/catalog.d.ts +4 -18
- package/dist/src/plugin/catalog.d.ts.map +1 -1
- package/dist/src/plugin/catalog.js +11 -41
- package/dist/src/plugin/catalog.js.map +1 -1
- package/dist/src/plugin/command-apply.d.ts +58 -0
- package/dist/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/src/plugin/command-apply.js +168 -0
- package/dist/src/plugin/command-apply.js.map +1 -0
- package/dist/src/plugin/command-data.d.ts +1 -0
- package/dist/src/plugin/command-data.d.ts.map +1 -1
- package/dist/src/plugin/command-data.js +2 -0
- package/dist/src/plugin/command-data.js.map +1 -1
- package/dist/src/plugin/commands.d.ts +142 -132
- package/dist/src/plugin/commands.d.ts.map +1 -1
- package/dist/src/plugin/commands.js +214 -686
- package/dist/src/plugin/commands.js.map +1 -1
- package/dist/src/plugin/config/index.d.ts +1 -1
- package/dist/src/plugin/config/index.d.ts.map +1 -1
- package/dist/src/plugin/config/index.js +1 -1
- package/dist/src/plugin/config/index.js.map +1 -1
- package/dist/src/plugin/config/loader.d.ts +37 -1
- package/dist/src/plugin/config/loader.d.ts.map +1 -1
- package/dist/src/plugin/config/loader.js +64 -9
- package/dist/src/plugin/config/loader.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +2 -2
- package/dist/src/plugin/config/schema.d.ts +2 -2
- package/dist/src/plugin/config/writer.d.ts +7 -0
- package/dist/src/plugin/config/writer.d.ts.map +1 -1
- package/dist/src/plugin/config/writer.js +10 -1
- package/dist/src/plugin/config/writer.js.map +1 -1
- package/dist/src/plugin/debug.d.ts +72 -29
- package/dist/src/plugin/debug.d.ts.map +1 -1
- package/dist/src/plugin/debug.js +353 -239
- package/dist/src/plugin/debug.js.map +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts.map +1 -1
- package/dist/src/plugin/fetch/retry-state.js.map +1 -1
- package/dist/src/plugin/fetch-interceptor.d.ts +66 -11
- package/dist/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/src/plugin/fetch-interceptor.js +228 -1352
- package/dist/src/plugin/fetch-interceptor.js.map +1 -1
- package/dist/src/plugin/fetch-routing.d.ts +7 -2
- package/dist/src/plugin/fetch-routing.d.ts.map +1 -1
- package/dist/src/plugin/fetch-routing.js +7 -4
- package/dist/src/plugin/fetch-routing.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/src/plugin/ga-location-services.js +1838 -0
- package/dist/src/plugin/ga-location-services.js.map +1 -0
- package/dist/src/plugin/gemini-dump.d.ts +37 -12
- package/dist/src/plugin/gemini-dump.d.ts.map +1 -1
- package/dist/src/plugin/gemini-dump.js +42 -21
- package/dist/src/plugin/gemini-dump.js.map +1 -1
- package/dist/src/plugin/google-search-tool.d.ts +2 -1
- package/dist/src/plugin/google-search-tool.d.ts.map +1 -1
- package/dist/src/plugin/google-search-tool.js +4 -1
- package/dist/src/plugin/google-search-tool.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +505 -141
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/killswitch.d.ts +1 -2
- package/dist/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.d.ts +24 -1
- package/dist/src/plugin/lifecycle.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.js +95 -8
- package/dist/src/plugin/lifecycle.js.map +1 -1
- package/dist/src/plugin/logger.d.ts +61 -10
- package/dist/src/plugin/logger.d.ts.map +1 -1
- package/dist/src/plugin/logger.js +134 -63
- package/dist/src/plugin/logger.js.map +1 -1
- package/dist/src/plugin/neutral-types.d.ts +42 -0
- package/dist/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/src/plugin/neutral-types.js +12 -0
- package/dist/src/plugin/neutral-types.js.map +1 -0
- package/dist/src/plugin/oauth-methods.d.ts +2 -1
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/src/plugin/oauth-methods.js +173 -88
- package/dist/src/plugin/oauth-methods.js.map +1 -1
- package/dist/src/plugin/operator-settings.d.ts +34 -0
- package/dist/src/plugin/operator-settings.d.ts.map +1 -1
- package/dist/src/plugin/operator-settings.js +105 -2
- package/dist/src/plugin/operator-settings.js.map +1 -1
- package/dist/src/plugin/persist-account-pool.d.ts +63 -2
- package/dist/src/plugin/persist-account-pool.d.ts.map +1 -1
- package/dist/src/plugin/persist-account-pool.js +125 -2
- package/dist/src/plugin/persist-account-pool.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +335 -35
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +825 -95
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/refresh-queue.d.ts +35 -5
- package/dist/src/plugin/refresh-queue.d.ts.map +1 -1
- package/dist/src/plugin/refresh-queue.js +50 -16
- package/dist/src/plugin/refresh-queue.js.map +1 -1
- package/dist/src/plugin/request-helpers.d.ts +30 -5
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +82 -17
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/request.d.ts +63 -15
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +229 -65
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/session-context.d.ts.map +1 -1
- package/dist/src/plugin/session-context.js +5 -2
- package/dist/src/plugin/session-context.js.map +1 -1
- package/dist/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/src/plugin/shared/local-grant.js +19 -0
- package/dist/src/plugin/shared/local-grant.js.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.js +118 -0
- package/dist/src/plugin/shared/request-cancellation.js.map +1 -0
- package/dist/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-services.js +1752 -0
- package/dist/src/plugin/shared/request-services.js.map +1 -0
- package/dist/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/src/plugin/shared/runtime.js +345 -0
- package/dist/src/plugin/shared/runtime.js.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.js +41 -0
- package/dist/src/plugin/shared/source-sidebar.js.map +1 -0
- package/dist/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-menu.js +49 -0
- package/dist/src/plugin/shared/vault-menu.js.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.js +485 -0
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -0
- package/dist/src/plugin/storage.d.ts +127 -1
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +188 -3
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/token.d.ts +23 -1
- package/dist/src/plugin/token.d.ts.map +1 -1
- package/dist/src/plugin/token.js +117 -58
- package/dist/src/plugin/token.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts +1 -10
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +6 -42
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin/vault-activation.d.ts +11 -0
- package/dist/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/src/plugin/vault-activation.js +53 -0
- package/dist/src/plugin/vault-activation.js.map +1 -0
- package/dist/src/plugin/vault-custody.d.ts +131 -0
- package/dist/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/src/plugin/vault-custody.js +381 -0
- package/dist/src/plugin/vault-custody.js.map +1 -0
- package/dist/src/quota-presentation.d.ts +18 -0
- package/dist/src/quota-presentation.d.ts.map +1 -0
- package/dist/src/quota-presentation.js +58 -0
- package/dist/src/quota-presentation.js.map +1 -0
- package/dist/src/rpc/notifications.d.ts +2 -2
- package/dist/src/rpc/notifications.d.ts.map +1 -1
- package/dist/src/rpc/notifications.js +1 -1
- package/dist/src/rpc/notifications.js.map +1 -1
- package/dist/src/rpc/port-file.d.ts +2 -12
- package/dist/src/rpc/port-file.d.ts.map +1 -1
- package/dist/src/rpc/port-file.js +5 -107
- package/dist/src/rpc/port-file.js.map +1 -1
- package/dist/src/rpc/protocol.d.ts +47 -16
- package/dist/src/rpc/protocol.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.d.ts +27 -3
- package/dist/src/rpc/rpc-client.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.js +55 -45
- package/dist/src/rpc/rpc-client.js.map +1 -1
- package/dist/src/rpc/rpc-server.d.ts +13 -2
- package/dist/src/rpc/rpc-server.d.ts.map +1 -1
- package/dist/src/rpc/rpc-server.js +38 -212
- package/dist/src/rpc/rpc-server.js.map +1 -1
- package/dist/src/server.d.ts +30 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +29 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/sidebar-projection.d.ts +102 -0
- package/dist/src/sidebar-projection.d.ts.map +1 -0
- package/dist/src/sidebar-projection.js +146 -0
- package/dist/src/sidebar-projection.js.map +1 -0
- package/dist/src/sidebar-state.d.ts +13 -5
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +49 -16
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui/command-dialogs.d.ts +58 -52
- package/dist/src/tui/command-dialogs.d.ts.map +1 -1
- package/dist/src/tui/command-dialogs.js +379 -571
- package/dist/src/tui/command-dialogs.js.map +1 -1
- package/dist/src/tui/file-logger.d.ts +2 -3
- package/dist/src/tui/file-logger.d.ts.map +1 -1
- package/dist/src/tui/file-logger.js +21 -7
- package/dist/src/tui/file-logger.js.map +1 -1
- package/dist/src/tui/host-api.d.ts +196 -0
- package/dist/src/tui/host-api.d.ts.map +1 -0
- package/dist/src/tui/host-api.js +357 -0
- package/dist/src/tui/host-api.js.map +1 -0
- package/dist/src/tui/host-v1.d.ts +60 -0
- package/dist/src/tui/host-v1.d.ts.map +1 -0
- package/dist/src/tui/host-v1.js +147 -0
- package/dist/src/tui/host-v1.js.map +1 -0
- package/dist/src/tui/vault-setup.d.ts +98 -0
- package/dist/src/tui/vault-setup.d.ts.map +1 -0
- package/dist/src/tui/vault-setup.js +198 -0
- package/dist/src/tui/vault-setup.js.map +1 -0
- package/dist/src/tui.d.ts +4 -11
- package/dist/src/tui.d.ts.map +1 -1
- package/dist/src/tui.js +33 -75
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +380 -0
- package/dist/tui-ga-build-map.json +187 -0
- package/dist/types/src/antigravity/oauth.d.ts +2 -0
- package/dist/types/src/antigravity/oauth.d.ts.map +1 -0
- package/dist/types/src/cli.d.ts +66 -0
- package/dist/types/src/cli.d.ts.map +1 -0
- package/dist/types/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/types/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/types/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/types/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/types/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/types/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/types/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/types/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/types/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/types/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/types/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/types/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/types/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/types/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/types/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/types/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/types/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/types/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/types/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/types/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/types/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/types/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/types/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/types/src/constants.d.ts +3 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/ga/proxy-guard.d.ts +120 -0
- package/dist/types/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/types/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/ga/server/auth.d.ts +9 -0
- package/dist/types/src/ga/server/auth.d.ts.map +1 -0
- package/dist/types/src/ga/server/index.d.ts +576 -0
- package/dist/types/src/ga/server/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts +16 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts +9 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts +34 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts +25 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts.map +1 -0
- package/dist/types/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/types/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/types/src/plugin/account-access.d.ts +214 -0
- package/dist/types/src/plugin/account-access.d.ts.map +1 -0
- package/dist/types/src/plugin/account-blocks.d.ts +102 -0
- package/dist/types/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts +34 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts.map +1 -0
- package/dist/types/src/plugin/accounts.d.ts +94 -0
- package/dist/types/src/plugin/accounts.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts +2 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-transport.d.ts +2 -0
- package/dist/types/src/plugin/agy-transport.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-doctor.d.ts +30 -0
- package/dist/types/src/plugin/auth-doctor.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-drift.d.ts +13 -0
- package/dist/types/src/plugin/auth-drift.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-loader.d.ts +114 -0
- package/dist/types/src/plugin/auth-loader.d.ts.map +1 -0
- package/dist/types/src/plugin/auth.d.ts +2 -0
- package/dist/types/src/plugin/auth.d.ts.map +1 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts +192 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts.map +1 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts +156 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts.map +1 -0
- package/dist/types/src/plugin/cache.d.ts +109 -0
- package/dist/types/src/plugin/cache.d.ts.map +1 -0
- package/dist/types/src/plugin/catalog.d.ts +9 -0
- package/dist/types/src/plugin/catalog.d.ts.map +1 -0
- package/dist/types/src/plugin/cli.d.ts +44 -0
- package/dist/types/src/plugin/cli.d.ts.map +1 -0
- package/dist/types/src/plugin/command-apply.d.ts +58 -0
- package/dist/types/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/types/src/plugin/command-data.d.ts +330 -0
- package/dist/types/src/plugin/command-data.d.ts.map +1 -0
- package/dist/types/src/plugin/commands.d.ts +164 -0
- package/dist/types/src/plugin/commands.d.ts.map +1 -0
- package/dist/types/src/plugin/config/index.d.ts +16 -0
- package/dist/types/src/plugin/config/index.d.ts.map +1 -0
- package/dist/types/src/plugin/config/loader.d.ts +72 -0
- package/dist/types/src/plugin/config/loader.d.ts.map +1 -0
- package/dist/types/src/plugin/config/models.d.ts +3 -0
- package/dist/types/src/plugin/config/models.d.ts.map +1 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts +29 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/schema.d.ts +162 -0
- package/dist/types/src/plugin/config/schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/updater.d.ts +55 -0
- package/dist/types/src/plugin/config/updater.d.ts.map +1 -0
- package/dist/types/src/plugin/config/writer.d.ts +41 -0
- package/dist/types/src/plugin/config/writer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts +3 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts +12 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts +34 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts.map +1 -0
- package/dist/types/src/plugin/debug.d.ts +144 -0
- package/dist/types/src/plugin/debug.d.ts.map +1 -0
- package/dist/types/src/plugin/dependencies.d.ts +129 -0
- package/dist/types/src/plugin/dependencies.d.ts.map +1 -0
- package/dist/types/src/plugin/errors.d.ts +55 -0
- package/dist/types/src/plugin/errors.d.ts.map +1 -0
- package/dist/types/src/plugin/event-handler.d.ts +53 -0
- package/dist/types/src/plugin/event-handler.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts +61 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts +30 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts +114 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-routing.d.ts +31 -0
- package/dist/types/src/plugin/fetch-routing.d.ts.map +1 -0
- package/dist/types/src/plugin/fingerprint.d.ts +2 -0
- package/dist/types/src/plugin/fingerprint.d.ts.map +1 -0
- package/dist/types/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/types/src/plugin/gemini-dump.d.ts +72 -0
- package/dist/types/src/plugin/gemini-dump.d.ts.map +1 -0
- package/dist/types/src/plugin/google-search-tool.d.ts +10 -0
- package/dist/types/src/plugin/google-search-tool.d.ts.map +1 -0
- package/dist/types/src/plugin/image-saver.d.ts +6 -0
- package/dist/types/src/plugin/image-saver.d.ts.map +1 -0
- package/dist/types/src/plugin/index.d.ts +30 -0
- package/dist/types/src/plugin/index.d.ts.map +1 -0
- package/dist/types/src/plugin/killswitch.d.ts +93 -0
- package/dist/types/src/plugin/killswitch.d.ts.map +1 -0
- package/dist/types/src/plugin/lifecycle.d.ts +63 -0
- package/dist/types/src/plugin/lifecycle.d.ts.map +1 -0
- package/dist/types/src/plugin/logger.d.ts +83 -0
- package/dist/types/src/plugin/logger.d.ts.map +1 -0
- package/dist/types/src/plugin/logging-utils.d.ts +57 -0
- package/dist/types/src/plugin/logging-utils.d.ts.map +1 -0
- package/dist/types/src/plugin/model-registry.d.ts +2 -0
- package/dist/types/src/plugin/model-registry.d.ts.map +1 -0
- package/dist/types/src/plugin/neutral-types.d.ts +42 -0
- package/dist/types/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-login.d.ts +22 -0
- package/dist/types/src/plugin/oauth-login.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-methods.d.ts +43 -0
- package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -0
- package/dist/types/src/plugin/operator-settings.d.ts +74 -0
- package/dist/types/src/plugin/operator-settings.d.ts.map +1 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts +98 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts.map +1 -0
- package/dist/types/src/plugin/project.d.ts +2 -0
- package/dist/types/src/plugin/project.d.ts.map +1 -0
- package/dist/types/src/plugin/prompt-context.d.ts +18 -0
- package/dist/types/src/plugin/prompt-context.d.ts.map +1 -0
- package/dist/types/src/plugin/quota.d.ts +441 -0
- package/dist/types/src/plugin/quota.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/constants.d.ts +22 -0
- package/dist/types/src/plugin/recovery/constants.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/storage.d.ts +24 -0
- package/dist/types/src/plugin/recovery/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/types.d.ts +116 -0
- package/dist/types/src/plugin/recovery/types.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery.d.ts +61 -0
- package/dist/types/src/plugin/recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/refresh-queue.d.ts +133 -0
- package/dist/types/src/plugin/refresh-queue.d.ts.map +1 -0
- package/dist/types/src/plugin/request-helpers.d.ts +304 -0
- package/dist/types/src/plugin/request-helpers.d.ts.map +1 -0
- package/dist/types/src/plugin/request.d.ts +161 -0
- package/dist/types/src/plugin/request.d.ts.map +1 -0
- package/dist/types/src/plugin/rotation.d.ts +2 -0
- package/dist/types/src/plugin/rotation.d.ts.map +1 -0
- package/dist/types/src/plugin/search.d.ts +25 -0
- package/dist/types/src/plugin/search.d.ts.map +1 -0
- package/dist/types/src/plugin/server.d.ts +23 -0
- package/dist/types/src/plugin/server.d.ts.map +1 -0
- package/dist/types/src/plugin/session-context.d.ts +22 -0
- package/dist/types/src/plugin/session-context.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/types/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/types/src/plugin/storage.d.ts +221 -0
- package/dist/types/src/plugin/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts +5 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts.map +1 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts +90 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/token.d.ts +41 -0
- package/dist/types/src/plugin/token.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts +2 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/index.d.ts +2 -0
- package/dist/types/src/plugin/transform/index.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts +2 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/types.d.ts +2 -0
- package/dist/types/src/plugin/transform/types.d.ts.map +1 -0
- package/dist/types/src/plugin/types.d.ts +36 -0
- package/dist/types/src/plugin/types.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/ansi.d.ts +32 -0
- package/dist/types/src/plugin/ui/ansi.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts +59 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/confirm.d.ts +2 -0
- package/dist/types/src/plugin/ui/confirm.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts +73 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/select.d.ts +23 -0
- package/dist/types/src/plugin/ui/select.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-activation.d.ts +11 -0
- package/dist/types/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-custody.d.ts +131 -0
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/types/src/plugin/version.d.ts +2 -0
- package/dist/types/src/plugin/version.d.ts.map +1 -0
- package/dist/types/src/quota-presentation.d.ts +18 -0
- package/dist/types/src/quota-presentation.d.ts.map +1 -0
- package/dist/types/src/rpc/notifications.d.ts +6 -0
- package/dist/types/src/rpc/notifications.d.ts.map +1 -0
- package/dist/types/src/rpc/protocol.d.ts +53 -0
- package/dist/types/src/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-dir.d.ts +4 -0
- package/dist/types/src/rpc/rpc-dir.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-server.d.ts +24 -0
- package/dist/types/src/rpc/rpc-server.d.ts.map +1 -0
- package/dist/types/src/server.d.ts +30 -0
- package/dist/types/src/server.d.ts.map +1 -0
- package/dist/types/src/sidebar-state.d.ts +365 -0
- package/dist/types/src/sidebar-state.d.ts.map +1 -0
- package/dist/types/src/tui/host-api.d.ts +196 -0
- package/dist/types/src/tui/host-api.d.ts.map +1 -0
- package/package.json +46 -19
- package/server.js +6 -0
- package/src/common-auth-embedded/NOTICE.txt +21 -0
- package/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/src/common-auth-embedded/claustrum/index.js +22 -0
- package/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/src/common-auth-embedded/commands/builtins.js +534 -0
- package/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/src/common-auth-embedded/commands/index.js +5 -0
- package/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/src/common-auth-embedded/commands/menu.js +300 -0
- package/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/src/common-auth-embedded/commands/model.js +16 -0
- package/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/src/common-auth-embedded/commands/pi.js +206 -0
- package/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/src/common-auth-embedded/commands/seam.js +301 -0
- package/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/src/common-auth-embedded/fs/index.js +6 -0
- package/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/src/common-auth-embedded/logger/engine.js +246 -0
- package/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/src/common-auth-embedded/logger/index.js +3 -0
- package/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/src/common-auth-embedded/logger/redact.js +83 -0
- package/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/src/common-auth-embedded/opencode2/index.js +4 -0
- package/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/src/common-auth-embedded/opencode2/install.js +886 -0
- package/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/src/common-auth-embedded/quota/codec.js +12 -0
- package/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/src/common-auth-embedded/quota/format.js +138 -0
- package/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/src/common-auth-embedded/quota/index.js +5 -0
- package/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/src/common-auth-embedded/quota/map.js +105 -0
- package/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/src/common-auth-embedded/quota/merge.js +162 -0
- package/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/src/common-auth-embedded/quota/projection.js +134 -0
- package/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/src/common-auth-embedded/routing/admission.js +142 -0
- package/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/src/common-auth-embedded/routing/index.js +4 -0
- package/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/src/common-auth-embedded/routing/ordered.js +58 -0
- package/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/src/common-auth-embedded/routing/pins.js +34 -0
- package/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/src/common-auth-embedded/routing/sticky.js +339 -0
- package/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/src/common-auth-embedded/rpc/client.js +2 -0
- package/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/src/common-auth-embedded/rpc/index.js +5 -0
- package/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/src/common-auth-embedded/source-output.json +1326 -0
- package/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/src/common-auth-embedded/store/attribution.js +60 -0
- package/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/src/common-auth-embedded/store/errors.js +38 -0
- package/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/src/common-auth-embedded/store/hooks.js +34 -0
- package/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/src/common-auth-embedded/store/identity.js +79 -0
- package/src/common-auth-embedded/store/index.d.ts +21 -0
- package/src/common-auth-embedded/store/index.js +7 -0
- package/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/src/common-auth-embedded/store/mutate.js +500 -0
- package/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/src/common-auth-embedded/store/pool.js +120 -0
- package/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/src/common-auth-embedded/store/provider-state.js +226 -0
- package/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/src/common-auth-embedded/store/publication.js +304 -0
- package/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/src/common-auth-embedded/store/pull.js +143 -0
- package/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/src/common-auth-embedded/store/refresh.js +225 -0
- package/src/common-auth-embedded/store/reserved.js +13 -0
- package/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/src/common-auth-embedded/store/rows.js +1258 -0
- package/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/src/common-auth-embedded/store/runtime.js +68 -0
- package/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/src/common-auth-embedded/store/schema.js +754 -0
- package/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/src/common-auth-embedded/store/settings.js +120 -0
- package/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/src/common-auth-embedded/store/torn.js +294 -0
- package/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/src/common-auth-embedded/tui/index.js +21 -0
- package/src/common-auth-embedded/util/any-signal.js +42 -0
- package/src/plugin/command-data.ts +3 -0
- package/src/rpc/port-file.ts +6 -140
- package/src/rpc/protocol.ts +59 -24
- package/src/rpc/rpc-client.ts +101 -71
- package/src/sidebar-state.ts +82 -24
- package/src/tui/command-dialogs.tsx +412 -776
- package/src/tui/entry.d.mts +17 -0
- package/src/tui/entry.mjs +34 -66
- package/src/tui/file-logger.ts +22 -7
- package/src/tui-compiled/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-compiled/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-compiled/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-compiled/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-compiled/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-compiled/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-compiled/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-compiled/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-compiled/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-compiled/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-compiled/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-compiled/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-compiled/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-compiled/logging/provider-key-policy.js +3 -0
- package/src/tui-compiled/quota-presentation.js +42 -0
- package/src/tui-compiled/rpc/rpc-client.js +35 -0
- package/src/tui-compiled/rpc/rpc-dir.js +13 -0
- package/src/tui-compiled/selector.js +21 -0
- package/src/tui-compiled/sidebar-state.js +401 -0
- package/src/tui-compiled/tui/command-dialogs.js +424 -0
- package/src/tui-compiled/tui/file-logger.js +73 -0
- package/src/tui-compiled/tui/host-api.js +269 -0
- package/src/tui-compiled/tui/host-v1.js +228 -0
- package/src/tui-compiled/tui-preferences.js +230 -0
- package/src/tui-compiled/{tui.tsx → tui.js} +140 -231
- package/src/tui-ga-compiled/host-ga.js +1304 -0
- package/src/tui-ga-compiled/selector.js +21 -0
- package/src/tui-ga-compiled/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-compiled/shared/0e19a88ff3535906-command-dialogs.js +424 -0
- package/src/tui-ga-compiled/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-compiled/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-compiled/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-compiled/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-compiled/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-ga-raw/host-ga.tsx +1740 -0
- package/src/tui-ga-raw/selector.js +21 -0
- package/src/tui-ga-raw/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-raw/shared/0e19a88ff3535906-command-dialogs.tsx +468 -0
- package/src/tui-ga-raw/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-raw/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-raw/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-raw/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-raw/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-raw/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-raw/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-raw/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-raw/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-raw/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-raw/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-raw/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-raw/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-raw/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-raw/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-raw/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-raw/logging/provider-key-policy.js +3 -0
- package/src/tui-raw/quota-presentation.js +42 -0
- package/src/tui-raw/rpc/rpc-client.js +35 -0
- package/src/tui-raw/rpc/rpc-dir.js +13 -0
- package/src/tui-raw/selector.js +21 -0
- package/src/tui-raw/sidebar-state.js +401 -0
- package/src/tui-raw/tui/command-dialogs.tsx +468 -0
- package/src/tui-raw/tui/file-logger.js +73 -0
- package/src/tui-raw/tui/host-api.js +269 -0
- package/src/tui-raw/tui/host-v1.tsx +249 -0
- package/src/tui-raw/tui-preferences.js +230 -0
- package/src/tui-raw/tui.tsx +1088 -0
- package/src/tui.tsx +58 -141
- package/tui.js +6 -0
- package/src/tui-compiled/plugin/command-data.ts +0 -931
- package/src/tui-compiled/rpc/port-file.ts +0 -143
- package/src/tui-compiled/rpc/protocol.ts +0 -31
- package/src/tui-compiled/rpc/rpc-client.ts +0 -102
- package/src/tui-compiled/rpc/rpc-dir.ts +0 -24
- package/src/tui-compiled/sidebar-state.ts +0 -991
- package/src/tui-compiled/tui/command-dialogs.tsx +0 -779
- package/src/tui-compiled/tui/file-logger.ts +0 -145
- package/src/tui-compiled/tui-preferences.ts +0 -416
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode adapter for the harness-agnostic quota manager.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the core `QuotaManager` types and helpers so call sites in
|
|
5
|
+
* `plugin.ts` and other modules don't need to switch imports. Also wires up
|
|
6
|
+
* the host-specific fetch callback that handles:
|
|
7
|
+
* 1. Token refresh via the existing `refreshAccessToken` path.
|
|
8
|
+
* 2. Persisting rotated refresh tokens via `client.auth.set` (matching
|
|
9
|
+
* legacy behavior).
|
|
10
|
+
* 3. Resolving project context via `ensureProjectContext`.
|
|
11
|
+
*
|
|
12
|
+
* The legacy `checkAccountsQuota(accounts, client, providerId)` export is
|
|
13
|
+
* retained as a compatibility wrapper that creates a short-lived manager
|
|
14
|
+
* with `force: true` — manual quota screens must always refresh, even if
|
|
15
|
+
* the background manager has backed off.
|
|
16
|
+
*/
|
|
17
|
+
import { type AccountMetadataV3, type AccountQuotaResult, type AccountQuotaTarget, type AccountRepository, type AntigravityQuotaCheckReport, type AntigravityVaultAccountSource, type AccountManager as CoreAccountManager, type FetchAccountQuota, type FetchAvailableModelsOptions, type GeminiCliQuotaSummary, type QuotaManager, type QuotaSummary, type RowRef, type VaultRouteRef, type VaultStateAttribution } from '@cortexkit/antigravity-auth-core';
|
|
18
|
+
import { type SidebarMachineState } from '../sidebar-state.js';
|
|
19
|
+
import { type LocalAccountCredentials } from './accounts.js';
|
|
20
|
+
import { type Logger } from './logger.js';
|
|
21
|
+
import type { PluginClient } from './types.js';
|
|
22
|
+
type QuotaFetch = NonNullable<FetchAvailableModelsOptions['fetchVia']>;
|
|
23
|
+
export type { AccountQuotaResult, AccountQuotaStatus, GeminiCliQuotaModel, GeminiCliQuotaSummary, PerModelQuotaEntry, QuotaGroup, QuotaGroupSummary, QuotaManager, QuotaManagerOptions, QuotaSummary, } from '@cortexkit/antigravity-auth-core';
|
|
24
|
+
export { classifyQuotaGroup, createQuotaManager, defaultKeyOf, } from '@cortexkit/antigravity-auth-core';
|
|
25
|
+
export interface CreateOpenCodeQuotaManagerOptions {
|
|
26
|
+
/** Override the default key derivation (email → refresh-token hash). */
|
|
27
|
+
keyOf?: (account: AccountMetadataV3) => string;
|
|
28
|
+
baseBackoffMs?: number;
|
|
29
|
+
maxBackoffMs?: number;
|
|
30
|
+
fetchTimeoutMs?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Build an OpenCode-wired quota manager.
|
|
34
|
+
*
|
|
35
|
+
* The returned manager owns its cache, in-flight dedupe, and backoff state.
|
|
36
|
+
* Register its `dispose()` with `PluginLifecycle` so refreshes abort on plugin
|
|
37
|
+
* shutdown.
|
|
38
|
+
*
|
|
39
|
+
* The wrapper observes `refreshAccount` / `refreshAccounts` and pushes a
|
|
40
|
+
* redacted sidebar snapshot after every refresh (success or backoff) so
|
|
41
|
+
* the TUI's next poll renders the freshest cached quota. The snapshot is
|
|
42
|
+
* sourced from the live AccountManager view (`getAccountsForSidebar`) so
|
|
43
|
+
* it carries the just-updated percentages; before bootstrapping it is a
|
|
44
|
+
* no-op.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createOpenCodeQuotaManager(client: PluginClient, providerId?: string, options?: CreateOpenCodeQuotaManagerOptions & {
|
|
47
|
+
/**
|
|
48
|
+
* Optional account-snapshot provider. Wired by the plugin entry to
|
|
49
|
+
* the live `AccountManager.getAccounts()` so each refresh can build
|
|
50
|
+
* a sidebar snapshot from the actual cached quota + cooldown. When
|
|
51
|
+
* omitted, the wrapper falls back to a no-op snapshot push.
|
|
52
|
+
*/
|
|
53
|
+
getAccountsForSidebar?: () => SidebarQuotaAccount[] | null;
|
|
54
|
+
/**
|
|
55
|
+
* Optional provider for the active-account indexes per model family.
|
|
56
|
+
* Wired by the plugin entry so every quota-refresh sidebar snapshot
|
|
57
|
+
* carries the real `current` flag — not a hardcoded `false`.
|
|
58
|
+
*/
|
|
59
|
+
getActiveIndexByFamily?: () => {
|
|
60
|
+
claude: number;
|
|
61
|
+
gemini: number;
|
|
62
|
+
} | null;
|
|
63
|
+
/**
|
|
64
|
+
* Optional transport adapter used for both `fetchAvailableModels`
|
|
65
|
+
* and the project-context lookup. When omitted, the production
|
|
66
|
+
* `fetchWithAgyCliTransport` runs and binds to the real
|
|
67
|
+
* Antigravity endpoints; the e2e harness injects a mock here so
|
|
68
|
+
* quota refresh + project discovery stay on the loopback server.
|
|
69
|
+
*/
|
|
70
|
+
fetchVia?: QuotaFetch;
|
|
71
|
+
mayRun?: () => Promise<boolean>;
|
|
72
|
+
fetchStoreAccountQuota?: FetchAccountQuota;
|
|
73
|
+
/** Select the sidebar's account source before reading rows, so vault mode cannot expose the local pool. */
|
|
74
|
+
publishSidebar?: () => Promise<void>;
|
|
75
|
+
}): QuotaManager;
|
|
76
|
+
/**
|
|
77
|
+
* Sidebar binding for one location's quota manager. `createOpenCodeQuotaManager`
|
|
78
|
+
* (the OpenCode 1 plugin's quota manager) reads these from process-wide
|
|
79
|
+
* state; a location passes each one explicitly.
|
|
80
|
+
*/
|
|
81
|
+
export interface LocationQuotaSidebarOptions {
|
|
82
|
+
/**
|
|
83
|
+
* Receives each snapshot: the sidebar file for the OpenCode 1 layout, or
|
|
84
|
+
* an in-memory store for an OpenCode 2 location, which keeps no file.
|
|
85
|
+
*/
|
|
86
|
+
write: (state: SidebarMachineState) => Promise<void>;
|
|
87
|
+
/** Live account rows for the snapshot; `null` before accounts load. */
|
|
88
|
+
getAccounts: () => SidebarQuotaAccount[] | null;
|
|
89
|
+
getActiveIndexByFamily?: () => {
|
|
90
|
+
claude: number;
|
|
91
|
+
gemini: number;
|
|
92
|
+
} | null;
|
|
93
|
+
/**
|
|
94
|
+
* Health score (0–100, how reliably the account has answered recently)
|
|
95
|
+
* per account index, from this location's account rotation. When omitted
|
|
96
|
+
* the snapshot carries no score, and the sidebar shows its default of 100.
|
|
97
|
+
*/
|
|
98
|
+
healthScore?: (index: number) => number;
|
|
99
|
+
/** Clock for the snapshot's `checkedAt`. Defaults to `Date.now`. */
|
|
100
|
+
now?: () => number;
|
|
101
|
+
}
|
|
102
|
+
export interface LocationQuotaManagerOptions extends CreateOpenCodeQuotaManagerOptions {
|
|
103
|
+
/** This location's logger. Required: there is no module-level fallback. */
|
|
104
|
+
logger: Logger;
|
|
105
|
+
/**
|
|
106
|
+
* Fetches one account's quota with this location's credentials and
|
|
107
|
+
* transport. The location's account service supplies it; this module never
|
|
108
|
+
* builds a host client or reads a shared credential cache.
|
|
109
|
+
*/
|
|
110
|
+
fetchAccountQuota: FetchAccountQuota;
|
|
111
|
+
/** Sidebar snapshot binding; without it refreshes write no snapshot. */
|
|
112
|
+
sidebar?: LocationQuotaSidebarOptions;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Build one location's quota manager. Backoff, in-flight dedupe and the
|
|
116
|
+
* per-account cache belong to the returned manager alone, so a second
|
|
117
|
+
* location never shares another location's backoff or cached results.
|
|
118
|
+
* Refreshes push a sidebar snapshot exactly like `createOpenCodeQuotaManager`
|
|
119
|
+
* does, but to the location's own state file and through its own logger.
|
|
120
|
+
*/
|
|
121
|
+
export declare function createLocationQuotaManager(options: LocationQuotaManagerOptions): QuotaManager;
|
|
122
|
+
/**
|
|
123
|
+
* Compatibility wrapper used by code paths that want a one-shot check across
|
|
124
|
+
* the full account pool with no shared cache.
|
|
125
|
+
*
|
|
126
|
+
* Equivalent to spinning up a short-lived manager with `force: true` so
|
|
127
|
+
* manual quota dialogs always reflect the latest data even if the background
|
|
128
|
+
* manager has backed off.
|
|
129
|
+
*/
|
|
130
|
+
export declare function checkAccountsQuotaWith(accounts: AccountMetadataV3[], fetchAccountQuota: FetchAccountQuota): Promise<AccountQuotaResult[]>;
|
|
131
|
+
export declare function checkAccountsQuotaStandalone(accounts: AccountMetadataV3[], options: {
|
|
132
|
+
refresh: boolean;
|
|
133
|
+
}): Promise<AccountQuotaResult[]>;
|
|
134
|
+
export declare function checkAccountsQuota(accounts: AccountMetadataV3[], client: PluginClient, providerId?: string): Promise<AccountQuotaResult[]>;
|
|
135
|
+
/** One live account row a sidebar quota snapshot is built from. */
|
|
136
|
+
export interface SidebarQuotaAccount {
|
|
137
|
+
index: number;
|
|
138
|
+
label?: string;
|
|
139
|
+
enabled?: boolean;
|
|
140
|
+
coolingDownUntil?: number;
|
|
141
|
+
cachedQuota?: AccountMetadataV3['cachedQuota'];
|
|
142
|
+
cachedQuotaUpdatedAt?: number;
|
|
143
|
+
cachedQuotaAccountId?: string;
|
|
144
|
+
currentQuotaAccountId?: string;
|
|
145
|
+
/** Captured plan tier to surface in the sidebar state file. */
|
|
146
|
+
tier?: {
|
|
147
|
+
id: string;
|
|
148
|
+
paidId?: string;
|
|
149
|
+
capturedAt: number;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Where a sidebar quota snapshot goes and which state it reads. Omitted
|
|
154
|
+
* fields use process-wide defaults, as the OpenCode 1 plugin (one location
|
|
155
|
+
* per process) always has: the default sidebar file, module logger, health
|
|
156
|
+
* tracker and wall clock.
|
|
157
|
+
*/
|
|
158
|
+
export interface SidebarQuotaSnapshotOptions {
|
|
159
|
+
/** Sidebar state file to write. Defaults to the process-wide file. */
|
|
160
|
+
stateFile?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Receives the redacted quota snapshot (account rows, `checkedAt` and
|
|
163
|
+
* backoff) instead of it being written to a sidebar file. When given,
|
|
164
|
+
* `stateFile` is ignored and no file is written.
|
|
165
|
+
*/
|
|
166
|
+
write?: (state: SidebarMachineState) => Promise<void>;
|
|
167
|
+
/** Receives best-effort write failures. Defaults to the module logger. */
|
|
168
|
+
logger?: Pick<Logger, 'debug'>;
|
|
169
|
+
/**
|
|
170
|
+
* Health score per account index. `undefined` reads the process-wide
|
|
171
|
+
* tracker; `null` writes no score so the projection uses its default.
|
|
172
|
+
*/
|
|
173
|
+
healthScore?: ((index: number) => number) | null;
|
|
174
|
+
/** Clock for `checkedAt`. Defaults to `Date.now`. */
|
|
175
|
+
now?: () => number;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Push a quota refresh into the sidebar. Called by every quota refresh
|
|
179
|
+
* call site (manual `/antigravity-quota`, the `check` menu action, and the
|
|
180
|
+
* background refresh in `fetch-interceptor`) AFTER the results have been
|
|
181
|
+
* folded back into the AccountManager's cached quota. The function reads
|
|
182
|
+
* the live account snapshot through `getAccounts` so the redacted entry
|
|
183
|
+
* carries the just-refreshed percentages — not the previous tick's stale
|
|
184
|
+
* numbers and not `undefined`.
|
|
185
|
+
*
|
|
186
|
+
* The mapping is deliberately tolerant: if `getAccounts` returns `null`
|
|
187
|
+
* (e.g. before the plugin has finished bootstrapping) the call is a no-op.
|
|
188
|
+
* On lock contention the error is logged-and-swallowed so a quota dialog
|
|
189
|
+
* never fails just because the sidebar file is busy.
|
|
190
|
+
*/
|
|
191
|
+
export declare function pushSidebarQuotaSnapshot(getAccounts: () => SidebarQuotaAccount[] | null, backoffUntil?: number, getActiveIndexByFamily?: () => {
|
|
192
|
+
claude: number;
|
|
193
|
+
gemini: number;
|
|
194
|
+
} | null, options?: SidebarQuotaSnapshotOptions): Promise<void>;
|
|
195
|
+
/** The vault account source operations a quota check uses. */
|
|
196
|
+
export type VaultQuotaSource = Pick<AntigravityVaultAccountSource, 'send' | 'attribution'>;
|
|
197
|
+
/** Quota summaries and the credential versions that authorized their requests. */
|
|
198
|
+
export interface VaultQuotaReading {
|
|
199
|
+
quota: QuotaSummary;
|
|
200
|
+
geminiCliQuota: GeminiCliQuotaSummary;
|
|
201
|
+
fellBackToLegacy: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* The credential and record version of the receipt that authorized the
|
|
204
|
+
* request whose answer produced `quota` (no token, no project), for
|
|
205
|
+
* recording it with the source's `commitState`. Absent when no quota
|
|
206
|
+
* answer was obtained.
|
|
207
|
+
*/
|
|
208
|
+
quotaAttribution?: VaultStateAttribution;
|
|
209
|
+
/** Likewise for `geminiCliQuota`. */
|
|
210
|
+
geminiCliAttribution?: VaultStateAttribution;
|
|
211
|
+
}
|
|
212
|
+
export interface VaultQuotaCheckOptions {
|
|
213
|
+
source: VaultQuotaSource;
|
|
214
|
+
/** The vault account, as selected from the source's routes. */
|
|
215
|
+
ref: VaultRouteRef;
|
|
216
|
+
signal: AbortSignal;
|
|
217
|
+
logger: Pick<Logger, 'debug'>;
|
|
218
|
+
/** Physical request transport; defaults to `fetchWithActiveTimeout`. */
|
|
219
|
+
transport?: QuotaFetch;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Fetches a vault account's quota: the windowed quota summary (with the
|
|
223
|
+
* legacy model-list fallback) and the Gemini CLI quota, from the same core
|
|
224
|
+
* builders and endpoint list the local check uses.
|
|
225
|
+
*
|
|
226
|
+
* Every physical request (each endpoint, each fallback, and the model
|
|
227
|
+
* list's retry without a project after a 403) is one `source.send` with a
|
|
228
|
+
* new served receipt, and that request's bearer and project come from that
|
|
229
|
+
* receipt alone. Nothing is authorized once and reused, and no local refresh
|
|
230
|
+
* token, token exchange, project cache or earlier grant is used. A refused
|
|
231
|
+
* receipt or an abort stops the check with no further request. Recording
|
|
232
|
+
* the reading (with the returned attributions and the source's
|
|
233
|
+
* `commitState`) is the caller's.
|
|
234
|
+
*/
|
|
235
|
+
export declare function fetchVaultAccountQuota(options: VaultQuotaCheckOptions): Promise<VaultQuotaReading>;
|
|
236
|
+
/** Result of re-checking a local grant immediately before one request. */
|
|
237
|
+
export type LocalQuotaGrantCheck = {
|
|
238
|
+
readonly status: 'current';
|
|
239
|
+
} | {
|
|
240
|
+
readonly status: 'stale';
|
|
241
|
+
readonly reason: string;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* The bearer and project one quota check may use, or why it may not run.
|
|
245
|
+
* Only a LOCAL credential (a stored OAuth grant the caller resolved for the
|
|
246
|
+
* exact account being checked) can authorize a check here. A vault
|
|
247
|
+
* credential needs a fresh admission for every physical request and goes
|
|
248
|
+
* through the vault source's own per-send admission instead.
|
|
249
|
+
*/
|
|
250
|
+
export type LocalQuotaCheckAuthorization = {
|
|
251
|
+
readonly status: 'authorized';
|
|
252
|
+
readonly domain: 'local';
|
|
253
|
+
readonly accessToken: string;
|
|
254
|
+
readonly projectId: string;
|
|
255
|
+
readonly managedProjectId?: string;
|
|
256
|
+
/**
|
|
257
|
+
* Required per-send freshness check, bound by the caller to the
|
|
258
|
+
* account reference it captured and to this access token. It runs
|
|
259
|
+
* immediately before every physical quota request (after every earlier
|
|
260
|
+
* await of that request); `stale` means the account no longer holds
|
|
261
|
+
* that exact credential, and no further request of the check is sent.
|
|
262
|
+
*/
|
|
263
|
+
readonly confirmSend: (signal: AbortSignal) => Promise<LocalQuotaGrantCheck>;
|
|
264
|
+
} | {
|
|
265
|
+
readonly status: 'refused';
|
|
266
|
+
readonly reason: string;
|
|
267
|
+
};
|
|
268
|
+
export interface AuthorizedFetchAccountQuotaOptions {
|
|
269
|
+
/**
|
|
270
|
+
* Resolves the local bearer and project for exactly the account being
|
|
271
|
+
* checked. It is called once per check, before this fetcher awaits
|
|
272
|
+
* anything, with the same account object the quota manager handed in, so
|
|
273
|
+
* the callback can capture that account's identity (for example a
|
|
274
|
+
* repository row reference it carries) before any other work runs. This
|
|
275
|
+
* fetcher never refreshes, caches or stores a token.
|
|
276
|
+
*/
|
|
277
|
+
authorize(account: AccountMetadataV3, signal: AbortSignal): Promise<LocalQuotaCheckAuthorization>;
|
|
278
|
+
/** Receives the fetcher's diagnostic records; never tokens. */
|
|
279
|
+
logger: Pick<Logger, 'debug'>;
|
|
280
|
+
/**
|
|
281
|
+
* Transport for one check's quota requests, given the check's abort
|
|
282
|
+
* signal. Without it, requests go through `fetchWithActiveTimeout` (the
|
|
283
|
+
* core package's default quota transport) with that signal.
|
|
284
|
+
*/
|
|
285
|
+
transport?: (signal: AbortSignal) => QuotaFetch;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* A quota fetcher for LOCAL credentials whose bearer and project come from
|
|
289
|
+
* the caller's `authorize` callback instead of the account's stored refresh
|
|
290
|
+
* token. The network requests and result shape are the OpenCode 1
|
|
291
|
+
* fetcher's (`fetchQuotaPayloads`), sent through a transport that calls the
|
|
292
|
+
* authorization's `confirmSend` before every physical request.
|
|
293
|
+
*
|
|
294
|
+
* - A disabled account is answered without calling `authorize`.
|
|
295
|
+
* - A refused authorization, an authorization that is not `local`, or a
|
|
296
|
+
* throw from `authorize` is answered as an error result without any
|
|
297
|
+
* request.
|
|
298
|
+
* - Once `confirmSend` reports `stale`, no further request of the check is
|
|
299
|
+
* sent and the whole check is answered as an error, so a reading taken
|
|
300
|
+
* for a replaced or removed credential is never applied.
|
|
301
|
+
* - The result never carries `updatedAccount`: any credential or project
|
|
302
|
+
* change belongs to the `authorize` callback, which knows which stored row
|
|
303
|
+
* it may write to.
|
|
304
|
+
*/
|
|
305
|
+
export declare function createAuthorizedFetchAccountQuota(options: AuthorizedFetchAccountQuotaOptions): FetchAccountQuota;
|
|
306
|
+
/**
|
|
307
|
+
* Build a per-account tier-loader callback for the background poller.
|
|
308
|
+
*
|
|
309
|
+
* Calls `loadManagedProject` (loadCodeAssist) directly. The
|
|
310
|
+
* `ensureProjectContext` cache answers from a known `managedProjectId`
|
|
311
|
+
* without asking Google, so for an account that already has a project it
|
|
312
|
+
* never returns a tier; the tier is only in loadCodeAssist's answer. One
|
|
313
|
+
* call per account per 24 h.
|
|
314
|
+
*
|
|
315
|
+
* An expired access token is refreshed the same way `makeFetchAccountQuota`
|
|
316
|
+
* refreshes it, so the lookup does not fail just because the token aged.
|
|
317
|
+
*
|
|
318
|
+
* `loadManagedProject` sends through the native TLS transport
|
|
319
|
+
* (`fetchWithAgyCliTransport`), not through a generic `fetch`, so a
|
|
320
|
+
* `fetchVia` override cannot intercept it; `ensureProjectContext` has the
|
|
321
|
+
* same limit. Tier lookup is best-effort; any failure resolves `null`.
|
|
322
|
+
*/
|
|
323
|
+
export declare function makeTierLoader(client: PluginClient | undefined, providerId: string, options?: {
|
|
324
|
+
mayRun?: () => Promise<boolean>;
|
|
325
|
+
authorizeStore?: (account: AccountQuotaTarget) => Promise<LocalQuotaCheckAuthorization>;
|
|
326
|
+
}): (account: AccountMetadataV3) => Promise<{
|
|
327
|
+
id: string;
|
|
328
|
+
paidId?: string;
|
|
329
|
+
capturedAt: number;
|
|
330
|
+
} | null>;
|
|
331
|
+
/** What one account-store quota check did with its reading. */
|
|
332
|
+
export type StoreQuotaOutcome = {
|
|
333
|
+
/**
|
|
334
|
+
* The reading was handed to the manager for exactly the checked row
|
|
335
|
+
* and credential. This does not prove the store kept it:
|
|
336
|
+
* `checkStoreQuota` reads the store back and compares the whole
|
|
337
|
+
* reading.
|
|
338
|
+
*/
|
|
339
|
+
readonly status: 'recorded';
|
|
340
|
+
readonly result: AccountQuotaResult;
|
|
341
|
+
/** The reading this check produced, as the manager recorded it. */
|
|
342
|
+
readonly reading: RecordedQuotaReading;
|
|
343
|
+
} | {
|
|
344
|
+
/**
|
|
345
|
+
* The check ran, but the row no longer holds the checked credential
|
|
346
|
+
* (replaced, re-added or removed); the reading is discarded, never
|
|
347
|
+
* attached to whatever holds the row now.
|
|
348
|
+
*/
|
|
349
|
+
readonly status: 'discarded';
|
|
350
|
+
readonly result: AccountQuotaResult;
|
|
351
|
+
}
|
|
352
|
+
/** The check failed or was refused; nothing was recorded. */
|
|
353
|
+
| {
|
|
354
|
+
readonly status: 'failed';
|
|
355
|
+
readonly result: AccountQuotaResult;
|
|
356
|
+
};
|
|
357
|
+
export type { AntigravityQuotaCheckReport };
|
|
358
|
+
/**
|
|
359
|
+
* One check's reading, captured at the moment it was handed to the manager,
|
|
360
|
+
* so a later reading for the same row cannot be mistaken for it.
|
|
361
|
+
*/
|
|
362
|
+
export interface RecordedQuotaReading {
|
|
363
|
+
readonly cachedQuotaAccountId: string | undefined;
|
|
364
|
+
readonly cachedQuotaUpdatedAt: number | undefined;
|
|
365
|
+
/** Canonical form of the quota groups (`canonicalQuotaGroups`). */
|
|
366
|
+
readonly groups: string;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Quota checks for one plugin account pool served by the account store.
|
|
370
|
+
* The service owns that pool's quota cache, in-flight deduplication and
|
|
371
|
+
* backoff.
|
|
372
|
+
*/
|
|
373
|
+
export interface StoreQuotaService {
|
|
374
|
+
readonly authorizeLocalCheck: (account: AccountQuotaTarget) => Promise<LocalQuotaCheckAuthorization>;
|
|
375
|
+
readonly fetchAccountQuota: FetchAccountQuota;
|
|
376
|
+
/** The pool's quota manager (cache, in-flight dedupe and backoff). */
|
|
377
|
+
readonly quotaManager: QuotaManager;
|
|
378
|
+
/**
|
|
379
|
+
* Checks one account, named by the quota target the caller took from
|
|
380
|
+
* `getAccountsForQuotaCheck()` (its `rowRef` is the identity). `force`
|
|
381
|
+
* is the manual check: it bypasses backoff.
|
|
382
|
+
*/
|
|
383
|
+
refreshAccount(target: AccountQuotaTarget, options?: {
|
|
384
|
+
force?: boolean;
|
|
385
|
+
}): Promise<StoreQuotaOutcome>;
|
|
386
|
+
/** Checks every account in the pool, not only the selected one. */
|
|
387
|
+
refreshAll(options?: {
|
|
388
|
+
force?: boolean;
|
|
389
|
+
}): Promise<StoreQuotaOutcome[]>;
|
|
390
|
+
/**
|
|
391
|
+
* The menu's manual quota action: checks exactly the accounts named by
|
|
392
|
+
* `refs` (the refs the menu read before the action), bypassing backoff.
|
|
393
|
+
* A ref the manager does not hold at that exact credential is not
|
|
394
|
+
* checked. After the checks, the store is read back: a ref counts as
|
|
395
|
+
* checked only when the store's row at that exact ref holds this check's
|
|
396
|
+
* whole reading (identity stamp, time and every group). A matching time
|
|
397
|
+
* alone is not proof the reading was written.
|
|
398
|
+
*/
|
|
399
|
+
checkStoreQuota(refs: readonly RowRef[]): Promise<AntigravityQuotaCheckReport>;
|
|
400
|
+
dispose(): Promise<void>;
|
|
401
|
+
}
|
|
402
|
+
export interface StoreQuotaServiceOptions {
|
|
403
|
+
readonly mayRun?: () => Promise<boolean>;
|
|
404
|
+
/** The pool's account manager, whose accounts come from the repository. */
|
|
405
|
+
manager: CoreAccountManager;
|
|
406
|
+
/** That manager's repository; read back to confirm recorded readings. */
|
|
407
|
+
repository: Pick<AccountRepository, 'read'>;
|
|
408
|
+
logger: Logger;
|
|
409
|
+
/** Defaults to `createLocalAccountCredentials(manager)`. */
|
|
410
|
+
credentials?: Pick<LocalAccountCredentials, 'refresh' | 'ensureProject' | 'assertGrantCurrent'>;
|
|
411
|
+
/** Quota request transport; see `createAuthorizedFetchAccountQuota`. */
|
|
412
|
+
transport?: (signal: AbortSignal) => QuotaFetch;
|
|
413
|
+
sidebar?: LocationQuotaSidebarOptions;
|
|
414
|
+
baseBackoffMs?: number;
|
|
415
|
+
maxBackoffMs?: number;
|
|
416
|
+
fetchTimeoutMs?: number;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Quota checks for one plugin account pool whose accounts come from the
|
|
420
|
+
* account store. One check, in order:
|
|
421
|
+
* 1. Capture the target's RowRef before any await, and take the manager's
|
|
422
|
+
* account holding exactly that ref; if none does, the check is refused.
|
|
423
|
+
* 2. If that account's access token has expired, refresh it through the
|
|
424
|
+
* repository, which commits the new token only to the row still holding
|
|
425
|
+
* that ref. Neither a token copied from an earlier read nor the host
|
|
426
|
+
* client is used.
|
|
427
|
+
* 3. Resolve the account's project from the local project cache; a newly
|
|
428
|
+
* resolved project is recorded through the manager on the account's ref.
|
|
429
|
+
* 4. Before every physical quota request, check that the manager still
|
|
430
|
+
* holds the same account object, at the same ref, enabled, with the same
|
|
431
|
+
* access token; otherwise no further request of the check is sent.
|
|
432
|
+
* 5. Hand the reading to the manager only while it still holds that exact
|
|
433
|
+
* ref; otherwise discard it. The manager's write can still be refused by
|
|
434
|
+
* the store, so `checkStoreQuota` reads the store back and counts a
|
|
435
|
+
* check only when the store holds this check's whole reading.
|
|
436
|
+
*
|
|
437
|
+
* Only accounts whose refresh token is stored locally use this service;
|
|
438
|
+
* vault-held accounts never do.
|
|
439
|
+
*/
|
|
440
|
+
export declare function createStoreQuotaService(options: StoreQuotaServiceOptions): StoreQuotaService;
|
|
441
|
+
//# sourceMappingURL=quota.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qu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;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,iBAAiB,CA0PnB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for session recovery storage paths.
|
|
3
|
+
*
|
|
4
|
+
* Based on oh-my-opencode/src/hooks/session-recovery/constants.ts
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Get the XDG config directory for Antigravity config.
|
|
8
|
+
* Falls back to ~/.config on Linux/Mac, or APPDATA on Windows.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getXdgConfig(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Get the Antigravity config directory.
|
|
13
|
+
* Default: ~/.config/opencode/antigravity.json
|
|
14
|
+
*/
|
|
15
|
+
export declare function getAntigravityConfigDir(): string;
|
|
16
|
+
export declare const OPENCODE_STORAGE: string;
|
|
17
|
+
export declare const MESSAGE_STORAGE: string;
|
|
18
|
+
export declare const PART_STORAGE: string;
|
|
19
|
+
export declare const THINKING_TYPES: Set<string>;
|
|
20
|
+
export declare const META_TYPES: Set<string>;
|
|
21
|
+
export declare const CONTENT_TYPES: Set<string>;
|
|
22
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/recovery/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAQrC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,eAAO,MAAM,gBAAgB,QAA4C,CAAA;AACzE,eAAO,MAAM,eAAe,QAAoC,CAAA;AAChE,eAAO,MAAM,YAAY,QAAiC,CAAA;AAE1D,eAAO,MAAM,cAAc,aAIzB,CAAA;AACF,eAAO,MAAM,UAAU,aAAyC,CAAA;AAChE,eAAO,MAAM,aAAa,aAKxB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage utilities for reading OpenCode's session data.
|
|
3
|
+
*
|
|
4
|
+
* Based on oh-my-opencode/src/hooks/session-recovery/storage.ts
|
|
5
|
+
*/
|
|
6
|
+
import type { StoredMessageMeta, StoredPart } from './types.js';
|
|
7
|
+
export declare function generatePartId(): string;
|
|
8
|
+
export declare function getMessageDir(sessionID: string): string;
|
|
9
|
+
export declare function readMessages(sessionID: string): StoredMessageMeta[];
|
|
10
|
+
export declare function readParts(messageID: string): StoredPart[];
|
|
11
|
+
export declare function hasContent(part: StoredPart): boolean;
|
|
12
|
+
export declare function messageHasContent(messageID: string): boolean;
|
|
13
|
+
export declare function injectTextPart(sessionID: string, messageID: string, text: string): boolean;
|
|
14
|
+
export declare function findMessagesWithThinkingBlocks(sessionID: string): string[];
|
|
15
|
+
export declare function findMessagesWithThinkingOnly(sessionID: string): string[];
|
|
16
|
+
export declare function findMessagesWithOrphanThinking(sessionID: string): string[];
|
|
17
|
+
export declare function prependThinkingPart(sessionID: string, messageID: string): boolean;
|
|
18
|
+
export declare function stripThinkingParts(messageID: string): boolean;
|
|
19
|
+
export declare function findEmptyMessages(sessionID: string): string[];
|
|
20
|
+
export declare function findEmptyMessageByIndex(sessionID: string, targetIndex: number): string | null;
|
|
21
|
+
export declare function findMessageByIndexNeedingThinking(sessionID: string, targetIndex: number): string | null;
|
|
22
|
+
export declare function replaceEmptyTextParts(messageID: string, replacementText: string): boolean;
|
|
23
|
+
export declare function findMessagesWithEmptyTextParts(sessionID: string): string[];
|
|
24
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/recovery/storage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAkB,MAAM,SAAS,CAAA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ED,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAkB1E"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for session recovery.
|
|
3
|
+
*
|
|
4
|
+
* Based on oh-my-opencode/src/hooks/session-recovery/types.ts
|
|
5
|
+
*/
|
|
6
|
+
export type ThinkingPartType = 'thinking' | 'redacted_thinking' | 'reasoning';
|
|
7
|
+
export type MetaPartType = 'step-start' | 'step-finish';
|
|
8
|
+
export type ContentPartType = 'text' | 'tool' | 'tool_use' | 'tool_result';
|
|
9
|
+
export interface StoredMessageMeta {
|
|
10
|
+
id: string;
|
|
11
|
+
sessionID: string;
|
|
12
|
+
role: 'user' | 'assistant';
|
|
13
|
+
parentID?: string;
|
|
14
|
+
time?: {
|
|
15
|
+
created: number;
|
|
16
|
+
completed?: number;
|
|
17
|
+
};
|
|
18
|
+
error?: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface StoredTextPart {
|
|
21
|
+
id: string;
|
|
22
|
+
sessionID: string;
|
|
23
|
+
messageID: string;
|
|
24
|
+
type: 'text';
|
|
25
|
+
text: string;
|
|
26
|
+
synthetic?: boolean;
|
|
27
|
+
ignored?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface StoredToolPart {
|
|
30
|
+
id: string;
|
|
31
|
+
sessionID: string;
|
|
32
|
+
messageID: string;
|
|
33
|
+
type: 'tool';
|
|
34
|
+
callID: string;
|
|
35
|
+
tool: string;
|
|
36
|
+
state: {
|
|
37
|
+
status: 'pending' | 'running' | 'completed' | 'error';
|
|
38
|
+
input: Record<string, unknown>;
|
|
39
|
+
output?: string;
|
|
40
|
+
error?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface StoredReasoningPart {
|
|
44
|
+
id: string;
|
|
45
|
+
sessionID: string;
|
|
46
|
+
messageID: string;
|
|
47
|
+
type: 'reasoning';
|
|
48
|
+
text: string;
|
|
49
|
+
}
|
|
50
|
+
export interface StoredStepPart {
|
|
51
|
+
id: string;
|
|
52
|
+
sessionID: string;
|
|
53
|
+
messageID: string;
|
|
54
|
+
type: 'step-start' | 'step-finish';
|
|
55
|
+
}
|
|
56
|
+
export type StoredPart = StoredTextPart | StoredToolPart | StoredReasoningPart | StoredStepPart | {
|
|
57
|
+
id: string;
|
|
58
|
+
sessionID: string;
|
|
59
|
+
messageID: string;
|
|
60
|
+
type: string;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
export interface MessagePart {
|
|
64
|
+
type: string;
|
|
65
|
+
id?: string;
|
|
66
|
+
text?: string;
|
|
67
|
+
thinking?: string;
|
|
68
|
+
name?: string;
|
|
69
|
+
input?: Record<string, unknown>;
|
|
70
|
+
callID?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface MessageData {
|
|
73
|
+
info?: {
|
|
74
|
+
id?: string;
|
|
75
|
+
role?: string;
|
|
76
|
+
sessionID?: string;
|
|
77
|
+
parentID?: string;
|
|
78
|
+
error?: unknown;
|
|
79
|
+
agent?: string;
|
|
80
|
+
model?: {
|
|
81
|
+
providerID: string;
|
|
82
|
+
modelID: string;
|
|
83
|
+
};
|
|
84
|
+
system?: string;
|
|
85
|
+
tools?: Record<string, boolean>;
|
|
86
|
+
};
|
|
87
|
+
parts?: MessagePart[];
|
|
88
|
+
}
|
|
89
|
+
export interface MessageInfo {
|
|
90
|
+
id?: string;
|
|
91
|
+
role?: string;
|
|
92
|
+
sessionID?: string;
|
|
93
|
+
parentID?: string;
|
|
94
|
+
error?: unknown;
|
|
95
|
+
}
|
|
96
|
+
export interface ResumeConfig {
|
|
97
|
+
sessionID: string;
|
|
98
|
+
agent?: string;
|
|
99
|
+
model?: {
|
|
100
|
+
providerID: string;
|
|
101
|
+
modelID: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export type RecoveryErrorType = 'tool_result_missing' | 'thinking_block_order' | 'thinking_disabled_violation' | null;
|
|
105
|
+
export interface ToolUsePart {
|
|
106
|
+
type: 'tool_use';
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
input: Record<string, unknown>;
|
|
110
|
+
}
|
|
111
|
+
export interface ToolResultPart {
|
|
112
|
+
type: 'tool_result';
|
|
113
|
+
tool_use_id: string;
|
|
114
|
+
content: string;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/recovery/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,mBAAmB,GAAG,WAAW,CAAA;AAC7E,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,aAAa,CAAA;AACvD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,CAAA;AAE1E,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE;QACL,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;I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