round 1: implement bracket-first manual compaction

This commit is contained in:
Hypatia May
2026-07-30 17:40:25 +08:00
parent 86b95a3856
commit faac9b4fd5
101 changed files with 3452 additions and 295 deletions

View File

@@ -42,6 +42,7 @@ function stubAgent(ctx: Context, id: string): { agent: Agent; session: Session }
followup: () => {},
steer: () => {},
inject(input) { appendInjection(session, input) },
reserveTurnAdmission: () => undefined,
cancel() { status = 'idle' },
whenIdle() { return Promise.resolve() },
}

View File

@@ -55,6 +55,7 @@ function stubAgentForSession(session: Session): StubAgent {
if (shouldDefer) deferred.push(input)
else appendInjection(session, input)
},
reserveTurnAdmission: () => undefined,
cancel() {},
whenIdle() { return Promise.resolve() },
}

View File

@@ -45,6 +45,7 @@ function liveAgent(ctx: Context, session: Session): Agent {
inject(input: UserMessage) {
session.append('user/message', input, { surfaceOp: 'append' })
},
reserveTurnAdmission: () => undefined,
cancel() {},
whenIdle() { return Promise.resolve() },
}

View File

@@ -39,6 +39,7 @@ function stubAgent(rawId: string, supplied?: Session): StubAgent {
inject(input) {
session.append('user/message', input, { surfaceOp: 'append' })
},
reserveTurnAdmission: () => undefined,
cancel() {},
whenIdle() { return Promise.resolve() },
}