Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,49 @@ const layerSession = Layer.mergeAll(
TestProviderHost.layer().pipe(Layer.provide(NodeServices.layer)),
);

describe("AntigravityAdapterV2 compaction", () => {
it.effect("does not expose unsupported manual compaction on the provider session", () =>
Effect.gen(function* () {
const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const path = yield* Path.Path;
const crypto = yield* Crypto.Crypto;
const mockAgentPath = yield* path.fromFileUrl(
new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
);
const instanceId = ProviderInstanceId.make("antigravity-compaction-test");
const adapter = yield* makeAntigravityAdapterV2({
instanceId,
selfInvocation: yield* resolveSelfInvocation(),
makeRuntime: (input) =>
makeAntigravityAcpRuntime({
...input,
childProcessSpawner,
spawn: {
command: process.execPath,
args: [mockAgentPath],
cwd: input.cwd,
env: { T3_ACP_ANTIGRAVITY: "1" },
},
}).pipe(Effect.provideService(Crypto.Crypto, crypto)),
withProcess: (_stop, task) => task,
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
defaultModel: Effect.succeed(undefined),
});
const session = yield* adapter.openSession({
threadId: ThreadId.make("thread-antigravity-compaction"),
providerSessionId: ProviderSessionId.make("provider-session-antigravity-compaction"),
modelSelection: { instanceId, model: "gemini-test-low" },
runtimePolicy: ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
runtimeMode: "full-access",
interactionMode: "default",
cwd: process.cwd(),
}),
});
assert.isUndefined(session.compactThread);
}).pipe(Effect.provide(layerSession), Effect.scoped),
);
});

describe("AntigravityAdapterV2 session open", () => {
it.effect.each([
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ export function makeAntigravityAcpAdapterFlavor(
normalizeToolCall: normalizeAntigravityToolCall,
extractSubagentUpdate: extractAntigravitySubagentUpdate,
supportsImagePrompts: true,
supportsCompaction: true,
// ACP 1.3.0 treats /compact as ordinary model input.
supportsCompaction: false,
requiresSignIn: isAntigravitySignInRequiredError,
};
}
Expand Down
3 changes: 3 additions & 0 deletions docs/user/providers-antigravity.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ T3 Code keeps conversation history and file diffs, but Antigravity cannot rewind
its conversation. Reverting a thread or editing and resubmitting an earlier turn
is unavailable. Continue with a follow-up message or start a new thread.

Manual context compaction is unavailable through Antigravity's ACP runtime, even
though its CLI has `/compact`. Start a new thread when you need a fresh context.

### Skills and attachments

Put project skills in `.agents/skills`. T3 Code also reads `.gemini/skills` and the
Expand Down
Loading