7c8df6bc68
Add AgentForkFn and AgentCleanupFn type aliases. Extend AgentOptions with fork: AgentForkFn | null and cleanup: AgentCleanupFn | null fields. Add getAskSessionId / setAskSessionId session-cache helpers using <stepHash>:ask key shape (coexists with exec sessions in the same per-agent cache file). All four adapters pass fork: null, cleanup: null — real wiring lands in Phase 2b. Resolves #145. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
857 B
857 B
@united-workforce/util-agent, @united-workforce/agent-mock, @united-workforce/agent-builtin, @united-workforce/agent-hermes, @united-workforce/agent-claude-code
| @united-workforce/util-agent | @united-workforce/agent-mock | @united-workforce/agent-builtin | @united-workforce/agent-hermes | @united-workforce/agent-claude-code |
|---|---|---|---|---|
| minor | patch | patch | patch | patch |
feat(util-agent): extend AgentOptions with fork / cleanup and add ask-session cache
Phase 2a infrastructure for step ask. Extends AgentOptions with
fork: AgentForkFn | null and cleanup: AgentCleanupFn | null fields, exporting
the new AgentForkFn and AgentCleanupFn type aliases. Adds getAskSessionId /
setAskSessionId to the per-agent session cache, using <stepHash>:ask keys
that share the cache file with exec sessions (<threadId>:<role> keys) without
collision. All four adapters (mock, builtin, hermes, claude-code) now pass
fork: null, cleanup: null — real implementations land in Phase 2b. Resolves
issue #145.