feat: SDK sessions, async queue processing with HITL support#5
Open
feat: SDK sessions, async queue processing with HITL support#5
Conversation
…2e tests SDK Sessions: - Add sessionId and forkSession support to agent requests - Enable multi-turn conversations via session resume/fork - Return sessionId in agent responses for future continuation Async Queue Processing (QueueModule): - Add pg-boss backed job queue for async agent execution - PgBossService for queue operations (send, work, fetch, complete, fail) - AsyncWorkerService for processing agent requests from queues - HITLService for human-in-the-loop tool approval with pattern matching - ChannelResolverService for routing responses via reply channels - Support for queue:// and webhook:// reply channel URIs Queue E2E Tests: - Add testcontainers-based e2e tests for queue infrastructure - PostgreSQL service added to docker-compose for development - Graceful test skipping when Docker is unavailable - Tests verify job lifecycle, batch processing, and channel integration Documentation: - Updated CLAUDE.md with QueueModule architecture and testing docs - Updated README.md with queue testing section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The QueueModule expects factory instances that can create ReplyChannel objects, not ReplyChannel instances directly. Updated the type definition to use ReplyChannelFactory consistently across: - QueueModuleOptions.replyChannels - QueueModule.createProviders() - Exported types from index.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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
This PR adds three major features to the Claude Code Plugin REST API:
SDK Sessions
sessionIdandforkSessionsupport to agent requestssessionIdin agent responses for future continuationAsync Queue Processing (QueueModule)
PgBossServicefor queue operations (send, work, fetch, complete, fail)AsyncWorkerServicefor processing agent requests from queuesHITLServicefor human-in-the-loop tool approval with pattern matchingChannelResolverServicefor routing responses via reply channelsqueue://andwebhook://reply channel URIsQueue E2E Tests
Test plan
🤖 Generated with Claude Code