Skip to content

Commit 8e97d0f

Browse files
committed
feat: add HTTP transport mode alongside stdio
Adds `--http` flag (and `CODEBASE_CONTEXT_HTTP=1` env var) to run the MCP server as a long-lived HTTP process using StreamableHTTPServerTransport. - src/server/factory.ts: server factory so both stdio and HTTP can create fresh Server instances sharing the same module-level state - src/server/http.ts: full HTTP server with per-session Server+Transport, session map, idle timeout reaper, and graceful shutdown - src/index.ts: export registerHandlers, add startHttp() entry point, port flag parsing (--port / CODEBASE_CONTEXT_PORT, default 3100), fix resolveRootPath() to skip --http/--port flags Multi-session support: each client gets its own Server+Transport while sharing project state. stdio mode unchanged; 312/312 tests pass.
1 parent 260c61d commit 8e97d0f

File tree

5 files changed

+648
-173
lines changed

5 files changed

+648
-173
lines changed

.codebase-context/memory.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,86 @@
246246
"reason": "Auto-extracted from git commit history",
247247
"date": "2026-02-15T13:04:10.000Z",
248248
"source": "git"
249+
},
250+
{
251+
"id": "0c5271f19670",
252+
"type": "gotcha",
253+
"category": "conventions",
254+
"memory": "fix: prevent orphaned processes via stdin/ppid/onclose lifecycle guards (#77)",
255+
"reason": "Auto-extracted from git commit history",
256+
"date": "2026-03-19T22:09:36.000Z",
257+
"source": "git"
258+
},
259+
{
260+
"id": "76f3e2ea45ac",
261+
"type": "gotcha",
262+
"category": "conventions",
263+
"memory": "fix: make exclude patterns recursive to prevent index pollution (#76)",
264+
"reason": "Auto-extracted from git commit history",
265+
"date": "2026-03-18T22:06:13.000Z",
266+
"source": "git"
267+
},
268+
{
269+
"id": "391c1d465544",
270+
"type": "gotcha",
271+
"category": "conventions",
272+
"memory": "fix: route MCP requests per project root (#65)",
273+
"reason": "Auto-extracted from git commit history",
274+
"date": "2026-03-07T15:37:13.000Z",
275+
"source": "git"
276+
},
277+
{
278+
"id": "47fcd92fbcce",
279+
"type": "gotcha",
280+
"category": "conventions",
281+
"memory": "fix: restore npx installs for published package",
282+
"reason": "Auto-extracted from git commit history",
283+
"date": "2026-03-05T22:24:47.000Z",
284+
"source": "git"
285+
},
286+
{
287+
"id": "6cdf7384165a",
288+
"type": "gotcha",
289+
"category": "conventions",
290+
"memory": "fix(get-team-patterns): filter out legacy testing framework categories from patterns",
291+
"reason": "Auto-extracted from git commit history",
292+
"date": "2026-03-05T19:26:03.000Z",
293+
"source": "git"
294+
},
295+
{
296+
"id": "53c234c99d00",
297+
"type": "gotcha",
298+
"category": "conventions",
299+
"memory": "fix(git): run tests only on pre-push",
300+
"reason": "Auto-extracted from git commit history",
301+
"date": "2026-03-05T19:16:04.000Z",
302+
"source": "git"
303+
},
304+
{
305+
"id": "ac6653e45758",
306+
"type": "gotcha",
307+
"category": "conventions",
308+
"memory": "fix(git): tighten pre-push formatting enforcement",
309+
"reason": "Auto-extracted from git commit history",
310+
"date": "2026-03-05T18:47:36.000Z",
311+
"source": "git"
312+
},
313+
{
314+
"id": "cc519240e73c",
315+
"type": "gotcha",
316+
"category": "conventions",
317+
"memory": "fix(cli): remove unused MetadataDependency import",
318+
"reason": "Auto-extracted from git commit history",
319+
"date": "2026-03-05T18:23:48.000Z",
320+
"source": "git"
321+
},
322+
{
323+
"id": "9f949cc7137e",
324+
"type": "gotcha",
325+
"category": "conventions",
326+
"memory": "fix(cli): formatter audit — render missing metadata fields, README callers qualifier",
327+
"reason": "Auto-extracted from git commit history",
328+
"date": "2026-03-05T18:17:37.000Z",
329+
"source": "git"
249330
}
250331
]

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ nul
2323
.planning-archive/*
2424
.codex/
2525
grammars/*.wasm
26-
26+
.agents/
2727
.tmp-research-repos/
2828
docs/visuals.md
2929
.repolore/

0 commit comments

Comments
 (0)