@cortexkit/opencode-antigravity-auth 3.0.5 → 3.0.6
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 +38 -352
- package/dist/cli.js +9199 -8799
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +1286 -1064
- package/dist/index.js +13641 -14559
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +1333 -1342
- package/dist/server.js +10618 -11080
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/auth-method-labels.d.ts +3 -0
- package/dist/src/auth-method-labels.d.ts.map +1 -0
- package/dist/src/auth-method-labels.js +5 -0
- package/dist/src/auth-method-labels.js.map +1 -0
- package/dist/src/cli.d.ts +3 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +98 -12
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +33 -3
- package/dist/src/common-auth-embedded/claustrum/consumer.js +96 -1
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +4 -1
- package/dist/src/common-auth-embedded/claustrum/enrollment.d.ts +6 -1
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +6 -1
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +2 -1
- package/dist/src/common-auth-embedded/claustrum/index.js +5 -3
- package/dist/src/common-auth-embedded/claustrum/insula.d.ts +69 -0
- package/dist/src/common-auth-embedded/claustrum/insula.js +152 -0
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +13 -0
- package/dist/src/common-auth-embedded/claustrum/roster.js +33 -3
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +20 -11
- package/dist/src/common-auth-embedded/quota/codec.d.ts +2 -0
- package/dist/src/common-auth-embedded/quota/codec.js +2 -1
- package/dist/src/common-auth-embedded/quota/format.d.ts +26 -0
- package/dist/src/common-auth-embedded/quota/format.js +78 -42
- package/dist/src/common-auth-embedded/quota/index.d.ts +4 -4
- package/dist/src/common-auth-embedded/quota/index.js +2 -2
- package/dist/src/common-auth-embedded/quota/map.d.ts +11 -0
- package/dist/src/common-auth-embedded/quota/map.js +36 -1
- package/dist/src/common-auth-embedded/quota/merge.d.ts +3 -1
- package/dist/src/common-auth-embedded/quota/merge.js +21 -5
- package/dist/src/common-auth-embedded/quota/projection.d.ts +2 -1
- package/dist/src/common-auth-embedded/quota/projection.js +3 -1
- package/dist/src/common-auth-embedded/setup/command-runner.js +49 -0
- package/dist/src/common-auth-embedded/setup/command.d.ts +3 -0
- package/dist/src/common-auth-embedded/setup/command.js +215 -0
- package/dist/src/common-auth-embedded/setup/config-write.js +60 -0
- package/dist/src/common-auth-embedded/setup/detect.d.ts +6 -0
- package/dist/src/common-auth-embedded/setup/detect.js +224 -0
- package/dist/src/common-auth-embedded/setup/enroll.js +70 -0
- package/dist/src/common-auth-embedded/setup/index.d.ts +5 -0
- package/dist/src/common-auth-embedded/setup/index.js +4 -0
- package/dist/src/common-auth-embedded/setup/paths.js +33 -0
- package/dist/src/common-auth-embedded/setup/process-fence.d.ts +43 -0
- package/dist/src/common-auth-embedded/setup/process-fence.js +270 -0
- package/dist/src/common-auth-embedded/setup/prompts.js +26 -0
- package/dist/src/common-auth-embedded/setup/register.d.ts +11 -0
- package/dist/src/common-auth-embedded/setup/register.js +130 -0
- package/dist/src/common-auth-embedded/setup/types.d.ts +136 -0
- package/dist/src/common-auth-embedded/source-output.json +228 -80
- package/dist/src/common-auth-embedded/store/schema.d.ts +2 -0
- package/dist/src/common-auth-embedded/store/schema.js +3 -2
- package/dist/src/ga/rpc/protocol.d.ts +4 -7
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/src/ga/rpc/protocol.js +5 -13
- package/dist/src/ga/rpc/protocol.js.map +1 -1
- package/dist/src/ga/server/auth.d.ts +8 -3
- package/dist/src/ga/server/auth.d.ts.map +1 -1
- package/dist/src/ga/server/auth.js +25 -9
- package/dist/src/ga/server/auth.js.map +1 -1
- package/dist/src/ga/server/index.d.ts +39 -12
- package/dist/src/ga/server/index.d.ts.map +1 -1
- package/dist/src/ga/server/index.js +214 -53
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/src/ga/server/pool-login.d.ts +22 -0
- package/dist/src/ga/server/pool-login.d.ts.map +1 -0
- package/dist/src/ga/server/pool-login.js +150 -0
- package/dist/src/ga/server/pool-login.js.map +1 -0
- package/dist/src/ga/tui/host-ga.d.ts +2 -5
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +17 -49
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/accounts.d.ts +1 -1
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +1 -0
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.d.ts +2 -0
- package/dist/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.js +125 -10
- package/dist/src/plugin/background-vault-quota-refresh.js.map +1 -1
- package/dist/src/plugin/command-apply.d.ts +2 -2
- package/dist/src/plugin/command-apply.d.ts.map +1 -1
- package/dist/src/plugin/command-apply.js +3 -10
- package/dist/src/plugin/command-apply.js.map +1 -1
- package/dist/src/plugin/commands.d.ts +1 -0
- package/dist/src/plugin/commands.d.ts.map +1 -1
- package/dist/src/plugin/commands.js +2 -2
- package/dist/src/plugin/commands.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +0 -4
- package/dist/src/plugin/config/operator-settings-schema.d.ts.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.js +0 -5
- package/dist/src/plugin/config/operator-settings-schema.js.map +1 -1
- package/dist/src/plugin/config/schema.d.ts +0 -7
- package/dist/src/plugin/config/schema.d.ts.map +1 -1
- package/dist/src/plugin/config/schema.js +0 -43
- package/dist/src/plugin/config/schema.js.map +1 -1
- package/dist/src/plugin/config/writer.d.ts +1 -1
- package/dist/src/plugin/config/writer.js +1 -1
- package/dist/src/plugin/fetch/retry-state.d.ts +19 -3
- package/dist/src/plugin/fetch/retry-state.d.ts.map +1 -1
- package/dist/src/plugin/fetch/retry-state.js +0 -6
- package/dist/src/plugin/fetch/retry-state.js.map +1 -1
- package/dist/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/src/plugin/fetch-interceptor.js +0 -3
- package/dist/src/plugin/fetch-interceptor.js.map +1 -1
- package/dist/src/plugin/fetch-routing.d.ts +0 -16
- package/dist/src/plugin/fetch-routing.d.ts.map +1 -1
- package/dist/src/plugin/fetch-routing.js +0 -49
- package/dist/src/plugin/fetch-routing.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +14 -9
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +120 -40
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/google-origin.d.ts +7 -0
- package/dist/src/plugin/google-origin.d.ts.map +1 -0
- package/dist/src/plugin/google-origin.js +14 -0
- package/dist/src/plugin/google-origin.js.map +1 -0
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +15 -4
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/src/plugin/oauth-methods.js +0 -33
- package/dist/src/plugin/oauth-methods.js.map +1 -1
- package/dist/src/plugin/operator-settings.d.ts +1 -1
- package/dist/src/plugin/operator-settings.d.ts.map +1 -1
- package/dist/src/plugin/operator-settings.js +1 -8
- package/dist/src/plugin/operator-settings.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +11 -7
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +128 -102
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/request.d.ts +5 -3
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +87 -168
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/server.d.ts.map +1 -1
- package/dist/src/plugin/server.js +60 -53
- package/dist/src/plugin/server.js.map +1 -1
- package/dist/src/plugin/shared/advisory-repository.d.ts +20 -0
- package/dist/src/plugin/shared/advisory-repository.d.ts.map +1 -0
- package/dist/src/plugin/shared/advisory-repository.js +91 -0
- package/dist/src/plugin/shared/advisory-repository.js.map +1 -0
- package/dist/src/plugin/shared/request-services.d.ts +19 -25
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +105 -188
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/src/plugin/shared/runtime.js +4 -2
- package/dist/src/plugin/shared/runtime.js.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +4 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.js +41 -7
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
- package/dist/src/plugin/storage.d.ts +2 -2
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/src/plugin/vault-custody.js +147 -35
- package/dist/src/plugin/vault-custody.js.map +1 -1
- package/dist/src/plugin/vault-quota-outcome.d.ts +19 -0
- package/dist/src/plugin/vault-quota-outcome.d.ts.map +1 -0
- package/dist/src/plugin/vault-quota-outcome.js +47 -0
- package/dist/src/plugin/vault-quota-outcome.js.map +1 -0
- package/dist/src/quota-presentation.d.ts +29 -1
- package/dist/src/quota-presentation.d.ts.map +1 -1
- package/dist/src/quota-presentation.js +52 -17
- package/dist/src/quota-presentation.js.map +1 -1
- package/dist/src/setup.d.ts +15 -0
- package/dist/src/setup.d.ts.map +1 -0
- package/dist/src/setup.js +320 -0
- package/dist/src/setup.js.map +1 -0
- package/dist/src/sidebar-projection.d.ts +1 -1
- package/dist/src/sidebar-projection.d.ts.map +1 -1
- package/dist/src/sidebar-state.d.ts +1 -1
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +19 -1
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui.d.ts.map +1 -1
- package/dist/src/tui.js +205 -110
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +37 -37
- package/dist/tui-ga-build-map.json +33 -33
- package/dist/types/src/auth-method-labels.d.ts +3 -0
- package/dist/types/src/auth-method-labels.d.ts.map +1 -0
- package/dist/types/src/cli.d.ts +3 -1
- package/dist/types/src/cli.d.ts.map +1 -1
- package/dist/types/src/common-auth-embedded/auth-menu/terminal.d.ts +43 -0
- package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +132 -0
- package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +178 -0
- package/dist/types/src/common-auth-embedded/claustrum/enrollment.d.ts +164 -0
- package/dist/types/src/common-auth-embedded/claustrum/errors.d.ts +16 -0
- package/dist/types/src/common-auth-embedded/claustrum/host-slot.d.ts +39 -0
- package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +19 -0
- package/dist/types/src/common-auth-embedded/claustrum/insula.d.ts +69 -0
- package/dist/types/src/common-auth-embedded/claustrum/interlock.d.ts +27 -0
- package/dist/types/src/common-auth-embedded/claustrum/roster.d.ts +221 -0
- package/dist/types/src/common-auth-embedded/opencode2/errors.d.ts +25 -0
- package/dist/types/src/common-auth-embedded/opencode2/index.d.ts +8 -0
- package/dist/types/src/common-auth-embedded/opencode2/install.d.ts +55 -0
- package/dist/types/src/common-auth-embedded/opencode2/integration.d.ts +112 -0
- package/dist/types/src/common-auth-embedded/opencode2/sse.d.ts +12 -0
- package/dist/types/src/common-auth-embedded/opencode2/types.d.ts +413 -0
- package/dist/types/src/common-auth-embedded/quota/codec.d.ts +2 -0
- package/dist/types/src/common-auth-embedded/quota/format.d.ts +26 -0
- package/dist/types/src/common-auth-embedded/quota/index.d.ts +4 -4
- package/dist/types/src/common-auth-embedded/quota/map.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/quota/merge.d.ts +3 -1
- package/dist/types/src/common-auth-embedded/quota/projection.d.ts +2 -1
- package/dist/types/src/common-auth-embedded/routing/admission.d.ts +93 -0
- package/dist/types/src/common-auth-embedded/routing/index.d.ts +8 -0
- package/dist/types/src/common-auth-embedded/routing/ordered.d.ts +47 -0
- package/dist/types/src/common-auth-embedded/routing/pins.d.ts +22 -0
- package/dist/types/src/common-auth-embedded/routing/sticky.d.ts +158 -0
- package/dist/types/src/common-auth-embedded/setup/command.d.ts +3 -0
- package/dist/types/src/common-auth-embedded/setup/detect.d.ts +6 -0
- package/dist/types/src/common-auth-embedded/setup/index.d.ts +5 -0
- package/dist/types/src/common-auth-embedded/setup/process-fence.d.ts +43 -0
- package/dist/types/src/common-auth-embedded/setup/register.d.ts +11 -0
- package/dist/types/src/common-auth-embedded/setup/types.d.ts +136 -0
- package/dist/types/src/common-auth-embedded/store/schema.d.ts +2 -0
- package/dist/types/src/ga/rpc/protocol.d.ts +4 -7
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/types/src/ga/server/auth.d.ts +8 -3
- package/dist/types/src/ga/server/auth.d.ts.map +1 -1
- package/dist/types/src/ga/server/index.d.ts +39 -12
- package/dist/types/src/ga/server/index.d.ts.map +1 -1
- package/dist/types/src/ga/server/pool-login.d.ts +22 -0
- package/dist/types/src/ga/server/pool-login.d.ts.map +1 -0
- package/dist/types/src/plugin/accounts.d.ts +1 -1
- package/dist/types/src/plugin/accounts.d.ts.map +1 -1
- package/dist/types/src/plugin/background-vault-quota-refresh.d.ts +2 -0
- package/dist/types/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/types/src/plugin/command-apply.d.ts +2 -2
- package/dist/types/src/plugin/command-apply.d.ts.map +1 -1
- package/dist/types/src/plugin/commands.d.ts +1 -0
- package/dist/types/src/plugin/commands.d.ts.map +1 -1
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts +0 -4
- package/dist/types/src/plugin/config/operator-settings-schema.d.ts.map +1 -1
- package/dist/types/src/plugin/config/schema.d.ts +0 -7
- package/dist/types/src/plugin/config/schema.d.ts.map +1 -1
- package/dist/types/src/plugin/config/writer.d.ts +1 -1
- package/dist/types/src/plugin/fetch/retry-state.d.ts +19 -3
- package/dist/types/src/plugin/fetch/retry-state.d.ts.map +1 -1
- package/dist/types/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/types/src/plugin/fetch-routing.d.ts +0 -16
- package/dist/types/src/plugin/fetch-routing.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-location-services.d.ts +14 -9
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/google-origin.d.ts +7 -0
- package/dist/types/src/plugin/google-origin.d.ts.map +1 -0
- package/dist/types/src/plugin/index.d.ts.map +1 -1
- package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/types/src/plugin/operator-settings.d.ts +1 -1
- package/dist/types/src/plugin/operator-settings.d.ts.map +1 -1
- package/dist/types/src/plugin/quota.d.ts +11 -7
- package/dist/types/src/plugin/quota.d.ts.map +1 -1
- package/dist/types/src/plugin/request.d.ts +5 -3
- package/dist/types/src/plugin/request.d.ts.map +1 -1
- package/dist/types/src/plugin/server.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/advisory-repository.d.ts +20 -0
- package/dist/types/src/plugin/shared/advisory-repository.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-services.d.ts +19 -25
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +4 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/types/src/plugin/storage.d.ts +2 -2
- package/dist/types/src/plugin/storage.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-quota-outcome.d.ts +19 -0
- package/dist/types/src/plugin/vault-quota-outcome.d.ts.map +1 -0
- package/dist/types/src/setup.d.ts +15 -0
- package/dist/types/src/setup.d.ts.map +1 -0
- package/dist/types/src/sidebar-state.d.ts +1 -1
- package/dist/types/src/sidebar-state.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/common-auth-embedded/claustrum/consumer.d.ts +33 -3
- package/src/common-auth-embedded/claustrum/consumer.js +96 -1
- package/src/common-auth-embedded/claustrum/custody.d.ts +4 -1
- package/src/common-auth-embedded/claustrum/enrollment.d.ts +6 -1
- package/src/common-auth-embedded/claustrum/enrollment.js +6 -1
- package/src/common-auth-embedded/claustrum/index.d.ts +2 -1
- package/src/common-auth-embedded/claustrum/index.js +5 -3
- package/src/common-auth-embedded/claustrum/insula.d.ts +69 -0
- package/src/common-auth-embedded/claustrum/insula.js +152 -0
- package/src/common-auth-embedded/claustrum/roster.d.ts +13 -0
- package/src/common-auth-embedded/claustrum/roster.js +33 -3
- package/src/common-auth-embedded/fs/refresh-file-lock.js +20 -11
- package/src/common-auth-embedded/quota/codec.d.ts +2 -0
- package/src/common-auth-embedded/quota/codec.js +2 -1
- package/src/common-auth-embedded/quota/format.d.ts +26 -0
- package/src/common-auth-embedded/quota/format.js +78 -42
- package/src/common-auth-embedded/quota/index.d.ts +4 -4
- package/src/common-auth-embedded/quota/index.js +2 -2
- package/src/common-auth-embedded/quota/map.d.ts +11 -0
- package/src/common-auth-embedded/quota/map.js +36 -1
- package/src/common-auth-embedded/quota/merge.d.ts +3 -1
- package/src/common-auth-embedded/quota/merge.js +21 -5
- package/src/common-auth-embedded/quota/projection.d.ts +2 -1
- package/src/common-auth-embedded/quota/projection.js +3 -1
- package/src/common-auth-embedded/setup/command-runner.js +49 -0
- package/src/common-auth-embedded/setup/command.d.ts +3 -0
- package/src/common-auth-embedded/setup/command.js +215 -0
- package/src/common-auth-embedded/setup/config-write.js +60 -0
- package/src/common-auth-embedded/setup/detect.d.ts +6 -0
- package/src/common-auth-embedded/setup/detect.js +224 -0
- package/src/common-auth-embedded/setup/enroll.js +70 -0
- package/src/common-auth-embedded/setup/index.d.ts +5 -0
- package/src/common-auth-embedded/setup/index.js +4 -0
- package/src/common-auth-embedded/setup/paths.js +33 -0
- package/src/common-auth-embedded/setup/process-fence.d.ts +43 -0
- package/src/common-auth-embedded/setup/process-fence.js +270 -0
- package/src/common-auth-embedded/setup/prompts.js +26 -0
- package/src/common-auth-embedded/setup/register.d.ts +11 -0
- package/src/common-auth-embedded/setup/register.js +130 -0
- package/src/common-auth-embedded/setup/types.d.ts +136 -0
- package/src/common-auth-embedded/source-output.json +228 -80
- package/src/common-auth-embedded/store/schema.d.ts +2 -0
- package/src/common-auth-embedded/store/schema.js +3 -2
- package/src/sidebar-state.ts +19 -2
- package/src/tui-compiled/common-auth-embedded/quota/codec.js +2 -1
- package/src/tui-compiled/common-auth-embedded/quota/format.js +78 -42
- package/src/tui-compiled/common-auth-embedded/quota/index.js +2 -2
- package/src/tui-compiled/common-auth-embedded/quota/map.js +36 -1
- package/src/tui-compiled/common-auth-embedded/quota/merge.js +21 -5
- package/src/tui-compiled/common-auth-embedded/quota/projection.js +3 -1
- package/src/tui-compiled/quota-presentation.js +42 -9
- package/src/tui-compiled/sidebar-state.js +15 -1
- package/src/tui-compiled/tui.js +516 -334
- package/src/tui-ga-compiled/host-ga.js +11 -38
- package/src/tui-ga-compiled/shared/1ff34afa7c42d196-projection.js +3 -1
- package/src/tui-ga-compiled/shared/77138df80c7ae006-map.js +36 -1
- package/src/tui-ga-compiled/shared/98cc0c186c46c42d-quota-presentation.js +42 -9
- package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +78 -42
- package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +2 -2
- package/src/tui-ga-compiled/shared/ca21dc417b36dc5d-codec.js +2 -1
- package/src/tui-ga-compiled/shared/ecc214300932dfb6-merge.js +21 -5
- package/src/tui-ga-raw/host-ga.tsx +31 -62
- package/src/tui-ga-raw/shared/1ff34afa7c42d196-projection.js +3 -1
- package/src/tui-ga-raw/shared/77138df80c7ae006-map.js +36 -1
- package/src/tui-ga-raw/shared/98cc0c186c46c42d-quota-presentation.js +42 -9
- package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +78 -42
- package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +2 -2
- package/src/tui-ga-raw/shared/ca21dc417b36dc5d-codec.js +2 -1
- package/src/tui-ga-raw/shared/ecc214300932dfb6-merge.js +21 -5
- package/src/tui-raw/common-auth-embedded/quota/codec.js +2 -1
- package/src/tui-raw/common-auth-embedded/quota/format.js +78 -42
- package/src/tui-raw/common-auth-embedded/quota/index.js +2 -2
- package/src/tui-raw/common-auth-embedded/quota/map.js +36 -1
- package/src/tui-raw/common-auth-embedded/quota/merge.js +21 -5
- package/src/tui-raw/common-auth-embedded/quota/projection.js +3 -1
- package/src/tui-raw/quota-presentation.js +42 -9
- package/src/tui-raw/sidebar-state.js +15 -1
- package/src/tui-raw/tui.tsx +423 -218
- package/src/tui.tsx +423 -218
- package/dist/src/tui/vault-setup.d.ts +0 -98
- package/dist/src/tui/vault-setup.d.ts.map +0 -1
- package/dist/src/tui/vault-setup.js +0 -198
- package/dist/src/tui/vault-setup.js.map +0 -1
- package/dist/types/src/plugin/transform/model-resolver.d.ts +0 -2
- package/dist/types/src/plugin/transform/model-resolver.d.ts.map +0 -1
- package/dist/types/src/quota-presentation.d.ts +0 -18
- package/dist/types/src/quota-presentation.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,390 +1,76 @@
|
|
|
1
1
|
# `@cortexkit/opencode-antigravity-auth`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@cortexkit/opencode-antigravity-auth)
|
|
5
|
-
[](LICENSE)
|
|
3
|
+
One package for OpenCode 1.x (V1) and OpenCode 2.x general availability (GA), with server and terminal user interface (TUI) entries. Use Google sign-in for the Antigravity model catalog, a local account pool with rotation and quota limits, and the `/antigravity` menu/sidebar. The bundled `antigravity-auth` CLI provides account and quota commands; read its [standalone login pool-replacement behavior](docs/COMMANDS.md#standalone-cli) before using it with an existing pool.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
> Using this plugin or any proxy for Antigravity violates Google's Terms of Service. Account holders have reported suspensions, bans, and shadow-bans. The project is not endorsed by Google; use it at your own risk. Never include credentials, account files, or raw request/response dumps in Git or support reports.
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
> Using this plugin (and any proxy for Antigravity) violates Google's Terms of Service. Google account holders have reported suspensions, bans, and shadow-bans (restricted access without notice). The plugin is **not endorsed by Google**; you assume all risks.
|
|
7
|
+
This guide describes the current source tree, not an announcement that an unreleased version is available on npm. See the [project overview](../../README.md) and [current models and evidence caveats](docs/MODEL-VARIANTS.md): Gemini 4 Argon's MEDIUM/HIGH thinking levels and toolConfig omission remain unverified live.
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## What you get
|
|
16
|
-
|
|
17
|
-
- **Claude Opus 4.6 / Sonnet 4.6 (thinking)** and **Gemini 3 Pro / Flash / 3.6 Flash / 3.1 Pro / 3.1 Flash Image** via Google OAuth against the Antigravity quota pool.
|
|
18
|
-
- **GPT-OSS 120B Medium** through the Antigravity-style headers.
|
|
19
|
-
- **Multi-account rotation** with deterministic selection (`sticky`, `round-robin`, `hybrid`), per-account rate-limit cooldowns, and a failsafe **killswitch** that hard-blocks accounts below a quota threshold.
|
|
20
|
-
- **Dual quota pools:** Antigravity headers + Gemini CLI headers with style-fallback so a single exhausted pool does not stall a request.
|
|
21
|
-
- **OpenTUI sidebar** — read-only account/quota state; V1 polls the on-disk sidebar-state file, while GA polls location-scoped snapshots through native host RPC. Neither carries credentials.
|
|
22
|
-
- **One `/antigravity` menu** for accounts, quota, routing, limits, diagnostics, sign-in, and vault setup. See [`src/plugin/commands.ts`](src/plugin/commands.ts) and [`src/tui/command-dialogs.tsx`](src/tui/command-dialogs.tsx).
|
|
23
|
-
- **Thinking models** with optional signature caching and precompiled OpenTUI JSX.
|
|
24
|
-
- **Standalone CLI** shipped as the `antigravity-auth` bin (`init`, `migrate`, `rollback`, `login`, `list`, `quota`) — same local shared account store as the plugin.
|
|
25
|
-
- **Auto-recovery** from `tool_result_missing` errors and proactive background token refresh.
|
|
26
|
-
|
|
27
|
-
## Host requirement
|
|
9
|
+
## Host requirements and entries
|
|
28
10
|
|
|
29
11
|
| Host field | Required range |
|
|
30
12
|
| --- | --- |
|
|
31
13
|
| OpenCode engine | `>=1.17.13 <2` or `>=2.0.22` |
|
|
32
14
|
| V1 SDK peer (`@opencode-ai/plugin`) | `*` (checkout pin `1.17.13`) |
|
|
33
15
|
| GA SDK peer (`@opencode/plugin`) | `>=2.0.22` (checkout pin `2.0.22`) |
|
|
34
|
-
|
|
|
16
|
+
| OpenTUI core/keymap/solid peers | `>=0.4.5` each |
|
|
35
17
|
| `solid-js` peer | `>=1.9.0` |
|
|
36
18
|
| Node | `>=20` |
|
|
37
19
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
The public entries are:
|
|
20
|
+
Peers are optional in the [manifest](package.json) because each host uses its matching runtime. The checkout pins V1 OpenTUI `0.4.5` and GA OpenTUI `0.5.14`; declared peer ranges alone do not establish that every host/runtime combination has been tested or works.
|
|
41
21
|
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
22
|
+
- `.` → `dist/index.js`, the legacy V1 root.
|
|
23
|
+
- `./server` → `dist/server.js`, the hybrid V1/GA server.
|
|
24
|
+
- `./tui` → [`src/tui/entry.mjs`](src/tui/entry.mjs), the V1/GA TUI dispatcher.
|
|
45
25
|
|
|
46
|
-
Top-level [`server.js`](server.js) and [`tui.js`](tui.js) forward directory-based
|
|
26
|
+
Top-level [`server.js`](server.js) and [`tui.js`](tui.js) forward directory-based loading to the public entries. There is no separate OpenCode 2 adapter package. Register the complete package, not a copy of `dist/` alone.
|
|
47
27
|
|
|
48
28
|
## Installation
|
|
49
29
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
For V1 hosts that expose `opencode plugin`, the documented npm command is:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
opencode plugin @cortexkit/opencode-antigravity-auth@latest
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Verify the command in the matching host's help and inspect the resulting registrations. The package source proves its entries, not every host installer's effects. V1 uses a server registration in `opencode.json` and a TUI registration in `tui.json`; this recipe is not a GA CLI/config recipe.
|
|
59
|
-
|
|
60
|
-
#### Manual config (hand-edited configs)
|
|
61
|
-
|
|
62
|
-
V1 manual examples (merge into existing configs):
|
|
63
|
-
|
|
64
|
-
```jsonc
|
|
65
|
-
// ~/.config/opencode/opencode.json
|
|
66
|
-
{
|
|
67
|
-
"plugin": ["@cortexkit/opencode-antigravity-auth@latest"]
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
```jsonc
|
|
72
|
-
// ~/.config/opencode/tui.json
|
|
73
|
-
{
|
|
74
|
-
"plugin": ["@cortexkit/opencode-antigravity-auth"]
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
The two files are independent — the server registration is read from `opencode.json` and the TUI registration from `tui.json`.
|
|
79
|
-
|
|
80
|
-
Before starting OpenCode, initialize a fresh local store or complete the [offline migration](#major-upgrades-account-store-migration-and-rollback). Pick **Antigravity (Google OAuth)** from the Google provider login, or use Sign in from `/antigravity`. Verify with the new build's `antigravity-auth quota`.
|
|
81
|
-
|
|
82
|
-
### OpenCode GA (2.x)
|
|
83
|
-
|
|
84
|
-
The same package provides GA server **and TUI**. The [pinned OpenCode 2.0.22 harness](../e2e-tests/src/opencode-ga-harness.ts) uses plural `plugins` with an absolute wrapper directory; its colocated server/TUI wrappers import the public `./server` and `./tui` entries. The shipped `server.js`/`tui.js` forwarders support registering the installed package's absolute directory in `plugins`, as shown below:
|
|
85
|
-
|
|
86
|
-
```jsonc
|
|
87
|
-
{
|
|
88
|
-
"plugins": ["/absolute/path/to/node_modules/@cortexkit/opencode-antigravity-auth"]
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
The directory example follows the shipped forwarders, not a verified GA npm-installer command. Direct npm-spec registration and host CLI installation syntax remain unproven here; use the matching host's documentation. Do not copy the harness's synthetic provider credentials/mock URL. The harness's default fixture config has no user model map; no copied model-map requirement is established. See [the root GA guide](../../README.md#opencode-ga-2x) and the [host pin](../e2e-tests/docker/ga-binary-pin.json).
|
|
93
|
-
|
|
94
|
-
### Contributor (Bun)
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
bun install --frozen-lockfile # at repo root
|
|
98
|
-
bun install --cwd tools/common-auth-build --frozen-lockfile --ignore-scripts # Bun 1.4.2 private compiler
|
|
99
|
-
bun run build # core -> opencode -> pi
|
|
100
|
-
bun run --cwd packages/opencode smoke:tui # bundle + spawn the precompiled TUI
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
The public TUI loader chooses the V1 or GA renderer. V1 uses `src/tui-compiled/tui.js` for the host runtime or `src/tui-raw/tui.tsx` as the raw fallback; GA uses the `src/tui-ga-compiled/` and `src/tui-ga-raw/` trees. The loader probes virtual runtime support before selecting compiled or raw JSX. Other import errors propagate unchanged. Regenerate the trees with **Bun 1.4.2**: `bun run --cwd packages/opencode build:tui`. `bun run --cwd packages/opencode smoke:tui` checks fresh tarballs and consumer-local resolution. The private compiler and its input archive are repository-only and never shipped.
|
|
104
|
-
|
|
105
|
-
> Note: the pre-`2.0` inline quota helper is no longer shipped. Use `antigravity-auth quota [--refresh] [--json]` from this package or from the standalone CLI.
|
|
106
|
-
|
|
107
|
-
## Major upgrades: account-store migration and rollback
|
|
108
|
-
|
|
109
|
-
The local OpenCode pool now uses a shared account store, not direct writes to legacy `antigravity-accounts.json`. Use `antigravity-auth` from the **build you are upgrading to**, whose `--help` lists `init`, `migrate`, and `rollback`, before starting the host. “New CLI” below means that build's CLI:
|
|
110
|
-
|
|
111
|
-
**Before a major upgrade**, disable automatic config updates with the top-level setting below in the effective `antigravity.json`; project overrides must not re-enable it:
|
|
112
|
-
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"auto_update": false
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
The published v2.2.1 default is `true`, and its restart-time update check can advance pinned configs across majors. Pinning a version alone is not an update hold. Merge this setting into existing config before stopping the host for migration; it does not replace the offline procedure. See the [root upgrade guide](../../README.md#major-upgrades-migration-and-rollback) for the historical updater/schema references.
|
|
120
|
-
|
|
121
|
-
- **Fresh installation:** run `antigravity-auth init`, then log in. Initialization refuses an existing legacy pool; use migration instead.
|
|
122
|
-
- **Existing legacy OpenCode pool:** stop **every OpenCode and Antigravity process and timer** that can use the pool, then run `antigravity-auth migrate --offline`. Confirm the stopped-process prompt by typing `yes`. Optional `--yes` skips the prompt, not the requirement to stop processes.
|
|
123
|
-
- **Downgrade after migration:** stop every OpenCode and Antigravity process and timer using the pool again, run `antigravity-auth rollback --offline` with the **new CLI**, confirm and wait for successful completion, and only then install/start an older build.
|
|
124
|
-
|
|
125
|
-
Rollback exports **current credentials and metadata** from the active generation into legacy V4 JSON; it never revives tokens from the original backup. It refuses an existing/recreated legacy file, changed snapshots, or credentials/metadata changed during rollback. Do not copy an old snapshot back, recreate the legacy file, or run old and new versions concurrently. If migration or rollback fails, keep the hosts stopped and resolve the reported refusal rather than bypassing it.
|
|
126
|
-
|
|
127
|
-
These commands manage the local OpenCode pool only. The host's native Google auth slot used to activate the provider and approved credentials held by the vault are separate: before changing builds, disconnect vault enrollment via `/antigravity` → Vault in the currently installed plugin, and re-login if native credentials cannot be safely restored. No complete restoration of native host records is promised. Pi's native auth file is **not** this pool; Pi-only users must not migrate it. See [the root upgrade guide](../../README.md#major-upgrades-migration-and-rollback), [`src/cli.ts`](./src/cli.ts), and [`account-migration.ts`](../core/src/account-migration.ts).
|
|
128
|
-
|
|
129
|
-
## Models
|
|
130
|
-
|
|
131
|
-
### Quick reference
|
|
132
|
-
|
|
133
|
-
The model registry lives at `packages/core/src/model-registry.ts`; the OpenCode package re-exports it through `getAntigravityOpencodeModelIds()`. Models below are an authoritative mirror at the time of release.
|
|
134
|
-
|
|
135
|
-
| Model | Variants | Quota group |
|
|
136
|
-
| --- | --- | --- |
|
|
137
|
-
| `antigravity-gemini-4-argon` | `low`, `medium` (default), `high` | Per-model quota; weekly pool attribution unverified |
|
|
138
|
-
| `antigravity-gemini-3.8-flash` | `low`, `medium`, `high` | `gemini-flash` |
|
|
139
|
-
| `antigravity-gemini-3.5-flash` | `low`, `medium`, `high` | `gemini-flash` |
|
|
140
|
-
| `antigravity-gemini-3.1-flash-image` | — | `gemini-flash` |
|
|
141
|
-
| `antigravity-claude-sonnet-5-5` | low / medium / high | `claude` |
|
|
142
|
-
| `antigravity-claude-opus-5-5` | low / medium / high | `claude` |
|
|
143
|
-
| `antigravity-gpt-oss-120b-medium` | — | `gpt-oss` |
|
|
144
|
-
|
|
145
|
-
> Claude 5.5 has a 1,000,000-token context and 128,000-token output limit, with adaptive thinking. Claude 4.6 requests refuse rather than redirecting to a different model.
|
|
146
|
-
|
|
147
|
-
> Gemini 4 Argon requires **Google AI Ultra**, with 1,048,576 context and 65,536 output tokens. Gemini 3.1 Pro, Gemini 3.6/3.7 Flash and `gemini-pro-agent` were withdrawn by Antigravity; grouped and native tier selections refuse without redirects. Historical transcripts remain readable.
|
|
148
|
-
|
|
149
|
-
> Gemini 3.8 Flash Cyber is absent from the captured AGY 1.3.5 server catalog, so it is not exposed by this plugin. Gemini 3.5 Flash Lite is a server helper route, not a public picker entry. Gemini 3.5 Flash Cyber remains restricted to a limited-access CodeMender pilot.
|
|
150
|
-
|
|
151
|
-
### Routing
|
|
152
|
-
|
|
153
|
-
- **Antigravity-first (default).** Gemini requests go to the Antigravity header style first; on `429 RESOURCE_EXHAUSTED` they fall back to the Gemini CLI header set.
|
|
154
|
-
- **CLI-first** (`cli_first: true`). Flip the order — Gemini CLI first, Antigravity fallback. Change the live setting in `/antigravity` → Routing.
|
|
155
|
-
- **Style-fallback** (`quota_style_fallback: true`). Re-send the SAME request through the other header set on a rate limit. Default OFF because retrying can consume quota from both header-style pools. Change it in `/antigravity` → Routing.
|
|
156
|
-
- **Argon, Claude and image models** always use Antigravity regardless of toggles.
|
|
157
|
-
- Model names transform automatically between Antigravity and Gemini CLI namespaces (`antigravity-gemini-3-flash` ↔ `gemini-3-flash-preview`).
|
|
158
|
-
|
|
159
|
-
### Quota, killswitch, and the soft-threshold fail-open
|
|
160
|
-
|
|
161
|
-
Each cached quota entry carries `{ remainingFraction, resetTime }` per group:
|
|
162
|
-
|
|
163
|
-
- **Soft-quota threshold** — `soft_quota_threshold_percent` (default 80). Accounts above the threshold are skipped as if rate-limited. Set to `100` to disable.
|
|
164
|
-
- **Stale-TTL fail-open** — `soft_quota_cache_ttl_minutes = "auto"` resolves to `max(2 × refresh, 10)` minutes. Cache older than the TTL is treated as unknown and allowed through.
|
|
165
|
-
- **Proactive rotation** — `proactive_rotation_threshold_percent` (default 20). When the active account's remaining quota drops below, dispatch the next request from a warm-cache account.
|
|
166
|
-
- **All-throttled wait** — `max_rate_limit_wait_seconds` (default 300). Cap on how long the interceptor waits when every account is rate-limited before failing fast.
|
|
167
|
-
|
|
168
|
-
The **operator killswitch** is a hard rejection layer run BEFORE the soft-quota filter:
|
|
169
|
-
|
|
170
|
-
- `enabled` master switch.
|
|
171
|
-
- `minimum_remaining_percent` (default 5) — global hard-block threshold.
|
|
172
|
-
- `accounts[key]` — per-account override keyed by `sha256(refreshToken).slice(0,12)`. The hash is deterministic but irreversible; the raw token never appears in the config, the sidebar, RPC payloads, or apply responses.
|
|
173
|
-
- **Cache-TTL fail-open** — when an account has no fresh cached quota (default 5 min TTL), it is allowed through so a cold start cannot deadlock.
|
|
174
|
-
- **All-killed error** — if the entire pool is excluded, the interceptor throws `AntigravityKillswitchError` with a per-account summary.
|
|
175
|
-
|
|
176
|
-
Both filters run before the token bucket / health score pick, so the operator's threshold is authoritative even on a healthy pool.
|
|
177
|
-
|
|
178
|
-
## `/antigravity` menu
|
|
179
|
-
|
|
180
|
-
Open `/antigravity` for Accounts, Quota, Routing, Limits (killswitch/account floors), Diagnostics (logging/dumps), Sign in, and Vault. Sections/actions depend on the active credential source. Use the menu actions rather than supplying per-feature slash-command arguments.
|
|
181
|
-
|
|
182
|
-
V1 registers the command in [`src/plugin/catalog.ts`](src/plugin/catalog.ts), builds it in [`src/plugin/commands.ts`](src/plugin/commands.ts), and renders it in [`src/tui/command-dialogs.tsx`](src/tui/command-dialogs.tsx). The common menu comes from core's [`antigravity-command-menu.ts`](../core/src/antigravity-command-menu.ts).
|
|
183
|
-
|
|
184
|
-
## Standalone CLI
|
|
185
|
-
|
|
186
|
-
The `antigravity-auth` bin is bundled into this package:
|
|
30
|
+
Quit all OpenCode and Pi processes, then run:
|
|
187
31
|
|
|
188
32
|
```bash
|
|
189
|
-
npx
|
|
190
|
-
npx -y @cortexkit/opencode-antigravity-auth list [--json]
|
|
191
|
-
npx -y @cortexkit/opencode-antigravity-auth quota [--json] [--refresh]
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
The new build also exposes `antigravity-auth init`, `migrate --offline [--yes]`, and `rollback --offline [--yes]`; see [Major upgrades](#major-upgrades-account-store-migration-and-rollback) before using them. Do not rely on an older npm CLI for store migration or rollback.
|
|
195
|
-
|
|
196
|
-
- `login` runs the full PKCE + local callback flow. `--no-browser` prints the URL instead of opening it (handy in headless / SSH sessions where the browser cannot reach the callback port; see Troubleshooting).
|
|
197
|
-
- `list` prints `INDEX`, `EMAIL`, `STATUS` for every account in storage (`active`, `disabled`, `ineligible`, `verification-required`).
|
|
198
|
-
- `quota` prints `ACCOUNT`, `STATUS`, `GROUP`, `REMAINING`, `RESET` rows. `--refresh` forces a live refresh; `--json` emits the same data as JSON.
|
|
199
|
-
|
|
200
|
-
Exit codes: `0` success, `1` thrown error, `2` parse failure. In local mode, CLI login writes through the same active shared store as the OpenCode adapters. `list` and `quota` read accounts; neither initializes nor migrates storage.
|
|
201
|
-
|
|
202
|
-
## Multi-account setup
|
|
203
|
-
|
|
204
|
-
Use the Google provider login or `/antigravity` → Sign in to add local accounts, then Accounts and Quota to inspect/manage the initialized repository. Models use the `google/` provider prefix (for example `google/antigravity-gemini-3.8-flash`); do not create a `google-antigravity` provider to activate this plugin. See [the root guide](../../README.md#multi-account-behavior) for the current store and the rotation strategies (`sticky`, `hybrid`, `round-robin`).
|
|
205
|
-
|
|
206
|
-
### Local authority / vault custody
|
|
207
|
-
|
|
208
|
-
Both OpenCode host lines share the local store at the resolved account path; starting a new project does not create a separate pool. `/antigravity` → Vault manages enrollment and source selection. Local authority uses local repository credentials; vault custody excludes the local pool, including when the vault is unavailable. OpenCode 1 needs a saved Google auth entry to load the provider. Once loaded, approved enrollment supplies vault credentials without reading or validating that entry's contents: existing ordinary Google logins and placeholder records from other enrollments remain unchanged. Explicit fresh provider activation refuses to overwrite an occupied Google auth slot. GA vault serving requires the native Google connection created for that enrollment; Pi requires the non-secret Google-slot marker created for that enrollment. Host activation and source-mode files are separate from pool migration/rollback. See [`src/plugin/vault-custody.ts`](src/plugin/vault-custody.ts), [`src/plugin/auth-loader.ts`](src/plugin/auth-loader.ts), and [`src/plugin/vault-activation.ts`](src/plugin/vault-activation.ts).
|
|
209
|
-
|
|
210
|
-
## Sidebar / RPC state and recovery
|
|
211
|
-
|
|
212
|
-
The **V1 sidebar** reads from `$XDG_STATE_HOME/cortexkit/antigravity-auth/sidebar-state.json` (or whatever `ANTIGRAVITY_AUTH_SIDEBAR_STATE_FILE` points at) and polls every `2s`. The contract version is `1`; malformed JSON or unknown versions silently fall back to `DEFAULT_SIDEBAR_STATE` (which is rendered as "Awaiting Antigravity state"). Carries `version`, `checkedAt`, `accounts[]`, `activeRouting` (per-session map, pruned to 24h / 100 entries), `routingAuthoritative`, optional `quotaBackoffUntil` and `lastError`. **Never carries refresh tokens, access tokens, project IDs, or fingerprints.** GA's sidebar/menu instead uses location-scoped snapshots through native host RPC; see [`src/ga/tui/host-ga.tsx`](src/ga/tui/host-ga.tsx).
|
|
213
|
-
|
|
214
|
-
The **V1 RPC** lives under `$XDG_STATE_HOME/cortexkit/antigravity-auth/rpc/<project-hash>/port-<pid>.json` (override via `ANTIGRAVITY_AUTH_RPC_DIR`). The TUI selects a live entry and exchanges shared menu requests/notifications with the loopback server using a `Bearer <token>` header. GA uses its own server/TUI integration; this V1 port file is not a GA host configuration requirement.
|
|
215
|
-
|
|
216
|
-
**Recovery from a stale sidebar** — stop the host, verify `$XDG_STATE_HOME/cortexkit/antigravity-auth/sidebar-state.json` exists and is `0600`, then restart. **Recovery from a missing RPC port file** — confirm the running plugin process exists; `getRpcDir(directory)` derives the directory from a sha256 of the project directory, so two projects on the same host get independent RPC dirs.
|
|
217
|
-
|
|
218
|
-
## V1 disposal
|
|
219
|
-
|
|
220
|
-
`dispose()` marks the plugin closing synchronously so no new work is admitted. Shutdown then:
|
|
221
|
-
|
|
222
|
-
1. Aborts and waits for live and retiring requests and token-refresh shutdown before disposing their account managers.
|
|
223
|
-
2. Closes the disk signature cache and clears session/fetch state.
|
|
224
|
-
3. Stops and waits for registered producers, so they cannot enqueue more sidebar writes.
|
|
225
|
-
4. Waits for the queued sidebar writes to settle through `drainSidebarWrites()`.
|
|
226
|
-
5. Stops registered consumers, including the RPC server and file logger.
|
|
227
|
-
|
|
228
|
-
The shutdown ordering above does not guarantee every attempted write succeeded or that the terminal rendered a final snapshot. See [`src/plugin/lifecycle.ts`](src/plugin/lifecycle.ts).
|
|
229
|
-
|
|
230
|
-
## File / state inventory (this package)
|
|
231
|
-
|
|
232
|
-
| Purpose | Path | Mode | Notes |
|
|
233
|
-
| --- | --- | --- | --- |
|
|
234
|
-
| Local account store | Beside the resolved account path: `antigravity-accounts.json.store.pointer.json` selects `antigravity-accounts.json.store.<id>.generation/` | Owner-only | Active `config.json` / `state.json`, migration journal, protected backups/transfers. |
|
|
235
|
-
| Legacy pool | `~/.config/opencode/antigravity-accounts.json` (or `OPENCODE_CONFIG_DIR`) | `0600` | Legacy JSON schema version 4: migration input / successful rollback output, not the active writer target. |
|
|
236
|
-
| Plugin config | `~/.config/opencode/antigravity.json` (and project `.opencode/antigravity.json`) | `0600` | Zod-validated config. |
|
|
237
|
-
| Debug logs | `~/.config/opencode/antigravity-logs/` (or `log_dir`) | `0600` | Sensitive — request/response bodies. |
|
|
238
|
-
| V1 sidebar state | `$XDG_STATE_HOME/cortexkit/antigravity-auth/sidebar-state.json` | `0600` dir `0700` | Poll-every-2s; pruned to 24h / 100 entries. |
|
|
239
|
-
| V1 RPC port file | `$XDG_STATE_HOME/cortexkit/antigravity-auth/rpc/<project-hash>/port-<pid>.json` | `0600` | Loopback token bearer. |
|
|
240
|
-
| Signature cache | `signature-cache-disk-<hash>.json` (when `keep_thinking: true`) | `0600` | 2-day default TTL. |
|
|
241
|
-
|
|
242
|
-
## Debug sinks
|
|
243
|
-
|
|
244
|
-
The plugin has **two** debug sinks controlled independently:
|
|
245
|
-
|
|
246
|
-
- `debug: true` — file logging under `log_dir`. Disabled by default. May include request/response bodies; handle with care.
|
|
247
|
-
- `debug_tui: true` — TUI log-panel verbosity. Independent of `debug`.
|
|
248
|
-
|
|
249
|
-
Combined with the runtime log-level filter (`operator.log_level`, mutable through `/antigravity` → Diagnostics), you have three independent knobs.
|
|
250
|
-
|
|
251
|
-
## Plugin interactions
|
|
252
|
-
|
|
253
|
-
For load-balancing, dual quota pools, and account storage details, see [docs/MULTI-ACCOUNT.md](./docs/MULTI-ACCOUNT.md).
|
|
254
|
-
|
|
255
|
-
### `@tarquinen/opencode-dcp`
|
|
256
|
-
|
|
257
|
-
DCP creates synthetic assistant messages that lack thinking blocks. **List this plugin BEFORE DCP**:
|
|
258
|
-
|
|
259
|
-
```json
|
|
260
|
-
{
|
|
261
|
-
"plugin": [
|
|
262
|
-
"@cortexkit/opencode-antigravity-auth@latest",
|
|
263
|
-
"@tarquinen/opencode-dcp@latest"
|
|
264
|
-
]
|
|
265
|
-
}
|
|
33
|
+
npx @cortexkit/opencode-antigravity-auth setup
|
|
266
34
|
```
|
|
267
35
|
|
|
268
|
-
|
|
36
|
+
Read [guided setup](docs/CONFIGURATION.md#guided-setup) for explicit host selection, local versus approved-vault mode, dry-run, and bounded real-run metadata effects. Setup does not bypass stopped-host checks or complete OpenCode 2's native connection. See [migration and rollback](docs/MIGRATION.md) before upgrading an existing pool; a version pin alone is not an automatic-update hold.
|
|
269
37
|
|
|
270
|
-
|
|
38
|
+
- **OpenCode 1:** follow [V1 registration and login](docs/CONFIGURATION.md#opencode-1-manual-registration).
|
|
39
|
+
- **OpenCode 2:** follow [pool browser login](docs/OPENCODE-2.md#pool-browser-login), then select the saved **Antigravity** connection. Ordinary real Google keys/native credentials pass through unchanged.
|
|
40
|
+
- **Vault:** use the [approved vault method and custody guide](docs/VAULT.md); do not use vault activation for local pool mode.
|
|
271
41
|
|
|
272
|
-
|
|
273
|
-
{
|
|
274
|
-
"google_auth": false,
|
|
275
|
-
"agents": {
|
|
276
|
-
"frontend-ui-ux-engineer": { "model": "google/antigravity-gemini-3-pro" },
|
|
277
|
-
"document-writer": { "model": "google/antigravity-gemini-3-flash" },
|
|
278
|
-
"multimodal-looker": { "model": "google/antigravity-gemini-3-flash" }
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
> **Tip:** When spawning parallel subagents, enable `pid_offset_enabled: true` in `antigravity.json` to distribute sessions across accounts.
|
|
284
|
-
|
|
285
|
-
### Plugins you don't need
|
|
286
|
-
|
|
287
|
-
- **gemini-auth plugins** — not needed; this plugin handles all Google OAuth.
|
|
42
|
+
After starting the host, open `/antigravity` for account, quota, routing, limits, diagnostics, and vault actions. Available actions depend on the active credential source. [Commands](docs/COMMANDS.md) covers the menu and standalone CLI.
|
|
288
43
|
|
|
289
|
-
##
|
|
290
|
-
|
|
291
|
-
Created by `~/.config/opencode/antigravity.json` for optional overrides. The full list with defaults and env overrides is in the [root README](../../README.md#configuration-reference) and the generated schema at [`assets/antigravity.schema.json`](./assets/antigravity.schema.json).
|
|
292
|
-
|
|
293
|
-
```json
|
|
294
|
-
{
|
|
295
|
-
"$schema": "https://raw.githubusercontent.com/cortexkit/antigravity-auth/main/packages/opencode/assets/antigravity.schema.json",
|
|
296
|
-
"account_selection_strategy": "hybrid",
|
|
297
|
-
"scheduling_mode": "cache_first",
|
|
298
|
-
"soft_quota_threshold_percent": 80,
|
|
299
|
-
"quota_refresh_interval_minutes": 30,
|
|
300
|
-
"keep_thinking": false
|
|
301
|
-
}
|
|
302
|
-
```
|
|
44
|
+
## Contributor build and TUI
|
|
303
45
|
|
|
304
|
-
|
|
46
|
+
From the repository root:
|
|
305
47
|
|
|
306
48
|
```bash
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
49
|
+
bun install --frozen-lockfile
|
|
50
|
+
bun install --cwd tools/common-auth-build --frozen-lockfile --ignore-scripts
|
|
51
|
+
bun run build
|
|
52
|
+
bun run --cwd packages/opencode smoke:tui
|
|
311
53
|
```
|
|
312
54
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
## Tests
|
|
316
|
-
|
|
317
|
-
Run these commands from the **repository root**. Deterministic tests use isolated source selectors; live model/regression checks are separate:
|
|
318
|
-
|
|
319
|
-
| Scope | Tooling | Network | Command |
|
|
320
|
-
| --- | --- | --- | --- |
|
|
321
|
-
| Unit (deterministic) | isolated source selectors in root `package.json` | No | `bun run test` |
|
|
322
|
-
| Black-box e2e (deterministic) | mock Antigravity + harness runner in `packages/e2e-tests/` | No | `bun run test:e2e` |
|
|
323
|
-
| Live model inventory | `script/test-models.ts` | Yes (gated by label) | `bun run test:e2e:models` |
|
|
324
|
-
| Cross-model regression | `script/test-regression.ts` + `script/test-cross-model*.sh` | Yes | `bun run test:e2e:regression` |
|
|
325
|
-
| TUI smoke | install tarball + spawn | No | `bun run --cwd packages/opencode smoke:tui` |
|
|
326
|
-
|
|
327
|
-
The deterministic tier is what CI gates; the live tier is opt-in for changes that touch the model registry, the request transform, or the response transform.
|
|
328
|
-
|
|
329
|
-
## Troubleshooting
|
|
330
|
-
|
|
331
|
-
> Do not delete the legacy pool, store pointer/generation, or custody files as a generic reset. Stop the host, resolve the reported store/source refusal, then use `/antigravity` account actions or provider re-login. Deletion can destroy rollback evidence or the saved native login.
|
|
332
|
-
|
|
333
|
-
### Configuration paths (all platforms)
|
|
55
|
+
Use **Bun 1.4.2** for TUI regeneration: `bun run --cwd packages/opencode build:tui`. The public loader selects `src/tui-compiled/tui.js` or the raw fallback `src/tui-raw/tui.tsx` for V1; OpenCode 2 has separate compiled/raw trees. Runtime support is probed before selection; unrelated import errors propagate. The private compiler and input archive are repository-only, never shipped.
|
|
334
56
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
### OAuth callback issues
|
|
338
|
-
|
|
339
|
-
- **Safari HTTPS-Only mode** blocks `http://localhost`. Switch browsers or temporarily disable HTTPS-Only (Safari → Settings → Privacy) during login.
|
|
340
|
-
- **Stale `Address already in use :51121`** — `lsof -i :51121` (or `netstat -ano | findstr :51121` on Windows) → stop the stale listener → retry. `--no-browser` suppresses browser launch; it is not a guarantee that the callback port is unused.
|
|
341
|
-
- **SSH / remote dev** — forward the callback port with `ssh -L 51121:localhost:51121 user@remote`. The standalone CLI + `--no-browser` is the simplest workaround when SSH-port-forwarding is awkward.
|
|
342
|
-
- **Docker / WSL2 / containers** — localhost OAuth does not work in containers out of the box. Wait 30s for the manual URL flow, or port-forward `51121` to the host.
|
|
343
|
-
|
|
344
|
-
### Common errors
|
|
345
|
-
|
|
346
|
-
- **`Permission 'cloudaicompanion.companions.generateChat' denied on resource '…/locations/global'`** — Antigravity returned no project ID and the plugin used the fallback `rising-fact-p41fc`. Enable the Gemini for Google Cloud API on your project and authenticate locally with `antigravity-auth login --project <id>`; do not edit retired pool JSON. For vault credentials, contact the vault operator.
|
|
347
|
-
- **Gemini 3 model 400 "Unknown name 'parameters'"** — usually a tool-schema incompatibility. Update to the latest plugin version; or disable MCP servers one-by-one to isolate the offender.
|
|
348
|
-
- **`Invalid function name must start with a letter or underscore`** — an MCP tool name starts with a digit (e.g. `1mcp_*`). Rename the MCP key to start with a letter (e.g. `gw`) or disable that MCP entry for Antigravity models.
|
|
349
|
-
- **`All Accounts Rate-Limited (But Quota Available)`** — inspect thresholds and readings. Lower `soft_quota_threshold_percent` (or raise to `100`) and use `/antigravity` → Quota to check now; do not delete the store to clear cooldowns.
|
|
350
|
-
- **Unexpected temporary files** — stop every process/timer using the pool and inspect the reported error. Do not remove migration, transfer, or custody artifacts while diagnosing a failed operation.
|
|
351
|
-
|
|
352
|
-
### Sidebar / TUI
|
|
353
|
-
|
|
354
|
-
- **`Awaiting Antigravity state` stuck** — verify `$XDG_STATE_HOME/cortexkit/antigravity-auth/sidebar-state.json` exists, is `0600`, and the host user can write. Restart the host.
|
|
355
|
-
- **TUI bundle fails to spawn** — with **Bun 1.4.2**, `bun run --cwd packages/opencode build:tui` regenerates V1 and GA compiled/raw trees. Check the tree selected by `src/tui/entry.mjs`, then run `bun run --cwd packages/opencode smoke:tui`.
|
|
356
|
-
- **`Antigravity RPC server is not available` (V1)** — the TUI uses a per-PID port file in `$XDG_STATE_HOME/cortexkit/antigravity-auth/rpc/<project-hash>/`. If the running plugin process is gone, stop and restart the host.
|
|
357
|
-
|
|
358
|
-
### Moving between machines
|
|
359
|
-
|
|
360
|
-
A migrated pool is not a single `antigravity-accounts.json` file. Do not copy only the old JSON or manually splice generation files into another profile. A general cross-machine store transfer procedure is not established here; prefer a fresh explicit initialization and re-login on the destination, or vault enrollment through `/antigravity`. Offline rollback downgrades the active store produced by initialization/migration; it is not a generic backup restore.
|
|
361
|
-
|
|
362
|
-
### Plugin config schema
|
|
363
|
-
|
|
364
|
-
The schema reference at `assets/antigravity.schema.json` drives editor IntelliSense. Set `$schema: "https://raw.githubusercontent.com/cortexkit/antigravity-auth/main/packages/opencode/assets/antigravity.schema.json"` in your `antigravity.json` for autocomplete in the IDE.
|
|
57
|
+
`smoke:tui` installs fresh tarballs in a scratch consumer and checks resolution and renderer startup. It does not prove login, provider activation, or request serving in a real OpenCode host. Use an isolated host config/database for source work so test runs cannot change your usual accounts or conversations. See [development and release](docs/DEVELOPMENT.md) for the complete gates.
|
|
365
58
|
|
|
366
59
|
## Documentation
|
|
367
60
|
|
|
368
|
-
- [
|
|
369
|
-
- [
|
|
370
|
-
- [
|
|
371
|
-
- [
|
|
372
|
-
- [
|
|
373
|
-
- [
|
|
374
|
-
- [
|
|
375
|
-
- [
|
|
376
|
-
- [
|
|
377
|
-
- [
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
If this plugin saves you time, consider supporting its development at <https://ko-fi.com/S6S81QBOIR>.
|
|
382
|
-
|
|
383
|
-
## Credits
|
|
384
|
-
|
|
385
|
-
- [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) by [@jenslys](https://github.com/jenslys)
|
|
386
|
-
- [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)
|
|
61
|
+
- [Configuration and manual installation](docs/CONFIGURATION.md)
|
|
62
|
+
- [Accounts, routing, quota, and storage](docs/MULTI-ACCOUNT.md)
|
|
63
|
+
- [Models and thinking variants](docs/MODEL-VARIANTS.md)
|
|
64
|
+
- [Troubleshooting](docs/TROUBLESHOOTING.md)
|
|
65
|
+
- [Claustrum vault](docs/VAULT.md)
|
|
66
|
+
- [Menu and CLI commands](docs/COMMANDS.md)
|
|
67
|
+
- [OpenCode 2](docs/OPENCODE-2.md)
|
|
68
|
+
- [Migration and rollback](docs/MIGRATION.md)
|
|
69
|
+
- [Development and release](docs/DEVELOPMENT.md)
|
|
70
|
+
- [Architecture](ARCHITECTURE.md), [structure](STRUCTURE.md), and [internal architecture guide](docs/ARCHITECTURE.md)
|
|
71
|
+
- [Antigravity API reference](docs/ANTIGRAVITY_API_SPEC.md) and [JSON Schema](assets/antigravity.schema.json)
|
|
72
|
+
- [Changelog](CHANGELOG.md)
|
|
387
73
|
|
|
388
74
|
## License
|
|
389
75
|
|
|
390
|
-
MIT. See [LICENSE](
|
|
76
|
+
MIT. See [LICENSE](LICENSE).
|