refactor(agent): simplify inbox-driven turn admission
This commit is contained in:
@@ -46,13 +46,10 @@ function agentForCwd(cwd: string): Agent {
|
||||
session,
|
||||
inbox: new Inbox(session, { inserted: () => {}, discarded: () => {} }),
|
||||
status: 'idle',
|
||||
acceptsNextStep: false,
|
||||
send: () => {},
|
||||
followup: () => {},
|
||||
steer: () => {},
|
||||
inject: () => { throw new Error('step-boundary catalog must not use agent.inject()') },
|
||||
updateInbox: () => 'not-found',
|
||||
reserveTurnAdmission: () => undefined,
|
||||
cancel() {},
|
||||
whenIdle: () => Promise.resolve(),
|
||||
}
|
||||
@@ -65,14 +62,11 @@ function sessionAgent(session: Session, id = 'tool-skill-agent'): Agent {
|
||||
session,
|
||||
inbox: new Inbox(session, { inserted: () => {}, discarded: () => {} }),
|
||||
status: 'running',
|
||||
acceptsNextStep: false,
|
||||
ctx: new Context(),
|
||||
send: () => {},
|
||||
followup: () => {},
|
||||
steer: () => {},
|
||||
inject: () => { throw new Error('step-boundary catalog must not use agent.inject()') },
|
||||
updateInbox: () => 'not-found',
|
||||
reserveTurnAdmission: () => undefined,
|
||||
cancel() {},
|
||||
whenIdle: () => Promise.resolve(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user