> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_22/session_01_antigravity_detection_data_contract.md).

# Session 01: Antigravity Detection Data Contract

**Session ID**: `phase22-session01-antigravity-detection-data-contract` **Status**: Not Started **Estimated Tasks**: \~18-24 **Estimated Duration**: 3-4 hours

***

## Objective

Extend aios local app detection so Antigravity is represented as a dual-surface local agent with browser-safe conversation usage and saved-equivalent value.

***

## Source Reference Detail

* v2.3 Antigravity types and app-detection shape: [V23/scripts/aggregate.ts:769](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/scripts/aggregate.ts:769) through `:790`.
* v2.3 detection body: [V23/scripts/aggregate.ts:807](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/scripts/aggregate.ts:807) through `:905`.
* aios target currently exposes only a `.app` boolean: [AIOS/scripts/lib/app-detection.ts:207](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/scripts/lib/app-detection.ts:207) through `:210`.
* Required conversation scan path: `~/.gemini/antigravity/conversations/*.pb` and `~/.gemini/antigravity/conversations/*.json`.

***

## Scope

### In Scope (MVP)

* Extend `AIOS/scripts/lib/app-detection.ts` to detect the Antigravity `.app` and `antigravity` CLI independently.
* Emit `surfaces.ide` and `surfaces.cli` with safe installed/available facts.
* Scan Antigravity conversation files for bounded conversation count and last-active metadata.
* Emit `usage.savedEquivalent` using the v2.3 semantics, keeping values browser-safe and bounded.
* Extend script-side `AppDetection` types.
* Extend `AIOS/src/lib/live-data-types.ts`.
* Extend `AIOS/src/lib/validate-live-data.ts`.
* Update `AIOS/src/data/live-data.example.json` and any demo data.
* Add tests for no install, IDE only, CLI only, both surfaces, conversation usage, malformed files, and path/privacy boundaries.

### Out of Scope

* Reading raw Antigravity prompts, transcripts, message bodies, protobuf contents beyond safe count/mtime facts, or credential payloads.
* Launching Antigravity or shelling into its CLI.
* Usage-panel or home ROI consumers; Session 02 owns those.

***

## Prerequisites

* [ ] Confirm existing app-detection helper conventions and timeout behavior.
* [ ] Confirm live-data validator defaults for absent optional app data.

***

## Deliverables

1. Dual-surface Antigravity app-detection output.
2. Browser-safe conversation usage and `savedEquivalent` data.
3. Updated script/client types, validator, example data, and tests.

***

## Success Criteria

* [ ] IDE and CLI detection are independent and can be true/false separately.
* [ ] Missing Antigravity state degrades to a safe absent/optional state.
* [ ] Conversation count and last-active metadata do not expose raw paths or message contents.
* [ ] `usage.savedEquivalent` is available for Phase 22 Session 02 consumers.
* [ ] Validator and example data include the new shape.
* [ ] Tests cover installed, absent, malformed, and privacy cases.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_22/session_01_antigravity_detection_data_contract.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
