@cortexkit/opencode-antigravity-auth 2.2.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -92
- package/dist/cli.js +18476 -812
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +4100 -0
- package/dist/index.js +40602 -15857
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +6978 -0
- package/dist/server.js +51220 -0
- package/dist/server.js.map +7 -0
- package/dist/server.meta.json +7313 -0
- package/dist/src/cli.d.ts +46 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +207 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/NOTICE.txt +21 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/dist/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/dist/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/dist/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/dist/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/dist/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/dist/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/dist/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/dist/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/dist/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/dist/src/common-auth-embedded/claustrum/index.js +22 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/dist/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/dist/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/src/common-auth-embedded/commands/builtins.js +534 -0
- package/dist/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/commands/index.js +5 -0
- package/dist/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/src/common-auth-embedded/commands/menu.js +300 -0
- package/dist/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/src/common-auth-embedded/commands/model.js +16 -0
- package/dist/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/src/common-auth-embedded/commands/pi.js +206 -0
- package/dist/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/src/common-auth-embedded/commands/seam.js +301 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/dist/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/dist/src/common-auth-embedded/fs/index.js +6 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/dist/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/dist/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/src/common-auth-embedded/logger/engine.js +246 -0
- package/dist/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/src/common-auth-embedded/logger/index.js +3 -0
- package/dist/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/src/common-auth-embedded/logger/redact.js +83 -0
- package/dist/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/dist/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/opencode2/index.js +4 -0
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/dist/src/common-auth-embedded/opencode2/install.js +886 -0
- package/dist/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/dist/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/dist/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/dist/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/dist/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/dist/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/dist/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/dist/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/src/common-auth-embedded/quota/codec.js +12 -0
- package/dist/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/src/common-auth-embedded/quota/format.js +138 -0
- package/dist/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/quota/index.js +5 -0
- package/dist/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/src/common-auth-embedded/quota/map.js +105 -0
- package/dist/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/src/common-auth-embedded/quota/merge.js +162 -0
- package/dist/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/src/common-auth-embedded/quota/projection.js +134 -0
- package/dist/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/dist/src/common-auth-embedded/routing/admission.js +142 -0
- package/dist/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/routing/index.js +4 -0
- package/dist/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/dist/src/common-auth-embedded/routing/ordered.js +58 -0
- package/dist/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/dist/src/common-auth-embedded/routing/pins.js +34 -0
- package/dist/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/dist/src/common-auth-embedded/routing/sticky.js +339 -0
- package/dist/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/dist/src/common-auth-embedded/rpc/client.js +2 -0
- package/dist/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/rpc/index.js +5 -0
- package/dist/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/dist/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/dist/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/dist/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/dist/src/common-auth-embedded/source-output.json +1326 -0
- package/dist/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/src/common-auth-embedded/store/attribution.js +60 -0
- package/dist/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/src/common-auth-embedded/store/errors.js +38 -0
- package/dist/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/src/common-auth-embedded/store/hooks.js +34 -0
- package/dist/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/src/common-auth-embedded/store/identity.js +79 -0
- package/dist/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/src/common-auth-embedded/store/index.js +7 -0
- package/dist/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/src/common-auth-embedded/store/mutate.js +500 -0
- package/dist/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/src/common-auth-embedded/store/pool.js +120 -0
- package/dist/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/src/common-auth-embedded/store/provider-state.js +226 -0
- package/dist/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/src/common-auth-embedded/store/publication.js +304 -0
- package/dist/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/pull.js +143 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/dist/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/src/common-auth-embedded/store/refresh.js +225 -0
- package/dist/src/common-auth-embedded/store/reserved.js +13 -0
- package/dist/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/src/common-auth-embedded/store/rows.js +1258 -0
- package/dist/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/runtime.js +68 -0
- package/dist/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/src/common-auth-embedded/store/schema.js +754 -0
- package/dist/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/settings.js +120 -0
- package/dist/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/src/common-auth-embedded/store/torn.js +294 -0
- package/dist/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/tui/index.js +21 -0
- package/dist/src/common-auth-embedded/util/any-signal.js +42 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +4 -0
- package/dist/src/constants.js.map +1 -1
- package/dist/src/ga/proxy-guard.d.ts +120 -0
- package/dist/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/src/ga/proxy-guard.js +269 -0
- package/dist/src/ga/proxy-guard.js.map +1 -0
- package/dist/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/src/ga/rpc/protocol.js +1278 -0
- package/dist/src/ga/rpc/protocol.js.map +1 -0
- package/dist/src/ga/server/auth.d.ts +9 -0
- package/dist/src/ga/server/auth.d.ts.map +1 -0
- package/dist/src/ga/server/auth.js +37 -0
- package/dist/src/ga/server/auth.js.map +1 -0
- package/dist/src/ga/server/index.d.ts +576 -0
- package/dist/src/ga/server/index.d.ts.map +1 -0
- package/dist/src/ga/server/index.js +1012 -0
- package/dist/src/ga/server/index.js.map +1 -0
- package/dist/src/ga/tui/host-ga.d.ts +350 -0
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -0
- package/dist/src/ga/tui/host-ga.js +1242 -0
- package/dist/src/ga/tui/host-ga.js.map +1 -0
- package/dist/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/src/logging/provider-key-policy.js +11 -0
- package/dist/src/logging/provider-key-policy.js.map +1 -0
- package/dist/src/plugin/account-access.d.ts +130 -15
- package/dist/src/plugin/account-access.d.ts.map +1 -1
- package/dist/src/plugin/account-access.js +331 -129
- package/dist/src/plugin/account-access.js.map +1 -1
- package/dist/src/plugin/account-blocks.d.ts +102 -0
- package/dist/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/src/plugin/account-blocks.js +196 -0
- package/dist/src/plugin/account-blocks.js.map +1 -0
- package/dist/src/plugin/accounts.d.ts +85 -1
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +127 -3
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/auth-loader.d.ts +69 -5
- package/dist/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/src/plugin/auth-loader.js +355 -52
- package/dist/src/plugin/auth-loader.js.map +1 -1
- package/dist/src/plugin/background-quota-refresh.d.ts +54 -8
- package/dist/src/plugin/background-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-quota-refresh.js +81 -24
- package/dist/src/plugin/background-quota-refresh.js.map +1 -1
- package/dist/src/plugin/cache/index.d.ts +1 -1
- package/dist/src/plugin/cache/index.d.ts.map +1 -1
- package/dist/src/plugin/cache/index.js +1 -1
- package/dist/src/plugin/cache/index.js.map +1 -1
- package/dist/src/plugin/cache/signature-cache.d.ts +55 -10
- package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/src/plugin/cache/signature-cache.js +100 -41
- package/dist/src/plugin/cache/signature-cache.js.map +1 -1
- package/dist/src/plugin/cache.d.ts +80 -16
- package/dist/src/plugin/cache.d.ts.map +1 -1
- package/dist/src/plugin/cache.js +339 -200
- package/dist/src/plugin/cache.js.map +1 -1
- package/dist/src/plugin/catalog.d.ts +4 -18
- package/dist/src/plugin/catalog.d.ts.map +1 -1
- package/dist/src/plugin/catalog.js +11 -41
- package/dist/src/plugin/catalog.js.map +1 -1
- package/dist/src/plugin/command-apply.d.ts +58 -0
- package/dist/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/src/plugin/command-apply.js +168 -0
- package/dist/src/plugin/command-apply.js.map +1 -0
- package/dist/src/plugin/command-data.d.ts +1 -0
- package/dist/src/plugin/command-data.d.ts.map +1 -1
- package/dist/src/plugin/command-data.js +2 -0
- package/dist/src/plugin/command-data.js.map +1 -1
- package/dist/src/plugin/commands.d.ts +142 -132
- package/dist/src/plugin/commands.d.ts.map +1 -1
- package/dist/src/plugin/commands.js +214 -686
- package/dist/src/plugin/commands.js.map +1 -1
- package/dist/src/plugin/config/index.d.ts +1 -1
- package/dist/src/plugin/config/index.d.ts.map +1 -1
- package/dist/src/plugin/config/index.js +1 -1
- package/dist/src/plugin/config/index.js.map +1 -1
- package/dist/src/plugin/config/loader.d.ts +37 -1
- package/dist/src/plugin/config/loader.d.ts.map +1 -1
- package/dist/src/plugin/config/loader.js +64 -9
- package/dist/src/plugin/config/loader.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +2 -2
- package/dist/src/plugin/config/schema.d.ts +2 -2
- package/dist/src/plugin/config/writer.d.ts +7 -0
- package/dist/src/plugin/config/writer.d.ts.map +1 -1
- package/dist/src/plugin/config/writer.js +10 -1
- package/dist/src/plugin/config/writer.js.map +1 -1
- package/dist/src/plugin/debug.d.ts +72 -29
- package/dist/src/plugin/debug.d.ts.map +1 -1
- package/dist/src/plugin/debug.js +353 -239
- package/dist/src/plugin/debug.js.map +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts.map +1 -1
- package/dist/src/plugin/fetch/retry-state.js.map +1 -1
- package/dist/src/plugin/fetch-interceptor.d.ts +66 -11
- package/dist/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/src/plugin/fetch-interceptor.js +228 -1352
- package/dist/src/plugin/fetch-interceptor.js.map +1 -1
- package/dist/src/plugin/fetch-routing.d.ts +7 -2
- package/dist/src/plugin/fetch-routing.d.ts.map +1 -1
- package/dist/src/plugin/fetch-routing.js +7 -4
- package/dist/src/plugin/fetch-routing.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/src/plugin/ga-location-services.js +1838 -0
- package/dist/src/plugin/ga-location-services.js.map +1 -0
- package/dist/src/plugin/gemini-dump.d.ts +37 -12
- package/dist/src/plugin/gemini-dump.d.ts.map +1 -1
- package/dist/src/plugin/gemini-dump.js +42 -21
- package/dist/src/plugin/gemini-dump.js.map +1 -1
- package/dist/src/plugin/google-search-tool.d.ts +2 -1
- package/dist/src/plugin/google-search-tool.d.ts.map +1 -1
- package/dist/src/plugin/google-search-tool.js +4 -1
- package/dist/src/plugin/google-search-tool.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +505 -141
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/killswitch.d.ts +1 -2
- package/dist/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.d.ts +24 -1
- package/dist/src/plugin/lifecycle.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.js +95 -8
- package/dist/src/plugin/lifecycle.js.map +1 -1
- package/dist/src/plugin/logger.d.ts +61 -10
- package/dist/src/plugin/logger.d.ts.map +1 -1
- package/dist/src/plugin/logger.js +134 -63
- package/dist/src/plugin/logger.js.map +1 -1
- package/dist/src/plugin/neutral-types.d.ts +42 -0
- package/dist/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/src/plugin/neutral-types.js +12 -0
- package/dist/src/plugin/neutral-types.js.map +1 -0
- package/dist/src/plugin/oauth-methods.d.ts +2 -1
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/src/plugin/oauth-methods.js +173 -88
- package/dist/src/plugin/oauth-methods.js.map +1 -1
- package/dist/src/plugin/operator-settings.d.ts +34 -0
- package/dist/src/plugin/operator-settings.d.ts.map +1 -1
- package/dist/src/plugin/operator-settings.js +105 -2
- package/dist/src/plugin/operator-settings.js.map +1 -1
- package/dist/src/plugin/persist-account-pool.d.ts +63 -2
- package/dist/src/plugin/persist-account-pool.d.ts.map +1 -1
- package/dist/src/plugin/persist-account-pool.js +125 -2
- package/dist/src/plugin/persist-account-pool.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +335 -35
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +825 -95
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/refresh-queue.d.ts +35 -5
- package/dist/src/plugin/refresh-queue.d.ts.map +1 -1
- package/dist/src/plugin/refresh-queue.js +50 -16
- package/dist/src/plugin/refresh-queue.js.map +1 -1
- package/dist/src/plugin/request-helpers.d.ts +30 -5
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +82 -17
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/request.d.ts +63 -15
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +229 -65
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/session-context.d.ts.map +1 -1
- package/dist/src/plugin/session-context.js +5 -2
- package/dist/src/plugin/session-context.js.map +1 -1
- package/dist/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/src/plugin/shared/local-grant.js +19 -0
- package/dist/src/plugin/shared/local-grant.js.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.js +118 -0
- package/dist/src/plugin/shared/request-cancellation.js.map +1 -0
- package/dist/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-services.js +1752 -0
- package/dist/src/plugin/shared/request-services.js.map +1 -0
- package/dist/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/src/plugin/shared/runtime.js +345 -0
- package/dist/src/plugin/shared/runtime.js.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.js +41 -0
- package/dist/src/plugin/shared/source-sidebar.js.map +1 -0
- package/dist/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-menu.js +49 -0
- package/dist/src/plugin/shared/vault-menu.js.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.js +485 -0
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -0
- package/dist/src/plugin/storage.d.ts +127 -1
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +188 -3
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/token.d.ts +23 -1
- package/dist/src/plugin/token.d.ts.map +1 -1
- package/dist/src/plugin/token.js +117 -58
- package/dist/src/plugin/token.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts +1 -10
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +6 -42
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin/vault-activation.d.ts +11 -0
- package/dist/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/src/plugin/vault-activation.js +53 -0
- package/dist/src/plugin/vault-activation.js.map +1 -0
- package/dist/src/plugin/vault-custody.d.ts +131 -0
- package/dist/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/src/plugin/vault-custody.js +381 -0
- package/dist/src/plugin/vault-custody.js.map +1 -0
- package/dist/src/quota-presentation.d.ts +18 -0
- package/dist/src/quota-presentation.d.ts.map +1 -0
- package/dist/src/quota-presentation.js +58 -0
- package/dist/src/quota-presentation.js.map +1 -0
- package/dist/src/rpc/notifications.d.ts +2 -2
- package/dist/src/rpc/notifications.d.ts.map +1 -1
- package/dist/src/rpc/notifications.js +1 -1
- package/dist/src/rpc/notifications.js.map +1 -1
- package/dist/src/rpc/port-file.d.ts +2 -12
- package/dist/src/rpc/port-file.d.ts.map +1 -1
- package/dist/src/rpc/port-file.js +5 -107
- package/dist/src/rpc/port-file.js.map +1 -1
- package/dist/src/rpc/protocol.d.ts +47 -16
- package/dist/src/rpc/protocol.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.d.ts +27 -3
- package/dist/src/rpc/rpc-client.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.js +55 -45
- package/dist/src/rpc/rpc-client.js.map +1 -1
- package/dist/src/rpc/rpc-server.d.ts +13 -2
- package/dist/src/rpc/rpc-server.d.ts.map +1 -1
- package/dist/src/rpc/rpc-server.js +38 -212
- package/dist/src/rpc/rpc-server.js.map +1 -1
- package/dist/src/server.d.ts +30 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +29 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/sidebar-projection.d.ts +102 -0
- package/dist/src/sidebar-projection.d.ts.map +1 -0
- package/dist/src/sidebar-projection.js +146 -0
- package/dist/src/sidebar-projection.js.map +1 -0
- package/dist/src/sidebar-state.d.ts +13 -5
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +49 -16
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui/command-dialogs.d.ts +58 -52
- package/dist/src/tui/command-dialogs.d.ts.map +1 -1
- package/dist/src/tui/command-dialogs.js +379 -571
- package/dist/src/tui/command-dialogs.js.map +1 -1
- package/dist/src/tui/file-logger.d.ts +2 -3
- package/dist/src/tui/file-logger.d.ts.map +1 -1
- package/dist/src/tui/file-logger.js +21 -7
- package/dist/src/tui/file-logger.js.map +1 -1
- package/dist/src/tui/host-api.d.ts +196 -0
- package/dist/src/tui/host-api.d.ts.map +1 -0
- package/dist/src/tui/host-api.js +357 -0
- package/dist/src/tui/host-api.js.map +1 -0
- package/dist/src/tui/host-v1.d.ts +60 -0
- package/dist/src/tui/host-v1.d.ts.map +1 -0
- package/dist/src/tui/host-v1.js +147 -0
- package/dist/src/tui/host-v1.js.map +1 -0
- package/dist/src/tui/vault-setup.d.ts +98 -0
- package/dist/src/tui/vault-setup.d.ts.map +1 -0
- package/dist/src/tui/vault-setup.js +198 -0
- package/dist/src/tui/vault-setup.js.map +1 -0
- package/dist/src/tui.d.ts +4 -11
- package/dist/src/tui.d.ts.map +1 -1
- package/dist/src/tui.js +33 -75
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +380 -0
- package/dist/tui-ga-build-map.json +187 -0
- package/dist/types/src/antigravity/oauth.d.ts +2 -0
- package/dist/types/src/antigravity/oauth.d.ts.map +1 -0
- package/dist/types/src/cli.d.ts +66 -0
- package/dist/types/src/cli.d.ts.map +1 -0
- package/dist/types/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/types/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/types/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/types/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/types/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/types/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/types/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/types/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/types/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/types/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/types/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/types/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/types/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/types/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/types/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/types/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/types/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/types/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/types/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/types/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/types/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/types/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/types/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/types/src/constants.d.ts +3 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/ga/proxy-guard.d.ts +120 -0
- package/dist/types/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/types/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/ga/server/auth.d.ts +9 -0
- package/dist/types/src/ga/server/auth.d.ts.map +1 -0
- package/dist/types/src/ga/server/index.d.ts +576 -0
- package/dist/types/src/ga/server/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts +16 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts +9 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts +34 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts +25 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts.map +1 -0
- package/dist/types/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/types/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/types/src/plugin/account-access.d.ts +214 -0
- package/dist/types/src/plugin/account-access.d.ts.map +1 -0
- package/dist/types/src/plugin/account-blocks.d.ts +102 -0
- package/dist/types/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts +34 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts.map +1 -0
- package/dist/types/src/plugin/accounts.d.ts +94 -0
- package/dist/types/src/plugin/accounts.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts +2 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-transport.d.ts +2 -0
- package/dist/types/src/plugin/agy-transport.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-doctor.d.ts +30 -0
- package/dist/types/src/plugin/auth-doctor.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-drift.d.ts +13 -0
- package/dist/types/src/plugin/auth-drift.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-loader.d.ts +114 -0
- package/dist/types/src/plugin/auth-loader.d.ts.map +1 -0
- package/dist/types/src/plugin/auth.d.ts +2 -0
- package/dist/types/src/plugin/auth.d.ts.map +1 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts +192 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts.map +1 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts +156 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts.map +1 -0
- package/dist/types/src/plugin/cache.d.ts +109 -0
- package/dist/types/src/plugin/cache.d.ts.map +1 -0
- package/dist/types/src/plugin/catalog.d.ts +9 -0
- package/dist/types/src/plugin/catalog.d.ts.map +1 -0
- package/dist/types/src/plugin/cli.d.ts +44 -0
- package/dist/types/src/plugin/cli.d.ts.map +1 -0
- package/dist/types/src/plugin/command-apply.d.ts +58 -0
- package/dist/types/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/types/src/plugin/command-data.d.ts +330 -0
- package/dist/types/src/plugin/command-data.d.ts.map +1 -0
- package/dist/types/src/plugin/commands.d.ts +164 -0
- package/dist/types/src/plugin/commands.d.ts.map +1 -0
- package/dist/types/src/plugin/config/index.d.ts +16 -0
- package/dist/types/src/plugin/config/index.d.ts.map +1 -0
- package/dist/types/src/plugin/config/loader.d.ts +72 -0
- package/dist/types/src/plugin/config/loader.d.ts.map +1 -0
- package/dist/types/src/plugin/config/models.d.ts +3 -0
- package/dist/types/src/plugin/config/models.d.ts.map +1 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts +29 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/schema.d.ts +162 -0
- package/dist/types/src/plugin/config/schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/updater.d.ts +55 -0
- package/dist/types/src/plugin/config/updater.d.ts.map +1 -0
- package/dist/types/src/plugin/config/writer.d.ts +41 -0
- package/dist/types/src/plugin/config/writer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts +3 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts +12 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts +34 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts.map +1 -0
- package/dist/types/src/plugin/debug.d.ts +144 -0
- package/dist/types/src/plugin/debug.d.ts.map +1 -0
- package/dist/types/src/plugin/dependencies.d.ts +129 -0
- package/dist/types/src/plugin/dependencies.d.ts.map +1 -0
- package/dist/types/src/plugin/errors.d.ts +55 -0
- package/dist/types/src/plugin/errors.d.ts.map +1 -0
- package/dist/types/src/plugin/event-handler.d.ts +53 -0
- package/dist/types/src/plugin/event-handler.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts +61 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts +30 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts +114 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-routing.d.ts +31 -0
- package/dist/types/src/plugin/fetch-routing.d.ts.map +1 -0
- package/dist/types/src/plugin/fingerprint.d.ts +2 -0
- package/dist/types/src/plugin/fingerprint.d.ts.map +1 -0
- package/dist/types/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/types/src/plugin/gemini-dump.d.ts +72 -0
- package/dist/types/src/plugin/gemini-dump.d.ts.map +1 -0
- package/dist/types/src/plugin/google-search-tool.d.ts +10 -0
- package/dist/types/src/plugin/google-search-tool.d.ts.map +1 -0
- package/dist/types/src/plugin/image-saver.d.ts +6 -0
- package/dist/types/src/plugin/image-saver.d.ts.map +1 -0
- package/dist/types/src/plugin/index.d.ts +30 -0
- package/dist/types/src/plugin/index.d.ts.map +1 -0
- package/dist/types/src/plugin/killswitch.d.ts +93 -0
- package/dist/types/src/plugin/killswitch.d.ts.map +1 -0
- package/dist/types/src/plugin/lifecycle.d.ts +63 -0
- package/dist/types/src/plugin/lifecycle.d.ts.map +1 -0
- package/dist/types/src/plugin/logger.d.ts +83 -0
- package/dist/types/src/plugin/logger.d.ts.map +1 -0
- package/dist/types/src/plugin/logging-utils.d.ts +57 -0
- package/dist/types/src/plugin/logging-utils.d.ts.map +1 -0
- package/dist/types/src/plugin/model-registry.d.ts +2 -0
- package/dist/types/src/plugin/model-registry.d.ts.map +1 -0
- package/dist/types/src/plugin/neutral-types.d.ts +42 -0
- package/dist/types/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-login.d.ts +22 -0
- package/dist/types/src/plugin/oauth-login.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-methods.d.ts +43 -0
- package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -0
- package/dist/types/src/plugin/operator-settings.d.ts +74 -0
- package/dist/types/src/plugin/operator-settings.d.ts.map +1 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts +98 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts.map +1 -0
- package/dist/types/src/plugin/project.d.ts +2 -0
- package/dist/types/src/plugin/project.d.ts.map +1 -0
- package/dist/types/src/plugin/prompt-context.d.ts +18 -0
- package/dist/types/src/plugin/prompt-context.d.ts.map +1 -0
- package/dist/types/src/plugin/quota.d.ts +441 -0
- package/dist/types/src/plugin/quota.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/constants.d.ts +22 -0
- package/dist/types/src/plugin/recovery/constants.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/storage.d.ts +24 -0
- package/dist/types/src/plugin/recovery/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/types.d.ts +116 -0
- package/dist/types/src/plugin/recovery/types.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery.d.ts +61 -0
- package/dist/types/src/plugin/recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/refresh-queue.d.ts +133 -0
- package/dist/types/src/plugin/refresh-queue.d.ts.map +1 -0
- package/dist/types/src/plugin/request-helpers.d.ts +304 -0
- package/dist/types/src/plugin/request-helpers.d.ts.map +1 -0
- package/dist/types/src/plugin/request.d.ts +161 -0
- package/dist/types/src/plugin/request.d.ts.map +1 -0
- package/dist/types/src/plugin/rotation.d.ts +2 -0
- package/dist/types/src/plugin/rotation.d.ts.map +1 -0
- package/dist/types/src/plugin/search.d.ts +25 -0
- package/dist/types/src/plugin/search.d.ts.map +1 -0
- package/dist/types/src/plugin/server.d.ts +23 -0
- package/dist/types/src/plugin/server.d.ts.map +1 -0
- package/dist/types/src/plugin/session-context.d.ts +22 -0
- package/dist/types/src/plugin/session-context.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/types/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/types/src/plugin/storage.d.ts +221 -0
- package/dist/types/src/plugin/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts +5 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts.map +1 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts +90 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/token.d.ts +41 -0
- package/dist/types/src/plugin/token.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts +2 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/index.d.ts +2 -0
- package/dist/types/src/plugin/transform/index.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts +2 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/types.d.ts +2 -0
- package/dist/types/src/plugin/transform/types.d.ts.map +1 -0
- package/dist/types/src/plugin/types.d.ts +36 -0
- package/dist/types/src/plugin/types.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/ansi.d.ts +32 -0
- package/dist/types/src/plugin/ui/ansi.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts +59 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/confirm.d.ts +2 -0
- package/dist/types/src/plugin/ui/confirm.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts +73 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/select.d.ts +23 -0
- package/dist/types/src/plugin/ui/select.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-activation.d.ts +11 -0
- package/dist/types/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-custody.d.ts +131 -0
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/types/src/plugin/version.d.ts +2 -0
- package/dist/types/src/plugin/version.d.ts.map +1 -0
- package/dist/types/src/quota-presentation.d.ts +18 -0
- package/dist/types/src/quota-presentation.d.ts.map +1 -0
- package/dist/types/src/rpc/notifications.d.ts +6 -0
- package/dist/types/src/rpc/notifications.d.ts.map +1 -0
- package/dist/types/src/rpc/protocol.d.ts +53 -0
- package/dist/types/src/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-dir.d.ts +4 -0
- package/dist/types/src/rpc/rpc-dir.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-server.d.ts +24 -0
- package/dist/types/src/rpc/rpc-server.d.ts.map +1 -0
- package/dist/types/src/server.d.ts +30 -0
- package/dist/types/src/server.d.ts.map +1 -0
- package/dist/types/src/sidebar-state.d.ts +365 -0
- package/dist/types/src/sidebar-state.d.ts.map +1 -0
- package/dist/types/src/tui/host-api.d.ts +196 -0
- package/dist/types/src/tui/host-api.d.ts.map +1 -0
- package/package.json +46 -19
- package/server.js +6 -0
- package/src/common-auth-embedded/NOTICE.txt +21 -0
- package/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/src/common-auth-embedded/claustrum/index.js +22 -0
- package/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/src/common-auth-embedded/commands/builtins.js +534 -0
- package/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/src/common-auth-embedded/commands/index.js +5 -0
- package/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/src/common-auth-embedded/commands/menu.js +300 -0
- package/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/src/common-auth-embedded/commands/model.js +16 -0
- package/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/src/common-auth-embedded/commands/pi.js +206 -0
- package/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/src/common-auth-embedded/commands/seam.js +301 -0
- package/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/src/common-auth-embedded/fs/index.js +6 -0
- package/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/src/common-auth-embedded/logger/engine.js +246 -0
- package/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/src/common-auth-embedded/logger/index.js +3 -0
- package/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/src/common-auth-embedded/logger/redact.js +83 -0
- package/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/src/common-auth-embedded/opencode2/index.js +4 -0
- package/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/src/common-auth-embedded/opencode2/install.js +886 -0
- package/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/src/common-auth-embedded/quota/codec.js +12 -0
- package/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/src/common-auth-embedded/quota/format.js +138 -0
- package/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/src/common-auth-embedded/quota/index.js +5 -0
- package/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/src/common-auth-embedded/quota/map.js +105 -0
- package/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/src/common-auth-embedded/quota/merge.js +162 -0
- package/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/src/common-auth-embedded/quota/projection.js +134 -0
- package/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/src/common-auth-embedded/routing/admission.js +142 -0
- package/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/src/common-auth-embedded/routing/index.js +4 -0
- package/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/src/common-auth-embedded/routing/ordered.js +58 -0
- package/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/src/common-auth-embedded/routing/pins.js +34 -0
- package/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/src/common-auth-embedded/routing/sticky.js +339 -0
- package/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/src/common-auth-embedded/rpc/client.js +2 -0
- package/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/src/common-auth-embedded/rpc/index.js +5 -0
- package/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/src/common-auth-embedded/source-output.json +1326 -0
- package/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/src/common-auth-embedded/store/attribution.js +60 -0
- package/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/src/common-auth-embedded/store/errors.js +38 -0
- package/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/src/common-auth-embedded/store/hooks.js +34 -0
- package/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/src/common-auth-embedded/store/identity.js +79 -0
- package/src/common-auth-embedded/store/index.d.ts +21 -0
- package/src/common-auth-embedded/store/index.js +7 -0
- package/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/src/common-auth-embedded/store/mutate.js +500 -0
- package/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/src/common-auth-embedded/store/pool.js +120 -0
- package/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/src/common-auth-embedded/store/provider-state.js +226 -0
- package/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/src/common-auth-embedded/store/publication.js +304 -0
- package/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/src/common-auth-embedded/store/pull.js +143 -0
- package/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/src/common-auth-embedded/store/refresh.js +225 -0
- package/src/common-auth-embedded/store/reserved.js +13 -0
- package/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/src/common-auth-embedded/store/rows.js +1258 -0
- package/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/src/common-auth-embedded/store/runtime.js +68 -0
- package/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/src/common-auth-embedded/store/schema.js +754 -0
- package/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/src/common-auth-embedded/store/settings.js +120 -0
- package/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/src/common-auth-embedded/store/torn.js +294 -0
- package/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/src/common-auth-embedded/tui/index.js +21 -0
- package/src/common-auth-embedded/util/any-signal.js +42 -0
- package/src/plugin/command-data.ts +3 -0
- package/src/rpc/port-file.ts +6 -140
- package/src/rpc/protocol.ts +59 -24
- package/src/rpc/rpc-client.ts +101 -71
- package/src/sidebar-state.ts +82 -24
- package/src/tui/command-dialogs.tsx +412 -776
- package/src/tui/entry.d.mts +17 -0
- package/src/tui/entry.mjs +34 -66
- package/src/tui/file-logger.ts +22 -7
- package/src/tui-compiled/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-compiled/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-compiled/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-compiled/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-compiled/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-compiled/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-compiled/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-compiled/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-compiled/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-compiled/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-compiled/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-compiled/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-compiled/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-compiled/logging/provider-key-policy.js +3 -0
- package/src/tui-compiled/quota-presentation.js +42 -0
- package/src/tui-compiled/rpc/rpc-client.js +35 -0
- package/src/tui-compiled/rpc/rpc-dir.js +13 -0
- package/src/tui-compiled/selector.js +21 -0
- package/src/tui-compiled/sidebar-state.js +401 -0
- package/src/tui-compiled/tui/command-dialogs.js +424 -0
- package/src/tui-compiled/tui/file-logger.js +73 -0
- package/src/tui-compiled/tui/host-api.js +269 -0
- package/src/tui-compiled/tui/host-v1.js +228 -0
- package/src/tui-compiled/tui-preferences.js +230 -0
- package/src/tui-compiled/{tui.tsx → tui.js} +140 -231
- package/src/tui-ga-compiled/host-ga.js +1304 -0
- package/src/tui-ga-compiled/selector.js +21 -0
- package/src/tui-ga-compiled/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-compiled/shared/0e19a88ff3535906-command-dialogs.js +424 -0
- package/src/tui-ga-compiled/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-compiled/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-compiled/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-compiled/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-compiled/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-ga-raw/host-ga.tsx +1740 -0
- package/src/tui-ga-raw/selector.js +21 -0
- package/src/tui-ga-raw/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-raw/shared/0e19a88ff3535906-command-dialogs.tsx +468 -0
- package/src/tui-ga-raw/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-raw/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-raw/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-raw/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-raw/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-raw/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-raw/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-raw/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-raw/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-raw/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-raw/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-raw/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-raw/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-raw/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-raw/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-raw/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-raw/logging/provider-key-policy.js +3 -0
- package/src/tui-raw/quota-presentation.js +42 -0
- package/src/tui-raw/rpc/rpc-client.js +35 -0
- package/src/tui-raw/rpc/rpc-dir.js +13 -0
- package/src/tui-raw/selector.js +21 -0
- package/src/tui-raw/sidebar-state.js +401 -0
- package/src/tui-raw/tui/command-dialogs.tsx +468 -0
- package/src/tui-raw/tui/file-logger.js +73 -0
- package/src/tui-raw/tui/host-api.js +269 -0
- package/src/tui-raw/tui/host-v1.tsx +249 -0
- package/src/tui-raw/tui-preferences.js +230 -0
- package/src/tui-raw/tui.tsx +1088 -0
- package/src/tui.tsx +58 -141
- package/tui.js +6 -0
- package/src/tui-compiled/plugin/command-data.ts +0 -931
- package/src/tui-compiled/rpc/port-file.ts +0 -143
- package/src/tui-compiled/rpc/protocol.ts +0 -31
- package/src/tui-compiled/rpc/rpc-client.ts +0 -102
- package/src/tui-compiled/rpc/rpc-dir.ts +0 -24
- package/src/tui-compiled/sidebar-state.ts +0 -991
- package/src/tui-compiled/tui/command-dialogs.tsx +0 -779
- package/src/tui-compiled/tui/file-logger.ts +0 -145
- package/src/tui-compiled/tui-preferences.ts +0 -416
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
|
+
import { applyAgyNativeGenerationConfig, getAgyNativeModel, isRetiredAgyModel, } from '@cortexkit/antigravity-auth-core';
|
|
2
3
|
import { ANTIGRAVITY_DEFAULT_PROJECT_ID, ANTIGRAVITY_ENDPOINT, CLAUDE_DESCRIPTION_PROMPT, CLAUDE_TOOL_SYSTEM_INSTRUCTION, EMPTY_SCHEMA_PLACEHOLDER_DESCRIPTION, EMPTY_SCHEMA_PLACEHOLDER_NAME, GEMINI_CLI_ENDPOINT, getRandomizedHeaders, SKIP_THOUGHT_SIGNATURE, } from '../constants';
|
|
3
4
|
import { buildAgyAgentRequestMetadata, createAgyRequestSessionContext, orderAgyRequestPayloadInPlace, } from './agy-request-metadata';
|
|
4
|
-
import { cacheSignature, getCachedSignature } from './cache';
|
|
5
|
+
import { cacheSignature, getCachedSignature, } from './cache';
|
|
5
6
|
import { getKeepThinking } from './config';
|
|
6
7
|
import { createStreamingTransformer, transformSseLine, transformStreamingPayload, } from './core/streaming';
|
|
7
8
|
import { DEBUG_MESSAGE_PREFIX, isDebugTuiEnabled, logAntigravityDebugResponse, logCacheStats, } from './debug';
|
|
8
|
-
import { buildFingerprintHeaders, getSessionFingerprint, } from './fingerprint';
|
|
9
|
+
import { buildFingerprintHeaders, generateFingerprint, getSessionFingerprint, } from './fingerprint';
|
|
9
10
|
import { appendGeminiDumpResponseText, createGeminiDumpResponseTransform, noteGeminiDumpResponse, } from './gemini-dump';
|
|
10
11
|
import { createLogger } from './logger';
|
|
11
12
|
import { detectErrorType } from './recovery';
|
|
@@ -91,6 +92,9 @@ export function getImageModelLocalTitle(input, init) {
|
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
function getAgyMaxOutputTokens(model) {
|
|
95
|
+
const native = getAgyNativeModel(model);
|
|
96
|
+
if (native)
|
|
97
|
+
return native.maxOutputTokens;
|
|
94
98
|
const lower = model.toLowerCase();
|
|
95
99
|
if (lower === 'gemini-3.5-flash-low' ||
|
|
96
100
|
lower === 'gemini-3.5-flash-extra-low' ||
|
|
@@ -121,6 +125,10 @@ function applyAgyGenerationDefaults(model, generationConfig, headerStyle) {
|
|
|
121
125
|
if (headerStyle !== 'antigravity') {
|
|
122
126
|
return;
|
|
123
127
|
}
|
|
128
|
+
if (getAgyNativeModel(model)) {
|
|
129
|
+
applyAgyNativeGenerationConfig(model, generationConfig);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
124
132
|
const maxOutputTokens = getAgyMaxOutputTokens(model);
|
|
125
133
|
if (maxOutputTokens !== undefined) {
|
|
126
134
|
generationConfig.maxOutputTokens = maxOutputTokens;
|
|
@@ -519,6 +527,58 @@ function configureAntigravityToolCalling(payload) {
|
|
|
519
527
|
toolConfig.functionCallingConfig = functionCallingConfig;
|
|
520
528
|
payload.toolConfig = toolConfig;
|
|
521
529
|
}
|
|
530
|
+
/**
|
|
531
|
+
* The native CLI sends a function response to a same-target call in a model
|
|
532
|
+
* turn (a request then ends with a model turn and gets the trailing user
|
|
533
|
+
* `[Continue]` turn). A call is same-target when it carries its own replay
|
|
534
|
+
* signature; a call whose signature was missing or stripped carries the
|
|
535
|
+
* validator sentinel and keeps its responses in a user turn.
|
|
536
|
+
*/
|
|
537
|
+
function normalizeNativeFunctionResponseRoles(payload) {
|
|
538
|
+
const contents = payload.contents;
|
|
539
|
+
if (!Array.isArray(contents))
|
|
540
|
+
return;
|
|
541
|
+
const signedCalls = new Set();
|
|
542
|
+
for (const content of contents) {
|
|
543
|
+
const parts = content?.parts;
|
|
544
|
+
if (!Array.isArray(parts))
|
|
545
|
+
continue;
|
|
546
|
+
let signedTurn = false;
|
|
547
|
+
for (const part of parts) {
|
|
548
|
+
const call = part
|
|
549
|
+
?.functionCall;
|
|
550
|
+
if (!call)
|
|
551
|
+
continue;
|
|
552
|
+
const signature = part
|
|
553
|
+
.thoughtSignature;
|
|
554
|
+
// Only the first call of a turn carries the turn's signature.
|
|
555
|
+
if (typeof signature === 'string') {
|
|
556
|
+
signedTurn =
|
|
557
|
+
signature.length >= MIN_SIGNATURE_LENGTH &&
|
|
558
|
+
signature !== SKIP_THOUGHT_SIGNATURE;
|
|
559
|
+
}
|
|
560
|
+
if (signedTurn) {
|
|
561
|
+
signedCalls.add(String(call.id ?? call.name));
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
for (const content of contents) {
|
|
566
|
+
if (!content || typeof content !== 'object')
|
|
567
|
+
continue;
|
|
568
|
+
const record = content;
|
|
569
|
+
if (record.role !== 'user' || !Array.isArray(record.parts))
|
|
570
|
+
continue;
|
|
571
|
+
if (record.parts.length === 0)
|
|
572
|
+
continue;
|
|
573
|
+
const sameTarget = record.parts.every((part) => {
|
|
574
|
+
const response = part?.functionResponse;
|
|
575
|
+
return (response !== undefined &&
|
|
576
|
+
signedCalls.has(String(response.id ?? response.name)));
|
|
577
|
+
});
|
|
578
|
+
if (sameTarget)
|
|
579
|
+
record.role = 'model';
|
|
580
|
+
}
|
|
581
|
+
}
|
|
522
582
|
function sanitizeRequestPayloadForAntigravity(payload) {
|
|
523
583
|
const anyPayload = payload;
|
|
524
584
|
if (Array.isArray(anyPayload.contents)) {
|
|
@@ -557,8 +617,12 @@ function sanitizeRequestPayloadForAntigravity(payload) {
|
|
|
557
617
|
// Parallel function calls MUST NOT have a signature
|
|
558
618
|
sig = undefined;
|
|
559
619
|
}
|
|
620
|
+
// The native CLI sends only the camel-case key; a snake-case
|
|
621
|
+
// duplicate from host history is dropped.
|
|
560
622
|
if (sig) {
|
|
561
|
-
|
|
623
|
+
const signed = { ...part, thoughtSignature: sig };
|
|
624
|
+
delete signed.thought_signature;
|
|
625
|
+
return signed;
|
|
562
626
|
}
|
|
563
627
|
// If not the first part, just return the part without adding any signature keys
|
|
564
628
|
const newPart = { ...part };
|
|
@@ -677,7 +741,7 @@ function getThinkingPartText(part) {
|
|
|
677
741
|
}
|
|
678
742
|
return '';
|
|
679
743
|
}
|
|
680
|
-
function hasCachedMatchingSignature(part, sessionId) {
|
|
744
|
+
function hasCachedMatchingSignature(part, sessionId, wire) {
|
|
681
745
|
if (!part || typeof part !== 'object') {
|
|
682
746
|
return false;
|
|
683
747
|
}
|
|
@@ -685,7 +749,7 @@ function hasCachedMatchingSignature(part, sessionId) {
|
|
|
685
749
|
if (!text) {
|
|
686
750
|
return false;
|
|
687
751
|
}
|
|
688
|
-
const expectedSignature = getCachedSignature(sessionId, text);
|
|
752
|
+
const expectedSignature = wire.signatures.getCachedSignature(sessionId, text);
|
|
689
753
|
if (!expectedSignature) {
|
|
690
754
|
return false;
|
|
691
755
|
}
|
|
@@ -715,7 +779,7 @@ function ensureThoughtSignature(part, sessionId) {
|
|
|
715
779
|
}
|
|
716
780
|
return part;
|
|
717
781
|
}
|
|
718
|
-
function hasSignedThinkingPart(part, sessionId) {
|
|
782
|
+
function hasSignedThinkingPart(part, sessionId, wire) {
|
|
719
783
|
if (!part || typeof part !== 'object') {
|
|
720
784
|
return false;
|
|
721
785
|
}
|
|
@@ -731,7 +795,7 @@ function hasSignedThinkingPart(part, sessionId) {
|
|
|
731
795
|
if (!sessionId) {
|
|
732
796
|
return true;
|
|
733
797
|
}
|
|
734
|
-
return hasCachedMatchingSignature(part, sessionId);
|
|
798
|
+
return hasCachedMatchingSignature(part, sessionId, wire);
|
|
735
799
|
}
|
|
736
800
|
if (part.type === 'thinking' ||
|
|
737
801
|
part.type === 'reasoning' ||
|
|
@@ -747,11 +811,11 @@ function hasSignedThinkingPart(part, sessionId) {
|
|
|
747
811
|
if (!sessionId) {
|
|
748
812
|
return true;
|
|
749
813
|
}
|
|
750
|
-
return hasCachedMatchingSignature(part, sessionId);
|
|
814
|
+
return hasCachedMatchingSignature(part, sessionId, wire);
|
|
751
815
|
}
|
|
752
816
|
return false;
|
|
753
817
|
}
|
|
754
|
-
function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey) {
|
|
818
|
+
function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey, wire) {
|
|
755
819
|
return contents.map((content) => {
|
|
756
820
|
if (!content ||
|
|
757
821
|
typeof content !== 'object' ||
|
|
@@ -769,7 +833,7 @@ function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey) {
|
|
|
769
833
|
}
|
|
770
834
|
// Check if any thinking part has a valid signed signature
|
|
771
835
|
const hasSignedThinking = parts.some((p) => isGeminiThinkingPart(p) &&
|
|
772
|
-
hasSignedThinkingPart(ensureThoughtSignature(p, signatureSessionKey), signatureSessionKey));
|
|
836
|
+
hasSignedThinkingPart(ensureThoughtSignature(p, signatureSessionKey), signatureSessionKey, wire));
|
|
773
837
|
if (hasSignedThinking) {
|
|
774
838
|
// Ensure signatures on thinking parts in-place — NO reordering to preserve array indices (cache-friendly)
|
|
775
839
|
return {
|
|
@@ -781,8 +845,8 @@ function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey) {
|
|
|
781
845
|
}
|
|
782
846
|
// Replace thinking parts with sentinels in-place to preserve array indices (cache-friendly).
|
|
783
847
|
// Deleting parts via .filter() shifts array indices → changes hash → busts prompt cache.
|
|
784
|
-
const lastThinking =
|
|
785
|
-
|
|
848
|
+
const lastThinking = wire.signatures.signatureStore.get(signatureSessionKey);
|
|
849
|
+
wire.logger.debug('Replacing thinking with sentinels in-place', {
|
|
786
850
|
signatureSessionKey,
|
|
787
851
|
hasCachedSig: !!lastThinking,
|
|
788
852
|
});
|
|
@@ -826,14 +890,14 @@ function hasToolUseInContents(contents) {
|
|
|
826
890
|
return content.parts.some(isGeminiToolUsePart);
|
|
827
891
|
});
|
|
828
892
|
}
|
|
829
|
-
function hasSignedThinkingInContents(contents, sessionId) {
|
|
893
|
+
function hasSignedThinkingInContents(contents, sessionId, wire) {
|
|
830
894
|
return contents.some((content) => {
|
|
831
895
|
if (!content ||
|
|
832
896
|
typeof content !== 'object' ||
|
|
833
897
|
!Array.isArray(content.parts)) {
|
|
834
898
|
return false;
|
|
835
899
|
}
|
|
836
|
-
return content.parts.some((part) => hasSignedThinkingPart(part, sessionId));
|
|
900
|
+
return content.parts.some((part) => hasSignedThinkingPart(part, sessionId, wire));
|
|
837
901
|
});
|
|
838
902
|
}
|
|
839
903
|
function hasToolUseInMessages(messages) {
|
|
@@ -848,17 +912,17 @@ function hasToolUseInMessages(messages) {
|
|
|
848
912
|
(block.type === 'tool_use' || block.type === 'tool_result'));
|
|
849
913
|
});
|
|
850
914
|
}
|
|
851
|
-
function hasSignedThinkingInMessages(messages, sessionId) {
|
|
915
|
+
function hasSignedThinkingInMessages(messages, sessionId, wire) {
|
|
852
916
|
return messages.some((message) => {
|
|
853
917
|
if (!message ||
|
|
854
918
|
typeof message !== 'object' ||
|
|
855
919
|
!Array.isArray(message.content)) {
|
|
856
920
|
return false;
|
|
857
921
|
}
|
|
858
|
-
return message.content.some((block) => hasSignedThinkingPart(block, sessionId));
|
|
922
|
+
return message.content.some((block) => hasSignedThinkingPart(block, sessionId, wire));
|
|
859
923
|
});
|
|
860
924
|
}
|
|
861
|
-
function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
925
|
+
function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey, wire) {
|
|
862
926
|
return messages.map((message) => {
|
|
863
927
|
if (!message ||
|
|
864
928
|
typeof message !== 'object' ||
|
|
@@ -880,7 +944,7 @@ function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
|
880
944
|
(b.type === 'thinking' || b.type === 'redacted_thinking');
|
|
881
945
|
// Check if any thinking block has a valid signed signature
|
|
882
946
|
const hasSignedThinking = blocks.some((b) => isThinkingBlock(b) &&
|
|
883
|
-
hasSignedThinkingPart(ensureMessageThinkingSignature(b, signatureSessionKey), signatureSessionKey));
|
|
947
|
+
hasSignedThinkingPart(ensureMessageThinkingSignature(b, signatureSessionKey), signatureSessionKey, wire));
|
|
884
948
|
if (hasSignedThinking) {
|
|
885
949
|
// Ensure signatures on thinking blocks in-place — NO reordering to preserve array indices (cache-friendly)
|
|
886
950
|
return {
|
|
@@ -892,8 +956,8 @@ function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
|
892
956
|
}
|
|
893
957
|
// Replace thinking blocks with sentinels in-place to preserve array indices (cache-friendly).
|
|
894
958
|
// Deleting/reordering via .filter() shifts indices → changes hash → busts prompt cache.
|
|
895
|
-
const lastThinking =
|
|
896
|
-
|
|
959
|
+
const lastThinking = wire.signatures.signatureStore.get(signatureSessionKey);
|
|
960
|
+
wire.logger.debug('Replacing thinking with sentinels in-place (Messages format)', {
|
|
897
961
|
signatureSessionKey,
|
|
898
962
|
hasCachedSig: !!lastThinking,
|
|
899
963
|
});
|
|
@@ -926,9 +990,41 @@ function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
|
926
990
|
export function getPluginSessionId() {
|
|
927
991
|
return PLUGIN_SESSION_ID;
|
|
928
992
|
}
|
|
929
|
-
|
|
993
|
+
/** Builds one location's wire state from its own collaborators. */
|
|
994
|
+
export function createRequestWireLocation(input) {
|
|
995
|
+
const fingerprint = input.sessionFingerprint ?? generateFingerprint();
|
|
996
|
+
return {
|
|
997
|
+
signatures: input.signatures,
|
|
998
|
+
debug: input.debug,
|
|
999
|
+
logger: input.logger,
|
|
1000
|
+
sessionFingerprint: () => fingerprint,
|
|
1001
|
+
displayedThinkingHashes: new Set(),
|
|
1002
|
+
cacheStats: { last: null },
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
// OpenCode 1's single-location binding: every read goes to the module-level
|
|
1006
|
+
// config, signature cache, debug log and fingerprint at call time.
|
|
1007
|
+
const openCode1WireLocation = {
|
|
1008
|
+
signatures: {
|
|
1009
|
+
get keepThinking() {
|
|
1010
|
+
return getKeepThinking();
|
|
1011
|
+
},
|
|
1012
|
+
signatureStore: defaultSignatureStore,
|
|
1013
|
+
cacheSignature: (sessionId, text, signature) => cacheSignature(sessionId, text, signature),
|
|
1014
|
+
getCachedSignature: (sessionId, text) => getCachedSignature(sessionId, text),
|
|
1015
|
+
},
|
|
1016
|
+
debug: {
|
|
1017
|
+
isDebugTuiEnabled: () => isDebugTuiEnabled(),
|
|
1018
|
+
logAntigravityDebugResponse: (context, response, meta) => logAntigravityDebugResponse(context, response, meta),
|
|
1019
|
+
logCacheStats: (model, cacheRead, cacheWrite, totalInput) => logCacheStats(model, cacheRead, cacheWrite, totalInput),
|
|
1020
|
+
},
|
|
1021
|
+
logger: log,
|
|
1022
|
+
sessionFingerprint: () => getSessionFingerprint(),
|
|
1023
|
+
displayedThinkingHashes: sessionDisplayedThinkingHashes,
|
|
1024
|
+
cacheStats: { last: null },
|
|
1025
|
+
};
|
|
930
1026
|
export function getLastCacheStats() {
|
|
931
|
-
return
|
|
1027
|
+
return openCode1WireLocation.cacheStats.last;
|
|
932
1028
|
}
|
|
933
1029
|
const STREAM_ACTION = 'streamGenerateContent';
|
|
934
1030
|
/**
|
|
@@ -952,7 +1048,7 @@ export function fetchInputToUrl(input) {
|
|
|
952
1048
|
export function isGenerativeLanguageRequest(input) {
|
|
953
1049
|
return fetchInputToUrl(input).includes('generativelanguage.googleapis.com');
|
|
954
1050
|
}
|
|
955
|
-
|
|
1051
|
+
function prepareAntigravityRequestIn(wire, input, init, accessToken, projectId, endpointOverride, headerStyle = 'antigravity', forceThinkingRecovery = false, options) {
|
|
956
1052
|
const baseInit = { ...init };
|
|
957
1053
|
const headers = new Headers(init?.headers ?? {});
|
|
958
1054
|
let resolvedProjectId = projectId?.trim() || '';
|
|
@@ -976,6 +1072,8 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
976
1072
|
headers.delete('x-session-affinity');
|
|
977
1073
|
headers.delete('x-session-id');
|
|
978
1074
|
headers.delete('x-parent-session-id');
|
|
1075
|
+
headers.delete('x-opencode-session-id');
|
|
1076
|
+
headers.delete('x-opencode-parent-session-id');
|
|
979
1077
|
// Strip x-goog-user-project header to prevent 403 auth/license conflicts.
|
|
980
1078
|
// This header is added by OpenCode/AI SDK and can force project-level checks
|
|
981
1079
|
// that are not required for Antigravity/Gemini CLI OAuth requests.
|
|
@@ -1000,7 +1098,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1000
1098
|
const transformedUrl = `${baseEndpoint}/v1internal:${rawAction}${streaming ? '?alt=sse' : ''}`;
|
|
1001
1099
|
const isClaude = isClaudeModel(resolved.actualModel);
|
|
1002
1100
|
const isClaudeThinking = isClaudeThinkingModel(resolved.actualModel);
|
|
1003
|
-
const keepThinkingEnabled =
|
|
1101
|
+
const keepThinkingEnabled = wire.signatures.keepThinking;
|
|
1004
1102
|
// Tier-based thinking configuration from model resolver (can be overridden by variant config)
|
|
1005
1103
|
let tierThinkingBudget = resolved.thinkingBudget;
|
|
1006
1104
|
let tierThinkingLevel = resolved.thinkingLevel;
|
|
@@ -1053,19 +1151,19 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1053
1151
|
targetModel: effectiveModel,
|
|
1054
1152
|
});
|
|
1055
1153
|
// Step 1: Strip corrupted/unsigned thinking blocks FIRST
|
|
1056
|
-
deepFilterThinkingBlocks(req, signatureSessionKey, getCachedSignature, true);
|
|
1154
|
+
deepFilterThinkingBlocks(req, signatureSessionKey, wire.signatures.getCachedSignature, true, keepThinkingEnabled);
|
|
1057
1155
|
// Step 2: THEN inject signed thinking from cache (after stripping)
|
|
1058
1156
|
if (isClaudeThinking &&
|
|
1059
1157
|
keepThinkingEnabled &&
|
|
1060
1158
|
Array.isArray(req.contents)) {
|
|
1061
1159
|
;
|
|
1062
|
-
req.contents = ensureThinkingBeforeToolUseInContents(req.contents, signatureSessionKey);
|
|
1160
|
+
req.contents = ensureThinkingBeforeToolUseInContents(req.contents, signatureSessionKey, wire);
|
|
1063
1161
|
}
|
|
1064
1162
|
if (isClaudeThinking &&
|
|
1065
1163
|
keepThinkingEnabled &&
|
|
1066
1164
|
Array.isArray(req.messages)) {
|
|
1067
1165
|
;
|
|
1068
|
-
req.messages = ensureThinkingBeforeToolUseInMessages(req.messages, signatureSessionKey);
|
|
1166
|
+
req.messages = ensureThinkingBeforeToolUseInMessages(req.messages, signatureSessionKey, wire);
|
|
1069
1167
|
}
|
|
1070
1168
|
// Step 3: Apply tool pairing fixes (ID assignment, response matching, orphan recovery)
|
|
1071
1169
|
applyToolPairingFixes(req, true);
|
|
@@ -1074,6 +1172,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1074
1172
|
sanitizeRequestPayloadForAntigravity(req);
|
|
1075
1173
|
stripUnsupportedAntigravityFields(req);
|
|
1076
1174
|
configureAntigravityToolCalling(req);
|
|
1175
|
+
normalizeNativeFunctionResponseRoles(req);
|
|
1077
1176
|
}
|
|
1078
1177
|
}
|
|
1079
1178
|
// AGY rejects every request that ends with a model turn. Enforce this at
|
|
@@ -1106,16 +1205,25 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1106
1205
|
(Array.isArray(req.messages) &&
|
|
1107
1206
|
hasToolUseInMessages(req.messages)));
|
|
1108
1207
|
const hasSignedThinking = requestObjects.some((req) => (Array.isArray(req.contents) &&
|
|
1109
|
-
hasSignedThinkingInContents(req.contents, signatureSessionKey)) ||
|
|
1208
|
+
hasSignedThinkingInContents(req.contents, signatureSessionKey, wire)) ||
|
|
1110
1209
|
(Array.isArray(req.messages) &&
|
|
1111
|
-
hasSignedThinkingInMessages(req.messages, signatureSessionKey)));
|
|
1112
|
-
const hasCachedThinking =
|
|
1210
|
+
hasSignedThinkingInMessages(req.messages, signatureSessionKey, wire)));
|
|
1211
|
+
const hasCachedThinking = wire.signatures.signatureStore.has(signatureSessionKey);
|
|
1113
1212
|
needsSignedThinkingWarmup =
|
|
1114
1213
|
hasToolUse && !hasSignedThinking && !hasCachedThinking;
|
|
1115
1214
|
}
|
|
1116
1215
|
const wireRequest = requestObjects.at(-1);
|
|
1117
1216
|
if (wireRequest) {
|
|
1118
1217
|
if (headerStyle === 'antigravity') {
|
|
1218
|
+
const generationConfig = wireRequest.generationConfig;
|
|
1219
|
+
const config = generationConfig &&
|
|
1220
|
+
typeof generationConfig === 'object' &&
|
|
1221
|
+
!Array.isArray(generationConfig)
|
|
1222
|
+
? generationConfig
|
|
1223
|
+
: {};
|
|
1224
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
1225
|
+
if (Object.keys(config).length > 0)
|
|
1226
|
+
wireRequest.generationConfig = config;
|
|
1119
1227
|
const metadata = buildAgyAgentRequestMetadata(options?.agySession ?? DEFAULT_AGY_REQUEST_SESSION, wireRequest, effectiveModel, options?.agyRequestTimestamp);
|
|
1120
1228
|
wrappedBody.requestId = metadata.requestId;
|
|
1121
1229
|
wireRequest.sessionId = metadata.sessionId;
|
|
@@ -1146,12 +1254,14 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1146
1254
|
const extraBody = requestPayload.extra_body;
|
|
1147
1255
|
const variantConfig = extractVariantThinkingConfig(requestPayload.providerOptions, rawGenerationConfig);
|
|
1148
1256
|
const isGemini3 = effectiveModel.toLowerCase().includes('gemini-3');
|
|
1149
|
-
|
|
1257
|
+
wire.logger.debug(`[ThinkingResolution] rawModel=${rawModel} resolvedModel=${effectiveModel} resolvedTier=${tierThinkingLevel ?? 'none'} variantLevel=${variantConfig?.thinkingLevel ?? 'none'} variantBudget=${variantConfig?.thinkingBudget ?? 'none'} providerOptions.google=${JSON.stringify(requestPayload.providerOptions?.google ?? null)} generationConfig.thinkingConfig=${JSON.stringify(rawGenerationConfig?.thinkingConfig ?? null)}`);
|
|
1150
1258
|
// providerOptions belongs to the host AI SDK and is only used above to
|
|
1151
1259
|
// resolve the requested variant. It is never part of the Google wire schema.
|
|
1152
1260
|
delete requestPayload.providerOptions;
|
|
1153
|
-
if (variantConfig?.thinkingLevel &&
|
|
1154
|
-
|
|
1261
|
+
if (variantConfig?.thinkingLevel &&
|
|
1262
|
+
(isGemini3 ||
|
|
1263
|
+
getAgyNativeModel(effectiveModel)?.supportsAdaptiveThinking)) {
|
|
1264
|
+
// Host effort variants select the corresponding native wire route.
|
|
1155
1265
|
const variantModelBase = rawModel
|
|
1156
1266
|
.replace(/-preview-customtools$/i, '')
|
|
1157
1267
|
.replace(/-preview$/i, '')
|
|
@@ -1168,7 +1278,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1168
1278
|
else if (variantConfig?.thinkingBudget) {
|
|
1169
1279
|
if (isGemini3) {
|
|
1170
1280
|
// Legacy format for Gemini 3 - convert with deprecation warning
|
|
1171
|
-
|
|
1281
|
+
wire.logger.warn('[Deprecated] Using thinkingBudget for Gemini 3 model. Use thinkingLevel instead.');
|
|
1172
1282
|
tierThinkingLevel =
|
|
1173
1283
|
variantConfig.thinkingBudget <= 8192
|
|
1174
1284
|
? 'low'
|
|
@@ -1532,17 +1642,17 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1532
1642
|
targetModel: effectiveModel,
|
|
1533
1643
|
});
|
|
1534
1644
|
// Step 1: Strip corrupted/unsigned thinking blocks FIRST
|
|
1535
|
-
deepFilterThinkingBlocks(requestPayload, signatureSessionKey, getCachedSignature, true);
|
|
1645
|
+
deepFilterThinkingBlocks(requestPayload, signatureSessionKey, wire.signatures.getCachedSignature, true, keepThinkingEnabled);
|
|
1536
1646
|
// Step 2: THEN inject signed thinking from cache (after stripping)
|
|
1537
1647
|
if (isClaudeThinking &&
|
|
1538
1648
|
keepThinkingEnabled &&
|
|
1539
1649
|
Array.isArray(requestPayload.contents)) {
|
|
1540
|
-
requestPayload.contents = ensureThinkingBeforeToolUseInContents(requestPayload.contents, signatureSessionKey);
|
|
1650
|
+
requestPayload.contents = ensureThinkingBeforeToolUseInContents(requestPayload.contents, signatureSessionKey, wire);
|
|
1541
1651
|
}
|
|
1542
1652
|
if (isClaudeThinking &&
|
|
1543
1653
|
keepThinkingEnabled &&
|
|
1544
1654
|
Array.isArray(requestPayload.messages)) {
|
|
1545
|
-
requestPayload.messages = ensureThinkingBeforeToolUseInMessages(requestPayload.messages, signatureSessionKey);
|
|
1655
|
+
requestPayload.messages = ensureThinkingBeforeToolUseInMessages(requestPayload.messages, signatureSessionKey, wire);
|
|
1546
1656
|
}
|
|
1547
1657
|
// Step 3: Check if warmup needed (AFTER injection attempt)
|
|
1548
1658
|
if (isClaudeThinking && keepThinkingEnabled) {
|
|
@@ -1551,10 +1661,10 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1551
1661
|
(Array.isArray(requestPayload.messages) &&
|
|
1552
1662
|
hasToolUseInMessages(requestPayload.messages));
|
|
1553
1663
|
const hasSignedThinking = (Array.isArray(requestPayload.contents) &&
|
|
1554
|
-
hasSignedThinkingInContents(requestPayload.contents, signatureSessionKey)) ||
|
|
1664
|
+
hasSignedThinkingInContents(requestPayload.contents, signatureSessionKey, wire)) ||
|
|
1555
1665
|
(Array.isArray(requestPayload.messages) &&
|
|
1556
|
-
hasSignedThinkingInMessages(requestPayload.messages, signatureSessionKey));
|
|
1557
|
-
const hasCachedThinking =
|
|
1666
|
+
hasSignedThinkingInMessages(requestPayload.messages, signatureSessionKey, wire));
|
|
1667
|
+
const hasCachedThinking = wire.signatures.signatureStore.has(signatureSessionKey);
|
|
1558
1668
|
needsSignedThinkingWarmup =
|
|
1559
1669
|
hasToolUse && !hasSignedThinking && !hasCachedThinking;
|
|
1560
1670
|
}
|
|
@@ -1649,7 +1759,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1649
1759
|
? 'Thinking recovery: retrying with fresh turn (API error)'
|
|
1650
1760
|
: 'Thinking recovery: restarting turn (corrupted context)';
|
|
1651
1761
|
requestPayload.contents = closeToolLoopForThinking(requestPayload.contents);
|
|
1652
|
-
|
|
1762
|
+
wire.signatures.signatureStore.delete(signatureSessionKey);
|
|
1653
1763
|
}
|
|
1654
1764
|
}
|
|
1655
1765
|
// AGY rejects every request that ends with a model turn. Enforce this at
|
|
@@ -1685,8 +1795,30 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1685
1795
|
stripInjectedDebugFromRequestPayload(requestPayload);
|
|
1686
1796
|
sanitizeRequestPayloadForAntigravity(requestPayload);
|
|
1687
1797
|
if (headerStyle === 'antigravity') {
|
|
1798
|
+
const generationConfig = requestPayload.generationConfig;
|
|
1799
|
+
const config = generationConfig &&
|
|
1800
|
+
typeof generationConfig === 'object' &&
|
|
1801
|
+
!Array.isArray(generationConfig)
|
|
1802
|
+
? generationConfig
|
|
1803
|
+
: {};
|
|
1804
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
1805
|
+
if (Object.keys(config).length > 0)
|
|
1806
|
+
requestPayload.generationConfig = config;
|
|
1688
1807
|
stripUnsupportedAntigravityFields(requestPayload);
|
|
1689
1808
|
configureAntigravityToolCalling(requestPayload);
|
|
1809
|
+
// Function-response roles depend on the signatures settled by the
|
|
1810
|
+
// sanitizer above; a response turn that becomes a model turn at the
|
|
1811
|
+
// end of the request then needs the trailing user turn.
|
|
1812
|
+
normalizeNativeFunctionResponseRoles(requestPayload);
|
|
1813
|
+
if (Array.isArray(requestPayload.contents)) {
|
|
1814
|
+
const lastContent = requestPayload.contents[requestPayload.contents.length - 1];
|
|
1815
|
+
if (lastContent?.role === 'model') {
|
|
1816
|
+
requestPayload.contents.push({
|
|
1817
|
+
role: 'user',
|
|
1818
|
+
parts: [{ text: '[Continue]' }],
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1690
1822
|
}
|
|
1691
1823
|
// Use the stable default project ID (never a per-request random one):
|
|
1692
1824
|
// a fresh random project each request busts the prompt cache and
|
|
@@ -1750,7 +1882,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1750
1882
|
// Antigravity mode: Match Antigravity Manager behavior
|
|
1751
1883
|
// AM only sends User-Agent on content requests — no X-Goog-Api-Client, no Client-Metadata header
|
|
1752
1884
|
// (ideType=ANTIGRAVITY goes in request body metadata via project.ts, not as a header)
|
|
1753
|
-
const fingerprint = options?.fingerprint ??
|
|
1885
|
+
const fingerprint = options?.fingerprint ?? wire.sessionFingerprint();
|
|
1754
1886
|
const fingerprintHeaders = buildFingerprintHeaders(fingerprint);
|
|
1755
1887
|
headers.set('User-Agent', fingerprintHeaders['User-Agent'] || selectedHeaders['User-Agent']);
|
|
1756
1888
|
headers.set('Accept-Encoding', 'gzip');
|
|
@@ -1785,6 +1917,10 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1785
1917
|
thinkingRecoveryMessage,
|
|
1786
1918
|
};
|
|
1787
1919
|
}
|
|
1920
|
+
/** OpenCode 1's request preparation over its module-level state. */
|
|
1921
|
+
export function prepareAntigravityRequest(...args) {
|
|
1922
|
+
return prepareAntigravityRequestIn(openCode1WireLocation, ...args);
|
|
1923
|
+
}
|
|
1788
1924
|
export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
1789
1925
|
if (!bodyText || !isClaudeThinking) {
|
|
1790
1926
|
return null;
|
|
@@ -1797,7 +1933,11 @@ export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
1797
1933
|
return null;
|
|
1798
1934
|
}
|
|
1799
1935
|
const warmupPrompt = 'Warmup request for thinking signature.';
|
|
1800
|
-
const
|
|
1936
|
+
const candidate = typeof parsed.model === 'string' ? parsed.model : '';
|
|
1937
|
+
if (candidate && isRetiredAgyModel(candidate))
|
|
1938
|
+
return null;
|
|
1939
|
+
const wireModel = candidate || 'claude-sonnet-5-5-low';
|
|
1940
|
+
parsed.model = wireModel;
|
|
1801
1941
|
const requestObjects = [];
|
|
1802
1942
|
const updateRequest = (req) => {
|
|
1803
1943
|
req.contents = [{ role: 'user', parts: [{ text: warmupPrompt }] }];
|
|
@@ -1808,9 +1948,11 @@ export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
1808
1948
|
includeThoughts: true,
|
|
1809
1949
|
thinkingBudget: AGY_CLAUDE_THINKING_BUDGET,
|
|
1810
1950
|
};
|
|
1811
|
-
generationConfig.maxOutputTokens
|
|
1812
|
-
|
|
1951
|
+
generationConfig.maxOutputTokens ??=
|
|
1952
|
+
generationConfig.max_output_tokens ??
|
|
1953
|
+
getAgyMaxOutputTokens(wireModel) ??
|
|
1813
1954
|
computeClaudeMaxOutputTokens(AGY_CLAUDE_THINKING_BUDGET);
|
|
1955
|
+
applyAgyNativeGenerationConfig(wireModel, generationConfig);
|
|
1814
1956
|
req.generationConfig = generationConfig;
|
|
1815
1957
|
requestObjects.push(req);
|
|
1816
1958
|
};
|
|
@@ -1849,7 +1991,7 @@ export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
1849
1991
|
* For streaming SSE responses, uses TransformStream for true real-time incremental streaming.
|
|
1850
1992
|
* Thinking/reasoning tokens are transformed and forwarded immediately as they arrive.
|
|
1851
1993
|
*/
|
|
1852
|
-
|
|
1994
|
+
async function transformAntigravityResponseIn(wire, response, streaming, debugContext, requestedModel, projectId, endpoint, effectiveModel, sessionId, toolDebugMissing, toolDebugSummary, toolDebugPayload, debugLines, dumpContext) {
|
|
1853
1995
|
const contentType = response.headers.get('content-type') ?? '';
|
|
1854
1996
|
const isJsonResponse = contentType.includes('application/json');
|
|
1855
1997
|
const isEventStreamResponse = contentType.includes('text/event-stream');
|
|
@@ -1857,14 +1999,16 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1857
1999
|
// - If debug=true: inject full debug logs
|
|
1858
2000
|
// - If keep_thinking=true (but no debug): inject placeholder to trigger signature caching
|
|
1859
2001
|
// Both use the same injection path (injectDebugThinking) for consistent behavior
|
|
1860
|
-
const debugText = isDebugTuiEnabled() &&
|
|
2002
|
+
const debugText = wire.debug.isDebugTuiEnabled() &&
|
|
2003
|
+
Array.isArray(debugLines) &&
|
|
2004
|
+
debugLines.length > 0
|
|
1861
2005
|
? formatDebugLinesForThinking(debugLines)
|
|
1862
|
-
:
|
|
2006
|
+
: wire.signatures.keepThinking
|
|
1863
2007
|
? SYNTHETIC_THINKING_PLACEHOLDER
|
|
1864
2008
|
: undefined;
|
|
1865
2009
|
const cacheSignatures = shouldCacheThinkingSignatures(effectiveModel);
|
|
1866
2010
|
if (!isJsonResponse && !isEventStreamResponse) {
|
|
1867
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
2011
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
1868
2012
|
note: 'Non-JSON response (body omitted)',
|
|
1869
2013
|
});
|
|
1870
2014
|
return response;
|
|
@@ -1874,7 +2018,7 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1874
2018
|
// This enables thinking tokens to be displayed as they arrive, like the Codex plugin.
|
|
1875
2019
|
if (streaming && response.ok && isEventStreamResponse && response.body) {
|
|
1876
2020
|
const headers = new Headers(response.headers);
|
|
1877
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
2021
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
1878
2022
|
note: 'Streaming SSE response (real-time transform)',
|
|
1879
2023
|
});
|
|
1880
2024
|
noteGeminiDumpResponse(dumpContext, response);
|
|
@@ -1882,8 +2026,8 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1882
2026
|
const sourceBody = rawDumpTransformer
|
|
1883
2027
|
? response.body.pipeThrough(rawDumpTransformer)
|
|
1884
2028
|
: response.body;
|
|
1885
|
-
const streamingTransformer = createStreamingTransformer(
|
|
1886
|
-
onCacheSignature: cacheSignature,
|
|
2029
|
+
const streamingTransformer = createStreamingTransformer(wire.signatures.signatureStore, {
|
|
2030
|
+
onCacheSignature: wire.signatures.cacheSignature,
|
|
1887
2031
|
onInjectDebug: injectDebugThinking,
|
|
1888
2032
|
onUsageMetadata: (usage) => {
|
|
1889
2033
|
if (effectiveModel) {
|
|
@@ -1891,9 +2035,9 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1891
2035
|
const totalInput = usage.promptTokenCount ?? usage.totalTokenCount;
|
|
1892
2036
|
const hitRate = totalInput > 0 ? Math.round((cacheRead / totalInput) * 100) : 0;
|
|
1893
2037
|
const status = cacheRead > 0 ? 'HIT' : 'MISS';
|
|
1894
|
-
logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
1895
|
-
|
|
1896
|
-
|
|
2038
|
+
wire.debug.logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
2039
|
+
wire.logger.debug(`[Cache] ${status} model=${effectiveModel} read=${cacheRead} total=${totalInput} hitRate=${hitRate}%`);
|
|
2040
|
+
wire.cacheStats.last = {
|
|
1897
2041
|
model: effectiveModel,
|
|
1898
2042
|
read: cacheRead,
|
|
1899
2043
|
total: totalInput,
|
|
@@ -1907,7 +2051,7 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1907
2051
|
debugText,
|
|
1908
2052
|
cacheSignatures,
|
|
1909
2053
|
displayedThinkingHashes: effectiveModel && isGemini3Model(effectiveModel)
|
|
1910
|
-
?
|
|
2054
|
+
? wire.displayedThinkingHashes
|
|
1911
2055
|
: undefined,
|
|
1912
2056
|
// injectSyntheticThinking removed - keep_thinking now unified with debug via debugText
|
|
1913
2057
|
});
|
|
@@ -2009,8 +2153,8 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
2009
2153
|
const totalInput = usage.promptTokenCount ?? usage.totalTokenCount ?? 0;
|
|
2010
2154
|
const hitRate = totalInput > 0 ? Math.round((cacheRead / totalInput) * 100) : 0;
|
|
2011
2155
|
const status = cacheRead > 0 ? 'HIT' : 'MISS';
|
|
2012
|
-
logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
2013
|
-
|
|
2156
|
+
wire.debug.logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
2157
|
+
wire.logger.debug(`[Cache] ${status} model=${effectiveModel} read=${cacheRead} total=${totalInput} hitRate=${hitRate}%`);
|
|
2014
2158
|
}
|
|
2015
2159
|
if (usage?.cachedContentTokenCount !== undefined) {
|
|
2016
2160
|
headers.set('x-antigravity-cached-content-token-count', String(usage.cachedContentTokenCount));
|
|
@@ -2024,7 +2168,7 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
2024
2168
|
headers.set('x-antigravity-candidates-token-count', String(usage.candidatesTokenCount));
|
|
2025
2169
|
}
|
|
2026
2170
|
}
|
|
2027
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
2171
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
2028
2172
|
body: text,
|
|
2029
2173
|
note: streaming ? 'Streaming SSE payload (buffered fallback)' : undefined,
|
|
2030
2174
|
headersOverride: headers,
|
|
@@ -2054,13 +2198,32 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
2054
2198
|
error.message === 'THINKING_RECOVERY_NEEDED') {
|
|
2055
2199
|
throw error;
|
|
2056
2200
|
}
|
|
2057
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
2201
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
2058
2202
|
error,
|
|
2059
2203
|
note: 'Failed to transform Antigravity response',
|
|
2060
2204
|
});
|
|
2061
2205
|
return responseFallback;
|
|
2062
2206
|
}
|
|
2063
2207
|
}
|
|
2208
|
+
/** OpenCode 1's response transformation over its module-level state. */
|
|
2209
|
+
export function transformAntigravityResponse(...args) {
|
|
2210
|
+
return transformAntigravityResponseIn(openCode1WireLocation, ...args);
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* The wire functions bound to one location's state. Preparation and
|
|
2214
|
+
* response handling follow exactly the OpenCode 1 rules; only the signature
|
|
2215
|
+
* cache, keep_thinking policy, debug log, logger, fallback fingerprint,
|
|
2216
|
+
* displayed-thinking set and cache statistics are the location's own.
|
|
2217
|
+
*/
|
|
2218
|
+
export function createRequestWire(location) {
|
|
2219
|
+
return {
|
|
2220
|
+
prepare: (...args) => prepareAntigravityRequestIn(location, ...args),
|
|
2221
|
+
transformResponse: (...args) => transformAntigravityResponseIn(location, ...args),
|
|
2222
|
+
buildThinkingWarmupBody,
|
|
2223
|
+
getImageModelLocalTitle,
|
|
2224
|
+
getLastCacheStats: () => location.cacheStats.last,
|
|
2225
|
+
};
|
|
2226
|
+
}
|
|
2064
2227
|
export const __testExports = {
|
|
2065
2228
|
buildSignatureSessionKey,
|
|
2066
2229
|
hashConversationSeed,
|
|
@@ -2072,13 +2235,14 @@ export const __testExports = {
|
|
|
2072
2235
|
isGeminiToolUsePart,
|
|
2073
2236
|
isGeminiThinkingPart,
|
|
2074
2237
|
ensureThoughtSignature,
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2238
|
+
// The helpers below are exposed over OpenCode 1's module-level state.
|
|
2239
|
+
hasSignedThinkingPart: (part, sessionId) => hasSignedThinkingPart(part, sessionId, openCode1WireLocation),
|
|
2240
|
+
hasSignedThinkingInContents: (contents, sessionId) => hasSignedThinkingInContents(contents, sessionId, openCode1WireLocation),
|
|
2241
|
+
hasSignedThinkingInMessages: (messages, sessionId) => hasSignedThinkingInMessages(messages, sessionId, openCode1WireLocation),
|
|
2078
2242
|
hasToolUseInContents,
|
|
2079
2243
|
hasToolUseInMessages,
|
|
2080
|
-
ensureThinkingBeforeToolUseInContents,
|
|
2081
|
-
ensureThinkingBeforeToolUseInMessages,
|
|
2244
|
+
ensureThinkingBeforeToolUseInContents: (contents, key) => ensureThinkingBeforeToolUseInContents(contents, key, openCode1WireLocation),
|
|
2245
|
+
ensureThinkingBeforeToolUseInMessages: (messages, key) => ensureThinkingBeforeToolUseInMessages(messages, key, openCode1WireLocation),
|
|
2082
2246
|
MIN_SIGNATURE_LENGTH,
|
|
2083
2247
|
transformSseLine,
|
|
2084
2248
|
transformStreamingPayload,
|