* feat: Implement Claude orchestration with session management
- Add CLAUDE_WEBHOOK_SECRET for webhook authentication
- Fix Docker volume mounting for Claude credentials
- Capture Claude's internal session ID from stream-json output
- Update entrypoint script to support OUTPUT_FORMAT=stream-json
- Fix environment variable naming (REPOSITORY -> REPO_FULL_NAME)
- Enable parallel session execution with proper authentication
- Successfully tested creating PRs via orchestrated sessions
This enables the webhook to create and manage Claude Code sessions that can:
- Clone repositories
- Create feature branches
- Implement code changes
- Commit and push changes
- Create pull requests
All while capturing Claude's internal session ID for potential resumption.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Update SessionManager tests for new implementation
- Update test to expect docker volume create instead of docker create
- Add unref() method to mock process objects to fix test environment error
- Update spawn expectations to match new docker run implementation
- Fix tests for both startSession and queueSession methods
Tests now pass in CI environment.
* feat: Add Claude API documentation and improve session validation
- Add comprehensive Swagger/OpenAPI documentation for Claude webhook API
- Add improved validation for session dependencies to handle edge cases
- Add hackathon-specific Docker Compose configuration
- Update SessionHandler to validate dependency UUIDs and filter invalid values
- Update SessionManager to properly handle sessions without dependencies
- Add API endpoint documentation with examples and schemas
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test: Add comprehensive tests for SessionHandler dependency validation
Add test coverage for dependency validation logic in SessionHandler:
- Filter out invalid dependency values (empty strings, whitespace, "none")
- Validate UUID format for dependencies
- Handle mixed valid and invalid dependencies
- Support empty dependency arrays
- Handle arrays with only filtered values
This improves test coverage from ~91% to ~97% for SessionHandler.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Address PR #181 review comments
- Remove unused docker-compose.hackathon.yml file
- Extract UUID regex to constant for better maintainability
- Document breaking changes in BREAKING_CHANGES.md
- Add comprehensive examples to Swagger documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: Implement Claude orchestration provider for parallel session management
- Add ClaudeWebhookProvider implementing the webhook provider interface
- Create orchestration system for running multiple Claude containers in parallel
- Implement smart task decomposition to break complex projects into workstreams
- Add session management with dependency tracking between sessions
- Support multiple execution strategies (parallel, sequential, wait_for_core)
- Create comprehensive test suite for all components
- Add documentation for Claude orchestration API and usage
This enables super-charged Claude capabilities for the MCP hackathon by allowing
multiple Claude instances to work on different aspects of a project simultaneously,
with intelligent coordination and result aggregation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Add session management endpoints for MCP integration
- Add SessionHandler for individual session CRUD operations
- Create endpoints: session.create, session.get, session.list, session.start, session.output
- Fix Claude invocation in Docker containers using proper claude chat command
- Add volume mounts for persistent storage across session lifecycle
- Simplify OrchestrationHandler to create single coordination sessions
- Update documentation with comprehensive MCP integration examples
- Add comprehensive unit and integration tests for new endpoints
- Support dependencies and automatic session queuing/starting
This enables Claude Desktop to orchestrate multiple Claude Code sessions via MCP Server tools.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Update ClaudeWebhookProvider validation for session endpoints
- Make project fields optional for session management operations
- Add validation for session.create requiring session field
- Update tests to match new validation rules
- Fix failing CI tests
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Use Promise.reject for validation errors in parsePayload
- Convert synchronous throws to Promise.reject for async consistency
- Fixes failing unit tests expecting rejected promises
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Mock SessionManager in integration tests to avoid Docker calls in CI
- Add SessionManager mock to prevent Docker operations during tests
- Fix claude-webhook.test.ts to use proper test setup and payload structure
- Ensure all integration tests can run without Docker dependency
- Fix payload structure to include 'data' wrapper
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Mock child_process to prevent Docker calls in CI tests
- Mock execSync and spawn at child_process level to prevent any Docker commands
- This ensures tests work in CI environment without Docker
- Tests now pass both locally and in CI Docker build
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Address PR review comments and fix linter warnings
- Move @types/uuid to devDependencies
- Replace timestamp+Math.random with crypto.randomUUID() for better uniqueness
- Extract magic number into EXTRA_SESSIONS_COUNT constant
- Update determineStrategy return type to use literal union
- Fix unnecessary optional chaining warnings
- Handle undefined labels in GitHub transformers
- Make TaskDecomposer.decompose synchronous
- Add proper eslint-disable comments for intentional sync methods
- Fix all TypeScript and formatting issues
* fix: Mock SessionManager in integration tests to prevent Docker calls in CI
- Add SessionManager mocks to claude-session.test.ts
- Add SessionManager mocks to claude-webhook.test.ts
- Prevents 500 errors when running tests in CI without Docker
- All integration tests now pass without requiring Docker runtime
* fix: Run only unit tests in Docker builds to avoid Docker-in-Docker issues
- Change test stage to run 'npm run test:unit' instead of 'npm test'
- Skips integration tests that require Docker runtime
- Prevents CI failures in Docker container builds
- Integration tests still run in regular CI workflow
* fix: Use Dockerfile CMD for tests in Docker build CI
- Remove explicit 'npm test' command from docker run
- Let Docker use the CMD defined in Dockerfile (npm run test:unit)
- This ensures consistency and runs only unit tests in Docker builds
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Standardize Docker image naming and improve environment variable handling
- Standardize on 'claudecode:latest' image name across the codebase
- Update build script to use claudecode:latest instead of claude-code-runner:latest
- Fix health check to use CLAUDE_CONTAINER_IMAGE env var dynamically
- Improve environment variable handling for git configuration
- Pass BOT_EMAIL and BOT_USERNAME to containers
- Entrypoint scripts already use these with appropriate defaults
- Add comprehensive environment variables documentation
- Document all 90+ environment variables used in the project
- Identify hard-coded values that could be made configurable
- Update .env.example with missing variables
This ensures consistency in Docker image naming and allows proper git
configuration in containers using the configured bot identity.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Add BOT_EMAIL to docker-compose.yml
- Add BOT_EMAIL environment variable to docker-compose.yml
- Ensures git configuration in containers uses proper email address
- Complements the previous changes for environment variable handling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Use BOT_USERNAME environment variable in prompt creation
- Fix undefined BOT_USERNAME reference in createPrompt function
- Change prompt to use actual bot username instead of hardcoded "Claude"
- Makes the prompt more accurate: "You are @MCPClaude" instead of "You are Claude"
This fixes the PR review functionality that was broken due to the
undefined variable reference.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Add verbose and stream-json output to Claude CLI for better debugging
- Add --verbose flag to see detailed Claude processing
- Add --output-format stream-json for structured output
- Helps diagnose issues with PR review and other operations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Use colon syntax for allowedTools in PR review to match auto-tagging
- Change from space syntax Bash(gh *) to colon syntax Bash(gh:*)
- This matches the working syntax used in auto-tagging
- Should fix the permission issues preventing PR reviews from posting
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Add Claude Code timeout configuration for unattended mode
- Add BASH_DEFAULT_TIMEOUT_MS (10 minutes) and BASH_MAX_TIMEOUT_MS (20 minutes)
- Pass timeout environment variables to Claude container
- Document new timeout settings in .env.example and environment-variables.md
- Better defaults for webhook mode where builds/tests may take longer
These timeouts are more suitable for unattended PR reviews and other
operations that might involve long-running commands like builds or tests.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Remove TOS violations and marketing copy from authentication guides
- Fix Claude CLI command references to use --dangerously-skip-permissions
- Update setup scripts with correct command syntax
- Add test coverage for Docker authentication mount path logic
- Focus documentation on technical implementation details
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Unified documentation approach with single source of truth:
**Consolidated into main README.md:**
- All three authentication methods (Setup Container, API Key, AWS Bedrock)
- Quick setup instructions with links to detailed guides
- Clear indication of which method to use for different scenarios
**Removed docs/README.md:**
- Eliminated duplication between root and docs README
- Keep docs/ only for deeper technical guides when needed
**Updated structure:**
- Main README: Complete setup and quick start information
- docs/: Technical deep-dive guides only (setup-container-guide.md, etc.)
- Clear documentation hierarchy in main README
This provides a better user experience with the main README as the
authoritative getting-started guide, and docs/ for detailed technical
implementation when users need deeper information.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Cleaned up documentation to focus on technical implementation rather than
cost analysis and marketing copy:
**setup-container-guide.md:**
- Removed cost savings and benefit claims
- Streamlined to technical authentication process
- Removed planned enhancements and maintenance schedules
- Focused on actual implementation details and troubleshooting
**README.md:**
- Removed cost comparison table
- Simplified authentication method selection to technical criteria
- Removed marketing language ("breakthrough innovation", "saving thousands")
- Focused on technical features and capabilities
Documentation now provides clear technical guidance without sales-oriented content.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Based on latest Claude subscription information:
- Claude Pro: $20/month (no Claude Code access)
- Claude Max 5x: $100/month (5x usage limits, includes Claude Code)
- Claude Max 20x: $200/month (20x usage limits, includes Claude Code)
Updates:
- Correct references from "Claude 20x" to "Claude Max 5x/20x plans"
- Add specific usage limits: ~225/900 messages per 5-hour session
- Add Claude Code usage limits: ~50-200/200-800 prompts per session
- Clarify that only Max plans include Claude Code access
- Update cost comparison tables with accurate pricing
- Remove misleading "unlimited" claims
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Security:
- Fix user-controlled bypass vulnerability in webhook body validation
- Add proper type checking for request body object
Documentation:
- Remove specific Claude subscription pricing amounts per feedback
- Correct Claude Pro vs Max subscription access clarification
- Use "fixed subscription cost" instead of specific dollar amounts
- Remove "unlimited" claims for Claude 20x
- Improve consistency across authentication documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This comprehensive update adds support for Claude Max subscription authentication
and improves the overall authentication system with multiple methods:
🔐 Claude Authentication Enhancements:
- Add setup container method for Claude Max/20x subscription usage ($20-200/month)
- Create interactive authentication script (setup-claude-interactive.sh)
- Add authentication testing utility (test-claude-auth.sh)
- Support three authentication methods: Setup Container, API Key, AWS Bedrock
- Comprehensive authentication documentation
📁 Directory Configuration:
- Add CLAUDE_HUB_DIR environment variable (default: ~/.claude-hub)
- Update .gitignore to use .claude-hub/ instead of hardcoded paths
- Consistent environment variable usage across all scripts
🐙 GitHub Token Support:
- Add fine-grained GitHub token support (github_pat_) alongside classic tokens (ghp_)
- Update token validation in claudeService and githubService
- Enhanced token detection and authentication flow
📖 Documentation & Guides:
- Add complete Claude Authentication Guide with all three methods
- Add Setup Container Deep Dive documentation
- Update CLAUDE.md with quick start authentication section
- Comprehensive cost comparison and use case recommendations
🐳 Container & Docker Improvements:
- Update Dockerfile.claudecode with proper entrypoint script copying
- Add Dockerfile.claude-setup for interactive authentication
- Update docker-compose.yml with new port (3003) and environment variables
- Enhanced container volume mounting for authentication
🔧 Infrastructure Updates:
- Add TRUST_PROXY configuration for reverse proxy environments
- Update port configuration from 3002 to 3003
- Enhanced environment variable documentation in .env.example
- Debug utilities for troubleshooting authentication issues
This update enables Claude Max subscribers to use their existing subscriptions
for automation, potentially saving thousands in API costs while maintaining
full production capabilities.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused benchmark-startup.sh script
- Remove redundant run-claudecode-interactive.sh wrapper
- Remove test-claude.sh and test-container.sh (functionality covered by e2e tests)
- Remove volume-test.sh (basic functionality covered by e2e tests)
- Update docs/SCRIPTS.md to reflect actual repository state
- Remove benchmark_results from .gitignore
These scripts were either not referenced anywhere in the codebase or
their functionality has been migrated to JavaScript E2E tests as noted
in test/MIGRATION_NOTICE.md.
Fixes#139🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove all Discord chatbot implementation files
- Remove generic chatbot provider infrastructure
- Update docker-compose.yml to use environment variables instead of Docker secrets
- Keep dual secret support (files take priority, env vars as fallback)
- Document secret configuration options in .env.example
- Clean up related tests and documentation
- Prepare codebase for CLI-first approach with future plugin architecture
This simplifies the codebase by removing incomplete chatbot functionality
while maintaining flexible secret management for both development and production.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement self-hosted runner fallback via USE_SELF_HOSTED repository variable
- Add runner information logging for debugging
- Add timeout protection (30 minutes) to prevent hanging
- Update documentation to match actual implementation
- Fix npm permission context switching in Dockerfile
- Consolidate directory creation to minimize user context switches
The chatbot functionality has not been migrated to TypeScript yet.
These files remain as JavaScript and the documentation should reflect
the current state of the codebase.
- Remove 11 JavaScript source files that have been migrated to TypeScript
- Update package.json scripts to reference TypeScript files
- Update documentation and scripts to reference .ts instead of .js
- Keep JavaScript files without TypeScript equivalents (chatbot-related)
This completes the TypeScript migration for core application files while
maintaining backward compatibility for components not yet migrated.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add required 'repo' parameter for repository specification
- Add optional 'branch' parameter (defaults to 'main')
- Implement extractRepoAndBranch() method in DiscordProvider
- Add repository validation in chatbotController
- Update parseWebhookPayload to include repo/branch context
- Enhanced error messages for missing repository parameter
- Updated all tests to handle new repo/branch fields
- Added comprehensive test coverage for new functionality
Discord slash command now requires:
/claude repo:owner/repository command:your-instruction
/claude repo:owner/repository branch:feature command:your-instruction
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix unused crypto import in DiscordProvider by using destructured import
- Add rate limiting to chatbot webhook endpoints using express-rate-limit
- Remove Slack/Nextcloud placeholder implementations to focus on Discord only
- Update tests to handle mocking issues and environment variables
- Clean up documentation to reflect Discord-only implementation
- Simplify architecture while maintaining extensibility for future platforms
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive chatbot provider architecture supporting Discord webhooks with extensible design for future Slack and Nextcloud integration. Includes dependency injection, signature verification, comprehensive test suite, and full documentation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Clarify that DOCKER_HUB_USERNAME is an environment variable, not a secret
- Add cross-reference to existing docker-ci-cd.md documentation
- Document both build jobs that use Docker Hub authentication
- Update troubleshooting section to reflect actual workflow configuration
This addresses the concerns raised in the automated PR review about
incorrect secret references and documentation overlap.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Document how to create Docker Hub access tokens
- Explain both repository and organization secret setup options
- Include troubleshooting steps for common authentication issues
- Add security best practices for token management
This guide helps contributors set up Docker Hub authentication
correctly to avoid the "Password required" error in CI/CD workflows.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added detailed workflow diagrams using Mermaid
- Documented the complete automated PR review process
- Included troubleshooting guides and common issues
- Added code examples for key components
- Documented configuration requirements and security considerations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update workflow descriptions to reflect new CI and deployment structure
- Add note about automated PR reviews when CI jobs complete successfully
- Renumber workflow sections for clarity
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove backup Dockerfile and temporary benchmark results
- Organize scripts and documentation into proper directories
- Update CLAUDE.md to reference actual script locations instead of wrappers
- Enhance .gitignore to prevent future root directory clutter
- Move utilities to appropriate locations (cli/, test/, docs/)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add GitHub Actions workflows for CI, security scanning, and deployment
- Implement automated PR review system triggered by successful check suites
- Add ESLint and Prettier for code quality and formatting
- Configure Dependabot for automated dependency updates
- Add comprehensive test coverage for check suite webhook events
- Include Docker builds and container registry publishing
- Add security scanning with CodeQL, npm audit, and TruffleHog
- Create PR and issue templates for better collaboration
- Add comprehensive CI/CD documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>