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,
head: activeHead,
done: false,
sessionId: null,
};
}
@@ -210,6 +211,7 @@ export async function cmdThreadShow(storageRoot: string, threadId: ThreadId): Pr
thread: threadId,
head: hist.head,
done: true,
sessionId: null,
};
}
@@ -626,7 +628,7 @@ function resolveAgentConfig(
type SpawnAgentResult = {
stepHash: CasRef;
sessionId: string;
sessionId: string | null;
};
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)) {
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(
@@ -717,6 +719,7 @@ export async function cmdThreadStep(
thread: threadId,
head: headHash,
done: true,
sessionId: null,
};
}
+1 -1
View File
@@ -81,7 +81,7 @@ export type StepOutput = {
thread: ThreadId;
head: CasRef;
done: boolean;
sessionId?: string;
sessionId: string | null;
};
/** uwf thread steps — single step entry */