Files
Mohamed Boudra 7b0cace991 Restore Antigravity with Full access and session warnings (#5795)
* Revert "Remove the unreleased Antigravity provider plugin (#5781)"

This reverts commit 9d9d9af993.

* fix(providers): commit plugin notices emitted during session opening

* feat(providers): restore Antigravity with full access and session warnings

* fix(providers): warn once when opening Antigravity sessions

Driver respawn retains the live transcript and unchanged permission posture. Emit the warning only when opening a session, including resume after a daemon restart.
2026-09-30 23:18:05 +01:00

56 lines
2.2 KiB
TypeScript

import type {
ProviderTimelineItem,
ProviderToolCallDetail,
} from "@getpaseo/plugin/server/provider";
import type { Step } from "./wire.js";
export function toolItem(
step: Step,
id: string,
): Extract<ProviderTimelineItem, { type: "tool_call" }> {
const detail = toolDetail(step);
const name = step.tool_name || "Antigravity tool";
const metadata = step.subagent_info ? { subagents: step.subagent_info.subagents } : undefined;
const base = { type: "tool_call" as const, id, callId: id, name, detail, metadata };
if (step.state === "ERROR") {
const error =
step.tool_info && step.tool_info.error
? step.tool_info.error.message
: "Antigravity tool failed";
return { ...base, status: "failed", error };
}
const status = step.state === "ACTIVE" ? "running" : "completed";
return { ...base, status, error: null };
}
function toolDetail(step: Step): ProviderToolCallDetail {
if (step.subagent_info) {
const child = step.subagent_info.subagents[0];
if (child)
return {
type: "sub_agent",
subAgentType: child.type_name,
description: child.initial_prompt,
childSessionId: child.conversation_id === null ? undefined : child.conversation_id,
log: child.log_uri,
};
}
const info = step.tool_info;
if (!info) return { type: "plain_text", label: step.tool_name, text: "" };
const path = info.parameters.AbsolutePath || info.parameters.TargetFile;
if (info.name === "run_command" && typeof info.parameters.CommandLine === "string") {
return { type: "shell", command: info.parameters.CommandLine, output: info.output };
}
if (info.name === "view_file" && typeof path === "string")
return { type: "read", filePath: path, content: info.output };
if (info.name === "write_to_file" && typeof path === "string")
return { type: "write", filePath: path };
if (
(info.name === "replace_file_content" || info.name === "multi_replace_file_content") &&
typeof path === "string"
)
return { type: "edit", filePath: path };
// Native frames summarize writes; they do not carry the file contents or diff.
return { type: "unknown", input: info.parameters, output: info.error || info.output };
}