@cortexkit/opencode-antigravity-auth 2.2.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -89
- package/dist/cli.js +18469 -810
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +4079 -0
- package/dist/index.js +40923 -16450
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +6949 -0
- package/dist/server.js +50948 -0
- package/dist/server.js.map +7 -0
- package/dist/server.meta.json +7284 -0
- package/dist/src/cli.d.ts +46 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +207 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/NOTICE.txt +21 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/dist/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/dist/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/dist/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/dist/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/dist/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/dist/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/dist/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/dist/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/dist/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/dist/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/dist/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/dist/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/dist/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/dist/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/dist/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/dist/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/dist/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/dist/src/common-auth-embedded/claustrum/index.js +22 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/dist/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/dist/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/dist/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/src/common-auth-embedded/commands/builtins.js +534 -0
- package/dist/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/commands/index.js +5 -0
- package/dist/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/src/common-auth-embedded/commands/menu.js +300 -0
- package/dist/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/src/common-auth-embedded/commands/model.js +16 -0
- package/dist/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/src/common-auth-embedded/commands/pi.js +206 -0
- package/dist/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/src/common-auth-embedded/commands/seam.js +301 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/dist/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/dist/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/dist/src/common-auth-embedded/fs/index.js +6 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/dist/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/dist/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/dist/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/dist/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/src/common-auth-embedded/logger/engine.js +246 -0
- package/dist/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/src/common-auth-embedded/logger/index.js +3 -0
- package/dist/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/src/common-auth-embedded/logger/redact.js +83 -0
- package/dist/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/dist/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/opencode2/index.js +4 -0
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/dist/src/common-auth-embedded/opencode2/install.js +886 -0
- package/dist/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/dist/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/dist/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/dist/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/dist/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/dist/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/dist/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/dist/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/dist/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/src/common-auth-embedded/quota/codec.js +12 -0
- package/dist/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/src/common-auth-embedded/quota/format.js +138 -0
- package/dist/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/quota/index.js +5 -0
- package/dist/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/src/common-auth-embedded/quota/map.js +105 -0
- package/dist/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/src/common-auth-embedded/quota/merge.js +162 -0
- package/dist/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/src/common-auth-embedded/quota/projection.js +134 -0
- package/dist/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/dist/src/common-auth-embedded/routing/admission.js +142 -0
- package/dist/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/routing/index.js +4 -0
- package/dist/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/dist/src/common-auth-embedded/routing/ordered.js +58 -0
- package/dist/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/dist/src/common-auth-embedded/routing/pins.js +34 -0
- package/dist/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/dist/src/common-auth-embedded/routing/sticky.js +339 -0
- package/dist/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/dist/src/common-auth-embedded/rpc/client.js +2 -0
- package/dist/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/dist/src/common-auth-embedded/rpc/index.js +5 -0
- package/dist/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/dist/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/dist/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/dist/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/dist/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/dist/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/dist/src/common-auth-embedded/source-output.json +1326 -0
- package/dist/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/src/common-auth-embedded/store/attribution.js +60 -0
- package/dist/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/src/common-auth-embedded/store/errors.js +38 -0
- package/dist/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/src/common-auth-embedded/store/hooks.js +34 -0
- package/dist/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/src/common-auth-embedded/store/identity.js +79 -0
- package/dist/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/src/common-auth-embedded/store/index.js +7 -0
- package/dist/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/src/common-auth-embedded/store/mutate.js +500 -0
- package/dist/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/src/common-auth-embedded/store/pool.js +120 -0
- package/dist/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/src/common-auth-embedded/store/provider-state.js +226 -0
- package/dist/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/src/common-auth-embedded/store/publication.js +304 -0
- package/dist/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/pull.js +143 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/dist/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/src/common-auth-embedded/store/refresh.js +225 -0
- package/dist/src/common-auth-embedded/store/reserved.js +13 -0
- package/dist/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/src/common-auth-embedded/store/rows.js +1258 -0
- package/dist/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/src/common-auth-embedded/store/runtime.js +68 -0
- package/dist/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/src/common-auth-embedded/store/schema.js +754 -0
- package/dist/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/src/common-auth-embedded/store/settings.js +120 -0
- package/dist/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/src/common-auth-embedded/store/torn.js +294 -0
- package/dist/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/dist/src/common-auth-embedded/tui/index.js +21 -0
- package/dist/src/common-auth-embedded/util/any-signal.js +42 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +4 -0
- package/dist/src/constants.js.map +1 -1
- package/dist/src/ga/proxy-guard.d.ts +120 -0
- package/dist/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/src/ga/proxy-guard.js +269 -0
- package/dist/src/ga/proxy-guard.js.map +1 -0
- package/dist/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/src/ga/rpc/protocol.js +1278 -0
- package/dist/src/ga/rpc/protocol.js.map +1 -0
- package/dist/src/ga/server/auth.d.ts +9 -0
- package/dist/src/ga/server/auth.d.ts.map +1 -0
- package/dist/src/ga/server/auth.js +37 -0
- package/dist/src/ga/server/auth.js.map +1 -0
- package/dist/src/ga/server/index.d.ts +576 -0
- package/dist/src/ga/server/index.d.ts.map +1 -0
- package/dist/src/ga/server/index.js +1012 -0
- package/dist/src/ga/server/index.js.map +1 -0
- package/dist/src/ga/tui/host-ga.d.ts +350 -0
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -0
- package/dist/src/ga/tui/host-ga.js +1242 -0
- package/dist/src/ga/tui/host-ga.js.map +1 -0
- package/dist/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/src/logging/provider-key-policy.js +11 -0
- package/dist/src/logging/provider-key-policy.js.map +1 -0
- package/dist/src/plugin/account-access.d.ts +130 -15
- package/dist/src/plugin/account-access.d.ts.map +1 -1
- package/dist/src/plugin/account-access.js +331 -129
- package/dist/src/plugin/account-access.js.map +1 -1
- package/dist/src/plugin/account-blocks.d.ts +102 -0
- package/dist/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/src/plugin/account-blocks.js +196 -0
- package/dist/src/plugin/account-blocks.js.map +1 -0
- package/dist/src/plugin/accounts.d.ts +85 -1
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +127 -3
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/auth-loader.d.ts +69 -5
- package/dist/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/src/plugin/auth-loader.js +355 -52
- package/dist/src/plugin/auth-loader.js.map +1 -1
- package/dist/src/plugin/background-quota-refresh.d.ts +54 -8
- package/dist/src/plugin/background-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-quota-refresh.js +81 -24
- package/dist/src/plugin/background-quota-refresh.js.map +1 -1
- package/dist/src/plugin/cache/index.d.ts +1 -1
- package/dist/src/plugin/cache/index.d.ts.map +1 -1
- package/dist/src/plugin/cache/index.js +1 -1
- package/dist/src/plugin/cache/index.js.map +1 -1
- package/dist/src/plugin/cache/signature-cache.d.ts +55 -10
- package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/src/plugin/cache/signature-cache.js +100 -41
- package/dist/src/plugin/cache/signature-cache.js.map +1 -1
- package/dist/src/plugin/cache.d.ts +80 -16
- package/dist/src/plugin/cache.d.ts.map +1 -1
- package/dist/src/plugin/cache.js +339 -200
- package/dist/src/plugin/cache.js.map +1 -1
- package/dist/src/plugin/catalog.d.ts +4 -18
- package/dist/src/plugin/catalog.d.ts.map +1 -1
- package/dist/src/plugin/catalog.js +11 -41
- package/dist/src/plugin/catalog.js.map +1 -1
- package/dist/src/plugin/command-apply.d.ts +58 -0
- package/dist/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/src/plugin/command-apply.js +168 -0
- package/dist/src/plugin/command-apply.js.map +1 -0
- package/dist/src/plugin/command-data.d.ts +1 -0
- package/dist/src/plugin/command-data.d.ts.map +1 -1
- package/dist/src/plugin/command-data.js +2 -0
- package/dist/src/plugin/command-data.js.map +1 -1
- package/dist/src/plugin/commands.d.ts +142 -132
- package/dist/src/plugin/commands.d.ts.map +1 -1
- package/dist/src/plugin/commands.js +214 -686
- package/dist/src/plugin/commands.js.map +1 -1
- package/dist/src/plugin/config/index.d.ts +1 -1
- package/dist/src/plugin/config/index.d.ts.map +1 -1
- package/dist/src/plugin/config/index.js +1 -1
- package/dist/src/plugin/config/index.js.map +1 -1
- package/dist/src/plugin/config/loader.d.ts +37 -1
- package/dist/src/plugin/config/loader.d.ts.map +1 -1
- package/dist/src/plugin/config/loader.js +64 -9
- package/dist/src/plugin/config/loader.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +2 -2
- package/dist/src/plugin/config/schema.d.ts +2 -2
- package/dist/src/plugin/config/writer.d.ts +7 -0
- package/dist/src/plugin/config/writer.d.ts.map +1 -1
- package/dist/src/plugin/config/writer.js +10 -1
- package/dist/src/plugin/config/writer.js.map +1 -1
- package/dist/src/plugin/debug.d.ts +72 -29
- package/dist/src/plugin/debug.d.ts.map +1 -1
- package/dist/src/plugin/debug.js +353 -239
- package/dist/src/plugin/debug.js.map +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts.map +1 -1
- package/dist/src/plugin/fetch/retry-state.js.map +1 -1
- package/dist/src/plugin/fetch-interceptor.d.ts +66 -11
- package/dist/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/src/plugin/fetch-interceptor.js +228 -1347
- package/dist/src/plugin/fetch-interceptor.js.map +1 -1
- package/dist/src/plugin/fetch-routing.d.ts +7 -2
- package/dist/src/plugin/fetch-routing.d.ts.map +1 -1
- package/dist/src/plugin/fetch-routing.js +7 -4
- package/dist/src/plugin/fetch-routing.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/src/plugin/ga-location-services.js +1838 -0
- package/dist/src/plugin/ga-location-services.js.map +1 -0
- package/dist/src/plugin/gemini-dump.d.ts +37 -12
- package/dist/src/plugin/gemini-dump.d.ts.map +1 -1
- package/dist/src/plugin/gemini-dump.js +42 -21
- package/dist/src/plugin/gemini-dump.js.map +1 -1
- package/dist/src/plugin/google-search-tool.d.ts +2 -1
- package/dist/src/plugin/google-search-tool.d.ts.map +1 -1
- package/dist/src/plugin/google-search-tool.js +4 -1
- package/dist/src/plugin/google-search-tool.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +505 -141
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/killswitch.d.ts +1 -2
- package/dist/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.d.ts +24 -1
- package/dist/src/plugin/lifecycle.d.ts.map +1 -1
- package/dist/src/plugin/lifecycle.js +95 -8
- package/dist/src/plugin/lifecycle.js.map +1 -1
- package/dist/src/plugin/logger.d.ts +61 -10
- package/dist/src/plugin/logger.d.ts.map +1 -1
- package/dist/src/plugin/logger.js +134 -63
- package/dist/src/plugin/logger.js.map +1 -1
- package/dist/src/plugin/neutral-types.d.ts +42 -0
- package/dist/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/src/plugin/neutral-types.js +12 -0
- package/dist/src/plugin/neutral-types.js.map +1 -0
- package/dist/src/plugin/oauth-methods.d.ts +2 -1
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/src/plugin/oauth-methods.js +173 -88
- package/dist/src/plugin/oauth-methods.js.map +1 -1
- package/dist/src/plugin/operator-settings.d.ts +34 -0
- package/dist/src/plugin/operator-settings.d.ts.map +1 -1
- package/dist/src/plugin/operator-settings.js +105 -2
- package/dist/src/plugin/operator-settings.js.map +1 -1
- package/dist/src/plugin/persist-account-pool.d.ts +63 -2
- package/dist/src/plugin/persist-account-pool.d.ts.map +1 -1
- package/dist/src/plugin/persist-account-pool.js +125 -2
- package/dist/src/plugin/persist-account-pool.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +335 -35
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +825 -95
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/refresh-queue.d.ts +35 -5
- package/dist/src/plugin/refresh-queue.d.ts.map +1 -1
- package/dist/src/plugin/refresh-queue.js +50 -16
- package/dist/src/plugin/refresh-queue.js.map +1 -1
- package/dist/src/plugin/request-helpers.d.ts +30 -5
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +82 -17
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/request.d.ts +63 -15
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +190 -60
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/session-context.d.ts.map +1 -1
- package/dist/src/plugin/session-context.js +5 -2
- package/dist/src/plugin/session-context.js.map +1 -1
- package/dist/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/src/plugin/shared/local-grant.js +19 -0
- package/dist/src/plugin/shared/local-grant.js.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-cancellation.js +118 -0
- package/dist/src/plugin/shared/request-cancellation.js.map +1 -0
- package/dist/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/src/plugin/shared/request-services.js +1743 -0
- package/dist/src/plugin/shared/request-services.js.map +1 -0
- package/dist/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/src/plugin/shared/runtime.js +345 -0
- package/dist/src/plugin/shared/runtime.js.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/src/plugin/shared/source-sidebar.js +41 -0
- package/dist/src/plugin/shared/source-sidebar.js.map +1 -0
- package/dist/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-menu.js +49 -0
- package/dist/src/plugin/shared/vault-menu.js.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/src/plugin/shared/vault-request-credentials.js +485 -0
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -0
- package/dist/src/plugin/storage.d.ts +127 -1
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +188 -3
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/token.d.ts +23 -1
- package/dist/src/plugin/token.d.ts.map +1 -1
- package/dist/src/plugin/token.js +117 -58
- package/dist/src/plugin/token.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts +1 -10
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +6 -42
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin/vault-activation.d.ts +11 -0
- package/dist/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/src/plugin/vault-activation.js +53 -0
- package/dist/src/plugin/vault-activation.js.map +1 -0
- package/dist/src/plugin/vault-custody.d.ts +131 -0
- package/dist/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/src/plugin/vault-custody.js +381 -0
- package/dist/src/plugin/vault-custody.js.map +1 -0
- package/dist/src/quota-presentation.d.ts +18 -0
- package/dist/src/quota-presentation.d.ts.map +1 -0
- package/dist/src/quota-presentation.js +58 -0
- package/dist/src/quota-presentation.js.map +1 -0
- package/dist/src/rpc/notifications.d.ts +2 -2
- package/dist/src/rpc/notifications.d.ts.map +1 -1
- package/dist/src/rpc/notifications.js +1 -1
- package/dist/src/rpc/notifications.js.map +1 -1
- package/dist/src/rpc/port-file.d.ts +2 -12
- package/dist/src/rpc/port-file.d.ts.map +1 -1
- package/dist/src/rpc/port-file.js +5 -107
- package/dist/src/rpc/port-file.js.map +1 -1
- package/dist/src/rpc/protocol.d.ts +47 -16
- package/dist/src/rpc/protocol.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.d.ts +27 -3
- package/dist/src/rpc/rpc-client.d.ts.map +1 -1
- package/dist/src/rpc/rpc-client.js +55 -45
- package/dist/src/rpc/rpc-client.js.map +1 -1
- package/dist/src/rpc/rpc-server.d.ts +13 -2
- package/dist/src/rpc/rpc-server.d.ts.map +1 -1
- package/dist/src/rpc/rpc-server.js +38 -212
- package/dist/src/rpc/rpc-server.js.map +1 -1
- package/dist/src/server.d.ts +30 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +29 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/sidebar-projection.d.ts +102 -0
- package/dist/src/sidebar-projection.d.ts.map +1 -0
- package/dist/src/sidebar-projection.js +146 -0
- package/dist/src/sidebar-projection.js.map +1 -0
- package/dist/src/sidebar-state.d.ts +13 -5
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +49 -16
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui/command-dialogs.d.ts +58 -52
- package/dist/src/tui/command-dialogs.d.ts.map +1 -1
- package/dist/src/tui/command-dialogs.js +379 -571
- package/dist/src/tui/command-dialogs.js.map +1 -1
- package/dist/src/tui/file-logger.d.ts +2 -3
- package/dist/src/tui/file-logger.d.ts.map +1 -1
- package/dist/src/tui/file-logger.js +21 -7
- package/dist/src/tui/file-logger.js.map +1 -1
- package/dist/src/tui/host-api.d.ts +196 -0
- package/dist/src/tui/host-api.d.ts.map +1 -0
- package/dist/src/tui/host-api.js +357 -0
- package/dist/src/tui/host-api.js.map +1 -0
- package/dist/src/tui/host-v1.d.ts +60 -0
- package/dist/src/tui/host-v1.d.ts.map +1 -0
- package/dist/src/tui/host-v1.js +147 -0
- package/dist/src/tui/host-v1.js.map +1 -0
- package/dist/src/tui/vault-setup.d.ts +98 -0
- package/dist/src/tui/vault-setup.d.ts.map +1 -0
- package/dist/src/tui/vault-setup.js +198 -0
- package/dist/src/tui/vault-setup.js.map +1 -0
- package/dist/src/tui.d.ts +4 -11
- package/dist/src/tui.d.ts.map +1 -1
- package/dist/src/tui.js +33 -75
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +380 -0
- package/dist/tui-ga-build-map.json +187 -0
- package/dist/types/src/antigravity/oauth.d.ts +2 -0
- package/dist/types/src/antigravity/oauth.d.ts.map +1 -0
- package/dist/types/src/cli.d.ts +66 -0
- package/dist/types/src/cli.d.ts.map +1 -0
- package/dist/types/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/dist/types/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/dist/types/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/dist/types/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/dist/types/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/dist/types/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/dist/types/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/dist/types/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/dist/types/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/dist/types/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/dist/types/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/dist/types/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/dist/types/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/dist/types/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/dist/types/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/dist/types/src/common-auth-embedded/store/index.d.ts +21 -0
- package/dist/types/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/dist/types/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/dist/types/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/dist/types/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/dist/types/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/dist/types/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/dist/types/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/dist/types/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/dist/types/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/dist/types/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/dist/types/src/constants.d.ts +3 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/ga/proxy-guard.d.ts +120 -0
- package/dist/types/src/ga/proxy-guard.d.ts.map +1 -0
- package/dist/types/src/ga/rpc/protocol.d.ts +504 -0
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/ga/server/auth.d.ts +9 -0
- package/dist/types/src/ga/server/auth.d.ts.map +1 -0
- package/dist/types/src/ga/server/index.d.ts +576 -0
- package/dist/types/src/ga/server/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/cache.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts +16 -0
- package/dist/types/src/hooks/auto-update-checker/checker.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts +9 -0
- package/dist/types/src/hooks/auto-update-checker/constants.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts +34 -0
- package/dist/types/src/hooks/auto-update-checker/index.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts +3 -0
- package/dist/types/src/hooks/auto-update-checker/logging.d.ts.map +1 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts +25 -0
- package/dist/types/src/hooks/auto-update-checker/types.d.ts.map +1 -0
- package/dist/types/src/logging/provider-key-policy.d.ts +9 -0
- package/dist/types/src/logging/provider-key-policy.d.ts.map +1 -0
- package/dist/types/src/plugin/account-access.d.ts +214 -0
- package/dist/types/src/plugin/account-access.d.ts.map +1 -0
- package/dist/types/src/plugin/account-blocks.d.ts +102 -0
- package/dist/types/src/plugin/account-blocks.d.ts.map +1 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts +34 -0
- package/dist/types/src/plugin/account-command-oauth.d.ts.map +1 -0
- package/dist/types/src/plugin/accounts.d.ts +94 -0
- package/dist/types/src/plugin/accounts.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts +2 -0
- package/dist/types/src/plugin/agy-request-metadata.d.ts.map +1 -0
- package/dist/types/src/plugin/agy-transport.d.ts +2 -0
- package/dist/types/src/plugin/agy-transport.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-doctor.d.ts +30 -0
- package/dist/types/src/plugin/auth-doctor.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-drift.d.ts +13 -0
- package/dist/types/src/plugin/auth-drift.d.ts.map +1 -0
- package/dist/types/src/plugin/auth-loader.d.ts +114 -0
- package/dist/types/src/plugin/auth-loader.d.ts.map +1 -0
- package/dist/types/src/plugin/auth.d.ts +2 -0
- package/dist/types/src/plugin/auth.d.ts.map +1 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts +192 -0
- package/dist/types/src/plugin/background-quota-refresh.d.ts.map +1 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts +156 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts.map +1 -0
- package/dist/types/src/plugin/cache.d.ts +109 -0
- package/dist/types/src/plugin/cache.d.ts.map +1 -0
- package/dist/types/src/plugin/catalog.d.ts +9 -0
- package/dist/types/src/plugin/catalog.d.ts.map +1 -0
- package/dist/types/src/plugin/cli.d.ts +44 -0
- package/dist/types/src/plugin/cli.d.ts.map +1 -0
- package/dist/types/src/plugin/command-apply.d.ts +58 -0
- package/dist/types/src/plugin/command-apply.d.ts.map +1 -0
- package/dist/types/src/plugin/command-data.d.ts +330 -0
- package/dist/types/src/plugin/command-data.d.ts.map +1 -0
- package/dist/types/src/plugin/commands.d.ts +164 -0
- package/dist/types/src/plugin/commands.d.ts.map +1 -0
- package/dist/types/src/plugin/config/index.d.ts +16 -0
- package/dist/types/src/plugin/config/index.d.ts.map +1 -0
- package/dist/types/src/plugin/config/loader.d.ts +72 -0
- package/dist/types/src/plugin/config/loader.d.ts.map +1 -0
- package/dist/types/src/plugin/config/models.d.ts +3 -0
- package/dist/types/src/plugin/config/models.d.ts.map +1 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts +29 -0
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/schema.d.ts +162 -0
- package/dist/types/src/plugin/config/schema.d.ts.map +1 -0
- package/dist/types/src/plugin/config/updater.d.ts +55 -0
- package/dist/types/src/plugin/config/updater.d.ts.map +1 -0
- package/dist/types/src/plugin/config/writer.d.ts +41 -0
- package/dist/types/src/plugin/config/writer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts +3 -0
- package/dist/types/src/plugin/core/streaming/index.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts +12 -0
- package/dist/types/src/plugin/core/streaming/transformer.d.ts.map +1 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts +34 -0
- package/dist/types/src/plugin/core/streaming/types.d.ts.map +1 -0
- package/dist/types/src/plugin/debug.d.ts +144 -0
- package/dist/types/src/plugin/debug.d.ts.map +1 -0
- package/dist/types/src/plugin/dependencies.d.ts +129 -0
- package/dist/types/src/plugin/dependencies.d.ts.map +1 -0
- package/dist/types/src/plugin/errors.d.ts +55 -0
- package/dist/types/src/plugin/errors.d.ts.map +1 -0
- package/dist/types/src/plugin/event-handler.d.ts +53 -0
- package/dist/types/src/plugin/event-handler.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts +61 -0
- package/dist/types/src/plugin/fetch/retry-state.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts +30 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts +114 -0
- package/dist/types/src/plugin/fetch-interceptor.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch-routing.d.ts +31 -0
- package/dist/types/src/plugin/fetch-routing.d.ts.map +1 -0
- package/dist/types/src/plugin/fingerprint.d.ts +2 -0
- package/dist/types/src/plugin/fingerprint.d.ts.map +1 -0
- package/dist/types/src/plugin/ga-location-services.d.ts +389 -0
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -0
- package/dist/types/src/plugin/gemini-dump.d.ts +72 -0
- package/dist/types/src/plugin/gemini-dump.d.ts.map +1 -0
- package/dist/types/src/plugin/google-search-tool.d.ts +10 -0
- package/dist/types/src/plugin/google-search-tool.d.ts.map +1 -0
- package/dist/types/src/plugin/image-saver.d.ts +6 -0
- package/dist/types/src/plugin/image-saver.d.ts.map +1 -0
- package/dist/types/src/plugin/index.d.ts +30 -0
- package/dist/types/src/plugin/index.d.ts.map +1 -0
- package/dist/types/src/plugin/killswitch.d.ts +93 -0
- package/dist/types/src/plugin/killswitch.d.ts.map +1 -0
- package/dist/types/src/plugin/lifecycle.d.ts +63 -0
- package/dist/types/src/plugin/lifecycle.d.ts.map +1 -0
- package/dist/types/src/plugin/logger.d.ts +83 -0
- package/dist/types/src/plugin/logger.d.ts.map +1 -0
- package/dist/types/src/plugin/logging-utils.d.ts +57 -0
- package/dist/types/src/plugin/logging-utils.d.ts.map +1 -0
- package/dist/types/src/plugin/model-registry.d.ts +2 -0
- package/dist/types/src/plugin/model-registry.d.ts.map +1 -0
- package/dist/types/src/plugin/neutral-types.d.ts +42 -0
- package/dist/types/src/plugin/neutral-types.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-login.d.ts +22 -0
- package/dist/types/src/plugin/oauth-login.d.ts.map +1 -0
- package/dist/types/src/plugin/oauth-methods.d.ts +43 -0
- package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -0
- package/dist/types/src/plugin/operator-settings.d.ts +74 -0
- package/dist/types/src/plugin/operator-settings.d.ts.map +1 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts +98 -0
- package/dist/types/src/plugin/persist-account-pool.d.ts.map +1 -0
- package/dist/types/src/plugin/project.d.ts +2 -0
- package/dist/types/src/plugin/project.d.ts.map +1 -0
- package/dist/types/src/plugin/prompt-context.d.ts +18 -0
- package/dist/types/src/plugin/prompt-context.d.ts.map +1 -0
- package/dist/types/src/plugin/quota.d.ts +441 -0
- package/dist/types/src/plugin/quota.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/constants.d.ts +22 -0
- package/dist/types/src/plugin/recovery/constants.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/storage.d.ts +24 -0
- package/dist/types/src/plugin/recovery/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery/types.d.ts +116 -0
- package/dist/types/src/plugin/recovery/types.d.ts.map +1 -0
- package/dist/types/src/plugin/recovery.d.ts +61 -0
- package/dist/types/src/plugin/recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/refresh-queue.d.ts +133 -0
- package/dist/types/src/plugin/refresh-queue.d.ts.map +1 -0
- package/dist/types/src/plugin/request-helpers.d.ts +304 -0
- package/dist/types/src/plugin/request-helpers.d.ts.map +1 -0
- package/dist/types/src/plugin/request.d.ts +161 -0
- package/dist/types/src/plugin/request.d.ts.map +1 -0
- package/dist/types/src/plugin/rotation.d.ts +2 -0
- package/dist/types/src/plugin/rotation.d.ts.map +1 -0
- package/dist/types/src/plugin/search.d.ts +25 -0
- package/dist/types/src/plugin/search.d.ts.map +1 -0
- package/dist/types/src/plugin/server.d.ts +23 -0
- package/dist/types/src/plugin/server.d.ts.map +1 -0
- package/dist/types/src/plugin/session-context.d.ts +22 -0
- package/dist/types/src/plugin/session-context.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts +26 -0
- package/dist/types/src/plugin/shared/local-grant.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts +12 -0
- package/dist/types/src/plugin/shared/request-cancellation.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-services.d.ts +375 -0
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/runtime.d.ts +217 -0
- package/dist/types/src/plugin/shared/runtime.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts +15 -0
- package/dist/types/src/plugin/shared/source-sidebar.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts +5 -0
- package/dist/types/src/plugin/shared/vault-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +168 -0
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -0
- package/dist/types/src/plugin/storage.d.ts +221 -0
- package/dist/types/src/plugin/storage.d.ts.map +1 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts +5 -0
- package/dist/types/src/plugin/stores/signature-store.d.ts.map +1 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts +90 -0
- package/dist/types/src/plugin/thinking-recovery.d.ts.map +1 -0
- package/dist/types/src/plugin/token.d.ts +41 -0
- package/dist/types/src/plugin/token.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts +2 -0
- package/dist/types/src/plugin/transform/cross-model-sanitizer.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/index.d.ts +2 -0
- package/dist/types/src/plugin/transform/index.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts +2 -0
- package/dist/types/src/plugin/transform/model-resolver.d.ts.map +1 -0
- package/dist/types/src/plugin/transform/types.d.ts +2 -0
- package/dist/types/src/plugin/transform/types.d.ts.map +1 -0
- package/dist/types/src/plugin/types.d.ts +36 -0
- package/dist/types/src/plugin/types.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/ansi.d.ts +32 -0
- package/dist/types/src/plugin/ui/ansi.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts +59 -0
- package/dist/types/src/plugin/ui/auth-menu.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/confirm.d.ts +2 -0
- package/dist/types/src/plugin/ui/confirm.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts +73 -0
- package/dist/types/src/plugin/ui/quota-status.d.ts.map +1 -0
- package/dist/types/src/plugin/ui/select.d.ts +23 -0
- package/dist/types/src/plugin/ui/select.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-activation.d.ts +11 -0
- package/dist/types/src/plugin/vault-activation.d.ts.map +1 -0
- package/dist/types/src/plugin/vault-custody.d.ts +131 -0
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -0
- package/dist/types/src/plugin/version.d.ts +2 -0
- package/dist/types/src/plugin/version.d.ts.map +1 -0
- package/dist/types/src/quota-presentation.d.ts +18 -0
- package/dist/types/src/quota-presentation.d.ts.map +1 -0
- package/dist/types/src/rpc/notifications.d.ts +6 -0
- package/dist/types/src/rpc/notifications.d.ts.map +1 -0
- package/dist/types/src/rpc/protocol.d.ts +53 -0
- package/dist/types/src/rpc/protocol.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-dir.d.ts +4 -0
- package/dist/types/src/rpc/rpc-dir.d.ts.map +1 -0
- package/dist/types/src/rpc/rpc-server.d.ts +24 -0
- package/dist/types/src/rpc/rpc-server.d.ts.map +1 -0
- package/dist/types/src/server.d.ts +30 -0
- package/dist/types/src/server.d.ts.map +1 -0
- package/dist/types/src/sidebar-state.d.ts +365 -0
- package/dist/types/src/sidebar-state.d.ts.map +1 -0
- package/dist/types/src/tui/host-api.d.ts +196 -0
- package/dist/types/src/tui/host-api.d.ts.map +1 -0
- package/package.json +45 -18
- package/server.js +6 -0
- package/src/common-auth-embedded/NOTICE.txt +21 -0
- package/src/common-auth-embedded/auth-menu/accounts.d.ts +97 -0
- package/src/common-auth-embedded/auth-menu/accounts.js +387 -0
- package/src/common-auth-embedded/auth-menu/ansi.d.ts +26 -0
- package/src/common-auth-embedded/auth-menu/ansi.js +98 -0
- package/src/common-auth-embedded/auth-menu/confirm.d.ts +7 -0
- package/src/common-auth-embedded/auth-menu/confirm.js +21 -0
- package/src/common-auth-embedded/auth-menu/doctor.d.ts +52 -0
- package/src/common-auth-embedded/auth-menu/doctor.js +81 -0
- package/src/common-auth-embedded/auth-menu/index.d.ts +17 -0
- package/src/common-auth-embedded/auth-menu/index.js +12 -0
- package/src/common-auth-embedded/auth-menu/login.d.ts +55 -0
- package/src/common-auth-embedded/auth-menu/login.js +83 -0
- package/src/common-auth-embedded/auth-menu/menu.d.ts +59 -0
- package/src/common-auth-embedded/auth-menu/menu.js +73 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.d.ts +49 -0
- package/src/common-auth-embedded/auth-menu/opencode-v1.js +47 -0
- package/src/common-auth-embedded/auth-menu/select.d.ts +21 -0
- package/src/common-auth-embedded/auth-menu/select.js +159 -0
- package/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/src/common-auth-embedded/auth-menu/terminal.js +19 -0
- package/src/common-auth-embedded/claustrum/consumer.d.ts +102 -0
- package/src/common-auth-embedded/claustrum/consumer.js +298 -0
- package/src/common-auth-embedded/claustrum/custody.d.ts +175 -0
- package/src/common-auth-embedded/claustrum/custody.js +354 -0
- package/src/common-auth-embedded/claustrum/enrollment.d.ts +158 -0
- package/src/common-auth-embedded/claustrum/enrollment.js +759 -0
- package/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/src/common-auth-embedded/claustrum/errors.js +8 -0
- package/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/src/common-auth-embedded/claustrum/host-slot.js +72 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +18 -0
- package/src/common-auth-embedded/claustrum/index.js +22 -0
- package/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/src/common-auth-embedded/claustrum/interlock.js +29 -0
- package/src/common-auth-embedded/claustrum/roster.d.ts +208 -0
- package/src/common-auth-embedded/claustrum/roster.js +536 -0
- package/src/common-auth-embedded/commands/builtins.d.ts +71 -0
- package/src/common-auth-embedded/commands/builtins.js +534 -0
- package/src/common-auth-embedded/commands/index.d.ts +10 -0
- package/src/common-auth-embedded/commands/index.js +5 -0
- package/src/common-auth-embedded/commands/menu.d.ts +61 -0
- package/src/common-auth-embedded/commands/menu.js +300 -0
- package/src/common-auth-embedded/commands/model.d.ts +238 -0
- package/src/common-auth-embedded/commands/model.js +16 -0
- package/src/common-auth-embedded/commands/pi.d.ts +23 -0
- package/src/common-auth-embedded/commands/pi.js +206 -0
- package/src/common-auth-embedded/commands/seam.d.ts +72 -0
- package/src/common-auth-embedded/commands/seam.js +301 -0
- package/src/common-auth-embedded/fs/atomic-write.d.ts +20 -0
- package/src/common-auth-embedded/fs/atomic-write.js +80 -0
- package/src/common-auth-embedded/fs/index.d.ts +7 -0
- package/src/common-auth-embedded/fs/index.js +6 -0
- package/src/common-auth-embedded/fs/lock-constants.d.ts +14 -0
- package/src/common-auth-embedded/fs/lock-constants.js +14 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.js +501 -0
- package/src/common-auth-embedded/fs/with-lock.d.ts +33 -0
- package/src/common-auth-embedded/fs/with-lock.js +48 -0
- package/src/common-auth-embedded/logger/capture-sink.d.ts +14 -0
- package/src/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/common-auth-embedded/logger/engine.d.ts +100 -0
- package/src/common-auth-embedded/logger/engine.js +246 -0
- package/src/common-auth-embedded/logger/index.d.ts +6 -0
- package/src/common-auth-embedded/logger/index.js +3 -0
- package/src/common-auth-embedded/logger/redact.d.ts +11 -0
- package/src/common-auth-embedded/logger/redact.js +83 -0
- package/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/src/common-auth-embedded/opencode2/errors.js +15 -0
- package/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/src/common-auth-embedded/opencode2/index.js +4 -0
- package/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/src/common-auth-embedded/opencode2/install.js +886 -0
- package/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/src/common-auth-embedded/opencode2/integration.js +143 -0
- package/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/src/common-auth-embedded/opencode2/sse.js +60 -0
- package/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/src/common-auth-embedded/pi-slot/index.d.ts +3 -0
- package/src/common-auth-embedded/pi-slot/index.js +2 -0
- package/src/common-auth-embedded/pi-slot/lock.js +212 -0
- package/src/common-auth-embedded/pi-slot/slot.d.ts +49 -0
- package/src/common-auth-embedded/pi-slot/slot.js +383 -0
- package/src/common-auth-embedded/quota/codec.d.ts +11 -0
- package/src/common-auth-embedded/quota/codec.js +12 -0
- package/src/common-auth-embedded/quota/format.d.ts +46 -0
- package/src/common-auth-embedded/quota/format.js +138 -0
- package/src/common-auth-embedded/quota/index.d.ts +10 -0
- package/src/common-auth-embedded/quota/index.js +5 -0
- package/src/common-auth-embedded/quota/map.d.ts +63 -0
- package/src/common-auth-embedded/quota/map.js +105 -0
- package/src/common-auth-embedded/quota/merge.d.ts +48 -0
- package/src/common-auth-embedded/quota/merge.js +162 -0
- package/src/common-auth-embedded/quota/projection.d.ts +64 -0
- package/src/common-auth-embedded/quota/projection.js +134 -0
- package/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/src/common-auth-embedded/routing/admission.js +142 -0
- package/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/src/common-auth-embedded/routing/index.js +4 -0
- package/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/src/common-auth-embedded/routing/ordered.js +58 -0
- package/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/src/common-auth-embedded/routing/pins.js +34 -0
- package/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/src/common-auth-embedded/routing/sticky.js +339 -0
- package/src/common-auth-embedded/rpc/client.d.ts +3 -0
- package/src/common-auth-embedded/rpc/client.js +2 -0
- package/src/common-auth-embedded/rpc/index.d.ts +10 -0
- package/src/common-auth-embedded/rpc/index.js +5 -0
- package/src/common-auth-embedded/rpc/notifications.d.ts +73 -0
- package/src/common-auth-embedded/rpc/notifications.js +100 -0
- package/src/common-auth-embedded/rpc/port-file.d.ts +33 -0
- package/src/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/common-auth-embedded/rpc/rpc-client.d.ts +30 -0
- package/src/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/common-auth-embedded/rpc/rpc-server.d.ts +58 -0
- package/src/common-auth-embedded/rpc/rpc-server.js +311 -0
- package/src/common-auth-embedded/rpc/server-registry.d.ts +11 -0
- package/src/common-auth-embedded/rpc/server-registry.js +47 -0
- package/src/common-auth-embedded/source-output.json +1326 -0
- package/src/common-auth-embedded/store/attribution.d.ts +28 -0
- package/src/common-auth-embedded/store/attribution.js +60 -0
- package/src/common-auth-embedded/store/errors.d.ts +55 -0
- package/src/common-auth-embedded/store/errors.js +38 -0
- package/src/common-auth-embedded/store/hooks.d.ts +12 -0
- package/src/common-auth-embedded/store/hooks.js +34 -0
- package/src/common-auth-embedded/store/identity.d.ts +39 -0
- package/src/common-auth-embedded/store/identity.js +79 -0
- package/src/common-auth-embedded/store/index.d.ts +21 -0
- package/src/common-auth-embedded/store/index.js +7 -0
- package/src/common-auth-embedded/store/mutate.d.ts +189 -0
- package/src/common-auth-embedded/store/mutate.js +500 -0
- package/src/common-auth-embedded/store/pool.d.ts +196 -0
- package/src/common-auth-embedded/store/pool.js +120 -0
- package/src/common-auth-embedded/store/provider-state.d.ts +131 -0
- package/src/common-auth-embedded/store/provider-state.js +226 -0
- package/src/common-auth-embedded/store/publication.d.ts +47 -0
- package/src/common-auth-embedded/store/publication.js +304 -0
- package/src/common-auth-embedded/store/pull.d.ts +36 -0
- package/src/common-auth-embedded/store/pull.js +143 -0
- package/src/common-auth-embedded/store/refresh-lock.d.ts +63 -0
- package/src/common-auth-embedded/store/refresh-lock.js +136 -0
- package/src/common-auth-embedded/store/refresh.d.ts +72 -0
- package/src/common-auth-embedded/store/refresh.js +225 -0
- package/src/common-auth-embedded/store/reserved.js +13 -0
- package/src/common-auth-embedded/store/rows.d.ts +313 -0
- package/src/common-auth-embedded/store/rows.js +1258 -0
- package/src/common-auth-embedded/store/runtime.d.ts +36 -0
- package/src/common-auth-embedded/store/runtime.js +68 -0
- package/src/common-auth-embedded/store/schema.d.ts +443 -0
- package/src/common-auth-embedded/store/schema.js +754 -0
- package/src/common-auth-embedded/store/settings.d.ts +63 -0
- package/src/common-auth-embedded/store/settings.js +120 -0
- package/src/common-auth-embedded/store/torn.d.ts +78 -0
- package/src/common-auth-embedded/store/torn.js +294 -0
- package/src/common-auth-embedded/tui/index.d.ts +8 -0
- package/src/common-auth-embedded/tui/index.js +21 -0
- package/src/common-auth-embedded/util/any-signal.js +42 -0
- package/src/plugin/command-data.ts +3 -0
- package/src/rpc/port-file.ts +6 -140
- package/src/rpc/protocol.ts +59 -24
- package/src/rpc/rpc-client.ts +101 -71
- package/src/sidebar-state.ts +82 -24
- package/src/tui/command-dialogs.tsx +412 -776
- package/src/tui/entry.d.mts +17 -0
- package/src/tui/entry.mjs +34 -66
- package/src/tui/file-logger.ts +22 -7
- package/src/tui-compiled/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-compiled/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-compiled/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-compiled/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-compiled/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-compiled/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-compiled/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-compiled/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-compiled/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-compiled/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-compiled/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-compiled/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-compiled/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-compiled/logging/provider-key-policy.js +3 -0
- package/src/tui-compiled/quota-presentation.js +42 -0
- package/src/tui-compiled/rpc/rpc-client.js +35 -0
- package/src/tui-compiled/rpc/rpc-dir.js +13 -0
- package/src/tui-compiled/selector.js +21 -0
- package/src/tui-compiled/sidebar-state.js +401 -0
- package/src/tui-compiled/tui/command-dialogs.js +424 -0
- package/src/tui-compiled/tui/file-logger.js +73 -0
- package/src/tui-compiled/tui/host-api.js +269 -0
- package/src/tui-compiled/tui/host-v1.js +228 -0
- package/src/tui-compiled/tui-preferences.js +230 -0
- package/src/tui-compiled/{tui.tsx → tui.js} +140 -231
- package/src/tui-ga-compiled/host-ga.js +1304 -0
- package/src/tui-ga-compiled/selector.js +21 -0
- package/src/tui-ga-compiled/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-compiled/shared/0e19a88ff3535906-command-dialogs.js +424 -0
- package/src/tui-ga-compiled/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-compiled/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-compiled/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-compiled/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-compiled/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-ga-raw/host-ga.tsx +1740 -0
- package/src/tui-ga-raw/selector.js +21 -0
- package/src/tui-ga-raw/shared/07365a7d2ccade4c-host-api.js +269 -0
- package/src/tui-ga-raw/shared/0e19a88ff3535906-command-dialogs.tsx +468 -0
- package/src/tui-ga-raw/shared/1ff34afa7c42d196-projection.js +134 -0
- package/src/tui-ga-raw/shared/77138df80c7ae006-map.js +105 -0
- package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +112 -0
- package/src/tui-ga-raw/shared/98cc0c186c46c42d-quota-presentation.js +42 -0
- package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +138 -0
- package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +5 -0
- package/src/tui-ga-raw/shared/ca21dc417b36dc5d-codec.js +12 -0
- package/src/tui-ga-raw/shared/ecc214300932dfb6-merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/logger/capture-sink.js +13 -0
- package/src/tui-raw/common-auth-embedded/logger/engine.js +246 -0
- package/src/tui-raw/common-auth-embedded/logger/index.js +3 -0
- package/src/tui-raw/common-auth-embedded/logger/redact.js +83 -0
- package/src/tui-raw/common-auth-embedded/quota/codec.js +12 -0
- package/src/tui-raw/common-auth-embedded/quota/format.js +138 -0
- package/src/tui-raw/common-auth-embedded/quota/index.js +5 -0
- package/src/tui-raw/common-auth-embedded/quota/map.js +105 -0
- package/src/tui-raw/common-auth-embedded/quota/merge.js +162 -0
- package/src/tui-raw/common-auth-embedded/quota/projection.js +134 -0
- package/src/tui-raw/common-auth-embedded/rpc/client.js +2 -0
- package/src/tui-raw/common-auth-embedded/rpc/port-file.js +217 -0
- package/src/tui-raw/common-auth-embedded/rpc/rpc-client.js +253 -0
- package/src/tui-raw/logging/provider-key-policy.js +3 -0
- package/src/tui-raw/quota-presentation.js +42 -0
- package/src/tui-raw/rpc/rpc-client.js +35 -0
- package/src/tui-raw/rpc/rpc-dir.js +13 -0
- package/src/tui-raw/selector.js +21 -0
- package/src/tui-raw/sidebar-state.js +401 -0
- package/src/tui-raw/tui/command-dialogs.tsx +468 -0
- package/src/tui-raw/tui/file-logger.js +73 -0
- package/src/tui-raw/tui/host-api.js +269 -0
- package/src/tui-raw/tui/host-v1.tsx +249 -0
- package/src/tui-raw/tui-preferences.js +230 -0
- package/src/tui-raw/tui.tsx +1088 -0
- package/src/tui.tsx +58 -141
- package/tui.js +6 -0
- package/src/tui-compiled/plugin/command-data.ts +0 -931
- package/src/tui-compiled/rpc/port-file.ts +0 -143
- package/src/tui-compiled/rpc/protocol.ts +0 -31
- package/src/tui-compiled/rpc/rpc-client.ts +0 -102
- package/src/tui-compiled/rpc/rpc-dir.ts +0 -24
- package/src/tui-compiled/sidebar-state.ts +0 -991
- package/src/tui-compiled/tui/command-dialogs.tsx +0 -779
- package/src/tui-compiled/tui/file-logger.ts +0 -145
- package/src/tui-compiled/tui-preferences.ts +0 -416
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
2
|
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
3
|
import { buildAgyAgentRequestMetadata, createAgyRequestSessionContext, orderAgyRequestPayloadInPlace, } from './agy-request-metadata';
|
|
4
|
-
import { cacheSignature, getCachedSignature } from './cache';
|
|
4
|
+
import { cacheSignature, getCachedSignature, } from './cache';
|
|
5
5
|
import { getKeepThinking } from './config';
|
|
6
6
|
import { createStreamingTransformer, transformSseLine, transformStreamingPayload, } from './core/streaming';
|
|
7
7
|
import { DEBUG_MESSAGE_PREFIX, isDebugTuiEnabled, logAntigravityDebugResponse, logCacheStats, } from './debug';
|
|
8
|
-
import { buildFingerprintHeaders, getSessionFingerprint, } from './fingerprint';
|
|
8
|
+
import { buildFingerprintHeaders, generateFingerprint, getSessionFingerprint, } from './fingerprint';
|
|
9
9
|
import { appendGeminiDumpResponseText, createGeminiDumpResponseTransform, noteGeminiDumpResponse, } from './gemini-dump';
|
|
10
10
|
import { createLogger } from './logger';
|
|
11
11
|
import { detectErrorType } from './recovery';
|
|
@@ -519,6 +519,58 @@ function configureAntigravityToolCalling(payload) {
|
|
|
519
519
|
toolConfig.functionCallingConfig = functionCallingConfig;
|
|
520
520
|
payload.toolConfig = toolConfig;
|
|
521
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* The native CLI sends a function response to a same-target call in a model
|
|
524
|
+
* turn (a request then ends with a model turn and gets the trailing user
|
|
525
|
+
* `[Continue]` turn). A call is same-target when it carries its own replay
|
|
526
|
+
* signature; a call whose signature was missing or stripped carries the
|
|
527
|
+
* validator sentinel and keeps its responses in a user turn.
|
|
528
|
+
*/
|
|
529
|
+
function normalizeNativeFunctionResponseRoles(payload) {
|
|
530
|
+
const contents = payload.contents;
|
|
531
|
+
if (!Array.isArray(contents))
|
|
532
|
+
return;
|
|
533
|
+
const signedCalls = new Set();
|
|
534
|
+
for (const content of contents) {
|
|
535
|
+
const parts = content?.parts;
|
|
536
|
+
if (!Array.isArray(parts))
|
|
537
|
+
continue;
|
|
538
|
+
let signedTurn = false;
|
|
539
|
+
for (const part of parts) {
|
|
540
|
+
const call = part
|
|
541
|
+
?.functionCall;
|
|
542
|
+
if (!call)
|
|
543
|
+
continue;
|
|
544
|
+
const signature = part
|
|
545
|
+
.thoughtSignature;
|
|
546
|
+
// Only the first call of a turn carries the turn's signature.
|
|
547
|
+
if (typeof signature === 'string') {
|
|
548
|
+
signedTurn =
|
|
549
|
+
signature.length >= MIN_SIGNATURE_LENGTH &&
|
|
550
|
+
signature !== SKIP_THOUGHT_SIGNATURE;
|
|
551
|
+
}
|
|
552
|
+
if (signedTurn) {
|
|
553
|
+
signedCalls.add(String(call.id ?? call.name));
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
for (const content of contents) {
|
|
558
|
+
if (!content || typeof content !== 'object')
|
|
559
|
+
continue;
|
|
560
|
+
const record = content;
|
|
561
|
+
if (record.role !== 'user' || !Array.isArray(record.parts))
|
|
562
|
+
continue;
|
|
563
|
+
if (record.parts.length === 0)
|
|
564
|
+
continue;
|
|
565
|
+
const sameTarget = record.parts.every((part) => {
|
|
566
|
+
const response = part?.functionResponse;
|
|
567
|
+
return (response !== undefined &&
|
|
568
|
+
signedCalls.has(String(response.id ?? response.name)));
|
|
569
|
+
});
|
|
570
|
+
if (sameTarget)
|
|
571
|
+
record.role = 'model';
|
|
572
|
+
}
|
|
573
|
+
}
|
|
522
574
|
function sanitizeRequestPayloadForAntigravity(payload) {
|
|
523
575
|
const anyPayload = payload;
|
|
524
576
|
if (Array.isArray(anyPayload.contents)) {
|
|
@@ -557,8 +609,12 @@ function sanitizeRequestPayloadForAntigravity(payload) {
|
|
|
557
609
|
// Parallel function calls MUST NOT have a signature
|
|
558
610
|
sig = undefined;
|
|
559
611
|
}
|
|
612
|
+
// The native CLI sends only the camel-case key; a snake-case
|
|
613
|
+
// duplicate from host history is dropped.
|
|
560
614
|
if (sig) {
|
|
561
|
-
|
|
615
|
+
const signed = { ...part, thoughtSignature: sig };
|
|
616
|
+
delete signed.thought_signature;
|
|
617
|
+
return signed;
|
|
562
618
|
}
|
|
563
619
|
// If not the first part, just return the part without adding any signature keys
|
|
564
620
|
const newPart = { ...part };
|
|
@@ -677,7 +733,7 @@ function getThinkingPartText(part) {
|
|
|
677
733
|
}
|
|
678
734
|
return '';
|
|
679
735
|
}
|
|
680
|
-
function hasCachedMatchingSignature(part, sessionId) {
|
|
736
|
+
function hasCachedMatchingSignature(part, sessionId, wire) {
|
|
681
737
|
if (!part || typeof part !== 'object') {
|
|
682
738
|
return false;
|
|
683
739
|
}
|
|
@@ -685,7 +741,7 @@ function hasCachedMatchingSignature(part, sessionId) {
|
|
|
685
741
|
if (!text) {
|
|
686
742
|
return false;
|
|
687
743
|
}
|
|
688
|
-
const expectedSignature = getCachedSignature(sessionId, text);
|
|
744
|
+
const expectedSignature = wire.signatures.getCachedSignature(sessionId, text);
|
|
689
745
|
if (!expectedSignature) {
|
|
690
746
|
return false;
|
|
691
747
|
}
|
|
@@ -715,7 +771,7 @@ function ensureThoughtSignature(part, sessionId) {
|
|
|
715
771
|
}
|
|
716
772
|
return part;
|
|
717
773
|
}
|
|
718
|
-
function hasSignedThinkingPart(part, sessionId) {
|
|
774
|
+
function hasSignedThinkingPart(part, sessionId, wire) {
|
|
719
775
|
if (!part || typeof part !== 'object') {
|
|
720
776
|
return false;
|
|
721
777
|
}
|
|
@@ -731,7 +787,7 @@ function hasSignedThinkingPart(part, sessionId) {
|
|
|
731
787
|
if (!sessionId) {
|
|
732
788
|
return true;
|
|
733
789
|
}
|
|
734
|
-
return hasCachedMatchingSignature(part, sessionId);
|
|
790
|
+
return hasCachedMatchingSignature(part, sessionId, wire);
|
|
735
791
|
}
|
|
736
792
|
if (part.type === 'thinking' ||
|
|
737
793
|
part.type === 'reasoning' ||
|
|
@@ -747,11 +803,11 @@ function hasSignedThinkingPart(part, sessionId) {
|
|
|
747
803
|
if (!sessionId) {
|
|
748
804
|
return true;
|
|
749
805
|
}
|
|
750
|
-
return hasCachedMatchingSignature(part, sessionId);
|
|
806
|
+
return hasCachedMatchingSignature(part, sessionId, wire);
|
|
751
807
|
}
|
|
752
808
|
return false;
|
|
753
809
|
}
|
|
754
|
-
function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey) {
|
|
810
|
+
function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey, wire) {
|
|
755
811
|
return contents.map((content) => {
|
|
756
812
|
if (!content ||
|
|
757
813
|
typeof content !== 'object' ||
|
|
@@ -769,7 +825,7 @@ function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey) {
|
|
|
769
825
|
}
|
|
770
826
|
// Check if any thinking part has a valid signed signature
|
|
771
827
|
const hasSignedThinking = parts.some((p) => isGeminiThinkingPart(p) &&
|
|
772
|
-
hasSignedThinkingPart(ensureThoughtSignature(p, signatureSessionKey), signatureSessionKey));
|
|
828
|
+
hasSignedThinkingPart(ensureThoughtSignature(p, signatureSessionKey), signatureSessionKey, wire));
|
|
773
829
|
if (hasSignedThinking) {
|
|
774
830
|
// Ensure signatures on thinking parts in-place — NO reordering to preserve array indices (cache-friendly)
|
|
775
831
|
return {
|
|
@@ -781,8 +837,8 @@ function ensureThinkingBeforeToolUseInContents(contents, signatureSessionKey) {
|
|
|
781
837
|
}
|
|
782
838
|
// Replace thinking parts with sentinels in-place to preserve array indices (cache-friendly).
|
|
783
839
|
// Deleting parts via .filter() shifts array indices → changes hash → busts prompt cache.
|
|
784
|
-
const lastThinking =
|
|
785
|
-
|
|
840
|
+
const lastThinking = wire.signatures.signatureStore.get(signatureSessionKey);
|
|
841
|
+
wire.logger.debug('Replacing thinking with sentinels in-place', {
|
|
786
842
|
signatureSessionKey,
|
|
787
843
|
hasCachedSig: !!lastThinking,
|
|
788
844
|
});
|
|
@@ -826,14 +882,14 @@ function hasToolUseInContents(contents) {
|
|
|
826
882
|
return content.parts.some(isGeminiToolUsePart);
|
|
827
883
|
});
|
|
828
884
|
}
|
|
829
|
-
function hasSignedThinkingInContents(contents, sessionId) {
|
|
885
|
+
function hasSignedThinkingInContents(contents, sessionId, wire) {
|
|
830
886
|
return contents.some((content) => {
|
|
831
887
|
if (!content ||
|
|
832
888
|
typeof content !== 'object' ||
|
|
833
889
|
!Array.isArray(content.parts)) {
|
|
834
890
|
return false;
|
|
835
891
|
}
|
|
836
|
-
return content.parts.some((part) => hasSignedThinkingPart(part, sessionId));
|
|
892
|
+
return content.parts.some((part) => hasSignedThinkingPart(part, sessionId, wire));
|
|
837
893
|
});
|
|
838
894
|
}
|
|
839
895
|
function hasToolUseInMessages(messages) {
|
|
@@ -848,17 +904,17 @@ function hasToolUseInMessages(messages) {
|
|
|
848
904
|
(block.type === 'tool_use' || block.type === 'tool_result'));
|
|
849
905
|
});
|
|
850
906
|
}
|
|
851
|
-
function hasSignedThinkingInMessages(messages, sessionId) {
|
|
907
|
+
function hasSignedThinkingInMessages(messages, sessionId, wire) {
|
|
852
908
|
return messages.some((message) => {
|
|
853
909
|
if (!message ||
|
|
854
910
|
typeof message !== 'object' ||
|
|
855
911
|
!Array.isArray(message.content)) {
|
|
856
912
|
return false;
|
|
857
913
|
}
|
|
858
|
-
return message.content.some((block) => hasSignedThinkingPart(block, sessionId));
|
|
914
|
+
return message.content.some((block) => hasSignedThinkingPart(block, sessionId, wire));
|
|
859
915
|
});
|
|
860
916
|
}
|
|
861
|
-
function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
917
|
+
function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey, wire) {
|
|
862
918
|
return messages.map((message) => {
|
|
863
919
|
if (!message ||
|
|
864
920
|
typeof message !== 'object' ||
|
|
@@ -880,7 +936,7 @@ function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
|
880
936
|
(b.type === 'thinking' || b.type === 'redacted_thinking');
|
|
881
937
|
// Check if any thinking block has a valid signed signature
|
|
882
938
|
const hasSignedThinking = blocks.some((b) => isThinkingBlock(b) &&
|
|
883
|
-
hasSignedThinkingPart(ensureMessageThinkingSignature(b, signatureSessionKey), signatureSessionKey));
|
|
939
|
+
hasSignedThinkingPart(ensureMessageThinkingSignature(b, signatureSessionKey), signatureSessionKey, wire));
|
|
884
940
|
if (hasSignedThinking) {
|
|
885
941
|
// Ensure signatures on thinking blocks in-place — NO reordering to preserve array indices (cache-friendly)
|
|
886
942
|
return {
|
|
@@ -892,8 +948,8 @@ function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
|
892
948
|
}
|
|
893
949
|
// Replace thinking blocks with sentinels in-place to preserve array indices (cache-friendly).
|
|
894
950
|
// Deleting/reordering via .filter() shifts indices → changes hash → busts prompt cache.
|
|
895
|
-
const lastThinking =
|
|
896
|
-
|
|
951
|
+
const lastThinking = wire.signatures.signatureStore.get(signatureSessionKey);
|
|
952
|
+
wire.logger.debug('Replacing thinking with sentinels in-place (Messages format)', {
|
|
897
953
|
signatureSessionKey,
|
|
898
954
|
hasCachedSig: !!lastThinking,
|
|
899
955
|
});
|
|
@@ -926,9 +982,41 @@ function ensureThinkingBeforeToolUseInMessages(messages, signatureSessionKey) {
|
|
|
926
982
|
export function getPluginSessionId() {
|
|
927
983
|
return PLUGIN_SESSION_ID;
|
|
928
984
|
}
|
|
929
|
-
|
|
985
|
+
/** Builds one location's wire state from its own collaborators. */
|
|
986
|
+
export function createRequestWireLocation(input) {
|
|
987
|
+
const fingerprint = input.sessionFingerprint ?? generateFingerprint();
|
|
988
|
+
return {
|
|
989
|
+
signatures: input.signatures,
|
|
990
|
+
debug: input.debug,
|
|
991
|
+
logger: input.logger,
|
|
992
|
+
sessionFingerprint: () => fingerprint,
|
|
993
|
+
displayedThinkingHashes: new Set(),
|
|
994
|
+
cacheStats: { last: null },
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
// OpenCode 1's single-location binding: every read goes to the module-level
|
|
998
|
+
// config, signature cache, debug log and fingerprint at call time.
|
|
999
|
+
const openCode1WireLocation = {
|
|
1000
|
+
signatures: {
|
|
1001
|
+
get keepThinking() {
|
|
1002
|
+
return getKeepThinking();
|
|
1003
|
+
},
|
|
1004
|
+
signatureStore: defaultSignatureStore,
|
|
1005
|
+
cacheSignature: (sessionId, text, signature) => cacheSignature(sessionId, text, signature),
|
|
1006
|
+
getCachedSignature: (sessionId, text) => getCachedSignature(sessionId, text),
|
|
1007
|
+
},
|
|
1008
|
+
debug: {
|
|
1009
|
+
isDebugTuiEnabled: () => isDebugTuiEnabled(),
|
|
1010
|
+
logAntigravityDebugResponse: (context, response, meta) => logAntigravityDebugResponse(context, response, meta),
|
|
1011
|
+
logCacheStats: (model, cacheRead, cacheWrite, totalInput) => logCacheStats(model, cacheRead, cacheWrite, totalInput),
|
|
1012
|
+
},
|
|
1013
|
+
logger: log,
|
|
1014
|
+
sessionFingerprint: () => getSessionFingerprint(),
|
|
1015
|
+
displayedThinkingHashes: sessionDisplayedThinkingHashes,
|
|
1016
|
+
cacheStats: { last: null },
|
|
1017
|
+
};
|
|
930
1018
|
export function getLastCacheStats() {
|
|
931
|
-
return
|
|
1019
|
+
return openCode1WireLocation.cacheStats.last;
|
|
932
1020
|
}
|
|
933
1021
|
const STREAM_ACTION = 'streamGenerateContent';
|
|
934
1022
|
/**
|
|
@@ -952,7 +1040,7 @@ export function fetchInputToUrl(input) {
|
|
|
952
1040
|
export function isGenerativeLanguageRequest(input) {
|
|
953
1041
|
return fetchInputToUrl(input).includes('generativelanguage.googleapis.com');
|
|
954
1042
|
}
|
|
955
|
-
|
|
1043
|
+
function prepareAntigravityRequestIn(wire, input, init, accessToken, projectId, endpointOverride, headerStyle = 'antigravity', forceThinkingRecovery = false, options) {
|
|
956
1044
|
const baseInit = { ...init };
|
|
957
1045
|
const headers = new Headers(init?.headers ?? {});
|
|
958
1046
|
let resolvedProjectId = projectId?.trim() || '';
|
|
@@ -976,6 +1064,8 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
976
1064
|
headers.delete('x-session-affinity');
|
|
977
1065
|
headers.delete('x-session-id');
|
|
978
1066
|
headers.delete('x-parent-session-id');
|
|
1067
|
+
headers.delete('x-opencode-session-id');
|
|
1068
|
+
headers.delete('x-opencode-parent-session-id');
|
|
979
1069
|
// Strip x-goog-user-project header to prevent 403 auth/license conflicts.
|
|
980
1070
|
// This header is added by OpenCode/AI SDK and can force project-level checks
|
|
981
1071
|
// that are not required for Antigravity/Gemini CLI OAuth requests.
|
|
@@ -1000,7 +1090,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1000
1090
|
const transformedUrl = `${baseEndpoint}/v1internal:${rawAction}${streaming ? '?alt=sse' : ''}`;
|
|
1001
1091
|
const isClaude = isClaudeModel(resolved.actualModel);
|
|
1002
1092
|
const isClaudeThinking = isClaudeThinkingModel(resolved.actualModel);
|
|
1003
|
-
const keepThinkingEnabled =
|
|
1093
|
+
const keepThinkingEnabled = wire.signatures.keepThinking;
|
|
1004
1094
|
// Tier-based thinking configuration from model resolver (can be overridden by variant config)
|
|
1005
1095
|
let tierThinkingBudget = resolved.thinkingBudget;
|
|
1006
1096
|
let tierThinkingLevel = resolved.thinkingLevel;
|
|
@@ -1053,19 +1143,19 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1053
1143
|
targetModel: effectiveModel,
|
|
1054
1144
|
});
|
|
1055
1145
|
// Step 1: Strip corrupted/unsigned thinking blocks FIRST
|
|
1056
|
-
deepFilterThinkingBlocks(req, signatureSessionKey, getCachedSignature, true);
|
|
1146
|
+
deepFilterThinkingBlocks(req, signatureSessionKey, wire.signatures.getCachedSignature, true, keepThinkingEnabled);
|
|
1057
1147
|
// Step 2: THEN inject signed thinking from cache (after stripping)
|
|
1058
1148
|
if (isClaudeThinking &&
|
|
1059
1149
|
keepThinkingEnabled &&
|
|
1060
1150
|
Array.isArray(req.contents)) {
|
|
1061
1151
|
;
|
|
1062
|
-
req.contents = ensureThinkingBeforeToolUseInContents(req.contents, signatureSessionKey);
|
|
1152
|
+
req.contents = ensureThinkingBeforeToolUseInContents(req.contents, signatureSessionKey, wire);
|
|
1063
1153
|
}
|
|
1064
1154
|
if (isClaudeThinking &&
|
|
1065
1155
|
keepThinkingEnabled &&
|
|
1066
1156
|
Array.isArray(req.messages)) {
|
|
1067
1157
|
;
|
|
1068
|
-
req.messages = ensureThinkingBeforeToolUseInMessages(req.messages, signatureSessionKey);
|
|
1158
|
+
req.messages = ensureThinkingBeforeToolUseInMessages(req.messages, signatureSessionKey, wire);
|
|
1069
1159
|
}
|
|
1070
1160
|
// Step 3: Apply tool pairing fixes (ID assignment, response matching, orphan recovery)
|
|
1071
1161
|
applyToolPairingFixes(req, true);
|
|
@@ -1074,6 +1164,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1074
1164
|
sanitizeRequestPayloadForAntigravity(req);
|
|
1075
1165
|
stripUnsupportedAntigravityFields(req);
|
|
1076
1166
|
configureAntigravityToolCalling(req);
|
|
1167
|
+
normalizeNativeFunctionResponseRoles(req);
|
|
1077
1168
|
}
|
|
1078
1169
|
}
|
|
1079
1170
|
// AGY rejects every request that ends with a model turn. Enforce this at
|
|
@@ -1106,10 +1197,10 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1106
1197
|
(Array.isArray(req.messages) &&
|
|
1107
1198
|
hasToolUseInMessages(req.messages)));
|
|
1108
1199
|
const hasSignedThinking = requestObjects.some((req) => (Array.isArray(req.contents) &&
|
|
1109
|
-
hasSignedThinkingInContents(req.contents, signatureSessionKey)) ||
|
|
1200
|
+
hasSignedThinkingInContents(req.contents, signatureSessionKey, wire)) ||
|
|
1110
1201
|
(Array.isArray(req.messages) &&
|
|
1111
|
-
hasSignedThinkingInMessages(req.messages, signatureSessionKey)));
|
|
1112
|
-
const hasCachedThinking =
|
|
1202
|
+
hasSignedThinkingInMessages(req.messages, signatureSessionKey, wire)));
|
|
1203
|
+
const hasCachedThinking = wire.signatures.signatureStore.has(signatureSessionKey);
|
|
1113
1204
|
needsSignedThinkingWarmup =
|
|
1114
1205
|
hasToolUse && !hasSignedThinking && !hasCachedThinking;
|
|
1115
1206
|
}
|
|
@@ -1146,7 +1237,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1146
1237
|
const extraBody = requestPayload.extra_body;
|
|
1147
1238
|
const variantConfig = extractVariantThinkingConfig(requestPayload.providerOptions, rawGenerationConfig);
|
|
1148
1239
|
const isGemini3 = effectiveModel.toLowerCase().includes('gemini-3');
|
|
1149
|
-
|
|
1240
|
+
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
1241
|
// providerOptions belongs to the host AI SDK and is only used above to
|
|
1151
1242
|
// resolve the requested variant. It is never part of the Google wire schema.
|
|
1152
1243
|
delete requestPayload.providerOptions;
|
|
@@ -1168,7 +1259,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1168
1259
|
else if (variantConfig?.thinkingBudget) {
|
|
1169
1260
|
if (isGemini3) {
|
|
1170
1261
|
// Legacy format for Gemini 3 - convert with deprecation warning
|
|
1171
|
-
|
|
1262
|
+
wire.logger.warn('[Deprecated] Using thinkingBudget for Gemini 3 model. Use thinkingLevel instead.');
|
|
1172
1263
|
tierThinkingLevel =
|
|
1173
1264
|
variantConfig.thinkingBudget <= 8192
|
|
1174
1265
|
? 'low'
|
|
@@ -1532,17 +1623,17 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1532
1623
|
targetModel: effectiveModel,
|
|
1533
1624
|
});
|
|
1534
1625
|
// Step 1: Strip corrupted/unsigned thinking blocks FIRST
|
|
1535
|
-
deepFilterThinkingBlocks(requestPayload, signatureSessionKey, getCachedSignature, true);
|
|
1626
|
+
deepFilterThinkingBlocks(requestPayload, signatureSessionKey, wire.signatures.getCachedSignature, true, keepThinkingEnabled);
|
|
1536
1627
|
// Step 2: THEN inject signed thinking from cache (after stripping)
|
|
1537
1628
|
if (isClaudeThinking &&
|
|
1538
1629
|
keepThinkingEnabled &&
|
|
1539
1630
|
Array.isArray(requestPayload.contents)) {
|
|
1540
|
-
requestPayload.contents = ensureThinkingBeforeToolUseInContents(requestPayload.contents, signatureSessionKey);
|
|
1631
|
+
requestPayload.contents = ensureThinkingBeforeToolUseInContents(requestPayload.contents, signatureSessionKey, wire);
|
|
1541
1632
|
}
|
|
1542
1633
|
if (isClaudeThinking &&
|
|
1543
1634
|
keepThinkingEnabled &&
|
|
1544
1635
|
Array.isArray(requestPayload.messages)) {
|
|
1545
|
-
requestPayload.messages = ensureThinkingBeforeToolUseInMessages(requestPayload.messages, signatureSessionKey);
|
|
1636
|
+
requestPayload.messages = ensureThinkingBeforeToolUseInMessages(requestPayload.messages, signatureSessionKey, wire);
|
|
1546
1637
|
}
|
|
1547
1638
|
// Step 3: Check if warmup needed (AFTER injection attempt)
|
|
1548
1639
|
if (isClaudeThinking && keepThinkingEnabled) {
|
|
@@ -1551,10 +1642,10 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1551
1642
|
(Array.isArray(requestPayload.messages) &&
|
|
1552
1643
|
hasToolUseInMessages(requestPayload.messages));
|
|
1553
1644
|
const hasSignedThinking = (Array.isArray(requestPayload.contents) &&
|
|
1554
|
-
hasSignedThinkingInContents(requestPayload.contents, signatureSessionKey)) ||
|
|
1645
|
+
hasSignedThinkingInContents(requestPayload.contents, signatureSessionKey, wire)) ||
|
|
1555
1646
|
(Array.isArray(requestPayload.messages) &&
|
|
1556
|
-
hasSignedThinkingInMessages(requestPayload.messages, signatureSessionKey));
|
|
1557
|
-
const hasCachedThinking =
|
|
1647
|
+
hasSignedThinkingInMessages(requestPayload.messages, signatureSessionKey, wire));
|
|
1648
|
+
const hasCachedThinking = wire.signatures.signatureStore.has(signatureSessionKey);
|
|
1558
1649
|
needsSignedThinkingWarmup =
|
|
1559
1650
|
hasToolUse && !hasSignedThinking && !hasCachedThinking;
|
|
1560
1651
|
}
|
|
@@ -1649,7 +1740,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1649
1740
|
? 'Thinking recovery: retrying with fresh turn (API error)'
|
|
1650
1741
|
: 'Thinking recovery: restarting turn (corrupted context)';
|
|
1651
1742
|
requestPayload.contents = closeToolLoopForThinking(requestPayload.contents);
|
|
1652
|
-
|
|
1743
|
+
wire.signatures.signatureStore.delete(signatureSessionKey);
|
|
1653
1744
|
}
|
|
1654
1745
|
}
|
|
1655
1746
|
// AGY rejects every request that ends with a model turn. Enforce this at
|
|
@@ -1687,6 +1778,19 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1687
1778
|
if (headerStyle === 'antigravity') {
|
|
1688
1779
|
stripUnsupportedAntigravityFields(requestPayload);
|
|
1689
1780
|
configureAntigravityToolCalling(requestPayload);
|
|
1781
|
+
// Function-response roles depend on the signatures settled by the
|
|
1782
|
+
// sanitizer above; a response turn that becomes a model turn at the
|
|
1783
|
+
// end of the request then needs the trailing user turn.
|
|
1784
|
+
normalizeNativeFunctionResponseRoles(requestPayload);
|
|
1785
|
+
if (Array.isArray(requestPayload.contents)) {
|
|
1786
|
+
const lastContent = requestPayload.contents[requestPayload.contents.length - 1];
|
|
1787
|
+
if (lastContent?.role === 'model') {
|
|
1788
|
+
requestPayload.contents.push({
|
|
1789
|
+
role: 'user',
|
|
1790
|
+
parts: [{ text: '[Continue]' }],
|
|
1791
|
+
});
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1690
1794
|
}
|
|
1691
1795
|
// Use the stable default project ID (never a per-request random one):
|
|
1692
1796
|
// a fresh random project each request busts the prompt cache and
|
|
@@ -1750,7 +1854,7 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1750
1854
|
// Antigravity mode: Match Antigravity Manager behavior
|
|
1751
1855
|
// AM only sends User-Agent on content requests — no X-Goog-Api-Client, no Client-Metadata header
|
|
1752
1856
|
// (ideType=ANTIGRAVITY goes in request body metadata via project.ts, not as a header)
|
|
1753
|
-
const fingerprint = options?.fingerprint ??
|
|
1857
|
+
const fingerprint = options?.fingerprint ?? wire.sessionFingerprint();
|
|
1754
1858
|
const fingerprintHeaders = buildFingerprintHeaders(fingerprint);
|
|
1755
1859
|
headers.set('User-Agent', fingerprintHeaders['User-Agent'] || selectedHeaders['User-Agent']);
|
|
1756
1860
|
headers.set('Accept-Encoding', 'gzip');
|
|
@@ -1785,6 +1889,10 @@ export function prepareAntigravityRequest(input, init, accessToken, projectId, e
|
|
|
1785
1889
|
thinkingRecoveryMessage,
|
|
1786
1890
|
};
|
|
1787
1891
|
}
|
|
1892
|
+
/** OpenCode 1's request preparation over its module-level state. */
|
|
1893
|
+
export function prepareAntigravityRequest(...args) {
|
|
1894
|
+
return prepareAntigravityRequestIn(openCode1WireLocation, ...args);
|
|
1895
|
+
}
|
|
1788
1896
|
export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
1789
1897
|
if (!bodyText || !isClaudeThinking) {
|
|
1790
1898
|
return null;
|
|
@@ -1849,7 +1957,7 @@ export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
1849
1957
|
* For streaming SSE responses, uses TransformStream for true real-time incremental streaming.
|
|
1850
1958
|
* Thinking/reasoning tokens are transformed and forwarded immediately as they arrive.
|
|
1851
1959
|
*/
|
|
1852
|
-
|
|
1960
|
+
async function transformAntigravityResponseIn(wire, response, streaming, debugContext, requestedModel, projectId, endpoint, effectiveModel, sessionId, toolDebugMissing, toolDebugSummary, toolDebugPayload, debugLines, dumpContext) {
|
|
1853
1961
|
const contentType = response.headers.get('content-type') ?? '';
|
|
1854
1962
|
const isJsonResponse = contentType.includes('application/json');
|
|
1855
1963
|
const isEventStreamResponse = contentType.includes('text/event-stream');
|
|
@@ -1857,14 +1965,16 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1857
1965
|
// - If debug=true: inject full debug logs
|
|
1858
1966
|
// - If keep_thinking=true (but no debug): inject placeholder to trigger signature caching
|
|
1859
1967
|
// Both use the same injection path (injectDebugThinking) for consistent behavior
|
|
1860
|
-
const debugText = isDebugTuiEnabled() &&
|
|
1968
|
+
const debugText = wire.debug.isDebugTuiEnabled() &&
|
|
1969
|
+
Array.isArray(debugLines) &&
|
|
1970
|
+
debugLines.length > 0
|
|
1861
1971
|
? formatDebugLinesForThinking(debugLines)
|
|
1862
|
-
:
|
|
1972
|
+
: wire.signatures.keepThinking
|
|
1863
1973
|
? SYNTHETIC_THINKING_PLACEHOLDER
|
|
1864
1974
|
: undefined;
|
|
1865
1975
|
const cacheSignatures = shouldCacheThinkingSignatures(effectiveModel);
|
|
1866
1976
|
if (!isJsonResponse && !isEventStreamResponse) {
|
|
1867
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
1977
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
1868
1978
|
note: 'Non-JSON response (body omitted)',
|
|
1869
1979
|
});
|
|
1870
1980
|
return response;
|
|
@@ -1874,7 +1984,7 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1874
1984
|
// This enables thinking tokens to be displayed as they arrive, like the Codex plugin.
|
|
1875
1985
|
if (streaming && response.ok && isEventStreamResponse && response.body) {
|
|
1876
1986
|
const headers = new Headers(response.headers);
|
|
1877
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
1987
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
1878
1988
|
note: 'Streaming SSE response (real-time transform)',
|
|
1879
1989
|
});
|
|
1880
1990
|
noteGeminiDumpResponse(dumpContext, response);
|
|
@@ -1882,8 +1992,8 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1882
1992
|
const sourceBody = rawDumpTransformer
|
|
1883
1993
|
? response.body.pipeThrough(rawDumpTransformer)
|
|
1884
1994
|
: response.body;
|
|
1885
|
-
const streamingTransformer = createStreamingTransformer(
|
|
1886
|
-
onCacheSignature: cacheSignature,
|
|
1995
|
+
const streamingTransformer = createStreamingTransformer(wire.signatures.signatureStore, {
|
|
1996
|
+
onCacheSignature: wire.signatures.cacheSignature,
|
|
1887
1997
|
onInjectDebug: injectDebugThinking,
|
|
1888
1998
|
onUsageMetadata: (usage) => {
|
|
1889
1999
|
if (effectiveModel) {
|
|
@@ -1891,9 +2001,9 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1891
2001
|
const totalInput = usage.promptTokenCount ?? usage.totalTokenCount;
|
|
1892
2002
|
const hitRate = totalInput > 0 ? Math.round((cacheRead / totalInput) * 100) : 0;
|
|
1893
2003
|
const status = cacheRead > 0 ? 'HIT' : 'MISS';
|
|
1894
|
-
logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
1895
|
-
|
|
1896
|
-
|
|
2004
|
+
wire.debug.logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
2005
|
+
wire.logger.debug(`[Cache] ${status} model=${effectiveModel} read=${cacheRead} total=${totalInput} hitRate=${hitRate}%`);
|
|
2006
|
+
wire.cacheStats.last = {
|
|
1897
2007
|
model: effectiveModel,
|
|
1898
2008
|
read: cacheRead,
|
|
1899
2009
|
total: totalInput,
|
|
@@ -1907,7 +2017,7 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
1907
2017
|
debugText,
|
|
1908
2018
|
cacheSignatures,
|
|
1909
2019
|
displayedThinkingHashes: effectiveModel && isGemini3Model(effectiveModel)
|
|
1910
|
-
?
|
|
2020
|
+
? wire.displayedThinkingHashes
|
|
1911
2021
|
: undefined,
|
|
1912
2022
|
// injectSyntheticThinking removed - keep_thinking now unified with debug via debugText
|
|
1913
2023
|
});
|
|
@@ -2009,8 +2119,8 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
2009
2119
|
const totalInput = usage.promptTokenCount ?? usage.totalTokenCount ?? 0;
|
|
2010
2120
|
const hitRate = totalInput > 0 ? Math.round((cacheRead / totalInput) * 100) : 0;
|
|
2011
2121
|
const status = cacheRead > 0 ? 'HIT' : 'MISS';
|
|
2012
|
-
logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
2013
|
-
|
|
2122
|
+
wire.debug.logCacheStats(effectiveModel, cacheRead, 0, totalInput);
|
|
2123
|
+
wire.logger.debug(`[Cache] ${status} model=${effectiveModel} read=${cacheRead} total=${totalInput} hitRate=${hitRate}%`);
|
|
2014
2124
|
}
|
|
2015
2125
|
if (usage?.cachedContentTokenCount !== undefined) {
|
|
2016
2126
|
headers.set('x-antigravity-cached-content-token-count', String(usage.cachedContentTokenCount));
|
|
@@ -2024,7 +2134,7 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
2024
2134
|
headers.set('x-antigravity-candidates-token-count', String(usage.candidatesTokenCount));
|
|
2025
2135
|
}
|
|
2026
2136
|
}
|
|
2027
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
2137
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
2028
2138
|
body: text,
|
|
2029
2139
|
note: streaming ? 'Streaming SSE payload (buffered fallback)' : undefined,
|
|
2030
2140
|
headersOverride: headers,
|
|
@@ -2054,13 +2164,32 @@ export async function transformAntigravityResponse(response, streaming, debugCon
|
|
|
2054
2164
|
error.message === 'THINKING_RECOVERY_NEEDED') {
|
|
2055
2165
|
throw error;
|
|
2056
2166
|
}
|
|
2057
|
-
logAntigravityDebugResponse(debugContext, response, {
|
|
2167
|
+
wire.debug.logAntigravityDebugResponse(debugContext, response, {
|
|
2058
2168
|
error,
|
|
2059
2169
|
note: 'Failed to transform Antigravity response',
|
|
2060
2170
|
});
|
|
2061
2171
|
return responseFallback;
|
|
2062
2172
|
}
|
|
2063
2173
|
}
|
|
2174
|
+
/** OpenCode 1's response transformation over its module-level state. */
|
|
2175
|
+
export function transformAntigravityResponse(...args) {
|
|
2176
|
+
return transformAntigravityResponseIn(openCode1WireLocation, ...args);
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* The wire functions bound to one location's state. Preparation and
|
|
2180
|
+
* response handling follow exactly the OpenCode 1 rules; only the signature
|
|
2181
|
+
* cache, keep_thinking policy, debug log, logger, fallback fingerprint,
|
|
2182
|
+
* displayed-thinking set and cache statistics are the location's own.
|
|
2183
|
+
*/
|
|
2184
|
+
export function createRequestWire(location) {
|
|
2185
|
+
return {
|
|
2186
|
+
prepare: (...args) => prepareAntigravityRequestIn(location, ...args),
|
|
2187
|
+
transformResponse: (...args) => transformAntigravityResponseIn(location, ...args),
|
|
2188
|
+
buildThinkingWarmupBody,
|
|
2189
|
+
getImageModelLocalTitle,
|
|
2190
|
+
getLastCacheStats: () => location.cacheStats.last,
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2064
2193
|
export const __testExports = {
|
|
2065
2194
|
buildSignatureSessionKey,
|
|
2066
2195
|
hashConversationSeed,
|
|
@@ -2072,13 +2201,14 @@ export const __testExports = {
|
|
|
2072
2201
|
isGeminiToolUsePart,
|
|
2073
2202
|
isGeminiThinkingPart,
|
|
2074
2203
|
ensureThoughtSignature,
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2204
|
+
// The helpers below are exposed over OpenCode 1's module-level state.
|
|
2205
|
+
hasSignedThinkingPart: (part, sessionId) => hasSignedThinkingPart(part, sessionId, openCode1WireLocation),
|
|
2206
|
+
hasSignedThinkingInContents: (contents, sessionId) => hasSignedThinkingInContents(contents, sessionId, openCode1WireLocation),
|
|
2207
|
+
hasSignedThinkingInMessages: (messages, sessionId) => hasSignedThinkingInMessages(messages, sessionId, openCode1WireLocation),
|
|
2078
2208
|
hasToolUseInContents,
|
|
2079
2209
|
hasToolUseInMessages,
|
|
2080
|
-
ensureThinkingBeforeToolUseInContents,
|
|
2081
|
-
ensureThinkingBeforeToolUseInMessages,
|
|
2210
|
+
ensureThinkingBeforeToolUseInContents: (contents, key) => ensureThinkingBeforeToolUseInContents(contents, key, openCode1WireLocation),
|
|
2211
|
+
ensureThinkingBeforeToolUseInMessages: (messages, key) => ensureThinkingBeforeToolUseInMessages(messages, key, openCode1WireLocation),
|
|
2082
2212
|
MIN_SIGNATURE_LENGTH,
|
|
2083
2213
|
transformSseLine,
|
|
2084
2214
|
transformStreamingPayload,
|