Skip to content

feat(engine): add prompt queue, announcements, and transcript resume - #218

Merged
Patel230 merged 2 commits into
mainfrom
feat/y0-prompt-queue-announcements
Aug 20, 2026
Merged

feat(engine): add prompt queue, announcements, and transcript resume#218
Patel230 merged 2 commits into
mainfrom
feat/y0-prompt-queue-announcements

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Port of Year 0 PACK-02 and PACK-08 control plane capabilities into Hawk.

  • Prompt Queue (internal/engine/prompt_queue.go): Implemented thread-safe PromptQueue with priority levels (PriorityNormal, PrioritySteering, PriorityInterjection), FIFO sorting, pause/resume, clear/drain, and prompt lifecycle operations.
  • In-Session Announcements (internal/engine/announcements.go): Implemented AnnouncementFeed managing session broadcast notices (info, warning, system, schedule) with TTL expiration and read-state tracking.
  • Session Wiring (internal/engine/session.go): Initialized PromptQueue and AnnouncementFeed in NewSessionWithClient and added thread-safe accessors on Session.
  • True Transcript Resume (internal/engine/agent_session_tool.go): Connected ResumeFrom subagent requests to session.Load to restore full prior message history before executing follow-up turns.
  • Structured AskUser (internal/tool/ask_user_test.go): Added comprehensive test coverage for option list formatting and input validation.
  • Test Coverage: Added test suites for prompt queue priority/concurrency, announcement feed TTL expiration, and transcript replay across prior subagent sessions.

Verification

  • go test -race ./internal/engine/... ./internal/tool/... ./internal/taskruntime/... -> PASS
  • ./scripts/check-internal-layer-imports.sh -> PASS
  • make lint -> 0 issues
  • hawk verify -> verification passed

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.
@Patel230
Patel230 merged commit 10d34e2 into main Aug 20, 2026
26 checks passed
@Patel230
Patel230 deleted the feat/y0-prompt-queue-announcements branch August 20, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant