fix: StepOutput.sessionId → string | null, legacy fallback → null

This commit is contained in:
2026-05-22 09:16:13 +00:00
parent 7ff90cef4f
commit f0f840e6e0
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -200,6 +200,7 @@ export async function cmdThreadShow(storageRoot: string, threadId: ThreadId): Pr
thread: threadId, thread: threadId,
head: activeHead, head: activeHead,
done: false, done: false,
sessionId: null,
}; };
} }
@@ -210,6 +211,7 @@ export async function cmdThreadShow(storageRoot: string, threadId: ThreadId): Pr
thread: threadId, thread: threadId,
head: hist.head, head: hist.head,
done: true, done: true,
sessionId: null,
}; };
} }
@@ -626,7 +628,7 @@ function resolveAgentConfig(
type SpawnAgentResult = { type SpawnAgentResult = {
stepHash: CasRef; stepHash: CasRef;
sessionId: string; sessionId: string | null;
}; };
function spawnAgent(agent: AgentConfig, threadId: ThreadId, role: string): SpawnAgentResult { function spawnAgent(agent: AgentConfig, threadId: ThreadId, role: string): SpawnAgentResult {
@@ -668,7 +670,7 @@ function spawnAgent(agent: AgentConfig, threadId: ThreadId, role: string): Spawn
if (!isCasRef(line)) { if (!isCasRef(line)) {
fail(`agent stdout is not a valid CAS hash or JSON: ${line || "(empty)"}`); fail(`agent stdout is not a valid CAS hash or JSON: ${line || "(empty)"}`);
} }
return { stepHash: line, sessionId: "" }; return { stepHash: line, sessionId: null };
} }
async function archiveThread( async function archiveThread(
@@ -717,6 +719,7 @@ export async function cmdThreadStep(
thread: threadId, thread: threadId,
head: headHash, head: headHash,
done: true, done: true,
sessionId: null,
}; };
} }
+1 -1
View File
@@ -81,7 +81,7 @@ export type StepOutput = {
thread: ThreadId; thread: ThreadId;
head: CasRef; head: CasRef;
done: boolean; done: boolean;
sessionId?: string; sessionId: string | null;
}; };
/** uwf thread steps — single step entry */ /** uwf thread steps — single step entry */