Add MCP thread management and Codex turn mapping

- Add scoped thread list, read, send, wait, and interrupt tools
- Track creation provenance and map provider turns across adapters
- Centralize thread lifecycle operations in a management service
This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-08-14 11:22:52 +02:00
1 parent 34c6d5ea18
commit c8b20831e2
38 files changed
+2085 -48

No files matched your search

@@ -1824,6 +1824,8 @@ function OrchestrationV2DebugRoute() {
const nextThreadId = newThreadId();
const result = await api.dispatchCommand({
type: "thread.create",
createdBy: "user",
creationSource: "web",
commandId: newCommandId(),
threadId: nextThreadId,
projectId: newProjectId(),
@@ -1878,6 +1880,8 @@ function OrchestrationV2DebugRoute() {
const targetRunId = activeTurn?.targetRunId;
const result = await api.dispatchCommand({
type: "message.dispatch",
createdBy: "user",
creationSource: "web",
commandId: newCommandId(),
threadId: activeThreadId,
messageId: newMessageId(),
@@ -2010,6 +2014,8 @@ function OrchestrationV2DebugRoute() {
const targetThreadId = newThreadId();
const result = await api.dispatchCommand({
type: "thread.fork",
createdBy: "user",
creationSource: "web",
commandId: newCommandId(),
sourceThreadId: input.threadId,
targetThreadId,
@@ -2039,6 +2045,8 @@ function OrchestrationV2DebugRoute() {
try {
const result = await api.dispatchCommand({
type: "thread.merge_back",
createdBy: "user",
creationSource: "web",
commandId: newCommandId(),
sourceThreadId: mergeBackCandidate.sourceThreadId,
targetThreadId: mergeBackCandidate.targetThreadId,