Skip to content

Commit 428e680

Browse files
authored
feat: Agent Terminal v1 — Week 1 vertical slice (#3)
* Add Week 1 protocol config and storage layers * Add Week 1 CLI command stubs * Add PTY creation wrapper * Add in-memory session state machine * Add append-only event log writer * Add RPC client and server socket transport * Add session host entrypoint * Implement host lifecycle helpers * Wire lifecycle CLI commands * Fix reported lint errors * Add PTY key and paste encoders * Prepare host PTY control plumbing * Implement CLI control commands * Wire PTY control handlers in host * Add PTY control integration tests * Fix event log append sequencing race * Add deterministic e2e fixture apps * Add week 1 dogfood proof bundle * Fix formatting across Week 1 files * Add dogfood visual screenshots * Add nvim dogfood demo evidence artifacts * Add nvim dogfood demo proof bundle * Drain event log writes before close * Tighten protocol message schemas * fix: rename lifecycle proof screenshots to svg * test: cover wait timeout result * Fix create CLI error handling * Fix formatting for review fix commits * Fix idle wait and signal race handling * Fix formatting for idle-wait fix * Add RPC buffer size limits * Fix session cleanup on launch failure * Set default wait timeout and reject empty type text * refactor: share test helpers across suites * Fix formatting for wait timeout change * Fix CLI command error envelopes * Fix formatting for error envelope fix * Register INVALID_INPUT error code
1 parent 9a222ac commit 428e680

87 files changed

Lines changed: 7326 additions & 38 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"ok": true,
3+
"command": "create",
4+
"timestamp": "2026-03-19T18:02:15.173Z",
5+
"result": {
6+
"sessionId": "01KM3M69V23RWMMDMS1EK3ZXB4"
7+
}
8+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"ok": true,
3+
"command": "list",
4+
"timestamp": "2026-03-19T18:02:15.471Z",
5+
"result": {
6+
"sessions": [
7+
{
8+
"sessionId": "01KM3M69V23RWMMDMS1EK3ZXB4",
9+
"status": "running",
10+
"command": [
11+
"node",
12+
"--import",
13+
"tsx",
14+
"../../test/fixtures/apps/hello-prompt/main.ts"
15+
],
16+
"createdAt": "2026-03-19T18:02:14.759Z"
17+
}
18+
]
19+
}
20+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"ok": true,
3+
"command": "inspect",
4+
"timestamp": "2026-03-19T18:02:15.861Z",
5+
"result": {
6+
"session": {
7+
"version": 1,
8+
"sessionId": "01KM3M69V23RWMMDMS1EK3ZXB4",
9+
"createdAt": "2026-03-19T18:02:14.759Z",
10+
"updatedAt": "2026-03-19T18:02:15.078Z",
11+
"status": "running",
12+
"command": [
13+
"node",
14+
"--import",
15+
"tsx",
16+
"../../test/fixtures/apps/hello-prompt/main.ts"
17+
],
18+
"cwd": "/home/coder/.mux/src/agent-terminal/agent_exec_d1aeb26ed6/dogfood/20260319-lifecycle",
19+
"cols": 80,
20+
"rows": 24,
21+
"hostPid": 278189,
22+
"childPid": 278201,
23+
"exitCode": null,
24+
"exitSignal": null
25+
}
26+
}
27+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ok": true,
3+
"command": "type",
4+
"timestamp": "2026-03-19T18:02:16.162Z",
5+
"result": {}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ok": true,
3+
"command": "send-keys",
4+
"timestamp": "2026-03-19T18:02:16.456Z",
5+
"result": {}
6+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"ok": true,
3+
"command": "wait",
4+
"timestamp": "2026-03-19T18:02:16.977Z",
5+
"result": {
6+
"timedOut": false
7+
}
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ok": true,
3+
"command": "paste",
4+
"timestamp": "2026-03-19T18:02:17.309Z",
5+
"result": {}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ok": true,
3+
"command": "send-keys",
4+
"timestamp": "2026-03-19T18:02:17.612Z",
5+
"result": {}
6+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"ok": true,
3+
"command": "wait",
4+
"timestamp": "2026-03-19T18:02:18.211Z",
5+
"result": {
6+
"timedOut": false
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"ok": true,
3+
"command": "resize",
4+
"timestamp": "2026-03-19T18:02:18.622Z",
5+
"result": {
6+
"cols": 120,
7+
"rows": 40
8+
}
9+
}

0 commit comments

Comments
 (0)