Commit graph

39278 commits

Author SHA1 Message Date
Ishaan Jaffer
a271a73276
test(agent_session_endpoints): validate session state transitions (LIT-2877 #4) 2026-05-06 15:10:23 -07:00
Ishaan Jaffer
46266b1dd3
test(agent_session_endpoints): validate agent reused across sessions (LIT-2877 #3) 2026-05-06 15:10:22 -07:00
Ishaan Jaffer
1801c1cf15
test(agent_session_endpoints): add in-memory Prisma fake + multi-tenant TestClient fixtures 2026-05-06 15:10:21 -07:00
Ishaan Jaffer
b483dbe7e9
test(agent_session_endpoints): add package marker 2026-05-06 15:10:19 -07:00
Ishaan Jaffer
be5ac1885a
test(e2e/agents): add tenant-isolation spec for Validation #8
Exercises the auth gate plumbing — present a fake token, navigate, then
swap to a fresh token and reload. Real backend partitioning is gated
on Epic A; the spec is structured so its assertions can be tightened
once the real /v2/ endpoints land.
2026-05-06 15:09:35 -07:00
Ishaan Jaffer
f6b2dda923
test(e2e/agents): add terminal-tab spec for Validation #7
Switch to the Terminal tab; mock streamer emits a terminal_chunk with
ANSI red. Assert the rendered span has computed color rgb(255, 0, 0).
2026-05-06 15:09:32 -07:00
Ishaan Jaffer
fac72a5362
test(e2e/agents): add composer spec for Validation #6
Type a message, send; assert the user_message bubble count strictly
grows. Mock provider acks the user_message synchronously — that's
enough to verify the composer plumbing without Epic A.
2026-05-06 15:09:27 -07:00
Ishaan Jaffer
36ac39d3af
test(e2e/agents): add sse-reconnect spec for Validation #5
Mid-stream, page.context().setOffline(true)/(false); event count never
regresses and continues climbing after reconnect. Exercises the seq
dedup branch of useSessionEventStream.
2026-05-06 15:09:24 -07:00
Ishaan Jaffer
50b2ad9482
test(e2e/agents): add live-stream spec for Validation #4
Inside a session, poll until ≥3 events have rendered in the conversation
pane (combination of message bubbles and tool-call cards). Mock provider
ticks every 400ms so this lands well under the 10s budget.
2026-05-06 15:09:22 -07:00
Ishaan Jaffer
bf6017a5b7
test(e2e/agents): add create-session spec for Validation #3
From /agents/{aid}, click + New Session, fill repo URL; assert the URL
redirects into the three-pane view and the status pill shows
'provisioning'.
2026-05-06 15:09:16 -07:00
Ishaan Jaffer
f4e29c1c74
test(e2e/agents): add create-agent spec for Validation #2
Open New Agent dialog, fill name + model, submit; assert the new row
shows up in the table within 5s. Definition only — no VM.
2026-05-06 15:09:14 -07:00
Ishaan Jaffer
9b3b656671
test(e2e/agents): add list-agents spec for Validation #1
Routes load — /agents, /agents/{aid}, /agents/{aid}/sessions/{sid}
each render their primary container. Captures console errors and
asserts none on the list view.
2026-05-06 15:09:11 -07:00
Ishaan Jaffer
cc96c81e4b
test(e2e/agents): add shared _helpers (fake JWT + auth cookie)
useAuthorized requires an unexpired JWT in the `token` cookie before it
renders. We mint an unsigned 1-hour token here — jwt-decode never
verifies the signature, so any structurally valid base64 payload works.
Helper plus an AGENTS_DEV_URL constant (overridable via env).
2026-05-06 15:09:05 -07:00
Ishaan Jaffer
ffd37b7ed8
test(e2e/agents): add e2e:agents npm script
Wraps the agents-suite Playwright config so it can run alongside the
existing e2e suite without colliding on globalSetup.
2026-05-06 15:09:02 -07:00
Ishaan Jaffer
59e1293c10
test(e2e/agents): add Playwright config for cloud-agents suite
Targets http://localhost:3000 (Next.js dev server) directly. The agents
UI lives in App Router routes which only render under `next dev`, not
the proxy's static export — separate config skips the proxy globalSetup
that the rest of the suite needs.
2026-05-06 15:09:00 -07:00
Ishaan Jaffer
3c4065b36c
feat(cloud-agents): wire vm-config/secrets/workers/pool-status routers in proxy_server 2026-05-06 15:08:18 -07:00
Ishaan Jaffer
430a39bbfd
feat(cloud-agents): add /v2/agent-vm-pool/status stub (real impl owned by LIT-2890) 2026-05-06 15:08:14 -07:00
Ishaan Jaffer
fd3b3637ac
feat(cloud-agents): add /v2/agent-workers register/list/revoke endpoints 2026-05-06 15:06:37 -07:00
Ishaan Jaffer
75ef38573a
feat(cloud-agents): add /v2/agent-secrets CRUD endpoints (write-only values) 2026-05-06 15:05:44 -07:00
Ishaan Jaffer
aae137ad00
feat(ui/agents): add /agents/[agent_id]/sessions/[session_id] route page
Three-pane session view. Resolves auth via useAuthorized and passes
the agent_id + session_id params to ThreePane.
2026-05-06 15:05:42 -07:00
Ishaan Jaffer
f990d6a1b7
feat(ui/agents): add /agents/[agent_id] route page
Per-agent landing page. Resolves auth via useAuthorized and passes the
agent_id param to AgentDetail.
2026-05-06 15:05:40 -07:00
Ishaan Jaffer
fbe22ea796
feat(ui/agents): add AgentDetail for /agents/{aid}
Renders the agent identity, system prompt, and SessionList for this
agent. Settings hand-off link points at /settings/cloud-agents/ (Epic
G's territory) per coordination note in E1.md.
2026-05-06 15:05:38 -07:00
Ishaan Jaffer
4610bee1cc
feat(ui/agents): add ThreePane orchestrator
Owns the SessionList sidebar, conversation snapshot fetch, run snapshot
fetch, and SSE subscription. Distributes events to Conversation and
RightPanel as props — the children are presentational.
2026-05-06 15:05:31 -07:00
Ishaan Jaffer
6727e5a862
feat(ui/agents): add RightPanel with Git/Terminal tabs
Wraps GitTab and TerminalTab in an antd Tabs component. Defaults to
Git per the LIT-2881 layout.
2026-05-06 15:05:29 -07:00
Ishaan Jaffer
cf7c3decba
feat(ui/agents): add TerminalTab with ANSI rendering
Read-only ANSI tail of terminal_chunk events. Tiny SGR parser handles
foreground colors and bold; resets on \x1b[0m. Anything else (cursor
moves, 256-color, truecolor) is dropped. data-testid='ansi-#ff0000'
exposes the red span for Validation #7.
2026-05-06 15:05:27 -07:00
Ishaan Jaffer
d8636c2b57
feat(ui/agents): add GitTab for right panel
Combines the active Run's git.branches with live git_commit / pr_opened
events. Shows branches, PR link (live event wins over snapshot), and
commits sorted newest-first.
2026-05-06 15:03:43 -07:00
Ishaan Jaffer
289f9498a2
feat(ui/agents): add Conversation pane
Middle pane unioning the initial conversation snapshot with live SSE
events. user_message and assistant_message render as MessageBubble;
tool_call as ToolCallCard; file_diff folds into FilesChangedAccordion.
2026-05-06 15:03:40 -07:00
Ishaan Jaffer
707537ed52
feat(ui/agents): add Composer
Textarea + Send at the bottom of the conversation pane. POSTs to
/v2/sessions/{sid}/followup; the resulting user_message lands via the
SSE stream.
2026-05-06 15:03:38 -07:00
Ishaan Jaffer
51bcb5635c
feat(ui/agents): add FilesChangedAccordion
Aggregates file_diff events into a 'N Files Changed' collapsible at
the bottom of the conversation pane. Cumulative across the run per
LIT-2881 spec — latest patch wins, additions/deletions sum per path.
2026-05-06 15:03:33 -07:00
Ishaan Jaffer
3836af5681
feat(ui/agents): add ToolCallCard
Collapsible card for assistant tool invocations from tool_call events.
Cursor Cloud Agents-style: collapsed shows tool + preview; expanded
shows full input (and result, when present).
2026-05-06 15:03:31 -07:00
Ishaan Jaffer
c7d820a83e
feat(ui/agents): add MessageBubble for conversation pane
Renders user/assistant/tool/system messages with role-tagged styling.
Tool calls render via ToolCallCard, not this bubble.
2026-05-06 15:03:28 -07:00
Ishaan Jaffer
266081ff30
feat(proxy): mount /v2/agents+sessions routers + start cleanup sweeper 2026-05-06 15:03:25 -07:00
Ishaan Jaffer
68d11f445f
feat(agent_session_endpoints): add cleanup sweeper for expired sessions, dead daemons, stuck runs 2026-05-06 15:03:24 -07:00
Ishaan Jaffer
02b7527883
feat(ui/agents): add NewSessionDialog
Modal collecting a repo URL, posts to createCloudSession, then surfaces
the new session to the parent for redirect into the three-pane view.
2026-05-06 15:03:22 -07:00
Ishaan Jaffer
d8c66623ee
feat(agent_session_endpoints): add daemon callbacks (register/heartbeat/next-run/events:append) 2026-05-06 15:03:22 -07:00
Ishaan Jaffer
6ee24a5cbc
feat(agent_session_endpoints): add /v2/sessions/{sid}/runs CRUD + SSE + cancel 2026-05-06 15:03:21 -07:00
Ishaan Jaffer
3e2a4dacc5
feat(ui/agents): add SessionList sidebar
Vertical list of SessionRow under the active agent with a + New action
pinned to the header. Shared by /agents/{aid} and the three-pane view.
2026-05-06 15:03:20 -07:00
Ishaan Jaffer
bca9abeaef
feat(agent_session_endpoints): add module init exposing routers 2026-05-06 15:03:19 -07:00
Ishaan Jaffer
799f02b585
feat(ui/agents): add SessionRow component
Single sidebar entry showing session title, status pill (antd Tag, gold for
provisioning), branch and last-updated timestamp. Links to the three-pane
view at /agents/{aid}/sessions/{sid}.
2026-05-06 15:03:15 -07:00
Ishaan Jaffer
8d410d3552
style(ui/agents): apply prettier to NewAgentDialog 2026-05-06 15:02:50 -07:00
Ishaan Jaffer
1414cfdb71
style(ui/agents): apply prettier to AgentList 2026-05-06 15:02:49 -07:00
Ishaan Jaffer
e5f372091a
style(ui/agents): apply prettier to cloud-agents types 2026-05-06 15:02:48 -07:00
Ishaan Jaffer
51eb3c7314
fix(ui/agents): note /v2/ namespace in mock-agents docstring 2026-05-06 15:02:16 -07:00
Ishaan Jaffer
214ff1a2a4
fix(ui/agents): rewrite cloud-agents API client to /v2/ namespace
The existing /v1/agents endpoint is reserved for the A2A registry. The new
VM-agent API used by this dashboard moves under /v2/.
2026-05-06 15:02:12 -07:00
Ishaan Jaffer
c3f9c5565e
feat(cloud-agents): add /v2/agent-vm-config GET/PUT and test-connection endpoints 2026-05-06 15:01:22 -07:00
Ishaan Jaffer
5bdb533a4d
feat(cloud-agents): add single-use pair token issuer/consumer for self-hosted worker install 2026-05-06 15:01:17 -07:00
Ishaan Jaffer
5ab785c90c
feat(cloud-agents): add per-repo scope filter for agent secrets (LIT-2891 validation #3) 2026-05-06 15:01:12 -07:00
Ishaan Jaffer
6923e08366
feat(cloud-agents): add thin nacl SecretBox wrapper for agent settings AWS creds + secrets 2026-05-06 15:01:07 -07:00
Ishaan Jaffer
4b921faa01
feat(cloud-agents): add Pydantic request/response models for agent settings endpoints 2026-05-06 15:01:03 -07:00
Ishaan Jaffer
c90d4525aa
feat(cloud-agents): add agent_settings_endpoints package init 2026-05-06 15:00:59 -07:00