feat(run): rewrite routes for the tmux backend, drop stdin-message endpoint

This commit is contained in:
2026-08-12 09:46:55 +07:00
parent 56744b360d
commit 1bc237198c
3 changed files with 105 additions and 518 deletions
+1 -14
View File
@@ -1195,22 +1195,14 @@ describe("lane ensure, start mode, lane_id and releasing a finished run", () =>
});
});
it("filters GET /api/run/history by laneId and leaves non-lane runs unlabelled", async () => {
it("filters GET /api/run/history by laneId", async () => {
const lane = await adoptedLane("history-filter");
const other = await adoptedLane("history-filter-other");
let laneRunId;
let plainRunId;
await withFakeClaude("history", "process.exit(0);\n", async () => {
const started = await request("POST", `/api/lanes/${lane.id}/start`, { prompt: "lane run" });
laneRunId = started.body.lane.run_id;
await waitForRelease(lane.id);
const plain = await request("POST", "/api/run", {
prompt: "plain run",
mode: "headless",
cwd: ROOT,
});
assert.equal(plain.status, 201);
plainRunId = plain.body.id;
});
const filtered = await request("GET", `/api/run/history?laneId=${lane.id}`);
@@ -1223,11 +1215,6 @@ describe("lane ensure, start mode, lane_id and releasing a finished run", () =>
const empty = await request("GET", `/api/run/history?laneId=${other.id}`);
assert.deepEqual(empty.body.items, []);
// POST /api/run is unchanged: its row carries no lane.
const all = await request("GET", "/api/run/history?limit=500");
const plainRow = all.body.items.find((it) => it.id === plainRunId);
assert.equal(plainRow.lane_id, null);
});
it("releases the lane when the run exits on its own", async () => {