Skip to main content

Module protocol

Module protocol 

Source
Expand description

The protobuf-JSON wire types, re-exported flat.

Every type here is generated from the descriptor the shipped harness binary was built with — see scripts/codegen_antigravity.py. The two envelopes worth knowing are InputEvent (client to harness) and OutputEvent (harness to client); the rest hang off those.

§How a protobuf oneof is modelled

The JSON mapping flattens a oneof — only the set arm appears, as an ordinary member of the parent object. So the generated struct keeps one Option per arm rather than a Rust enum, which is what makes an unknown future arm decode cleanly instead of failing the whole frame. For matching, each oneof also gets an owned view:

use antigravity_codes::protocol::{OutputEvent, OutputEventEvent, StepUpdate};

let event = OutputEvent {
    step_update: Some(StepUpdate { text: Some("hi".into()), ..Default::default() }),
    ..Default::default()
};

match event.into_event() {
    Some(OutputEventEvent::StepUpdate(step)) => assert_eq!(step.text.as_deref(), Some("hi")),
    other => panic!("unexpected arm: {other:?}"),
}

Structs§

ActionCompaction
antigravity.localharness.ActionCompaction
ActionCreateFile
antigravity.localharness.ActionCreateFile
ActionCustomTool
antigravity.localharness.ActionCustomTool
ActionEditFile
antigravity.localharness.ActionEditFile
ActionEditFileDiffBlock
antigravity.localharness.ActionEditFile.DiffBlock
ActionEditFileDiffLine
antigravity.localharness.ActionEditFile.DiffLine
ActionError
antigravity.localharness.ActionError
ActionFindFile
antigravity.localharness.ActionFindFile
ActionFinish
antigravity.localharness.ActionFinish
ActionGenerateImage
antigravity.localharness.ActionGenerateImage
ActionInvokeSubagent
antigravity.localharness.ActionInvokeSubagent
ActionListDirectory
antigravity.localharness.ActionListDirectory
ActionListDirectoryResult
antigravity.localharness.ActionListDirectory.Result
ActionMcpTool
antigravity.localharness.ActionMcpTool
ActionReadUrlContent
antigravity.localharness.ActionReadUrlContent
ActionRunCommand
antigravity.localharness.ActionRunCommand
ActionSearchDirectory
antigravity.localharness.ActionSearchDirectory
ActionSearchWeb
antigravity.localharness.ActionSearchWeb
ActionViewFile
antigravity.localharness.ActionViewFile
AppendedSystemInstructions
antigravity.localharness.AppendedSystemInstructions
AppendedSystemInstructionsSection
antigravity.localharness.AppendedSystemInstructions.Section
AudioContent
genai.AudioContent
CallHookRequest
antigravity.localharness.CallHookRequest
CallHookResponse
antigravity.localharness.CallHookResponse
ClientInfo
antigravity.localharness.ClientInfo
CodeExecutionCallContent
genai.CodeExecutionCallContent
CodeExecutionCallContentCodeExecutionCallArguments
genai.CodeExecutionCallContent.CodeExecutionCallArguments
CodeExecutionResultContent
genai.CodeExecutionResultContent
Content
genai.Content
CustomAgent
antigravity.localharness.CustomAgent
CustomEndpoint
antigravity.localharness.CustomEndpoint
CustomSystemInstructions
antigravity.localharness.CustomSystemInstructions
CustomSystemInstructionsPart
antigravity.localharness.CustomSystemInstructions.Part
CustomSystemInstructionsSystemInstructionTemplate
antigravity.localharness.CustomSystemInstructions.SystemInstructionTemplate
CustomSystemInstructionsSystemInstructionTemplateArg
antigravity.localharness.CustomSystemInstructions.SystemInstructionTemplate.Arg
DocumentContent
genai.DocumentContent
EmptyResult
antigravity.localharness.EmptyResult
Field
genai.Field
FileCitation
genai.FileCitation
FileEditToolConfig
antigravity.localharness.FileEditToolConfig
FileSearchCallContent
genai.FileSearchCallContent
FileSearchResultContent
genai.FileSearchResultContent
FileSearchResultContentFileSearchResult
genai.FileSearchResultContent.FileSearchResult
FilesystemWorkspace
antigravity.localharness.FilesystemWorkspace
FindToolConfig
antigravity.localharness.FindToolConfig
FunctionCallContent
genai.FunctionCallContent
FunctionResultContent
genai.FunctionResultContent
FunctionResultSubcontent
genai.FunctionResultSubcontent
FunctionResultSubcontentList
genai.FunctionResultSubcontentList
GeminiAPIEndpoint
antigravity.localharness.GeminiAPIEndpoint
GeminiModelOptions
antigravity.localharness.GeminiModelOptions
GemmaEndpoint
antigravity.localharness.GemmaEndpoint
GenerateImageToolConfig
antigravity.localharness.GenerateImageToolConfig
GoogleMapsCallContent
genai.GoogleMapsCallContent
GoogleMapsCallContentGoogleMapsCallArguments
genai.GoogleMapsCallContent.GoogleMapsCallArguments
GoogleMapsResultContent
genai.GoogleMapsResultContent
GoogleMapsResultContentGoogleMapsResult
genai.GoogleMapsResultContent.GoogleMapsResult
GoogleMapsResultContentGoogleMapsResultPlaces
genai.GoogleMapsResultContent.GoogleMapsResult.Places
GoogleSearchCallContent
genai.GoogleSearchCallContent
GoogleSearchCallContentGoogleSearchCallArguments
genai.GoogleSearchCallContent.GoogleSearchCallArguments
GoogleSearchResultContent
genai.GoogleSearchResultContent
GoogleSearchResultContentGoogleSearchResult
genai.GoogleSearchResultContent.GoogleSearchResult
GrepSearchToolConfig
antigravity.localharness.GrepSearchToolConfig
HarnessConfig
antigravity.localharness.HarnessConfig
HarnessSideTools
antigravity.localharness.HarnessSideTools
ImageContent
genai.ImageContent
InitializeConversationEvent
antigravity.localharness.InitializeConversationEvent
InitializeConversationResponse
antigravity.localharness.InitializeConversationResponse
InputConfig
antigravity.localharness.InputConfig
InputEvent
antigravity.localharness.InputEvent
ListDirToolConfig
antigravity.localharness.ListDirToolConfig
ListValue
genai.ListValue
McpHttpTransport
antigravity.localharness.McpHttpTransport
McpServerConfig
antigravity.localharness.McpServerConfig
McpServerToolCallContent
genai.McpServerToolCallContent
McpServerToolResultContent
genai.McpServerToolResultContent
McpStdioTransport
antigravity.localharness.McpStdioTransport
Media
antigravity.localharness.Media
ModelAPIRetryConfig
antigravity.localharness.ModelAPIRetryConfig
ModelConfig
antigravity.localharness.ModelConfig
ModelOutputRetryConfig
antigravity.localharness.ModelOutputRetryConfig
MultipleChoice
antigravity.localharness.MultipleChoice
MultipleChoiceAnswer
antigravity.localharness.MultipleChoiceAnswer
OnToolErrorArgs
antigravity.localharness.OnToolErrorArgs
OnToolErrorResult
antigravity.localharness.OnToolErrorResult
OutputConfig
antigravity.localharness.OutputConfig
OutputEvent
antigravity.localharness.OutputEvent
PermissionsConfig
antigravity.localharness.PermissionsConfig
PlaceCitation
genai.PlaceCitation
PolicyConfig
antigravity.localharness.PolicyConfig
PolicyDecisionRequest
antigravity.localharness.PolicyDecisionRequest
PolicyDecisionResponse
antigravity.localharness.PolicyDecisionResponse
PolicyRule
antigravity.localharness.PolicyRule
PostToolArgs
antigravity.localharness.PostToolArgs
PostTurnArgs
antigravity.localharness.PostTurnArgs
PreToolArgs
antigravity.localharness.PreToolArgs
PreToolResult
antigravity.localharness.PreToolResult
PreTurnArgs
antigravity.localharness.PreTurnArgs
PreTurnResult
antigravity.localharness.PreTurnResult
ReadUrlContentToolConfig
antigravity.localharness.ReadUrlContentToolConfig
RetryConfig
antigravity.localharness.RetryConfig
ReviewSnippet
genai.ReviewSnippet
RunCommandToolConfig
antigravity.localharness.RunCommandToolConfig
SearchWebToolConfig
antigravity.localharness.SearchWebToolConfig
StepUpdate
antigravity.localharness.StepUpdate
Struct
genai.Struct
SubagentsConfig
antigravity.localharness.SubagentsConfig
SystemInstructions
antigravity.localharness.SystemInstructions
TextContent
genai.TextContent
TextContentAnnotation
genai.TextContent.Annotation
ThoughtContent
genai.ThoughtContent
ThoughtSummaryContent
genai.ThoughtSummaryContent
Tool
antigravity.localharness.Tool
ToolCall
antigravity.localharness.ToolCall
ToolCallContent
genai.ToolCallContent
ToolConfirmation
antigravity.localharness.ToolConfirmation
ToolConfirmationRequest
antigravity.localharness.ToolConfirmationRequest
ToolOutputTruncation
antigravity.localharness.ToolOutputTruncation
ToolOutputTruncationErrorStrategy
antigravity.localharness.ToolOutputTruncation.ErrorStrategy
ToolOutputTruncationTruncateStrategy
antigravity.localharness.ToolOutputTruncation.TruncateStrategy
ToolResponse
antigravity.localharness.ToolResponse
ToolResultContent
genai.ToolResultContent
ToolSearchConfig
antigravity.localharness.ToolSearchConfig
TrajectoryStateUpdate
antigravity.localharness.TrajectoryStateUpdate
TrajectoryUsageEntry
antigravity.localharness.TrajectoryUsageEntry
UrlCitation
genai.UrlCitation
UrlContextCallContent
genai.UrlContextCallContent
UrlContextCallContentUrlContextCallArguments
genai.UrlContextCallContent.UrlContextCallArguments
UrlContextResultContent
genai.UrlContextResultContent
UrlContextResultContentUrlContextResult
genai.UrlContextResultContent.UrlContextResult
UsageMetadata
antigravity.localharness.UsageMetadata
UsageUpdate
antigravity.localharness.UsageUpdate
UserInput
antigravity.localharness.UserInput
UserInputMedia
antigravity.localharness.UserInput.Media
UserInputPart
antigravity.localharness.UserInput.Part
UserInputSlashCommand
antigravity.localharness.UserInput.SlashCommand
UserQuestion
antigravity.localharness.UserQuestion
UserQuestionAnswer
antigravity.localharness.UserQuestionAnswer
UserQuestionsConfig
antigravity.localharness.UserQuestionsConfig
UserQuestionsRequest
antigravity.localharness.UserQuestionsRequest
UserQuestionsResponse
antigravity.localharness.UserQuestionsResponse
UserQuestionsResponseQuestionsResponse
antigravity.localharness.UserQuestionsResponse.QuestionsResponse
Value
genai.Value
VertexEndpoint
antigravity.localharness.VertexEndpoint
VideoContent
genai.VideoContent
ViewFileToolConfig
antigravity.localharness.ViewFileToolConfig
WordInfo
genai.WordInfo
Workspace
antigravity.localharness.Workspace
WriteToFileToolConfig
antigravity.localharness.WriteToFileToolConfig

Enums§

ActionEditFileDiffLineLineAction
antigravity.localharness.ActionEditFile.DiffLine.LineAction
ActionListDirectoryResultInfo
The info oneof of ActionListDirectoryResult, as an owned value.
AudioContentDataOrUri
The data_or_uri oneof of AudioContent, as an owned value.
AudioContentMimeType
genai.AudioContent.MimeType
CallHookRequestArgs
The args oneof of CallHookRequest, as an owned value.
CallHookResponseResult
The result oneof of CallHookResponse, as an owned value.
CodeExecutionCallContentCodeExecutionCallArgumentsLanguage
genai.CodeExecutionCallContent.CodeExecutionCallArguments.Language
ContentType
The type oneof of Content, as an owned value.
CustomSystemInstructionsPartPart
The part oneof of CustomSystemInstructionsPart, as an owned value.
DocumentContentDataOrUri
The data_or_uri oneof of DocumentContent, as an owned value.
DocumentContentMimeType
genai.DocumentContent.MimeType
FunctionResultContentResult
The result oneof of FunctionResultContent, as an owned value.
FunctionResultSubcontentType
The type oneof of FunctionResultSubcontent, as an owned value.
GoogleSearchSearchType
genai.GoogleSearch.SearchType
HarnessConfigSessionContinuationMode
antigravity.localharness.HarnessConfig.SessionContinuationMode
ImageContentDataOrUri
The data_or_uri oneof of ImageContent, as an owned value.
ImageContentMimeType
genai.ImageContent.MimeType
InputEventEvent
The event oneof of InputEvent, as an owned value.
LifecycleHook
antigravity.localharness.LifecycleHook
McpServerConfigAuthProviderType
antigravity.localharness.McpServerConfig.AuthProviderType
McpServerConfigTransport
The transport oneof of McpServerConfig, as an owned value.
McpServerToolResultContentResult
The result oneof of McpServerToolResultContent, as an owned value.
MediaResolution
genai.MediaResolution
ModelConfigEndpoint
The endpoint oneof of ModelConfig, as an owned value.
ModelType
antigravity.localharness.ModelType
NullValue
google.protobuf.NullValue
OutputEventEvent
The event oneof of OutputEvent, as an owned value.
PolicyDecision
antigravity.localharness.PolicyDecision
PolicyEvaluationOutcome
antigravity.localharness.PolicyEvaluationOutcome
PreToolResultDecision
antigravity.localharness.PreToolResult.Decision
PreTurnResultDecision
antigravity.localharness.PreTurnResult.Decision
StepUpdateSource
antigravity.localharness.StepUpdate.Source
StepUpdateState
antigravity.localharness.StepUpdate.State
StepUpdateTarget
antigravity.localharness.StepUpdate.Target
SystemInstructionsType
The type oneof of SystemInstructions, as an owned value.
TextContentAnnotationType
The type oneof of TextContentAnnotation, as an owned value.
ThoughtSummaryContentType
The type oneof of ThoughtSummaryContent, as an owned value.
ToolCallContentType
The type oneof of ToolCallContent, as an owned value.
ToolOutputTruncationStrategy
The strategy oneof of ToolOutputTruncation, as an owned value.
ToolResultContentType
The type oneof of ToolResultContent, as an owned value.
TrajectoryStateUpdateState
antigravity.localharness.TrajectoryStateUpdate.State
UrlContextResultContentUrlContextResultStatus
genai.UrlContextResultContent.UrlContextResult.Status
UserInputPartPart
The part oneof of UserInputPart, as an owned value.
UserQuestionAnswerAnswer
The answer oneof of UserQuestionAnswer, as an owned value.
UserQuestionQuestionType
The question_type oneof of UserQuestion, as an owned value.
UserQuestionsResponseResult
The result oneof of UserQuestionsResponse, as an owned value.
ValueKind
The kind oneof of Value, as an owned value.
VideoContentDataOrUri
The data_or_uri oneof of VideoContent, as an owned value.
VideoContentMimeType
genai.VideoContent.MimeType
WorkspaceWorkspaceType
The workspace_type oneof of Workspace, as an owned value.