[LIT-2879] Wave 1: tool surface + run loop + e2e PR test#1
Draft
ishaan-berri wants to merge 9 commits into
Draft
[LIT-2879] Wave 1: tool surface + run loop + e2e PR test#1ishaan-berri wants to merge 9 commits into
ishaan-berri wants to merge 9 commits into
Conversation
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear
LIT-2879 (Epic C — Agent runtime daemon)
What this PR ships (Wave 1 of 3)
The minimum viable daemon that:
sessionmode/v2/sessions/{sid}/internal/registerANTHROPIC_BASE_URL+ANTHROPIC_AUTH_TOKEN)/v2/sessions/{sid}/runs/{rid}/events:appendgh pr createwrapper ready for end-of-run PR opening (not invoked yet — wired up but the LLM decides when to call it via the shell tool, or Wave 2 adds the autoCreatePr flag)Validation passing
pnpm typecheck— cleantests/e2e/fix-typo.test.ts— daemon spawns, registers with an in-process mock proxy, clones a tiny throwaway file:// repo, drives the real LLM through the str_replace tool to fix a typo, and emits the expected event sequence (run_started → assistant_message → tool_call → tool_result → run_finished). Verified the file edit actually landed on disk.Sample local run output (see PR commits for full logs):
```
[daemon] daemon.starting mode=session sessionId=sess_test_e2e
[daemon] session.registered
[daemon] git.clone.done ref=main
[daemon] loop.request iteration=0..4
[daemon] loop.end_turn iterations=4
[daemon] daemon.exited_cleanly
PASS tests/e2e/fix-typo.test.ts (12.6s)
```
Deferred to Wave 2
.cursor/skills/+.cursor/hooks.json+.cursor/mcp.jsonharness loadersLITELLM_AGENT_MODE=warm) — entrypoint already routes by mode; warm body throws "reserved for Wave 2"LITELLM_HYDRATE_JSONenv so the e2e harness can inject; production register-response inline TBD)autoCreatePrflag wired into the run loop (helper already exists)Deferred to Wave 3