refactor(agent): complete inbox lifecycle migration

This commit is contained in:
_Kerman
2026-08-03 12:25:33 +08:00
parent dc1d542092
commit 49e90695cc
214 changed files with 6019 additions and 4235 deletions

View File

@@ -201,12 +201,8 @@ export function apply(ctx: Context, config: Config): void {
}
const waitForProjections = async (agent: Agent): Promise<void> => {
while (true) {
const projection = projectionTails.get(agent)
if (projection === undefined) return
await projection
if (projectionTails.get(agent) === projection) return
}
let projection: Promise<void> | undefined
while ((projection = projectionTails.get(agent)) !== undefined) await projection
}
ctx.on('agent/pre-step', async (