feat(providers): add Google Antigravity via the official ACP agent #9348
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 7 commits into
main fromrefs/pull/9348/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- apps/server/src/provider/antigravityAuthSupport.ts line 234Resolvedby t3dotgg(GitHub profile, opens in a new tab)@@ -0,0 +112,21 @@112+ PYTHONUNBUFFERED: "1",113+ ELECTRON_RUN_AS_NODE: "1",114+ };115+}116+117+/** Prepares a private profile without reading or copying Google credentials. */118+export const prepareAntigravityProfile = Effect.fn("prepareAntigravityProfile")(function* (input: {119+ readonly profileDirectory: string;120+ readonly baseEnv?: NodeJS.ProcessEnv;121+ readonly runtimeExecutablePath?: string;122+ readonly platform?: NodeJS.Platform;123+}) {124+ const fs = yield* FileSystem.FileSystem;125+ const path = yield* Path.Path;126+ const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;127+ const platform = input.platform ?? (yield* HostProcessPlatform);128+ const runtimeExecutablePath = input.runtimeExecutablePath ?? (yield* HostProcessExecutablePath);129+ const helperExecutable =130+ platform === "win32" ? runtimeExecutablePath.replaceAll("\\", "/") : runtimeExecutablePath;131+ const browserArguments = [helperExecutable, "-e", browserHelperSource, "--", "%s"];132+ const browserCommand = browserArguments.map(quoteBrowserArgument).join(" ");apps/mobile/src/features/threads/use-project-actions.ts line 126Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -110,3 +112,15 @@110112 return AsyncResult.failure(Cause.fail(new Error(preparedAttachmentError)));111113 }112114115+ const serverConfig = appAtomRegistry.get(116+ serverEnvironment.configValueAtom(input.project.environmentId),117+ );118+ const providerError = !serverConfig119+ ? "Provider settings are still loading. Try again."120+ : isModelSelectionUnavailable(serverConfig, input.modelSelection)121+ ? "Antigravity model unavailable. Open model settings to finish setup or choose another model."122+ : null;123+ if (providerError !== null) {124+ setPendingConnectionError(providerError);125+ return AsyncResult.failure(Cause.fail(new Error(providerError)));126+ }
- apps/server/src/provider/acp/AntigravityAcpSupport.ts lines 259 to 264OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +244,21 @@244+ `Antigravity does not support '${attachment.name}' (${attachment.mimeType}). Attach a BMP, JPEG, PNG, WebP, PDF, audio, or text file.`,245+ );246+ }247+ const attachmentPath = resolveAttachmentPath({248+ attachmentsDir: input.attachmentsDir,249+ attachment,250+ });251+ if (!attachmentPath) {252+ return yield* EffectAcpErrors.AcpRequestError.invalidParams(253+ `Invalid attachment '${attachment.name}'.`,254+ );255+ }256+ const info = yield* fileSystem257+ .stat(attachmentPath)258+ .pipe(259+ Effect.mapError((cause) =>260+ EffectAcpErrors.AcpRequestError.invalidParams(261+ `Could not read attachment '${attachment.name}'.`,262+ { cause: cause.message },263+ ),264+ ),apps/server/src/provider/antigravityAuthSupport.ts line 2OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +1,2 @@1+import * as NodeCrypto from "node:crypto";2+// @effect-diagnostics-next-line nodeBuiltinImport:offapps/server/src/provider/Drivers/AntigravitySkills.ts lines 45 to 49OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +29,21 @@29+ return this.reason === "scan-budget-exhausted"30+ ? `Antigravity skill discovery exceeded its scan limit at '${this.path}'.`31+ : `Antigravity could not read skills at '${this.path}'.`;32+ }33+}34+35+interface ScanBudget {36+ remainingBytes: number;37+ remainingEntries: number;38+}39+40+const readIfPresent = <A, R>(41+ effect: Effect.Effect<A, PlatformError.PlatformError, R>,42+ path: string,43+) =>44+ effect.pipe(45+ Effect.catchTag("PlatformError", (cause) =>46+ cause.reason._tag === "NotFound"47+ ? Effect.succeed(undefined)48+ : Effect.fail(new AntigravitySkillsProbeError({ reason: "filesystem-error", path, cause })),49+ ),apps/server/src/provider/Services/ProviderAuthService.ts line 31Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +11,21 @@11+ readonly complete: (12+ ownerSessionId: string,13+ input: { readonly flowId: string; readonly callbackUrl: string },14+ ) => Effect.Effect<ProviderAuthState, ProviderSetupError>;15+ readonly cancel: (16+ ownerSessionId: string,17+ flowId: string,18+ ) => Effect.Effect<ProviderAuthState, ProviderSetupError>;19+ /** The controller closes process admission before it stops routed sessions. */20+ readonly logout: (21+ stopSessions: Effect.Effect<void, ProviderSetupError>,22+ ) => Effect.Effect<ProviderAuthState, ProviderSetupError>;23+ readonly subscribe: (ownerSessionId: string) => Stream.Stream<ProviderAuthState>;24+ readonly isLogoutPrompt?: (text: string, hasAttachments: boolean) => boolean;25+}26+27+interface ProviderAuthTarget {28+ readonly instanceId: ProviderInstanceId;29+}30+31+export interface ProviderAuthServiceShape {apps/server/src/provider/antigravityCallback.ts line 1OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +1 @@1+// @effect-diagnostics nodeBuiltinImport:off
- @@ -0,0 +406,21 @@406+ // the deadline.407+ const forwarding = yield* (408+ options.forwardCallback?.(callback) ??409+ forwardAntigravityCallback(options.instanceId, callback)410+ ).pipe(411+ // stopFlow interrupts this fiber, so it runs from a sibling fiber.412+ Effect.tapError(() =>413+ stopFlow(flow, "failed", FORWARDING_FAILED_MESSAGE).pipe(414+ Effect.forkIn(instanceScope),415+ ),416+ ),417+ Effect.interruptible,418+ Effect.forkIn(instanceScope),419+ );420+ flow.forwarding = forwarding;421+ return { flow, forwarding };422+ }),423+ );424+ const forwarded = yield* Fiber.await(pending.forwarding);425+ if (Exit.isFailure(forwarded)) {426+ return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);apps/server/src/provider/Layers/AntigravityProvider.ts line 322Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +302,21 @@302+ const slashCommands = nativeCommands(commands);303+ const updatedAt = DateTime.formatIso(yield* DateTime.now);304+ yield* SubscriptionRef.update(metadata, (state) => {305+ if (state.draft.auth.status === "unauthenticated") return state;306+ return {307+ ...state,308+ draft: {309+ ...state.draft,310+ slashCommands,311+ ...(cwd312+ ? {313+ workspaceSnapshots: [314+ ...(state.draft.workspaceSnapshots ?? []).filter((entry) => entry.cwd !== cwd),315+ {316+ cwd,317+ checkedAt: updatedAt,318+ slashCommands,319+ skills:320+ state.draft.workspaceSnapshots?.find((entry) => entry.cwd === cwd)?.skills ??321+ discoveredSkills.get(cwd) ??322+ [],
t3dotgg(GitHub profile, opens in a new tab) added labelspreview:mac
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.








Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
4b26132· PR result:3c5d703· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.