feat(engine): add prompt queue, announcements, and transcript resume - #218
Merged
Conversation
Port of Year 0 PACK-02 and PACK-08 control plane capabilities into Hawk. - engine: Implemented thread-safe PromptQueue supporting priority scheduling (Normal, Steering, Interjection) and FIFO ordering. - engine: Implemented AnnouncementFeed managing in-session broadcast notices with TTL expiration. - engine: Wired PromptQueue and AnnouncementFeed accessors to Session. - engine: Implemented true transcript resume in agent_session_tool.go by replaying prior session messages from disk when ResumeFrom is provided. - tool: Added unit tests for structured AskUserQuestionTool option handling and validation. - tests: Added test suites for prompt queue priority/concurrency, announcement feed expiration, and subagent transcript resume.
- terminal: Track readDone state in Terminal when background reader terminates. - terminal: Update Read to drain buffered bytes properly. - tests: Update TestTerminal_LifecycleAndRead with bounded polling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port of Year 0 PACK-02 and PACK-08 control plane capabilities into Hawk.
internal/engine/prompt_queue.go): Implemented thread-safePromptQueuewith priority levels (PriorityNormal,PrioritySteering,PriorityInterjection), FIFO sorting, pause/resume, clear/drain, and prompt lifecycle operations.internal/engine/announcements.go): ImplementedAnnouncementFeedmanaging session broadcast notices (info,warning,system,schedule) with TTL expiration and read-state tracking.internal/engine/session.go): InitializedPromptQueueandAnnouncementFeedinNewSessionWithClientand added thread-safe accessors onSession.internal/engine/agent_session_tool.go): ConnectedResumeFromsubagent requests tosession.Loadto restore full prior message history before executing follow-up turns.internal/tool/ask_user_test.go): Added comprehensive test coverage for option list formatting and input validation.Verification
go test -race ./internal/engine/... ./internal/tool/... ./internal/taskruntime/...-> PASS./scripts/check-internal-layer-imports.sh-> PASSmake lint-> 0 issueshawk verify-> verification passed