Skip to content

Commit 7243a7b

Browse files
authored
Merge pull request #4 from ebarti/stack/phase-4-antigravity-proof
Add Antigravity adapter and cross-runtime proof
2 parents d7c045a + fa06503 commit 7243a7b

17 files changed

Lines changed: 834 additions & 18 deletions

File tree

.planning/REQUIREMENTS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,18 @@ Which phases cover which requirements. Updated during roadmap creation.
170170
| ADPT-02 | Phase 3 | Complete |
171171
| ADPT-03 | Phase 3 | Complete |
172172
| ADPT-04 | Phase 3 | Complete |
173-
| ADPT-05 | Phase 4 | Pending |
174-
| ADPT-06 | Phase 4 | Pending |
175-
| ADPT-07 | Phase 4 | Pending |
173+
| ADPT-05 | Phase 4 | Complete |
174+
| ADPT-06 | Phase 4 | Complete |
175+
| ADPT-07 | Phase 4 | Complete |
176176
| TEST-01 | Phase 2 | Complete |
177177
| TEST-02 | Phase 2 | Complete |
178178
| TEST-03 | Phase 1 | Complete |
179179
| TEST-04 | Phase 1 | Complete |
180180
| TEST-05 | Phase 5 | Pending |
181-
| TEST-06 | Phase 4 | Pending |
181+
| TEST-06 | Phase 4 | Complete |
182182
| DOCS-01 | Phase 5 | Pending |
183183
| DOCS-02 | Phase 3 | Complete |
184-
| DOCS-03 | Phase 4 | Pending |
184+
| DOCS-03 | Phase 4 | Complete |
185185
| DOCS-04 | Phase 5 | Pending |
186186
| DOCS-05 | Phase 5 | Pending |
187187
| DOCS-06 | Phase 5 | Pending |

.planning/ROADMAP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Decimal phases appear between their surrounding integers in numeric order.
2020
- [x] **Phase 1: Core Runtime Skeleton** - Installable core package with public task/result/runtime contracts.
2121
- [x] **Phase 2: Events and Test Harness** - Optional extras skeleton, event system, and fake SDK contract tests.
2222
- [x] **Phase 3: Claude and Codex Runtimes** - First two real vendor adapters through the shared API.
23-
- [ ] **Phase 4: Antigravity and Cross-Runtime Proof** - Third adapter plus same-task multi-runtime proof and Mestre compatibility checks.
23+
- [x] **Phase 4: Antigravity and Cross-Runtime Proof** - Third adapter plus same-task multi-runtime proof and Mestre compatibility checks.
2424
- [ ] **Phase 5: Public Release Readiness** - Documentation, capability matrix, live-smoke guidance, and PyPI publish checklist.
2525

2626
## Phase Details
@@ -120,5 +120,5 @@ Phases execute in numeric order: 1 -> 2 -> 3 -> 4 -> 5
120120
| 1. Core Runtime Skeleton | 3/3 | Complete | 2026-06-10 |
121121
| 2. Events and Test Harness | 3/3 | Complete | 2026-06-10 |
122122
| 3. Claude and Codex Runtimes | 3/3 | Complete | 2026-06-10 |
123-
| 4. Antigravity and Cross-Runtime Proof | 0/3 | Not started | - |
123+
| 4. Antigravity and Cross-Runtime Proof | 3/3 | Complete | 2026-06-10 |
124124
| 5. Public Release Readiness | 0/3 | Not started | - |

.planning/STATE.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ gsd_state_version: '1.0'
33
status: executing
44
progress:
55
total_phases: 5
6-
completed_phases: 3
6+
completed_phases: 4
77
total_plans: 15
8-
completed_plans: 9
9-
percent: 60
8+
completed_plans: 12
9+
percent: 80
1010
---
1111

1212
# Project State
@@ -18,21 +18,21 @@ See: .planning/PROJECT.md (updated 2026-06-10)
1818
**Core value:** Developers can run the same agentic task through Claude, Codex,
1919
or Antigravity using one small, typed Python API while preserving the
2020
vendor-specific capabilities needed for real work.
21-
**Current focus:** Phase 4: Antigravity and Cross-Runtime Proof
21+
**Current focus:** Phase 5: Public Release Readiness
2222

2323
## Current Position
2424

25-
Phase: 4 of 5 (Antigravity and Cross-Runtime Proof)
25+
Phase: 5 of 5 (Public Release Readiness)
2626
Plan: 0 of 3 in current phase
27-
Status: Phase 3 complete; ready for Phase 4
28-
Last activity: 2026-06-10 - Phase 3 added Claude and Codex adapters.
27+
Status: Phase 4 complete; ready for Phase 5
28+
Last activity: 2026-06-10 - Phase 4 added Antigravity and cross-runtime proof.
2929

30-
Progress: [######----] 60%
30+
Progress: [########--] 80%
3131

3232
## Performance Metrics
3333

3434
**Velocity:**
35-
- Total plans completed: 9
35+
- Total plans completed: 12
3636
- Average duration: n/a
3737
- Total execution time: 0.0 hours
3838

@@ -43,9 +43,10 @@ Progress: [######----] 60%
4343
| 1. Core Runtime Skeleton | 3 | 3 | n/a |
4444
| 2. Events and Test Harness | 3 | 3 | n/a |
4545
| 3. Claude and Codex Runtimes | 3 | 3 | n/a |
46+
| 4. Antigravity and Cross-Runtime Proof | 3 | 3 | n/a |
4647

4748
**Recent Trend:**
48-
- Last 5 plans: 02-02, 02-03, 03-01, 03-02, 03-03
49+
- Last 5 plans: 03-02, 03-03, 04-01, 04-02, 04-03
4950
- Trend: n/a
5051

5152
*Updated after each plan completion*
@@ -68,6 +69,8 @@ Recent decisions affecting current work:
6869
sensitive/high-volume attributes before emission.
6970
- Phase 3: Claude and Codex adapters use lazy imports and fake-injected tests
7071
so default CI remains credential-free.
72+
- Phase 4: Antigravity MCP stdio server env values are rejected because the
73+
SDK config surface does not expose env.
7174

7275
### Pending Todos
7376

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Phase 4: Antigravity and Cross-Runtime Proof - Context
2+
3+
**Gathered:** 2026-06-10
4+
**Status:** Ready for planning
5+
6+
<domain>
7+
## Phase Boundary
8+
9+
Add the Google Antigravity adapter, same-task three-runtime example, and tests
10+
proving the shared API can represent Mestre's vendor-lane task fields.
11+
12+
</domain>
13+
14+
<decisions>
15+
## Implementation Decisions
16+
17+
### Antigravity Mapping
18+
- Map API key, model, system instructions, capabilities, policies,
19+
workspaces, conversation id, response schema, and MCP stdio servers.
20+
- Reject MCP server env values because the SDK config shape does not expose
21+
them.
22+
- Translate text, thought, tool call, and tool result chunks into normalized
23+
output/tool/vendor events.
24+
25+
### Cross-Runtime Proof
26+
- Provide an example that registers all adapters and runs the same task shape
27+
through each available runtime.
28+
- Keep unavailable providers as diagnostics rather than hard failures.
29+
30+
### the agent's Discretion
31+
Keep Mestre compatibility as field coverage tests, not a Mestre dependency.
32+
33+
</decisions>
34+
35+
<code_context>
36+
## Existing Code Insights
37+
38+
### Reusable Assets
39+
- Phase 3 adapter helpers and diagnostics patterns are reused.
40+
41+
### Established Patterns
42+
- Vendor adapters support injected SDK surfaces in tests.
43+
44+
### Integration Points
45+
- Provider diagnostics now include Antigravity.
46+
47+
</code_context>
48+
49+
<specifics>
50+
## Specific Ideas
51+
52+
Mestre compatibility should prove representation of current vendor-lane inputs,
53+
not migrate Mestre in this package.
54+
55+
</specifics>
56+
57+
<deferred>
58+
## Deferred Ideas
59+
60+
Live smoke tests and release checklist are deferred to Phase 5.
61+
62+
</deferred>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Phase 4: Antigravity and Cross-Runtime Proof - Plan
2+
3+
## Plan 04-01: Google Antigravity SDK adapter and tests
4+
5+
- Implement `AntigravityAgentRuntime`.
6+
- Map task fields into `LocalAgentConfig`.
7+
- Translate text, thought, tool call, and tool result chunks.
8+
- Cover success, structured output, tool events, diagnostics, and unsupported
9+
MCP env values.
10+
11+
## Plan 04-02: Same-task three-runtime example
12+
13+
- Add an example that registers Claude, Codex, and Antigravity adapters.
14+
- Run one `AgentTask` shape through every available provider.
15+
- Print setup diagnostics for unavailable providers.
16+
17+
## Plan 04-03: Mestre compatibility field audit and tests
18+
19+
- Add tests proving `AgentTask` covers Mestre's current vendor-lane fields.
20+
- Add adapter capability assertions for Mestre-relevant fields.
21+
- Add migration notes documenting the intended adoption boundary.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Phase 4: Antigravity and Cross-Runtime Proof - Summary
2+
3+
Implemented:
4+
5+
- `AntigravityAgentRuntime`.
6+
- Antigravity fake-injected adapter tests.
7+
- Provider diagnostics inclusion for Antigravity.
8+
- Same-task multi-runtime example.
9+
- Mestre compatibility field coverage tests.
10+
- Mestre migration notes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
status: passed
3+
---
4+
5+
# Phase 4 Verification
6+
7+
## Automated Checks
8+
9+
- `uv run pytest` - passed, 22 tests.
10+
- `uv run ruff check .` - passed.
11+
- `uv run mypy` - passed.
12+
13+
## Result
14+
15+
Phase 4 success criteria are satisfied. Antigravity is implemented and tested
16+
through an injected SDK surface, the same-task example covers all three
17+
runtime kinds, and compatibility tests prove the public task shape represents
18+
Mestre's current vendor-lane fields.

docs/mestre-migration.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Mestre Migration Notes
2+
3+
Mestre can adopt `agent-runtime-kit` at the vendor-lane boundary rather than at
4+
the routing boundary.
5+
6+
The public `AgentTask` covers the fields Mestre currently carries into its
7+
vendor runtimes:
8+
9+
- task id and goal
10+
- event sink
11+
- system prompt
12+
- working directory
13+
- MCP stdio server config
14+
- permission profile
15+
- SDK execution count and budget
16+
- session id and resume state
17+
- output schema
18+
- metadata for model ids, provider ids, reasoning effort, prompt receipts, and
19+
vendor-specific diagnostics
20+
21+
The package deliberately does not absorb Mestre's routing, fallback,
22+
benchmarking, self-improvement, credential store, model registry, or
23+
observability backend. Mestre should keep those layers and translate its
24+
internal task object into `AgentTask` immediately before dispatching to a
25+
runtime.

docs/providers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ Codex uses the `openai-codex` package and maps working directory, session
1818
resume, approval mode, sandbox, structured output, model, and reasoning effort.
1919
Codex does not currently support per-task MCP server configuration through this
2020
adapter, so `mcp_servers` is rejected with a typed error.
21+
22+
Antigravity uses the `google-antigravity` package and maps API key,
23+
workspace, permission-derived capabilities/policies, MCP stdio servers,
24+
conversation id, structured output, session directories, model, and tool
25+
events. Antigravity MCP server configs do not currently accept per-server env
26+
values through this adapter.

examples/run_same_task.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""Run the same task through every configured runtime."""
2+
3+
from __future__ import annotations
4+
5+
import asyncio
6+
7+
from agent_runtime_kit import AgentTask, create_default_registry
8+
from agent_runtime_kit.adapters import register_adapters
9+
10+
11+
async def main() -> None:
12+
registry = create_default_registry()
13+
register_adapters(registry)
14+
15+
task = AgentTask(goal="Summarize this repository in one paragraph.")
16+
for kind in registry.kinds():
17+
if kind.value == "fake":
18+
continue
19+
runtime = registry.resolve(kind)
20+
diagnostic = runtime.availability()
21+
if not diagnostic.available:
22+
print(f"{kind.value}: unavailable - {diagnostic.message}")
23+
continue
24+
result = await runtime.run(task)
25+
print(f"{kind.value}: {result.output}")
26+
27+
28+
if __name__ == "__main__":
29+
asyncio.run(main())

0 commit comments

Comments
 (0)