flowchart TB
APP[Caller / agent_session_manager]
SDK[AntigravityCliSdk]
OPT[Options + GovernedLaunch]
RT[Runtime.CLI]
CORE[cli_subprocess_core Session]
PROFILE[ProviderProfiles.Antigravity]
AGY[agy binary]
APP --> SDK
SDK --> OPT
SDK --> RT
RT --> CORE
CORE --> PROFILE
PROFILE --> AGYAntigravityCliSdk is not a second subprocess runtime. It is a typed SDK layer
over cli_subprocess_core:
Optionsvalidates caller input and resolves the core model payload.ArgBuilderrendersagy --print <prompt>and supported flags.Runtime.CLI.Profiledelegates decode/exit handling to the core Antigravity provider profile.Streamconverts normalized core events into SDK event structs.agent_session_managercan useAntigravityCliSdk.Runtime.CLIas the SDK runtime for the:antigravityprovider.
The core lane and SDK lane intentionally share the same parser behavior: Antigravity stdout is plain text and non-empty lines become assistant deltas. Core terminal result fields remain authoritative; accumulated text is only a missing-result fallback. Total run deadline, stream idle wait, and transport orphan reaping are separate lifecycle controls.