The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 13:15 UTC
feat(antigravity): Claude and GPT models, thinking levels, and diff edits (#26876)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 29, 2026 at 03:10 UTC
4432fbef71817c279290f86549be660af25005f2
18 files changed
+298
-149
apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts
+25
-55
@@ -127,7 +127,7 @@ const layerSession = Layer.mergeAll(
127
);
128
129
describe("AntigravityAdapterV2 client file system", () => {
130
- it.effect("confines agent file requests to the workspace under full access", () =>
130
+ it.effect("serves confined reads and leaves edits to the agent's diff tools", () =>
131
Effect.gen(function* () {
132
const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
133
const fileSystem = yield* FileSystem.FileSystem;
@@ -140,6 +140,8 @@ describe("AntigravityAdapterV2 client file system", () => {
140
// effect-acp keeps the last handler registered per method; so does this.
141
let readTextFile: Parameters<RuntimeService["handleReadTextFile"]>[0] | undefined;
142
let writeTextFile: Parameters<RuntimeService["handleWriteTextFile"]>[0] | undefined;
143
+ const logs = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-antigravity-log-" });
144
+ const requestLog = path.join(logs, "requests.ndjson");
145
const crypto = yield* Crypto.Crypto;
146
const instanceId = ProviderInstanceId.make("antigravity-containment-test");
147
const adapter = yield* makeAntigravityAdapterV2({
@@ -153,7 +155,7 @@ describe("AntigravityAdapterV2 client file system", () => {
155
command: process.execPath,
156
args: [mockAgentPath],
157
cwd: input.cwd,
156
- env: { T3_ACP_ANTIGRAVITY: "1" },
158
+ env: { T3_ACP_ANTIGRAVITY: "1", T3_ACP_REQUEST_LOG_PATH: requestLog },
159
},
160
}).pipe(
161
Effect.provideService(Crypto.Crypto, crypto),
@@ -198,17 +200,31 @@ describe("AntigravityAdapterV2 client file system", () => {
200
runtimePolicy,
201
});
202
yield* session.ensureThread({ threadId, modelSelection, runtimePolicy });
201
- if (readTextFile === undefined || writeTextFile === undefined) {
202
- return yield* Effect.die("Antigravity sessions must serve client file requests");
203
+ const initialize = (yield* fileSystem.readFileString(requestLog))
204
+ .trim()
205
+ .split("\n")
206
+ .map(
207
+ (line) =>
208
+ JSON.parse(line) as {
209
+ method?: string;
210
+ params?: { clientCapabilities?: { fs?: unknown }; clientInfo?: { name?: string } };
211
+ },
212
+ )
213
+ .find((request) => request.method === "initialize");
214
+ assert.deepEqual(initialize?.params?.clientCapabilities?.fs, {
215
+ readTextFile: true,
216
+ writeTextFile: false,
217
+ });
218
+ assert.equal(initialize?.params?.clientInfo?.name, "zed");
219
+ assert.isUndefined(writeTextFile);
220
+ if (readTextFile === undefined) {
221
+ return yield* Effect.die("Antigravity sessions must serve client file reads");
222
}
223
const context = (method: string) => ({ requestId: `test-${method}`, method });
224
225
const insidePath = path.join(workspace, "src", "inside.ts");
207
- yield* writeTextFile(
208
- { sessionId: "mock-session-1", path: insidePath, content: "inside" },
209
- context("fs/write_text_file"),
210
- );
211
- assert.equal(yield* fileSystem.readFileString(insidePath), "inside");
226
+ yield* fileSystem.makeDirectory(path.dirname(insidePath), { recursive: true });
227
+ yield* fileSystem.writeFileString(insidePath, "inside");
228
const pasted = yield* readTextFile(
229
{ sessionId: "mock-session-1", path: attachment },
230
context("fs/read_text_file"),
@@ -220,13 +236,6 @@ describe("AntigravityAdapterV2 client file system", () => {
236
context("fs/read_text_file"),
237
).pipe(Effect.exit);
238
assert.isTrue(Exit.isFailure(outsideRead));
223
- const outsideWrite = yield* writeTextFile(
224
- { sessionId: "mock-session-1", path: path.join(outside, "planted.txt"), content: "x" },
225
- context("fs/write_text_file"),
226
- ).pipe(Effect.exit);
227
- assert.isTrue(Exit.isFailure(outsideWrite));
228
- assert.isFalse(yield* fileSystem.exists(path.join(outside, "planted.txt")));
229
-
239
const linkPath = path.join(workspace, "linked-secret.txt");
240
yield* fileSystem.symlink(outsideFile, linkPath);
241
const linkedRead = yield* readTextFile(
@@ -234,45 +243,6 @@ describe("AntigravityAdapterV2 client file system", () => {
243
context("fs/read_text_file"),
244
).pipe(Effect.exit);
245
assert.isTrue(Exit.isFailure(linkedRead), "a read through an escaping symlink is denied");
237
- const linkedWrite = yield* writeTextFile(
238
- { sessionId: "mock-session-1", path: linkPath, content: "overwritten" },
239
- context("fs/write_text_file"),
240
- ).pipe(Effect.exit);
241
- assert.isTrue(Exit.isFailure(linkedWrite), "a write through an escaping symlink is denied");
242
- assert.equal(yield* fileSystem.readFileString(outsideFile), "secret");
243
- const plantedTarget = path.join(outside, "created-through-link.txt");
244
- const danglingLink = path.join(workspace, "dangling.txt");
245
- yield* fileSystem.symlink(plantedTarget, danglingLink);
246
- const danglingWrite = yield* writeTextFile(
247
- { sessionId: "mock-session-1", path: danglingLink, content: "planted" },
248
- context("fs/write_text_file"),
249
- ).pipe(Effect.exit);
250
- assert.isTrue(Exit.isFailure(danglingWrite), "a write through a dangling symlink is denied");
251
- assert.isFalse(yield* fileSystem.exists(plantedTarget));
252
- yield* fileSystem.symlink(outside, path.join(workspace, "linked-dir"));
253
- const linkedDirWrite = yield* writeTextFile(
254
- {
255
- sessionId: "mock-session-1",
256
- path: path.join(workspace, "linked-dir", "new.txt"),
257
- content: "planted",
258
- },
259
- context("fs/write_text_file"),
260
- ).pipe(Effect.exit);
261
- assert.isTrue(Exit.isFailure(linkedDirWrite), "a write under an escaping directory link");
262
- assert.isFalse(yield* fileSystem.exists(path.join(outside, "new.txt")));
263
- const nestedLinkedDirWrite = yield* writeTextFile(
264
- {
265
- sessionId: "mock-session-1",
266
- path: path.join(workspace, "linked-dir", "a", "b", "file.txt"),
267
- content: "planted",
268
- },
269
- context("fs/write_text_file"),
270
- ).pipe(Effect.exit);
271
- assert.isTrue(
272
- Exit.isFailure(nestedLinkedDirWrite),
273
- "a write to missing directories under an escaping directory link",
274
- );
275
- assert.isFalse(yield* fileSystem.exists(path.join(outside, "a")));
246
const insideLink = path.join(workspace, "inside-link.ts");
247
yield* fileSystem.symlink(insidePath, insideLink);
248
const viaInsideLink = yield* readTextFile(
apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts
+3
-13
@@ -23,10 +23,7 @@ import {
23
buildAntigravityPrompt,
24
type AntigravityAcpRuntimeInput,
25
} from "../../provider/acp/AntigravityAcpSupport.ts";
26
-import {
27
- readAntigravityClientTextFile,
28
- writeAntigravityClientTextFile,
29
-} from "../../provider/acp/AntigravityClientFiles.ts";
26
+import { readAntigravityClientTextFile } from "../../provider/acp/AntigravityClientFiles.ts";
27
import {
28
antigravityApprovalOptions,
29
antigravitySubagentOutput,
@@ -82,7 +79,7 @@ export interface AntigravityAdapterV2Options {
79
readonly continuationRequests?: Parameters<typeof makeAcpAdapterV2>[0]["continuationRequests"];
80
}
81
85
-/** ACP 1.1.1 reports `start_subagent` tools without child session ids. */
82
+/** Native subagent tools report no child session ids. */
83
const extractAntigravitySubagentUpdate: NonNullable<AcpAdapterV2Flavor["extractSubagentUpdate"]> = (
84
toolCall,
85
) => {
@@ -126,7 +123,7 @@ export function makeAntigravityAcpAdapterFlavor(
123
Scope.close(scope, Exit.void),
124
options.makeRuntime({
125
...input,
129
- clientFileSystem: true,
126
+ clientFileReads: true,
127
additionalDirectories: [options.host.paths.attachmentsDir],
128
}),
129
)
@@ -191,13 +188,6 @@ export function makeAntigravityAcpAdapterFlavor(
188
allowedRoots: antigravityClientFileRoots(cwd),
189
request,
190
}),
194
- writeTextFile: (request, cwd) =>
195
- writeAntigravityClientTextFile({
196
- fileSystem: options.fileSystem,
197
- path: options.path,
198
- allowedRoots: antigravityClientFileRoots(cwd),
199
- request,
200
- }),
191
},
192
approvalOptions: antigravityApprovalOptions,
193
extractPermissionQuestion: (request) => {
apps/server/src/provider/AntigravityInstallation.ts
-1
@@ -398,7 +398,6 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma
398
}),
399
)
400
: spawner,
401
- clientInfo: { name: "t3-code", version: "0.0.0" },
401
});
402
const initialized = yield* runtime.initialize();
403
if (
apps/server/src/provider/AntigravityProvider.test.ts
+44
@@ -214,6 +214,50 @@ describe("Antigravity model catalog", () => {
214
"gemini-pro-agent",
215
);
216
});
217
+
218
+ it("offers each model the thinking levels it reported when selected", () => {
219
+ const thinking = (currentValue: string) =>
220
+ ({
221
+ id: "thinking_level",
222
+ name: "Thinking Level",
223
+ category: "thought_level",
224
+ type: "select",
225
+ currentValue,
226
+ options: [
227
+ { value: "low", name: "Low" },
228
+ { value: "high", name: "High" },
229
+ ],
230
+ }) satisfies EffectAcpSchema.SessionConfigOption;
231
+ const models = buildAntigravityModelsFromSession(
232
+ {
233
+ configOptions: [
234
+ {
235
+ ...modelConfig,
236
+ currentValue: "gemini",
237
+ options: [
238
+ { value: "gemini", name: "Gemini" },
239
+ { value: "claude", name: "Claude" },
240
+ { value: "plain", name: "Plain" },
241
+ { value: "unseen", name: "Unseen" },
242
+ ],
243
+ },
244
+ thinking("high"),
245
+ ],
246
+ },
247
+ new Map([
248
+ ["claude", thinking("low")],
249
+ ["plain", null],
250
+ ]),
251
+ );
252
+ const thinkingOf = (slug: string) =>
253
+ models.find((model) => model.slug === slug)?.capabilities?.optionDescriptors?.[0];
254
+
255
+ expect(thinkingOf("gemini")).toMatchObject({ id: "thinking_level", currentValue: "high" });
256
+ expect(thinkingOf("claude")).toMatchObject({ id: "thinking_level", currentValue: "low" });
257
+ expect(thinkingOf("plain")).toBeUndefined();
258
+ expect(thinkingOf("unseen")).toMatchObject({ id: "thinking_level" });
259
+ expect(thinkingOf("unseen")).not.toHaveProperty("currentValue");
260
+ });
261
});
262
263
it.layer(layerTest)("Antigravity provider snapshots", (it) => {
apps/server/src/provider/AntigravityProvider.ts
+42
-3
@@ -20,6 +20,7 @@ import type * as EffectAcpErrors from "effect-acp/errors";
20
import type * as EffectAcpSchema from "effect-acp/compat";
21
22
import type * as AcpSessionRuntime from "@t3tools/provider-acp/server/AcpSessionRuntime";
23
+import { acpProviderOptionDescriptors } from "@t3tools/provider-acp/server/sessionConfig";
24
import { makeManagedServerProvider } from "@t3tools/provider-core/server/managedProvider";
25
import {
26
makeManualOnlyProviderMaintenanceCapabilities,
@@ -32,6 +33,8 @@ import {
33
} from "@t3tools/provider-core/server/snapshotProbe";
34
import { resolveUsageLimitsAfterProbe } from "@t3tools/provider-core/server/usageLimits";
35
36
+import { antigravityThinkingConfig } from "./acp/AntigravityAcpSupport.ts";
37
+
38
const EMPTY_MODEL_CAPABILITIES = createModelCapabilities({ optionDescriptors: [] });
39
const MAX_WORKSPACE_SNAPSHOTS = 32;
40
const HEALTH_CHECK_TIMEOUT = "90 seconds";
@@ -44,8 +47,24 @@ type SessionSetupResult = Pick<
47
"configOptions" | "models"
48
>;
49
50
+type ThinkingConfig = NonNullable<ReturnType<typeof antigravityThinkingConfig>>;
51
+
52
+/** Thinking options each model reported when selected; `null` means it has none. */
53
+export type AntigravityThinkingLevels = ReadonlyMap<string, ThinkingConfig | null>;
54
+
55
+function thinkingCapabilities(config: ThinkingConfig | null | undefined, observed: boolean) {
56
+ const descriptor = config
57
+ ? acpProviderOptionDescriptors({ configOptions: [config], modeState: undefined })[0]
58
+ : undefined;
59
+ if (descriptor?.type !== "select") return EMPTY_MODEL_CAPABILITIES;
60
+ // Another model's selected level is not this model's default.
61
+ const { currentValue: _currentValue, ...unobserved } = descriptor;
62
+ return createModelCapabilities({ optionDescriptors: [observed ? descriptor : unobserved] });
63
+}
64
+
65
export function buildAntigravityModelsFromSession(
66
setup: SessionSetupResult,
67
+ thinkingLevels: AntigravityThinkingLevels = new Map(),
68
): ReadonlyArray<ServerProviderModel> {
69
const config = setup.configOptions?.find(
70
(option) => option.id === "model" || option.category === "model",
@@ -61,10 +80,13 @@ export function buildAntigravityModelsFromSession(
80
name: model.name,
81
})) ?? [])
82
: [];
83
+ const currentThinking = antigravityThinkingConfig(setup.configOptions);
84
const seen = new Set<string>();
85
return entries.flatMap((entry): ServerProviderModel[] => {
86
if (!entry.value.trim() || seen.has(entry.value)) return [];
87
seen.add(entry.value);
88
+ const observed =
89
+ entry.value === currentValue ? (currentThinking ?? null) : thinkingLevels.get(entry.value);
90
return [
91
{
92
slug: entry.value,
@@ -73,7 +95,10 @@ export function buildAntigravityModelsFromSession(
95
...(entry.value === currentValue
96
? { isDefault: true, aliases: [ANTIGRAVITY_DEFAULT_MODEL] }
97
: {}),
76
- capabilities: EMPTY_MODEL_CAPABILITIES,
98
+ capabilities:
99
+ observed === undefined
100
+ ? thinkingCapabilities(currentThinking, false)
101
+ : thinkingCapabilities(observed, true),
102
},
103
];
104
});
@@ -162,6 +187,17 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
187
});
188
// Preserve disk-discovered skills when callbacks replace workspace commands; the registry will not rescan them.
189
const discoveredSkills = new Map<string, ServerProvider["skills"]>();
190
+ const thinkingLevels = new Map<string, ThinkingConfig | null>();
191
+ const observeThinkingLevels = (
192
+ configOptions: ReadonlyArray<EffectAcpSchema.SessionConfigOption> | null | undefined,
193
+ ) => {
194
+ const model = configOptions?.find(
195
+ (option) => option.id === "model" || option.category === "model",
196
+ );
197
+ if (model?.type === "select" && model.currentValue) {
198
+ thinkingLevels.set(model.currentValue, antigravityThinkingConfig(configOptions) ?? null);
199
+ }
200
+ };
201
const getSnapshot = SubscriptionRef.get(metadata).pipe(
202
Effect.flatMap((state) => options.stampIdentity(state.draft)),
203
);
@@ -267,6 +303,7 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
303
cwd?: string,
304
) {
305
if (!settings.enabled) return;
306
+ observeThinkingLevels(started.sessionSetupResult.configOptions);
307
const before = yield* SubscriptionRef.get(metadata);
308
const supportsTextGeneration = yield* options.supportsTextGeneration;
309
const usageLimits =
@@ -301,7 +338,7 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
338
published: draft.usageLimits,
339
probed: usageLimits ?? draft.usageLimits,
340
}),
304
- models: buildAntigravityModelsFromSession(started.sessionSetupResult),
341
+ models: buildAntigravityModelsFromSession(started.sessionSetupResult, thinkingLevels),
342
supportsTextGeneration,
343
...(cwd
344
? {
@@ -324,7 +361,8 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
361
const onConfigOptionsUpdated = Effect.fn("AntigravityProvider.onConfigOptionsUpdated")(function* (
362
configOptions: ReadonlyArray<EffectAcpSchema.SessionConfigOption>,
363
) {
327
- const models = buildAntigravityModelsFromSession({ configOptions });
364
+ observeThinkingLevels(configOptions);
365
+ const models = buildAntigravityModelsFromSession({ configOptions }, thinkingLevels);
366
yield* SubscriptionRef.update(metadata, (state) => {
367
if (state.draft.auth.status !== "authenticated") return state;
368
return { ...state, draft: { ...state.draft, models } };
@@ -391,6 +429,7 @@ export const makeAntigravityProvider = Effect.fn("makeAntigravityProvider")(func
429
}) satisfies AntigravityProviderState,
430
);
431
discoveredSkills.clear();
432
+ thinkingLevels.clear();
433
});
434
435
const snapshotForCwd = Effect.fn("AntigravityProvider.snapshotForCwd")(function* (
apps/server/src/provider/Drivers/AntigravityDriver.ts
+14
-3
@@ -38,6 +38,8 @@ import {
38
type AntigravityAuthConfig,
39
} from "../antigravityAuthSupport.ts";
40
import {
41
+ antigravityModelOptions,
42
+ antigravityThinkingConfig,
43
makeAntigravityAcpRuntime,
44
type AntigravityAcpRuntimeInput,
45
} from "../acp/AntigravityAcpSupport.ts";
@@ -294,7 +296,6 @@ export const AntigravityDriver: ProviderDriver<
296
);
297
const runtime = yield* makeRuntime({
298
cwd,
297
- clientInfo: { name: "t3-code-provider-setup", version: "0.0.0" },
299
mcpServers: [],
300
...(input.onAuthorizationUrl ? { onAuthorizationUrl: input.onAuthorizationUrl } : {}),
301
});
@@ -313,7 +314,10 @@ export const AntigravityDriver: ProviderDriver<
314
315
const publishCatalog = Effect.fn("AntigravityDriver.publishCatalog")(function* (
316
started: AcpSessionRuntime.AcpSessionRuntimeStartResult,
316
- runtime: Pick<AcpSessionRuntime.AcpSessionRuntime["Service"], "getEvents" | "drainEvents">,
317
+ runtime: Pick<
318
+ AcpSessionRuntime.AcpSessionRuntime["Service"],
319
+ "getEvents" | "drainEvents" | "setModel"
320
+ >,
321
) {
322
yield* provider.onSessionStarted(started);
323
yield* Stream.runForEach(runtime.getEvents(), (event) => {
@@ -327,6 +331,14 @@ export const AntigravityDriver: ProviderDriver<
331
? provider.onAvailableCommands(event.availableCommands)
332
: Effect.void;
333
}).pipe(Effect.forkScoped);
334
+ // Thinking levels differ per model and are reported only for the selected one.
335
+ const configOptions = started.sessionSetupResult.configOptions ?? [];
336
+ const current = configOptions.find((option) => option.id === "model")?.currentValue;
337
+ if (antigravityThinkingConfig(configOptions) !== undefined && typeof current === "string") {
338
+ for (const model of [...antigravityModelOptions(configOptions), { value: current }]) {
339
+ yield* runtime.setModel(model.value).pipe(Effect.ignore);
340
+ }
341
+ }
342
yield* runtime.drainEvents;
343
}, Effect.scoped);
344
@@ -439,7 +451,6 @@ export const AntigravityDriver: ProviderDriver<
451
makeRuntime: (cwd) =>
452
makeRuntime({
453
cwd,
442
- clientInfo: { name: "t3-code-text", version: "0.0.0" },
454
mcpServers: [],
455
}),
456
});
apps/server/src/provider/acp/AntigravityAcpSupport.test.ts
+35
-1
@@ -38,8 +38,18 @@ function makeModelRuntime(
38
if (failure) return yield* failure;
39
selections.push(model);
40
});
41
+ const setConfigOption = Effect.fn("AntigravityAcpSupportTest.setConfigOption")(function* (
42
+ configId: string,
43
+ value: string | boolean,
44
+ options?: { readonly allowUnlistedValue?: boolean },
45
+ ) {
46
+ selections.push(
47
+ `${configId}=${String(value)}${options?.allowUnlistedValue === true ? " (unlisted)" : ""}`,
48
+ );
49
+ return { configOptions };
50
+ });
51
return {
42
- runtime: { getConfigOptions: Effect.succeed(configOptions), setModel },
52
+ runtime: { getConfigOptions: Effect.succeed(configOptions), setModel, setConfigOption },
53
selections,
54
};
55
}
@@ -137,6 +147,30 @@ describe("applyAntigravityAcpModelSelection", () => {
147
expect(selections).toEqual(["gemini-saved"]);
148
}),
149
);
150
+
151
+ it.effect("passes a model ID saved on runtime 1.3 to the agent as its 1.4 family", () =>
152
+ Effect.gen(function* () {
153
+ // The cold-resume model has no thinking option, so the level is unknown locally.
154
+ const { runtime, selections } = makeModelRuntime([
155
+ {
156
+ ...modelConfig,
157
+ currentValue: "gpt-oss-120b-medium",
158
+ options: [
159
+ { value: "gemini-3.8-flash", name: "Gemini 3.8 Flash" },
160
+ { value: "gpt-oss-120b-medium", name: "GPT-OSS 120B (Medium)" },
161
+ ],
162
+ },
163
+ ]);
164
+ const model = yield* applyAntigravityAcpModelSelection({
165
+ runtime,
166
+ model: "gemini-3.8-flash-low",
167
+ mapError: (cause) => cause,
168
+ });
169
+
170
+ expect(model).toBe("gemini-3.8-flash");
171
+ expect(selections).toEqual(["model=gemini-3.8-flash-low (unlisted)"]);
172
+ }),
173
+ );
174
});
175
176
const imageAttachment = {
apps/server/src/provider/acp/AntigravityAcpSupport.ts
+42
-8
@@ -31,6 +31,7 @@ export interface AntigravityAcpRuntimeInput extends Omit<
31
| "authenticateEagerly"
32
| "cancelBehavior"
33
| "clientCapabilities"
34
+ | "clientInfo"
35
| "onStderr"
36
| "resumeMethod"
37
| "transformSessionUpdate"
@@ -38,7 +39,7 @@ export interface AntigravityAcpRuntimeInput extends Omit<
39
> {
40
readonly childProcessSpawner: ChildProcessSpawner.ChildProcessSpawner["Service"];
41
readonly onAuthorizationUrl?: (url: string) => Effect.Effect<void, EffectAcpErrors.AcpError>;
41
- readonly clientFileSystem?: boolean;
42
+ readonly clientFileReads?: boolean;
43
readonly authMethod?: AntigravityAuthMethod;
44
}
45
@@ -56,11 +57,11 @@ export const makeAntigravityAcpRuntime = Effect.fn("makeAntigravityAcpRuntime")(
57
authenticateEagerly: true,
58
resumeMethod: "resume",
59
cancelBehavior: "wait-for-prompt",
60
+ // The agent offers non-Gemini models only to allowlisted clients such as Zed.
61
+ clientInfo: { name: "zed", version: "0.0.0" },
62
clientCapabilities: {
60
- fs: {
61
- readTextFile: input.clientFileSystem === true,
62
- writeTextFile: input.clientFileSystem === true,
63
- },
63
+ // Advertising writes swaps the agent's diff edits for whole-file client_edit_file.
64
+ fs: { readTextFile: input.clientFileReads === true, writeTextFile: false },
65
terminal: false,
66
},
67
transformStdout: makeAntigravityStdoutTransform(
@@ -91,7 +92,7 @@ export function antigravityPermissionMode(runtimeMode: RuntimeMode): string {
92
}
93
}
94
94
-function antigravityModelOptions(
95
+export function antigravityModelOptions(
96
configOptions: ReadonlyArray<EffectAcpSchema.SessionConfigOption>,
97
) {
98
const model = configOptions.find((option) => option.id === "model");
@@ -99,6 +100,28 @@ function antigravityModelOptions(
100
return model.options.flatMap((entry) => ("value" in entry ? [entry] : entry.options));
101
}
102
103
+/** Runtime 1.4 reports thinking as its own option; 1.3 encoded it in the model ID. */
104
+export function antigravityThinkingConfig(
105
+ configOptions: ReadonlyArray<EffectAcpSchema.SessionConfigOption> | null | undefined,
106
+) {
107
+ const option = configOptions?.find((candidate) => candidate.category === "thought_level");
108
+ return option?.type === "select" ? option : undefined;
109
+}
110
+
111
+/**
112
+ * Runtime 1.4 lists `gemini-3.8-flash` where 1.3 listed `gemini-3.8-flash-high`. The agent
113
+ * still accepts the old IDs, so pass them through; the current model may have no thinking option.
114
+ */
115
+function legacyAntigravityFamily(
116
+ configOptions: ReadonlyArray<EffectAcpSchema.SessionConfigOption>,
117
+ model: string,
118
+) {
119
+ return antigravityModelOptions(configOptions)
120
+ .map((option) => option.value)
121
+ .filter((family) => model.startsWith(`${family}-`))
122
+ .toSorted((left, right) => right.length - left.length)[0];
123
+}
124
+
125
function resolveAntigravityModel(input: {
126
readonly configOptions: ReadonlyArray<EffectAcpSchema.SessionConfigOption>;
127
readonly model: string | null | undefined;
@@ -108,7 +131,9 @@ function resolveAntigravityModel(input: {
131
const current = modelConfig?.type === "select" ? modelConfig.currentValue : undefined;
132
if (input.model && input.model !== ANTIGRAVITY_DEFAULT_MODEL) return input.model;
133
const options = antigravityModelOptions(input.configOptions);
111
- return input.defaultModel && options.some((option) => option.value === input.defaultModel)
134
+ return input.defaultModel &&
135
+ (options.some((option) => option.value === input.defaultModel) ||
136
+ legacyAntigravityFamily(input.configOptions, input.defaultModel) !== undefined)
137
? input.defaultModel
138
: current;
139
}
@@ -118,7 +143,7 @@ export const applyAntigravityAcpModelSelection = Effect.fn("applyAntigravityAcpM
143
function* <E>(input: {
144
readonly runtime: Pick<
145
AcpSessionRuntime.AcpSessionRuntime["Service"],
121
- "getConfigOptions" | "setModel"
146
+ "getConfigOptions" | "setModel" | "setConfigOption"
147
>;
148
readonly model: string | null | undefined;
149
readonly defaultModel?: string | undefined;
@@ -135,6 +160,15 @@ export const applyAntigravityAcpModelSelection = Effect.fn("applyAntigravityAcpM
160
const explicit = Boolean(input.model) && input.model !== ANTIGRAVITY_DEFAULT_MODEL;
161
if (resolved === undefined || (!explicit && resolved === current)) return current;
162
const options = antigravityModelOptions(configOptions);
163
+ const legacyFamily = options.some((option) => option.value === resolved)
164
+ ? undefined
165
+ : legacyAntigravityFamily(configOptions, resolved);
166
+ if (legacyFamily !== undefined) {
167
+ yield* input.runtime
168
+ .setConfigOption("model", resolved, { allowUnlistedValue: true })
169
+ .pipe(Effect.mapError(input.mapError));
170
+ return legacyFamily;
171
+ }
172
if (!options.some((option) => option.value === resolved)) {
173
return yield* Effect.fail(
174
input.mapError(
apps/server/src/provider/acp/AntigravityClientFiles.ts
-19
@@ -5,7 +5,6 @@ import type * as Path from "effect/Path";
5
import * as EffectAcpErrors from "effect-acp/errors";
6
import type * as EffectAcpSchema from "effect-acp/compat";
7
8
-/** The agent requests permission for every write; check only path containment here. */
8
const CLIENT_FILE_MAX_BYTES = 8 * 1024 * 1024;
9
10
function isInsideRoot(path: Path.Path, root: string, candidate: string): boolean {
@@ -98,21 +97,3 @@ export const readAntigravityClientTextFile = Effect.fn("AntigravityClientFiles.r
97
return { content: lines.slice(start, end).join("\n") };
98
},
99
);
101
-
102
-export const writeAntigravityClientTextFile = Effect.fn("AntigravityClientFiles.writeTextFile")(
103
- function* (input: {
104
- readonly fileSystem: FileSystem.FileSystem;
105
- readonly path: Path.Path;
106
- readonly allowedRoots: ReadonlyArray<string>;
107
- readonly request: EffectAcpSchema.WriteTextFileRequest;
108
- }): Effect.fn.Return<EffectAcpSchema.WriteTextFileResponse, EffectAcpErrors.AcpError> {
109
- const filePath = yield* resolveClientFilePath({ ...input, requestPath: input.request.path });
110
- yield* input.fileSystem.makeDirectory(input.path.dirname(filePath), { recursive: true }).pipe(
111
- Effect.andThen(input.fileSystem.writeFileString(filePath, input.request.content)),
112
- Effect.mapError(() =>
113
- EffectAcpErrors.AcpRequestError.internalError(`Could not write '${input.request.path}'.`),
114
- ),
115
- );
116
- return {};
117
- },
118
-);
apps/server/src/provider/acp/AntigravityProtocol.test.ts
+6
-1
@@ -24,7 +24,12 @@ const isSessionNotification = Schema.is(AcpWireSchema.SessionNotification);
24
describe("native Antigravity subagent tools", () => {
25
it("recognizes only native invocation titles and excludes MCP tools", () => {
26
const toolCall = { toolCallId: "trajectory:4", kind: "other", data: {} };
27
- for (const title of ["Running start_subagent", "Run start_subagent?"]) {
27
+ for (const title of [
28
+ "Running start_subagent",
29
+ "Run start_subagent?",
30
+ "Running invoke_subagent",
31
+ "Run invoke_subagent?",
32
+ ]) {
33
expect(classifyAntigravitySubagentToolCall({ ...toolCall, title }, {})).toBe("subagent");
34
expect(
35
classifyAntigravitySubagentToolCall(
apps/server/src/provider/acp/AntigravityProtocol.ts
+10
-2
@@ -324,14 +324,22 @@ export function normalizeAntigravityToolCall(toolCall: AcpToolCallState): AcpToo
324
};
325
}
326
327
-/** ACP 1.1.1 reports subagent calls as ordinary tools without child IDs or models. */
327
+const ANTIGRAVITY_SUBAGENT_TITLES = new Set([
328
+ "Running start_subagent",
329
+ "Run start_subagent?",
330
+ "Running invoke_subagent",
331
+ "Run invoke_subagent?",
332
+]);
333
+
334
+/** The ACP agent reports subagent calls as ordinary tools without child IDs or models. */
335
export function classifyAntigravitySubagentToolCall(
336
toolCall: AcpToolCallState,
337
rawPayload?: unknown,
338
): "subagent" | "mcp" | undefined {
339
if (
340
(toolCall.kind !== undefined && toolCall.kind !== "other") ||
334
- (toolCall.title !== "Running start_subagent" && toolCall.title !== "Run start_subagent?")
341
+ toolCall.title === undefined ||
342
+ !ANTIGRAVITY_SUBAGENT_TITLES.has(toolCall.title)
343
)
344
return undefined;
345
const update = Predicate.isObject(rawPayload) ? rawPayload.update : undefined;
apps/server/src/provider/antigravityRelease.ts
+32
-31
@@ -1,4 +1,5 @@
1
-const ANTIGRAVITY_RELEASE_VERSION = "1.3.0";
1
+// 1.4.2 through 1.4.4 write skills/system/run-workflow/SKILL.md into every session workspace.
2
+const ANTIGRAVITY_RELEASE_VERSION = "1.4.1";
3
4
export interface AntigravityReleaseAsset {
5
readonly version: string;
@@ -20,66 +21,66 @@ const releaseAssets = new Map<string, AntigravityReleaseAsset>([
21
"darwin-arm64",
22
{
23
version: ANTIGRAVITY_RELEASE_VERSION,
23
- url: "https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.3.0-darwin-arm64.zip",
24
- sha256: "7cd97045f7b4fe81175a107cdf16f9c51484e3c78a5162cae415338bb6aa5b88",
25
- archiveBytes: 111_456_962,
26
- executable: { name: "agy_acp_server.par", bytes: 278_535_456 },
27
- harness: { name: "localharness_external", bytes: 118_611_392 },
24
+ url: "https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.4.1-darwin-arm64.zip",
25
+ sha256: "f9bdd68291ae78c38d2141e63bc86b84e6cc7b9f60f71652c68435a7943deb17",
26
+ archiveBytes: 112_737_434,
27
+ executable: { name: "agy_acp_server.par", bytes: 280_996_576 },
28
+ harness: { name: "localharness_external", bytes: 120_246_928 },
29
},
30
],
31
[
32
"darwin-x64",
33
{
34
version: ANTIGRAVITY_RELEASE_VERSION,
34
- url: "https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.3.0-darwin-x86_64.zip",
35
- sha256: "bb23956b89984bf5d354af2c3725e6c57f0cc1b7228e77a0e91c9c2bc1d47646",
36
- archiveBytes: 117_245_544,
37
- executable: { name: "agy_acp_server.par", bytes: 282_840_688 },
38
- harness: { name: "localharness_external", bytes: 124_175_392 },
35
+ url: "https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.4.1-darwin-x86_64.zip",
36
+ sha256: "27e31f096874704f14167b07ef9e84cc77134615ee41d024f7b1c957add85307",
37
+ archiveBytes: 118_349_036,
38
+ executable: { name: "agy_acp_server.par", bytes: 285_186_624 },
39
+ harness: { name: "localharness_external", bytes: 124_910_048 },
40
},
41
],
42
[
43
"linux-x64",
44
{
45
version: ANTIGRAVITY_RELEASE_VERSION,
45
- url: "https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.3.0-linux-x86_64.zip",
46
- sha256: "9fb60956af0a9d76220a4db91ca9ac88e2a2372ad68f985ab5fceace6b825b96",
47
- archiveBytes: 333_727_150,
48
- executable: { name: "agy_acp_server.par", bytes: 926_533_965 },
49
- harness: { name: "localharness_external", bytes: 130_388_040 },
46
+ url: "https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.4.1-linux-x86_64.zip",
47
+ sha256: "2e37012ceb2a5c7fc7309b6e6596234fb637ee3c62a5199f65d4cbe777871384",
48
+ archiveBytes: 336_170_339,
49
+ executable: { name: "agy_acp_server.par", bytes: 930_826_753 },
50
+ harness: { name: "localharness_external", bytes: 131_187_512 },
51
},
52
],
53
[
54
"linux-arm64",
55
{
56
version: ANTIGRAVITY_RELEASE_VERSION,
56
- url: "https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.3.0-linux-arm64.zip",
57
- sha256: "500b0bc0fb858e88f4df404d4cedf80bf9298c178291e39e383d6c50b111cbdf",
58
- archiveBytes: 321_690_363,
59
- executable: { name: "agy_acp_server.par", bytes: 930_848_992 },
60
- harness: { name: "localharness_external", bytes: 123_224_968 },
57
+ url: "https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.4.1-linux-arm64.zip",
58
+ sha256: "609336a1c97545487e3ddd55dbd153dc0f40f4e6534486cc1c5f4c0ebb85c2da",
59
+ archiveBytes: 321_922_507,
60
+ executable: { name: "agy_acp_server.par", bytes: 933_416_796 },
61
+ harness: { name: "localharness_external", bytes: 124_895_000 },
62
},
63
],
64
[
65
"win32-x64",
66
{
67
version: ANTIGRAVITY_RELEASE_VERSION,
67
- url: "https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.3.0-windows-x86_64.zip",
68
- sha256: "65215e0688681fa3116e048a9eab27ef53af1bbd6f3da3f1c52bd4911d8b17f9",
69
- archiveBytes: 124_509_787,
70
- executable: { name: "agy_acp_server.exe", bytes: 81_437_336 },
71
- harness: { name: "localharness_external.exe", bytes: 145_548_952 },
68
+ url: "https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.4.1-windows-x86_64.zip",
69
+ sha256: "5f5b7d0328df17c128b2be338d4567b0d24e56ace8196e88794fec37d1372554",
70
+ archiveBytes: 129_599_308,
71
+ executable: { name: "agy_acp_server.exe", bytes: 86_098_784 },
72
+ harness: { name: "localharness_external.exe", bytes: 146_036_888 },
73
},
74
],
75
[
76
"win32-arm64",
77
{
78
version: ANTIGRAVITY_RELEASE_VERSION,
78
- url: "https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.3.0-windows-arm64.zip",
79
- sha256: "4a0f469720e9beb9438a979f543fdbfad5022ebe0992c052c590bd78b3144ca3",
80
- archiveBytes: 124_654_803,
81
- executable: { name: "agy_acp_server.exe", bytes: 85_893_472 },
82
- harness: { name: "localharness_external.exe", bytes: 135_640_216 },
79
+ url: "https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.4.1-windows-arm64.zip",
80
+ sha256: "24c52bbc12aae20f55eb53d373669412d95a9c44fd59be4ea4e355918b91fbf7",
81
+ archiveBytes: 132_507_344,
82
+ executable: { name: "agy_acp_server.exe", bytes: 93_197_744 },
83
+ harness: { name: "localharness_external.exe", bytes: 136_970_904 },
84
},
85
],
86
]);
apps/server/src/provider/model-manifest.json
+6
-2
@@ -75,8 +75,12 @@
75
{
76
"driver": "antigravity",
77
"t3CodeRange": ">=0.0.42",
78
- "recommendedRange": "=1.1.1",
79
- "ranges": [{ "range": "=1.1.1", "status": "supported" }]
78
+ "recommendedRange": "=1.4.1",
79
+ "ranges": [
80
+ { "range": "=1.4.1", "status": "supported" },
81
+ { "range": "=1.3.0", "status": "supported" },
82
+ { "range": "=1.1.1", "status": "supported" }
83
+ ]
84
},
85
{
86
"driver": "pi",
apps/server/src/provider/providerCompatibility.test.ts
+18
@@ -21,7 +21,12 @@ import {
21
ProviderCompatibilityPolicy,
22
resolveProviderCompatibility,
23
} from "./providerCompatibility.ts";
24
+import { resolveAntigravityReleaseAsset } from "./antigravityRelease.ts";
25
+import bundledManifest from "./model-manifest.json" with { type: "json" };
26
27
+const decodeCompatibilityPolicies = Schema.decodeUnknownSync(
28
+ Schema.Array(ProviderCompatibilityPolicy),
29
+);
30
const driver = ProviderDriverKind.make("codex");
31
const policy: ProviderCompatibilityPolicy = {
32
driver,
@@ -127,6 +132,19 @@ describe("provider compatibility", () => {
132
}
133
});
134
135
+ it("supports the managed Antigravity runtime in the bundled manifest", () => {
136
+ const policies = decodeCompatibilityPolicies(bundledManifest.compatibility);
137
+ const release = resolveAntigravityReleaseAsset("darwin", "arm64");
138
+ assert.strictEqual(
139
+ resolveProviderCompatibility(
140
+ policies,
141
+ ProviderDriverKind.make("antigravity"),
142
+ `agy_acp_server_${release?.version}`,
143
+ )?.status,
144
+ "supported",
145
+ );
146
+ });
147
+
148
it("classifies boundaries and treats unlisted versions and release tags as unknown", () => {
149
for (const [version, expected] of [
150
["0.9.9", "broken"],
apps/server/src/textGeneration/AntigravityTextGeneration.test.ts
+1
@@ -170,6 +170,7 @@ const makeFixture = Effect.fn("makeAntigravityTextGenerationFixture")(function*
170
Effect.sync(() => {
171
state.selectedModels.push(model);
172
}),
173
+ setConfigOption: () => Effect.succeed({ configOptions: [] }),
174
prompt: (request) =>
175
Effect.gen(function* () {
176
state.prompts.push(request);
apps/server/src/textGeneration/AntigravityTextGeneration.ts
+1
@@ -31,6 +31,7 @@ type AntigravityTextRuntime = Pick<
31
| "getConfigOptions"
32
| "getEvents"
33
| "setModel"
34
+ | "setConfigOption"
35
| "prompt"
36
| "cancel"
37
| "handleSessionUpdate"
docs/user/providers-antigravity.md
+9
-3
@@ -68,9 +68,15 @@ Leave the field blank to use the managed runtime, or a compatible executable on
68
69
## Models and threads
70
71
-The model list comes from your Antigravity account and can differ from other
72
-Antigravity apps. A resumed thread keeps its selected model. If access to that
73
-model ends, select another available model before continuing.
71
+The model list comes from your Antigravity account, including Claude and GPT models
72
+when your plan has them. Pick a thinking level in the composer's effort menu; it
73
+shows only the levels the selected model supports. A resumed thread keeps its
74
+selected model. If access to that model ends, select another available model
75
+before continuing.
76
+
77
+Antigravity creates empty `.gemini/skills` and `.agents/skills` folders in the
78
+workspace when a session starts. Git does not track empty folders, so they never
79
+appear in commits.
80
81
Use Antigravity's native `/plan` command for planning. T3 Code's separate Plan mode
82
is unavailable. Tool approvals follow [Permission modes](./permission-modes.md).
packages/provider-acp/src/server/adapter.ts
+10
-7
@@ -288,7 +288,7 @@ export interface AcpAdapterV2Flavor {
288
request: EffectAcpSchema.ReadTextFileRequest,
289
cwd: string | null,
290
) => Effect.Effect<EffectAcpSchema.ReadTextFileResponse, EffectAcpErrors.AcpError>;
291
- readonly writeTextFile: (
291
+ readonly writeTextFile?: (
292
request: EffectAcpSchema.WriteTextFileRequest,
293
cwd: string | null,
294
) => Effect.Effect<EffectAcpSchema.WriteTextFileResponse, EffectAcpErrors.AcpError>;
@@ -1993,7 +1993,7 @@ export const makeAcpAdapterV2 = Effect.fn("makeAcpAdapterV2")(function* (
1993
clientCapabilities: {
1994
fs: {
1995
readTextFile: flavor.clientFileSystem !== undefined,
1996
- writeTextFile: flavor.clientFileSystem !== undefined,
1996
+ writeTextFile: flavor.clientFileSystem?.writeTextFile !== undefined,
1997
},
1998
terminal: clientTerminals !== undefined,
1999
elicitation: { form: {}, ...(flavor.onUrlElicitation ? { url: {} } : {}) },
@@ -5958,11 +5958,14 @@ export const makeAcpAdapterV2 = Effect.fn("makeAcpAdapterV2")(function* (
5958
Effect.flatMap(({ policy }) => clientFileSystem.readTextFile(request, policy.cwd)),
5959
),
5960
);
5961
- yield* targetRuntime.handleWriteTextFile((request) =>
5962
- clientPolicyContext.pipe(
5963
- Effect.flatMap(({ policy }) => clientFileSystem.writeTextFile(request, policy.cwd)),
5964
- ),
5965
- );
5961
+ const writeTextFile = clientFileSystem.writeTextFile;
5962
+ if (writeTextFile !== undefined) {
5963
+ yield* targetRuntime.handleWriteTextFile((request) =>
5964
+ clientPolicyContext.pipe(
5965
+ Effect.flatMap(({ policy }) => writeTextFile(request, policy.cwd)),
5966
+ ),
5967
+ );
5968
+ }
5969
}
5970
if (handlerOptions.mcp !== false) {
5971
yield* wireAcpRuntimeMcpHandlers(targetRuntime, runtimeMcpBridge);