This repository was archived by the owner on Feb 28, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { platform , arch } from "node:os" ;
2+
13export const ANTIGRAVITY_CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com" ;
24export const ANTIGRAVITY_CLIENT_SECRET = "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" ;
35export const ANTIGRAVITY_CALLBACK_PORT = 36742 ;
@@ -11,7 +13,27 @@ export const ANTIGRAVITY_SCOPES: readonly string[] = [
1113 "https://www.googleapis.com/auth/experimentsandconfigs" ,
1214] ;
1315
14- export const ANTIGRAVITY_USER_AGENT = "antigravity/1.11.5 windows/amd64" ;
16+ /**
17+ * Map Node.js os values to Antigravity's expected platform/arch format.
18+ * Falls back to "linux/amd64" if the platform or arch is unrecognized.
19+ */
20+ function getAntigravityPlatform ( ) : string {
21+ const platformMap : Record < string , string > = {
22+ darwin : "darwin" ,
23+ linux : "linux" ,
24+ win32 : "windows" ,
25+ } ;
26+ const archMap : Record < string , string > = {
27+ arm64 : "arm64" ,
28+ x64 : "amd64" ,
29+ ia32 : "386" ,
30+ } ;
31+ const p = platformMap [ platform ( ) ] ?? "linux" ;
32+ const a = archMap [ arch ( ) ] ?? "amd64" ;
33+ return `${ p } /${ a } ` ;
34+ }
35+
36+ export const ANTIGRAVITY_USER_AGENT = `antigravity/1.15.8 ${ getAntigravityPlatform ( ) } ` ;
1537export const ANTIGRAVITY_API_CLIENT = "google-cloud-sdk vscode_cloudshelleditor/0.1" ;
1638export const ANTIGRAVITY_CLIENT_METADATA = '{"ideType":"IDE_UNSPECIFIED","platform":"PLATFORM_UNSPECIFIED","pluginType":"GEMINI"}' ;
1739
You can’t perform that action at this time.
0 commit comments